content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# # PySNMP MIB module APDD-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/APDD-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:23:10 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) # acmepacketMgmt, = mibBuilder.importSymbols("ACMEPACKET-SMI", "acmepacketMgmt") ApTransportType, = mibBuilder.importSymbols("ACMEPACKET-TC", "ApTransportType") OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint") ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance") Counter64, Unsigned32, Bits, NotificationType, iso, IpAddress, TimeTicks, ObjectIdentity, Gauge32, ModuleIdentity, MibIdentifier, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Unsigned32", "Bits", "NotificationType", "iso", "IpAddress", "TimeTicks", "ObjectIdentity", "Gauge32", "ModuleIdentity", "MibIdentifier", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") apDDModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 9148, 3, 12)) if mibBuilder.loadTexts: apDDModule.setLastUpdated('201106080000Z') if mibBuilder.loadTexts: apDDModule.setOrganization('Acme Packet, Inc') if mibBuilder.loadTexts: apDDModule.setContactInfo(' Customer Service Postal: Acme Packet, Inc 100 Crosby Drive Bedford, MA 01730 US Tel: 1-781-328-4400 E-mail: support@acmepacket.com') if mibBuilder.loadTexts: apDDModule.setDescription('The Policy Director MIB for Acme Packet.') apDDMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1)) apDDMIBGeneralObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1)) apDDMIBTabularObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2)) apDDNotificationObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2)) apDDNotifObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1)) apDDNotifPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2)) apDDNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2, 0)) apDDConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3)) apDDObjectGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1)) apDDNotificationGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 2)) apDdInterfaceNumber = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdInterfaceNumber.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceNumber.setDescription('Number of the DD interfaces in the system.') apDdCurrentTransRate = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 2), Gauge32()).setUnits('per10Seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: apDdCurrentTransRate.setStatus('current') if mibBuilder.loadTexts: apDdCurrentTransRate.setDescription('The number of transactions over a 10s period.') apDdHighTransRate = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 3), Gauge32()).setUnits('per10Seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: apDdHighTransRate.setStatus('current') if mibBuilder.loadTexts: apDdHighTransRate.setDescription('Maximum value of apDdCurrentTransRate across all 10s periods.') apDdLowTransRate = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 4), Gauge32()).setUnits('per10Seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: apDdLowTransRate.setStatus('current') if mibBuilder.loadTexts: apDdLowTransRate.setDescription('Mimimum value of apDdCurrentTransRate across all 10s periods.') apDdAgentNumber = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentNumber.setStatus('current') if mibBuilder.loadTexts: apDdAgentNumber.setDescription('Number of the DD Agents in the system.') apDdSessionPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessionPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdSessionPeriodActive.setDescription('Number of the DD session is Active in this period') apDdSessionPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessionPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessionPeriodHigh.setDescription('Highest number of the DD session in this period') apDdSessionPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessionPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessionPeriodTotal.setDescription('Total Number of the DD session in this period') apDdSessionLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessionLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessionLifeTotal.setDescription('Total Number of the DD session in life') apDdSessionLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessionLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessionLifePerMax.setDescription('PerMax number of the DD session in life') apDdSessionLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessionLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessionLifeHigh.setDescription('Highest number of the DD session in life') apDdSessInitPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessInitPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdSessInitPeriodActive.setDescription('Number of the DD session is Active in Initial state in this period') apDdSessInitPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessInitPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessInitPeriodHigh.setDescription('Highest number of the DD session in Initial state in this period') apDdSessInitPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessInitPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessInitPeriodTotal.setDescription('Total Number of the DD session in Initial state in this period') apDdSessInitLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 15), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessInitLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessInitLifeTotal.setDescription('Total Number of the DD session in Initial state in life') apDdSessInitLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 16), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessInitLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessInitLifePerMax.setDescription('PerMax number of the DD session in Initial state in life') apDdSessInitLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 17), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessInitLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessInitLifeHigh.setDescription('Highest number of the DD session in Initial state in life') apDdSessEstablishedPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 18), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessEstablishedPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdSessEstablishedPeriodActive.setDescription('Number of the DD session is Active in Established state in this period') apDdSessEstablishedPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 19), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessEstablishedPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessEstablishedPeriodHigh.setDescription('Highest number of the DD session in Established state in this period') apDdSessEstablishedPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 20), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessEstablishedPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessEstablishedPeriodTotal.setDescription('Total Number of the DD session in Established state in this period') apDdSessEstablishedLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 21), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessEstablishedLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessEstablishedLifeTotal.setDescription('Total Number of the DD session in Established state in life') apDdSessEstablishedLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 22), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessEstablishedLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessEstablishedLifePerMax.setDescription('PerMax number of the DD session in Established state in life') apDdSessEstablishedLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 23), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessEstablishedLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessEstablishedLifeHigh.setDescription('Highest number of the DD session in Established state in life') apDdSessTerminatedPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 24), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessTerminatedPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdSessTerminatedPeriodActive.setDescription('Number of the DD session is Active in Terminated state in this period') apDdSessTerminatedPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 25), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessTerminatedPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessTerminatedPeriodHigh.setDescription('Highest number of the DD session in Terminated state in this period') apDdSessTerminatedPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 26), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessTerminatedPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessTerminatedPeriodTotal.setDescription('Total Number of the DD session in Terminated state in this period') apDdSessTerminatedLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 27), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessTerminatedLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessTerminatedLifeTotal.setDescription('Total Number of the DD session in Terminated state in life') apDdSessTerminatedLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 28), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessTerminatedLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessTerminatedLifePerMax.setDescription('PerMax number of the DD session in Terminated state in life') apDdSessTerminatedLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 29), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessTerminatedLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessTerminatedLifeHigh.setDescription('Highest number of the DD session in Terminated state in life') apDdSessTimeoutPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 30), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessTimeoutPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessTimeoutPeriodTotal.setDescription('Total Number of the DD session in Timeout state in this period') apDdSessTimeoutLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 31), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessTimeoutLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessTimeoutLifeTotal.setDescription('Total Number of the DD session in Timeout state in life') apDdSessTimeoutLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 32), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessTimeoutLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessTimeoutLifePerMax.setDescription('PerMax number of the DD session in Timeout state in life') apDdSessErrorsPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 33), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessErrorsPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessErrorsPeriodTotal.setDescription('Total Number of the DD session in Errors state in this period') apDdSessErrorsLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 34), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessErrorsLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessErrorsLifeTotal.setDescription('Total Number of the DD session in Errors state in life') apDdSessErrorsLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 35), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessErrorsLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessErrorsLifePerMax.setDescription('PerMax number of the DD session in Errors state in life') apDdSessMissPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 36), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessMissPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessMissPeriodTotal.setDescription('Total Number of the DD session in Miss state in this period') apDdSessMissLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 37), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessMissLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessMissLifeTotal.setDescription('Total Number of the DD session in Miss state in life') apDdSessMissLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 38), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSessMissLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessMissLifePerMax.setDescription('PerMax number of the DD session in Miss state in life') apDdSubscriberPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 100), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscriberPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberPeriodActive.setDescription('Number of the DD subscriber is Active in this period') apDdSubscriberPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 101), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscriberPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberPeriodHigh.setDescription('Highest number of the DD subscriber in this period') apDdSubscriberPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 102), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscriberPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberPeriodTotal.setDescription('Total Number of the DD subscriber in this period') apDdSubscriberLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 103), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscriberLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberLifeTotal.setDescription('Total Number of the DD subscriber in life') apDdSubscriberLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 104), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscriberLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberLifePerMax.setDescription('PerMax number of the DD subscriber in life') apDdSubscriberLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 105), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscriberLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberLifeHigh.setDescription('Highest number of the DD subscriber in life') apDdSubscribePeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 106), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscribePeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdSubscribePeriodActive.setDescription('Number of the DD subscriber is Active in Initial state in this period') apDdSubscribePeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 107), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscribePeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdSubscribePeriodHigh.setDescription('Highest number of the DD subscriber in Initial state in this period') apDdSubscribePeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 108), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscribePeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSubscribePeriodTotal.setDescription('Total Number of the DD subscriber in Initial state in this period') apDdSubscribeLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 109), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscribeLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSubscribeLifeTotal.setDescription('Total Number of the DD subscriber in Initial state in life') apDdSubscribeLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 110), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscribeLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSubscribeLifePerMax.setDescription('PerMax number of the DD subscriber in Initial state in life') apDdSubscribeLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 111), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscribeLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdSubscribeLifeHigh.setDescription('Highest number of the DD subscriber in Initial state in life') apDdUnsubscribePeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 112), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdUnsubscribePeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdUnsubscribePeriodActive.setDescription('Number of the DD subscriber is Active in Established state in this period') apDdUnsubscribePeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 113), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdUnsubscribePeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdUnsubscribePeriodHigh.setDescription('Highest number of the DD subscriber in Established state in this period') apDdUnsubscribePeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 114), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdUnsubscribePeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdUnsubscribePeriodTotal.setDescription('Total Number of the DD subscriber in Established state in this period') apDdUnsubscribeLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 115), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdUnsubscribeLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdUnsubscribeLifeTotal.setDescription('Total Number of the DD subscriber in Established state in life') apDdUnsubscribeLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 116), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdUnsubscribeLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdUnsubscribeLifePerMax.setDescription('PerMax number of the DD subscriber in Established state in life') apDdUnsubscribeLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 117), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdUnsubscribeLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdUnsubscribeLifeHigh.setDescription('Highest number of the DD subscriber in Established state in life') apDdPolicyHitPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 118), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdPolicyHitPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdPolicyHitPeriodActive.setDescription('Number of the DD subscriber is Active in Terminated state in this period') apDdPolicyHitPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 119), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdPolicyHitPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdPolicyHitPeriodHigh.setDescription('Highest number of the DD subscriber in Terminated state in this period') apDdPolicyHitPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 120), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdPolicyHitPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdPolicyHitPeriodTotal.setDescription('Total Number of the DD subscriber in Terminated state in this period') apDdPolicyHitLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 121), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdPolicyHitLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdPolicyHitLifeTotal.setDescription('Total Number of the DD subscriber in Terminated state in life') apDdPolicyHitLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 122), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdPolicyHitLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdPolicyHitLifePerMax.setDescription('PerMax number of the DD subscriber in Terminated state in life') apDdPolicyHitLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 123), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdPolicyHitLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdPolicyHitLifeHigh.setDescription('Highest number of the DD subscriber in Terminated state in life') apDdPolicyMissPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 124), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdPolicyMissPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdPolicyMissPeriodActive.setDescription('Number of the DD subscriber is Active in Timeout state in this period') apDdPolicyMissPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 125), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdPolicyMissPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdPolicyMissPeriodHigh.setDescription('Highest number of the DD subscriber in Timeout state in this period') apDdPolicyMissPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 126), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdPolicyMissPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdPolicyMissPeriodTotal.setDescription('Total Number of the DD subscriber in Timeout state in this period') apDdPolicyMissLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 127), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdPolicyMissLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdPolicyMissLifeTotal.setDescription('Total Number of the DD subscriber in Timeout state in life') apDdPolicyMissLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 128), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdPolicyMissLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdPolicyMissLifePerMax.setDescription('PerMax number of the DD subscriber in Timeout state in life') apDdPolicyMissLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 129), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdPolicyMissLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdPolicyMissLifeHigh.setDescription('Highest number of the DD subscriber in Timeout state in life') apDdSubscriberMissPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 130), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscriberMissPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberMissPeriodTotal.setDescription('Total Number of the DD subscriber in Errors state in this period') apDdSubscriberMissLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 131), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscriberMissLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberMissLifeTotal.setDescription('Total Number of the DD subscriber in Errors state in life') apDdSubscriberMissLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 132), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdSubscriberMissLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberMissLifePerMax.setDescription('PerMax number of the DD subscriber in Errors state in life') apDdInterfaceStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1), ) if mibBuilder.loadTexts: apDdInterfaceStatsTable.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceStatsTable.setDescription('DD interface statistics.') apDdInterfaceStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1), ).setIndexNames((0, "APDD-MIB", "apDdInterfaceIndex")) if mibBuilder.loadTexts: apDdInterfaceStatsEntry.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceStatsEntry.setDescription('A table entry designed to hold per DD interface statistics.') apDdInterfaceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: apDdInterfaceIndex.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceIndex.setDescription('An integer for the sole purpose of indexing the DD interface.') apDdInterfaceRealmName = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdInterfaceRealmName.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceRealmName.setDescription('Realm name of the DD interface if the row is for per interface stats. Otherwise, it is an empty string.') apDdClientTransCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 3), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdClientTransCPActive.setStatus('current') if mibBuilder.loadTexts: apDdClientTransCPActive.setDescription('Number of active client transactions in the current period.') apDdClientTransCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdClientTransCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdClientTransCPHigh.setDescription('Maximum value of apDdClientTransCPActive in the current period (high water mark). ') apDdClientTransCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdClientTransCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdClientTransCPTotal.setDescription('Total number of client transactions in the current period.') apDdClientTransLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdClientTransLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdClientTransLTTotal.setDescription('Total number of transactions in client side in life time.') apDdClientTransLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdClientTransLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdClientTransLTPerMax.setDescription('Maximum value of apDdClientTransCPTotal across all periods (high water mark).') apDdClientTransLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdClientTransLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdClientTransLTHigh.setDescription('Maximum value of apDdClientTransCPHigh across all periods (high water mark).') apDdServerTransCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdServerTransCPActive.setStatus('current') if mibBuilder.loadTexts: apDdServerTransCPActive.setDescription('Number of active transactions in server side in current period.') apDdServerTransCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdServerTransCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdServerTransCPHigh.setDescription('Highest number of active transactions in server side in current period.') apDdServerTransCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdServerTransCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdServerTransCPTotal.setDescription('Total number of transactions in server side in current period.') apDdServerTransLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdServerTransLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdServerTransLTTotal.setDescription('Total number of transactions in server side in life time.') apDdServerTransLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdServerTransLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdServerTransLTPerMax.setDescription('Maximum value of apDdServerTransCPTotal across all periods (high water mark).') apDdServerTransLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdServerTransLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdServerTransLTHigh.setDescription('Maximum value of apDdServerTransCPHigh across all periods (high water mark).') apDdGenSocketsCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 15), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdGenSocketsCPActive.setStatus('current') if mibBuilder.loadTexts: apDdGenSocketsCPActive.setDescription('Number of active sockets in current period.') apDdGenSocketsCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdGenSocketsCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdGenSocketsCPHigh.setDescription('Highest number of active sockets in current period.') apDdGenSocketsCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdGenSocketsCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdGenSocketsCPTotal.setDescription('Total number of sockets in current period.') apDdGenSocketsLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdGenSocketsLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdGenSocketsLTTotal.setDescription('Total number of sockets in life time.') apDdGenSocketsLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdGenSocketsLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdGenSocketsLTPerMax.setDescription('Maximum value of apDdSocketsCPTotal across all periods (high water mark).') apDdGenSocketsLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdGenSocketsLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdGenSocketsLTHigh.setDescription('Maximum value of apDdSocketsCPHigh across all periods (high water mark).') apDdGenConnectsCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 21), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdGenConnectsCPActive.setStatus('current') if mibBuilder.loadTexts: apDdGenConnectsCPActive.setDescription('Number of active connections in current period.') apDdGenConnectsCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdGenConnectsCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdGenConnectsCPHigh.setDescription('high number of connections in current period.') apDdGenConnectsCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdGenConnectsCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdGenConnectsCPTotal.setDescription('Total number of connections in current period.') apDdGenConnectsLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdGenConnectsLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdGenConnectsLTTotal.setDescription('Total number of connections in life time.') apDdGenConnectsLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdGenConnectsLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdGenConnectsLTPerMax.setDescription('Maximum value of apDdConnectsCPTotal across all periods (high water mark).') apDdGenConnectsLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdGenConnectsLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdGenConnectsLTHigh.setDescription('Maximum value of apDdConnectsCPHigh across all periods (high water mark).') apDdErrorStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2), ) if mibBuilder.loadTexts: apDdErrorStatusTable.setStatus('current') if mibBuilder.loadTexts: apDdErrorStatusTable.setDescription('per DD interface error stats.') apDdErrorStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1), ).setIndexNames((0, "APDD-MIB", "apDdInterfaceIndex")) if mibBuilder.loadTexts: apDdErrorStatusEntry.setStatus('current') if mibBuilder.loadTexts: apDdErrorStatusEntry.setDescription('A table entry designed to hold error status data') apDdNoRouteFoundRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 1), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdNoRouteFoundRecent.setStatus('current') if mibBuilder.loadTexts: apDdNoRouteFoundRecent.setDescription("Number of 'no route found' error in recent period.") apDdNoRouteFoundTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdNoRouteFoundTotal.setStatus('current') if mibBuilder.loadTexts: apDdNoRouteFoundTotal.setDescription("Total number of 'no route found' error in life time.") apDdNoRouteFoundPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdNoRouteFoundPerMax.setStatus('current') if mibBuilder.loadTexts: apDdNoRouteFoundPerMax.setDescription('Maximum value of apDdNoRouteFoundRecent across all periods (high water mark).') apDdMalformedMsgRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMalformedMsgRecent.setStatus('current') if mibBuilder.loadTexts: apDdMalformedMsgRecent.setDescription("Number of 'mal-formed message' error in recent period.") apDdMalformedMsgTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMalformedMsgTotal.setStatus('current') if mibBuilder.loadTexts: apDdMalformedMsgTotal.setDescription("Total number of 'mal-formed message' error in life time.") apDdMalformedMsgPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMalformedMsgPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMalformedMsgPerMax.setDescription('Maximum value of apDdMalformedMsgRecent across all periods (high water mark).') apDdRejectedMsgRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdRejectedMsgRecent.setStatus('current') if mibBuilder.loadTexts: apDdRejectedMsgRecent.setDescription("Number of 'rejected msg'' error in recent period.") apDdRejectedMsgTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdRejectedMsgTotal.setStatus('current') if mibBuilder.loadTexts: apDdRejectedMsgTotal.setDescription("Total number of 'rejected msg' error in life time.") apDdRejectedMsgPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdRejectedMsgPerMax.setStatus('current') if mibBuilder.loadTexts: apDdRejectedMsgPerMax.setDescription('Maximum value of apDdRejectedMsgRecent across all periods (high water mark).') apDdDroppedMsgRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 10), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdDroppedMsgRecent.setStatus('current') if mibBuilder.loadTexts: apDdDroppedMsgRecent.setDescription("Number of 'dropped msg'' error in recent period.") apDdDroppedMsgTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdDroppedMsgTotal.setStatus('current') if mibBuilder.loadTexts: apDdDroppedMsgTotal.setDescription("Total number of 'dropped msg' error in life time.") apDdDroppedMsgPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdDroppedMsgPerMax.setStatus('current') if mibBuilder.loadTexts: apDdDroppedMsgPerMax.setDescription('Maximum value of apDdDroppedMsgRecent across all periods (high water mark).') apDdInboundConstraintsRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 13), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdInboundConstraintsRecent.setStatus('current') if mibBuilder.loadTexts: apDdInboundConstraintsRecent.setDescription("Number of 'inbound constraints'' error in recent period.") apDdInboundConstraintsTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdInboundConstraintsTotal.setStatus('current') if mibBuilder.loadTexts: apDdInboundConstraintsTotal.setDescription("Total number of 'inbound constraints' error in life time.") apDdInboundConstraintsPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdInboundConstraintsPerMax.setStatus('current') if mibBuilder.loadTexts: apDdInboundConstraintsPerMax.setDescription('Maximum value of apDdInboundConstraintsRecent across all periods (high water mark).') apDdOutboundConstraintsRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 16), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdOutboundConstraintsRecent.setStatus('current') if mibBuilder.loadTexts: apDdOutboundConstraintsRecent.setDescription("Number of 'outbound constraints'' error in recent period.") apDdOutboundConstraintsTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdOutboundConstraintsTotal.setStatus('current') if mibBuilder.loadTexts: apDdOutboundConstraintsTotal.setDescription("Total number of 'outbound constraints' error in life time.") apDdOutboundConstraintsPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdOutboundConstraintsPerMax.setStatus('current') if mibBuilder.loadTexts: apDdOutboundConstraintsPerMax.setDescription('Maximum value of apDdOutboundConstraintsRecent across all periods (high water mark).') apDdMsgTypeInfoTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3), ) if mibBuilder.loadTexts: apDdMsgTypeInfoTable.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeInfoTable.setDescription('static system message type information.') apDdMsgTypeInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3, 1), ).setIndexNames((0, "APDD-MIB", "apDdMsgTypeIndex")) if mibBuilder.loadTexts: apDdMsgTypeInfoEntry.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeInfoEntry.setDescription('A table entry designed for message type inf.') apDdMsgTypeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: apDdMsgTypeIndex.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeIndex.setDescription('An integer for the sole purpose of indexing DD message types.') apDdMsgTypeMsgName = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeMsgName.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeMsgName.setDescription('The identification string of the message type.') apDdMsgTypeStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4), ) if mibBuilder.loadTexts: apDdMsgTypeStatsTable.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeStatsTable.setDescription('table for holding message type stats.') apDdMsgTypeStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1), ).setIndexNames((0, "APDD-MIB", "apDdInterfaceIndex"), (0, "APDD-MIB", "apDdMsgTypeIndex")) if mibBuilder.loadTexts: apDdMsgTypeStatsEntry.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeStatsEntry.setDescription('A table entry designed for message type statistics.') apDdMsgTypeServerReqRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 3), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeServerReqRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerReqRecent.setDescription('Number of server requests in recent period.') apDdMsgTypeServerReqTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeServerReqTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerReqTotal.setDescription('Total number of server requests in life time.') apDdMsgTypeServerReqPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeServerReqPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerReqPerMax.setDescription('Maximum value of apDdMsgTypeServerReqRecent across all periods (high water mark)') apDdMsgTypeClientReqRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientReqRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientReqRecent.setDescription('Number of client requests in recent period.') apDdMsgTypeClientReqTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientReqTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientReqTotal.setDescription('Total number of client requests in life time.') apDdMsgTypeClientReqPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientReqPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientReqPerMax.setDescription('Maximum value of apDdMsgTypeClientReqRecent across all periods (high water mark).') apDdMsgTypeServerRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeServerRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerRetransRecent.setDescription('Number of server retransmissions in recent period.') apDdMsgTypeServerRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeServerRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerRetransTotal.setDescription('Total number of server retransmissions in life time.') apDdMsgTypeServerRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeServerRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerRetransPerMax.setDescription('Maximum value of apDdMsgTypeServerRetransRecent across all periods (high water mark)') apDdMsgTypeClientRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 12), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientRetransRecent.setDescription('Number of client retransmissions in recent period.') apDdMsgTypeClientRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientRetransTotal.setDescription('Total number of client retransmissions in life time.') apDdMsgTypeClientRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientRetransPerMax.setDescription('Maximum value of apDdMsgTypeClientRetransRecent across all periods (high water mark).') apDdMsgTypeServerRespRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 15), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransRecent.setDescription('Number of server response retransactions in recent period.') apDdMsgTypeServerRespRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransTotal.setDescription('Total number of server response retransactions in life time.') apDdMsgTypeServerRespRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransPerMax.setDescription('Maximum value of apDdMsgTypeServerRespRetransRecent across all periods (high water mark).') apDdMsgTypeClientRespRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 21), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransRecent.setDescription('Number of client response retransactions in recent period.') apDdMsgTypeClientRespRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransTotal.setDescription('Total number of client response retransactions in life time.') apDdMsgTypeClientRespRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransPerMax.setDescription('Maximum value of apDdMsgTypeClientRespRetransRecent across all periods (high water mark).') apDdMsgTypeClientTimeoutRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 27), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutRecent.setDescription('Number of client transaction timeout in recent period.') apDdMsgTypeClientTimeoutTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutTotal.setDescription('Total number of client transaction timeout in life time.') apDdMsgTypeClientTimeoutPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutPerMax.setDescription('Maximum value of apDdMsgTypeClientTimeoutRecent across all periods (high water mark).') apDdMsgTypeClientThrottledRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 33), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientThrottledRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientThrottledRecent.setDescription('Number of locally throttled client count in recent period.') apDdMsgTypeClientThrottledTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 34), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientThrottledTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientThrottledTotal.setDescription('Total number of locally throttled client count in life time.') apDdMsgTypeClientThrottledPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 35), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeClientThrottledPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientThrottledPerMax.setDescription('Maximum value of apDdMsgTypeClientThrottledRecent across all periods (high water mark).') apDdMsgTypeAverageLatency = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 36), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeAverageLatency.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeAverageLatency.setDescription('Average Latency.') apDdMsgTypeMaximumLatency = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 37), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeMaximumLatency.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeMaximumLatency.setDescription('Maximum Latency.') apDdMsgTypeLatencyWindow = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 38), Integer32()).setUnits('second').setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgTypeLatencyWindow.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeLatencyWindow.setDescription('Latency window length.') apDdMsgReturnCodeInfoTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5), ) if mibBuilder.loadTexts: apDdMsgReturnCodeInfoTable.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeInfoTable.setDescription('DD return message code stats table.') apDdMsgReturnCodeInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5, 1), ).setIndexNames((0, "APDD-MIB", "apDdMsgReturnCodeIndex")) if mibBuilder.loadTexts: apDdMsgReturnCodeInfoEntry.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeInfoEntry.setDescription('A table entry designed to hold return code stats.') apDdMsgReturnCodeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: apDdMsgReturnCodeIndex.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeIndex.setDescription('An integer for the sole purpose of indexing message return code.') apDdMsgReturnCodeName = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgReturnCodeName.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeName.setDescription('The name string of the message return code.') apDdMsgStatsReturnCodeTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6), ) if mibBuilder.loadTexts: apDdMsgStatsReturnCodeTable.setStatus('current') if mibBuilder.loadTexts: apDdMsgStatsReturnCodeTable.setDescription('DD return message code stats table.') apDdMsgStatsReturnCodeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1), ).setIndexNames((0, "APDD-MIB", "apDdInterfaceIndex"), (0, "APDD-MIB", "apDdMsgTypeIndex"), (0, "APDD-MIB", "apDdMsgReturnCodeIndex")) if mibBuilder.loadTexts: apDdMsgStatsReturnCodeEntry.setStatus('current') if mibBuilder.loadTexts: apDdMsgStatsReturnCodeEntry.setDescription('A table entry designed to hold return code stats.') apDdMsgReturnCodeServerRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 3), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgReturnCodeServerRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeServerRecent.setDescription('Number of server requests in recent period.') apDdMsgReturnCodeServerTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgReturnCodeServerTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeServerTotal.setDescription('Total number of server requests in life time.') apDdMsgReturnCodeServerPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgReturnCodeServerPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeServerPerMax.setDescription('Maximum value of apDdMsgReturnCodeServerRecent across all periods (high water mark).') apDdMsgReturnCodeClientRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgReturnCodeClientRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeClientRecent.setDescription('Number of server requests in recent period.') apDdMsgReturnCodeClientTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgReturnCodeClientTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeClientTotal.setDescription('Total number of server requests in life time.') apDdMsgReturnCodeClientPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdMsgReturnCodeClientPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeClientPerMax.setDescription('Maximum value of apDdMsgReturnCodeClientRecent across all periods (high water mark).') apDdAgentStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7), ) if mibBuilder.loadTexts: apDdAgentStatsTable.setStatus('current') if mibBuilder.loadTexts: apDdAgentStatsTable.setDescription('DD agent statistics.') apDdAgentStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1), ).setIndexNames((0, "APDD-MIB", "apDdAgentIndex")) if mibBuilder.loadTexts: apDdAgentStatsEntry.setStatus('current') if mibBuilder.loadTexts: apDdAgentStatsEntry.setDescription('A table entry designed to hold per DD agent statistics.') apDdAgentIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: apDdAgentIndex.setStatus('current') if mibBuilder.loadTexts: apDdAgentIndex.setDescription('An integer for the sole purpose of indexing the DD agent.') apDdAgentRealmName = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentRealmName.setStatus('current') if mibBuilder.loadTexts: apDdAgentRealmName.setDescription('Realm name of the DD agent if the row is for per agent stats. Otherwise, it is an empty string.') apDdAgentClientTransCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 3), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentClientTransCPActive.setStatus('current') if mibBuilder.loadTexts: apDdAgentClientTransCPActive.setDescription('Number of active client transactions in the current period.') apDdAgentClientTransCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentClientTransCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentClientTransCPHigh.setDescription('Maximum value of apDdAgentClientTransCPActive in the current period (high water mark). ') apDdAgentClientTransCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentClientTransCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentClientTransCPTotal.setDescription('Total number of client transactions in the current period.') apDdAgentClientTransLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentClientTransLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentClientTransLTTotal.setDescription('Total number of transactions in client side in life time.') apDdAgentClientTransLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentClientTransLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentClientTransLTPerMax.setDescription('Maximum value of apDdAgentClientTransCPTotal across all periods (high water mark).') apDdAgentClientTransLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentClientTransLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentClientTransLTHigh.setDescription('Maximum value of apDdAgentClientTransCPHigh across all periods (high water mark).') apDdAgentServerTransCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentServerTransCPActive.setStatus('current') if mibBuilder.loadTexts: apDdAgentServerTransCPActive.setDescription('Number of active transactions in server side in current period.') apDdAgentServerTransCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentServerTransCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentServerTransCPHigh.setDescription('Highest number of active transactions in server side in current period.') apDdAgentServerTransCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentServerTransCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentServerTransCPTotal.setDescription('Total number of transactions in server side in current period.') apDdAgentServerTransLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentServerTransLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentServerTransLTTotal.setDescription('Total number of transactions in server side in life time.') apDdAgentServerTransLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentServerTransLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentServerTransLTPerMax.setDescription('Maximum value of apDdAgentServerTransCPTotal across all periods (high water mark).') apDdAgentServerTransLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentServerTransLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentServerTransLTHigh.setDescription('Maximum value of apDdAgentServerTransCPHigh across all periods (high water mark).') apDdAgentGenSocketsCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 15), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentGenSocketsCPActive.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenSocketsCPActive.setDescription('Number of active sockets in current period.') apDdAgentGenSocketsCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentGenSocketsCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenSocketsCPHigh.setDescription('Highest number of active sockets in current period.') apDdAgentGenSocketsCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentGenSocketsCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenSocketsCPTotal.setDescription('Total number of sockets in current period.') apDdAgentGenSocketsLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentGenSocketsLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenSocketsLTTotal.setDescription('Total number of sockets in life time.') apDdAgentGenSocketsLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentGenSocketsLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenSocketsLTPerMax.setDescription('Maximum value of apDdAgentSocketsCPTotal across all periods (high water mark).') apDdAgentGenSocketsLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentGenSocketsLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenSocketsLTHigh.setDescription('Maximum value of apDdAgentSocketsCPHigh across all periods (high water mark).') apDdAgentGenConnectsCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 21), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentGenConnectsCPActive.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenConnectsCPActive.setDescription('Number of active connections in current period.') apDdAgentGenConnectsCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentGenConnectsCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenConnectsCPHigh.setDescription('high number of connections in current period.') apDdAgentGenConnectsCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentGenConnectsCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenConnectsCPTotal.setDescription('Total number of connections in current period.') apDdAgentGenConnectsLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentGenConnectsLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenConnectsLTTotal.setDescription('Total number of connections in life time.') apDdAgentGenConnectsLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentGenConnectsLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenConnectsLTPerMax.setDescription('Maximum value of apDdConnectsCPTotal across all periods (high water mark).') apDdAgentGenConnectsLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentGenConnectsLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenConnectsLTHigh.setDescription('Maximum value of apDdAgentConnectsCPHigh across all periods (high water mark).') apDdAgentErrorStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8), ) if mibBuilder.loadTexts: apDdAgentErrorStatusTable.setStatus('current') if mibBuilder.loadTexts: apDdAgentErrorStatusTable.setDescription('per DD agent error stats.') apDdAgentErrorStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1), ).setIndexNames((0, "APDD-MIB", "apDdAgentIndex")) if mibBuilder.loadTexts: apDdAgentErrorStatusEntry.setStatus('current') if mibBuilder.loadTexts: apDdAgentErrorStatusEntry.setDescription('A table entry designed to hold error status data') apDdAgentNoRouteFoundRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 1), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentNoRouteFoundRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentNoRouteFoundRecent.setDescription("Number of 'no route found' error in recent period.") apDdAgentNoRouteFoundTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentNoRouteFoundTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentNoRouteFoundTotal.setDescription("Total number of 'no route found' error in life time.") apDdAgentNoRouteFoundPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentNoRouteFoundPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentNoRouteFoundPerMax.setDescription('Maximum value of apDdAgentNoRouteFoundRecent across all periods (high water mark).') apDdAgentMalformedMsgRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMalformedMsgRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMalformedMsgRecent.setDescription("Number of 'mal-formed message' error in recent period.") apDdAgentMalformedMsgTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMalformedMsgTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMalformedMsgTotal.setDescription("Total number of 'mal-formed message' error in life time.") apDdAgentMalformedMsgPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMalformedMsgPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMalformedMsgPerMax.setDescription('Maximum value of apDdAgentMalformedMsgRecent across all periods (high water mark).') apDdAgentRejectedMsgRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentRejectedMsgRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentRejectedMsgRecent.setDescription("Number of 'rejected msg'' error in recent period.") apDdAgentRejectedMsgTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentRejectedMsgTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentRejectedMsgTotal.setDescription("Total number of 'rejected msg' error in life time.") apDdAgentRejectedMsgPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentRejectedMsgPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentRejectedMsgPerMax.setDescription('Maximum value of apDdAgentRejectedMsgRecent across all periods (high water mark).') apDdAgentDroppedMsgRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 10), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentDroppedMsgRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentDroppedMsgRecent.setDescription("Number of 'dropped msg'' error in recent period.") apDdAgentDroppedMsgTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentDroppedMsgTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentDroppedMsgTotal.setDescription("Total number of 'dropped msg' error in life time.") apDdAgentDroppedMsgPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentDroppedMsgPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentDroppedMsgPerMax.setDescription('Maximum value of apDdAgentDroppedMsgRecent across all periods (high water mark).') apDdAgentInboundConstraintsRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 13), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentInboundConstraintsRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentInboundConstraintsRecent.setDescription("Number of 'inbound constraints'' error in recent period.") apDdAgentInboundConstraintsTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentInboundConstraintsTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentInboundConstraintsTotal.setDescription("Total number of 'inbound constraints' error in life time.") apDdAgentInboundConstraintsPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentInboundConstraintsPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentInboundConstraintsPerMax.setDescription('Maximum value of apDdAgentInboundConstraintsRecent across all periods (high water mark).') apDdAgentOutboundConstraintsRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 16), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentOutboundConstraintsRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentOutboundConstraintsRecent.setDescription("Number of 'outbound constraints'' error in recent period.") apDdAgentOutboundConstraintsTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentOutboundConstraintsTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentOutboundConstraintsTotal.setDescription("Total number of 'outbound constraints' error in life time.") apDdAgentOutboundConstraintsPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentOutboundConstraintsPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentOutboundConstraintsPerMax.setDescription('Maximum value of apDdAgentOutboundConstraintsRecent across all periods (high water mark).') apDdAgentMsgTypeStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9), ) if mibBuilder.loadTexts: apDdAgentMsgTypeStatsTable.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeStatsTable.setDescription('table for holding message type stats.') apDdAgentMsgTypeStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1), ).setIndexNames((0, "APDD-MIB", "apDdAgentIndex"), (0, "APDD-MIB", "apDdMsgTypeIndex")) if mibBuilder.loadTexts: apDdAgentMsgTypeStatsEntry.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeStatsEntry.setDescription('A table entry designed for message type statistics.') apDdAgentMsgTypeServerReqRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 3), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqRecent.setDescription('Number of server requests in recent period.') apDdAgentMsgTypeServerReqTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqTotal.setDescription('Total number of server requests in life time.') apDdAgentMsgTypeServerReqPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqPerMax.setDescription('Maximum value of apDdAgentMsgTypeServerReqRecent across all periods (high water mark)') apDdAgentMsgTypeClientReqRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqRecent.setDescription('Number of client requests in recent period.') apDdAgentMsgTypeClientReqTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqTotal.setDescription('Total number of client requests in life time.') apDdAgentMsgTypeClientReqPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientReqRecent across all periods (high water mark).') apDdAgentMsgTypeServerRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransRecent.setDescription('Number of server retransmissions in recent period.') apDdAgentMsgTypeServerRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransTotal.setDescription('Total number of server retransmissions in life time.') apDdAgentMsgTypeServerRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeServerRetransRecent across all periods (high water mark)') apDdAgentMsgTypeClientRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 12), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransRecent.setDescription('Number of client retransmissions in recent period.') apDdAgentMsgTypeClientRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransTotal.setDescription('Total number of client retransmissions in life time.') apDdAgentMsgTypeClientRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientRetransRecent across all periods (high water mark).') apDdAgentMsgTypeServerRespRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 15), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransRecent.setDescription('Number of server response retransactions in recent period.') apDdAgentMsgTypeServerRespRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransTotal.setDescription('Total number of server response retransactions in life time.') apDdAgentMsgTypeServerRespRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeServerRespRetransRecent across all periods (high water mark).') apDdAgentMsgTypeClientRespRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 21), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransRecent.setDescription('Number of client response retransactions in recent period.') apDdAgentMsgTypeClientRespRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransTotal.setDescription('Total number of client response retransactions in life time.') apDdAgentMsgTypeClientRespRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientRespRetransRecent across all periods (high water mark).') apDdAgentMsgTypeClientTimeoutRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 27), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutRecent.setDescription('Number of client transaction timeout in recent period.') apDdAgentMsgTypeClientTimeoutTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutTotal.setDescription('Total number of client transaction timeout in life time.') apDdAgentMsgTypeClientTimeoutPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientTimeoutRecent across all periods (high water mark).') apDdAgentMsgTypeClientThrottledRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 33), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledRecent.setDescription('Number of locally throttled client count in recent period.') apDdAgentMsgTypeClientThrottledTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 34), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledTotal.setDescription('Total number of locally throttled client count in life time.') apDdAgentMsgTypeClientThrottledPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 35), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientThrottledRecent across all periods (high water mark).') apDdAgentMsgTypeAverageLatency = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 36), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeAverageLatency.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeAverageLatency.setDescription('Average Latency.') apDdAgentMsgTypeMaximumLatency = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 37), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeMaximumLatency.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeMaximumLatency.setDescription('Maximum Latency.') apDdAgentMsgTypeLatencyWindow = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 38), Integer32()).setUnits('second').setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgTypeLatencyWindow.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeLatencyWindow.setDescription('Latency window length.') apDdAgentMsgStatsReturnCodeTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10), ) if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeTable.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeTable.setDescription('DD return message code stats table.') apDdAgentMsgStatsReturnCodeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1), ).setIndexNames((0, "APDD-MIB", "apDdAgentIndex"), (0, "APDD-MIB", "apDdMsgTypeIndex"), (0, "APDD-MIB", "apDdMsgReturnCodeIndex")) if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeEntry.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeEntry.setDescription('A table entry designed to hold return code stats.') apDdAgentMsgReturnCodeServerRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 3), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerRecent.setDescription('Number of server requests in recent period.') apDdAgentMsgReturnCodeServerTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerTotal.setDescription('Total number of server requests in life time.') apDdAgentMsgReturnCodeServerPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerPerMax.setDescription('Maximum value of apDdAgentMsgReturnCodeServerRecent across all periods (high water mark).') apDdAgentMsgReturnCodeClientRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientRecent.setDescription('Number of server requests in recent period.') apDdAgentMsgReturnCodeClientTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientTotal.setDescription('Total number of server requests in life time.') apDdAgentMsgReturnCodeClientPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientPerMax.setDescription('Maximum value of apDdAgentMsgReturnCodeClientRecent across all periods (high water mark).') apDdDiameterAgentHostName = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: apDdDiameterAgentHostName.setStatus('current') if mibBuilder.loadTexts: apDdDiameterAgentHostName.setDescription('The hostname of the Diameter Agent where it is hosted.') apDdDiameterIPPort = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: apDdDiameterIPPort.setStatus('current') if mibBuilder.loadTexts: apDdDiameterIPPort.setDescription('The IP port of the Diameter Agent where it is hosted.') apDdDiameterAgentOriginHostName = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: apDdDiameterAgentOriginHostName.setStatus('current') if mibBuilder.loadTexts: apDdDiameterAgentOriginHostName.setDescription('The origin hostname of the Diameter Agent where it is hosted.') apDdDiameterAgentOriginRealmName = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: apDdDiameterAgentOriginRealmName.setStatus('current') if mibBuilder.loadTexts: apDdDiameterAgentOriginRealmName.setDescription('The origin realm name of the Diameter Agent where it is hosted.') apDdTransportType = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 5), ApTransportType()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: apDdTransportType.setStatus('current') if mibBuilder.loadTexts: apDdTransportType.setDescription('The transport type of the DD interface.') apDdInterfaceStatusReason = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("disconnectByRequest", 0), ("diameterAgentUnreachable", 1), ("transportFailure", 2)))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: apDdInterfaceStatusReason.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceStatusReason.setDescription('The reason for the status change on a DD interface') apDdConnectionFailureTrap = NotificationType((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2, 0, 1)).setObjects(("APDD-MIB", "apDdInterfaceRealmName"), ("APDD-MIB", "apDdDiameterAgentHostName"), ("APDD-MIB", "apDdDiameterIPPort"), ("APDD-MIB", "apDdDiameterAgentOriginHostName"), ("APDD-MIB", "apDdDiameterAgentOriginRealmName"), ("APDD-MIB", "apDdTransportType"), ("APDD-MIB", "apDdInterfaceStatusReason")) if mibBuilder.loadTexts: apDdConnectionFailureTrap.setStatus('current') if mibBuilder.loadTexts: apDdConnectionFailureTrap.setDescription('A notification when a diameter connection is disconnected via a disconnect request.') apDdConnectionFailureClearTrap = NotificationType((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2, 0, 2)).setObjects(("APDD-MIB", "apDdInterfaceRealmName"), ("APDD-MIB", "apDdDiameterAgentHostName"), ("APDD-MIB", "apDdDiameterIPPort"), ("APDD-MIB", "apDdDiameterAgentOriginHostName"), ("APDD-MIB", "apDdDiameterAgentOriginRealmName"), ("APDD-MIB", "apDdTransportType"), ("APDD-MIB", "apDdInterfaceStatusReason")) if mibBuilder.loadTexts: apDdConnectionFailureClearTrap.setStatus('current') if mibBuilder.loadTexts: apDdConnectionFailureClearTrap.setDescription('A notification when a transport failure has been recovered.') apDdGeneralGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 1)).setObjects(("APDD-MIB", "apDdInterfaceNumber"), ("APDD-MIB", "apDdCurrentTransRate"), ("APDD-MIB", "apDdHighTransRate"), ("APDD-MIB", "apDdLowTransRate")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDdGeneralGroup = apDdGeneralGroup.setStatus('current') if mibBuilder.loadTexts: apDdGeneralGroup.setDescription('A collection of objects generic to DD system.') apDdInterfaceStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 2)).setObjects(("APDD-MIB", "apDdInterfaceRealmName"), ("APDD-MIB", "apDdClientTransCPActive"), ("APDD-MIB", "apDdClientTransCPHigh"), ("APDD-MIB", "apDdClientTransCPTotal"), ("APDD-MIB", "apDdClientTransLTTotal"), ("APDD-MIB", "apDdClientTransLTPerMax"), ("APDD-MIB", "apDdClientTransLTHigh"), ("APDD-MIB", "apDdServerTransCPActive"), ("APDD-MIB", "apDdServerTransCPHigh"), ("APDD-MIB", "apDdServerTransCPTotal"), ("APDD-MIB", "apDdServerTransLTTotal"), ("APDD-MIB", "apDdServerTransLTPerMax"), ("APDD-MIB", "apDdServerTransLTHigh"), ("APDD-MIB", "apDdGenSocketsCPActive"), ("APDD-MIB", "apDdGenSocketsCPHigh"), ("APDD-MIB", "apDdGenSocketsCPTotal"), ("APDD-MIB", "apDdGenSocketsLTTotal"), ("APDD-MIB", "apDdGenSocketsLTPerMax"), ("APDD-MIB", "apDdGenSocketsLTHigh"), ("APDD-MIB", "apDdGenConnectsCPActive"), ("APDD-MIB", "apDdGenConnectsCPHigh"), ("APDD-MIB", "apDdGenConnectsCPTotal"), ("APDD-MIB", "apDdGenConnectsLTTotal"), ("APDD-MIB", "apDdGenConnectsLTPerMax"), ("APDD-MIB", "apDdGenConnectsLTHigh")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDdInterfaceStatsGroup = apDdInterfaceStatsGroup.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceStatsGroup.setDescription('A collection of statistics for DD interfaces or system.') apDdErrorStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 3)).setObjects(("APDD-MIB", "apDdNoRouteFoundRecent"), ("APDD-MIB", "apDdNoRouteFoundTotal"), ("APDD-MIB", "apDdNoRouteFoundPerMax"), ("APDD-MIB", "apDdMalformedMsgRecent"), ("APDD-MIB", "apDdMalformedMsgTotal"), ("APDD-MIB", "apDdMalformedMsgPerMax")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDdErrorStatusGroup = apDdErrorStatusGroup.setStatus('current') if mibBuilder.loadTexts: apDdErrorStatusGroup.setDescription('A collection of statistics for DD errors.') apDdMsgTypeStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 4)).setObjects(("APDD-MIB", "apDdMsgTypeMsgName"), ("APDD-MIB", "apDdMsgTypeServerReqRecent"), ("APDD-MIB", "apDdMsgTypeServerReqTotal"), ("APDD-MIB", "apDdMsgTypeServerReqPerMax"), ("APDD-MIB", "apDdMsgTypeClientReqRecent"), ("APDD-MIB", "apDdMsgTypeClientReqTotal"), ("APDD-MIB", "apDdMsgTypeClientReqPerMax"), ("APDD-MIB", "apDdMsgTypeServerRetransRecent"), ("APDD-MIB", "apDdMsgTypeServerRetransTotal"), ("APDD-MIB", "apDdMsgTypeServerRetransPerMax"), ("APDD-MIB", "apDdMsgTypeClientRetransRecent"), ("APDD-MIB", "apDdMsgTypeClientRetransTotal"), ("APDD-MIB", "apDdMsgTypeClientRetransPerMax"), ("APDD-MIB", "apDdMsgTypeServerRespRetransRecent"), ("APDD-MIB", "apDdMsgTypeServerRespRetransTotal"), ("APDD-MIB", "apDdMsgTypeServerRespRetransPerMax"), ("APDD-MIB", "apDdMsgTypeClientRespRetransRecent"), ("APDD-MIB", "apDdMsgTypeClientRespRetransTotal"), ("APDD-MIB", "apDdMsgTypeClientRespRetransPerMax"), ("APDD-MIB", "apDdMsgTypeClientTimeoutRecent"), ("APDD-MIB", "apDdMsgTypeClientTimeoutTotal"), ("APDD-MIB", "apDdMsgTypeClientTimeoutPerMax"), ("APDD-MIB", "apDdMsgTypeClientThrottledRecent"), ("APDD-MIB", "apDdMsgTypeClientThrottledTotal"), ("APDD-MIB", "apDdMsgTypeClientThrottledPerMax"), ("APDD-MIB", "apDdMsgTypeAverageLatency"), ("APDD-MIB", "apDdMsgTypeMaximumLatency"), ("APDD-MIB", "apDdMsgTypeLatencyWindow")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDdMsgTypeStatsGroup = apDdMsgTypeStatsGroup.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeStatsGroup.setDescription('A collection of statistics for DD message types.') apDdMsgStatsReturnCodeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 5)).setObjects(("APDD-MIB", "apDdMsgReturnCodeName"), ("APDD-MIB", "apDdMsgReturnCodeServerRecent"), ("APDD-MIB", "apDdMsgReturnCodeServerTotal"), ("APDD-MIB", "apDdMsgReturnCodeServerPerMax"), ("APDD-MIB", "apDdMsgReturnCodeClientRecent"), ("APDD-MIB", "apDdMsgReturnCodeClientTotal"), ("APDD-MIB", "apDdMsgReturnCodeClientPerMax")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDdMsgStatsReturnCodeGroup = apDdMsgStatsReturnCodeGroup.setStatus('current') if mibBuilder.loadTexts: apDdMsgStatsReturnCodeGroup.setDescription('A collection of statistics for DD message type return codes.') apDdIntfErrorStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 6)).setObjects(("APDD-MIB", "apDdRejectedMsgRecent"), ("APDD-MIB", "apDdRejectedMsgTotal"), ("APDD-MIB", "apDdRejectedMsgPerMax"), ("APDD-MIB", "apDdDroppedMsgRecent"), ("APDD-MIB", "apDdDroppedMsgTotal"), ("APDD-MIB", "apDdDroppedMsgPerMax"), ("APDD-MIB", "apDdInboundConstraintsRecent"), ("APDD-MIB", "apDdInboundConstraintsTotal"), ("APDD-MIB", "apDdInboundConstraintsPerMax"), ("APDD-MIB", "apDdOutboundConstraintsRecent"), ("APDD-MIB", "apDdOutboundConstraintsTotal"), ("APDD-MIB", "apDdOutboundConstraintsPerMax")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDdIntfErrorStatusGroup = apDdIntfErrorStatusGroup.setStatus('current') if mibBuilder.loadTexts: apDdIntfErrorStatusGroup.setDescription('A collection of statistics for DD errors.') apDdAgentGeneralGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 7)).setObjects(("APDD-MIB", "apDdAgentNumber")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDdAgentGeneralGroup = apDdAgentGeneralGroup.setStatus('current') if mibBuilder.loadTexts: apDdAgentGeneralGroup.setDescription('A collection of Agent objects generic to DD system.') apDdAgentStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 8)).setObjects(("APDD-MIB", "apDdAgentRealmName"), ("APDD-MIB", "apDdAgentClientTransCPActive"), ("APDD-MIB", "apDdAgentClientTransCPHigh"), ("APDD-MIB", "apDdAgentClientTransCPTotal"), ("APDD-MIB", "apDdAgentClientTransLTTotal"), ("APDD-MIB", "apDdAgentClientTransLTPerMax"), ("APDD-MIB", "apDdAgentClientTransLTHigh"), ("APDD-MIB", "apDdAgentServerTransCPActive"), ("APDD-MIB", "apDdAgentServerTransCPHigh"), ("APDD-MIB", "apDdAgentServerTransCPTotal"), ("APDD-MIB", "apDdAgentServerTransLTTotal"), ("APDD-MIB", "apDdAgentServerTransLTPerMax"), ("APDD-MIB", "apDdAgentServerTransLTHigh"), ("APDD-MIB", "apDdAgentGenSocketsCPActive"), ("APDD-MIB", "apDdAgentGenSocketsCPHigh"), ("APDD-MIB", "apDdAgentGenSocketsCPTotal"), ("APDD-MIB", "apDdAgentGenSocketsLTTotal"), ("APDD-MIB", "apDdAgentGenSocketsLTPerMax"), ("APDD-MIB", "apDdAgentGenSocketsLTHigh"), ("APDD-MIB", "apDdAgentGenConnectsCPActive"), ("APDD-MIB", "apDdAgentGenConnectsCPHigh"), ("APDD-MIB", "apDdAgentGenConnectsCPTotal"), ("APDD-MIB", "apDdAgentGenConnectsLTTotal"), ("APDD-MIB", "apDdAgentGenConnectsLTPerMax"), ("APDD-MIB", "apDdAgentGenConnectsLTHigh")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDdAgentStatsGroup = apDdAgentStatsGroup.setStatus('current') if mibBuilder.loadTexts: apDdAgentStatsGroup.setDescription('A collection of statistics for DD agents') apDdAgentErrorStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 9)).setObjects(("APDD-MIB", "apDdAgentNoRouteFoundRecent"), ("APDD-MIB", "apDdAgentNoRouteFoundTotal"), ("APDD-MIB", "apDdAgentNoRouteFoundPerMax"), ("APDD-MIB", "apDdAgentMalformedMsgRecent"), ("APDD-MIB", "apDdAgentMalformedMsgTotal"), ("APDD-MIB", "apDdAgentMalformedMsgPerMax"), ("APDD-MIB", "apDdAgentRejectedMsgRecent"), ("APDD-MIB", "apDdAgentRejectedMsgTotal"), ("APDD-MIB", "apDdAgentRejectedMsgPerMax"), ("APDD-MIB", "apDdAgentDroppedMsgRecent"), ("APDD-MIB", "apDdAgentDroppedMsgTotal"), ("APDD-MIB", "apDdAgentDroppedMsgPerMax"), ("APDD-MIB", "apDdAgentInboundConstraintsRecent"), ("APDD-MIB", "apDdAgentInboundConstraintsTotal"), ("APDD-MIB", "apDdAgentInboundConstraintsPerMax"), ("APDD-MIB", "apDdAgentOutboundConstraintsRecent"), ("APDD-MIB", "apDdAgentOutboundConstraintsTotal"), ("APDD-MIB", "apDdAgentOutboundConstraintsPerMax")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDdAgentErrorStatusGroup = apDdAgentErrorStatusGroup.setStatus('current') if mibBuilder.loadTexts: apDdAgentErrorStatusGroup.setDescription('A collection of statistics for DD Agent errors.') apDdAgentMsgTypeStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 10)).setObjects(("APDD-MIB", "apDdMsgTypeMsgName"), ("APDD-MIB", "apDdAgentMsgTypeServerReqRecent"), ("APDD-MIB", "apDdAgentMsgTypeServerReqTotal"), ("APDD-MIB", "apDdAgentMsgTypeServerReqPerMax"), ("APDD-MIB", "apDdAgentMsgTypeClientReqRecent"), ("APDD-MIB", "apDdAgentMsgTypeClientReqTotal"), ("APDD-MIB", "apDdAgentMsgTypeClientReqPerMax"), ("APDD-MIB", "apDdAgentMsgTypeServerRetransRecent"), ("APDD-MIB", "apDdAgentMsgTypeServerRetransTotal"), ("APDD-MIB", "apDdAgentMsgTypeServerRetransPerMax"), ("APDD-MIB", "apDdAgentMsgTypeClientRetransRecent"), ("APDD-MIB", "apDdAgentMsgTypeClientRetransTotal"), ("APDD-MIB", "apDdAgentMsgTypeClientRetransPerMax"), ("APDD-MIB", "apDdAgentMsgTypeServerRespRetransRecent"), ("APDD-MIB", "apDdAgentMsgTypeServerRespRetransTotal"), ("APDD-MIB", "apDdAgentMsgTypeServerRespRetransPerMax"), ("APDD-MIB", "apDdAgentMsgTypeClientRespRetransRecent"), ("APDD-MIB", "apDdAgentMsgTypeClientRespRetransTotal"), ("APDD-MIB", "apDdAgentMsgTypeClientRespRetransPerMax"), ("APDD-MIB", "apDdAgentMsgTypeClientTimeoutRecent"), ("APDD-MIB", "apDdAgentMsgTypeClientTimeoutTotal"), ("APDD-MIB", "apDdAgentMsgTypeClientTimeoutPerMax"), ("APDD-MIB", "apDdAgentMsgTypeClientThrottledRecent"), ("APDD-MIB", "apDdAgentMsgTypeClientThrottledTotal"), ("APDD-MIB", "apDdAgentMsgTypeClientThrottledPerMax"), ("APDD-MIB", "apDdAgentMsgTypeAverageLatency"), ("APDD-MIB", "apDdAgentMsgTypeMaximumLatency"), ("APDD-MIB", "apDdAgentMsgTypeLatencyWindow")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDdAgentMsgTypeStatsGroup = apDdAgentMsgTypeStatsGroup.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeStatsGroup.setDescription('A collection of statistics for DD Agent message types.') apDdAgentMsgStatsReturnCodeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 11)).setObjects(("APDD-MIB", "apDdMsgReturnCodeName"), ("APDD-MIB", "apDdAgentMsgReturnCodeServerRecent"), ("APDD-MIB", "apDdAgentMsgReturnCodeServerTotal"), ("APDD-MIB", "apDdAgentMsgReturnCodeServerPerMax"), ("APDD-MIB", "apDdAgentMsgReturnCodeClientRecent"), ("APDD-MIB", "apDdAgentMsgReturnCodeClientTotal"), ("APDD-MIB", "apDdAgentMsgReturnCodeClientPerMax")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDdAgentMsgStatsReturnCodeGroup = apDdAgentMsgStatsReturnCodeGroup.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeGroup.setDescription('A collection of statistics for DD Agent message type return codes.') apDdSessionSubscriberGeneralGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 12)).setObjects(("APDD-MIB", "apDdSessionPeriodActive"), ("APDD-MIB", "apDdSessionPeriodHigh"), ("APDD-MIB", "apDdSessionPeriodTotal"), ("APDD-MIB", "apDdSessionLifeTotal"), ("APDD-MIB", "apDdSessionLifePerMax"), ("APDD-MIB", "apDdSessionLifeHigh"), ("APDD-MIB", "apDdSessInitPeriodActive"), ("APDD-MIB", "apDdSessInitPeriodHigh"), ("APDD-MIB", "apDdSessInitPeriodTotal"), ("APDD-MIB", "apDdSessInitLifeTotal"), ("APDD-MIB", "apDdSessInitLifePerMax"), ("APDD-MIB", "apDdSessInitLifeHigh"), ("APDD-MIB", "apDdSessEstablishedPeriodActive"), ("APDD-MIB", "apDdSessEstablishedPeriodHigh"), ("APDD-MIB", "apDdSessEstablishedPeriodTotal"), ("APDD-MIB", "apDdSessEstablishedLifeTotal"), ("APDD-MIB", "apDdSessEstablishedLifePerMax"), ("APDD-MIB", "apDdSessEstablishedLifeHigh"), ("APDD-MIB", "apDdSessTerminatedPeriodActive"), ("APDD-MIB", "apDdSessTerminatedPeriodHigh"), ("APDD-MIB", "apDdSessTerminatedPeriodTotal"), ("APDD-MIB", "apDdSessTerminatedLifeTotal"), ("APDD-MIB", "apDdSessTerminatedLifePerMax"), ("APDD-MIB", "apDdSessTerminatedLifeHigh"), ("APDD-MIB", "apDdSessTimeoutPeriodTotal"), ("APDD-MIB", "apDdSessTimeoutLifeTotal"), ("APDD-MIB", "apDdSessTimeoutLifePerMax"), ("APDD-MIB", "apDdSessErrorsPeriodTotal"), ("APDD-MIB", "apDdSessErrorsLifeTotal"), ("APDD-MIB", "apDdSessErrorsLifePerMax"), ("APDD-MIB", "apDdSessMissPeriodTotal"), ("APDD-MIB", "apDdSessMissLifeTotal"), ("APDD-MIB", "apDdSessMissLifePerMax"), ("APDD-MIB", "apDdSubscriberPeriodActive"), ("APDD-MIB", "apDdSubscriberPeriodHigh"), ("APDD-MIB", "apDdSubscriberPeriodTotal"), ("APDD-MIB", "apDdSubscriberLifeTotal"), ("APDD-MIB", "apDdSubscriberLifePerMax"), ("APDD-MIB", "apDdSubscriberLifeHigh"), ("APDD-MIB", "apDdSubscribePeriodActive"), ("APDD-MIB", "apDdSubscribePeriodHigh"), ("APDD-MIB", "apDdSubscribePeriodTotal"), ("APDD-MIB", "apDdSubscribeLifeTotal"), ("APDD-MIB", "apDdSubscribeLifePerMax"), ("APDD-MIB", "apDdSubscribeLifeHigh"), ("APDD-MIB", "apDdUnsubscribePeriodActive"), ("APDD-MIB", "apDdUnsubscribePeriodHigh"), ("APDD-MIB", "apDdUnsubscribePeriodTotal"), ("APDD-MIB", "apDdUnsubscribeLifeTotal"), ("APDD-MIB", "apDdUnsubscribeLifePerMax"), ("APDD-MIB", "apDdUnsubscribeLifeHigh"), ("APDD-MIB", "apDdPolicyHitPeriodActive"), ("APDD-MIB", "apDdPolicyHitPeriodHigh"), ("APDD-MIB", "apDdPolicyHitPeriodTotal"), ("APDD-MIB", "apDdPolicyHitLifeTotal"), ("APDD-MIB", "apDdPolicyHitLifePerMax"), ("APDD-MIB", "apDdPolicyHitLifeHigh"), ("APDD-MIB", "apDdPolicyMissPeriodActive"), ("APDD-MIB", "apDdPolicyMissPeriodHigh"), ("APDD-MIB", "apDdPolicyMissPeriodTotal"), ("APDD-MIB", "apDdPolicyMissLifeTotal"), ("APDD-MIB", "apDdPolicyMissLifePerMax"), ("APDD-MIB", "apDdPolicyMissLifeHigh"), ("APDD-MIB", "apDdSubscriberMissPeriodTotal"), ("APDD-MIB", "apDdSubscriberMissLifeTotal"), ("APDD-MIB", "apDdSubscriberMissLifePerMax")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDdSessionSubscriberGeneralGroup = apDdSessionSubscriberGeneralGroup.setStatus('current') if mibBuilder.loadTexts: apDdSessionSubscriberGeneralGroup.setDescription('A collection of Session objects generic to DD system.') apDDNotifObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 2, 1)).setObjects(("APDD-MIB", "apDdDiameterAgentHostName"), ("APDD-MIB", "apDdDiameterIPPort"), ("APDD-MIB", "apDdDiameterAgentOriginHostName"), ("APDD-MIB", "apDdDiameterAgentOriginRealmName"), ("APDD-MIB", "apDdTransportType"), ("APDD-MIB", "apDdInterfaceStatusReason")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDDNotifObjectsGroup = apDDNotifObjectsGroup.setStatus('current') if mibBuilder.loadTexts: apDDNotifObjectsGroup.setDescription('A collection of mib objects accessible only to traps.') apDDNotificationsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 2, 2)).setObjects(("APDD-MIB", "apDdConnectionFailureTrap"), ("APDD-MIB", "apDdConnectionFailureClearTrap")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apDDNotificationsGroup = apDDNotificationsGroup.setStatus('current') if mibBuilder.loadTexts: apDDNotificationsGroup.setDescription('A collection of traps defined for DD.') mibBuilder.exportSymbols("APDD-MIB", apDdSessionPeriodActive=apDdSessionPeriodActive, apDdClientTransLTHigh=apDdClientTransLTHigh, apDdAgentNoRouteFoundTotal=apDdAgentNoRouteFoundTotal, apDdAgentMsgReturnCodeClientRecent=apDdAgentMsgReturnCodeClientRecent, apDdSessMissLifeTotal=apDdSessMissLifeTotal, apDDMIBTabularObjects=apDDMIBTabularObjects, apDdHighTransRate=apDdHighTransRate, apDdMsgTypeServerReqRecent=apDdMsgTypeServerReqRecent, apDdUnsubscribePeriodTotal=apDdUnsubscribePeriodTotal, apDDNotifObjects=apDDNotifObjects, apDdLowTransRate=apDdLowTransRate, apDdMsgStatsReturnCodeEntry=apDdMsgStatsReturnCodeEntry, apDdAgentGenSocketsCPHigh=apDdAgentGenSocketsCPHigh, apDdMsgReturnCodeServerTotal=apDdMsgReturnCodeServerTotal, apDdMsgTypeInfoEntry=apDdMsgTypeInfoEntry, apDdAgentMsgTypeClientRespRetransPerMax=apDdAgentMsgTypeClientRespRetransPerMax, apDdAgentMsgReturnCodeServerRecent=apDdAgentMsgReturnCodeServerRecent, apDdSessTerminatedPeriodTotal=apDdSessTerminatedPeriodTotal, apDdAgentMsgStatsReturnCodeTable=apDdAgentMsgStatsReturnCodeTable, apDDMIBGeneralObjects=apDDMIBGeneralObjects, apDdPolicyMissLifeTotal=apDdPolicyMissLifeTotal, apDdMsgTypeServerReqTotal=apDdMsgTypeServerReqTotal, apDDConformance=apDDConformance, apDdAgentInboundConstraintsTotal=apDdAgentInboundConstraintsTotal, apDdAgentMsgTypeLatencyWindow=apDdAgentMsgTypeLatencyWindow, apDdAgentMsgTypeServerRetransTotal=apDdAgentMsgTypeServerRetransTotal, apDdAgentIndex=apDdAgentIndex, apDdSessInitPeriodActive=apDdSessInitPeriodActive, apDdAgentErrorStatusGroup=apDdAgentErrorStatusGroup, apDdPolicyHitPeriodTotal=apDdPolicyHitPeriodTotal, apDdSubscribeLifeHigh=apDdSubscribeLifeHigh, apDdGenConnectsCPTotal=apDdGenConnectsCPTotal, apDdSessInitPeriodTotal=apDdSessInitPeriodTotal, apDdMsgTypeIndex=apDdMsgTypeIndex, apDdAgentMsgTypeServerReqTotal=apDdAgentMsgTypeServerReqTotal, apDdDroppedMsgTotal=apDdDroppedMsgTotal, apDdMsgReturnCodeServerPerMax=apDdMsgReturnCodeServerPerMax, apDdRejectedMsgPerMax=apDdRejectedMsgPerMax, apDdAgentStatsEntry=apDdAgentStatsEntry, apDdAgentGenSocketsCPTotal=apDdAgentGenSocketsCPTotal, apDdAgentStatsGroup=apDdAgentStatsGroup, apDdSessTerminatedLifePerMax=apDdSessTerminatedLifePerMax, apDdMalformedMsgRecent=apDdMalformedMsgRecent, apDdPolicyMissPeriodHigh=apDdPolicyMissPeriodHigh, apDdAgentMsgTypeServerReqPerMax=apDdAgentMsgTypeServerReqPerMax, apDdSessMissPeriodTotal=apDdSessMissPeriodTotal, apDDNotificationObjects=apDDNotificationObjects, apDdGenConnectsCPHigh=apDdGenConnectsCPHigh, apDdGenSocketsLTTotal=apDdGenSocketsLTTotal, apDdAgentMsgTypeClientTimeoutPerMax=apDdAgentMsgTypeClientTimeoutPerMax, apDdAgentMsgTypeClientReqTotal=apDdAgentMsgTypeClientReqTotal, apDdOutboundConstraintsPerMax=apDdOutboundConstraintsPerMax, apDdSessEstablishedLifeHigh=apDdSessEstablishedLifeHigh, apDDModule=apDDModule, apDdSessionLifePerMax=apDdSessionLifePerMax, apDdAgentClientTransCPTotal=apDdAgentClientTransCPTotal, apDdSubscribePeriodTotal=apDdSubscribePeriodTotal, apDdMsgReturnCodeClientTotal=apDdMsgReturnCodeClientTotal, apDdClientTransLTTotal=apDdClientTransLTTotal, apDdMsgTypeServerRespRetransRecent=apDdMsgTypeServerRespRetransRecent, apDdTransportType=apDdTransportType, apDdMsgTypeServerRespRetransTotal=apDdMsgTypeServerRespRetransTotal, apDdAgentGenConnectsLTPerMax=apDdAgentGenConnectsLTPerMax, apDdMsgTypeStatsTable=apDdMsgTypeStatsTable, apDdInterfaceStatsGroup=apDdInterfaceStatsGroup, apDdIntfErrorStatusGroup=apDdIntfErrorStatusGroup, apDdMsgReturnCodeServerRecent=apDdMsgReturnCodeServerRecent, apDdSubscriberLifeTotal=apDdSubscriberLifeTotal, apDdSessTimeoutPeriodTotal=apDdSessTimeoutPeriodTotal, apDdSessInitLifeHigh=apDdSessInitLifeHigh, apDdMsgTypeClientRetransPerMax=apDdMsgTypeClientRetransPerMax, apDdAgentServerTransCPHigh=apDdAgentServerTransCPHigh, apDdMsgTypeServerRetransPerMax=apDdMsgTypeServerRetransPerMax, apDdSessionLifeHigh=apDdSessionLifeHigh, apDdNoRouteFoundRecent=apDdNoRouteFoundRecent, apDdAgentMsgTypeClientRespRetransTotal=apDdAgentMsgTypeClientRespRetransTotal, apDdAgentOutboundConstraintsTotal=apDdAgentOutboundConstraintsTotal, apDDNotifObjectsGroup=apDDNotifObjectsGroup, apDdInboundConstraintsTotal=apDdInboundConstraintsTotal, apDdSessInitPeriodHigh=apDdSessInitPeriodHigh, apDdClientTransCPHigh=apDdClientTransCPHigh, apDdMsgTypeClientThrottledRecent=apDdMsgTypeClientThrottledRecent, apDdMsgTypeClientThrottledPerMax=apDdMsgTypeClientThrottledPerMax, apDdClientTransCPTotal=apDdClientTransCPTotal, apDdGenConnectsLTPerMax=apDdGenConnectsLTPerMax, apDdSessionPeriodTotal=apDdSessionPeriodTotal, apDdSessErrorsLifeTotal=apDdSessErrorsLifeTotal, apDdAgentGenConnectsCPHigh=apDdAgentGenConnectsCPHigh, apDdAgentMsgStatsReturnCodeEntry=apDdAgentMsgStatsReturnCodeEntry, apDdDiameterAgentOriginRealmName=apDdDiameterAgentOriginRealmName, apDdSubscriberMissPeriodTotal=apDdSubscriberMissPeriodTotal, apDdMsgTypeServerRetransTotal=apDdMsgTypeServerRetransTotal, apDdSessTerminatedLifeTotal=apDdSessTerminatedLifeTotal, apDdAgentNoRouteFoundPerMax=apDdAgentNoRouteFoundPerMax, apDdAgentMsgTypeStatsTable=apDdAgentMsgTypeStatsTable, apDdConnectionFailureClearTrap=apDdConnectionFailureClearTrap, apDdDroppedMsgRecent=apDdDroppedMsgRecent, apDdPolicyHitLifeHigh=apDdPolicyHitLifeHigh, apDdServerTransLTHigh=apDdServerTransLTHigh, apDdMsgTypeStatsEntry=apDdMsgTypeStatsEntry, apDdMsgTypeLatencyWindow=apDdMsgTypeLatencyWindow, apDdMsgStatsReturnCodeTable=apDdMsgStatsReturnCodeTable, apDdSessTerminatedPeriodActive=apDdSessTerminatedPeriodActive, apDdGenSocketsCPTotal=apDdGenSocketsCPTotal, apDdSessionPeriodHigh=apDdSessionPeriodHigh, apDdAgentServerTransCPActive=apDdAgentServerTransCPActive, apDdMsgReturnCodeClientRecent=apDdMsgReturnCodeClientRecent, apDdGenConnectsLTTotal=apDdGenConnectsLTTotal, apDdAgentMsgTypeStatsEntry=apDdAgentMsgTypeStatsEntry, apDdInterfaceIndex=apDdInterfaceIndex, apDdMsgTypeClientRetransTotal=apDdMsgTypeClientRetransTotal, apDdAgentGenConnectsLTTotal=apDdAgentGenConnectsLTTotal, apDdSessEstablishedPeriodActive=apDdSessEstablishedPeriodActive, apDdAgentMsgTypeServerRespRetransTotal=apDdAgentMsgTypeServerRespRetransTotal, apDdAgentClientTransLTTotal=apDdAgentClientTransLTTotal, apDdAgentErrorStatusTable=apDdAgentErrorStatusTable, apDdGeneralGroup=apDdGeneralGroup, apDdPolicyHitLifeTotal=apDdPolicyHitLifeTotal, apDdAgentNoRouteFoundRecent=apDdAgentNoRouteFoundRecent, apDdDiameterIPPort=apDdDiameterIPPort, apDdAgentClientTransCPHigh=apDdAgentClientTransCPHigh, apDdMsgTypeInfoTable=apDdMsgTypeInfoTable, apDdServerTransCPTotal=apDdServerTransCPTotal, apDDMIBObjects=apDDMIBObjects, apDDNotificationsGroup=apDDNotificationsGroup, apDdAgentMsgTypeServerRespRetransRecent=apDdAgentMsgTypeServerRespRetransRecent, apDdServerTransLTTotal=apDdServerTransLTTotal, apDdGenSocketsCPActive=apDdGenSocketsCPActive, apDdPolicyMissLifePerMax=apDdPolicyMissLifePerMax, apDdAgentGenSocketsLTPerMax=apDdAgentGenSocketsLTPerMax, apDdRejectedMsgTotal=apDdRejectedMsgTotal, apDdConnectionFailureTrap=apDdConnectionFailureTrap, apDdMsgTypeServerRespRetransPerMax=apDdMsgTypeServerRespRetransPerMax, apDdAgentMalformedMsgTotal=apDdAgentMalformedMsgTotal, apDdMsgTypeClientTimeoutRecent=apDdMsgTypeClientTimeoutRecent, apDdSessEstablishedPeriodTotal=apDdSessEstablishedPeriodTotal, apDdAgentGenSocketsCPActive=apDdAgentGenSocketsCPActive, apDdSubscribePeriodHigh=apDdSubscribePeriodHigh, apDdMsgTypeClientRespRetransTotal=apDdMsgTypeClientRespRetransTotal, apDdPolicyHitLifePerMax=apDdPolicyHitLifePerMax, apDdSubscribeLifeTotal=apDdSubscribeLifeTotal, apDdSessInitLifeTotal=apDdSessInitLifeTotal, apDdMsgTypeClientThrottledTotal=apDdMsgTypeClientThrottledTotal, apDdSubscribeLifePerMax=apDdSubscribeLifePerMax, apDdAgentServerTransCPTotal=apDdAgentServerTransCPTotal, apDdAgentMsgTypeClientRetransPerMax=apDdAgentMsgTypeClientRetransPerMax, apDdAgentMsgTypeStatsGroup=apDdAgentMsgTypeStatsGroup, apDdGenConnectsCPActive=apDdGenConnectsCPActive, apDdSessInitLifePerMax=apDdSessInitLifePerMax, apDdInboundConstraintsPerMax=apDdInboundConstraintsPerMax, apDdDiameterAgentHostName=apDdDiameterAgentHostName, apDdInterfaceStatusReason=apDdInterfaceStatusReason, apDdUnsubscribeLifeTotal=apDdUnsubscribeLifeTotal, apDdMsgStatsReturnCodeGroup=apDdMsgStatsReturnCodeGroup, apDdAgentGenConnectsLTHigh=apDdAgentGenConnectsLTHigh, apDdAgentMsgTypeClientRetransTotal=apDdAgentMsgTypeClientRetransTotal, apDdAgentMsgTypeMaximumLatency=apDdAgentMsgTypeMaximumLatency, apDdAgentMsgStatsReturnCodeGroup=apDdAgentMsgStatsReturnCodeGroup, apDdAgentClientTransLTPerMax=apDdAgentClientTransLTPerMax, apDdMsgTypeStatsGroup=apDdMsgTypeStatsGroup, apDdMsgTypeMaximumLatency=apDdMsgTypeMaximumLatency, apDdAgentDroppedMsgTotal=apDdAgentDroppedMsgTotal, apDdAgentMsgTypeClientThrottledRecent=apDdAgentMsgTypeClientThrottledRecent, apDdAgentMsgTypeClientThrottledPerMax=apDdAgentMsgTypeClientThrottledPerMax, apDdAgentGeneralGroup=apDdAgentGeneralGroup, apDdMsgTypeClientRetransRecent=apDdMsgTypeClientRetransRecent, apDdPolicyMissLifeHigh=apDdPolicyMissLifeHigh, apDDNotificationGroups=apDDNotificationGroups, apDdAgentMsgTypeClientTimeoutTotal=apDdAgentMsgTypeClientTimeoutTotal, apDdAgentMalformedMsgPerMax=apDdAgentMalformedMsgPerMax, apDdSessEstablishedLifeTotal=apDdSessEstablishedLifeTotal, apDdNoRouteFoundPerMax=apDdNoRouteFoundPerMax, apDdInterfaceStatsTable=apDdInterfaceStatsTable, apDdMsgTypeClientReqRecent=apDdMsgTypeClientReqRecent, apDdMalformedMsgTotal=apDdMalformedMsgTotal, apDdUnsubscribePeriodActive=apDdUnsubscribePeriodActive, apDdMsgTypeClientReqPerMax=apDdMsgTypeClientReqPerMax, apDdAgentStatsTable=apDdAgentStatsTable, apDdMsgTypeClientRespRetransPerMax=apDdMsgTypeClientRespRetransPerMax, apDdAgentServerTransLTHigh=apDdAgentServerTransLTHigh, apDdAgentServerTransLTPerMax=apDdAgentServerTransLTPerMax, apDdAgentMsgReturnCodeServerPerMax=apDdAgentMsgReturnCodeServerPerMax, apDdAgentMsgReturnCodeClientTotal=apDdAgentMsgReturnCodeClientTotal, apDdAgentRealmName=apDdAgentRealmName, apDdMsgReturnCodeInfoTable=apDdMsgReturnCodeInfoTable, apDdAgentMsgTypeServerRetransRecent=apDdAgentMsgTypeServerRetransRecent, apDdInterfaceNumber=apDdInterfaceNumber, apDdSessTerminatedPeriodHigh=apDdSessTerminatedPeriodHigh, apDdSessMissLifePerMax=apDdSessMissLifePerMax, apDdPolicyMissPeriodTotal=apDdPolicyMissPeriodTotal, apDdMsgTypeClientRespRetransRecent=apDdMsgTypeClientRespRetransRecent, apDdAgentGenSocketsLTTotal=apDdAgentGenSocketsLTTotal, apDDNotifPrefix=apDDNotifPrefix, apDdErrorStatusGroup=apDdErrorStatusGroup, apDdAgentInboundConstraintsRecent=apDdAgentInboundConstraintsRecent, apDdInterfaceRealmName=apDdInterfaceRealmName, apDdSessionSubscriberGeneralGroup=apDdSessionSubscriberGeneralGroup, apDdSubscriberPeriodHigh=apDdSubscriberPeriodHigh, apDdMsgReturnCodeInfoEntry=apDdMsgReturnCodeInfoEntry, apDdMsgTypeClientTimeoutTotal=apDdMsgTypeClientTimeoutTotal, apDDObjectGroups=apDDObjectGroups, apDdAgentMsgTypeServerReqRecent=apDdAgentMsgTypeServerReqRecent, apDdPolicyMissPeriodActive=apDdPolicyMissPeriodActive, apDdMsgTypeClientReqTotal=apDdMsgTypeClientReqTotal, apDdErrorStatusEntry=apDdErrorStatusEntry, apDdAgentDroppedMsgRecent=apDdAgentDroppedMsgRecent, apDdAgentMsgTypeServerRespRetransPerMax=apDdAgentMsgTypeServerRespRetransPerMax, apDdSubscriberMissLifeTotal=apDdSubscriberMissLifeTotal, apDdErrorStatusTable=apDdErrorStatusTable, apDdMsgReturnCodeClientPerMax=apDdMsgReturnCodeClientPerMax, apDdAgentDroppedMsgPerMax=apDdAgentDroppedMsgPerMax, apDdGenSocketsCPHigh=apDdGenSocketsCPHigh, apDdOutboundConstraintsRecent=apDdOutboundConstraintsRecent, apDdSubscriberLifePerMax=apDdSubscriberLifePerMax, apDdMsgTypeServerReqPerMax=apDdMsgTypeServerReqPerMax, apDdAgentNumber=apDdAgentNumber, apDdAgentServerTransLTTotal=apDdAgentServerTransLTTotal, apDdAgentRejectedMsgPerMax=apDdAgentRejectedMsgPerMax, apDdSessEstablishedLifePerMax=apDdSessEstablishedLifePerMax, apDdAgentMalformedMsgRecent=apDdAgentMalformedMsgRecent, apDdAgentOutboundConstraintsRecent=apDdAgentOutboundConstraintsRecent, apDdAgentMsgTypeClientTimeoutRecent=apDdAgentMsgTypeClientTimeoutRecent, apDdClientTransLTPerMax=apDdClientTransLTPerMax, apDdAgentMsgTypeClientThrottledTotal=apDdAgentMsgTypeClientThrottledTotal, apDdSubscriberLifeHigh=apDdSubscriberLifeHigh, apDdPolicyHitPeriodHigh=apDdPolicyHitPeriodHigh, apDdClientTransCPActive=apDdClientTransCPActive, apDdSessTimeoutLifePerMax=apDdSessTimeoutLifePerMax, apDdMsgTypeMsgName=apDdMsgTypeMsgName, apDdAgentRejectedMsgRecent=apDdAgentRejectedMsgRecent, apDdAgentGenConnectsCPTotal=apDdAgentGenConnectsCPTotal, apDdSessTimeoutLifeTotal=apDdSessTimeoutLifeTotal, apDdAgentInboundConstraintsPerMax=apDdAgentInboundConstraintsPerMax, apDdCurrentTransRate=apDdCurrentTransRate, apDdAgentClientTransCPActive=apDdAgentClientTransCPActive, apDdServerTransLTPerMax=apDdServerTransLTPerMax, apDdMsgTypeClientTimeoutPerMax=apDdMsgTypeClientTimeoutPerMax, apDdMalformedMsgPerMax=apDdMalformedMsgPerMax, apDdSessErrorsPeriodTotal=apDdSessErrorsPeriodTotal, apDdAgentErrorStatusEntry=apDdAgentErrorStatusEntry, apDdSessionLifeTotal=apDdSessionLifeTotal, apDdMsgReturnCodeIndex=apDdMsgReturnCodeIndex, apDdAgentRejectedMsgTotal=apDdAgentRejectedMsgTotal, apDdNoRouteFoundTotal=apDdNoRouteFoundTotal, apDdAgentMsgTypeClientReqPerMax=apDdAgentMsgTypeClientReqPerMax, apDdInboundConstraintsRecent=apDdInboundConstraintsRecent, apDdMsgTypeAverageLatency=apDdMsgTypeAverageLatency, apDdMsgReturnCodeName=apDdMsgReturnCodeName, apDdAgentMsgTypeServerRetransPerMax=apDdAgentMsgTypeServerRetransPerMax, apDDNotifications=apDDNotifications, apDdServerTransCPActive=apDdServerTransCPActive, apDdSessTerminatedLifeHigh=apDdSessTerminatedLifeHigh, apDdSessEstablishedPeriodHigh=apDdSessEstablishedPeriodHigh, apDdDroppedMsgPerMax=apDdDroppedMsgPerMax) mibBuilder.exportSymbols("APDD-MIB", apDdAgentMsgReturnCodeServerTotal=apDdAgentMsgReturnCodeServerTotal, apDdGenSocketsLTPerMax=apDdGenSocketsLTPerMax, apDdAgentMsgReturnCodeClientPerMax=apDdAgentMsgReturnCodeClientPerMax, apDdAgentGenSocketsLTHigh=apDdAgentGenSocketsLTHigh, apDdAgentMsgTypeAverageLatency=apDdAgentMsgTypeAverageLatency, apDdGenConnectsLTHigh=apDdGenConnectsLTHigh, apDdUnsubscribeLifePerMax=apDdUnsubscribeLifePerMax, apDdServerTransCPHigh=apDdServerTransCPHigh, apDdInterfaceStatsEntry=apDdInterfaceStatsEntry, apDdAgentGenConnectsCPActive=apDdAgentGenConnectsCPActive, apDdAgentMsgTypeClientRetransRecent=apDdAgentMsgTypeClientRetransRecent, apDdAgentMsgTypeClientRespRetransRecent=apDdAgentMsgTypeClientRespRetransRecent, apDdDiameterAgentOriginHostName=apDdDiameterAgentOriginHostName, apDdAgentOutboundConstraintsPerMax=apDdAgentOutboundConstraintsPerMax, PYSNMP_MODULE_ID=apDDModule, apDdAgentClientTransLTHigh=apDdAgentClientTransLTHigh, apDdSubscriberMissLifePerMax=apDdSubscriberMissLifePerMax, apDdSubscribePeriodActive=apDdSubscribePeriodActive, apDdSubscriberPeriodActive=apDdSubscriberPeriodActive, apDdRejectedMsgRecent=apDdRejectedMsgRecent, apDdSessErrorsLifePerMax=apDdSessErrorsLifePerMax, apDdUnsubscribeLifeHigh=apDdUnsubscribeLifeHigh, apDdMsgTypeServerRetransRecent=apDdMsgTypeServerRetransRecent, apDdUnsubscribePeriodHigh=apDdUnsubscribePeriodHigh, apDdAgentMsgTypeClientReqRecent=apDdAgentMsgTypeClientReqRecent, apDdSubscriberPeriodTotal=apDdSubscriberPeriodTotal, apDdGenSocketsLTHigh=apDdGenSocketsLTHigh, apDdOutboundConstraintsTotal=apDdOutboundConstraintsTotal, apDdPolicyHitPeriodActive=apDdPolicyHitPeriodActive)
(acmepacket_mgmt,) = mibBuilder.importSymbols('ACMEPACKET-SMI', 'acmepacketMgmt') (ap_transport_type,) = mibBuilder.importSymbols('ACMEPACKET-TC', 'ApTransportType') (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, single_value_constraint, value_range_constraint, constraints_intersection, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint') (object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance') (counter64, unsigned32, bits, notification_type, iso, ip_address, time_ticks, object_identity, gauge32, module_identity, mib_identifier, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'Unsigned32', 'Bits', 'NotificationType', 'iso', 'IpAddress', 'TimeTicks', 'ObjectIdentity', 'Gauge32', 'ModuleIdentity', 'MibIdentifier', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') ap_dd_module = module_identity((1, 3, 6, 1, 4, 1, 9148, 3, 12)) if mibBuilder.loadTexts: apDDModule.setLastUpdated('201106080000Z') if mibBuilder.loadTexts: apDDModule.setOrganization('Acme Packet, Inc') if mibBuilder.loadTexts: apDDModule.setContactInfo(' Customer Service Postal: Acme Packet, Inc 100 Crosby Drive Bedford, MA 01730 US Tel: 1-781-328-4400 E-mail: support@acmepacket.com') if mibBuilder.loadTexts: apDDModule.setDescription('The Policy Director MIB for Acme Packet.') ap_ddmib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1)) ap_ddmib_general_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1)) ap_ddmib_tabular_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2)) ap_dd_notification_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2)) ap_dd_notif_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1)) ap_dd_notif_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2)) ap_dd_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2, 0)) ap_dd_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3)) ap_dd_object_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1)) ap_dd_notification_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 2)) ap_dd_interface_number = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdInterfaceNumber.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceNumber.setDescription('Number of the DD interfaces in the system.') ap_dd_current_trans_rate = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 2), gauge32()).setUnits('per10Seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: apDdCurrentTransRate.setStatus('current') if mibBuilder.loadTexts: apDdCurrentTransRate.setDescription('The number of transactions over a 10s period.') ap_dd_high_trans_rate = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 3), gauge32()).setUnits('per10Seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: apDdHighTransRate.setStatus('current') if mibBuilder.loadTexts: apDdHighTransRate.setDescription('Maximum value of apDdCurrentTransRate across all 10s periods.') ap_dd_low_trans_rate = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 4), gauge32()).setUnits('per10Seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: apDdLowTransRate.setStatus('current') if mibBuilder.loadTexts: apDdLowTransRate.setDescription('Mimimum value of apDdCurrentTransRate across all 10s periods.') ap_dd_agent_number = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentNumber.setStatus('current') if mibBuilder.loadTexts: apDdAgentNumber.setDescription('Number of the DD Agents in the system.') ap_dd_session_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessionPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdSessionPeriodActive.setDescription('Number of the DD session is Active in this period') ap_dd_session_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessionPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessionPeriodHigh.setDescription('Highest number of the DD session in this period') ap_dd_session_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessionPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessionPeriodTotal.setDescription('Total Number of the DD session in this period') ap_dd_session_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessionLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessionLifeTotal.setDescription('Total Number of the DD session in life') ap_dd_session_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessionLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessionLifePerMax.setDescription('PerMax number of the DD session in life') ap_dd_session_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessionLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessionLifeHigh.setDescription('Highest number of the DD session in life') ap_dd_sess_init_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 12), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessInitPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdSessInitPeriodActive.setDescription('Number of the DD session is Active in Initial state in this period') ap_dd_sess_init_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 13), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessInitPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessInitPeriodHigh.setDescription('Highest number of the DD session in Initial state in this period') ap_dd_sess_init_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 14), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessInitPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessInitPeriodTotal.setDescription('Total Number of the DD session in Initial state in this period') ap_dd_sess_init_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 15), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessInitLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessInitLifeTotal.setDescription('Total Number of the DD session in Initial state in life') ap_dd_sess_init_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 16), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessInitLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessInitLifePerMax.setDescription('PerMax number of the DD session in Initial state in life') ap_dd_sess_init_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 17), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessInitLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessInitLifeHigh.setDescription('Highest number of the DD session in Initial state in life') ap_dd_sess_established_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 18), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessEstablishedPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdSessEstablishedPeriodActive.setDescription('Number of the DD session is Active in Established state in this period') ap_dd_sess_established_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 19), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessEstablishedPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessEstablishedPeriodHigh.setDescription('Highest number of the DD session in Established state in this period') ap_dd_sess_established_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 20), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessEstablishedPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessEstablishedPeriodTotal.setDescription('Total Number of the DD session in Established state in this period') ap_dd_sess_established_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 21), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessEstablishedLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessEstablishedLifeTotal.setDescription('Total Number of the DD session in Established state in life') ap_dd_sess_established_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 22), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessEstablishedLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessEstablishedLifePerMax.setDescription('PerMax number of the DD session in Established state in life') ap_dd_sess_established_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 23), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessEstablishedLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessEstablishedLifeHigh.setDescription('Highest number of the DD session in Established state in life') ap_dd_sess_terminated_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 24), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessTerminatedPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdSessTerminatedPeriodActive.setDescription('Number of the DD session is Active in Terminated state in this period') ap_dd_sess_terminated_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 25), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessTerminatedPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessTerminatedPeriodHigh.setDescription('Highest number of the DD session in Terminated state in this period') ap_dd_sess_terminated_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 26), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessTerminatedPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessTerminatedPeriodTotal.setDescription('Total Number of the DD session in Terminated state in this period') ap_dd_sess_terminated_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 27), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessTerminatedLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessTerminatedLifeTotal.setDescription('Total Number of the DD session in Terminated state in life') ap_dd_sess_terminated_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 28), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessTerminatedLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessTerminatedLifePerMax.setDescription('PerMax number of the DD session in Terminated state in life') ap_dd_sess_terminated_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 29), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessTerminatedLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdSessTerminatedLifeHigh.setDescription('Highest number of the DD session in Terminated state in life') ap_dd_sess_timeout_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 30), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessTimeoutPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessTimeoutPeriodTotal.setDescription('Total Number of the DD session in Timeout state in this period') ap_dd_sess_timeout_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 31), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessTimeoutLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessTimeoutLifeTotal.setDescription('Total Number of the DD session in Timeout state in life') ap_dd_sess_timeout_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 32), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessTimeoutLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessTimeoutLifePerMax.setDescription('PerMax number of the DD session in Timeout state in life') ap_dd_sess_errors_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 33), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessErrorsPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessErrorsPeriodTotal.setDescription('Total Number of the DD session in Errors state in this period') ap_dd_sess_errors_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 34), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessErrorsLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessErrorsLifeTotal.setDescription('Total Number of the DD session in Errors state in life') ap_dd_sess_errors_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 35), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessErrorsLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessErrorsLifePerMax.setDescription('PerMax number of the DD session in Errors state in life') ap_dd_sess_miss_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 36), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessMissPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessMissPeriodTotal.setDescription('Total Number of the DD session in Miss state in this period') ap_dd_sess_miss_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 37), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessMissLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSessMissLifeTotal.setDescription('Total Number of the DD session in Miss state in life') ap_dd_sess_miss_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 38), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSessMissLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSessMissLifePerMax.setDescription('PerMax number of the DD session in Miss state in life') ap_dd_subscriber_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 100), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscriberPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberPeriodActive.setDescription('Number of the DD subscriber is Active in this period') ap_dd_subscriber_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 101), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscriberPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberPeriodHigh.setDescription('Highest number of the DD subscriber in this period') ap_dd_subscriber_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 102), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscriberPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberPeriodTotal.setDescription('Total Number of the DD subscriber in this period') ap_dd_subscriber_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 103), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscriberLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberLifeTotal.setDescription('Total Number of the DD subscriber in life') ap_dd_subscriber_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 104), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscriberLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberLifePerMax.setDescription('PerMax number of the DD subscriber in life') ap_dd_subscriber_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 105), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscriberLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberLifeHigh.setDescription('Highest number of the DD subscriber in life') ap_dd_subscribe_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 106), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscribePeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdSubscribePeriodActive.setDescription('Number of the DD subscriber is Active in Initial state in this period') ap_dd_subscribe_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 107), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscribePeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdSubscribePeriodHigh.setDescription('Highest number of the DD subscriber in Initial state in this period') ap_dd_subscribe_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 108), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscribePeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSubscribePeriodTotal.setDescription('Total Number of the DD subscriber in Initial state in this period') ap_dd_subscribe_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 109), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscribeLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSubscribeLifeTotal.setDescription('Total Number of the DD subscriber in Initial state in life') ap_dd_subscribe_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 110), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscribeLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSubscribeLifePerMax.setDescription('PerMax number of the DD subscriber in Initial state in life') ap_dd_subscribe_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 111), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscribeLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdSubscribeLifeHigh.setDescription('Highest number of the DD subscriber in Initial state in life') ap_dd_unsubscribe_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 112), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdUnsubscribePeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdUnsubscribePeriodActive.setDescription('Number of the DD subscriber is Active in Established state in this period') ap_dd_unsubscribe_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 113), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdUnsubscribePeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdUnsubscribePeriodHigh.setDescription('Highest number of the DD subscriber in Established state in this period') ap_dd_unsubscribe_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 114), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdUnsubscribePeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdUnsubscribePeriodTotal.setDescription('Total Number of the DD subscriber in Established state in this period') ap_dd_unsubscribe_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 115), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdUnsubscribeLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdUnsubscribeLifeTotal.setDescription('Total Number of the DD subscriber in Established state in life') ap_dd_unsubscribe_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 116), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdUnsubscribeLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdUnsubscribeLifePerMax.setDescription('PerMax number of the DD subscriber in Established state in life') ap_dd_unsubscribe_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 117), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdUnsubscribeLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdUnsubscribeLifeHigh.setDescription('Highest number of the DD subscriber in Established state in life') ap_dd_policy_hit_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 118), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdPolicyHitPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdPolicyHitPeriodActive.setDescription('Number of the DD subscriber is Active in Terminated state in this period') ap_dd_policy_hit_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 119), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdPolicyHitPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdPolicyHitPeriodHigh.setDescription('Highest number of the DD subscriber in Terminated state in this period') ap_dd_policy_hit_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 120), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdPolicyHitPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdPolicyHitPeriodTotal.setDescription('Total Number of the DD subscriber in Terminated state in this period') ap_dd_policy_hit_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 121), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdPolicyHitLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdPolicyHitLifeTotal.setDescription('Total Number of the DD subscriber in Terminated state in life') ap_dd_policy_hit_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 122), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdPolicyHitLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdPolicyHitLifePerMax.setDescription('PerMax number of the DD subscriber in Terminated state in life') ap_dd_policy_hit_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 123), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdPolicyHitLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdPolicyHitLifeHigh.setDescription('Highest number of the DD subscriber in Terminated state in life') ap_dd_policy_miss_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 124), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdPolicyMissPeriodActive.setStatus('current') if mibBuilder.loadTexts: apDdPolicyMissPeriodActive.setDescription('Number of the DD subscriber is Active in Timeout state in this period') ap_dd_policy_miss_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 125), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdPolicyMissPeriodHigh.setStatus('current') if mibBuilder.loadTexts: apDdPolicyMissPeriodHigh.setDescription('Highest number of the DD subscriber in Timeout state in this period') ap_dd_policy_miss_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 126), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdPolicyMissPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdPolicyMissPeriodTotal.setDescription('Total Number of the DD subscriber in Timeout state in this period') ap_dd_policy_miss_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 127), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdPolicyMissLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdPolicyMissLifeTotal.setDescription('Total Number of the DD subscriber in Timeout state in life') ap_dd_policy_miss_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 128), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdPolicyMissLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdPolicyMissLifePerMax.setDescription('PerMax number of the DD subscriber in Timeout state in life') ap_dd_policy_miss_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 129), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdPolicyMissLifeHigh.setStatus('current') if mibBuilder.loadTexts: apDdPolicyMissLifeHigh.setDescription('Highest number of the DD subscriber in Timeout state in life') ap_dd_subscriber_miss_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 130), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscriberMissPeriodTotal.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberMissPeriodTotal.setDescription('Total Number of the DD subscriber in Errors state in this period') ap_dd_subscriber_miss_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 131), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscriberMissLifeTotal.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberMissLifeTotal.setDescription('Total Number of the DD subscriber in Errors state in life') ap_dd_subscriber_miss_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 132), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdSubscriberMissLifePerMax.setStatus('current') if mibBuilder.loadTexts: apDdSubscriberMissLifePerMax.setDescription('PerMax number of the DD subscriber in Errors state in life') ap_dd_interface_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1)) if mibBuilder.loadTexts: apDdInterfaceStatsTable.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceStatsTable.setDescription('DD interface statistics.') ap_dd_interface_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1)).setIndexNames((0, 'APDD-MIB', 'apDdInterfaceIndex')) if mibBuilder.loadTexts: apDdInterfaceStatsEntry.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceStatsEntry.setDescription('A table entry designed to hold per DD interface statistics.') ap_dd_interface_index = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: apDdInterfaceIndex.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceIndex.setDescription('An integer for the sole purpose of indexing the DD interface.') ap_dd_interface_realm_name = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdInterfaceRealmName.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceRealmName.setDescription('Realm name of the DD interface if the row is for per interface stats. Otherwise, it is an empty string.') ap_dd_client_trans_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 3), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdClientTransCPActive.setStatus('current') if mibBuilder.loadTexts: apDdClientTransCPActive.setDescription('Number of active client transactions in the current period.') ap_dd_client_trans_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdClientTransCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdClientTransCPHigh.setDescription('Maximum value of apDdClientTransCPActive in the current period (high water mark). ') ap_dd_client_trans_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdClientTransCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdClientTransCPTotal.setDescription('Total number of client transactions in the current period.') ap_dd_client_trans_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdClientTransLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdClientTransLTTotal.setDescription('Total number of transactions in client side in life time.') ap_dd_client_trans_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdClientTransLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdClientTransLTPerMax.setDescription('Maximum value of apDdClientTransCPTotal across all periods (high water mark).') ap_dd_client_trans_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdClientTransLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdClientTransLTHigh.setDescription('Maximum value of apDdClientTransCPHigh across all periods (high water mark).') ap_dd_server_trans_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 9), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdServerTransCPActive.setStatus('current') if mibBuilder.loadTexts: apDdServerTransCPActive.setDescription('Number of active transactions in server side in current period.') ap_dd_server_trans_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdServerTransCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdServerTransCPHigh.setDescription('Highest number of active transactions in server side in current period.') ap_dd_server_trans_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdServerTransCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdServerTransCPTotal.setDescription('Total number of transactions in server side in current period.') ap_dd_server_trans_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdServerTransLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdServerTransLTTotal.setDescription('Total number of transactions in server side in life time.') ap_dd_server_trans_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdServerTransLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdServerTransLTPerMax.setDescription('Maximum value of apDdServerTransCPTotal across all periods (high water mark).') ap_dd_server_trans_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdServerTransLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdServerTransLTHigh.setDescription('Maximum value of apDdServerTransCPHigh across all periods (high water mark).') ap_dd_gen_sockets_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 15), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdGenSocketsCPActive.setStatus('current') if mibBuilder.loadTexts: apDdGenSocketsCPActive.setDescription('Number of active sockets in current period.') ap_dd_gen_sockets_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdGenSocketsCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdGenSocketsCPHigh.setDescription('Highest number of active sockets in current period.') ap_dd_gen_sockets_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdGenSocketsCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdGenSocketsCPTotal.setDescription('Total number of sockets in current period.') ap_dd_gen_sockets_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdGenSocketsLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdGenSocketsLTTotal.setDescription('Total number of sockets in life time.') ap_dd_gen_sockets_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdGenSocketsLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdGenSocketsLTPerMax.setDescription('Maximum value of apDdSocketsCPTotal across all periods (high water mark).') ap_dd_gen_sockets_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdGenSocketsLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdGenSocketsLTHigh.setDescription('Maximum value of apDdSocketsCPHigh across all periods (high water mark).') ap_dd_gen_connects_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 21), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdGenConnectsCPActive.setStatus('current') if mibBuilder.loadTexts: apDdGenConnectsCPActive.setDescription('Number of active connections in current period.') ap_dd_gen_connects_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 22), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdGenConnectsCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdGenConnectsCPHigh.setDescription('high number of connections in current period.') ap_dd_gen_connects_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 23), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdGenConnectsCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdGenConnectsCPTotal.setDescription('Total number of connections in current period.') ap_dd_gen_connects_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 24), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdGenConnectsLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdGenConnectsLTTotal.setDescription('Total number of connections in life time.') ap_dd_gen_connects_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 25), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdGenConnectsLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdGenConnectsLTPerMax.setDescription('Maximum value of apDdConnectsCPTotal across all periods (high water mark).') ap_dd_gen_connects_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 26), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdGenConnectsLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdGenConnectsLTHigh.setDescription('Maximum value of apDdConnectsCPHigh across all periods (high water mark).') ap_dd_error_status_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2)) if mibBuilder.loadTexts: apDdErrorStatusTable.setStatus('current') if mibBuilder.loadTexts: apDdErrorStatusTable.setDescription('per DD interface error stats.') ap_dd_error_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1)).setIndexNames((0, 'APDD-MIB', 'apDdInterfaceIndex')) if mibBuilder.loadTexts: apDdErrorStatusEntry.setStatus('current') if mibBuilder.loadTexts: apDdErrorStatusEntry.setDescription('A table entry designed to hold error status data') ap_dd_no_route_found_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 1), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdNoRouteFoundRecent.setStatus('current') if mibBuilder.loadTexts: apDdNoRouteFoundRecent.setDescription("Number of 'no route found' error in recent period.") ap_dd_no_route_found_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdNoRouteFoundTotal.setStatus('current') if mibBuilder.loadTexts: apDdNoRouteFoundTotal.setDescription("Total number of 'no route found' error in life time.") ap_dd_no_route_found_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdNoRouteFoundPerMax.setStatus('current') if mibBuilder.loadTexts: apDdNoRouteFoundPerMax.setDescription('Maximum value of apDdNoRouteFoundRecent across all periods (high water mark).') ap_dd_malformed_msg_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 4), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMalformedMsgRecent.setStatus('current') if mibBuilder.loadTexts: apDdMalformedMsgRecent.setDescription("Number of 'mal-formed message' error in recent period.") ap_dd_malformed_msg_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMalformedMsgTotal.setStatus('current') if mibBuilder.loadTexts: apDdMalformedMsgTotal.setDescription("Total number of 'mal-formed message' error in life time.") ap_dd_malformed_msg_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMalformedMsgPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMalformedMsgPerMax.setDescription('Maximum value of apDdMalformedMsgRecent across all periods (high water mark).') ap_dd_rejected_msg_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 7), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdRejectedMsgRecent.setStatus('current') if mibBuilder.loadTexts: apDdRejectedMsgRecent.setDescription("Number of 'rejected msg'' error in recent period.") ap_dd_rejected_msg_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdRejectedMsgTotal.setStatus('current') if mibBuilder.loadTexts: apDdRejectedMsgTotal.setDescription("Total number of 'rejected msg' error in life time.") ap_dd_rejected_msg_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdRejectedMsgPerMax.setStatus('current') if mibBuilder.loadTexts: apDdRejectedMsgPerMax.setDescription('Maximum value of apDdRejectedMsgRecent across all periods (high water mark).') ap_dd_dropped_msg_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 10), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdDroppedMsgRecent.setStatus('current') if mibBuilder.loadTexts: apDdDroppedMsgRecent.setDescription("Number of 'dropped msg'' error in recent period.") ap_dd_dropped_msg_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdDroppedMsgTotal.setStatus('current') if mibBuilder.loadTexts: apDdDroppedMsgTotal.setDescription("Total number of 'dropped msg' error in life time.") ap_dd_dropped_msg_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdDroppedMsgPerMax.setStatus('current') if mibBuilder.loadTexts: apDdDroppedMsgPerMax.setDescription('Maximum value of apDdDroppedMsgRecent across all periods (high water mark).') ap_dd_inbound_constraints_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 13), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdInboundConstraintsRecent.setStatus('current') if mibBuilder.loadTexts: apDdInboundConstraintsRecent.setDescription("Number of 'inbound constraints'' error in recent period.") ap_dd_inbound_constraints_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdInboundConstraintsTotal.setStatus('current') if mibBuilder.loadTexts: apDdInboundConstraintsTotal.setDescription("Total number of 'inbound constraints' error in life time.") ap_dd_inbound_constraints_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdInboundConstraintsPerMax.setStatus('current') if mibBuilder.loadTexts: apDdInboundConstraintsPerMax.setDescription('Maximum value of apDdInboundConstraintsRecent across all periods (high water mark).') ap_dd_outbound_constraints_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 16), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdOutboundConstraintsRecent.setStatus('current') if mibBuilder.loadTexts: apDdOutboundConstraintsRecent.setDescription("Number of 'outbound constraints'' error in recent period.") ap_dd_outbound_constraints_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdOutboundConstraintsTotal.setStatus('current') if mibBuilder.loadTexts: apDdOutboundConstraintsTotal.setDescription("Total number of 'outbound constraints' error in life time.") ap_dd_outbound_constraints_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdOutboundConstraintsPerMax.setStatus('current') if mibBuilder.loadTexts: apDdOutboundConstraintsPerMax.setDescription('Maximum value of apDdOutboundConstraintsRecent across all periods (high water mark).') ap_dd_msg_type_info_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3)) if mibBuilder.loadTexts: apDdMsgTypeInfoTable.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeInfoTable.setDescription('static system message type information.') ap_dd_msg_type_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3, 1)).setIndexNames((0, 'APDD-MIB', 'apDdMsgTypeIndex')) if mibBuilder.loadTexts: apDdMsgTypeInfoEntry.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeInfoEntry.setDescription('A table entry designed for message type inf.') ap_dd_msg_type_index = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: apDdMsgTypeIndex.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeIndex.setDescription('An integer for the sole purpose of indexing DD message types.') ap_dd_msg_type_msg_name = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeMsgName.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeMsgName.setDescription('The identification string of the message type.') ap_dd_msg_type_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4)) if mibBuilder.loadTexts: apDdMsgTypeStatsTable.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeStatsTable.setDescription('table for holding message type stats.') ap_dd_msg_type_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1)).setIndexNames((0, 'APDD-MIB', 'apDdInterfaceIndex'), (0, 'APDD-MIB', 'apDdMsgTypeIndex')) if mibBuilder.loadTexts: apDdMsgTypeStatsEntry.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeStatsEntry.setDescription('A table entry designed for message type statistics.') ap_dd_msg_type_server_req_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 3), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeServerReqRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerReqRecent.setDescription('Number of server requests in recent period.') ap_dd_msg_type_server_req_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeServerReqTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerReqTotal.setDescription('Total number of server requests in life time.') ap_dd_msg_type_server_req_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeServerReqPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerReqPerMax.setDescription('Maximum value of apDdMsgTypeServerReqRecent across all periods (high water mark)') ap_dd_msg_type_client_req_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 6), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientReqRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientReqRecent.setDescription('Number of client requests in recent period.') ap_dd_msg_type_client_req_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientReqTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientReqTotal.setDescription('Total number of client requests in life time.') ap_dd_msg_type_client_req_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientReqPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientReqPerMax.setDescription('Maximum value of apDdMsgTypeClientReqRecent across all periods (high water mark).') ap_dd_msg_type_server_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 9), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeServerRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerRetransRecent.setDescription('Number of server retransmissions in recent period.') ap_dd_msg_type_server_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeServerRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerRetransTotal.setDescription('Total number of server retransmissions in life time.') ap_dd_msg_type_server_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeServerRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerRetransPerMax.setDescription('Maximum value of apDdMsgTypeServerRetransRecent across all periods (high water mark)') ap_dd_msg_type_client_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 12), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientRetransRecent.setDescription('Number of client retransmissions in recent period.') ap_dd_msg_type_client_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientRetransTotal.setDescription('Total number of client retransmissions in life time.') ap_dd_msg_type_client_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientRetransPerMax.setDescription('Maximum value of apDdMsgTypeClientRetransRecent across all periods (high water mark).') ap_dd_msg_type_server_resp_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 15), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransRecent.setDescription('Number of server response retransactions in recent period.') ap_dd_msg_type_server_resp_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransTotal.setDescription('Total number of server response retransactions in life time.') ap_dd_msg_type_server_resp_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransPerMax.setDescription('Maximum value of apDdMsgTypeServerRespRetransRecent across all periods (high water mark).') ap_dd_msg_type_client_resp_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 21), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransRecent.setDescription('Number of client response retransactions in recent period.') ap_dd_msg_type_client_resp_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 22), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransTotal.setDescription('Total number of client response retransactions in life time.') ap_dd_msg_type_client_resp_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 23), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransPerMax.setDescription('Maximum value of apDdMsgTypeClientRespRetransRecent across all periods (high water mark).') ap_dd_msg_type_client_timeout_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 27), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutRecent.setDescription('Number of client transaction timeout in recent period.') ap_dd_msg_type_client_timeout_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 28), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutTotal.setDescription('Total number of client transaction timeout in life time.') ap_dd_msg_type_client_timeout_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 29), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutPerMax.setDescription('Maximum value of apDdMsgTypeClientTimeoutRecent across all periods (high water mark).') ap_dd_msg_type_client_throttled_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 33), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientThrottledRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientThrottledRecent.setDescription('Number of locally throttled client count in recent period.') ap_dd_msg_type_client_throttled_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 34), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientThrottledTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientThrottledTotal.setDescription('Total number of locally throttled client count in life time.') ap_dd_msg_type_client_throttled_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 35), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeClientThrottledPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeClientThrottledPerMax.setDescription('Maximum value of apDdMsgTypeClientThrottledRecent across all periods (high water mark).') ap_dd_msg_type_average_latency = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 36), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeAverageLatency.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeAverageLatency.setDescription('Average Latency.') ap_dd_msg_type_maximum_latency = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 37), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeMaximumLatency.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeMaximumLatency.setDescription('Maximum Latency.') ap_dd_msg_type_latency_window = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 38), integer32()).setUnits('second').setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgTypeLatencyWindow.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeLatencyWindow.setDescription('Latency window length.') ap_dd_msg_return_code_info_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5)) if mibBuilder.loadTexts: apDdMsgReturnCodeInfoTable.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeInfoTable.setDescription('DD return message code stats table.') ap_dd_msg_return_code_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5, 1)).setIndexNames((0, 'APDD-MIB', 'apDdMsgReturnCodeIndex')) if mibBuilder.loadTexts: apDdMsgReturnCodeInfoEntry.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeInfoEntry.setDescription('A table entry designed to hold return code stats.') ap_dd_msg_return_code_index = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: apDdMsgReturnCodeIndex.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeIndex.setDescription('An integer for the sole purpose of indexing message return code.') ap_dd_msg_return_code_name = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgReturnCodeName.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeName.setDescription('The name string of the message return code.') ap_dd_msg_stats_return_code_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6)) if mibBuilder.loadTexts: apDdMsgStatsReturnCodeTable.setStatus('current') if mibBuilder.loadTexts: apDdMsgStatsReturnCodeTable.setDescription('DD return message code stats table.') ap_dd_msg_stats_return_code_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1)).setIndexNames((0, 'APDD-MIB', 'apDdInterfaceIndex'), (0, 'APDD-MIB', 'apDdMsgTypeIndex'), (0, 'APDD-MIB', 'apDdMsgReturnCodeIndex')) if mibBuilder.loadTexts: apDdMsgStatsReturnCodeEntry.setStatus('current') if mibBuilder.loadTexts: apDdMsgStatsReturnCodeEntry.setDescription('A table entry designed to hold return code stats.') ap_dd_msg_return_code_server_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 3), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgReturnCodeServerRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeServerRecent.setDescription('Number of server requests in recent period.') ap_dd_msg_return_code_server_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgReturnCodeServerTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeServerTotal.setDescription('Total number of server requests in life time.') ap_dd_msg_return_code_server_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgReturnCodeServerPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeServerPerMax.setDescription('Maximum value of apDdMsgReturnCodeServerRecent across all periods (high water mark).') ap_dd_msg_return_code_client_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 6), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgReturnCodeClientRecent.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeClientRecent.setDescription('Number of server requests in recent period.') ap_dd_msg_return_code_client_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgReturnCodeClientTotal.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeClientTotal.setDescription('Total number of server requests in life time.') ap_dd_msg_return_code_client_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdMsgReturnCodeClientPerMax.setStatus('current') if mibBuilder.loadTexts: apDdMsgReturnCodeClientPerMax.setDescription('Maximum value of apDdMsgReturnCodeClientRecent across all periods (high water mark).') ap_dd_agent_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7)) if mibBuilder.loadTexts: apDdAgentStatsTable.setStatus('current') if mibBuilder.loadTexts: apDdAgentStatsTable.setDescription('DD agent statistics.') ap_dd_agent_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1)).setIndexNames((0, 'APDD-MIB', 'apDdAgentIndex')) if mibBuilder.loadTexts: apDdAgentStatsEntry.setStatus('current') if mibBuilder.loadTexts: apDdAgentStatsEntry.setDescription('A table entry designed to hold per DD agent statistics.') ap_dd_agent_index = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: apDdAgentIndex.setStatus('current') if mibBuilder.loadTexts: apDdAgentIndex.setDescription('An integer for the sole purpose of indexing the DD agent.') ap_dd_agent_realm_name = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentRealmName.setStatus('current') if mibBuilder.loadTexts: apDdAgentRealmName.setDescription('Realm name of the DD agent if the row is for per agent stats. Otherwise, it is an empty string.') ap_dd_agent_client_trans_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 3), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentClientTransCPActive.setStatus('current') if mibBuilder.loadTexts: apDdAgentClientTransCPActive.setDescription('Number of active client transactions in the current period.') ap_dd_agent_client_trans_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentClientTransCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentClientTransCPHigh.setDescription('Maximum value of apDdAgentClientTransCPActive in the current period (high water mark). ') ap_dd_agent_client_trans_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentClientTransCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentClientTransCPTotal.setDescription('Total number of client transactions in the current period.') ap_dd_agent_client_trans_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentClientTransLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentClientTransLTTotal.setDescription('Total number of transactions in client side in life time.') ap_dd_agent_client_trans_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentClientTransLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentClientTransLTPerMax.setDescription('Maximum value of apDdAgentClientTransCPTotal across all periods (high water mark).') ap_dd_agent_client_trans_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentClientTransLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentClientTransLTHigh.setDescription('Maximum value of apDdAgentClientTransCPHigh across all periods (high water mark).') ap_dd_agent_server_trans_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 9), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentServerTransCPActive.setStatus('current') if mibBuilder.loadTexts: apDdAgentServerTransCPActive.setDescription('Number of active transactions in server side in current period.') ap_dd_agent_server_trans_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentServerTransCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentServerTransCPHigh.setDescription('Highest number of active transactions in server side in current period.') ap_dd_agent_server_trans_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentServerTransCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentServerTransCPTotal.setDescription('Total number of transactions in server side in current period.') ap_dd_agent_server_trans_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentServerTransLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentServerTransLTTotal.setDescription('Total number of transactions in server side in life time.') ap_dd_agent_server_trans_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentServerTransLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentServerTransLTPerMax.setDescription('Maximum value of apDdAgentServerTransCPTotal across all periods (high water mark).') ap_dd_agent_server_trans_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentServerTransLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentServerTransLTHigh.setDescription('Maximum value of apDdAgentServerTransCPHigh across all periods (high water mark).') ap_dd_agent_gen_sockets_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 15), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentGenSocketsCPActive.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenSocketsCPActive.setDescription('Number of active sockets in current period.') ap_dd_agent_gen_sockets_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentGenSocketsCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenSocketsCPHigh.setDescription('Highest number of active sockets in current period.') ap_dd_agent_gen_sockets_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentGenSocketsCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenSocketsCPTotal.setDescription('Total number of sockets in current period.') ap_dd_agent_gen_sockets_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentGenSocketsLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenSocketsLTTotal.setDescription('Total number of sockets in life time.') ap_dd_agent_gen_sockets_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentGenSocketsLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenSocketsLTPerMax.setDescription('Maximum value of apDdAgentSocketsCPTotal across all periods (high water mark).') ap_dd_agent_gen_sockets_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentGenSocketsLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenSocketsLTHigh.setDescription('Maximum value of apDdAgentSocketsCPHigh across all periods (high water mark).') ap_dd_agent_gen_connects_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 21), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentGenConnectsCPActive.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenConnectsCPActive.setDescription('Number of active connections in current period.') ap_dd_agent_gen_connects_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 22), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentGenConnectsCPHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenConnectsCPHigh.setDescription('high number of connections in current period.') ap_dd_agent_gen_connects_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 23), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentGenConnectsCPTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenConnectsCPTotal.setDescription('Total number of connections in current period.') ap_dd_agent_gen_connects_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 24), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentGenConnectsLTTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenConnectsLTTotal.setDescription('Total number of connections in life time.') ap_dd_agent_gen_connects_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 25), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentGenConnectsLTPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenConnectsLTPerMax.setDescription('Maximum value of apDdConnectsCPTotal across all periods (high water mark).') ap_dd_agent_gen_connects_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 26), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentGenConnectsLTHigh.setStatus('current') if mibBuilder.loadTexts: apDdAgentGenConnectsLTHigh.setDescription('Maximum value of apDdAgentConnectsCPHigh across all periods (high water mark).') ap_dd_agent_error_status_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8)) if mibBuilder.loadTexts: apDdAgentErrorStatusTable.setStatus('current') if mibBuilder.loadTexts: apDdAgentErrorStatusTable.setDescription('per DD agent error stats.') ap_dd_agent_error_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1)).setIndexNames((0, 'APDD-MIB', 'apDdAgentIndex')) if mibBuilder.loadTexts: apDdAgentErrorStatusEntry.setStatus('current') if mibBuilder.loadTexts: apDdAgentErrorStatusEntry.setDescription('A table entry designed to hold error status data') ap_dd_agent_no_route_found_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 1), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentNoRouteFoundRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentNoRouteFoundRecent.setDescription("Number of 'no route found' error in recent period.") ap_dd_agent_no_route_found_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentNoRouteFoundTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentNoRouteFoundTotal.setDescription("Total number of 'no route found' error in life time.") ap_dd_agent_no_route_found_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentNoRouteFoundPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentNoRouteFoundPerMax.setDescription('Maximum value of apDdAgentNoRouteFoundRecent across all periods (high water mark).') ap_dd_agent_malformed_msg_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 4), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMalformedMsgRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMalformedMsgRecent.setDescription("Number of 'mal-formed message' error in recent period.") ap_dd_agent_malformed_msg_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMalformedMsgTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMalformedMsgTotal.setDescription("Total number of 'mal-formed message' error in life time.") ap_dd_agent_malformed_msg_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMalformedMsgPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMalformedMsgPerMax.setDescription('Maximum value of apDdAgentMalformedMsgRecent across all periods (high water mark).') ap_dd_agent_rejected_msg_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 7), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentRejectedMsgRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentRejectedMsgRecent.setDescription("Number of 'rejected msg'' error in recent period.") ap_dd_agent_rejected_msg_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentRejectedMsgTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentRejectedMsgTotal.setDescription("Total number of 'rejected msg' error in life time.") ap_dd_agent_rejected_msg_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentRejectedMsgPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentRejectedMsgPerMax.setDescription('Maximum value of apDdAgentRejectedMsgRecent across all periods (high water mark).') ap_dd_agent_dropped_msg_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 10), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentDroppedMsgRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentDroppedMsgRecent.setDescription("Number of 'dropped msg'' error in recent period.") ap_dd_agent_dropped_msg_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentDroppedMsgTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentDroppedMsgTotal.setDescription("Total number of 'dropped msg' error in life time.") ap_dd_agent_dropped_msg_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentDroppedMsgPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentDroppedMsgPerMax.setDescription('Maximum value of apDdAgentDroppedMsgRecent across all periods (high water mark).') ap_dd_agent_inbound_constraints_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 13), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentInboundConstraintsRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentInboundConstraintsRecent.setDescription("Number of 'inbound constraints'' error in recent period.") ap_dd_agent_inbound_constraints_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentInboundConstraintsTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentInboundConstraintsTotal.setDescription("Total number of 'inbound constraints' error in life time.") ap_dd_agent_inbound_constraints_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentInboundConstraintsPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentInboundConstraintsPerMax.setDescription('Maximum value of apDdAgentInboundConstraintsRecent across all periods (high water mark).') ap_dd_agent_outbound_constraints_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 16), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentOutboundConstraintsRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentOutboundConstraintsRecent.setDescription("Number of 'outbound constraints'' error in recent period.") ap_dd_agent_outbound_constraints_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentOutboundConstraintsTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentOutboundConstraintsTotal.setDescription("Total number of 'outbound constraints' error in life time.") ap_dd_agent_outbound_constraints_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentOutboundConstraintsPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentOutboundConstraintsPerMax.setDescription('Maximum value of apDdAgentOutboundConstraintsRecent across all periods (high water mark).') ap_dd_agent_msg_type_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9)) if mibBuilder.loadTexts: apDdAgentMsgTypeStatsTable.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeStatsTable.setDescription('table for holding message type stats.') ap_dd_agent_msg_type_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1)).setIndexNames((0, 'APDD-MIB', 'apDdAgentIndex'), (0, 'APDD-MIB', 'apDdMsgTypeIndex')) if mibBuilder.loadTexts: apDdAgentMsgTypeStatsEntry.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeStatsEntry.setDescription('A table entry designed for message type statistics.') ap_dd_agent_msg_type_server_req_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 3), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqRecent.setDescription('Number of server requests in recent period.') ap_dd_agent_msg_type_server_req_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqTotal.setDescription('Total number of server requests in life time.') ap_dd_agent_msg_type_server_req_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqPerMax.setDescription('Maximum value of apDdAgentMsgTypeServerReqRecent across all periods (high water mark)') ap_dd_agent_msg_type_client_req_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 6), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqRecent.setDescription('Number of client requests in recent period.') ap_dd_agent_msg_type_client_req_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqTotal.setDescription('Total number of client requests in life time.') ap_dd_agent_msg_type_client_req_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientReqRecent across all periods (high water mark).') ap_dd_agent_msg_type_server_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 9), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransRecent.setDescription('Number of server retransmissions in recent period.') ap_dd_agent_msg_type_server_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransTotal.setDescription('Total number of server retransmissions in life time.') ap_dd_agent_msg_type_server_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeServerRetransRecent across all periods (high water mark)') ap_dd_agent_msg_type_client_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 12), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransRecent.setDescription('Number of client retransmissions in recent period.') ap_dd_agent_msg_type_client_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransTotal.setDescription('Total number of client retransmissions in life time.') ap_dd_agent_msg_type_client_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientRetransRecent across all periods (high water mark).') ap_dd_agent_msg_type_server_resp_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 15), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransRecent.setDescription('Number of server response retransactions in recent period.') ap_dd_agent_msg_type_server_resp_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransTotal.setDescription('Total number of server response retransactions in life time.') ap_dd_agent_msg_type_server_resp_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeServerRespRetransRecent across all periods (high water mark).') ap_dd_agent_msg_type_client_resp_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 21), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransRecent.setDescription('Number of client response retransactions in recent period.') ap_dd_agent_msg_type_client_resp_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 22), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransTotal.setDescription('Total number of client response retransactions in life time.') ap_dd_agent_msg_type_client_resp_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 23), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientRespRetransRecent across all periods (high water mark).') ap_dd_agent_msg_type_client_timeout_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 27), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutRecent.setDescription('Number of client transaction timeout in recent period.') ap_dd_agent_msg_type_client_timeout_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 28), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutTotal.setDescription('Total number of client transaction timeout in life time.') ap_dd_agent_msg_type_client_timeout_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 29), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientTimeoutRecent across all periods (high water mark).') ap_dd_agent_msg_type_client_throttled_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 33), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledRecent.setDescription('Number of locally throttled client count in recent period.') ap_dd_agent_msg_type_client_throttled_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 34), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledTotal.setDescription('Total number of locally throttled client count in life time.') ap_dd_agent_msg_type_client_throttled_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 35), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientThrottledRecent across all periods (high water mark).') ap_dd_agent_msg_type_average_latency = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 36), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeAverageLatency.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeAverageLatency.setDescription('Average Latency.') ap_dd_agent_msg_type_maximum_latency = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 37), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeMaximumLatency.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeMaximumLatency.setDescription('Maximum Latency.') ap_dd_agent_msg_type_latency_window = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 38), integer32()).setUnits('second').setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgTypeLatencyWindow.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeLatencyWindow.setDescription('Latency window length.') ap_dd_agent_msg_stats_return_code_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10)) if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeTable.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeTable.setDescription('DD return message code stats table.') ap_dd_agent_msg_stats_return_code_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1)).setIndexNames((0, 'APDD-MIB', 'apDdAgentIndex'), (0, 'APDD-MIB', 'apDdMsgTypeIndex'), (0, 'APDD-MIB', 'apDdMsgReturnCodeIndex')) if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeEntry.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeEntry.setDescription('A table entry designed to hold return code stats.') ap_dd_agent_msg_return_code_server_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 3), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerRecent.setDescription('Number of server requests in recent period.') ap_dd_agent_msg_return_code_server_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerTotal.setDescription('Total number of server requests in life time.') ap_dd_agent_msg_return_code_server_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerPerMax.setDescription('Maximum value of apDdAgentMsgReturnCodeServerRecent across all periods (high water mark).') ap_dd_agent_msg_return_code_client_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 6), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientRecent.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientRecent.setDescription('Number of server requests in recent period.') ap_dd_agent_msg_return_code_client_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientTotal.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientTotal.setDescription('Total number of server requests in life time.') ap_dd_agent_msg_return_code_client_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientPerMax.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientPerMax.setDescription('Maximum value of apDdAgentMsgReturnCodeClientRecent across all periods (high water mark).') ap_dd_diameter_agent_host_name = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: apDdDiameterAgentHostName.setStatus('current') if mibBuilder.loadTexts: apDdDiameterAgentHostName.setDescription('The hostname of the Diameter Agent where it is hosted.') ap_dd_diameter_ip_port = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: apDdDiameterIPPort.setStatus('current') if mibBuilder.loadTexts: apDdDiameterIPPort.setDescription('The IP port of the Diameter Agent where it is hosted.') ap_dd_diameter_agent_origin_host_name = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: apDdDiameterAgentOriginHostName.setStatus('current') if mibBuilder.loadTexts: apDdDiameterAgentOriginHostName.setDescription('The origin hostname of the Diameter Agent where it is hosted.') ap_dd_diameter_agent_origin_realm_name = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: apDdDiameterAgentOriginRealmName.setStatus('current') if mibBuilder.loadTexts: apDdDiameterAgentOriginRealmName.setDescription('The origin realm name of the Diameter Agent where it is hosted.') ap_dd_transport_type = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 5), ap_transport_type()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: apDdTransportType.setStatus('current') if mibBuilder.loadTexts: apDdTransportType.setDescription('The transport type of the DD interface.') ap_dd_interface_status_reason = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('disconnectByRequest', 0), ('diameterAgentUnreachable', 1), ('transportFailure', 2)))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: apDdInterfaceStatusReason.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceStatusReason.setDescription('The reason for the status change on a DD interface') ap_dd_connection_failure_trap = notification_type((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2, 0, 1)).setObjects(('APDD-MIB', 'apDdInterfaceRealmName'), ('APDD-MIB', 'apDdDiameterAgentHostName'), ('APDD-MIB', 'apDdDiameterIPPort'), ('APDD-MIB', 'apDdDiameterAgentOriginHostName'), ('APDD-MIB', 'apDdDiameterAgentOriginRealmName'), ('APDD-MIB', 'apDdTransportType'), ('APDD-MIB', 'apDdInterfaceStatusReason')) if mibBuilder.loadTexts: apDdConnectionFailureTrap.setStatus('current') if mibBuilder.loadTexts: apDdConnectionFailureTrap.setDescription('A notification when a diameter connection is disconnected via a disconnect request.') ap_dd_connection_failure_clear_trap = notification_type((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2, 0, 2)).setObjects(('APDD-MIB', 'apDdInterfaceRealmName'), ('APDD-MIB', 'apDdDiameterAgentHostName'), ('APDD-MIB', 'apDdDiameterIPPort'), ('APDD-MIB', 'apDdDiameterAgentOriginHostName'), ('APDD-MIB', 'apDdDiameterAgentOriginRealmName'), ('APDD-MIB', 'apDdTransportType'), ('APDD-MIB', 'apDdInterfaceStatusReason')) if mibBuilder.loadTexts: apDdConnectionFailureClearTrap.setStatus('current') if mibBuilder.loadTexts: apDdConnectionFailureClearTrap.setDescription('A notification when a transport failure has been recovered.') ap_dd_general_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 1)).setObjects(('APDD-MIB', 'apDdInterfaceNumber'), ('APDD-MIB', 'apDdCurrentTransRate'), ('APDD-MIB', 'apDdHighTransRate'), ('APDD-MIB', 'apDdLowTransRate')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_general_group = apDdGeneralGroup.setStatus('current') if mibBuilder.loadTexts: apDdGeneralGroup.setDescription('A collection of objects generic to DD system.') ap_dd_interface_stats_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 2)).setObjects(('APDD-MIB', 'apDdInterfaceRealmName'), ('APDD-MIB', 'apDdClientTransCPActive'), ('APDD-MIB', 'apDdClientTransCPHigh'), ('APDD-MIB', 'apDdClientTransCPTotal'), ('APDD-MIB', 'apDdClientTransLTTotal'), ('APDD-MIB', 'apDdClientTransLTPerMax'), ('APDD-MIB', 'apDdClientTransLTHigh'), ('APDD-MIB', 'apDdServerTransCPActive'), ('APDD-MIB', 'apDdServerTransCPHigh'), ('APDD-MIB', 'apDdServerTransCPTotal'), ('APDD-MIB', 'apDdServerTransLTTotal'), ('APDD-MIB', 'apDdServerTransLTPerMax'), ('APDD-MIB', 'apDdServerTransLTHigh'), ('APDD-MIB', 'apDdGenSocketsCPActive'), ('APDD-MIB', 'apDdGenSocketsCPHigh'), ('APDD-MIB', 'apDdGenSocketsCPTotal'), ('APDD-MIB', 'apDdGenSocketsLTTotal'), ('APDD-MIB', 'apDdGenSocketsLTPerMax'), ('APDD-MIB', 'apDdGenSocketsLTHigh'), ('APDD-MIB', 'apDdGenConnectsCPActive'), ('APDD-MIB', 'apDdGenConnectsCPHigh'), ('APDD-MIB', 'apDdGenConnectsCPTotal'), ('APDD-MIB', 'apDdGenConnectsLTTotal'), ('APDD-MIB', 'apDdGenConnectsLTPerMax'), ('APDD-MIB', 'apDdGenConnectsLTHigh')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_interface_stats_group = apDdInterfaceStatsGroup.setStatus('current') if mibBuilder.loadTexts: apDdInterfaceStatsGroup.setDescription('A collection of statistics for DD interfaces or system.') ap_dd_error_status_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 3)).setObjects(('APDD-MIB', 'apDdNoRouteFoundRecent'), ('APDD-MIB', 'apDdNoRouteFoundTotal'), ('APDD-MIB', 'apDdNoRouteFoundPerMax'), ('APDD-MIB', 'apDdMalformedMsgRecent'), ('APDD-MIB', 'apDdMalformedMsgTotal'), ('APDD-MIB', 'apDdMalformedMsgPerMax')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_error_status_group = apDdErrorStatusGroup.setStatus('current') if mibBuilder.loadTexts: apDdErrorStatusGroup.setDescription('A collection of statistics for DD errors.') ap_dd_msg_type_stats_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 4)).setObjects(('APDD-MIB', 'apDdMsgTypeMsgName'), ('APDD-MIB', 'apDdMsgTypeServerReqRecent'), ('APDD-MIB', 'apDdMsgTypeServerReqTotal'), ('APDD-MIB', 'apDdMsgTypeServerReqPerMax'), ('APDD-MIB', 'apDdMsgTypeClientReqRecent'), ('APDD-MIB', 'apDdMsgTypeClientReqTotal'), ('APDD-MIB', 'apDdMsgTypeClientReqPerMax'), ('APDD-MIB', 'apDdMsgTypeServerRetransRecent'), ('APDD-MIB', 'apDdMsgTypeServerRetransTotal'), ('APDD-MIB', 'apDdMsgTypeServerRetransPerMax'), ('APDD-MIB', 'apDdMsgTypeClientRetransRecent'), ('APDD-MIB', 'apDdMsgTypeClientRetransTotal'), ('APDD-MIB', 'apDdMsgTypeClientRetransPerMax'), ('APDD-MIB', 'apDdMsgTypeServerRespRetransRecent'), ('APDD-MIB', 'apDdMsgTypeServerRespRetransTotal'), ('APDD-MIB', 'apDdMsgTypeServerRespRetransPerMax'), ('APDD-MIB', 'apDdMsgTypeClientRespRetransRecent'), ('APDD-MIB', 'apDdMsgTypeClientRespRetransTotal'), ('APDD-MIB', 'apDdMsgTypeClientRespRetransPerMax'), ('APDD-MIB', 'apDdMsgTypeClientTimeoutRecent'), ('APDD-MIB', 'apDdMsgTypeClientTimeoutTotal'), ('APDD-MIB', 'apDdMsgTypeClientTimeoutPerMax'), ('APDD-MIB', 'apDdMsgTypeClientThrottledRecent'), ('APDD-MIB', 'apDdMsgTypeClientThrottledTotal'), ('APDD-MIB', 'apDdMsgTypeClientThrottledPerMax'), ('APDD-MIB', 'apDdMsgTypeAverageLatency'), ('APDD-MIB', 'apDdMsgTypeMaximumLatency'), ('APDD-MIB', 'apDdMsgTypeLatencyWindow')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_msg_type_stats_group = apDdMsgTypeStatsGroup.setStatus('current') if mibBuilder.loadTexts: apDdMsgTypeStatsGroup.setDescription('A collection of statistics for DD message types.') ap_dd_msg_stats_return_code_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 5)).setObjects(('APDD-MIB', 'apDdMsgReturnCodeName'), ('APDD-MIB', 'apDdMsgReturnCodeServerRecent'), ('APDD-MIB', 'apDdMsgReturnCodeServerTotal'), ('APDD-MIB', 'apDdMsgReturnCodeServerPerMax'), ('APDD-MIB', 'apDdMsgReturnCodeClientRecent'), ('APDD-MIB', 'apDdMsgReturnCodeClientTotal'), ('APDD-MIB', 'apDdMsgReturnCodeClientPerMax')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_msg_stats_return_code_group = apDdMsgStatsReturnCodeGroup.setStatus('current') if mibBuilder.loadTexts: apDdMsgStatsReturnCodeGroup.setDescription('A collection of statistics for DD message type return codes.') ap_dd_intf_error_status_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 6)).setObjects(('APDD-MIB', 'apDdRejectedMsgRecent'), ('APDD-MIB', 'apDdRejectedMsgTotal'), ('APDD-MIB', 'apDdRejectedMsgPerMax'), ('APDD-MIB', 'apDdDroppedMsgRecent'), ('APDD-MIB', 'apDdDroppedMsgTotal'), ('APDD-MIB', 'apDdDroppedMsgPerMax'), ('APDD-MIB', 'apDdInboundConstraintsRecent'), ('APDD-MIB', 'apDdInboundConstraintsTotal'), ('APDD-MIB', 'apDdInboundConstraintsPerMax'), ('APDD-MIB', 'apDdOutboundConstraintsRecent'), ('APDD-MIB', 'apDdOutboundConstraintsTotal'), ('APDD-MIB', 'apDdOutboundConstraintsPerMax')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_intf_error_status_group = apDdIntfErrorStatusGroup.setStatus('current') if mibBuilder.loadTexts: apDdIntfErrorStatusGroup.setDescription('A collection of statistics for DD errors.') ap_dd_agent_general_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 7)).setObjects(('APDD-MIB', 'apDdAgentNumber')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_agent_general_group = apDdAgentGeneralGroup.setStatus('current') if mibBuilder.loadTexts: apDdAgentGeneralGroup.setDescription('A collection of Agent objects generic to DD system.') ap_dd_agent_stats_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 8)).setObjects(('APDD-MIB', 'apDdAgentRealmName'), ('APDD-MIB', 'apDdAgentClientTransCPActive'), ('APDD-MIB', 'apDdAgentClientTransCPHigh'), ('APDD-MIB', 'apDdAgentClientTransCPTotal'), ('APDD-MIB', 'apDdAgentClientTransLTTotal'), ('APDD-MIB', 'apDdAgentClientTransLTPerMax'), ('APDD-MIB', 'apDdAgentClientTransLTHigh'), ('APDD-MIB', 'apDdAgentServerTransCPActive'), ('APDD-MIB', 'apDdAgentServerTransCPHigh'), ('APDD-MIB', 'apDdAgentServerTransCPTotal'), ('APDD-MIB', 'apDdAgentServerTransLTTotal'), ('APDD-MIB', 'apDdAgentServerTransLTPerMax'), ('APDD-MIB', 'apDdAgentServerTransLTHigh'), ('APDD-MIB', 'apDdAgentGenSocketsCPActive'), ('APDD-MIB', 'apDdAgentGenSocketsCPHigh'), ('APDD-MIB', 'apDdAgentGenSocketsCPTotal'), ('APDD-MIB', 'apDdAgentGenSocketsLTTotal'), ('APDD-MIB', 'apDdAgentGenSocketsLTPerMax'), ('APDD-MIB', 'apDdAgentGenSocketsLTHigh'), ('APDD-MIB', 'apDdAgentGenConnectsCPActive'), ('APDD-MIB', 'apDdAgentGenConnectsCPHigh'), ('APDD-MIB', 'apDdAgentGenConnectsCPTotal'), ('APDD-MIB', 'apDdAgentGenConnectsLTTotal'), ('APDD-MIB', 'apDdAgentGenConnectsLTPerMax'), ('APDD-MIB', 'apDdAgentGenConnectsLTHigh')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_agent_stats_group = apDdAgentStatsGroup.setStatus('current') if mibBuilder.loadTexts: apDdAgentStatsGroup.setDescription('A collection of statistics for DD agents') ap_dd_agent_error_status_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 9)).setObjects(('APDD-MIB', 'apDdAgentNoRouteFoundRecent'), ('APDD-MIB', 'apDdAgentNoRouteFoundTotal'), ('APDD-MIB', 'apDdAgentNoRouteFoundPerMax'), ('APDD-MIB', 'apDdAgentMalformedMsgRecent'), ('APDD-MIB', 'apDdAgentMalformedMsgTotal'), ('APDD-MIB', 'apDdAgentMalformedMsgPerMax'), ('APDD-MIB', 'apDdAgentRejectedMsgRecent'), ('APDD-MIB', 'apDdAgentRejectedMsgTotal'), ('APDD-MIB', 'apDdAgentRejectedMsgPerMax'), ('APDD-MIB', 'apDdAgentDroppedMsgRecent'), ('APDD-MIB', 'apDdAgentDroppedMsgTotal'), ('APDD-MIB', 'apDdAgentDroppedMsgPerMax'), ('APDD-MIB', 'apDdAgentInboundConstraintsRecent'), ('APDD-MIB', 'apDdAgentInboundConstraintsTotal'), ('APDD-MIB', 'apDdAgentInboundConstraintsPerMax'), ('APDD-MIB', 'apDdAgentOutboundConstraintsRecent'), ('APDD-MIB', 'apDdAgentOutboundConstraintsTotal'), ('APDD-MIB', 'apDdAgentOutboundConstraintsPerMax')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_agent_error_status_group = apDdAgentErrorStatusGroup.setStatus('current') if mibBuilder.loadTexts: apDdAgentErrorStatusGroup.setDescription('A collection of statistics for DD Agent errors.') ap_dd_agent_msg_type_stats_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 10)).setObjects(('APDD-MIB', 'apDdMsgTypeMsgName'), ('APDD-MIB', 'apDdAgentMsgTypeServerReqRecent'), ('APDD-MIB', 'apDdAgentMsgTypeServerReqTotal'), ('APDD-MIB', 'apDdAgentMsgTypeServerReqPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeClientReqRecent'), ('APDD-MIB', 'apDdAgentMsgTypeClientReqTotal'), ('APDD-MIB', 'apDdAgentMsgTypeClientReqPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeServerRetransRecent'), ('APDD-MIB', 'apDdAgentMsgTypeServerRetransTotal'), ('APDD-MIB', 'apDdAgentMsgTypeServerRetransPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeClientRetransRecent'), ('APDD-MIB', 'apDdAgentMsgTypeClientRetransTotal'), ('APDD-MIB', 'apDdAgentMsgTypeClientRetransPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeServerRespRetransRecent'), ('APDD-MIB', 'apDdAgentMsgTypeServerRespRetransTotal'), ('APDD-MIB', 'apDdAgentMsgTypeServerRespRetransPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeClientRespRetransRecent'), ('APDD-MIB', 'apDdAgentMsgTypeClientRespRetransTotal'), ('APDD-MIB', 'apDdAgentMsgTypeClientRespRetransPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeClientTimeoutRecent'), ('APDD-MIB', 'apDdAgentMsgTypeClientTimeoutTotal'), ('APDD-MIB', 'apDdAgentMsgTypeClientTimeoutPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeClientThrottledRecent'), ('APDD-MIB', 'apDdAgentMsgTypeClientThrottledTotal'), ('APDD-MIB', 'apDdAgentMsgTypeClientThrottledPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeAverageLatency'), ('APDD-MIB', 'apDdAgentMsgTypeMaximumLatency'), ('APDD-MIB', 'apDdAgentMsgTypeLatencyWindow')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_agent_msg_type_stats_group = apDdAgentMsgTypeStatsGroup.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgTypeStatsGroup.setDescription('A collection of statistics for DD Agent message types.') ap_dd_agent_msg_stats_return_code_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 11)).setObjects(('APDD-MIB', 'apDdMsgReturnCodeName'), ('APDD-MIB', 'apDdAgentMsgReturnCodeServerRecent'), ('APDD-MIB', 'apDdAgentMsgReturnCodeServerTotal'), ('APDD-MIB', 'apDdAgentMsgReturnCodeServerPerMax'), ('APDD-MIB', 'apDdAgentMsgReturnCodeClientRecent'), ('APDD-MIB', 'apDdAgentMsgReturnCodeClientTotal'), ('APDD-MIB', 'apDdAgentMsgReturnCodeClientPerMax')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_agent_msg_stats_return_code_group = apDdAgentMsgStatsReturnCodeGroup.setStatus('current') if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeGroup.setDescription('A collection of statistics for DD Agent message type return codes.') ap_dd_session_subscriber_general_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 12)).setObjects(('APDD-MIB', 'apDdSessionPeriodActive'), ('APDD-MIB', 'apDdSessionPeriodHigh'), ('APDD-MIB', 'apDdSessionPeriodTotal'), ('APDD-MIB', 'apDdSessionLifeTotal'), ('APDD-MIB', 'apDdSessionLifePerMax'), ('APDD-MIB', 'apDdSessionLifeHigh'), ('APDD-MIB', 'apDdSessInitPeriodActive'), ('APDD-MIB', 'apDdSessInitPeriodHigh'), ('APDD-MIB', 'apDdSessInitPeriodTotal'), ('APDD-MIB', 'apDdSessInitLifeTotal'), ('APDD-MIB', 'apDdSessInitLifePerMax'), ('APDD-MIB', 'apDdSessInitLifeHigh'), ('APDD-MIB', 'apDdSessEstablishedPeriodActive'), ('APDD-MIB', 'apDdSessEstablishedPeriodHigh'), ('APDD-MIB', 'apDdSessEstablishedPeriodTotal'), ('APDD-MIB', 'apDdSessEstablishedLifeTotal'), ('APDD-MIB', 'apDdSessEstablishedLifePerMax'), ('APDD-MIB', 'apDdSessEstablishedLifeHigh'), ('APDD-MIB', 'apDdSessTerminatedPeriodActive'), ('APDD-MIB', 'apDdSessTerminatedPeriodHigh'), ('APDD-MIB', 'apDdSessTerminatedPeriodTotal'), ('APDD-MIB', 'apDdSessTerminatedLifeTotal'), ('APDD-MIB', 'apDdSessTerminatedLifePerMax'), ('APDD-MIB', 'apDdSessTerminatedLifeHigh'), ('APDD-MIB', 'apDdSessTimeoutPeriodTotal'), ('APDD-MIB', 'apDdSessTimeoutLifeTotal'), ('APDD-MIB', 'apDdSessTimeoutLifePerMax'), ('APDD-MIB', 'apDdSessErrorsPeriodTotal'), ('APDD-MIB', 'apDdSessErrorsLifeTotal'), ('APDD-MIB', 'apDdSessErrorsLifePerMax'), ('APDD-MIB', 'apDdSessMissPeriodTotal'), ('APDD-MIB', 'apDdSessMissLifeTotal'), ('APDD-MIB', 'apDdSessMissLifePerMax'), ('APDD-MIB', 'apDdSubscriberPeriodActive'), ('APDD-MIB', 'apDdSubscriberPeriodHigh'), ('APDD-MIB', 'apDdSubscriberPeriodTotal'), ('APDD-MIB', 'apDdSubscriberLifeTotal'), ('APDD-MIB', 'apDdSubscriberLifePerMax'), ('APDD-MIB', 'apDdSubscriberLifeHigh'), ('APDD-MIB', 'apDdSubscribePeriodActive'), ('APDD-MIB', 'apDdSubscribePeriodHigh'), ('APDD-MIB', 'apDdSubscribePeriodTotal'), ('APDD-MIB', 'apDdSubscribeLifeTotal'), ('APDD-MIB', 'apDdSubscribeLifePerMax'), ('APDD-MIB', 'apDdSubscribeLifeHigh'), ('APDD-MIB', 'apDdUnsubscribePeriodActive'), ('APDD-MIB', 'apDdUnsubscribePeriodHigh'), ('APDD-MIB', 'apDdUnsubscribePeriodTotal'), ('APDD-MIB', 'apDdUnsubscribeLifeTotal'), ('APDD-MIB', 'apDdUnsubscribeLifePerMax'), ('APDD-MIB', 'apDdUnsubscribeLifeHigh'), ('APDD-MIB', 'apDdPolicyHitPeriodActive'), ('APDD-MIB', 'apDdPolicyHitPeriodHigh'), ('APDD-MIB', 'apDdPolicyHitPeriodTotal'), ('APDD-MIB', 'apDdPolicyHitLifeTotal'), ('APDD-MIB', 'apDdPolicyHitLifePerMax'), ('APDD-MIB', 'apDdPolicyHitLifeHigh'), ('APDD-MIB', 'apDdPolicyMissPeriodActive'), ('APDD-MIB', 'apDdPolicyMissPeriodHigh'), ('APDD-MIB', 'apDdPolicyMissPeriodTotal'), ('APDD-MIB', 'apDdPolicyMissLifeTotal'), ('APDD-MIB', 'apDdPolicyMissLifePerMax'), ('APDD-MIB', 'apDdPolicyMissLifeHigh'), ('APDD-MIB', 'apDdSubscriberMissPeriodTotal'), ('APDD-MIB', 'apDdSubscriberMissLifeTotal'), ('APDD-MIB', 'apDdSubscriberMissLifePerMax')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_session_subscriber_general_group = apDdSessionSubscriberGeneralGroup.setStatus('current') if mibBuilder.loadTexts: apDdSessionSubscriberGeneralGroup.setDescription('A collection of Session objects generic to DD system.') ap_dd_notif_objects_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 2, 1)).setObjects(('APDD-MIB', 'apDdDiameterAgentHostName'), ('APDD-MIB', 'apDdDiameterIPPort'), ('APDD-MIB', 'apDdDiameterAgentOriginHostName'), ('APDD-MIB', 'apDdDiameterAgentOriginRealmName'), ('APDD-MIB', 'apDdTransportType'), ('APDD-MIB', 'apDdInterfaceStatusReason')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_notif_objects_group = apDDNotifObjectsGroup.setStatus('current') if mibBuilder.loadTexts: apDDNotifObjectsGroup.setDescription('A collection of mib objects accessible only to traps.') ap_dd_notifications_group = notification_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 2, 2)).setObjects(('APDD-MIB', 'apDdConnectionFailureTrap'), ('APDD-MIB', 'apDdConnectionFailureClearTrap')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ap_dd_notifications_group = apDDNotificationsGroup.setStatus('current') if mibBuilder.loadTexts: apDDNotificationsGroup.setDescription('A collection of traps defined for DD.') mibBuilder.exportSymbols('APDD-MIB', apDdSessionPeriodActive=apDdSessionPeriodActive, apDdClientTransLTHigh=apDdClientTransLTHigh, apDdAgentNoRouteFoundTotal=apDdAgentNoRouteFoundTotal, apDdAgentMsgReturnCodeClientRecent=apDdAgentMsgReturnCodeClientRecent, apDdSessMissLifeTotal=apDdSessMissLifeTotal, apDDMIBTabularObjects=apDDMIBTabularObjects, apDdHighTransRate=apDdHighTransRate, apDdMsgTypeServerReqRecent=apDdMsgTypeServerReqRecent, apDdUnsubscribePeriodTotal=apDdUnsubscribePeriodTotal, apDDNotifObjects=apDDNotifObjects, apDdLowTransRate=apDdLowTransRate, apDdMsgStatsReturnCodeEntry=apDdMsgStatsReturnCodeEntry, apDdAgentGenSocketsCPHigh=apDdAgentGenSocketsCPHigh, apDdMsgReturnCodeServerTotal=apDdMsgReturnCodeServerTotal, apDdMsgTypeInfoEntry=apDdMsgTypeInfoEntry, apDdAgentMsgTypeClientRespRetransPerMax=apDdAgentMsgTypeClientRespRetransPerMax, apDdAgentMsgReturnCodeServerRecent=apDdAgentMsgReturnCodeServerRecent, apDdSessTerminatedPeriodTotal=apDdSessTerminatedPeriodTotal, apDdAgentMsgStatsReturnCodeTable=apDdAgentMsgStatsReturnCodeTable, apDDMIBGeneralObjects=apDDMIBGeneralObjects, apDdPolicyMissLifeTotal=apDdPolicyMissLifeTotal, apDdMsgTypeServerReqTotal=apDdMsgTypeServerReqTotal, apDDConformance=apDDConformance, apDdAgentInboundConstraintsTotal=apDdAgentInboundConstraintsTotal, apDdAgentMsgTypeLatencyWindow=apDdAgentMsgTypeLatencyWindow, apDdAgentMsgTypeServerRetransTotal=apDdAgentMsgTypeServerRetransTotal, apDdAgentIndex=apDdAgentIndex, apDdSessInitPeriodActive=apDdSessInitPeriodActive, apDdAgentErrorStatusGroup=apDdAgentErrorStatusGroup, apDdPolicyHitPeriodTotal=apDdPolicyHitPeriodTotal, apDdSubscribeLifeHigh=apDdSubscribeLifeHigh, apDdGenConnectsCPTotal=apDdGenConnectsCPTotal, apDdSessInitPeriodTotal=apDdSessInitPeriodTotal, apDdMsgTypeIndex=apDdMsgTypeIndex, apDdAgentMsgTypeServerReqTotal=apDdAgentMsgTypeServerReqTotal, apDdDroppedMsgTotal=apDdDroppedMsgTotal, apDdMsgReturnCodeServerPerMax=apDdMsgReturnCodeServerPerMax, apDdRejectedMsgPerMax=apDdRejectedMsgPerMax, apDdAgentStatsEntry=apDdAgentStatsEntry, apDdAgentGenSocketsCPTotal=apDdAgentGenSocketsCPTotal, apDdAgentStatsGroup=apDdAgentStatsGroup, apDdSessTerminatedLifePerMax=apDdSessTerminatedLifePerMax, apDdMalformedMsgRecent=apDdMalformedMsgRecent, apDdPolicyMissPeriodHigh=apDdPolicyMissPeriodHigh, apDdAgentMsgTypeServerReqPerMax=apDdAgentMsgTypeServerReqPerMax, apDdSessMissPeriodTotal=apDdSessMissPeriodTotal, apDDNotificationObjects=apDDNotificationObjects, apDdGenConnectsCPHigh=apDdGenConnectsCPHigh, apDdGenSocketsLTTotal=apDdGenSocketsLTTotal, apDdAgentMsgTypeClientTimeoutPerMax=apDdAgentMsgTypeClientTimeoutPerMax, apDdAgentMsgTypeClientReqTotal=apDdAgentMsgTypeClientReqTotal, apDdOutboundConstraintsPerMax=apDdOutboundConstraintsPerMax, apDdSessEstablishedLifeHigh=apDdSessEstablishedLifeHigh, apDDModule=apDDModule, apDdSessionLifePerMax=apDdSessionLifePerMax, apDdAgentClientTransCPTotal=apDdAgentClientTransCPTotal, apDdSubscribePeriodTotal=apDdSubscribePeriodTotal, apDdMsgReturnCodeClientTotal=apDdMsgReturnCodeClientTotal, apDdClientTransLTTotal=apDdClientTransLTTotal, apDdMsgTypeServerRespRetransRecent=apDdMsgTypeServerRespRetransRecent, apDdTransportType=apDdTransportType, apDdMsgTypeServerRespRetransTotal=apDdMsgTypeServerRespRetransTotal, apDdAgentGenConnectsLTPerMax=apDdAgentGenConnectsLTPerMax, apDdMsgTypeStatsTable=apDdMsgTypeStatsTable, apDdInterfaceStatsGroup=apDdInterfaceStatsGroup, apDdIntfErrorStatusGroup=apDdIntfErrorStatusGroup, apDdMsgReturnCodeServerRecent=apDdMsgReturnCodeServerRecent, apDdSubscriberLifeTotal=apDdSubscriberLifeTotal, apDdSessTimeoutPeriodTotal=apDdSessTimeoutPeriodTotal, apDdSessInitLifeHigh=apDdSessInitLifeHigh, apDdMsgTypeClientRetransPerMax=apDdMsgTypeClientRetransPerMax, apDdAgentServerTransCPHigh=apDdAgentServerTransCPHigh, apDdMsgTypeServerRetransPerMax=apDdMsgTypeServerRetransPerMax, apDdSessionLifeHigh=apDdSessionLifeHigh, apDdNoRouteFoundRecent=apDdNoRouteFoundRecent, apDdAgentMsgTypeClientRespRetransTotal=apDdAgentMsgTypeClientRespRetransTotal, apDdAgentOutboundConstraintsTotal=apDdAgentOutboundConstraintsTotal, apDDNotifObjectsGroup=apDDNotifObjectsGroup, apDdInboundConstraintsTotal=apDdInboundConstraintsTotal, apDdSessInitPeriodHigh=apDdSessInitPeriodHigh, apDdClientTransCPHigh=apDdClientTransCPHigh, apDdMsgTypeClientThrottledRecent=apDdMsgTypeClientThrottledRecent, apDdMsgTypeClientThrottledPerMax=apDdMsgTypeClientThrottledPerMax, apDdClientTransCPTotal=apDdClientTransCPTotal, apDdGenConnectsLTPerMax=apDdGenConnectsLTPerMax, apDdSessionPeriodTotal=apDdSessionPeriodTotal, apDdSessErrorsLifeTotal=apDdSessErrorsLifeTotal, apDdAgentGenConnectsCPHigh=apDdAgentGenConnectsCPHigh, apDdAgentMsgStatsReturnCodeEntry=apDdAgentMsgStatsReturnCodeEntry, apDdDiameterAgentOriginRealmName=apDdDiameterAgentOriginRealmName, apDdSubscriberMissPeriodTotal=apDdSubscriberMissPeriodTotal, apDdMsgTypeServerRetransTotal=apDdMsgTypeServerRetransTotal, apDdSessTerminatedLifeTotal=apDdSessTerminatedLifeTotal, apDdAgentNoRouteFoundPerMax=apDdAgentNoRouteFoundPerMax, apDdAgentMsgTypeStatsTable=apDdAgentMsgTypeStatsTable, apDdConnectionFailureClearTrap=apDdConnectionFailureClearTrap, apDdDroppedMsgRecent=apDdDroppedMsgRecent, apDdPolicyHitLifeHigh=apDdPolicyHitLifeHigh, apDdServerTransLTHigh=apDdServerTransLTHigh, apDdMsgTypeStatsEntry=apDdMsgTypeStatsEntry, apDdMsgTypeLatencyWindow=apDdMsgTypeLatencyWindow, apDdMsgStatsReturnCodeTable=apDdMsgStatsReturnCodeTable, apDdSessTerminatedPeriodActive=apDdSessTerminatedPeriodActive, apDdGenSocketsCPTotal=apDdGenSocketsCPTotal, apDdSessionPeriodHigh=apDdSessionPeriodHigh, apDdAgentServerTransCPActive=apDdAgentServerTransCPActive, apDdMsgReturnCodeClientRecent=apDdMsgReturnCodeClientRecent, apDdGenConnectsLTTotal=apDdGenConnectsLTTotal, apDdAgentMsgTypeStatsEntry=apDdAgentMsgTypeStatsEntry, apDdInterfaceIndex=apDdInterfaceIndex, apDdMsgTypeClientRetransTotal=apDdMsgTypeClientRetransTotal, apDdAgentGenConnectsLTTotal=apDdAgentGenConnectsLTTotal, apDdSessEstablishedPeriodActive=apDdSessEstablishedPeriodActive, apDdAgentMsgTypeServerRespRetransTotal=apDdAgentMsgTypeServerRespRetransTotal, apDdAgentClientTransLTTotal=apDdAgentClientTransLTTotal, apDdAgentErrorStatusTable=apDdAgentErrorStatusTable, apDdGeneralGroup=apDdGeneralGroup, apDdPolicyHitLifeTotal=apDdPolicyHitLifeTotal, apDdAgentNoRouteFoundRecent=apDdAgentNoRouteFoundRecent, apDdDiameterIPPort=apDdDiameterIPPort, apDdAgentClientTransCPHigh=apDdAgentClientTransCPHigh, apDdMsgTypeInfoTable=apDdMsgTypeInfoTable, apDdServerTransCPTotal=apDdServerTransCPTotal, apDDMIBObjects=apDDMIBObjects, apDDNotificationsGroup=apDDNotificationsGroup, apDdAgentMsgTypeServerRespRetransRecent=apDdAgentMsgTypeServerRespRetransRecent, apDdServerTransLTTotal=apDdServerTransLTTotal, apDdGenSocketsCPActive=apDdGenSocketsCPActive, apDdPolicyMissLifePerMax=apDdPolicyMissLifePerMax, apDdAgentGenSocketsLTPerMax=apDdAgentGenSocketsLTPerMax, apDdRejectedMsgTotal=apDdRejectedMsgTotal, apDdConnectionFailureTrap=apDdConnectionFailureTrap, apDdMsgTypeServerRespRetransPerMax=apDdMsgTypeServerRespRetransPerMax, apDdAgentMalformedMsgTotal=apDdAgentMalformedMsgTotal, apDdMsgTypeClientTimeoutRecent=apDdMsgTypeClientTimeoutRecent, apDdSessEstablishedPeriodTotal=apDdSessEstablishedPeriodTotal, apDdAgentGenSocketsCPActive=apDdAgentGenSocketsCPActive, apDdSubscribePeriodHigh=apDdSubscribePeriodHigh, apDdMsgTypeClientRespRetransTotal=apDdMsgTypeClientRespRetransTotal, apDdPolicyHitLifePerMax=apDdPolicyHitLifePerMax, apDdSubscribeLifeTotal=apDdSubscribeLifeTotal, apDdSessInitLifeTotal=apDdSessInitLifeTotal, apDdMsgTypeClientThrottledTotal=apDdMsgTypeClientThrottledTotal, apDdSubscribeLifePerMax=apDdSubscribeLifePerMax, apDdAgentServerTransCPTotal=apDdAgentServerTransCPTotal, apDdAgentMsgTypeClientRetransPerMax=apDdAgentMsgTypeClientRetransPerMax, apDdAgentMsgTypeStatsGroup=apDdAgentMsgTypeStatsGroup, apDdGenConnectsCPActive=apDdGenConnectsCPActive, apDdSessInitLifePerMax=apDdSessInitLifePerMax, apDdInboundConstraintsPerMax=apDdInboundConstraintsPerMax, apDdDiameterAgentHostName=apDdDiameterAgentHostName, apDdInterfaceStatusReason=apDdInterfaceStatusReason, apDdUnsubscribeLifeTotal=apDdUnsubscribeLifeTotal, apDdMsgStatsReturnCodeGroup=apDdMsgStatsReturnCodeGroup, apDdAgentGenConnectsLTHigh=apDdAgentGenConnectsLTHigh, apDdAgentMsgTypeClientRetransTotal=apDdAgentMsgTypeClientRetransTotal, apDdAgentMsgTypeMaximumLatency=apDdAgentMsgTypeMaximumLatency, apDdAgentMsgStatsReturnCodeGroup=apDdAgentMsgStatsReturnCodeGroup, apDdAgentClientTransLTPerMax=apDdAgentClientTransLTPerMax, apDdMsgTypeStatsGroup=apDdMsgTypeStatsGroup, apDdMsgTypeMaximumLatency=apDdMsgTypeMaximumLatency, apDdAgentDroppedMsgTotal=apDdAgentDroppedMsgTotal, apDdAgentMsgTypeClientThrottledRecent=apDdAgentMsgTypeClientThrottledRecent, apDdAgentMsgTypeClientThrottledPerMax=apDdAgentMsgTypeClientThrottledPerMax, apDdAgentGeneralGroup=apDdAgentGeneralGroup, apDdMsgTypeClientRetransRecent=apDdMsgTypeClientRetransRecent, apDdPolicyMissLifeHigh=apDdPolicyMissLifeHigh, apDDNotificationGroups=apDDNotificationGroups, apDdAgentMsgTypeClientTimeoutTotal=apDdAgentMsgTypeClientTimeoutTotal, apDdAgentMalformedMsgPerMax=apDdAgentMalformedMsgPerMax, apDdSessEstablishedLifeTotal=apDdSessEstablishedLifeTotal, apDdNoRouteFoundPerMax=apDdNoRouteFoundPerMax, apDdInterfaceStatsTable=apDdInterfaceStatsTable, apDdMsgTypeClientReqRecent=apDdMsgTypeClientReqRecent, apDdMalformedMsgTotal=apDdMalformedMsgTotal, apDdUnsubscribePeriodActive=apDdUnsubscribePeriodActive, apDdMsgTypeClientReqPerMax=apDdMsgTypeClientReqPerMax, apDdAgentStatsTable=apDdAgentStatsTable, apDdMsgTypeClientRespRetransPerMax=apDdMsgTypeClientRespRetransPerMax, apDdAgentServerTransLTHigh=apDdAgentServerTransLTHigh, apDdAgentServerTransLTPerMax=apDdAgentServerTransLTPerMax, apDdAgentMsgReturnCodeServerPerMax=apDdAgentMsgReturnCodeServerPerMax, apDdAgentMsgReturnCodeClientTotal=apDdAgentMsgReturnCodeClientTotal, apDdAgentRealmName=apDdAgentRealmName, apDdMsgReturnCodeInfoTable=apDdMsgReturnCodeInfoTable, apDdAgentMsgTypeServerRetransRecent=apDdAgentMsgTypeServerRetransRecent, apDdInterfaceNumber=apDdInterfaceNumber, apDdSessTerminatedPeriodHigh=apDdSessTerminatedPeriodHigh, apDdSessMissLifePerMax=apDdSessMissLifePerMax, apDdPolicyMissPeriodTotal=apDdPolicyMissPeriodTotal, apDdMsgTypeClientRespRetransRecent=apDdMsgTypeClientRespRetransRecent, apDdAgentGenSocketsLTTotal=apDdAgentGenSocketsLTTotal, apDDNotifPrefix=apDDNotifPrefix, apDdErrorStatusGroup=apDdErrorStatusGroup, apDdAgentInboundConstraintsRecent=apDdAgentInboundConstraintsRecent, apDdInterfaceRealmName=apDdInterfaceRealmName, apDdSessionSubscriberGeneralGroup=apDdSessionSubscriberGeneralGroup, apDdSubscriberPeriodHigh=apDdSubscriberPeriodHigh, apDdMsgReturnCodeInfoEntry=apDdMsgReturnCodeInfoEntry, apDdMsgTypeClientTimeoutTotal=apDdMsgTypeClientTimeoutTotal, apDDObjectGroups=apDDObjectGroups, apDdAgentMsgTypeServerReqRecent=apDdAgentMsgTypeServerReqRecent, apDdPolicyMissPeriodActive=apDdPolicyMissPeriodActive, apDdMsgTypeClientReqTotal=apDdMsgTypeClientReqTotal, apDdErrorStatusEntry=apDdErrorStatusEntry, apDdAgentDroppedMsgRecent=apDdAgentDroppedMsgRecent, apDdAgentMsgTypeServerRespRetransPerMax=apDdAgentMsgTypeServerRespRetransPerMax, apDdSubscriberMissLifeTotal=apDdSubscriberMissLifeTotal, apDdErrorStatusTable=apDdErrorStatusTable, apDdMsgReturnCodeClientPerMax=apDdMsgReturnCodeClientPerMax, apDdAgentDroppedMsgPerMax=apDdAgentDroppedMsgPerMax, apDdGenSocketsCPHigh=apDdGenSocketsCPHigh, apDdOutboundConstraintsRecent=apDdOutboundConstraintsRecent, apDdSubscriberLifePerMax=apDdSubscriberLifePerMax, apDdMsgTypeServerReqPerMax=apDdMsgTypeServerReqPerMax, apDdAgentNumber=apDdAgentNumber, apDdAgentServerTransLTTotal=apDdAgentServerTransLTTotal, apDdAgentRejectedMsgPerMax=apDdAgentRejectedMsgPerMax, apDdSessEstablishedLifePerMax=apDdSessEstablishedLifePerMax, apDdAgentMalformedMsgRecent=apDdAgentMalformedMsgRecent, apDdAgentOutboundConstraintsRecent=apDdAgentOutboundConstraintsRecent, apDdAgentMsgTypeClientTimeoutRecent=apDdAgentMsgTypeClientTimeoutRecent, apDdClientTransLTPerMax=apDdClientTransLTPerMax, apDdAgentMsgTypeClientThrottledTotal=apDdAgentMsgTypeClientThrottledTotal, apDdSubscriberLifeHigh=apDdSubscriberLifeHigh, apDdPolicyHitPeriodHigh=apDdPolicyHitPeriodHigh, apDdClientTransCPActive=apDdClientTransCPActive, apDdSessTimeoutLifePerMax=apDdSessTimeoutLifePerMax, apDdMsgTypeMsgName=apDdMsgTypeMsgName, apDdAgentRejectedMsgRecent=apDdAgentRejectedMsgRecent, apDdAgentGenConnectsCPTotal=apDdAgentGenConnectsCPTotal, apDdSessTimeoutLifeTotal=apDdSessTimeoutLifeTotal, apDdAgentInboundConstraintsPerMax=apDdAgentInboundConstraintsPerMax, apDdCurrentTransRate=apDdCurrentTransRate, apDdAgentClientTransCPActive=apDdAgentClientTransCPActive, apDdServerTransLTPerMax=apDdServerTransLTPerMax, apDdMsgTypeClientTimeoutPerMax=apDdMsgTypeClientTimeoutPerMax, apDdMalformedMsgPerMax=apDdMalformedMsgPerMax, apDdSessErrorsPeriodTotal=apDdSessErrorsPeriodTotal, apDdAgentErrorStatusEntry=apDdAgentErrorStatusEntry, apDdSessionLifeTotal=apDdSessionLifeTotal, apDdMsgReturnCodeIndex=apDdMsgReturnCodeIndex, apDdAgentRejectedMsgTotal=apDdAgentRejectedMsgTotal, apDdNoRouteFoundTotal=apDdNoRouteFoundTotal, apDdAgentMsgTypeClientReqPerMax=apDdAgentMsgTypeClientReqPerMax, apDdInboundConstraintsRecent=apDdInboundConstraintsRecent, apDdMsgTypeAverageLatency=apDdMsgTypeAverageLatency, apDdMsgReturnCodeName=apDdMsgReturnCodeName, apDdAgentMsgTypeServerRetransPerMax=apDdAgentMsgTypeServerRetransPerMax, apDDNotifications=apDDNotifications, apDdServerTransCPActive=apDdServerTransCPActive, apDdSessTerminatedLifeHigh=apDdSessTerminatedLifeHigh, apDdSessEstablishedPeriodHigh=apDdSessEstablishedPeriodHigh, apDdDroppedMsgPerMax=apDdDroppedMsgPerMax) mibBuilder.exportSymbols('APDD-MIB', apDdAgentMsgReturnCodeServerTotal=apDdAgentMsgReturnCodeServerTotal, apDdGenSocketsLTPerMax=apDdGenSocketsLTPerMax, apDdAgentMsgReturnCodeClientPerMax=apDdAgentMsgReturnCodeClientPerMax, apDdAgentGenSocketsLTHigh=apDdAgentGenSocketsLTHigh, apDdAgentMsgTypeAverageLatency=apDdAgentMsgTypeAverageLatency, apDdGenConnectsLTHigh=apDdGenConnectsLTHigh, apDdUnsubscribeLifePerMax=apDdUnsubscribeLifePerMax, apDdServerTransCPHigh=apDdServerTransCPHigh, apDdInterfaceStatsEntry=apDdInterfaceStatsEntry, apDdAgentGenConnectsCPActive=apDdAgentGenConnectsCPActive, apDdAgentMsgTypeClientRetransRecent=apDdAgentMsgTypeClientRetransRecent, apDdAgentMsgTypeClientRespRetransRecent=apDdAgentMsgTypeClientRespRetransRecent, apDdDiameterAgentOriginHostName=apDdDiameterAgentOriginHostName, apDdAgentOutboundConstraintsPerMax=apDdAgentOutboundConstraintsPerMax, PYSNMP_MODULE_ID=apDDModule, apDdAgentClientTransLTHigh=apDdAgentClientTransLTHigh, apDdSubscriberMissLifePerMax=apDdSubscriberMissLifePerMax, apDdSubscribePeriodActive=apDdSubscribePeriodActive, apDdSubscriberPeriodActive=apDdSubscriberPeriodActive, apDdRejectedMsgRecent=apDdRejectedMsgRecent, apDdSessErrorsLifePerMax=apDdSessErrorsLifePerMax, apDdUnsubscribeLifeHigh=apDdUnsubscribeLifeHigh, apDdMsgTypeServerRetransRecent=apDdMsgTypeServerRetransRecent, apDdUnsubscribePeriodHigh=apDdUnsubscribePeriodHigh, apDdAgentMsgTypeClientReqRecent=apDdAgentMsgTypeClientReqRecent, apDdSubscriberPeriodTotal=apDdSubscriberPeriodTotal, apDdGenSocketsLTHigh=apDdGenSocketsLTHigh, apDdOutboundConstraintsTotal=apDdOutboundConstraintsTotal, apDdPolicyHitPeriodActive=apDdPolicyHitPeriodActive)
# Common configuration options # Annotation categories for COCO output (TODO: move to different file) COCO_CATEGORIES = [ { "id": 0, "name": "Paragraph", "supercategory": None }, { "id": 1, "name": "Title", "supercategory": None }, { "id": 2, "name": "ListItem", "supercategory": None }, { "id": 3, "name": "Table", "supercategory": None }, { "id": 4, "name": "Figure", "supercategory": None }, { "id": 5, "name": "Meta", "supercategory": None }, { "id": 6, "name": "Reference", "supercategory": None }, { "id": 7, "name": "Footnote", "supercategory": None }, { "id": 8, "name": "TableOfContents", "supercategory": None }, { "id": 9, "name": "Caption", "supercategory": None }, { "id": 10, "name": "Formula", "supercategory": None }, { "id": 11, "name": "Code", "supercategory": None }, { "id": 12, "name": "Other", "supercategory": None }, ] # Mapping from structure types to annotation labels STRUCT_TYPE_TO_LABEL_MAP = { 'P': 'Paragraph', 'LI': 'ListItem', 'H1': 'Title', 'H2': 'Title', 'H3': 'Title', 'H4': 'Title', 'H5': 'Title', 'H6': 'Title', 'TOC': 'TableOfContents', 'TOCI': 'TableOfContents', # TocItem 'Table': 'Table', 'Figure': 'Figure', 'Footnote': 'Footnote', 'Note': 'Footnote', } # Colors for annotations LABEL_TO_HEX_COLOR_MAP = { 'Paragraph': '#24DD24', 'Title': '#6FDECD', 'ListItem': '#D0EC37', 'Table' : '#EC3737', 'TableOfContents': '#DDBD24', 'TocItem': '#CCAD14', 'Figure': '#375BEC', 'Reference': '#EC9937', 'Footnote': '#777777', 'Note': '#777777', 'Caption': '#E186C0', } LABEL_TO_COLOR_MAP = { k: (int(v[1:3],16)/255, int(v[3:5],16)/255, int(v[5:7],16)/255) for k, v in LABEL_TO_HEX_COLOR_MAP.items() } LABEL_FONT_NAME = 'Courier' LABEL_FONT_SIZE = 6
coco_categories = [{'id': 0, 'name': 'Paragraph', 'supercategory': None}, {'id': 1, 'name': 'Title', 'supercategory': None}, {'id': 2, 'name': 'ListItem', 'supercategory': None}, {'id': 3, 'name': 'Table', 'supercategory': None}, {'id': 4, 'name': 'Figure', 'supercategory': None}, {'id': 5, 'name': 'Meta', 'supercategory': None}, {'id': 6, 'name': 'Reference', 'supercategory': None}, {'id': 7, 'name': 'Footnote', 'supercategory': None}, {'id': 8, 'name': 'TableOfContents', 'supercategory': None}, {'id': 9, 'name': 'Caption', 'supercategory': None}, {'id': 10, 'name': 'Formula', 'supercategory': None}, {'id': 11, 'name': 'Code', 'supercategory': None}, {'id': 12, 'name': 'Other', 'supercategory': None}] struct_type_to_label_map = {'P': 'Paragraph', 'LI': 'ListItem', 'H1': 'Title', 'H2': 'Title', 'H3': 'Title', 'H4': 'Title', 'H5': 'Title', 'H6': 'Title', 'TOC': 'TableOfContents', 'TOCI': 'TableOfContents', 'Table': 'Table', 'Figure': 'Figure', 'Footnote': 'Footnote', 'Note': 'Footnote'} label_to_hex_color_map = {'Paragraph': '#24DD24', 'Title': '#6FDECD', 'ListItem': '#D0EC37', 'Table': '#EC3737', 'TableOfContents': '#DDBD24', 'TocItem': '#CCAD14', 'Figure': '#375BEC', 'Reference': '#EC9937', 'Footnote': '#777777', 'Note': '#777777', 'Caption': '#E186C0'} label_to_color_map = {k: (int(v[1:3], 16) / 255, int(v[3:5], 16) / 255, int(v[5:7], 16) / 255) for (k, v) in LABEL_TO_HEX_COLOR_MAP.items()} label_font_name = 'Courier' label_font_size = 6
''' Example-related classes. @author: anze.vavpetic@ijs.si ''' class Example: ''' Represents an example with its score, label, id and annotations. ''' ClassLabeled = 'class' Ranked = 'ranked' def __init__(self, id, label, score, annotations=[], weights={}): self.id = id self.label = label self.score = score if not type(score) in [str]: self.target_type = Example.Ranked else: self.target_type = Example.ClassLabeled self.annotations = annotations self.weights = weights def __str__(self): if self.target_type == Example.Ranked: return '<id=%d, score=%.5f, label=%s>' % (self.id, self.score, self.label) else: return '<id=%d, class=%s, label=%s>' % (self.id, self.score, self.label)
""" Example-related classes. @author: anze.vavpetic@ijs.si """ class Example: """ Represents an example with its score, label, id and annotations. """ class_labeled = 'class' ranked = 'ranked' def __init__(self, id, label, score, annotations=[], weights={}): self.id = id self.label = label self.score = score if not type(score) in [str]: self.target_type = Example.Ranked else: self.target_type = Example.ClassLabeled self.annotations = annotations self.weights = weights def __str__(self): if self.target_type == Example.Ranked: return '<id=%d, score=%.5f, label=%s>' % (self.id, self.score, self.label) else: return '<id=%d, class=%s, label=%s>' % (self.id, self.score, self.label)
class SparseVector: def __init__(self, nums: List[int]): # self.data = {} # for idx, val in enumerate(nums): # if val > 0: # self.data[idx]=val self.data = [] for idx, val in enumerate(nums): if val > 0: self.data.append((idx,val)) # Return the dotProduct of two sparse vectors def dotProduct(self, vec: 'SparseVector') -> int: # ans = 0 # for idx, val in self.data: # if idx in vec.data: # ans += self.data[idx]*vec.data[idx] # return ans ans = 0 i1,i2=0,0 while i1<len(self.data) and i2<len(vec.data): if self.data[i1][0]==vec.data[i2][0]: ans += self.data[i1][1] * vec.data[i2][1] i1+=1 i2+=1 elif self.data[i1][0]<vec.data[i2][0]: i1+=1 else: i2+=1 return ans # Your SparseVector object will be instantiated and called as such: # v1 = SparseVector(nums1) # v2 = SparseVector(nums2) # ans = v1.dotProduct(v2)
class Sparsevector: def __init__(self, nums: List[int]): self.data = [] for (idx, val) in enumerate(nums): if val > 0: self.data.append((idx, val)) def dot_product(self, vec: 'SparseVector') -> int: ans = 0 (i1, i2) = (0, 0) while i1 < len(self.data) and i2 < len(vec.data): if self.data[i1][0] == vec.data[i2][0]: ans += self.data[i1][1] * vec.data[i2][1] i1 += 1 i2 += 1 elif self.data[i1][0] < vec.data[i2][0]: i1 += 1 else: i2 += 1 return ans
__author__ = 'kemi' # Plugin globals SERVICE_COMMANDS = 'service.commands.' PACKAGE_COMMANDS = 'package.commands' INSTALL = 'install ' REMOVE = 'remove ' # Install commands APT_GET = 'sudo apt-get -y ' APT_GET_UPDATE = 'sudo apt-get update' DPKG = 'sudo dpkg -i ' YUM = 'sudo yum -y ' APT_SOURCELIST_DIR = '/etc/apt/sources.list.d/' YUM_REPOS_DIR = '/etc/yum.repos.d/' # Services START_SERVICE_COMMAND = 'sudo service {0} start ' STOP_SERVICE_COMMAND = 'sudo service {0} stop ' RESTART_SERVICE_COMMAND = 'sudo service {0} restart '
__author__ = 'kemi' service_commands = 'service.commands.' package_commands = 'package.commands' install = 'install ' remove = 'remove ' apt_get = 'sudo apt-get -y ' apt_get_update = 'sudo apt-get update' dpkg = 'sudo dpkg -i ' yum = 'sudo yum -y ' apt_sourcelist_dir = '/etc/apt/sources.list.d/' yum_repos_dir = '/etc/yum.repos.d/' start_service_command = 'sudo service {0} start ' stop_service_command = 'sudo service {0} stop ' restart_service_command = 'sudo service {0} restart '
''' Parse curry (lisp) code. ''' def remove_comment(line): if ';' not in line: return line else: return line[:line.find(';')] def typify(item): ''' Error-free conversion of an abitrary AST element into typed versions i.e. ['X', '1'] becomes ['X', 1] where the second element is converted str->int ''' try: return int(item) except ValueError: try: return float(item) except ValueError: return item except TypeError: return [typify(subitem) for subitem in item] def parse(item): ''' item is the raw text of a q-lisp file Comments are removed, and then the parentheses are parsed, i.e. (if (= c0 1) (X 0) (X 1)) becomes the python list: ['if', ['=', 'c0', '1'], ['X', '0'], ['X', '1']] ''' cleaned = (remove_comment(line) for line in item.split('\n')) item = '\n'.join(line for line in cleaned if line != '') # Strip comments stack = [] depth = 0 inner = '' def add(item): current = stack for _ in range(depth): current = current[-1] if isinstance(item, str): for subitem in item.split(): current.append(subitem) else: current.append(item) for character in item.strip(): if character == '(': if inner.strip() != '': add(inner.strip()) inner = '' add([]) depth += 1 elif character == ')': add(inner.strip()) depth -= 1 inner = '' else: inner += character return stack
""" Parse curry (lisp) code. """ def remove_comment(line): if ';' not in line: return line else: return line[:line.find(';')] def typify(item): """ Error-free conversion of an abitrary AST element into typed versions i.e. ['X', '1'] becomes ['X', 1] where the second element is converted str->int """ try: return int(item) except ValueError: try: return float(item) except ValueError: return item except TypeError: return [typify(subitem) for subitem in item] def parse(item): """ item is the raw text of a q-lisp file Comments are removed, and then the parentheses are parsed, i.e. (if (= c0 1) (X 0) (X 1)) becomes the python list: ['if', ['=', 'c0', '1'], ['X', '0'], ['X', '1']] """ cleaned = (remove_comment(line) for line in item.split('\n')) item = '\n'.join((line for line in cleaned if line != '')) stack = [] depth = 0 inner = '' def add(item): current = stack for _ in range(depth): current = current[-1] if isinstance(item, str): for subitem in item.split(): current.append(subitem) else: current.append(item) for character in item.strip(): if character == '(': if inner.strip() != '': add(inner.strip()) inner = '' add([]) depth += 1 elif character == ')': add(inner.strip()) depth -= 1 inner = '' else: inner += character return stack
#!/usr/local/bin/python class ParsingExpression(object): def __repr__(self): return self.__str__() def __or__(self,right): return Ore(self, pe(right)) def __and__(self,right): return seq(self,pe(right)) def __xor__(self,right): return seq(self,lfold("", pe(right))) def __rand__(self,left): return seq(pe(left), self) def __add__(self,right): return seq(Many1(self),pe(right)) def __mul__(self,right): return seq(Many(self),pe(right)) def __truediv__ (self, right): return Ore(self, pe(right)) def __invert__(self): return Not(self) def __neq__(self): return Not(self) def __pos__(self): return And(self) def setg(self, peg): if hasattr(self, 'inner'): self.inner.setg(peg) if hasattr(self, 'left'): self.left.setg(peg) self.right.setg(peg) class Empty(ParsingExpression): def __str__(self): return "''" EMPTY = Empty() class Char(ParsingExpression): __slots__ = ['a'] def __init__(self, a): self.a = a def __str__(self): return "'" + quote_str(self.a) + "'" class Range(ParsingExpression): __slots__ = ['chars', 'ranges'] def __init__(self, *ss): chars = [] ranges = [] for s in ss : if len(s) == 3 and s[1] is '-': ranges.append((s[0], s[2])) else: for c in s: chars.append(c) self.chars = tuple(chars) self.ranges = tuple(ranges) def __str__(self): l = tuple(map(lambda x: quote_str(x[0], ']')+'-'+quote_str(x[1], ']'), self.ranges)) return "[" + ''.join(l) + quote_str(self.chars, ']') + "]" class Any(ParsingExpression): def __str__(self): return '.' ANY = Any() class Ref(ParsingExpression): __slots__ = ['peg', 'name'] def __init__(self, name, peg = None): self.name = name self.peg = peg def __str__(self): return str(self.name) def setg(self, peg): self.peg = peg def isNonTerminal(self): return hasattr(self.peg, self.name) def deref(self): return getattr(self.peg, self.name).inner def prop(self): return getattr(self.peg, self.name) def getmemo(self,prefix): return self.peg.getmemo(prefix+self.name) def setmemo(self,prefix,value): return self.peg.setmemo(prefix+self.name,value) class Seq(ParsingExpression): __slots__ = ['left', 'right'] def __init__(self, left, right): self.left = pe(left) self.right = pe(right) def __str__(self): return quote_pe(self.left, inSeq) + ' ' + quote_pe(self.right, inSeq) def flatten(self, ls): if isinstance(self.left, Seq): self.left.flatten(ls) else: ls.append(self.left) if isinstance(self.right, Seq): self.right.flatten(ls) else: ls.append(self.right) return ls class Ore(ParsingExpression): __slots__ = ['left', 'right'] def __init__(self, left, right): self.left = pe(left) self.right = pe(right) def __str__(self): if self.right == EMPTY: return quote_pe(self.left, inUnary) + '?' return str(self.left) + ' / ' + str(self.right) def flatten(self, ls): if isinstance(self.left, Ore): self.left.flatten(ls) else: ls.append(self.left) if isinstance(self.right, Ore): self.right.flatten(ls) else: ls.append(self.right) return ls class Alt(ParsingExpression): __slots__ = ['left', 'right'] def __init__(self, left, right): self.left = pe(left) self.right = pe(right) def __str__(self): return str(self.left) + ' | ' + str(self.right) def flatten(self, ls): if isinstance(self.left, Alt): self.left.flatten(ls) else: ls.append(self.left) if isinstance(self.right, Alt): self.right.flatten(ls) else: ls.append(self.right) return ls class And(ParsingExpression): __slots__ = ['inner'] def __init__(self, inner): self.inner = pe(inner) def __str__(self): return '&' + quote_pe(self.inner, inUnary) class Not(ParsingExpression): __slots__ = ['inner'] def __init__(self, inner): self.inner = pe(inner) def __str__(self): return '!' + quote_pe(self.inner, inUnary) class Many(ParsingExpression): __slots__ = ['inner'] def __init__(self, inner): self.inner = pe(inner) def __str__(self): return quote_pe(self.inner, inUnary) + '*' class Many1(ParsingExpression): __slots__ = ['inner'] def __init__(self, inner): self.inner = pe(inner) def __str__(self): return quote_pe(self.inner, inUnary) + '+' def quote_pe(e, f): return '(' + str(e) + ')' if f(e) else str(e) def inSeq(e): return isinstance(e, Ore) or isinstance(e, Alt) def inUnary(e): return (isinstance(e, Ore) and e.right != EMPTY) or isinstance(e, Seq) or isinstance(e, Alt) def quote_str(e, esc = "'"): sb = [] for c in e: if c == '\n' : sb.append(r'\n') elif c == '\t' : sb.append(r'\t') elif c == '\\' : sb.append(r'\\') elif c == '\r' : sb.append(r'\r') elif c in esc : sb.append('\\' + c) else: sb.append(c) return "".join(sb) def pe(x): if x == 0 : return EMPTY if isinstance(x, str): if len(x) == 0: return EMPTY return Char(x) return x def ref(name): if name.find('/') != -1: return lor(list(map(ref, name.split('/')))) if name.find(' ') != -1: return lseq(list(map(ref, name.split(' ')))) if name.startswith('$'): return LinkAs("", Ref(name[1:])) return Ref(name) def seq(x,y): if isinstance(y, Empty): return x return Seq(x, y) def lseq(ls): if len(ls) > 1: return seq(ls[0], lseq(ls[1:])) if len(ls) == 1: return ls[0] return EMPTY def lor(ls): if len(ls) > 1: return Ore(ls[0], lor(ls[1:])) if len(ls) == 1: return ls[0] return EMPTY def lfold(ltag,e): if isinstance(e, Many) and isinstance(e.inner, TreeAs): return Many(lfold(ltag, e.inner)) if isinstance(e, Many1) and isinstance(e.inner, TreeAs): return Many1(lfold(ltag, e.inner)) if isinstance(e, Ore): return Ore(lfold(ltag, e.left), lfold(ltag, e.right)) if isinstance(e, TreeAs): return FoldAs(ltag, e.tag, pe(e.inner)) return e ## Tree Construction class TreeAs(ParsingExpression): __slots__ = ['tag', 'inner'] def __init__(self, tag, inner): self.tag = tag self.inner = pe(inner) def __str__(self): return self.tag + '{ ' + str(self.inner) + ' }' class LinkAs(ParsingExpression): __slots__ = ['tag', 'inner'] def __init__(self, tag, inner=None): self.tag = tag self.inner = pe(inner) def __str__(self): if self.tag == '': return '$' + quote_pe(self.inner, inUnary) return '(' + self.tag + '=>' + str(self.inner) + ')' def __le__(self, right): return LinkAs(self.tag, right) def __ge__(self, right): return LinkAs(self.tag, right) def __mod__(self, right): return ref(right) def __xor__(self,right): return lfold(self.tag, pe(right)) N = LinkAs("") class FoldAs(ParsingExpression): __slots__ = ['ltag', 'tag', 'inner'] def __init__(self, ltag, tag, inner): self.inner = pe(inner) self.ltag = ltag self.tag = tag def __str__(self): return self.ltag + '^' + self.tag +'{ ' + str(self.inner) + ' }' class Detree(ParsingExpression): __slots__ = ['inner'] def __init__(self, inner): self.inner = pe(inner) def __str__(self): return '@unit(' + str(self.inner) + ')' ''' @if(Bool) @symbol(Indent) @match(Indent) @exists(Indent, 'hoge') ''' class Meta(ParsingExpression): __slots__ = ['tag', 'inner', 'opt'] def __init__(self, tag, inner, opt = None): self.tag = tag self.inner = pe(inner) self.opt = opt def __str__(self): arg = ', ' + repr(self.opt) if self.opt != None else '' return self.tag + '(' + str(self.inner) + arg + ')' ''' class ParserContext: __slots__ = ['inputs', 'pos', 'headpos', 'ast'] def __init__(self, inputs, pos = 0): self.inputs = inputs self.pos = pos self.headpos = pos self.ast = None ''' # Rule class Rule(object): def __init__(self, name, inner): self.name = name self.inner = pe(inner) self.checked = False def __str__(self): return str(self.inner) def isConsumed(self): if not hasattr(self, 'nonnull'): self.nonnull = isAlwaysConsumed(self.inner) return self.nonnull def treeState(self): if not hasattr(self, 'ts'): self.ts = treeState(self.inner) return self.ts def checkRule(self): if not self.checked: s0 = str(self.inner) if isRec(self.inner, self.name, {}): checkRec(self.inner, self.name, {}) ts = treeState(self.inner) ts = treeCheck(self.inner, ts) s1 = str(self.inner) if s0 != s1: print(self.name, s0, s1) ## Grammar class PEG(object): def __init__(self, ns = None): self.ns77 = ns self.memo77 = {} self.example77 = [] def __getitem__(self, item): return getattr(self, item, None) def __setattr__(self, key, value): if isinstance(value, ParsingExpression): value.setg(self) if not isinstance(value, Rule): value = Rule(key, value) super().__setattr__(key, value) print(key, '=', value) if not hasattr(self, "start"): setattr(self, "start", value) else: super().__setattr__(key, value) def ns(self): return self.ns77 def hasmemo(self, key): return key in self.memo77 def getmemo(self, key): return self.memo77[key] if key in self.memo77 else None def setmemo(self, key, value): self.memo77[key] = value def example(self, prod, input, output = None): for name in prod.split(','): self.example77.append((name, input, output)) def testAll(self, combinator): p = {} test = 0 ok = 0 for testcase in self.example77: name, input, output = testcase if not name in p: p[name] = combinator(self, name) res = p[name](input) t = str(res).replace(" b'", " '") if output == None: print(name, input, '=>', t) else: test += 1 if t == output: print('OK', name, input) ok += 1 else: print('NG', name, input, output, '!=', t) if test > 0: print('OK', ok, 'FAIL', test - ok, ok / test * 100.0, '%') ## Properties def match(*ctags): def _match(func): name = ctags[-1] for ctag in ctags[:-1]: setattr(ctag, name, func) return func return _match def isRec(pe: ParsingExpression, name: str, visited : dict) -> bool: if isinstance(pe, Ref): if pe.name == name: return True if not pe.name in visited: visited[pe.name] = True return isRec(pe.deref(), name, visited) if hasattr(pe, 'inner'): return isRec(pe.inner, name, visited) if hasattr(pe, 'left'): res = isRec(pe.left, name, visited) return res if res else isRec(pe.right, name, visited) return False def checkRec(pe: ParsingExpression, name: str, visited : dict) -> bool: if hasattr(pe, 'left'): if isinstance(pe, Seq): return checkRec(pe.left, name, visited) and checkRec(pe.right, name, visited) else: #Ore, Alt c0 = checkRec(pe.left, name, visited) c1 = checkRec(pe.right, name, visited) return c0 or c1 if hasattr(pe, 'inner'): rec = checkRec(pe.inner, name, visited) return True if isinstance(pe, Not) or isinstance(pe, Many) or isinstance(pe, And) else rec if isinstance(pe, Ref): if pe.name == name: print("left recursion") if not pe.name in visited: visited[pe.name] = True checkRec(pe.deref(), name, visited) return not pe.prop().isConsumed() return isinstance(pe, Empty) # False if (Char,Range,Any) def isAlwaysConsumed(pe: ParsingExpression): if not hasattr(pe, 'cc'): @match(Char, Any, Range, 'cc') def consumed(pe): return True @match(Many, Not, And, Empty, 'cc') def consumed(pe): return False @match(Many1, LinkAs, TreeAs, FoldAs, Detree, Meta, 'cc') def unary(pe): return isAlwaysConsumed(pe.inner) @match(Seq, 'cc') def seq(pe): if not isAlwaysConsumed(pe.left): return False return isAlwaysConsumed(pe.right) @match(Ore, Alt, 'cc') def ore(pe): return isAlwaysConsumed(pe.left) and isAlwaysConsumed(pe.right) @match(Ref, 'cc') def memo(pe: Ref): if not pe.isNonTerminal(): return True key = 'null' + pe.name memoed = pe.getmemo('null') if memoed == None: pe.setmemo('null', True) memoed = isAlwaysConsumed(pe.deref()) pe.setmemo('null', memoed) return memoed return pe.cc() ## TreeState TUnit = 0 TTree = 1 TMut = 2 TFold = 3 def treeState(pe): if not hasattr(pe, 'ts'): @match(Char, Any, Range, Not, Detree, 'ts') def stateUnit(pe): return TUnit @match(TreeAs, 'ts') def stateTree(pe): return TTree @match(LinkAs, 'ts') def stateMut(pe): return TMut @match(FoldAs, 'ts') def stateFold(pe): return TFold @match(Seq, 'ts') def stateSeq(pe): ts0 = treeState(pe.left) return ts0 if ts0 != TUnit else treeState(pe.right) @match(Ore, Alt, 'ts') def stateAlt(pe): ts0 = treeState(pe.left) if ts0 != TUnit: return ts0 ts1 = treeState(pe.right) return TMut if ts1 == TTree else ts1 @match(Many, Many1, And, 'ts') def stateAlt(pe): ts0 = treeState(pe.inner) return TMut if ts0 == TTree else ts0 @match(Ref, 'ts') def memo(pe: Ref): if not pe.isNonTerminal(): return TUnit memoed = pe.getmemo('ts') if memoed == None: pe.setmemo('ts', TUnit) memoed = treeState(pe.deref()) pe.setmemo('ts', memoed) return memoed return pe.ts() def treeCheck(pe, ts): if not hasattr(pe, 'tc'): @match(ParsingExpression, 'tc') def checkEmpty(pe, ts): return pe @match(TreeAs, 'tc') def checkTree(pe, ts): if ts == TUnit: return treeCheck(pe.inner, TUnit) if ts == TTree: pe.inner = treeCheck(pe.inner, TMut) return pe if ts == TMut: pe.inner = treeCheck(pe.inner, TMut) return LinkAs('', pe) if ts == TFold: pe.inner = treeCheck(pe.inner, TMut) return FoldAs('', pe.tag, pe.inner) @match(LinkAs, 'tc') def checkLink(pe, ts): if ts == TUnit or ts == TFold: return treeCheck(pe.inner, TUnit) if ts == TTree: return treeCheck(pe.inner, TTree) if ts == TMut: ts0 = treeState(pe.inner) if ts0 == TUnit or ts0 == TFold: pe.inner = TreeAs('', treeCheck(pe.inner, TUnit)) if ts0 == TTree: pe.inner = treeCheck(pe.inner, TTree) if ts0 == TMut: pe.inner = TreeAs('', treeCheck(pe.inner, TMut)) return pe @match(FoldAs, 'tc') def checkFold(pe, ts): if ts == TUnit: return treeCheck(pe.inner, TUnit) if ts == TTree: pe.inner = treeCheck(pe.inner, TMut) return TreeAs(pe.tag, pe.inner) if ts == TMut: pe.inner = treeCheck(pe.inner, TMut) return LinkAs(pe.ltag, pe.inner) if ts == TFold: pe.inner = treeCheck(pe.inner, TMut) return pe @match(Seq, 'tc') def checkSeq(pe, ts): if ts == TUnit or ts == TMut or ts == TFold: pe.left = treeCheck(pe.left, ts) pe.right = treeCheck(pe.right, ts) return pe ts0 = treeState(pe.left) if ts0 == TUnit: pe.left = treeCheck(pe.left, TUnit) pe.right = treeCheck(pe.right, ts) return pe if ts0 == TTree: pe.left = treeCheck(pe.left, TTree) pe.right = treeCheck(pe.right, TFold) return pe @match(Ore, Alt, 'tc') def checkAlt(pe, ts): pe.left = treeCheck(pe.left, ts) pe.right = treeCheck(pe.right, ts) return pe @match(Many, Many1, 'tc') def checkMany(pe, ts): if ts == TUnit: pe.inner = treeCheck(pe.inner, TUnit) return pe if ts == TTree: pe.inner = treeCheck(pe.inner, TUnit) return TreeAs('', pe) if ts == TMut: ts0 = treeState(pe.inner) if ts0 == TUnit or ts0 == TFold: pe.inner = treeCheck(pe.inner, TUnit) if ts0 == TTree or ts0 == TMut: pe.inner = treeCheck(pe.inner, TMut) return pe if ts == TFold: pe.inner = treeCheck(pe.inner, TFold) return pe @match(Ref, 'tc') def checkRef(pe: Ref, ts): if not pe.isNonTerminal(): return pe ts0 = treeState(pe) if ts == ts0: return pe if ts == TUnit: Detree(pe) if ts == TTree: if ts0 == TUnit or ts0 == TMut: return TreeAs('', pe) if ts0 == TFold: return seq(TreeAs('', EMPTY), pe) if ts == TMut: if ts0 == TUnit: return pe if ts0 == TTree: return LinkAs('', pe) if ts0 == TFold: return LinkAs('', seq(TreeAs('', EMPTY), pe)) if ts == TFold: if ts0 == TUnit: return pe if ts0 == TTree: return FoldAs('', '', pe) if ts0 == TMut: return FoldAs('', '', TreeAs('', pe)) return pe.tc(ts) def testRules(g: PEG): for name in dir(g): if not name[0].isupper(): continue p = getattr(g, name) p.checkRule() ## TPEG def TPEGGrammar(g = None): if g == None: g = PEG('tpeg') # Preliminary __ = N % '__' _ = N % '_' EOS = N % 'EOS' g.Start = N%'__ Source EOF' g.EOF = ~ANY g.EOL = pe('\n') | pe('\r\n') | N%'EOF' g.COMMENT = '/*' & (~pe('*/') & ANY)* 0 & '*/' | '//' & (~(N%'EOL') & ANY)* 0 g._ = (Range(' \t') | N%'COMMENT')* 0 g.__ = (Range(' \t\r\n') | N%'COMMENT')* 0 g.S = Range(' \t') g.Source = TreeAs('Source', (N%'$Statement')*0) "EOS = _ (';' _ / EOL (S/COMMENT) _ / EOL )*" g.EOS = N%'_' & (';' & N%'_' | N%'EOL' & (N%'S' | N%'COMMENT') & N%'_' | N%'EOL')* 0 g.Statement = N%'Example/Production' g.Production = TreeAs('Production', N%'$Identifier __' & '=' & __ & (Range('/|') & __ |0) & N%'$Expression') & EOS g.Name = TreeAs('Name', N%'NAME') g.NAME = '"' & (pe(r'\"') | ~Range('\\"\n') & ANY)*0 & '"' | (~Range(' \t\r\n(,){};<>[|/*+?=^\'`') & ANY)+0 g.Example = TreeAs('Example', 'example' & N%'S _ $Names $Doc') & EOS g.Names = TreeAs('', N%'$Identifier _' & (Range(',&') & N%'_ $Identifier _')*0) Doc1 = TreeAs("Doc", (~(N%'DELIM EOL') & ANY)* 0) Doc2 = TreeAs("Doc", (~Range('\r\n') & ANY)*0) g.Doc = N%'DELIM' & (N%'S'*0) & N%'EOL' & Doc1 & N % 'DELIM' | Doc2 g.DELIM = pe("'''") g.Expression = N%'Choice' ^ (TreeAs('Alt', __ & '|' & _ & N%'$Expression')|0) g.Choice = N%'Sequence' ^ (TreeAs('Or', __ & '/' & _ & N%'$Choice')|0) g.SS = N%'S _' & ~(N%'EOL') | (N%'_ EOL')+0 & N%'S _' g.Sequence = N%'Predicate' ^ (TreeAs('Seq', N%'SS $Sequence')|0) g.Predicate = TreeAs('Not', '!' & N%'$Predicate') | TreeAs('And', '&' & N%'$Predicate') | TreeAs('Append', '$' & N%'_ $Predicate') | N%'Suffix' g.Suffix = N%'Term' ^ (TreeAs('Many', '*') | TreeAs('OneMore', '+') | TreeAs('Option', '?') | 0) g.Term = N%'Group/Char/Class/Any/Tree/Fold/BindFold/Bind/Func/Ref' g.Group = '(' & __ & N%'Expression/Empty' & __ & ')' g.Empty = TreeAs('Empty', EMPTY) g.Any = TreeAs('Any', '.') g.Char = "'" & TreeAs('Char', (r'\\' & ANY | ~Range("'\n") & ANY)*0) & "'" g.Class = '[' & TreeAs('Class', (r'\\' & ANY | ~Range("]") & ANY)*0) & ']' g.Tree = TreeAs('Tree', N%'Tag __' & (N%'$Expression __' | N%'$Empty') & '}' ) g.Fold = '^' & _ & TreeAs('Fold', N%'Tag __' & (N%'$Expression __' | N%'$Empty') & '}' ) g.Tag = (N%'$Identifier'|0) & '{' g.Identifier = TreeAs('Name', Range('A-Z', 'a-z', '@') & Range('A-Z', 'a-z', '0-9', '_.')*0) g.Bind = TreeAs('Bind', N%'$Var _' & '=>' & N%'_ $Expression') g.BindFold = TreeAs('Fold', N%'$Var _' & '^' & _ & N%'Tag __' & (N%'$Expression __' | N%'$Empty') & '}') g.Var = TreeAs('Name', Range('a-z', '$') & Range('A-Z', 'a-z', '0-9', '_')*0) g.Func = TreeAs('Func', N%'$Identifier' & '(' & (N%'$Expression _' & ',' & __)* 0 & N%'$Expression _' & ')') g.Ref = N%'Name' # Example g.example("Name", "abc") g.example("Name", '"abc"') g.example("COMMENT", "/*hoge*/hoge", "[# '/*hoge*/']") g.example("COMMENT", "//hoge\nhoge", "[# '//hoge']") g.example("Ref,Term,Expression", "a", "[#Name 'a']") g.example("Char,Expression", "''", "[#Char '']") g.example("Char,Expression", "'a'", "[#Char 'a']") g.example("Name,Expression", "\"a\"", "[#Name '\"a\"']") g.example("Class,Expression", "[a]", "[#Class 'a']") g.example("Func", "f(a)", "[#Func [#Name 'a'] [#Name 'f']]") g.example("Func", "f(a,b)", "[#Func [#Name 'b'] [#Name 'a'] [#Name 'f']]") g.example("Predicate,Expression", "&a", "[#And [#Name 'a']]") g.example("Predicate,Expression", "!a", "[#Not [#Name 'a']]") g.example("Suffix,Expression", "a?", "[#Option [#Name 'a']]") g.example("Suffix,Expression", "a*", "[#Many [#Name 'a']]") g.example("Suffix,Expression", "a+", "[#OneMore [#Name 'a']]") g.example("Expression", "{}", "[#Tree [#Empty '']]") g.example("Expression", "{ a }", "[#Tree [#Name 'a']]") g.example("Expression", "{ }", "[#Tree [#Empty '']]") g.example("Expression", "()", "[#Empty '']") g.example("Expression", "&'a'", "[#And [#Char 'a']]") g.example("Expression", "{a}", "[#Tree [#Name 'a']]") g.example("Expression", "Int{a}", "[#Tree [#Name 'a'] [#Name 'Int']]") g.example("Expression", "^{a}", "[#Fold [#Name 'a']]") g.example("Expression", "^Int{a}", "[#Fold [#Name 'a'] [#Name 'Int']]") g.example("Expression", "name^{a}", "[#Fold [#Name 'a'] [#Name 'name']]") g.example("Expression", "name^Int{a}", "[#Fold [#Name 'a'] [#Name 'Int'] [#Name 'name']]") g.example("Expression", "$a", "[#Append [#Name 'a']]") g.example("Expression", "name=>a", "[#Bind [#Name 'a'] [#Name 'name']]") g.example("Expression", "name => a", "[#Bind [#Name 'a'] [#Name 'name']]") g.example("Expression", "a a", "[#Seq [#Name 'a'] [#Name 'a']]") g.example("Expression", "a b c", "[#Seq [#Seq [#Name 'c'] [#Name 'b']] [#Name 'a']]") g.example("Expression", "a/b / c", "[#Or [#Or [#Name 'c'] [#Name 'b']] [#Name 'a']]") g.example("Statement", "A=a", "[#Production [#Name 'a'] [#Name 'A']]") g.example("Statement", "example A,B abc \n", "[#Example [#Doc 'abc '] [# [#Name 'B'] [#Name 'A']]]") g.example("Statement", "A = a\n b", "[#Production [#Seq [#Name 'b'] [#Name 'a']] [#Name 'A']]") g.example("Start", "A = a; B = b;;", "[#Source [#Production [#Name 'b'] [#Name 'B']] [#Production [#Name 'a'] [#Name 'A']]]") g.example("Start", "A = a\nB = b", "[#Source [#Production [#Name 'b'] [#Name 'B']] [#Production [#Name 'a'] [#Name 'A']]]") g.example("Start", "A = a //hoge\nB = b", "[#Source [#Production [#Name 'b'] [#Name 'B']] [#Production [#Name 'a'] [#Name 'A']]]") return g ''' class TreeConv(object): def parse(self, t:ParseTree): f = getattr(self, t.tag) return f(t) class TPEGConv(TreeConv): def __init__(self, peg:PEG): self.peg = peg def load(self, path): self.peg = PEG(path) f = open(path, 'r') data = f.read() f.close() return self.peg def Source(self,t:ParseTree): for stmt in t.asArray(): self.parse(stmt) def Example(self, t:ParseTree): names, input = t.asArray() for name in names: self.peg.example(name.asString(), input.asString()) def Production(self, t:ParseTree): name, expr = t.asArray() setattr(self.peg, name.asString(), self.parse(expr)) def Name(self, t:ParseTree): return Ref(t.asString()) def Char(self, t:ParseTree): return pe(t.asString()) def Class(self, t:ParseTree): return pe(t.asString()) def Any(self, t:ParseTree): return ANY def Or(self,t:ParseTree): return lor(list(map(lambda x: self.parse(x), t.asArray()))) def Seq(self,t:ParseTree): return lseq(list(map(lambda x: self.parse(x), t.asArray()))) def Many(self,t:ParseTree): return Many(self.parse(t[0])) def Many1(self,t:ParseTree): return Many1(self.parse(t[0])) def Option(self,t:ParseTree): return Ore(self.parse(t[0]), EMPTY) def And(self,t:ParseTree): return And(self.parse(t[0])) def Not(self,t:ParseTree): return Not(self.parse(t[0])) def Append(self,t:ParseTree): return LinkAs('', self.parse(t[0])) def Tree(self,t:ParseTree): if len(t) == 2: return TreeAs(t[0].asString(), self.parse(t[1])) return TreeAs('', self.parse(t[0])) def Link(self,t:ParseTree): if len(t) == 2: return LinkAs(t[0].asString(), self.parse(t[1])) return LinkAs('', self.parse(t[0])) def Fold(self,t:ParseTree): if len(t) == 3: return FoldAs(t[0].asString(), t[1].asString(), self.parse(t[3])) if len(t) == 2: return FoldAs('', t[0].asString(), self.parse(t[1])) return FoldAs('', '', self.parse(t[0])) def unquote(self, s): sb = [] while len(s) > 0: if s.startswith('\\') and len(s) > 1: s = self.unesc(s, sb) else: sb.append(s[0]) s = s[1:] return ''.join(sb) '''
class Parsingexpression(object): def __repr__(self): return self.__str__() def __or__(self, right): return ore(self, pe(right)) def __and__(self, right): return seq(self, pe(right)) def __xor__(self, right): return seq(self, lfold('', pe(right))) def __rand__(self, left): return seq(pe(left), self) def __add__(self, right): return seq(many1(self), pe(right)) def __mul__(self, right): return seq(many(self), pe(right)) def __truediv__(self, right): return ore(self, pe(right)) def __invert__(self): return not(self) def __neq__(self): return not(self) def __pos__(self): return and(self) def setg(self, peg): if hasattr(self, 'inner'): self.inner.setg(peg) if hasattr(self, 'left'): self.left.setg(peg) self.right.setg(peg) class Empty(ParsingExpression): def __str__(self): return "''" empty = empty() class Char(ParsingExpression): __slots__ = ['a'] def __init__(self, a): self.a = a def __str__(self): return "'" + quote_str(self.a) + "'" class Range(ParsingExpression): __slots__ = ['chars', 'ranges'] def __init__(self, *ss): chars = [] ranges = [] for s in ss: if len(s) == 3 and s[1] is '-': ranges.append((s[0], s[2])) else: for c in s: chars.append(c) self.chars = tuple(chars) self.ranges = tuple(ranges) def __str__(self): l = tuple(map(lambda x: quote_str(x[0], ']') + '-' + quote_str(x[1], ']'), self.ranges)) return '[' + ''.join(l) + quote_str(self.chars, ']') + ']' class Any(ParsingExpression): def __str__(self): return '.' any = any() class Ref(ParsingExpression): __slots__ = ['peg', 'name'] def __init__(self, name, peg=None): self.name = name self.peg = peg def __str__(self): return str(self.name) def setg(self, peg): self.peg = peg def is_non_terminal(self): return hasattr(self.peg, self.name) def deref(self): return getattr(self.peg, self.name).inner def prop(self): return getattr(self.peg, self.name) def getmemo(self, prefix): return self.peg.getmemo(prefix + self.name) def setmemo(self, prefix, value): return self.peg.setmemo(prefix + self.name, value) class Seq(ParsingExpression): __slots__ = ['left', 'right'] def __init__(self, left, right): self.left = pe(left) self.right = pe(right) def __str__(self): return quote_pe(self.left, inSeq) + ' ' + quote_pe(self.right, inSeq) def flatten(self, ls): if isinstance(self.left, Seq): self.left.flatten(ls) else: ls.append(self.left) if isinstance(self.right, Seq): self.right.flatten(ls) else: ls.append(self.right) return ls class Ore(ParsingExpression): __slots__ = ['left', 'right'] def __init__(self, left, right): self.left = pe(left) self.right = pe(right) def __str__(self): if self.right == EMPTY: return quote_pe(self.left, inUnary) + '?' return str(self.left) + ' / ' + str(self.right) def flatten(self, ls): if isinstance(self.left, Ore): self.left.flatten(ls) else: ls.append(self.left) if isinstance(self.right, Ore): self.right.flatten(ls) else: ls.append(self.right) return ls class Alt(ParsingExpression): __slots__ = ['left', 'right'] def __init__(self, left, right): self.left = pe(left) self.right = pe(right) def __str__(self): return str(self.left) + ' | ' + str(self.right) def flatten(self, ls): if isinstance(self.left, Alt): self.left.flatten(ls) else: ls.append(self.left) if isinstance(self.right, Alt): self.right.flatten(ls) else: ls.append(self.right) return ls class And(ParsingExpression): __slots__ = ['inner'] def __init__(self, inner): self.inner = pe(inner) def __str__(self): return '&' + quote_pe(self.inner, inUnary) class Not(ParsingExpression): __slots__ = ['inner'] def __init__(self, inner): self.inner = pe(inner) def __str__(self): return '!' + quote_pe(self.inner, inUnary) class Many(ParsingExpression): __slots__ = ['inner'] def __init__(self, inner): self.inner = pe(inner) def __str__(self): return quote_pe(self.inner, inUnary) + '*' class Many1(ParsingExpression): __slots__ = ['inner'] def __init__(self, inner): self.inner = pe(inner) def __str__(self): return quote_pe(self.inner, inUnary) + '+' def quote_pe(e, f): return '(' + str(e) + ')' if f(e) else str(e) def in_seq(e): return isinstance(e, Ore) or isinstance(e, Alt) def in_unary(e): return isinstance(e, Ore) and e.right != EMPTY or isinstance(e, Seq) or isinstance(e, Alt) def quote_str(e, esc="'"): sb = [] for c in e: if c == '\n': sb.append('\\n') elif c == '\t': sb.append('\\t') elif c == '\\': sb.append('\\\\') elif c == '\r': sb.append('\\r') elif c in esc: sb.append('\\' + c) else: sb.append(c) return ''.join(sb) def pe(x): if x == 0: return EMPTY if isinstance(x, str): if len(x) == 0: return EMPTY return char(x) return x def ref(name): if name.find('/') != -1: return lor(list(map(ref, name.split('/')))) if name.find(' ') != -1: return lseq(list(map(ref, name.split(' ')))) if name.startswith('$'): return link_as('', ref(name[1:])) return ref(name) def seq(x, y): if isinstance(y, Empty): return x return seq(x, y) def lseq(ls): if len(ls) > 1: return seq(ls[0], lseq(ls[1:])) if len(ls) == 1: return ls[0] return EMPTY def lor(ls): if len(ls) > 1: return ore(ls[0], lor(ls[1:])) if len(ls) == 1: return ls[0] return EMPTY def lfold(ltag, e): if isinstance(e, Many) and isinstance(e.inner, TreeAs): return many(lfold(ltag, e.inner)) if isinstance(e, Many1) and isinstance(e.inner, TreeAs): return many1(lfold(ltag, e.inner)) if isinstance(e, Ore): return ore(lfold(ltag, e.left), lfold(ltag, e.right)) if isinstance(e, TreeAs): return fold_as(ltag, e.tag, pe(e.inner)) return e class Treeas(ParsingExpression): __slots__ = ['tag', 'inner'] def __init__(self, tag, inner): self.tag = tag self.inner = pe(inner) def __str__(self): return self.tag + '{ ' + str(self.inner) + ' }' class Linkas(ParsingExpression): __slots__ = ['tag', 'inner'] def __init__(self, tag, inner=None): self.tag = tag self.inner = pe(inner) def __str__(self): if self.tag == '': return '$' + quote_pe(self.inner, inUnary) return '(' + self.tag + '=>' + str(self.inner) + ')' def __le__(self, right): return link_as(self.tag, right) def __ge__(self, right): return link_as(self.tag, right) def __mod__(self, right): return ref(right) def __xor__(self, right): return lfold(self.tag, pe(right)) n = link_as('') class Foldas(ParsingExpression): __slots__ = ['ltag', 'tag', 'inner'] def __init__(self, ltag, tag, inner): self.inner = pe(inner) self.ltag = ltag self.tag = tag def __str__(self): return self.ltag + '^' + self.tag + '{ ' + str(self.inner) + ' }' class Detree(ParsingExpression): __slots__ = ['inner'] def __init__(self, inner): self.inner = pe(inner) def __str__(self): return '@unit(' + str(self.inner) + ')' "\n@if(Bool)\n@symbol(Indent)\n@match(Indent)\n@exists(Indent, 'hoge')\n" class Meta(ParsingExpression): __slots__ = ['tag', 'inner', 'opt'] def __init__(self, tag, inner, opt=None): self.tag = tag self.inner = pe(inner) self.opt = opt def __str__(self): arg = ', ' + repr(self.opt) if self.opt != None else '' return self.tag + '(' + str(self.inner) + arg + ')' "\nclass ParserContext:\n __slots__ = ['inputs', 'pos', 'headpos', 'ast']\n def __init__(self, inputs, pos = 0):\n self.inputs = inputs\n self.pos = pos\n self.headpos = pos\n self.ast = None\n" class Rule(object): def __init__(self, name, inner): self.name = name self.inner = pe(inner) self.checked = False def __str__(self): return str(self.inner) def is_consumed(self): if not hasattr(self, 'nonnull'): self.nonnull = is_always_consumed(self.inner) return self.nonnull def tree_state(self): if not hasattr(self, 'ts'): self.ts = tree_state(self.inner) return self.ts def check_rule(self): if not self.checked: s0 = str(self.inner) if is_rec(self.inner, self.name, {}): check_rec(self.inner, self.name, {}) ts = tree_state(self.inner) ts = tree_check(self.inner, ts) s1 = str(self.inner) if s0 != s1: print(self.name, s0, s1) class Peg(object): def __init__(self, ns=None): self.ns77 = ns self.memo77 = {} self.example77 = [] def __getitem__(self, item): return getattr(self, item, None) def __setattr__(self, key, value): if isinstance(value, ParsingExpression): value.setg(self) if not isinstance(value, Rule): value = rule(key, value) super().__setattr__(key, value) print(key, '=', value) if not hasattr(self, 'start'): setattr(self, 'start', value) else: super().__setattr__(key, value) def ns(self): return self.ns77 def hasmemo(self, key): return key in self.memo77 def getmemo(self, key): return self.memo77[key] if key in self.memo77 else None def setmemo(self, key, value): self.memo77[key] = value def example(self, prod, input, output=None): for name in prod.split(','): self.example77.append((name, input, output)) def test_all(self, combinator): p = {} test = 0 ok = 0 for testcase in self.example77: (name, input, output) = testcase if not name in p: p[name] = combinator(self, name) res = p[name](input) t = str(res).replace(" b'", " '") if output == None: print(name, input, '=>', t) else: test += 1 if t == output: print('OK', name, input) ok += 1 else: print('NG', name, input, output, '!=', t) if test > 0: print('OK', ok, 'FAIL', test - ok, ok / test * 100.0, '%') def match(*ctags): def _match(func): name = ctags[-1] for ctag in ctags[:-1]: setattr(ctag, name, func) return func return _match def is_rec(pe: ParsingExpression, name: str, visited: dict) -> bool: if isinstance(pe, Ref): if pe.name == name: return True if not pe.name in visited: visited[pe.name] = True return is_rec(pe.deref(), name, visited) if hasattr(pe, 'inner'): return is_rec(pe.inner, name, visited) if hasattr(pe, 'left'): res = is_rec(pe.left, name, visited) return res if res else is_rec(pe.right, name, visited) return False def check_rec(pe: ParsingExpression, name: str, visited: dict) -> bool: if hasattr(pe, 'left'): if isinstance(pe, Seq): return check_rec(pe.left, name, visited) and check_rec(pe.right, name, visited) else: c0 = check_rec(pe.left, name, visited) c1 = check_rec(pe.right, name, visited) return c0 or c1 if hasattr(pe, 'inner'): rec = check_rec(pe.inner, name, visited) return True if isinstance(pe, Not) or isinstance(pe, Many) or isinstance(pe, And) else rec if isinstance(pe, Ref): if pe.name == name: print('left recursion') if not pe.name in visited: visited[pe.name] = True check_rec(pe.deref(), name, visited) return not pe.prop().isConsumed() return isinstance(pe, Empty) def is_always_consumed(pe: ParsingExpression): if not hasattr(pe, 'cc'): @match(Char, Any, Range, 'cc') def consumed(pe): return True @match(Many, Not, And, Empty, 'cc') def consumed(pe): return False @match(Many1, LinkAs, TreeAs, FoldAs, Detree, Meta, 'cc') def unary(pe): return is_always_consumed(pe.inner) @match(Seq, 'cc') def seq(pe): if not is_always_consumed(pe.left): return False return is_always_consumed(pe.right) @match(Ore, Alt, 'cc') def ore(pe): return is_always_consumed(pe.left) and is_always_consumed(pe.right) @match(Ref, 'cc') def memo(pe: Ref): if not pe.isNonTerminal(): return True key = 'null' + pe.name memoed = pe.getmemo('null') if memoed == None: pe.setmemo('null', True) memoed = is_always_consumed(pe.deref()) pe.setmemo('null', memoed) return memoed return pe.cc() t_unit = 0 t_tree = 1 t_mut = 2 t_fold = 3 def tree_state(pe): if not hasattr(pe, 'ts'): @match(Char, Any, Range, Not, Detree, 'ts') def state_unit(pe): return TUnit @match(TreeAs, 'ts') def state_tree(pe): return TTree @match(LinkAs, 'ts') def state_mut(pe): return TMut @match(FoldAs, 'ts') def state_fold(pe): return TFold @match(Seq, 'ts') def state_seq(pe): ts0 = tree_state(pe.left) return ts0 if ts0 != TUnit else tree_state(pe.right) @match(Ore, Alt, 'ts') def state_alt(pe): ts0 = tree_state(pe.left) if ts0 != TUnit: return ts0 ts1 = tree_state(pe.right) return TMut if ts1 == TTree else ts1 @match(Many, Many1, And, 'ts') def state_alt(pe): ts0 = tree_state(pe.inner) return TMut if ts0 == TTree else ts0 @match(Ref, 'ts') def memo(pe: Ref): if not pe.isNonTerminal(): return TUnit memoed = pe.getmemo('ts') if memoed == None: pe.setmemo('ts', TUnit) memoed = tree_state(pe.deref()) pe.setmemo('ts', memoed) return memoed return pe.ts() def tree_check(pe, ts): if not hasattr(pe, 'tc'): @match(ParsingExpression, 'tc') def check_empty(pe, ts): return pe @match(TreeAs, 'tc') def check_tree(pe, ts): if ts == TUnit: return tree_check(pe.inner, TUnit) if ts == TTree: pe.inner = tree_check(pe.inner, TMut) return pe if ts == TMut: pe.inner = tree_check(pe.inner, TMut) return link_as('', pe) if ts == TFold: pe.inner = tree_check(pe.inner, TMut) return fold_as('', pe.tag, pe.inner) @match(LinkAs, 'tc') def check_link(pe, ts): if ts == TUnit or ts == TFold: return tree_check(pe.inner, TUnit) if ts == TTree: return tree_check(pe.inner, TTree) if ts == TMut: ts0 = tree_state(pe.inner) if ts0 == TUnit or ts0 == TFold: pe.inner = tree_as('', tree_check(pe.inner, TUnit)) if ts0 == TTree: pe.inner = tree_check(pe.inner, TTree) if ts0 == TMut: pe.inner = tree_as('', tree_check(pe.inner, TMut)) return pe @match(FoldAs, 'tc') def check_fold(pe, ts): if ts == TUnit: return tree_check(pe.inner, TUnit) if ts == TTree: pe.inner = tree_check(pe.inner, TMut) return tree_as(pe.tag, pe.inner) if ts == TMut: pe.inner = tree_check(pe.inner, TMut) return link_as(pe.ltag, pe.inner) if ts == TFold: pe.inner = tree_check(pe.inner, TMut) return pe @match(Seq, 'tc') def check_seq(pe, ts): if ts == TUnit or ts == TMut or ts == TFold: pe.left = tree_check(pe.left, ts) pe.right = tree_check(pe.right, ts) return pe ts0 = tree_state(pe.left) if ts0 == TUnit: pe.left = tree_check(pe.left, TUnit) pe.right = tree_check(pe.right, ts) return pe if ts0 == TTree: pe.left = tree_check(pe.left, TTree) pe.right = tree_check(pe.right, TFold) return pe @match(Ore, Alt, 'tc') def check_alt(pe, ts): pe.left = tree_check(pe.left, ts) pe.right = tree_check(pe.right, ts) return pe @match(Many, Many1, 'tc') def check_many(pe, ts): if ts == TUnit: pe.inner = tree_check(pe.inner, TUnit) return pe if ts == TTree: pe.inner = tree_check(pe.inner, TUnit) return tree_as('', pe) if ts == TMut: ts0 = tree_state(pe.inner) if ts0 == TUnit or ts0 == TFold: pe.inner = tree_check(pe.inner, TUnit) if ts0 == TTree or ts0 == TMut: pe.inner = tree_check(pe.inner, TMut) return pe if ts == TFold: pe.inner = tree_check(pe.inner, TFold) return pe @match(Ref, 'tc') def check_ref(pe: Ref, ts): if not pe.isNonTerminal(): return pe ts0 = tree_state(pe) if ts == ts0: return pe if ts == TUnit: detree(pe) if ts == TTree: if ts0 == TUnit or ts0 == TMut: return tree_as('', pe) if ts0 == TFold: return seq(tree_as('', EMPTY), pe) if ts == TMut: if ts0 == TUnit: return pe if ts0 == TTree: return link_as('', pe) if ts0 == TFold: return link_as('', seq(tree_as('', EMPTY), pe)) if ts == TFold: if ts0 == TUnit: return pe if ts0 == TTree: return fold_as('', '', pe) if ts0 == TMut: return fold_as('', '', tree_as('', pe)) return pe.tc(ts) def test_rules(g: PEG): for name in dir(g): if not name[0].isupper(): continue p = getattr(g, name) p.checkRule() def tpeg_grammar(g=None): if g == None: g = peg('tpeg') __ = N % '__' _ = N % '_' eos = N % 'EOS' g.Start = N % '__ Source EOF' g.EOF = ~ANY g.EOL = pe('\n') | pe('\r\n') | N % 'EOF' g.COMMENT = '/*' & (~pe('*/') & ANY) * 0 & '*/' | '//' & (~(N % 'EOL') & ANY) * 0 g._ = (range(' \t') | N % 'COMMENT') * 0 g.__ = (range(' \t\r\n') | N % 'COMMENT') * 0 g.S = range(' \t') g.Source = tree_as('Source', N % '$Statement' * 0) "EOS = _ (';' _ / EOL (S/COMMENT) _ / EOL )*" g.EOS = N % '_' & (';' & N % '_' | N % 'EOL' & (N % 'S' | N % 'COMMENT') & N % '_' | N % 'EOL') * 0 g.Statement = N % 'Example/Production' g.Production = tree_as('Production', N % '$Identifier __' & '=' & __ & (range('/|') & __ | 0) & N % '$Expression') & EOS g.Name = tree_as('Name', N % 'NAME') g.NAME = '"' & (pe('\\"') | ~range('\\"\n') & ANY) * 0 & '"' | (~range(" \t\r\n(,){};<>[|/*+?=^'`") & ANY) + 0 g.Example = tree_as('Example', 'example' & N % 'S _ $Names $Doc') & EOS g.Names = tree_as('', N % '$Identifier _' & (range(',&') & N % '_ $Identifier _') * 0) doc1 = tree_as('Doc', (~(N % 'DELIM EOL') & ANY) * 0) doc2 = tree_as('Doc', (~range('\r\n') & ANY) * 0) g.Doc = N % 'DELIM' & N % 'S' * 0 & N % 'EOL' & Doc1 & N % 'DELIM' | Doc2 g.DELIM = pe("'''") g.Expression = N % 'Choice' ^ (tree_as('Alt', __ & '|' & _ & N % '$Expression') | 0) g.Choice = N % 'Sequence' ^ (tree_as('Or', __ & '/' & _ & N % '$Choice') | 0) g.SS = N % 'S _' & ~(N % 'EOL') | N % '_ EOL' + 0 & N % 'S _' g.Sequence = N % 'Predicate' ^ (tree_as('Seq', N % 'SS $Sequence') | 0) g.Predicate = tree_as('Not', '!' & N % '$Predicate') | tree_as('And', '&' & N % '$Predicate') | tree_as('Append', '$' & N % '_ $Predicate') | N % 'Suffix' g.Suffix = N % 'Term' ^ (tree_as('Many', '*') | tree_as('OneMore', '+') | tree_as('Option', '?') | 0) g.Term = N % 'Group/Char/Class/Any/Tree/Fold/BindFold/Bind/Func/Ref' g.Group = '(' & __ & N % 'Expression/Empty' & __ & ')' g.Empty = tree_as('Empty', EMPTY) g.Any = tree_as('Any', '.') g.Char = "'" & tree_as('Char', ('\\\\' & ANY | ~range("'\n") & ANY) * 0) & "'" g.Class = '[' & tree_as('Class', ('\\\\' & ANY | ~range(']') & ANY) * 0) & ']' g.Tree = tree_as('Tree', N % 'Tag __' & (N % '$Expression __' | N % '$Empty') & '}') g.Fold = '^' & _ & tree_as('Fold', N % 'Tag __' & (N % '$Expression __' | N % '$Empty') & '}') g.Tag = (N % '$Identifier' | 0) & '{' g.Identifier = tree_as('Name', range('A-Z', 'a-z', '@') & range('A-Z', 'a-z', '0-9', '_.') * 0) g.Bind = tree_as('Bind', N % '$Var _' & '=>' & N % '_ $Expression') g.BindFold = tree_as('Fold', N % '$Var _' & '^' & _ & N % 'Tag __' & (N % '$Expression __' | N % '$Empty') & '}') g.Var = tree_as('Name', range('a-z', '$') & range('A-Z', 'a-z', '0-9', '_') * 0) g.Func = tree_as('Func', N % '$Identifier' & '(' & (N % '$Expression _' & ',' & __) * 0 & N % '$Expression _' & ')') g.Ref = N % 'Name' g.example('Name', 'abc') g.example('Name', '"abc"') g.example('COMMENT', '/*hoge*/hoge', "[# '/*hoge*/']") g.example('COMMENT', '//hoge\nhoge', "[# '//hoge']") g.example('Ref,Term,Expression', 'a', "[#Name 'a']") g.example('Char,Expression', "''", "[#Char '']") g.example('Char,Expression', "'a'", "[#Char 'a']") g.example('Name,Expression', '"a"', '[#Name \'"a"\']') g.example('Class,Expression', '[a]', "[#Class 'a']") g.example('Func', 'f(a)', "[#Func [#Name 'a'] [#Name 'f']]") g.example('Func', 'f(a,b)', "[#Func [#Name 'b'] [#Name 'a'] [#Name 'f']]") g.example('Predicate,Expression', '&a', "[#And [#Name 'a']]") g.example('Predicate,Expression', '!a', "[#Not [#Name 'a']]") g.example('Suffix,Expression', 'a?', "[#Option [#Name 'a']]") g.example('Suffix,Expression', 'a*', "[#Many [#Name 'a']]") g.example('Suffix,Expression', 'a+', "[#OneMore [#Name 'a']]") g.example('Expression', '{}', "[#Tree [#Empty '']]") g.example('Expression', '{ a }', "[#Tree [#Name 'a']]") g.example('Expression', '{ }', "[#Tree [#Empty '']]") g.example('Expression', '()', "[#Empty '']") g.example('Expression', "&'a'", "[#And [#Char 'a']]") g.example('Expression', '{a}', "[#Tree [#Name 'a']]") g.example('Expression', 'Int{a}', "[#Tree [#Name 'a'] [#Name 'Int']]") g.example('Expression', '^{a}', "[#Fold [#Name 'a']]") g.example('Expression', '^Int{a}', "[#Fold [#Name 'a'] [#Name 'Int']]") g.example('Expression', 'name^{a}', "[#Fold [#Name 'a'] [#Name 'name']]") g.example('Expression', 'name^Int{a}', "[#Fold [#Name 'a'] [#Name 'Int'] [#Name 'name']]") g.example('Expression', '$a', "[#Append [#Name 'a']]") g.example('Expression', 'name=>a', "[#Bind [#Name 'a'] [#Name 'name']]") g.example('Expression', 'name => a', "[#Bind [#Name 'a'] [#Name 'name']]") g.example('Expression', 'a a', "[#Seq [#Name 'a'] [#Name 'a']]") g.example('Expression', 'a b c', "[#Seq [#Seq [#Name 'c'] [#Name 'b']] [#Name 'a']]") g.example('Expression', 'a/b / c', "[#Or [#Or [#Name 'c'] [#Name 'b']] [#Name 'a']]") g.example('Statement', 'A=a', "[#Production [#Name 'a'] [#Name 'A']]") g.example('Statement', 'example A,B abc \n', "[#Example [#Doc 'abc '] [# [#Name 'B'] [#Name 'A']]]") g.example('Statement', 'A = a\n b', "[#Production [#Seq [#Name 'b'] [#Name 'a']] [#Name 'A']]") g.example('Start', 'A = a; B = b;;', "[#Source [#Production [#Name 'b'] [#Name 'B']] [#Production [#Name 'a'] [#Name 'A']]]") g.example('Start', 'A = a\nB = b', "[#Source [#Production [#Name 'b'] [#Name 'B']] [#Production [#Name 'a'] [#Name 'A']]]") g.example('Start', 'A = a //hoge\nB = b', "[#Source [#Production [#Name 'b'] [#Name 'B']] [#Production [#Name 'a'] [#Name 'A']]]") return g "\nclass TreeConv(object):\n def parse(self, t:ParseTree):\n f = getattr(self, t.tag)\n return f(t)\n\nclass TPEGConv(TreeConv):\n def __init__(self, peg:PEG):\n self.peg = peg\n def load(self, path):\n self.peg = PEG(path)\n f = open(path, 'r')\n data = f.read()\n f.close()\n return self.peg\n def Source(self,t:ParseTree):\n for stmt in t.asArray():\n self.parse(stmt)\n def Example(self, t:ParseTree):\n names, input = t.asArray()\n for name in names:\n self.peg.example(name.asString(), input.asString())\n def Production(self, t:ParseTree):\n name, expr = t.asArray()\n setattr(self.peg, name.asString(), self.parse(expr))\n def Name(self, t:ParseTree):\n return Ref(t.asString())\n def Char(self, t:ParseTree):\n return pe(t.asString())\n def Class(self, t:ParseTree):\n return pe(t.asString())\n def Any(self, t:ParseTree):\n return ANY\n def Or(self,t:ParseTree):\n return lor(list(map(lambda x: self.parse(x), t.asArray())))\n def Seq(self,t:ParseTree):\n return lseq(list(map(lambda x: self.parse(x), t.asArray())))\n def Many(self,t:ParseTree):\n return Many(self.parse(t[0]))\n def Many1(self,t:ParseTree):\n return Many1(self.parse(t[0]))\n def Option(self,t:ParseTree):\n return Ore(self.parse(t[0]), EMPTY)\n def And(self,t:ParseTree):\n return And(self.parse(t[0]))\n def Not(self,t:ParseTree):\n return Not(self.parse(t[0]))\n def Append(self,t:ParseTree):\n return LinkAs('', self.parse(t[0]))\n def Tree(self,t:ParseTree):\n if len(t) == 2:\n return TreeAs(t[0].asString(), self.parse(t[1]))\n return TreeAs('', self.parse(t[0]))\n def Link(self,t:ParseTree):\n if len(t) == 2:\n return LinkAs(t[0].asString(), self.parse(t[1]))\n return LinkAs('', self.parse(t[0]))\n def Fold(self,t:ParseTree):\n if len(t) == 3:\n return FoldAs(t[0].asString(), t[1].asString(), self.parse(t[3]))\n if len(t) == 2:\n return FoldAs('', t[0].asString(), self.parse(t[1]))\n return FoldAs('', '', self.parse(t[0]))\n\n def unquote(self, s):\n sb = []\n while len(s) > 0:\n if s.startswith('\\') and len(s) > 1:\n s = self.unesc(s, sb)\n else:\n sb.append(s[0])\n s = s[1:]\n return ''.join(sb)\n"
# last bit in the foreground map is 2**6 LMC_VAL = 2**7 HYPERLEDA_VAL = 2**9 GAIA_VAL = 2**10 DES_STARS_VAL = 2**11 NSIDE_COVERAGE = 32 NSIDE = 16384 FOOTPRINT_VAL = 2**0 # Hyperleda HYPERLEDA_RADIUS_FAC = 1 # HYPERLEDA_RADIUS_FAC = 2 HYPERLEDA_MINRAD_ARCSEC = 0.0 # HYPERLEDA_MINRAD_ARCSEC = 10 # Gaia GAIA_RADIUS_FAC = 1 # GAIA_RADIUS_FAC = 2 GAIA_MINRAD_ARCSEC = 5 # GAIA_MINRAD_ARCSEC = 10 GAIA_MAX_GMAG = 1000 # coefficients for log10(radius_arcsec) vs mag. GAIA_POLY_COEFFS = [0.00443223, -0.22569131, 2.99642999] # foreground FOREGROUND_RADIUS_FAC = 1 # FOREGROUND_RADIUS_FAC = 2 # FOREGROUND_MINRAD_ARCSEC = 0 FOREGROUND_MINRAD_ARCSEC = 5 # DES Stars DES_STARS_RADIUS_ARCSEC = 5
lmc_val = 2 ** 7 hyperleda_val = 2 ** 9 gaia_val = 2 ** 10 des_stars_val = 2 ** 11 nside_coverage = 32 nside = 16384 footprint_val = 2 ** 0 hyperleda_radius_fac = 1 hyperleda_minrad_arcsec = 0.0 gaia_radius_fac = 1 gaia_minrad_arcsec = 5 gaia_max_gmag = 1000 gaia_poly_coeffs = [0.00443223, -0.22569131, 2.99642999] foreground_radius_fac = 1 foreground_minrad_arcsec = 5 des_stars_radius_arcsec = 5
class Action: def __init__(self, number, values): self.number = number self.values = values
class Action: def __init__(self, number, values): self.number = number self.values = values
class Solution: def countComponents(self, n: int, edges: List[List[int]]) -> int: visited, count, graph = [False for _ in range(n)], 0, defaultdict(set) def dfs(i): for j in graph[i]: if not visited[j]: visited[j] = True dfs(j) for start, end in edges: graph[start].add(end) graph[end].add(start) for i in range(n): if not visited[i]: dfs(i) count += 1 return count
class Solution: def count_components(self, n: int, edges: List[List[int]]) -> int: (visited, count, graph) = ([False for _ in range(n)], 0, defaultdict(set)) def dfs(i): for j in graph[i]: if not visited[j]: visited[j] = True dfs(j) for (start, end) in edges: graph[start].add(end) graph[end].add(start) for i in range(n): if not visited[i]: dfs(i) count += 1 return count
#========================= # Weapon List #========================= stick = {'name':'Stick','damage':1, 'description':'A wooden stick.... Maybe it will help'} club = {'name':'Club', 'damage':2, 'description': 'It is a wooden club to swing around'} woodenSword = {'name':'Wooden Sword', 'damage':3, 'description':'It is a wooden sword with a reasonably sharp blade for being made out of wood.'} shortSword = {'name':'Short Sword','damage':5, 'description':'A short sword of reasonable quality'} smallAxe = {'name':'Small Axe', 'damage':7, 'description':'It is a small handheld ax with a suprising amount of weight behind it.'} shineySword = {'name':'Shiney Steel Sword', 'damage':10, 'description':'It is a nice steel sword that looks fairly new and very strong.'} heavyAxe = {'atk': 12, 'name':'Heavy Axe', 'damage':12, 'description':'It is a very large and heavy ax, it takes all your might to swing it.'} greatSword = {'name':'Great Sword', 'damage':15, 'description':'It is a long broad sword, you can almost feel the power flowing through it as if enchanted by some great magic.'} weaponList = [stick, club, woodenSword, shortSword, smallAxe, shineySword, heavyAxe, greatSword]
stick = {'name': 'Stick', 'damage': 1, 'description': 'A wooden stick.... Maybe it will help'} club = {'name': 'Club', 'damage': 2, 'description': 'It is a wooden club to swing around'} wooden_sword = {'name': 'Wooden Sword', 'damage': 3, 'description': 'It is a wooden sword with a reasonably sharp blade for being made out of wood.'} short_sword = {'name': 'Short Sword', 'damage': 5, 'description': 'A short sword of reasonable quality'} small_axe = {'name': 'Small Axe', 'damage': 7, 'description': 'It is a small handheld ax with a suprising amount of weight behind it.'} shiney_sword = {'name': 'Shiney Steel Sword', 'damage': 10, 'description': 'It is a nice steel sword that looks fairly new and very strong.'} heavy_axe = {'atk': 12, 'name': 'Heavy Axe', 'damage': 12, 'description': 'It is a very large and heavy ax, it takes all your might to swing it.'} great_sword = {'name': 'Great Sword', 'damage': 15, 'description': 'It is a long broad sword, you can almost feel the power flowing through it as if enchanted by some great magic.'} weapon_list = [stick, club, woodenSword, shortSword, smallAxe, shineySword, heavyAxe, greatSword]
{ "targets": [ { "variables": { "cpp_base": "./src/cpp/" }, "target_name": "uTicTacToe", "sources": [ "<(cpp_base)node-driver.cpp", "<(cpp_base)UltimateTicTacToe.cpp", "<(cpp_base)UltimateTicTacToe-minimax.cpp", "<(cpp_base)uTicTacToeWrapper.cpp", "<(cpp_base)MoveWrapper.cpp" ], "include_dirs": [ "<!@(node -p \"require('node-addon-api').include\")", "./src/include" ], "dependencies": [ "<!(node -p \"require('node-addon-api').gyp\")" ], "defines": [ "NAPI_CPP_EXCEPTIONS" ], 'conditions': [ ["OS=='mac'", { "OTHER_LDFLAGS": ["-stdlib=libc++"], "xcode_settings": { "GCC_ENABLE_CPP_EXCEPTIONS": "YES", "GCC_ENABLE_CPP_RTTI": "YES" } }], ["OS=='linux'", { "OTHER_CFLAGS": [ "-fexceptions" ], "cflags": [ "-fexceptions" ], "cflags_cc": [ "-fexceptions" ] }], ["OS=='windows'", { "msvs_settings": { "VCCLCompilerTool": { "ExceptionHandling": 1, "Optimization": 2 } } }] ] } ] }
{'targets': [{'variables': {'cpp_base': './src/cpp/'}, 'target_name': 'uTicTacToe', 'sources': ['<(cpp_base)node-driver.cpp', '<(cpp_base)UltimateTicTacToe.cpp', '<(cpp_base)UltimateTicTacToe-minimax.cpp', '<(cpp_base)uTicTacToeWrapper.cpp', '<(cpp_base)MoveWrapper.cpp'], 'include_dirs': ['<!@(node -p "require(\'node-addon-api\').include")', './src/include'], 'dependencies': ['<!(node -p "require(\'node-addon-api\').gyp")'], 'defines': ['NAPI_CPP_EXCEPTIONS'], 'conditions': [["OS=='mac'", {'OTHER_LDFLAGS': ['-stdlib=libc++'], 'xcode_settings': {'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'GCC_ENABLE_CPP_RTTI': 'YES'}}], ["OS=='linux'", {'OTHER_CFLAGS': ['-fexceptions'], 'cflags': ['-fexceptions'], 'cflags_cc': ['-fexceptions']}], ["OS=='windows'", {'msvs_settings': {'VCCLCompilerTool': {'ExceptionHandling': 1, 'Optimization': 2}}}]]}]}
class Node: def __init__(self, data): self.data = data self.nxt = None def add(self, data): nxt = self while nxt.nxt is not None: nxt = nxt.nxt nxt.nxt = Node(data) return nxt.nxt def join(self, node): self.nxt = node def get_size(n): count = 1 while n.nxt is not None: count += 1 n = n.nxt return count def print_nodes(node, msg='--', separator='->'): r = '' while node is not None: r += str(node.data) + separator node = node.nxt if len(separator) > 0: print(msg, r[0:-1 * len(separator)]) else: print(msg, r) def print_node_mem(node, msg='--'): while node is not None: print(node, end='-') node = node.nxt if __name__ == "__main__": head = Node(1) n2 = head.add(2) head.add(3) print_nodes(head) print_nodes(n2)
class Node: def __init__(self, data): self.data = data self.nxt = None def add(self, data): nxt = self while nxt.nxt is not None: nxt = nxt.nxt nxt.nxt = node(data) return nxt.nxt def join(self, node): self.nxt = node def get_size(n): count = 1 while n.nxt is not None: count += 1 n = n.nxt return count def print_nodes(node, msg='--', separator='->'): r = '' while node is not None: r += str(node.data) + separator node = node.nxt if len(separator) > 0: print(msg, r[0:-1 * len(separator)]) else: print(msg, r) def print_node_mem(node, msg='--'): while node is not None: print(node, end='-') node = node.nxt if __name__ == '__main__': head = node(1) n2 = head.add(2) head.add(3) print_nodes(head) print_nodes(n2)
''' Tuple - An ordered set of data 1. They are immutable, not changeable*. 2. Parenthesis are not necessary, it is there only for avoiding syntactic ambiguity(i.e x=1,2 is the same as x=(1,2s)) 3. t = 'a', 'b', 'c' 3-ary tuple print(t) We need to make the things good. 4. We can access them like lists using []. But don't try to change em 5. We can mix different data types. 6. We can update tuples by just reassigning them to the tuple with data changed 7. We have equality associativity from Right to Left 8. Tuples are immutable in order to avoid errors(be robust) - philosophy. 9. Tuples are useful for records, not for actively changing data. 10. We can extract values of the tuple(This is called tuple unpacking) a. a, b, c = tuple_name # Number of values SHOULD be the same as len(tuple) b. We can assign the same values to multiple things c. Don't use together on the same line e.g a = b, c = 1, 3 a = (1, 3) b = 1 c = 3 Not intuitive 11. Tuples can contain anything inside, tuples lists etc, Changing these 'inside' lists is allowed. a = (1, [1, 2]) a[1].append(3) # -> (1 , [1,2,3]) this is allowed - the tuple stores the data structures's reference only. It is useful in many ways. 12. It is useful to make a tuple so that relationships between variables is intuitive. 13. We can print any tuple, so they can be passed as it is to .format() ------------------------- Binary Number Systems: We can specify the number system and the decimal at last(but not together) 1. Use x for hex, o for oct and b for binary - small letters strictly 2. For representing in decimal 0b101001, 0xAF24, 0o137 3. For converting from decimal to other systems do int(str(hex(i))), or bin(i) or oct(i) - All are strings. '''
""" Tuple - An ordered set of data 1. They are immutable, not changeable*. 2. Parenthesis are not necessary, it is there only for avoiding syntactic ambiguity(i.e x=1,2 is the same as x=(1,2s)) 3. t = 'a', 'b', 'c' 3-ary tuple print(t) We need to make the things good. 4. We can access them like lists using []. But don't try to change em 5. We can mix different data types. 6. We can update tuples by just reassigning them to the tuple with data changed 7. We have equality associativity from Right to Left 8. Tuples are immutable in order to avoid errors(be robust) - philosophy. 9. Tuples are useful for records, not for actively changing data. 10. We can extract values of the tuple(This is called tuple unpacking) a. a, b, c = tuple_name # Number of values SHOULD be the same as len(tuple) b. We can assign the same values to multiple things c. Don't use together on the same line e.g a = b, c = 1, 3 a = (1, 3) b = 1 c = 3 Not intuitive 11. Tuples can contain anything inside, tuples lists etc, Changing these 'inside' lists is allowed. a = (1, [1, 2]) a[1].append(3) # -> (1 , [1,2,3]) this is allowed - the tuple stores the data structures's reference only. It is useful in many ways. 12. It is useful to make a tuple so that relationships between variables is intuitive. 13. We can print any tuple, so they can be passed as it is to .format() ------------------------- Binary Number Systems: We can specify the number system and the decimal at last(but not together) 1. Use x for hex, o for oct and b for binary - small letters strictly 2. For representing in decimal 0b101001, 0xAF24, 0o137 3. For converting from decimal to other systems do int(str(hex(i))), or bin(i) or oct(i) - All are strings. """
with open('./Gonduls/13/input.txt', 'r') as inputf: lista= list(inputf.read().split('\n')) lista[1] = lista[1].split(',') buses =[] for i, elem in enumerate(lista[1]): if (elem != 'x'): buses.append([int(elem), i, True]) times = 0 step = 1 i = 0 notfound= True while(notfound): # checks if i is final number: inside map returns result of i+minutes_offset % ele in buses, # outside map returns list of Trues if inside map is all zeros ([0, 0, 0, 0, ...]), all finishes the job if all(map(lambda el: el==0, map(lambda ele: (i+ele[1])%ele[0], buses))): break # works because if i+minutes_offset % bus == 0 => (step*bus + i+minutes_offset)% bus == 0, # where step can be set so this works for any number of buses, then step = step*bus for bus in buses: if (bus[2] and (i+bus[1])%bus[0]==0): bus[2] = False step *= bus[0] i += step print(i)
with open('./Gonduls/13/input.txt', 'r') as inputf: lista = list(inputf.read().split('\n')) lista[1] = lista[1].split(',') buses = [] for (i, elem) in enumerate(lista[1]): if elem != 'x': buses.append([int(elem), i, True]) times = 0 step = 1 i = 0 notfound = True while notfound: if all(map(lambda el: el == 0, map(lambda ele: (i + ele[1]) % ele[0], buses))): break for bus in buses: if bus[2] and (i + bus[1]) % bus[0] == 0: bus[2] = False step *= bus[0] i += step print(i)
exit_list= [3602, 1174, 1194, 818, 878, 4296] total_example = 0 for number in exit_list: total_example += number for index, number in enumerate(exit_list): print("layer:", index+1, "exit %:", number/total_example*100)
exit_list = [3602, 1174, 1194, 818, 878, 4296] total_example = 0 for number in exit_list: total_example += number for (index, number) in enumerate(exit_list): print('layer:', index + 1, 'exit %:', number / total_example * 100)
def multiply1(x,y): n = len(x) if (n==1): return x[0]*y[0] s = int(n/2) xl = x[0:s] xh = x[s:] yl = y[0:s] yh = y[s:] p1 = multiply(xl,yl) p2 = multiply(xh,yh) xz = [x1 + x2 for x1, x2 in zip(xl, xh)] yz = [y1 + y2 for y1, y2 in zip(yl, yh)] p3 = multiply(xz,yz) if isinstance(p2, list): t2 = [p3t -p2t - p1t for p1t, p2t, p3t in zip(p1,p2,p3 )] else: t2 = p3-p2-p1 return [p1,t2,p2] def multiply(X,Y): if ((len(X)==1) or (len(X)==2)): return (multiply1(X,Y)) elif (len(X)==4): p1,p2,p3 = multiply1(X,Y) return ([p1[0],p1[1],(p1[2]+p2[0]),p2[1],(p2[2]+p3[0]),p3[1],p3[2]]) else: print("polnomial order must be 1, 2, or 4") return -1 x=[4,7,2,5] y=[1,3,9,2] print(multiply(x,y))
def multiply1(x, y): n = len(x) if n == 1: return x[0] * y[0] s = int(n / 2) xl = x[0:s] xh = x[s:] yl = y[0:s] yh = y[s:] p1 = multiply(xl, yl) p2 = multiply(xh, yh) xz = [x1 + x2 for (x1, x2) in zip(xl, xh)] yz = [y1 + y2 for (y1, y2) in zip(yl, yh)] p3 = multiply(xz, yz) if isinstance(p2, list): t2 = [p3t - p2t - p1t for (p1t, p2t, p3t) in zip(p1, p2, p3)] else: t2 = p3 - p2 - p1 return [p1, t2, p2] def multiply(X, Y): if len(X) == 1 or len(X) == 2: return multiply1(X, Y) elif len(X) == 4: (p1, p2, p3) = multiply1(X, Y) return [p1[0], p1[1], p1[2] + p2[0], p2[1], p2[2] + p3[0], p3[1], p3[2]] else: print('polnomial order must be 1, 2, or 4') return -1 x = [4, 7, 2, 5] y = [1, 3, 9, 2] print(multiply(x, y))
b = "this is file 'b'" def b_func(): inside_b_func = 'inside b_func()' print("b")
b = "this is file 'b'" def b_func(): inside_b_func = 'inside b_func()' print('b')
''' MIT License Copyright (c) 2019 Keith Christopher Cronin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ''' _parseddictionary = {} _hasreadxdf = False debug = False def readxdf(filepath, data=None, markercharacter='@', listseparatormarker=','): global _hasreadxdf isonproperty = False isonpropertyvalue = False isonequal = False isonmarker = True position = 0 propertyvaluebuffer = [] propertybuffer = [] global _parseddictionary propertystartindex = 0 propertyendindex = 0 propertyvaluestartindex = 0 propertyvalueendindex = 0 propwasmarked = False propvaluewasmarked = False propertyname = '' lastlistsepposition = 0 haslist = False propertyvaluelistbuffer = [] if filepath is not None: try: file = open(filepath, 'r') data = file.read() file.close() except PermissionError: return False except OSError: return False if len(data) == 0: return False if data[0] != markercharacter or _hasreadxdf or len(markercharacter) != 1: return False else: for character in data: if isonproperty: if propwasmarked == False: propertystartindex = position propwasmarked = True elif character == listseparatormarker: return False else: pass if character == '=': isonpropertyvalue = True isonproperty = False propertyendindex = position propertyname = data[propertystartindex:propertyendindex].strip('\n') propertyvaluestartindex = position + 1 if isonpropertyvalue: if character == markercharacter or position == len(data)-1 and not haslist: isonmarker = True propertyvalueendindex = position _parseddictionary[propertyname] = data[propertyvaluestartindex:propertyvalueendindex].strip('\n') propwasmarked = False if position == len(data)-1 and not haslist: _parseddictionary[propertyname] = data[propertyvaluestartindex:propertyvalueendindex+1].strip('\n') elif character == listseparatormarker and not haslist: haslist = True propertyvaluelistbuffer.append(data[propertyendindex+1:position].strip(F"{listseparatormarker}\n")) lastlistsepposition = position elif character == listseparatormarker and haslist: propertyvaluelistbuffer.append(data[lastlistsepposition+1:position].strip(F"{listseparatormarker}\n")) lastlistsepposition = position if haslist and position == len(data)-1: propertyvaluelistbuffer.append(data[lastlistsepposition+1:position+1].strip(F"{listseparatormarker}\n")) _parseddictionary[propertyname] = propertyvaluelistbuffer propertyvaluelistbuffer = [] lastlistsepposition = 0 haslist = False if character == markercharacter and haslist: propertyvaluelistbuffer.append(data[lastlistsepposition+1:position].strip(F"{listseparatormarker}\n")) _parseddictionary[propertyname] = propertyvaluelistbuffer propertyvaluelistbuffer = [] lastlistsepposition = 0 haslist = False else: pass if isonmarker: isonproperty = True isonmarker = False position += 1 _hasreadxdf = True return True def reset(): global debug _hasreadxdf = False _parseddictionary.clear() if debug: _tellcurrentparserdictionary() return True def getproperty(propertystring): if propertystring in _parseddictionary: return _parseddictionary[propertystring] else: return False def setproperty(propertystring, propertyvalue): _parseddictionary[propertystring] = propertyvalue return True def appendtoproperty(propertystring, propertyvalue): if propertystring in _parseddictionary: _parseddictionary[propertystring] += F",{propertyvalue}" return True else: return False def writexdf(filepath, propertydictionary, markercharacter='@', listseparatormarker=','): if markercharacter == listseparatormarker: return False listelementcounter = 0 try: file = open(filepath,'w') for key in propertydictionary: if isinstance(propertydictionary[key], list): file.write(markercharacter+key+'=') for element in propertydictionary[key]: if listelementcounter != len(propertydictionary[key]) - 1: file.write(element+listseparatormarker) else: file.write(element+'\n') listelementcounter += 1 listelementcounter = 0 else: file.write(markercharacter+key+'='+str(propertydictionary[key])+'\n') file.close() return True except PermissionError: return False except OSError: return False def getcurrentdata(): if len(_parseddictionary) < 1: return False else: return _parseddictionary def _tellcurrentparserdictionary(): print(F"Listing {len(_parseddictionary)} properties and values in memory: \n{_parseddictionary}")
""" MIT License Copyright (c) 2019 Keith Christopher Cronin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ _parseddictionary = {} _hasreadxdf = False debug = False def readxdf(filepath, data=None, markercharacter='@', listseparatormarker=','): global _hasreadxdf isonproperty = False isonpropertyvalue = False isonequal = False isonmarker = True position = 0 propertyvaluebuffer = [] propertybuffer = [] global _parseddictionary propertystartindex = 0 propertyendindex = 0 propertyvaluestartindex = 0 propertyvalueendindex = 0 propwasmarked = False propvaluewasmarked = False propertyname = '' lastlistsepposition = 0 haslist = False propertyvaluelistbuffer = [] if filepath is not None: try: file = open(filepath, 'r') data = file.read() file.close() except PermissionError: return False except OSError: return False if len(data) == 0: return False if data[0] != markercharacter or _hasreadxdf or len(markercharacter) != 1: return False else: for character in data: if isonproperty: if propwasmarked == False: propertystartindex = position propwasmarked = True elif character == listseparatormarker: return False else: pass if character == '=': isonpropertyvalue = True isonproperty = False propertyendindex = position propertyname = data[propertystartindex:propertyendindex].strip('\n') propertyvaluestartindex = position + 1 if isonpropertyvalue: if character == markercharacter or (position == len(data) - 1 and (not haslist)): isonmarker = True propertyvalueendindex = position _parseddictionary[propertyname] = data[propertyvaluestartindex:propertyvalueendindex].strip('\n') propwasmarked = False if position == len(data) - 1 and (not haslist): _parseddictionary[propertyname] = data[propertyvaluestartindex:propertyvalueendindex + 1].strip('\n') elif character == listseparatormarker and (not haslist): haslist = True propertyvaluelistbuffer.append(data[propertyendindex + 1:position].strip(f'{listseparatormarker}\n')) lastlistsepposition = position elif character == listseparatormarker and haslist: propertyvaluelistbuffer.append(data[lastlistsepposition + 1:position].strip(f'{listseparatormarker}\n')) lastlistsepposition = position if haslist and position == len(data) - 1: propertyvaluelistbuffer.append(data[lastlistsepposition + 1:position + 1].strip(f'{listseparatormarker}\n')) _parseddictionary[propertyname] = propertyvaluelistbuffer propertyvaluelistbuffer = [] lastlistsepposition = 0 haslist = False if character == markercharacter and haslist: propertyvaluelistbuffer.append(data[lastlistsepposition + 1:position].strip(f'{listseparatormarker}\n')) _parseddictionary[propertyname] = propertyvaluelistbuffer propertyvaluelistbuffer = [] lastlistsepposition = 0 haslist = False else: pass if isonmarker: isonproperty = True isonmarker = False position += 1 _hasreadxdf = True return True def reset(): global debug _hasreadxdf = False _parseddictionary.clear() if debug: _tellcurrentparserdictionary() return True def getproperty(propertystring): if propertystring in _parseddictionary: return _parseddictionary[propertystring] else: return False def setproperty(propertystring, propertyvalue): _parseddictionary[propertystring] = propertyvalue return True def appendtoproperty(propertystring, propertyvalue): if propertystring in _parseddictionary: _parseddictionary[propertystring] += f',{propertyvalue}' return True else: return False def writexdf(filepath, propertydictionary, markercharacter='@', listseparatormarker=','): if markercharacter == listseparatormarker: return False listelementcounter = 0 try: file = open(filepath, 'w') for key in propertydictionary: if isinstance(propertydictionary[key], list): file.write(markercharacter + key + '=') for element in propertydictionary[key]: if listelementcounter != len(propertydictionary[key]) - 1: file.write(element + listseparatormarker) else: file.write(element + '\n') listelementcounter += 1 listelementcounter = 0 else: file.write(markercharacter + key + '=' + str(propertydictionary[key]) + '\n') file.close() return True except PermissionError: return False except OSError: return False def getcurrentdata(): if len(_parseddictionary) < 1: return False else: return _parseddictionary def _tellcurrentparserdictionary(): print(f'Listing {len(_parseddictionary)} properties and values in memory: \n{_parseddictionary}')
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def sumOfLeftLeaves(self, root: Optional[TreeNode]) -> int: stack=[(root, 1)] output=0 while(stack): node, where = stack.pop(0) if where==0 and not node.left and not node.right: output+=node.val if node.left: stack.append((node.left, 0)) if node.right: stack.append((node.right, 1)) return output
class Solution: def sum_of_left_leaves(self, root: Optional[TreeNode]) -> int: stack = [(root, 1)] output = 0 while stack: (node, where) = stack.pop(0) if where == 0 and (not node.left) and (not node.right): output += node.val if node.left: stack.append((node.left, 0)) if node.right: stack.append((node.right, 1)) return output
config = {} def set_config(conf): global config config = conf def get_config(): global config return config def get_full_url(relative_url): return '%s/api/%s/%s' % (config['HOST'], config['API_VERSION'], relative_url) def get_headers(): return { 'Accept': 'application/json', # 'Authorization': 'JWT %s' % (config['TOKEN']), 'X-BC-AUTH': config['TOKEN'], 'Content-Type': 'application/json', }
config = {} def set_config(conf): global config config = conf def get_config(): global config return config def get_full_url(relative_url): return '%s/api/%s/%s' % (config['HOST'], config['API_VERSION'], relative_url) def get_headers(): return {'Accept': 'application/json', 'X-BC-AUTH': config['TOKEN'], 'Content-Type': 'application/json'}
class UsiError(Exception): def __init__(self, message, error_code): self.message = message self.error_code = error_code
class Usierror(Exception): def __init__(self, message, error_code): self.message = message self.error_code = error_code
### # range() ### # 1. create a list of integers from 0 to n # l = list(range(10)) # print(l) # # 2. create a list of integers from 3 to 10 # l2 = list(range(3,10)) # print(l2) # # 3. create a list of integers from 0, 10 with step size of 2 # # 0, 2, 4, ... # l3 = list(range(0,10,2)) # print(l3) # # 4. create a list of integers from 10 to 1 # l4 = list(range(10,0,-1)) # print(l4) # create a list of integers from 0, n with step size of k # l = list(range(0, n, k)) # create a list of integers from 10 to 0 # l5 = list(range(10,-1,-1)) # range(start_position=0, end_position, step_size=1) # by default ############################# ############################## l = list(range(10)) # print(l) # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] # # [0, 1, 2, 3, 4] # # [5, 6, 7, 8, 9] # print(l[:5]) # print(l[5:]) # # reverse the list [4,3,2,1,0] -> [4,3,2,1] # print(l[-1:-11:-1]) # print [0,1,8,9] # l = [1,2,3] # l2 = [5,4,7] # print(l+l2) # l.extend(l2) # print(l) # # print(l[:2]+l[9:]) # l.append(10) # l.pop(6) # l.insert(0,50) # https://developers.google.com/edu/python
l = list(range(10))
# Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right # 1. Linear Time class Solution: def countNodes(self, root: TreeNode) -> int: return 1 + self.countNodes(root.right) + self.countNodes(root.left) if root else 0 # 2. Better Solution class Solution: def countNodes(self, root: TreeNode) -> int: if not root: return 0 self.last_level_count = 0 self.level = 0 # Stop flag to end searching self.stop = 0 # Start with -1 since the searching ends on the children of leafs (None) # Make -1 offset then self.level can be the real value self.dfs(root, -1) return 2 ** self.level - 1 + self.last_level_count // 2 def dfs(self, node, level): if self.stop: return if not node: self.level = max(self.level, level) # If the reaches the final level, then count 1 # Note this is actually counting for # of children (None) of final level nodes if self.level == level: self.last_level_count += 1 else: self.stop = 1 return self.dfs(node.left, level + 1) self.dfs(node.right, level + 1) # 3. Binary Search class Solution: def countNodes(self, root: TreeNode) -> int: if not root: return 0 # Find tree final level (Tree Height) self.root = root node = root self.level = -1 while node: node = node.left self.level += 1 # Start Binary Search left = 0 right = 2 ** self.level - 1 # If it's full binary tree then directly return # nodes if self.check_node(right): return 2 ** self.level + right while left < right - 1: mid = (left + right) // 2 if self.check_node(mid): left = mid else: right = mid return 2 ** self.level + left def check_node(self, idx): node = self.root # The order if search path could be regarded as binary value converted from index # Make sure the len(order) = self.level order = format(idx, '0{}b'.format(self.level)) for num in order: if num == '0': node = node.left else: node = node.right return True if node else False
class Treenode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def count_nodes(self, root: TreeNode) -> int: return 1 + self.countNodes(root.right) + self.countNodes(root.left) if root else 0 class Solution: def count_nodes(self, root: TreeNode) -> int: if not root: return 0 self.last_level_count = 0 self.level = 0 self.stop = 0 self.dfs(root, -1) return 2 ** self.level - 1 + self.last_level_count // 2 def dfs(self, node, level): if self.stop: return if not node: self.level = max(self.level, level) if self.level == level: self.last_level_count += 1 else: self.stop = 1 return self.dfs(node.left, level + 1) self.dfs(node.right, level + 1) class Solution: def count_nodes(self, root: TreeNode) -> int: if not root: return 0 self.root = root node = root self.level = -1 while node: node = node.left self.level += 1 left = 0 right = 2 ** self.level - 1 if self.check_node(right): return 2 ** self.level + right while left < right - 1: mid = (left + right) // 2 if self.check_node(mid): left = mid else: right = mid return 2 ** self.level + left def check_node(self, idx): node = self.root order = format(idx, '0{}b'.format(self.level)) for num in order: if num == '0': node = node.left else: node = node.right return True if node else False
class FeatureImportance(object): def __init__(self, importance=0, importance_2=0, main_type='split'): self.legal_type = ['split', 'gain'] assert main_type in self.legal_type, 'illegal importance type {}'.format(main_type) self.importance = importance self.importance_2 = importance_2 self.main_type = main_type def add_gain(self, val): if self.main_type == 'gain': self.importance += val else: self.importance_2 += val def add_split(self, val): if self.main_type == 'split': self.importance += val else: self.importance_2 += val def __cmp__(self, other): if self.importance > other.importance: return 1 elif self.importance < other.importance: return -1 else: return 0 def __eq__(self, other): return self.importance == other.importance def __lt__(self, other): return self.importance < other.importance def __repr__(self): return 'importance type: {}, importance: {}, importance2 {}'.format(self.main_type, self.importance, self.importance_2) def __add__(self, other): new_importance = FeatureImportance(main_type=self.main_type, importance=self.importance+other.importance, importance_2=self.importance_2+other.importance_2) return new_importance
class Featureimportance(object): def __init__(self, importance=0, importance_2=0, main_type='split'): self.legal_type = ['split', 'gain'] assert main_type in self.legal_type, 'illegal importance type {}'.format(main_type) self.importance = importance self.importance_2 = importance_2 self.main_type = main_type def add_gain(self, val): if self.main_type == 'gain': self.importance += val else: self.importance_2 += val def add_split(self, val): if self.main_type == 'split': self.importance += val else: self.importance_2 += val def __cmp__(self, other): if self.importance > other.importance: return 1 elif self.importance < other.importance: return -1 else: return 0 def __eq__(self, other): return self.importance == other.importance def __lt__(self, other): return self.importance < other.importance def __repr__(self): return 'importance type: {}, importance: {}, importance2 {}'.format(self.main_type, self.importance, self.importance_2) def __add__(self, other): new_importance = feature_importance(main_type=self.main_type, importance=self.importance + other.importance, importance_2=self.importance_2 + other.importance_2) return new_importance
# By default the LibriSpeech corpus is set. path_to_corpus = '../audio_data/LibriSpeech/' # By default librispeech file-name has been set. Please modify if you are using some other corpus speaker_meta_info_file_name='SPEAKERS.TXT' # Each of the subset will have deifferent output sub-folder identified by subset-type output_folder='./output/' #Word Meta_info_file path path_to_word_meta_info='./word_meta_info/' #Utterance_Level_meta_info path path_to_utt_meta_info='./utt_meta_info/' # log-file path path_to_log_file = './log/' #Google-API-KEY file is required to run Google Cloud ASR path_to_google_api_key='../Google_API_Key/api-key.json'
path_to_corpus = '../audio_data/LibriSpeech/' speaker_meta_info_file_name = 'SPEAKERS.TXT' output_folder = './output/' path_to_word_meta_info = './word_meta_info/' path_to_utt_meta_info = './utt_meta_info/' path_to_log_file = './log/' path_to_google_api_key = '../Google_API_Key/api-key.json'
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def getDecimalValue(self, head: ListNode) -> int: ans = 0 while head: ans = 2*ans + head.val head = head.next return ans
class Solution: def get_decimal_value(self, head: ListNode) -> int: ans = 0 while head: ans = 2 * ans + head.val head = head.next return ans
def MySort(UnsortedArray): n=len(UnsortedArray) if n==1: SortedArray=UnsortedArray else: midpoint=n//2 Array1=MySort(UnsortedArray[0:midpoint]) Array2=MySort(UnsortedArray[midpoint:n]) i=0; j=0; SortedArray=[] while i<midpoint and j<n-midpoint: if Array1[i]<Array2[j]: SortedArray.append(Array1[i]) i+=1 else: SortedArray.append(Array2[j]) j+=1 if i==midpoint: SortedArray+=Array2[j:(n-midpoint)] else: SortedArray+=Array1[i:midpoint] return SortedArray MyInput=[95,33,7,87,665,4,2,5,4,8,56,5,13,45,6,87,34,345,1,6,7,67,434,53,24,64] print(MySort(MyInput))
def my_sort(UnsortedArray): n = len(UnsortedArray) if n == 1: sorted_array = UnsortedArray else: midpoint = n // 2 array1 = my_sort(UnsortedArray[0:midpoint]) array2 = my_sort(UnsortedArray[midpoint:n]) i = 0 j = 0 sorted_array = [] while i < midpoint and j < n - midpoint: if Array1[i] < Array2[j]: SortedArray.append(Array1[i]) i += 1 else: SortedArray.append(Array2[j]) j += 1 if i == midpoint: sorted_array += Array2[j:n - midpoint] else: sorted_array += Array1[i:midpoint] return SortedArray my_input = [95, 33, 7, 87, 665, 4, 2, 5, 4, 8, 56, 5, 13, 45, 6, 87, 34, 345, 1, 6, 7, 67, 434, 53, 24, 64] print(my_sort(MyInput))
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def reverseList1(self, head: Optional[ListNode]) -> Optional[ListNode]: new_head = None node = head while node: # 3 -> 4 -> 5 next_node = node.next # 3 node.next = new_head # 2-> 1-> 0 new_head = node # 2-> 1-> 0 node = next_node return new_head def reverseList(self, head: Optional[ListNode]) -> Optional[ListNode]: new_head, node = self.reverse(head) return new_head def reverse(self, head: Optional[ListNode]) -> Optional[ListNode]: # 5 -> 4 -> 3 -> 2 -> 1 if not head: return head, head if head.next: new_head, node = self.reverse(head.next) node.next = head head.next = None return new_head, node.next return head, head
class Solution: def reverse_list1(self, head: Optional[ListNode]) -> Optional[ListNode]: new_head = None node = head while node: next_node = node.next node.next = new_head new_head = node node = next_node return new_head def reverse_list(self, head: Optional[ListNode]) -> Optional[ListNode]: (new_head, node) = self.reverse(head) return new_head def reverse(self, head: Optional[ListNode]) -> Optional[ListNode]: if not head: return (head, head) if head.next: (new_head, node) = self.reverse(head.next) node.next = head head.next = None return (new_head, node.next) return (head, head)
class Var(object) : def __init__(self, name) : self.name = name def __str__(self) : return str(self.name) class Data(object) : def __init__(self, x) : self.x = x def __str__(self) : return str(self.x) class Fun(object) : def __init__(self, var, body) : self.var = var self.body = body def __str__(self) : return "function(" + str(self.var) + ")" + str(self.body) class Prim(object) : def __init__(self, op, args) : self.op = op self.args = args self.ops = {'ADD':'+', 'SUB':'-', 'MUL':'*', 'DIV':'/', 'EQ':'==', 'NOTEQ':'!=', 'LT':'<', 'LTE':'<=', 'GT':'>', 'GTE':'>=', 'AND':'&&', 'OR':'||', 'NOT':'!'} def __str__(self) : if (self.op == "SEQ") : return " ; ".join(map(str, self.args)) else : return "(" + str(self.args[0]) + " " + self.ops[self.op] + " " + str(self.args[1]) + ")" class Prop(object) : def __init__(self, base, field) : self.base = base self.field = field def __str__(self) : return str(self.base) + "." + self.field class Assign(object) : def __init__(self, op, target, source) : self.op = op self.target = target self.source = source def __str__(self) : return str(self.target) + " " + str(self.op) + "=" + str(self.source) class Let(object) : def __init__(self, var, expression, body) : self.var = var self.expression = expression self.body = body def __str__(self) : return "var " + str(self.var) + "=" + str(self.expression) + "; " + str(self.body) class If(object) : def __init__(self, condition, thenExp, elseExp) : self.condition = condition self.thenExp = thenExp self.elseExp = elseExp def __str__(self) : return "if (" + str(self.condition) + ") {" + str(thenExp) + "} else {" + str(self.elseExp) + "}" class Loop(object) : def __init__(self, var, collection, body) : self.var = var self.collection = collection self.body = body def __str__(self) : #if (type(self.collection) == Out) : # Assume it is an output # var = self.collection.location # collection = self.collection.expression #else : # var = self.var # collection = self.collection #return "for (" + str(var) + " in " + str(collection) + ") {" + str(self.body) + "}" return "for (" + str(self.var) + " in " + str(self.collection) + ") {" + str(self.body) + "}" class Call(object) : def __init__(self, target, method, args) : self.target = target self.method = method self.args = args def __str__(self) : return str(self.target) + "." + str(self.method) + "(" + ",".join(map(str, self.args)) + ")" class Out(object) : def __init__(self, location, expression) : self.location = location self.expression = expression def __str__(self) : return "OUTPUT(" + '"' + str(self.location) + '",' + str(self.expression) + ")" class In(object) : def __init__(self, location) : self.location = location def __str__(self) : return "INPUT(" + '"' + self.location + '")' class Skip(object) : def __init__(self) : pass def __str__(self) : return "skip"
class Var(object): def __init__(self, name): self.name = name def __str__(self): return str(self.name) class Data(object): def __init__(self, x): self.x = x def __str__(self): return str(self.x) class Fun(object): def __init__(self, var, body): self.var = var self.body = body def __str__(self): return 'function(' + str(self.var) + ')' + str(self.body) class Prim(object): def __init__(self, op, args): self.op = op self.args = args self.ops = {'ADD': '+', 'SUB': '-', 'MUL': '*', 'DIV': '/', 'EQ': '==', 'NOTEQ': '!=', 'LT': '<', 'LTE': '<=', 'GT': '>', 'GTE': '>=', 'AND': '&&', 'OR': '||', 'NOT': '!'} def __str__(self): if self.op == 'SEQ': return ' ; '.join(map(str, self.args)) else: return '(' + str(self.args[0]) + ' ' + self.ops[self.op] + ' ' + str(self.args[1]) + ')' class Prop(object): def __init__(self, base, field): self.base = base self.field = field def __str__(self): return str(self.base) + '.' + self.field class Assign(object): def __init__(self, op, target, source): self.op = op self.target = target self.source = source def __str__(self): return str(self.target) + ' ' + str(self.op) + '=' + str(self.source) class Let(object): def __init__(self, var, expression, body): self.var = var self.expression = expression self.body = body def __str__(self): return 'var ' + str(self.var) + '=' + str(self.expression) + '; ' + str(self.body) class If(object): def __init__(self, condition, thenExp, elseExp): self.condition = condition self.thenExp = thenExp self.elseExp = elseExp def __str__(self): return 'if (' + str(self.condition) + ') {' + str(thenExp) + '} else {' + str(self.elseExp) + '}' class Loop(object): def __init__(self, var, collection, body): self.var = var self.collection = collection self.body = body def __str__(self): return 'for (' + str(self.var) + ' in ' + str(self.collection) + ') {' + str(self.body) + '}' class Call(object): def __init__(self, target, method, args): self.target = target self.method = method self.args = args def __str__(self): return str(self.target) + '.' + str(self.method) + '(' + ','.join(map(str, self.args)) + ')' class Out(object): def __init__(self, location, expression): self.location = location self.expression = expression def __str__(self): return 'OUTPUT(' + '"' + str(self.location) + '",' + str(self.expression) + ')' class In(object): def __init__(self, location): self.location = location def __str__(self): return 'INPUT(' + '"' + self.location + '")' class Skip(object): def __init__(self): pass def __str__(self): return 'skip'
op = input() ops = {} for i in range(len(op)): if op[i + 1] == ':': ops[op[i]] = True elif op[i + 1] != ':' and op != ':': ops[op[i]] = False n = int(input()) for idx in range(1, n + 1): ans = '' print("Case {0}: {1}".format(idx, ans))
op = input() ops = {} for i in range(len(op)): if op[i + 1] == ':': ops[op[i]] = True elif op[i + 1] != ':' and op != ':': ops[op[i]] = False n = int(input()) for idx in range(1, n + 1): ans = '' print('Case {0}: {1}'.format(idx, ans))
class Solution: def minReorder(self, n: int, connections: List[List[int]]) -> int: tree = [[] for _ in range(n)] # a --> b for a, b in connections: tree[a].append((b, 1)) tree[b].append((a, 0)) self.ans = 0 def dfs(u, parent): for v, d in tree[u]: if v != parent: if d == 1: self.ans += 1 dfs(v, u) dfs(0, -1) return self.ans
class Solution: def min_reorder(self, n: int, connections: List[List[int]]) -> int: tree = [[] for _ in range(n)] for (a, b) in connections: tree[a].append((b, 1)) tree[b].append((a, 0)) self.ans = 0 def dfs(u, parent): for (v, d) in tree[u]: if v != parent: if d == 1: self.ans += 1 dfs(v, u) dfs(0, -1) return self.ans
# All endpoint constants for the User resource USER_ADD_DEVICE_TOKEN = "/push/{token_type}" USER_BAN_FROM_CHANNELS_WITH_CUSTOM_TYPES = "/banned_channel_custom_types" USER_BLOCK = "/block" USER_CHOOSE_PUSH_MESSAGE_TEMPLATE = "/push/template" USER_LIST_BANNED_CHANNELS = "/ban" USER_LIST_BLOCKED_USERS = "/block" USER_LIST_DEVICE_TOKENS = "/push/{token_type}" USER_LIST_MUTED_CHANNELS = "/mute" USER_MARK_AS_READ_ALL = "/mark_as_read_all" USER_MUTE_FROM_CHANNELS_WITH_CUSTOM_TYPES = "/muted_channel_custom_types" USER_MY_GROUP_CHANNELS = "/my_group_channels" USER_REGISTER_OPERATOR_CHANNELS_CUSTOM_TYPES = "/operating_channel_custom_types" USER_REMOVE_ALL_DEVICE_TOKENS = "/push" USER_REMOVE_DEVICE_TOKEN = "/push/{token_type}/{token}" USER_REMOVE_DEVICE_TOKEN_FROM_OWNER = "/push/device_tokens/{token_type}/{token}" USER_RESET_PUSH_PREFERENCE = "/push_preference" USER_UNBLOCK = "/block/{target_id}" USER_UNREAD_CHANNEL_COUNT = "/unread_channel_count" USER_UNREAD_ITEM_COUNT = "/unread_item_count" USER_UNREAD_MESSAGE_COUNT = "/unread_message_count" USER_UPDATE_CHANNEL_INVITE_PREFERENCE = "/channel_invitation_preference" USER_UPDATE_COUNT_PREFERENCE_OF_CHANNEL = "/count_preference/{channel_url}" USER_UPDATE_PUSH_PREFERENCE = "/push_preference" USER_UPDATE_PUSH_PREFERENCE_FOR_CHANNEL = "/push_preference/{channel_url}" USER_VIEW_CHANNEL_INVITE_PREFERENCE = "/channel_invitation_preference" USER_COUNT_PREFERENCE_OF_CHANNEL = "/count_preference/{channel_url}" USER_VIEW_DEVICE_TOKEN_OWNER = "/push/device_tokens/{token_type}/{token}" USER_VIEW_GROUP_CHANNEL_COUNT_BY_JOIN_STATUS = "/group_channel_count" USER_VIEW_PUSH_PREFERENCE = "/push_preference" USER_VIEW_PUSH_PREFERENCE_FOR_CHANNEL = "/push_preference/{channel_url}" USER_CREATE_METADATA = "/metadata" USER_DELETE_METADATA = "/metadata" USER_UPDATE_METADATA = "/metadata" USER_VIEW_METADATA = "/metadata"
user_add_device_token = '/push/{token_type}' user_ban_from_channels_with_custom_types = '/banned_channel_custom_types' user_block = '/block' user_choose_push_message_template = '/push/template' user_list_banned_channels = '/ban' user_list_blocked_users = '/block' user_list_device_tokens = '/push/{token_type}' user_list_muted_channels = '/mute' user_mark_as_read_all = '/mark_as_read_all' user_mute_from_channels_with_custom_types = '/muted_channel_custom_types' user_my_group_channels = '/my_group_channels' user_register_operator_channels_custom_types = '/operating_channel_custom_types' user_remove_all_device_tokens = '/push' user_remove_device_token = '/push/{token_type}/{token}' user_remove_device_token_from_owner = '/push/device_tokens/{token_type}/{token}' user_reset_push_preference = '/push_preference' user_unblock = '/block/{target_id}' user_unread_channel_count = '/unread_channel_count' user_unread_item_count = '/unread_item_count' user_unread_message_count = '/unread_message_count' user_update_channel_invite_preference = '/channel_invitation_preference' user_update_count_preference_of_channel = '/count_preference/{channel_url}' user_update_push_preference = '/push_preference' user_update_push_preference_for_channel = '/push_preference/{channel_url}' user_view_channel_invite_preference = '/channel_invitation_preference' user_count_preference_of_channel = '/count_preference/{channel_url}' user_view_device_token_owner = '/push/device_tokens/{token_type}/{token}' user_view_group_channel_count_by_join_status = '/group_channel_count' user_view_push_preference = '/push_preference' user_view_push_preference_for_channel = '/push_preference/{channel_url}' user_create_metadata = '/metadata' user_delete_metadata = '/metadata' user_update_metadata = '/metadata' user_view_metadata = '/metadata'
def aumentar(n, taxa=0): res = n + (n * taxa / 100) return res # moeda(res) # return res def diminuir(n=0, taxa=0): res = n - (n * taxa / 100) return res # moeda(res) def dobro(n=0): res = n * 2 return res # moeda(res) def metade(n): res = n / 2 return res # moeda(res) def moeda(n, m='R$'): res = f'{m} {n:.2f}'.replace(".", ",") return res
def aumentar(n, taxa=0): res = n + n * taxa / 100 return res def diminuir(n=0, taxa=0): res = n - n * taxa / 100 return res def dobro(n=0): res = n * 2 return res def metade(n): res = n / 2 return res def moeda(n, m='R$'): res = f'{m} {n:.2f}'.replace('.', ',') return res
class MyMath: def __init__(self): self.answer = 0 def Add(self, first_number, second_number): self.answer = first_number + second_number def Subtract(self, first_number, second_number): self.answer = first_number - second_number def __str__(self): return str(self.answer) class Person: def __init__(self, personName, personAge): self.name = personName self.age = personAge def showName(self): print(self.name) def showAge(self): print(self.age) person1 = Person("John", 23) person2 = Person("Anne", 102) person1.showAge() person2.showName() math = MyMath() math.Add(10,20) print(math) math.Subtract(10, 20) print(math)
class Mymath: def __init__(self): self.answer = 0 def add(self, first_number, second_number): self.answer = first_number + second_number def subtract(self, first_number, second_number): self.answer = first_number - second_number def __str__(self): return str(self.answer) class Person: def __init__(self, personName, personAge): self.name = personName self.age = personAge def show_name(self): print(self.name) def show_age(self): print(self.age) person1 = person('John', 23) person2 = person('Anne', 102) person1.showAge() person2.showName() math = my_math() math.Add(10, 20) print(math) math.Subtract(10, 20) print(math)
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # 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. noteList = [{'freq': 8.1757989200000001, 'name': 'C', 'octave': 0}, {'freq': 8.6619572199999997, 'name': 'C#', 'octave': 0}, {'freq': 9.1770239999999994, 'name': 'D', 'octave': 0}, {'freq': 9.7227182400000007, 'name': 'D#', 'octave': 0}, {'freq': 10.300861149999999, 'name': 'E', 'octave': 0}, {'freq': 10.91338223, 'name': 'F', 'octave': 0}, {'freq': 11.56232571, 'name': 'F#', 'octave': 0}, {'freq': 12.249857370000001, 'name': 'G', 'octave': 0}, {'freq': 12.9782718, 'name': 'G#', 'octave': 0}, {'freq': 13.75, 'name': 'A', 'octave': 0}, {'freq': 14.56761755, 'name': 'A#', 'octave': 0}, {'freq': 15.43385316, 'name': 'B', 'octave': 0}, {'freq': 16.351597829999999, 'name': 'C', 'octave': 1}, {'freq': 17.323914439999999, 'name': 'C#', 'octave': 1}, {'freq': 18.354047990000002, 'name': 'D', 'octave': 1}, {'freq': 19.445436480000001, 'name': 'D#', 'octave': 1}, {'freq': 20.60172231, 'name': 'E', 'octave': 1}, {'freq': 21.82676446, 'name': 'F', 'octave': 1}, {'freq': 23.124651419999999, 'name': 'F#', 'octave': 1}, {'freq': 24.499714749999999, 'name': 'G', 'octave': 1}, {'freq': 25.9565436, 'name': 'G#', 'octave': 1}, {'freq': 27.5, 'name': 'A', 'octave': 1}, {'freq': 29.135235089999998, 'name': 'A#', 'octave': 1}, {'freq': 30.867706330000001, 'name': 'B', 'octave': 1}, {'freq': 32.703195659999999, 'name': 'C', 'octave': 2}, {'freq': 34.647828869999998, 'name': 'C#', 'octave': 2}, {'freq': 36.708095989999997, 'name': 'D', 'octave': 2}, {'freq': 38.890872969999997, 'name': 'D#', 'octave': 2}, {'freq': 41.203444609999998, 'name': 'E', 'octave': 2}, {'freq': 43.65352893, 'name': 'F', 'octave': 2}, {'freq': 46.249302839999999, 'name': 'F#', 'octave': 2}, {'freq': 48.999429499999998, 'name': 'G', 'octave': 2}, {'freq': 51.9130872, 'name': 'G#', 'octave': 2}, {'freq': 55.0, 'name': 'A', 'octave': 2}, {'freq': 58.270470189999998, 'name': 'A#', 'octave': 2}, {'freq': 61.735412660000001, 'name': 'B', 'octave': 2}, {'freq': 65.406391330000005, 'name': 'C', 'octave': 3}, {'freq': 69.295657739999996, 'name': 'C#', 'octave': 3}, {'freq': 73.416191979999994, 'name': 'D', 'octave': 3}, {'freq': 77.78174593, 'name': 'D#', 'octave': 3}, {'freq': 82.406889230000004, 'name': 'E', 'octave': 3}, {'freq': 87.30705786, 'name': 'F', 'octave': 3}, {'freq': 92.498605679999997, 'name': 'F#', 'octave': 3}, {'freq': 97.998858999999996, 'name': 'G', 'octave': 3}, {'freq': 103.8261744, 'name': 'G#', 'octave': 3}, {'freq': 110.0, 'name': 'A', 'octave': 3}, {'freq': 116.5409404, 'name': 'A#', 'octave': 3}, {'freq': 123.4708253, 'name': 'B', 'octave': 3}, {'freq': 130.81278270000001, 'name': 'C', 'octave': 4}, {'freq': 138.59131550000001, 'name': 'C#', 'octave': 4}, {'freq': 146.83238399999999, 'name': 'D', 'octave': 4}, {'freq': 155.5634919, 'name': 'D#', 'octave': 4}, {'freq': 164.81377850000001, 'name': 'E', 'octave': 4}, {'freq': 174.61411570000001, 'name': 'F', 'octave': 4}, {'freq': 184.9972114, 'name': 'F#', 'octave': 4}, {'freq': 195.99771799999999, 'name': 'G', 'octave': 4}, {'freq': 207.6523488, 'name': 'G#', 'octave': 4}, {'freq': 220.0, 'name': 'A', 'octave': 4}, {'freq': 233.08188079999999, 'name': 'A#', 'octave': 4}, {'freq': 246.9416506, 'name': 'B', 'octave': 4}, {'freq': 261.62556530000001, 'name': 'C', 'octave': 5}, {'freq': 277.18263100000001, 'name': 'C#', 'octave': 5}, {'freq': 293.66476790000002, 'name': 'D', 'octave': 5}, {'freq': 311.12698369999998, 'name': 'D#', 'octave': 5}, {'freq': 329.6275569, 'name': 'E', 'octave': 5}, {'freq': 349.22823140000003, 'name': 'F', 'octave': 5}, {'freq': 369.99442269999997, 'name': 'F#', 'octave': 5}, {'freq': 391.99543599999998, 'name': 'G', 'octave': 5}, {'freq': 415.3046976, 'name': 'G#', 'octave': 5}, {'freq': 440.0, 'name': 'A', 'octave': 5}, {'freq': 466.16376150000002, 'name': 'A#', 'octave': 5}, {'freq': 493.88330130000003, 'name': 'B', 'octave': 5}, {'freq': 523.25113060000001, 'name': 'C', 'octave': 6}, {'freq': 554.36526200000003, 'name': 'C#', 'octave': 6}, {'freq': 587.32953580000003, 'name': 'D', 'octave': 6}, {'freq': 622.25396739999996, 'name': 'D#', 'octave': 6}, {'freq': 659.2551138, 'name': 'E', 'octave': 6}, {'freq': 698.45646290000002, 'name': 'F', 'octave': 6}, {'freq': 739.98884539999995, 'name': 'F#', 'octave': 6}, {'freq': 783.99087199999997, 'name': 'G', 'octave': 6}, {'freq': 830.60939519999999, 'name': 'G#', 'octave': 6}, {'freq': 880.0, 'name': 'A', 'octave': 6}, {'freq': 932.32752300000004, 'name': 'A#', 'octave': 6}, {'freq': 987.76660249999998, 'name': 'B', 'octave': 6}, {'freq': 1046.5022610000001, 'name': 'C', 'octave': 7}, {'freq': 1108.7305240000001, 'name': 'C#', 'octave': 7}, {'freq': 1174.6590719999999, 'name': 'D', 'octave': 7}, {'freq': 1244.5079350000001, 'name': 'D#', 'octave': 7}, {'freq': 1318.5102280000001, 'name': 'E', 'octave': 7}, {'freq': 1396.912926, 'name': 'F', 'octave': 7}, {'freq': 1479.977691, 'name': 'F#', 'octave': 7}, {'freq': 1567.9817439999999, 'name': 'G', 'octave': 7}, {'freq': 1661.2187899999999, 'name': 'G#', 'octave': 7}, {'freq': 1760.0, 'name': 'A', 'octave': 7}, {'freq': 1864.6550460000001, 'name': 'A#', 'octave': 7}, {'freq': 1975.533205, 'name': 'B', 'octave': 7}, {'freq': 2093.0045220000002, 'name': 'C', 'octave': 8}, {'freq': 2217.4610480000001, 'name': 'C#', 'octave': 8}, {'freq': 2349.318143, 'name': 'D', 'octave': 8}, {'freq': 2489.0158700000002, 'name': 'D#', 'octave': 8}, {'freq': 2637.0204549999999, 'name': 'E', 'octave': 8}, {'freq': 2793.8258510000001, 'name': 'F', 'octave': 8}, {'freq': 2959.9553820000001, 'name': 'F#', 'octave': 8}, {'freq': 3135.9634879999999, 'name': 'G', 'octave': 8}, {'freq': 3322.4375810000001, 'name': 'G#', 'octave': 8}, {'freq': 3520.0, 'name': 'A', 'octave': 8}, {'freq': 3729.3100920000002, 'name': 'A#', 'octave': 8}, {'freq': 3951.0664099999999, 'name': 'B', 'octave': 8}, {'freq': 4186.0090449999998, 'name': 'C', 'octave': 9}, {'freq': 4434.9220960000002, 'name': 'C#', 'octave': 9}, {'freq': 4698.6362870000003, 'name': 'D', 'octave': 9}, {'freq': 4978.0317400000004, 'name': 'D#', 'octave': 9}, {'freq': 5274.0409110000001, 'name': 'E', 'octave': 9}, {'freq': 5587.6517030000005, 'name': 'F', 'octave': 9}, {'freq': 5919.9107629999999, 'name': 'F#', 'octave': 9}, {'freq': 6271.9269759999997, 'name': 'G', 'octave': 9}, {'freq': 6644.8751609999999, 'name': 'G#', 'octave': 9}, {'freq': 7040.0, 'name': 'A', 'octave': 9}, {'freq': 7458.6201840000003, 'name': 'A#', 'octave': 9}, {'freq': 7902.1328199999998, 'name': 'B', 'octave': 9}, {'freq': 8372.0180899999996, 'name': 'C', 'octave': 10}, {'freq': 8869.8441910000001, 'name': 'C#', 'octave': 10}, {'freq': 9397.2725730000002, 'name': 'D', 'octave': 10}, {'freq': 9956.0634790000004, 'name': 'D#', 'octave': 10}, {'freq': 10548.081819999999, 'name': 'E', 'octave': 10}, {'freq': 11175.30341, 'name': 'F', 'octave': 10}, {'freq': 11839.821529999999, 'name': 'F#', 'octave': 10}, {'freq': 12543.853950000001, 'name': 'G', 'octave': 10}]
note_list = [{'freq': 8.17579892, 'name': 'C', 'octave': 0}, {'freq': 8.66195722, 'name': 'C#', 'octave': 0}, {'freq': 9.177024, 'name': 'D', 'octave': 0}, {'freq': 9.72271824, 'name': 'D#', 'octave': 0}, {'freq': 10.30086115, 'name': 'E', 'octave': 0}, {'freq': 10.91338223, 'name': 'F', 'octave': 0}, {'freq': 11.56232571, 'name': 'F#', 'octave': 0}, {'freq': 12.24985737, 'name': 'G', 'octave': 0}, {'freq': 12.9782718, 'name': 'G#', 'octave': 0}, {'freq': 13.75, 'name': 'A', 'octave': 0}, {'freq': 14.56761755, 'name': 'A#', 'octave': 0}, {'freq': 15.43385316, 'name': 'B', 'octave': 0}, {'freq': 16.35159783, 'name': 'C', 'octave': 1}, {'freq': 17.32391444, 'name': 'C#', 'octave': 1}, {'freq': 18.35404799, 'name': 'D', 'octave': 1}, {'freq': 19.44543648, 'name': 'D#', 'octave': 1}, {'freq': 20.60172231, 'name': 'E', 'octave': 1}, {'freq': 21.82676446, 'name': 'F', 'octave': 1}, {'freq': 23.12465142, 'name': 'F#', 'octave': 1}, {'freq': 24.49971475, 'name': 'G', 'octave': 1}, {'freq': 25.9565436, 'name': 'G#', 'octave': 1}, {'freq': 27.5, 'name': 'A', 'octave': 1}, {'freq': 29.13523509, 'name': 'A#', 'octave': 1}, {'freq': 30.86770633, 'name': 'B', 'octave': 1}, {'freq': 32.70319566, 'name': 'C', 'octave': 2}, {'freq': 34.64782887, 'name': 'C#', 'octave': 2}, {'freq': 36.70809599, 'name': 'D', 'octave': 2}, {'freq': 38.89087297, 'name': 'D#', 'octave': 2}, {'freq': 41.20344461, 'name': 'E', 'octave': 2}, {'freq': 43.65352893, 'name': 'F', 'octave': 2}, {'freq': 46.24930284, 'name': 'F#', 'octave': 2}, {'freq': 48.9994295, 'name': 'G', 'octave': 2}, {'freq': 51.9130872, 'name': 'G#', 'octave': 2}, {'freq': 55.0, 'name': 'A', 'octave': 2}, {'freq': 58.27047019, 'name': 'A#', 'octave': 2}, {'freq': 61.73541266, 'name': 'B', 'octave': 2}, {'freq': 65.40639133, 'name': 'C', 'octave': 3}, {'freq': 69.29565774, 'name': 'C#', 'octave': 3}, {'freq': 73.41619198, 'name': 'D', 'octave': 3}, {'freq': 77.78174593, 'name': 'D#', 'octave': 3}, {'freq': 82.40688923, 'name': 'E', 'octave': 3}, {'freq': 87.30705786, 'name': 'F', 'octave': 3}, {'freq': 92.49860568, 'name': 'F#', 'octave': 3}, {'freq': 97.998859, 'name': 'G', 'octave': 3}, {'freq': 103.8261744, 'name': 'G#', 'octave': 3}, {'freq': 110.0, 'name': 'A', 'octave': 3}, {'freq': 116.5409404, 'name': 'A#', 'octave': 3}, {'freq': 123.4708253, 'name': 'B', 'octave': 3}, {'freq': 130.8127827, 'name': 'C', 'octave': 4}, {'freq': 138.5913155, 'name': 'C#', 'octave': 4}, {'freq': 146.832384, 'name': 'D', 'octave': 4}, {'freq': 155.5634919, 'name': 'D#', 'octave': 4}, {'freq': 164.8137785, 'name': 'E', 'octave': 4}, {'freq': 174.6141157, 'name': 'F', 'octave': 4}, {'freq': 184.9972114, 'name': 'F#', 'octave': 4}, {'freq': 195.997718, 'name': 'G', 'octave': 4}, {'freq': 207.6523488, 'name': 'G#', 'octave': 4}, {'freq': 220.0, 'name': 'A', 'octave': 4}, {'freq': 233.0818808, 'name': 'A#', 'octave': 4}, {'freq': 246.9416506, 'name': 'B', 'octave': 4}, {'freq': 261.6255653, 'name': 'C', 'octave': 5}, {'freq': 277.182631, 'name': 'C#', 'octave': 5}, {'freq': 293.6647679, 'name': 'D', 'octave': 5}, {'freq': 311.1269837, 'name': 'D#', 'octave': 5}, {'freq': 329.6275569, 'name': 'E', 'octave': 5}, {'freq': 349.2282314, 'name': 'F', 'octave': 5}, {'freq': 369.9944227, 'name': 'F#', 'octave': 5}, {'freq': 391.995436, 'name': 'G', 'octave': 5}, {'freq': 415.3046976, 'name': 'G#', 'octave': 5}, {'freq': 440.0, 'name': 'A', 'octave': 5}, {'freq': 466.1637615, 'name': 'A#', 'octave': 5}, {'freq': 493.8833013, 'name': 'B', 'octave': 5}, {'freq': 523.2511306, 'name': 'C', 'octave': 6}, {'freq': 554.365262, 'name': 'C#', 'octave': 6}, {'freq': 587.3295358, 'name': 'D', 'octave': 6}, {'freq': 622.2539674, 'name': 'D#', 'octave': 6}, {'freq': 659.2551138, 'name': 'E', 'octave': 6}, {'freq': 698.4564629, 'name': 'F', 'octave': 6}, {'freq': 739.9888454, 'name': 'F#', 'octave': 6}, {'freq': 783.990872, 'name': 'G', 'octave': 6}, {'freq': 830.6093952, 'name': 'G#', 'octave': 6}, {'freq': 880.0, 'name': 'A', 'octave': 6}, {'freq': 932.327523, 'name': 'A#', 'octave': 6}, {'freq': 987.7666025, 'name': 'B', 'octave': 6}, {'freq': 1046.502261, 'name': 'C', 'octave': 7}, {'freq': 1108.730524, 'name': 'C#', 'octave': 7}, {'freq': 1174.659072, 'name': 'D', 'octave': 7}, {'freq': 1244.507935, 'name': 'D#', 'octave': 7}, {'freq': 1318.510228, 'name': 'E', 'octave': 7}, {'freq': 1396.912926, 'name': 'F', 'octave': 7}, {'freq': 1479.977691, 'name': 'F#', 'octave': 7}, {'freq': 1567.981744, 'name': 'G', 'octave': 7}, {'freq': 1661.21879, 'name': 'G#', 'octave': 7}, {'freq': 1760.0, 'name': 'A', 'octave': 7}, {'freq': 1864.655046, 'name': 'A#', 'octave': 7}, {'freq': 1975.533205, 'name': 'B', 'octave': 7}, {'freq': 2093.004522, 'name': 'C', 'octave': 8}, {'freq': 2217.461048, 'name': 'C#', 'octave': 8}, {'freq': 2349.318143, 'name': 'D', 'octave': 8}, {'freq': 2489.01587, 'name': 'D#', 'octave': 8}, {'freq': 2637.020455, 'name': 'E', 'octave': 8}, {'freq': 2793.825851, 'name': 'F', 'octave': 8}, {'freq': 2959.955382, 'name': 'F#', 'octave': 8}, {'freq': 3135.963488, 'name': 'G', 'octave': 8}, {'freq': 3322.437581, 'name': 'G#', 'octave': 8}, {'freq': 3520.0, 'name': 'A', 'octave': 8}, {'freq': 3729.310092, 'name': 'A#', 'octave': 8}, {'freq': 3951.06641, 'name': 'B', 'octave': 8}, {'freq': 4186.009045, 'name': 'C', 'octave': 9}, {'freq': 4434.922096, 'name': 'C#', 'octave': 9}, {'freq': 4698.636287, 'name': 'D', 'octave': 9}, {'freq': 4978.03174, 'name': 'D#', 'octave': 9}, {'freq': 5274.040911, 'name': 'E', 'octave': 9}, {'freq': 5587.651703, 'name': 'F', 'octave': 9}, {'freq': 5919.910763, 'name': 'F#', 'octave': 9}, {'freq': 6271.926976, 'name': 'G', 'octave': 9}, {'freq': 6644.875161, 'name': 'G#', 'octave': 9}, {'freq': 7040.0, 'name': 'A', 'octave': 9}, {'freq': 7458.620184, 'name': 'A#', 'octave': 9}, {'freq': 7902.13282, 'name': 'B', 'octave': 9}, {'freq': 8372.01809, 'name': 'C', 'octave': 10}, {'freq': 8869.844191, 'name': 'C#', 'octave': 10}, {'freq': 9397.272573, 'name': 'D', 'octave': 10}, {'freq': 9956.063479, 'name': 'D#', 'octave': 10}, {'freq': 10548.08182, 'name': 'E', 'octave': 10}, {'freq': 11175.30341, 'name': 'F', 'octave': 10}, {'freq': 11839.82153, 'name': 'F#', 'octave': 10}, {'freq': 12543.85395, 'name': 'G', 'octave': 10}]
COLUMN_VARIABLES = ['M_t', 'H_t', 'W_t'] RAW_DATA_DIRECTORY = './sample_data' TRAIN_TEST_SPLIT_VALS = {'test_1':'2017-08-06', 'test_2':'2017-01-15', 'test_3':'2017-05-14', 'test_4':'2016-10-16'}
column_variables = ['M_t', 'H_t', 'W_t'] raw_data_directory = './sample_data' train_test_split_vals = {'test_1': '2017-08-06', 'test_2': '2017-01-15', 'test_3': '2017-05-14', 'test_4': '2016-10-16'}
# URI Online Judge 2762 entrada = input().split('.') saida = str(int(entrada[1])) + '.' + entrada[0] print(saida)
entrada = input().split('.') saida = str(int(entrada[1])) + '.' + entrada[0] print(saida)
dinero=2000 preciodelhelado=100 incrementodelpreciodelhelado=1.20 edad=19 hambrequesatisfaceelhelado=edad hambresatisfecho=edad n=0 while (hambresatisfecho<85 and dinero>0): dinero=dinero-(preciodelhelado) hambresatisfecho=hambresatisfecho+hambrequesatisfaceelhelado preciodelhelado=preciodelhelado*incrementodelpreciodelhelado n=n+1 print("te tienes que comer", n, "helados para llenarte") print("te queda", dinero, "euros")
dinero = 2000 preciodelhelado = 100 incrementodelpreciodelhelado = 1.2 edad = 19 hambrequesatisfaceelhelado = edad hambresatisfecho = edad n = 0 while hambresatisfecho < 85 and dinero > 0: dinero = dinero - preciodelhelado hambresatisfecho = hambresatisfecho + hambrequesatisfaceelhelado preciodelhelado = preciodelhelado * incrementodelpreciodelhelado n = n + 1 print('te tienes que comer', n, 'helados para llenarte') print('te queda', dinero, 'euros')
class DisabledFormMixin(): def __init__(self): for (_, field) in self.fields.items(): field.widget.attrs['disabled'] = True field.widget.attrs['readonly'] = True
class Disabledformmixin: def __init__(self): for (_, field) in self.fields.items(): field.widget.attrs['disabled'] = True field.widget.attrs['readonly'] = True
{ "targets": [ { "target_name": "greet", "cflags!": ["-fno-exceptions"], "cflags_cc!": ["-fno-exceptions"], "sources": [ "./src/cpp/greeting.cpp", "./src/cpp/count.cpp", "./src/cpp/custom_object.cpp", "./src/cpp/index.cpp" ], "include_dirs": [ "<!@(node -p \"require('node-addon-api').include\")" ], "defines": ["NAPI_DISABLE_CPP_EXCEPTIONS"], } ] }
{'targets': [{'target_name': 'greet', 'cflags!': ['-fno-exceptions'], 'cflags_cc!': ['-fno-exceptions'], 'sources': ['./src/cpp/greeting.cpp', './src/cpp/count.cpp', './src/cpp/custom_object.cpp', './src/cpp/index.cpp'], 'include_dirs': ['<!@(node -p "require(\'node-addon-api\').include")'], 'defines': ['NAPI_DISABLE_CPP_EXCEPTIONS']}]}
def get_register_info(registers, register_name): return registers[register_name].bit_offset def get_register_location_in_frame_data(registers, register_name, start_word_index=0): bit_offset = get_register_info(registers, register_name) word_index = (bit_offset >> 5) - start_word_index bit_index = bit_offset % 32 return word_index, bit_index def get_register_value_from_frame_data(registers, register_name, register_width, frame_data, start_word_index=0, fast=False): value = 0 for i in range(register_width): if register_width == 1: name = register_name else: name = register_name + '[' + str(i) + ']' word_index, bit_index = get_register_location_in_frame_data(registers, name, start_word_index) if fast: bit_value = ((int(frame_data[word_index], 2) >> bit_index) & 0x1) ^ 0x1 else: bit_value = ((frame_data[word_index] >> bit_index) & 0x1) ^ 0x1 value = value | (bit_value << i) return value
def get_register_info(registers, register_name): return registers[register_name].bit_offset def get_register_location_in_frame_data(registers, register_name, start_word_index=0): bit_offset = get_register_info(registers, register_name) word_index = (bit_offset >> 5) - start_word_index bit_index = bit_offset % 32 return (word_index, bit_index) def get_register_value_from_frame_data(registers, register_name, register_width, frame_data, start_word_index=0, fast=False): value = 0 for i in range(register_width): if register_width == 1: name = register_name else: name = register_name + '[' + str(i) + ']' (word_index, bit_index) = get_register_location_in_frame_data(registers, name, start_word_index) if fast: bit_value = int(frame_data[word_index], 2) >> bit_index & 1 ^ 1 else: bit_value = frame_data[word_index] >> bit_index & 1 ^ 1 value = value | bit_value << i return value
files = [ "midi.vhdl", "midi.ucf", "clock_divider.vhdl", "shift_out.vhdl", ]
files = ['midi.vhdl', 'midi.ucf', 'clock_divider.vhdl', 'shift_out.vhdl']
# # PySNMP MIB module ENDRUNTECHNOLOGIES-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ENDRUNTECHNOLOGIES-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:02:48 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Bits, ObjectIdentity, TimeTicks, IpAddress, ModuleIdentity, iso, Counter32, Unsigned32, MibIdentifier, Counter64, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, enterprises, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "ObjectIdentity", "TimeTicks", "IpAddress", "ModuleIdentity", "iso", "Counter32", "Unsigned32", "MibIdentifier", "Counter64", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "enterprises", "Integer32") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") endRunTechnologiesMIB = MibIdentifier((1, 3, 6, 1, 4, 1, 13827)) endRunTechnologies = ModuleIdentity((1, 3, 6, 1, 4, 1, 13827, 0)) if mibBuilder.loadTexts: endRunTechnologies.setLastUpdated('0208190000Z') if mibBuilder.loadTexts: endRunTechnologies.setOrganization('EndRun Technologies LLC') if mibBuilder.loadTexts: endRunTechnologies.setContactInfo('Technical Support 1-877-749-3878 snmpsupport@endruntechnologies.com') if mibBuilder.loadTexts: endRunTechnologies.setDescription('EndRun Technologies Enterprise MIB') praecisCntp = MibIdentifier((1, 3, 6, 1, 4, 1, 13827, 1)) cntp = MibIdentifier((1, 3, 6, 1, 4, 1, 13827, 1, 0)) cntptrap = MibIdentifier((1, 3, 6, 1, 4, 1, 13827, 1, 0, 0)) cdma = MibIdentifier((1, 3, 6, 1, 4, 1, 13827, 1, 1)) cdmatrap = MibIdentifier((1, 3, 6, 1, 4, 1, 13827, 1, 1, 0)) cntpTrapLeapIndBitsChange = NotificationType((1, 3, 6, 1, 4, 1, 13827, 1, 0, 0, 1)).setObjects(("ENDRUNTECHNOLOGIES-MIB", "cntpLeapIndBits")) if mibBuilder.loadTexts: cntpTrapLeapIndBitsChange.setStatus('current') if mibBuilder.loadTexts: cntpTrapLeapIndBitsChange.setDescription('A cntpTrapNTPLeapIndBitsChange trap signifies that the value of the leap indicator bits contained in the NTP reply packets sent by the time server has changed. The current value of these bits is contained in the included cntpLeapIndBits. The decimal value of these bits ranges from 0 to 3: 0 is the no fault, no leap warning condition 1 is the no fault, leap second insertion warning condition 2 is the no fault, leap second deletion warning condition 3 is the unsynchronized, alarm condition') cntpTrapStratumChange = NotificationType((1, 3, 6, 1, 4, 1, 13827, 1, 0, 0, 2)).setObjects(("ENDRUNTECHNOLOGIES-MIB", "cntpStratum")) if mibBuilder.loadTexts: cntpTrapStratumChange.setStatus('current') if mibBuilder.loadTexts: cntpTrapStratumChange.setDescription('A cntpTrapStratumChange trap signifies that the value of the stratum field contained in the NTP reply packets sent by the time server has changed. The current value is contained in the included variable, cntpStratum. The decimal value of this field ranges from 1 to 16: 1 is the synchronized, actively locked to the reference UTC source stratum 11 is the synchronized, but flywheeling on the local real time clock stratum 16 is the unsynchronized stratum level') cntpRxPkts = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntpRxPkts.setStatus('current') if mibBuilder.loadTexts: cntpRxPkts.setDescription('Total number of NTP request packets received by the NTP daemon.') cntpTxPkts = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntpTxPkts.setStatus('current') if mibBuilder.loadTexts: cntpTxPkts.setDescription('Total number of NTP reply packets transmitted by the NTP daemon.') cntpIgnoredPkts = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntpIgnoredPkts.setStatus('current') if mibBuilder.loadTexts: cntpIgnoredPkts.setDescription('Total number of NTP request packets ignored by the NTP daemon.') cntpDroppedPkts = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntpDroppedPkts.setStatus('current') if mibBuilder.loadTexts: cntpDroppedPkts.setDescription('Total number of NTP request packets dropped by the NTP daemon.') cntpAuthFail = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntpAuthFail.setStatus('current') if mibBuilder.loadTexts: cntpAuthFail.setDescription('Total number of authentication failures detected by the NTP daemon.') cntpTimeFigureOfMerit = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(6, 7, 8, 9))).clone(namedValues=NamedValues(("lessthan100us", 6), ("lessthan1ms", 7), ("lessthan10ms", 8), ("greaterthan10ms", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntpTimeFigureOfMerit.setStatus('current') if mibBuilder.loadTexts: cntpTimeFigureOfMerit.setDescription('The Time Figure of Merit (TFOM) value ranges from 4 to 9 and indicates the current estimate of the worst case time error. It is a logarithmic scale, with each increment indicating a tenfold increase in the worst case time error boundaries. The scale is referenced to a worst case time error of 100 picoseconds, equivalent to a TFOM of zero. During normal locked operation with CDMA the TFOM is 6 and implies a worst case time error of 100 microseconds. During periods of signal loss, the CDMA sub-system will compute an extrapolated worst case time error. One hour after the worst case time error has reached the value equivalent to a TFOM of 9, the NTP server will cease to send stratum 1 reply packets and an Alarm LED will be energized.') cntpLeapIndBits = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("noFaultorLeap", 0), ("leapInsWarning", 1), ("leapDelWarning", 2), ("unSynchronized", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntpLeapIndBits.setStatus('current') if mibBuilder.loadTexts: cntpLeapIndBits.setDescription('This is a status code indicating: normal operation, a leap second to be inserted in the last minute of the current day, a leap second to be deleted in the last second of the day or an alarm condition indicating loss of timing synchronization. The leap indicator field of NTP reply packets sent from this server is set to cntpLeapIndBits.') cntpSyncSource = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 4))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntpSyncSource.setStatus('current') if mibBuilder.loadTexts: cntpSyncSource.setDescription('This is an ASCII string identifying the synchronization source for this NTP server. It is one of CDMA, CPU or NONE. If it is NONE, then the server is not synchronized, has its Leap Indicator Bits in the Alarm state and is running at Stratum 16. If it is CPU, then the server is free running on its NTP disciplined CPU clock at Stratum 11. Check the Stratum, Leap Indicator Bits and Time Figure of Merit for further information. NTP reply packets from this server will have the reference identifier field set to cntpSyncSource if it is CDMA. Otherwise it will be set to either 127.127.1.0 (CPU) or 0.0.0.0 (NONE).') cntpOffsetToCDMAReference = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntpOffsetToCDMAReference.setStatus('current') if mibBuilder.loadTexts: cntpOffsetToCDMAReference.setDescription('This is an ASCII string containing the floating value of the current offset in units of seconds of the NTP server CPU clock to the CDMA reference time. Positive values imply that the NTP server clock is ahead of the CDMA reference time.') cntpStratum = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 11, 16))).clone(namedValues=NamedValues(("cntpStratumOne", 1), ("cntpStratumFlywheeling", 11), ("cntpStratumUnsync", 16)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntpStratum.setStatus('current') if mibBuilder.loadTexts: cntpStratum.setDescription('This is an integer showing the current stratum level being reported by the NTP daemon in its reply packets to clients. If it is 1, then the server is fully synchronized and delivering Stratum 1 accuracy. If it is 16, then the server is unambiguously unsynchronized. If it is 11, and the previous stratum value was 1, then the server is flywheeling on the local CPU clock. However, if the previous stratum value was 16, then the server has synchronized to its CPU Real Time Clock. NTP clients on the network should be configured to not use the time from this server if the stratum is not 1.') cntpVersion = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntpVersion.setStatus('current') if mibBuilder.loadTexts: cntpVersion.setDescription('This is an ASCII string showing the NTP server firmware version.') cdmaTrapFaultStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 13827, 1, 1, 0, 1)).setObjects(("ENDRUNTECHNOLOGIES-MIB", "cdmaFaultStatus")) if mibBuilder.loadTexts: cdmaTrapFaultStatusChange.setStatus('current') if mibBuilder.loadTexts: cdmaTrapFaultStatusChange.setDescription('A cdmaTrapFaultStatusChange trap signifies that the value of the fault status word reported by the CDMA sub-system has changed. The current value is contained in the included cdmaFaultStatus.') cdmaFaultStatus = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 1), Bits().clone(namedValues=NamedValues(("cdmaNotUsed", 0), ("cdmaNTPNotPolling", 1), ("cdmaLOFailure", 2), ("cdmaLOPLLFlt", 3), ("cdmaFLASHWriteFlt", 4), ("cdmaFPGACfgFlt", 5), ("cdmaNoSignalTimeout", 6), ("cdmaDACNearLimit", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdmaFaultStatus.setStatus('current') if mibBuilder.loadTexts: cdmaFaultStatus.setDescription("This is a bit string contained in one character representing the least significant two nibbles of the CDMA fault status word. Unfortunately, SNMP numbers the bits in the reverse order, so that the enumerated values are backwards from the description contained in the User's Manual for the fault status field returned by the cdmastat command. Each bit indicates a fault when set. Currently defined fault states encoded in this value: Bit 7: DAC controlling the TCXO is near the high or low limit. Bit 6: Time Figure of Merit has been 9 (unsynchronized) for 1 hour. Bit 5: Field Programmable Gate Array (FPGA) did not configure properly. Bit 4: FLASH memory had a write fault. Bit 3: Local Oscillator PLL fault. Bit 2: Local Oscillator PLL failed. Bit 1: NTP daemon is not polling the CDMA reference clock. Bit 0: Not Used.") cdmaTimeFigureOfMerit = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(6, 7, 8, 9))).clone(namedValues=NamedValues(("lessthan100us", 6), ("lessthan1ms", 7), ("lessthan10ms", 8), ("greaterthan10ms", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdmaTimeFigureOfMerit.setStatus('current') if mibBuilder.loadTexts: cdmaTimeFigureOfMerit.setDescription('The Time Figure of Merit (TFOM) value ranges from 6 to 9 and indicates the current estimate of the worst case time error. It is a logarithmic scale, with each increment indicating a tenfold increase in the worst case time error boundaries. The scale is referenced to a worst case time error of 100 picoseconds, equivalent to a TFOM of zero. During normal locked operation the TFOM is 6 and implies a worst case time error of 100 microseconds. During periods of signal loss, the CDMA sub-system will compute an extrapolated worst case time error. One hour after the worst case time error has reached the value equivalent to a TFOM of 9, the NTP server will cease to send stratum 1 reply packets and an Alarm LED will be energized.') cdmaSigProcState = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 4, 8))).clone(namedValues=NamedValues(("cdmaAcquiring", 0), ("cdmaDetected", 1), ("cdmaCodeLocking", 2), ("cdmaCarrierLocking", 4), ("cdmaLocked", 8)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdmaSigProcState.setStatus('current') if mibBuilder.loadTexts: cdmaSigProcState.setDescription('Current CDMA signal processor state. One of 0, 1, 2, 4 or 8, with 0 indicating the acquisition state and 8 the fully locked on state.') cdmaChannel = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("priAbandclass0subclass0", 0), ("priBbandclass0subclass0", 1), ("secAbandclass0subclass0", 2), ("secBbandclass0subclass0", 3), ("priAbandclass0subclass1", 4), ("priBbandclass0subclass1", 5), ("secAbandclass0subclass1", 6), ("secBbandclass0subclass1", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdmaChannel.setStatus('current') if mibBuilder.loadTexts: cdmaChannel.setDescription('Current CDMA frequency band and channel being used. Channels 0-3 are the North American cellular channels. Channels 4-7 are the South Korean cellular channels.') cdmaPNO = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 511))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdmaPNO.setStatus('current') if mibBuilder.loadTexts: cdmaPNO.setDescription('Current Pseudo Noise Offset of the base station being tracked. The value ranges from 0 to 511 and is in units of 64 Pseudo Noise Code chips. This offset serves as a base station identifier that is analogous to the Pseudo Random Noise (PRN) codes used by the individual satellites in the GPS system.') cdmaAGC = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdmaAGC.setStatus('current') if mibBuilder.loadTexts: cdmaAGC.setDescription('Current 8 bit, Automatic Gain Control (AGC) DAC value. Typical values are around 200, but proximity to the base station, type of building construction and orientation within the building have a strong influence on this value. More positive values have the effect of increasing the RF gain.') cdmaVCDAC = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdmaVCDAC.setStatus('current') if mibBuilder.loadTexts: cdmaVCDAC.setDescription('Current 16 bit, Voltage Controlled TCXO DAC value. Typical range is 20000 to 40000, where more positive numbers have the effect of raising the TCXO frequency.') cdmaCarrierToNoiseRatio = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 4))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdmaCarrierToNoiseRatio.setStatus('current') if mibBuilder.loadTexts: cdmaCarrierToNoiseRatio.setDescription('ASCII string representing the current received CDMA signal carrier-to-noise ratio, a unitless quantity. Numbers less than 2.5 indicate a very weak signal condition.') cdmaFrameErrorRate = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 5))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdmaFrameErrorRate.setStatus('current') if mibBuilder.loadTexts: cdmaFrameErrorRate.setDescription('ASCII string representing the current sync channel message error rate, a number ranging from 0.000 to 1.000. It indicates the proportion of messages received that fail the Cyclical Redundancy Check.') cdmaLeapMode = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdmaLeapMode.setStatus('current') if mibBuilder.loadTexts: cdmaLeapMode.setDescription('ASCII string showing the current leap second mode of operation for the CDMA sub-system. It is either AUTO or USER. If the mode is USER, then the current and future values of the UTC to GPS leap second offset is also included.') cdmaCurrentLeapSeconds = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdmaCurrentLeapSeconds.setStatus('current') if mibBuilder.loadTexts: cdmaCurrentLeapSeconds.setDescription('This value is the current difference in seconds between GPS time and UTC time. GPS time is ahead of UTC time by this amount.') cdmaFutureLeapSeconds = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdmaFutureLeapSeconds.setStatus('current') if mibBuilder.loadTexts: cdmaFutureLeapSeconds.setDescription('This value is the future difference in seconds between GPS time and UTC time. Leap seconds may be inserted or deleted from the UTC timescale twice during the year: Dec 31 and June 30 at UTC midnight. If this value is the same as cdmaCurrentLeapSeconds, then no leap second insertion or deletion will occur at the next possible time. If it is different, then the change will take affect at the next possible time. GPS time will be ahead of UTC time by this amount.') cdmaVersion = MibScalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdmaVersion.setStatus('current') if mibBuilder.loadTexts: cdmaVersion.setDescription('ASCII string showing the CDMA sub-system firmware and FPGA versions.') praecisGntp = MibIdentifier((1, 3, 6, 1, 4, 1, 13827, 2)) gntp = MibIdentifier((1, 3, 6, 1, 4, 1, 13827, 2, 0)) gntptrap = MibIdentifier((1, 3, 6, 1, 4, 1, 13827, 2, 0, 0)) gps = MibIdentifier((1, 3, 6, 1, 4, 1, 13827, 2, 1)) gpstrap = MibIdentifier((1, 3, 6, 1, 4, 1, 13827, 2, 1, 0)) gntpTrapLeapIndBitsChange = NotificationType((1, 3, 6, 1, 4, 1, 13827, 2, 0, 0, 1)).setObjects(("ENDRUNTECHNOLOGIES-MIB", "gntpLeapIndBits")) if mibBuilder.loadTexts: gntpTrapLeapIndBitsChange.setStatus('current') if mibBuilder.loadTexts: gntpTrapLeapIndBitsChange.setDescription('A gntpTrapNTPLeapIndBitsChange trap signifies that the value of the leap indicator bits contained in the NTP reply packets sent by the time server has changed. The current value of these bits is contained in the included gntpLeapIndBits. The decimal value of these bits ranges from 0 to 3: 0 is the no fault, no leap warning condition 1 is the no fault, leap second insertion warning condition 2 is the no fault, leap second deletion warning condition 3 is the unsynchronized, alarm condition') gntpTrapStratumChange = NotificationType((1, 3, 6, 1, 4, 1, 13827, 2, 0, 0, 2)).setObjects(("ENDRUNTECHNOLOGIES-MIB", "gntpStratum")) if mibBuilder.loadTexts: gntpTrapStratumChange.setStatus('current') if mibBuilder.loadTexts: gntpTrapStratumChange.setDescription('A gntpTrapStratumChange trap signifies that the value of the stratum field contained in the NTP reply packets sent by the time server has changed. The current value is contained in the included variable, gntpStratum. The decimal value of this field ranges from 1 to 16: 1 is the synchronized, actively locked to the reference UTC source stratum 11 is the synchronized, but flywheeling on the local real time clock stratum 16 is the unsynchronized stratum level') gntpRxPkts = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: gntpRxPkts.setStatus('current') if mibBuilder.loadTexts: gntpRxPkts.setDescription('Total number of NTP request packets received by the NTP daemon.') gntpTxPkts = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: gntpTxPkts.setStatus('current') if mibBuilder.loadTexts: gntpTxPkts.setDescription('Total number of NTP reply packets transmitted by the NTP daemon.') gntpIgnoredPkts = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: gntpIgnoredPkts.setStatus('current') if mibBuilder.loadTexts: gntpIgnoredPkts.setDescription('Total number of NTP request packets ignored by the NTP daemon.') gntpDroppedPkts = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: gntpDroppedPkts.setStatus('current') if mibBuilder.loadTexts: gntpDroppedPkts.setDescription('Total number of NTP request packets dropped by the NTP daemon.') gntpAuthFail = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: gntpAuthFail.setStatus('current') if mibBuilder.loadTexts: gntpAuthFail.setDescription('Total number of authentication failures detected by the NTP daemon.') gntpTimeFigureOfMerit = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("lessthan1us", 4), ("lessthan10us", 5), ("lessthan100us", 6), ("lessthan1ms", 7), ("lessthan10ms", 8), ("greaterthan10ms", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: gntpTimeFigureOfMerit.setStatus('current') if mibBuilder.loadTexts: gntpTimeFigureOfMerit.setDescription('The Time Figure of Merit (TFOM) value ranges from 4 to 9 and indicates the current estimate of the worst case time error. It is a logarithmic scale, with each increment indicating a tenfold increase in the worst case time error boundaries. The scale is referenced to a worst case time error of 100 picoseconds, equivalent to a TFOM of zero. During normal locked operation with GPS the TFOM is 4 and implies a worst case time error of 1 microsecond. During periods of signal loss, the GPS sub-system will compute an extrapolated worst case time error. One hour after the worst case time error has reached the value equivalent to a TFOM of 9, the NTP server will cease to send stratum 1 reply packets and an Alarm LED will be energized.') gntpLeapIndBits = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("noFaultorLeap", 0), ("leapInsWarning", 1), ("leapDelWarning", 2), ("unSynchronized", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: gntpLeapIndBits.setStatus('current') if mibBuilder.loadTexts: gntpLeapIndBits.setDescription('This is a status code indicating: normal operation, a leap second to be inserted in the last minute of the current day, a leap second to be deleted in the last second of the day or an alarm condition indicating loss of timing synchronization. The leap indicator field of NTP reply packets sent from this server is set to gntpLeapIndBits.') gntpSyncSource = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 4))).setMaxAccess("readonly") if mibBuilder.loadTexts: gntpSyncSource.setStatus('current') if mibBuilder.loadTexts: gntpSyncSource.setDescription('This is an ASCII string identifying the synchronization source for this NTP server. It is one of GPS, CPU or NONE. If it is NONE, then the server is not synchronized, has its Leap Indicator Bits in the Alarm state and is running at Stratum 16. If it is CPU, then the server is running on its NTP disciplined CPU clock at Stratum 11. Check the Stratum, Leap Indicator Bits and Time Figure of Merit for further information. NTP reply packets from this server will have the reference identifier field set to gntpSyncSource if it is GPS. Otherwise it will be set to either 127.127.1.0 (CPU) or 0.0.0.0 (NONE).') gntpOffsetToGPSReference = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: gntpOffsetToGPSReference.setStatus('current') if mibBuilder.loadTexts: gntpOffsetToGPSReference.setDescription('This is an ASCII string containing the floating value of the current offset in units of seconds of the NTP server CPU clock to the GPS reference time. Positive values imply that the NTP server clock is ahead of the GPS reference time.') gntpStratum = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 11, 16))).clone(namedValues=NamedValues(("gntpStratumOne", 1), ("gntpStratumFlywheeling", 11), ("gntpStratumUnsync", 16)))).setMaxAccess("readonly") if mibBuilder.loadTexts: gntpStratum.setStatus('current') if mibBuilder.loadTexts: gntpStratum.setDescription('This is an integer showing the current stratum level being reported by the NTP daemon in its reply packets to clients. If it is 1, then the server is fully synchronized and delivering Stratum 1 accuracy. If it is 16, then the server is unambiguously unsynchronized. If it is 11, and the previous stratum value was 1, then the server is flywheeling on the local CPU clock. However, if the previous stratum value was 16, then the server has synchronized to its CPU Real Time Clock. NTP clients on the network should be configured to not use the time from this server if the stratum is not 1.') gntpVersion = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: gntpVersion.setStatus('current') if mibBuilder.loadTexts: gntpVersion.setDescription('This is an ASCII string showing the NTP server firmware version.') gpsTrapFaultStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 13827, 2, 1, 0, 1)).setObjects(("ENDRUNTECHNOLOGIES-MIB", "gpsFaultStatus")) if mibBuilder.loadTexts: gpsTrapFaultStatusChange.setStatus('current') if mibBuilder.loadTexts: gpsTrapFaultStatusChange.setDescription('A gpsTrapFaultStatusChange trap signifies that the value of the fault status word reported by the GPS sub-system has changed. The current value is contained in the included gpsFaultStatus.') gpsFaultStatus = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 1), Bits().clone(namedValues=NamedValues(("gpsAntennaFlt", 0), ("gpsNTPNotPolling", 1), ("gpsnotused0", 2), ("gpsnotused1", 3), ("gpsFLASHWriteFlt", 4), ("gpsFPGACfgFlt", 5), ("gpsNoSignalTimeout", 6), ("gpsDACNearLimit", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: gpsFaultStatus.setStatus('current') if mibBuilder.loadTexts: gpsFaultStatus.setDescription("This is a bit string contained in one character representing the least significant two nibbles of the GPS fault status word. Unfortunately, SNMP numbers the bits in the reverse order, so that the enumerated values are backwards from the description contained in the User's Manual for the fault status field returned by the gpsstat command. Each bit indicates a fault when set. Currently defined fault states encoded in this value: Bit 7: DAC controlling the TCXO is near the high or low limit. Bit 6: Time Figure of Merit has been 9 (unsynchronized) for 1 hour. Bit 5: Field Programmable Gate Array (FPGA) did not configure properly. Bit 4: FLASH memory had a write fault. Bit 3: Not Used. Bit 2: Not Used. Bit 1: NTP daemon is not polling the GPS reference clock. Bit 0: GPS antenna or feedline is shorted or open.") gpsTimeFigureOfMerit = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("lessthan1us", 4), ("lessthan10us", 5), ("lessthan100us", 6), ("lessthan1ms", 7), ("lessthan10ms", 8), ("greaterthan10ms", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: gpsTimeFigureOfMerit.setStatus('current') if mibBuilder.loadTexts: gpsTimeFigureOfMerit.setDescription('The Time Figure of Merit (TFOM) value ranges from 4 to 9 and indicates the current estimate of the worst case time error. It is a logarithmic scale, with each increment indicating a tenfold increase in the worst case time error boundaries. The scale is referenced to a worst case time error of 100 picoseconds, equivalent to a TFOM of zero. During normal locked operation the TFOM is 4 and implies a worst case time error of 1 microsecond. During periods of signal loss, the GPS sub-system will compute an extrapolated worst case time error. One hour after the worst case time error has reached the value equivalent to a TFOM of 9, the NTP server will cease to send stratum 1 reply packets and an Alarm LED will be energized.') gpsSigProcState = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("gpsAcquiring", 0), ("gpsLocking", 1), ("gpsLocked", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: gpsSigProcState.setStatus('current') if mibBuilder.loadTexts: gpsSigProcState.setDescription('Current GPS signal processor state. One of 0, 1 or 2, with 0 being the acquisition state and 2 the fully locked on state.') gpsNumTrackSats = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 8))).setMaxAccess("readonly") if mibBuilder.loadTexts: gpsNumTrackSats.setStatus('current') if mibBuilder.loadTexts: gpsNumTrackSats.setDescription('Current number of GPS satellites being tracked.') gpsVCDAC = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: gpsVCDAC.setStatus('current') if mibBuilder.loadTexts: gpsVCDAC.setDescription('Current 16 bit, Voltage Controlled TCXO DAC value. Typical range is 20000 to 40000, where more positive numbers have the effect of raising the TCXO frequency.') gpsAvgCarrierToNoiseRatiodB = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 4))).setMaxAccess("readonly") if mibBuilder.loadTexts: gpsAvgCarrierToNoiseRatiodB.setStatus('current') if mibBuilder.loadTexts: gpsAvgCarrierToNoiseRatiodB.setDescription('ASCII string representing the current average carrier to noise ratio of all tracked satellites, in units of dB. Values less than 35 indicate weak signal conditions.') gpsReferencePosition = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: gpsReferencePosition.setStatus('current') if mibBuilder.loadTexts: gpsReferencePosition.setDescription('WGS-84 latitude, longitude and height above the reference ellipsoid of the GPS antenna. Ellipsoid height may deviate from local Mean Sea Level by as much as 100 meters.') gpsRefPosSource = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 3))).setMaxAccess("readonly") if mibBuilder.loadTexts: gpsRefPosSource.setStatus('current') if mibBuilder.loadTexts: gpsRefPosSource.setDescription('ASCII string indicating the source of the GPS antenna reference position. It is one of: USR (user supplied), AVG (automatically determined by averaging thousands of 3-D position fixes, UNK (unknown).') gpsCurrentLeapSeconds = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: gpsCurrentLeapSeconds.setStatus('current') if mibBuilder.loadTexts: gpsCurrentLeapSeconds.setDescription('This value is the current difference in seconds between GPS time and UTC time. GPS time is ahead of UTC time by this amount.') gpsFutureLeapSeconds = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: gpsFutureLeapSeconds.setStatus('current') if mibBuilder.loadTexts: gpsFutureLeapSeconds.setDescription('This value is the future difference in seconds between GPS time and UTC time. Leap seconds may be inserted or deleted from the UTC timescale twice during the year: Dec 31 and June 30 at UTC midnight. If this value is the same as cdmaCurrentLeapSeconds, then no leap second insertion or deletion will occur at the next possible time. If it is different, then the change will take affect at the next possible time. GPS time will be ahead of UTC time by this amount.') gpsVersion = MibScalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: gpsVersion.setStatus('current') if mibBuilder.loadTexts: gpsVersion.setDescription('ASCII string showing the GPS sub-system firmware and FPGA versions.') mibBuilder.exportSymbols("ENDRUNTECHNOLOGIES-MIB", cntptrap=cntptrap, cntpDroppedPkts=cntpDroppedPkts, cdmaSigProcState=cdmaSigProcState, cdmaAGC=cdmaAGC, cdmaFutureLeapSeconds=cdmaFutureLeapSeconds, cntpAuthFail=cntpAuthFail, cdmaCurrentLeapSeconds=cdmaCurrentLeapSeconds, gntpIgnoredPkts=gntpIgnoredPkts, cdmaFaultStatus=cdmaFaultStatus, gpsAvgCarrierToNoiseRatiodB=gpsAvgCarrierToNoiseRatiodB, cdmaTimeFigureOfMerit=cdmaTimeFigureOfMerit, gntpVersion=gntpVersion, cdmaTrapFaultStatusChange=cdmaTrapFaultStatusChange, gpsReferencePosition=gpsReferencePosition, gpsFaultStatus=gpsFaultStatus, cdmatrap=cdmatrap, gntp=gntp, cntpTimeFigureOfMerit=cntpTimeFigureOfMerit, cdmaCarrierToNoiseRatio=cdmaCarrierToNoiseRatio, cdmaFrameErrorRate=cdmaFrameErrorRate, gntpTrapStratumChange=gntpTrapStratumChange, praecisGntp=praecisGntp, gntpLeapIndBits=gntpLeapIndBits, gntpRxPkts=gntpRxPkts, gntpTxPkts=gntpTxPkts, cdmaVCDAC=cdmaVCDAC, gntpOffsetToGPSReference=gntpOffsetToGPSReference, cntpIgnoredPkts=cntpIgnoredPkts, gntpTrapLeapIndBitsChange=gntpTrapLeapIndBitsChange, gntpDroppedPkts=gntpDroppedPkts, cntpStratum=cntpStratum, gntpStratum=gntpStratum, cntpOffsetToCDMAReference=cntpOffsetToCDMAReference, gpsSigProcState=gpsSigProcState, cdmaLeapMode=cdmaLeapMode, gpsRefPosSource=gpsRefPosSource, gntpSyncSource=gntpSyncSource, gpsVCDAC=gpsVCDAC, gpsNumTrackSats=gpsNumTrackSats, cntpTrapLeapIndBitsChange=cntpTrapLeapIndBitsChange, endRunTechnologiesMIB=endRunTechnologiesMIB, cdmaPNO=cdmaPNO, endRunTechnologies=endRunTechnologies, gntpAuthFail=gntpAuthFail, cntpSyncSource=cntpSyncSource, gpsCurrentLeapSeconds=gpsCurrentLeapSeconds, praecisCntp=praecisCntp, cntp=cntp, cntpRxPkts=cntpRxPkts, gntptrap=gntptrap, gpstrap=gpstrap, cdma=cdma, cntpVersion=cntpVersion, cntpTxPkts=cntpTxPkts, cntpLeapIndBits=cntpLeapIndBits, cdmaChannel=cdmaChannel, cdmaVersion=cdmaVersion, gpsTrapFaultStatusChange=gpsTrapFaultStatusChange, gpsFutureLeapSeconds=gpsFutureLeapSeconds, gntpTimeFigureOfMerit=gntpTimeFigureOfMerit, cntpTrapStratumChange=cntpTrapStratumChange, PYSNMP_MODULE_ID=endRunTechnologies, gps=gps, gpsVersion=gpsVersion, gpsTimeFigureOfMerit=gpsTimeFigureOfMerit)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_size_constraint, constraints_union, value_range_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (bits, object_identity, time_ticks, ip_address, module_identity, iso, counter32, unsigned32, mib_identifier, counter64, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, notification_type, enterprises, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'ObjectIdentity', 'TimeTicks', 'IpAddress', 'ModuleIdentity', 'iso', 'Counter32', 'Unsigned32', 'MibIdentifier', 'Counter64', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'NotificationType', 'enterprises', 'Integer32') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') end_run_technologies_mib = mib_identifier((1, 3, 6, 1, 4, 1, 13827)) end_run_technologies = module_identity((1, 3, 6, 1, 4, 1, 13827, 0)) if mibBuilder.loadTexts: endRunTechnologies.setLastUpdated('0208190000Z') if mibBuilder.loadTexts: endRunTechnologies.setOrganization('EndRun Technologies LLC') if mibBuilder.loadTexts: endRunTechnologies.setContactInfo('Technical Support 1-877-749-3878 snmpsupport@endruntechnologies.com') if mibBuilder.loadTexts: endRunTechnologies.setDescription('EndRun Technologies Enterprise MIB') praecis_cntp = mib_identifier((1, 3, 6, 1, 4, 1, 13827, 1)) cntp = mib_identifier((1, 3, 6, 1, 4, 1, 13827, 1, 0)) cntptrap = mib_identifier((1, 3, 6, 1, 4, 1, 13827, 1, 0, 0)) cdma = mib_identifier((1, 3, 6, 1, 4, 1, 13827, 1, 1)) cdmatrap = mib_identifier((1, 3, 6, 1, 4, 1, 13827, 1, 1, 0)) cntp_trap_leap_ind_bits_change = notification_type((1, 3, 6, 1, 4, 1, 13827, 1, 0, 0, 1)).setObjects(('ENDRUNTECHNOLOGIES-MIB', 'cntpLeapIndBits')) if mibBuilder.loadTexts: cntpTrapLeapIndBitsChange.setStatus('current') if mibBuilder.loadTexts: cntpTrapLeapIndBitsChange.setDescription('A cntpTrapNTPLeapIndBitsChange trap signifies that the value of the leap indicator bits contained in the NTP reply packets sent by the time server has changed. The current value of these bits is contained in the included cntpLeapIndBits. The decimal value of these bits ranges from 0 to 3: 0 is the no fault, no leap warning condition 1 is the no fault, leap second insertion warning condition 2 is the no fault, leap second deletion warning condition 3 is the unsynchronized, alarm condition') cntp_trap_stratum_change = notification_type((1, 3, 6, 1, 4, 1, 13827, 1, 0, 0, 2)).setObjects(('ENDRUNTECHNOLOGIES-MIB', 'cntpStratum')) if mibBuilder.loadTexts: cntpTrapStratumChange.setStatus('current') if mibBuilder.loadTexts: cntpTrapStratumChange.setDescription('A cntpTrapStratumChange trap signifies that the value of the stratum field contained in the NTP reply packets sent by the time server has changed. The current value is contained in the included variable, cntpStratum. The decimal value of this field ranges from 1 to 16: 1 is the synchronized, actively locked to the reference UTC source stratum 11 is the synchronized, but flywheeling on the local real time clock stratum 16 is the unsynchronized stratum level') cntp_rx_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cntpRxPkts.setStatus('current') if mibBuilder.loadTexts: cntpRxPkts.setDescription('Total number of NTP request packets received by the NTP daemon.') cntp_tx_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cntpTxPkts.setStatus('current') if mibBuilder.loadTexts: cntpTxPkts.setDescription('Total number of NTP reply packets transmitted by the NTP daemon.') cntp_ignored_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cntpIgnoredPkts.setStatus('current') if mibBuilder.loadTexts: cntpIgnoredPkts.setDescription('Total number of NTP request packets ignored by the NTP daemon.') cntp_dropped_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cntpDroppedPkts.setStatus('current') if mibBuilder.loadTexts: cntpDroppedPkts.setDescription('Total number of NTP request packets dropped by the NTP daemon.') cntp_auth_fail = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cntpAuthFail.setStatus('current') if mibBuilder.loadTexts: cntpAuthFail.setDescription('Total number of authentication failures detected by the NTP daemon.') cntp_time_figure_of_merit = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(6, 7, 8, 9))).clone(namedValues=named_values(('lessthan100us', 6), ('lessthan1ms', 7), ('lessthan10ms', 8), ('greaterthan10ms', 9)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cntpTimeFigureOfMerit.setStatus('current') if mibBuilder.loadTexts: cntpTimeFigureOfMerit.setDescription('The Time Figure of Merit (TFOM) value ranges from 4 to 9 and indicates the current estimate of the worst case time error. It is a logarithmic scale, with each increment indicating a tenfold increase in the worst case time error boundaries. The scale is referenced to a worst case time error of 100 picoseconds, equivalent to a TFOM of zero. During normal locked operation with CDMA the TFOM is 6 and implies a worst case time error of 100 microseconds. During periods of signal loss, the CDMA sub-system will compute an extrapolated worst case time error. One hour after the worst case time error has reached the value equivalent to a TFOM of 9, the NTP server will cease to send stratum 1 reply packets and an Alarm LED will be energized.') cntp_leap_ind_bits = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('noFaultorLeap', 0), ('leapInsWarning', 1), ('leapDelWarning', 2), ('unSynchronized', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cntpLeapIndBits.setStatus('current') if mibBuilder.loadTexts: cntpLeapIndBits.setDescription('This is a status code indicating: normal operation, a leap second to be inserted in the last minute of the current day, a leap second to be deleted in the last second of the day or an alarm condition indicating loss of timing synchronization. The leap indicator field of NTP reply packets sent from this server is set to cntpLeapIndBits.') cntp_sync_source = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 4))).setMaxAccess('readonly') if mibBuilder.loadTexts: cntpSyncSource.setStatus('current') if mibBuilder.loadTexts: cntpSyncSource.setDescription('This is an ASCII string identifying the synchronization source for this NTP server. It is one of CDMA, CPU or NONE. If it is NONE, then the server is not synchronized, has its Leap Indicator Bits in the Alarm state and is running at Stratum 16. If it is CPU, then the server is free running on its NTP disciplined CPU clock at Stratum 11. Check the Stratum, Leap Indicator Bits and Time Figure of Merit for further information. NTP reply packets from this server will have the reference identifier field set to cntpSyncSource if it is CDMA. Otherwise it will be set to either 127.127.1.0 (CPU) or 0.0.0.0 (NONE).') cntp_offset_to_cdma_reference = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: cntpOffsetToCDMAReference.setStatus('current') if mibBuilder.loadTexts: cntpOffsetToCDMAReference.setDescription('This is an ASCII string containing the floating value of the current offset in units of seconds of the NTP server CPU clock to the CDMA reference time. Positive values imply that the NTP server clock is ahead of the CDMA reference time.') cntp_stratum = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 11, 16))).clone(namedValues=named_values(('cntpStratumOne', 1), ('cntpStratumFlywheeling', 11), ('cntpStratumUnsync', 16)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cntpStratum.setStatus('current') if mibBuilder.loadTexts: cntpStratum.setDescription('This is an integer showing the current stratum level being reported by the NTP daemon in its reply packets to clients. If it is 1, then the server is fully synchronized and delivering Stratum 1 accuracy. If it is 16, then the server is unambiguously unsynchronized. If it is 11, and the previous stratum value was 1, then the server is flywheeling on the local CPU clock. However, if the previous stratum value was 16, then the server has synchronized to its CPU Real Time Clock. NTP clients on the network should be configured to not use the time from this server if the stratum is not 1.') cntp_version = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 0, 11), display_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readonly') if mibBuilder.loadTexts: cntpVersion.setStatus('current') if mibBuilder.loadTexts: cntpVersion.setDescription('This is an ASCII string showing the NTP server firmware version.') cdma_trap_fault_status_change = notification_type((1, 3, 6, 1, 4, 1, 13827, 1, 1, 0, 1)).setObjects(('ENDRUNTECHNOLOGIES-MIB', 'cdmaFaultStatus')) if mibBuilder.loadTexts: cdmaTrapFaultStatusChange.setStatus('current') if mibBuilder.loadTexts: cdmaTrapFaultStatusChange.setDescription('A cdmaTrapFaultStatusChange trap signifies that the value of the fault status word reported by the CDMA sub-system has changed. The current value is contained in the included cdmaFaultStatus.') cdma_fault_status = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 1), bits().clone(namedValues=named_values(('cdmaNotUsed', 0), ('cdmaNTPNotPolling', 1), ('cdmaLOFailure', 2), ('cdmaLOPLLFlt', 3), ('cdmaFLASHWriteFlt', 4), ('cdmaFPGACfgFlt', 5), ('cdmaNoSignalTimeout', 6), ('cdmaDACNearLimit', 7)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdmaFaultStatus.setStatus('current') if mibBuilder.loadTexts: cdmaFaultStatus.setDescription("This is a bit string contained in one character representing the least significant two nibbles of the CDMA fault status word. Unfortunately, SNMP numbers the bits in the reverse order, so that the enumerated values are backwards from the description contained in the User's Manual for the fault status field returned by the cdmastat command. Each bit indicates a fault when set. Currently defined fault states encoded in this value: Bit 7: DAC controlling the TCXO is near the high or low limit. Bit 6: Time Figure of Merit has been 9 (unsynchronized) for 1 hour. Bit 5: Field Programmable Gate Array (FPGA) did not configure properly. Bit 4: FLASH memory had a write fault. Bit 3: Local Oscillator PLL fault. Bit 2: Local Oscillator PLL failed. Bit 1: NTP daemon is not polling the CDMA reference clock. Bit 0: Not Used.") cdma_time_figure_of_merit = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(6, 7, 8, 9))).clone(namedValues=named_values(('lessthan100us', 6), ('lessthan1ms', 7), ('lessthan10ms', 8), ('greaterthan10ms', 9)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdmaTimeFigureOfMerit.setStatus('current') if mibBuilder.loadTexts: cdmaTimeFigureOfMerit.setDescription('The Time Figure of Merit (TFOM) value ranges from 6 to 9 and indicates the current estimate of the worst case time error. It is a logarithmic scale, with each increment indicating a tenfold increase in the worst case time error boundaries. The scale is referenced to a worst case time error of 100 picoseconds, equivalent to a TFOM of zero. During normal locked operation the TFOM is 6 and implies a worst case time error of 100 microseconds. During periods of signal loss, the CDMA sub-system will compute an extrapolated worst case time error. One hour after the worst case time error has reached the value equivalent to a TFOM of 9, the NTP server will cease to send stratum 1 reply packets and an Alarm LED will be energized.') cdma_sig_proc_state = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 4, 8))).clone(namedValues=named_values(('cdmaAcquiring', 0), ('cdmaDetected', 1), ('cdmaCodeLocking', 2), ('cdmaCarrierLocking', 4), ('cdmaLocked', 8)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdmaSigProcState.setStatus('current') if mibBuilder.loadTexts: cdmaSigProcState.setDescription('Current CDMA signal processor state. One of 0, 1, 2, 4 or 8, with 0 indicating the acquisition state and 8 the fully locked on state.') cdma_channel = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('priAbandclass0subclass0', 0), ('priBbandclass0subclass0', 1), ('secAbandclass0subclass0', 2), ('secBbandclass0subclass0', 3), ('priAbandclass0subclass1', 4), ('priBbandclass0subclass1', 5), ('secAbandclass0subclass1', 6), ('secBbandclass0subclass1', 7)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdmaChannel.setStatus('current') if mibBuilder.loadTexts: cdmaChannel.setDescription('Current CDMA frequency band and channel being used. Channels 0-3 are the North American cellular channels. Channels 4-7 are the South Korean cellular channels.') cdma_pno = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 511))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdmaPNO.setStatus('current') if mibBuilder.loadTexts: cdmaPNO.setDescription('Current Pseudo Noise Offset of the base station being tracked. The value ranges from 0 to 511 and is in units of 64 Pseudo Noise Code chips. This offset serves as a base station identifier that is analogous to the Pseudo Random Noise (PRN) codes used by the individual satellites in the GPS system.') cdma_agc = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdmaAGC.setStatus('current') if mibBuilder.loadTexts: cdmaAGC.setDescription('Current 8 bit, Automatic Gain Control (AGC) DAC value. Typical values are around 200, but proximity to the base station, type of building construction and orientation within the building have a strong influence on this value. More positive values have the effect of increasing the RF gain.') cdma_vcdac = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdmaVCDAC.setStatus('current') if mibBuilder.loadTexts: cdmaVCDAC.setDescription('Current 16 bit, Voltage Controlled TCXO DAC value. Typical range is 20000 to 40000, where more positive numbers have the effect of raising the TCXO frequency.') cdma_carrier_to_noise_ratio = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 4))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdmaCarrierToNoiseRatio.setStatus('current') if mibBuilder.loadTexts: cdmaCarrierToNoiseRatio.setDescription('ASCII string representing the current received CDMA signal carrier-to-noise ratio, a unitless quantity. Numbers less than 2.5 indicate a very weak signal condition.') cdma_frame_error_rate = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 5))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdmaFrameErrorRate.setStatus('current') if mibBuilder.loadTexts: cdmaFrameErrorRate.setDescription('ASCII string representing the current sync channel message error rate, a number ranging from 0.000 to 1.000. It indicates the proportion of messages received that fail the Cyclical Redundancy Check.') cdma_leap_mode = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 10), display_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdmaLeapMode.setStatus('current') if mibBuilder.loadTexts: cdmaLeapMode.setDescription('ASCII string showing the current leap second mode of operation for the CDMA sub-system. It is either AUTO or USER. If the mode is USER, then the current and future values of the UTC to GPS leap second offset is also included.') cdma_current_leap_seconds = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdmaCurrentLeapSeconds.setStatus('current') if mibBuilder.loadTexts: cdmaCurrentLeapSeconds.setDescription('This value is the current difference in seconds between GPS time and UTC time. GPS time is ahead of UTC time by this amount.') cdma_future_leap_seconds = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 12), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdmaFutureLeapSeconds.setStatus('current') if mibBuilder.loadTexts: cdmaFutureLeapSeconds.setDescription('This value is the future difference in seconds between GPS time and UTC time. Leap seconds may be inserted or deleted from the UTC timescale twice during the year: Dec 31 and June 30 at UTC midnight. If this value is the same as cdmaCurrentLeapSeconds, then no leap second insertion or deletion will occur at the next possible time. If it is different, then the change will take affect at the next possible time. GPS time will be ahead of UTC time by this amount.') cdma_version = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 1, 1, 13), display_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdmaVersion.setStatus('current') if mibBuilder.loadTexts: cdmaVersion.setDescription('ASCII string showing the CDMA sub-system firmware and FPGA versions.') praecis_gntp = mib_identifier((1, 3, 6, 1, 4, 1, 13827, 2)) gntp = mib_identifier((1, 3, 6, 1, 4, 1, 13827, 2, 0)) gntptrap = mib_identifier((1, 3, 6, 1, 4, 1, 13827, 2, 0, 0)) gps = mib_identifier((1, 3, 6, 1, 4, 1, 13827, 2, 1)) gpstrap = mib_identifier((1, 3, 6, 1, 4, 1, 13827, 2, 1, 0)) gntp_trap_leap_ind_bits_change = notification_type((1, 3, 6, 1, 4, 1, 13827, 2, 0, 0, 1)).setObjects(('ENDRUNTECHNOLOGIES-MIB', 'gntpLeapIndBits')) if mibBuilder.loadTexts: gntpTrapLeapIndBitsChange.setStatus('current') if mibBuilder.loadTexts: gntpTrapLeapIndBitsChange.setDescription('A gntpTrapNTPLeapIndBitsChange trap signifies that the value of the leap indicator bits contained in the NTP reply packets sent by the time server has changed. The current value of these bits is contained in the included gntpLeapIndBits. The decimal value of these bits ranges from 0 to 3: 0 is the no fault, no leap warning condition 1 is the no fault, leap second insertion warning condition 2 is the no fault, leap second deletion warning condition 3 is the unsynchronized, alarm condition') gntp_trap_stratum_change = notification_type((1, 3, 6, 1, 4, 1, 13827, 2, 0, 0, 2)).setObjects(('ENDRUNTECHNOLOGIES-MIB', 'gntpStratum')) if mibBuilder.loadTexts: gntpTrapStratumChange.setStatus('current') if mibBuilder.loadTexts: gntpTrapStratumChange.setDescription('A gntpTrapStratumChange trap signifies that the value of the stratum field contained in the NTP reply packets sent by the time server has changed. The current value is contained in the included variable, gntpStratum. The decimal value of this field ranges from 1 to 16: 1 is the synchronized, actively locked to the reference UTC source stratum 11 is the synchronized, but flywheeling on the local real time clock stratum 16 is the unsynchronized stratum level') gntp_rx_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: gntpRxPkts.setStatus('current') if mibBuilder.loadTexts: gntpRxPkts.setDescription('Total number of NTP request packets received by the NTP daemon.') gntp_tx_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: gntpTxPkts.setStatus('current') if mibBuilder.loadTexts: gntpTxPkts.setDescription('Total number of NTP reply packets transmitted by the NTP daemon.') gntp_ignored_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: gntpIgnoredPkts.setStatus('current') if mibBuilder.loadTexts: gntpIgnoredPkts.setDescription('Total number of NTP request packets ignored by the NTP daemon.') gntp_dropped_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: gntpDroppedPkts.setStatus('current') if mibBuilder.loadTexts: gntpDroppedPkts.setDescription('Total number of NTP request packets dropped by the NTP daemon.') gntp_auth_fail = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: gntpAuthFail.setStatus('current') if mibBuilder.loadTexts: gntpAuthFail.setDescription('Total number of authentication failures detected by the NTP daemon.') gntp_time_figure_of_merit = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('lessthan1us', 4), ('lessthan10us', 5), ('lessthan100us', 6), ('lessthan1ms', 7), ('lessthan10ms', 8), ('greaterthan10ms', 9)))).setMaxAccess('readonly') if mibBuilder.loadTexts: gntpTimeFigureOfMerit.setStatus('current') if mibBuilder.loadTexts: gntpTimeFigureOfMerit.setDescription('The Time Figure of Merit (TFOM) value ranges from 4 to 9 and indicates the current estimate of the worst case time error. It is a logarithmic scale, with each increment indicating a tenfold increase in the worst case time error boundaries. The scale is referenced to a worst case time error of 100 picoseconds, equivalent to a TFOM of zero. During normal locked operation with GPS the TFOM is 4 and implies a worst case time error of 1 microsecond. During periods of signal loss, the GPS sub-system will compute an extrapolated worst case time error. One hour after the worst case time error has reached the value equivalent to a TFOM of 9, the NTP server will cease to send stratum 1 reply packets and an Alarm LED will be energized.') gntp_leap_ind_bits = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('noFaultorLeap', 0), ('leapInsWarning', 1), ('leapDelWarning', 2), ('unSynchronized', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: gntpLeapIndBits.setStatus('current') if mibBuilder.loadTexts: gntpLeapIndBits.setDescription('This is a status code indicating: normal operation, a leap second to be inserted in the last minute of the current day, a leap second to be deleted in the last second of the day or an alarm condition indicating loss of timing synchronization. The leap indicator field of NTP reply packets sent from this server is set to gntpLeapIndBits.') gntp_sync_source = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 4))).setMaxAccess('readonly') if mibBuilder.loadTexts: gntpSyncSource.setStatus('current') if mibBuilder.loadTexts: gntpSyncSource.setDescription('This is an ASCII string identifying the synchronization source for this NTP server. It is one of GPS, CPU or NONE. If it is NONE, then the server is not synchronized, has its Leap Indicator Bits in the Alarm state and is running at Stratum 16. If it is CPU, then the server is running on its NTP disciplined CPU clock at Stratum 11. Check the Stratum, Leap Indicator Bits and Time Figure of Merit for further information. NTP reply packets from this server will have the reference identifier field set to gntpSyncSource if it is GPS. Otherwise it will be set to either 127.127.1.0 (CPU) or 0.0.0.0 (NONE).') gntp_offset_to_gps_reference = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: gntpOffsetToGPSReference.setStatus('current') if mibBuilder.loadTexts: gntpOffsetToGPSReference.setDescription('This is an ASCII string containing the floating value of the current offset in units of seconds of the NTP server CPU clock to the GPS reference time. Positive values imply that the NTP server clock is ahead of the GPS reference time.') gntp_stratum = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 11, 16))).clone(namedValues=named_values(('gntpStratumOne', 1), ('gntpStratumFlywheeling', 11), ('gntpStratumUnsync', 16)))).setMaxAccess('readonly') if mibBuilder.loadTexts: gntpStratum.setStatus('current') if mibBuilder.loadTexts: gntpStratum.setDescription('This is an integer showing the current stratum level being reported by the NTP daemon in its reply packets to clients. If it is 1, then the server is fully synchronized and delivering Stratum 1 accuracy. If it is 16, then the server is unambiguously unsynchronized. If it is 11, and the previous stratum value was 1, then the server is flywheeling on the local CPU clock. However, if the previous stratum value was 16, then the server has synchronized to its CPU Real Time Clock. NTP clients on the network should be configured to not use the time from this server if the stratum is not 1.') gntp_version = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 0, 11), display_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readonly') if mibBuilder.loadTexts: gntpVersion.setStatus('current') if mibBuilder.loadTexts: gntpVersion.setDescription('This is an ASCII string showing the NTP server firmware version.') gps_trap_fault_status_change = notification_type((1, 3, 6, 1, 4, 1, 13827, 2, 1, 0, 1)).setObjects(('ENDRUNTECHNOLOGIES-MIB', 'gpsFaultStatus')) if mibBuilder.loadTexts: gpsTrapFaultStatusChange.setStatus('current') if mibBuilder.loadTexts: gpsTrapFaultStatusChange.setDescription('A gpsTrapFaultStatusChange trap signifies that the value of the fault status word reported by the GPS sub-system has changed. The current value is contained in the included gpsFaultStatus.') gps_fault_status = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 1), bits().clone(namedValues=named_values(('gpsAntennaFlt', 0), ('gpsNTPNotPolling', 1), ('gpsnotused0', 2), ('gpsnotused1', 3), ('gpsFLASHWriteFlt', 4), ('gpsFPGACfgFlt', 5), ('gpsNoSignalTimeout', 6), ('gpsDACNearLimit', 7)))).setMaxAccess('readonly') if mibBuilder.loadTexts: gpsFaultStatus.setStatus('current') if mibBuilder.loadTexts: gpsFaultStatus.setDescription("This is a bit string contained in one character representing the least significant two nibbles of the GPS fault status word. Unfortunately, SNMP numbers the bits in the reverse order, so that the enumerated values are backwards from the description contained in the User's Manual for the fault status field returned by the gpsstat command. Each bit indicates a fault when set. Currently defined fault states encoded in this value: Bit 7: DAC controlling the TCXO is near the high or low limit. Bit 6: Time Figure of Merit has been 9 (unsynchronized) for 1 hour. Bit 5: Field Programmable Gate Array (FPGA) did not configure properly. Bit 4: FLASH memory had a write fault. Bit 3: Not Used. Bit 2: Not Used. Bit 1: NTP daemon is not polling the GPS reference clock. Bit 0: GPS antenna or feedline is shorted or open.") gps_time_figure_of_merit = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('lessthan1us', 4), ('lessthan10us', 5), ('lessthan100us', 6), ('lessthan1ms', 7), ('lessthan10ms', 8), ('greaterthan10ms', 9)))).setMaxAccess('readonly') if mibBuilder.loadTexts: gpsTimeFigureOfMerit.setStatus('current') if mibBuilder.loadTexts: gpsTimeFigureOfMerit.setDescription('The Time Figure of Merit (TFOM) value ranges from 4 to 9 and indicates the current estimate of the worst case time error. It is a logarithmic scale, with each increment indicating a tenfold increase in the worst case time error boundaries. The scale is referenced to a worst case time error of 100 picoseconds, equivalent to a TFOM of zero. During normal locked operation the TFOM is 4 and implies a worst case time error of 1 microsecond. During periods of signal loss, the GPS sub-system will compute an extrapolated worst case time error. One hour after the worst case time error has reached the value equivalent to a TFOM of 9, the NTP server will cease to send stratum 1 reply packets and an Alarm LED will be energized.') gps_sig_proc_state = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('gpsAcquiring', 0), ('gpsLocking', 1), ('gpsLocked', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: gpsSigProcState.setStatus('current') if mibBuilder.loadTexts: gpsSigProcState.setDescription('Current GPS signal processor state. One of 0, 1 or 2, with 0 being the acquisition state and 2 the fully locked on state.') gps_num_track_sats = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 8))).setMaxAccess('readonly') if mibBuilder.loadTexts: gpsNumTrackSats.setStatus('current') if mibBuilder.loadTexts: gpsNumTrackSats.setDescription('Current number of GPS satellites being tracked.') gps_vcdac = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: gpsVCDAC.setStatus('current') if mibBuilder.loadTexts: gpsVCDAC.setDescription('Current 16 bit, Voltage Controlled TCXO DAC value. Typical range is 20000 to 40000, where more positive numbers have the effect of raising the TCXO frequency.') gps_avg_carrier_to_noise_ratiod_b = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 4))).setMaxAccess('readonly') if mibBuilder.loadTexts: gpsAvgCarrierToNoiseRatiodB.setStatus('current') if mibBuilder.loadTexts: gpsAvgCarrierToNoiseRatiodB.setDescription('ASCII string representing the current average carrier to noise ratio of all tracked satellites, in units of dB. Values less than 35 indicate weak signal conditions.') gps_reference_position = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readonly') if mibBuilder.loadTexts: gpsReferencePosition.setStatus('current') if mibBuilder.loadTexts: gpsReferencePosition.setDescription('WGS-84 latitude, longitude and height above the reference ellipsoid of the GPS antenna. Ellipsoid height may deviate from local Mean Sea Level by as much as 100 meters.') gps_ref_pos_source = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 3))).setMaxAccess('readonly') if mibBuilder.loadTexts: gpsRefPosSource.setStatus('current') if mibBuilder.loadTexts: gpsRefPosSource.setDescription('ASCII string indicating the source of the GPS antenna reference position. It is one of: USR (user supplied), AVG (automatically determined by averaging thousands of 3-D position fixes, UNK (unknown).') gps_current_leap_seconds = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: gpsCurrentLeapSeconds.setStatus('current') if mibBuilder.loadTexts: gpsCurrentLeapSeconds.setDescription('This value is the current difference in seconds between GPS time and UTC time. GPS time is ahead of UTC time by this amount.') gps_future_leap_seconds = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: gpsFutureLeapSeconds.setStatus('current') if mibBuilder.loadTexts: gpsFutureLeapSeconds.setDescription('This value is the future difference in seconds between GPS time and UTC time. Leap seconds may be inserted or deleted from the UTC timescale twice during the year: Dec 31 and June 30 at UTC midnight. If this value is the same as cdmaCurrentLeapSeconds, then no leap second insertion or deletion will occur at the next possible time. If it is different, then the change will take affect at the next possible time. GPS time will be ahead of UTC time by this amount.') gps_version = mib_scalar((1, 3, 6, 1, 4, 1, 13827, 2, 1, 11), display_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: gpsVersion.setStatus('current') if mibBuilder.loadTexts: gpsVersion.setDescription('ASCII string showing the GPS sub-system firmware and FPGA versions.') mibBuilder.exportSymbols('ENDRUNTECHNOLOGIES-MIB', cntptrap=cntptrap, cntpDroppedPkts=cntpDroppedPkts, cdmaSigProcState=cdmaSigProcState, cdmaAGC=cdmaAGC, cdmaFutureLeapSeconds=cdmaFutureLeapSeconds, cntpAuthFail=cntpAuthFail, cdmaCurrentLeapSeconds=cdmaCurrentLeapSeconds, gntpIgnoredPkts=gntpIgnoredPkts, cdmaFaultStatus=cdmaFaultStatus, gpsAvgCarrierToNoiseRatiodB=gpsAvgCarrierToNoiseRatiodB, cdmaTimeFigureOfMerit=cdmaTimeFigureOfMerit, gntpVersion=gntpVersion, cdmaTrapFaultStatusChange=cdmaTrapFaultStatusChange, gpsReferencePosition=gpsReferencePosition, gpsFaultStatus=gpsFaultStatus, cdmatrap=cdmatrap, gntp=gntp, cntpTimeFigureOfMerit=cntpTimeFigureOfMerit, cdmaCarrierToNoiseRatio=cdmaCarrierToNoiseRatio, cdmaFrameErrorRate=cdmaFrameErrorRate, gntpTrapStratumChange=gntpTrapStratumChange, praecisGntp=praecisGntp, gntpLeapIndBits=gntpLeapIndBits, gntpRxPkts=gntpRxPkts, gntpTxPkts=gntpTxPkts, cdmaVCDAC=cdmaVCDAC, gntpOffsetToGPSReference=gntpOffsetToGPSReference, cntpIgnoredPkts=cntpIgnoredPkts, gntpTrapLeapIndBitsChange=gntpTrapLeapIndBitsChange, gntpDroppedPkts=gntpDroppedPkts, cntpStratum=cntpStratum, gntpStratum=gntpStratum, cntpOffsetToCDMAReference=cntpOffsetToCDMAReference, gpsSigProcState=gpsSigProcState, cdmaLeapMode=cdmaLeapMode, gpsRefPosSource=gpsRefPosSource, gntpSyncSource=gntpSyncSource, gpsVCDAC=gpsVCDAC, gpsNumTrackSats=gpsNumTrackSats, cntpTrapLeapIndBitsChange=cntpTrapLeapIndBitsChange, endRunTechnologiesMIB=endRunTechnologiesMIB, cdmaPNO=cdmaPNO, endRunTechnologies=endRunTechnologies, gntpAuthFail=gntpAuthFail, cntpSyncSource=cntpSyncSource, gpsCurrentLeapSeconds=gpsCurrentLeapSeconds, praecisCntp=praecisCntp, cntp=cntp, cntpRxPkts=cntpRxPkts, gntptrap=gntptrap, gpstrap=gpstrap, cdma=cdma, cntpVersion=cntpVersion, cntpTxPkts=cntpTxPkts, cntpLeapIndBits=cntpLeapIndBits, cdmaChannel=cdmaChannel, cdmaVersion=cdmaVersion, gpsTrapFaultStatusChange=gpsTrapFaultStatusChange, gpsFutureLeapSeconds=gpsFutureLeapSeconds, gntpTimeFigureOfMerit=gntpTimeFigureOfMerit, cntpTrapStratumChange=cntpTrapStratumChange, PYSNMP_MODULE_ID=endRunTechnologies, gps=gps, gpsVersion=gpsVersion, gpsTimeFigureOfMerit=gpsTimeFigureOfMerit)
def max_pairwise_product(numbers): n = len(numbers) max_product = 0 for first in range(n): for second in range(first + 1, n): max_product = max(max_product, numbers[first] * numbers[second]) return max_product def max_pairwise_product_Fast(numbers): n = len(numbers) max_index1 = -1 for i in range(n): if (max_index1 == -1) | (numbers[i] > numbers[max_index1]): max_index1 = i max_index2 = -1 for j in range(n): if (j != max_index1) & ((max_index2 == -1) | (numbers[j] > numbers[max_index2])): max_index2 = j return ((numbers[max_index1])) * numbers[max_index2] if __name__ == '__main__': input_n = int(input()) input_numbers = [int(x) for x in input().split()] print(max_pairwise_product_Fast(input_numbers))
def max_pairwise_product(numbers): n = len(numbers) max_product = 0 for first in range(n): for second in range(first + 1, n): max_product = max(max_product, numbers[first] * numbers[second]) return max_product def max_pairwise_product__fast(numbers): n = len(numbers) max_index1 = -1 for i in range(n): if (max_index1 == -1) | (numbers[i] > numbers[max_index1]): max_index1 = i max_index2 = -1 for j in range(n): if (j != max_index1) & ((max_index2 == -1) | (numbers[j] > numbers[max_index2])): max_index2 = j return numbers[max_index1] * numbers[max_index2] if __name__ == '__main__': input_n = int(input()) input_numbers = [int(x) for x in input().split()] print(max_pairwise_product__fast(input_numbers))
## Find the prime numbers from 1 - 20 primeCheck = 0 for index in range(2,21): # print("index values are",index) for num in range(2,index): # print("----> num is ",num) if index%num == 0: primeCheck = 0 print("Number ",index," not a prime") break else: primeCheck = 1 #print("This is a prime number ",index) if primeCheck == 1: print("This is a prime number ",index)
prime_check = 0 for index in range(2, 21): for num in range(2, index): if index % num == 0: prime_check = 0 print('Number ', index, ' not a prime') break else: prime_check = 1 if primeCheck == 1: print('This is a prime number ', index)
class _AVLNode(): _BALANCE_FACTOR_LIMIT = 2; def __init__(self, value): self.value = value self.left = None self.right = None self.size = 1 self._height = 0 self._balance_factor = 0 def search(self, key): if key == self.value: return self elif key < self.value: return self.left.search(key) if self._has_left_child() else None else: return self.right.search(key) if self._has_right_child() else None def insert(self, value): if value == self.value: new_height = self._height elif value < self.value: if self.left is None: self.left = _AVLNode(value) new_height = max(self._height, 1) else: self.left = self.left.insert(value) new_height = (max(self._height, self.left._height + 1) if self._has_left_child() else self._height) else: if self.right is None: self.right = _AVLNode(value) new_height = max(self._height, 1) else: self.right = self.right.insert(value) new_height = (max(self._height, self.right._height + 1) if self._has_right_child() else self._height) self._height = new_height self._balance_factor = self._calculate_balance_factor() if self._needs_rebalancing(): new_subtree_root = self._rebalance() else: new_subtree_root = self self.size = self._recalculate_size() return new_subtree_root def delete(self, value): new_subtree_root = self if value < self.value: self.left = (self.left.delete(value) if self.left is not None else None) elif value > self.value: self.right = (self.right.delete(value) if self.right is not None else None) elif self._has_two_children(): self.value = self.right._min().value self.right = self.right.delete(self.value) else: new_subtree_root = (self.left if self.left is not None else self.right) self._height = self._recalculate_height() self._balance_factor = self._calculate_balance_factor() if self._needs_rebalancing(): new_subtree_root = self._rebalance() self.size = self._recalculate_size() return new_subtree_root def _min(self): return self.left._min() if self._has_left_child() else self def _needs_rebalancing(self): return abs(self._balance_factor) >= _AVLNode._BALANCE_FACTOR_LIMIT def _calculate_balance_factor(self): right_subtree_height = (self.right._height if self._has_right_child() else -1) left_subtree_height = (self.left._height if self._has_left_child() else -1) return right_subtree_height - left_subtree_height def _rebalance(self): if self.right is None: tallest_child = self.left elif self.left is None: tallest_child = self.right else: tallest_child = (self.right if self.right._height > self.left._height else self.left) if tallest_child is self.left: if tallest_child._is_right_heavy(): # Left-Right return (self._rotate_right( tallest_child._rotate_left(tallest_child.right))) else: # Left-Left return self._rotate_right(tallest_child) elif tallest_child is self.right: if tallest_child._is_left_heavy(): # Right-Left return (self._rotate_left( tallest_child._rotate_right(tallest_child.left))) else: # Right-Right return self._rotate_left(tallest_child) def _rotate_left(self, pivot): self.right = pivot.left pivot.left = self self._height = self._recalculate_height() pivot._height = pivot._recalculate_height() self._balance_factor = self._calculate_balance_factor() pivot.balance_factor = pivot._calculate_balance_factor() self.size = self._recalculate_size() pivot.size = pivot._recalculate_size() return pivot def _rotate_right(self, pivot): self.left = pivot.right pivot.right = self self._height = self._recalculate_height() pivot._height = pivot._recalculate_height() self._balance_factor = self._calculate_balance_factor() pivot.balance_factor = pivot._calculate_balance_factor() self.size = self._recalculate_size() pivot.size = pivot._recalculate_size() return pivot def _recalculate_height(self): return max(self.left._height if self._has_left_child() else -1, self.right._height if self._has_right_child() else -1) + 1 def _recalculate_size(self): size = 1 if self._has_left_child(): size += self.left.size if self._has_right_child(): size += self.right.size return size def _has_two_children(self): return self._has_left_child() and self._has_right_child() def _has_left_child(self): return self.left is not None def _has_right_child(self): return self.right is not None def _is_right_heavy(self): return self._balance_factor > 0 def _is_left_heavy(self): return self._balance_factor < 0
class _Avlnode: _balance_factor_limit = 2 def __init__(self, value): self.value = value self.left = None self.right = None self.size = 1 self._height = 0 self._balance_factor = 0 def search(self, key): if key == self.value: return self elif key < self.value: return self.left.search(key) if self._has_left_child() else None else: return self.right.search(key) if self._has_right_child() else None def insert(self, value): if value == self.value: new_height = self._height elif value < self.value: if self.left is None: self.left = _avl_node(value) new_height = max(self._height, 1) else: self.left = self.left.insert(value) new_height = max(self._height, self.left._height + 1) if self._has_left_child() else self._height elif self.right is None: self.right = _avl_node(value) new_height = max(self._height, 1) else: self.right = self.right.insert(value) new_height = max(self._height, self.right._height + 1) if self._has_right_child() else self._height self._height = new_height self._balance_factor = self._calculate_balance_factor() if self._needs_rebalancing(): new_subtree_root = self._rebalance() else: new_subtree_root = self self.size = self._recalculate_size() return new_subtree_root def delete(self, value): new_subtree_root = self if value < self.value: self.left = self.left.delete(value) if self.left is not None else None elif value > self.value: self.right = self.right.delete(value) if self.right is not None else None elif self._has_two_children(): self.value = self.right._min().value self.right = self.right.delete(self.value) else: new_subtree_root = self.left if self.left is not None else self.right self._height = self._recalculate_height() self._balance_factor = self._calculate_balance_factor() if self._needs_rebalancing(): new_subtree_root = self._rebalance() self.size = self._recalculate_size() return new_subtree_root def _min(self): return self.left._min() if self._has_left_child() else self def _needs_rebalancing(self): return abs(self._balance_factor) >= _AVLNode._BALANCE_FACTOR_LIMIT def _calculate_balance_factor(self): right_subtree_height = self.right._height if self._has_right_child() else -1 left_subtree_height = self.left._height if self._has_left_child() else -1 return right_subtree_height - left_subtree_height def _rebalance(self): if self.right is None: tallest_child = self.left elif self.left is None: tallest_child = self.right else: tallest_child = self.right if self.right._height > self.left._height else self.left if tallest_child is self.left: if tallest_child._is_right_heavy(): return self._rotate_right(tallest_child._rotate_left(tallest_child.right)) else: return self._rotate_right(tallest_child) elif tallest_child is self.right: if tallest_child._is_left_heavy(): return self._rotate_left(tallest_child._rotate_right(tallest_child.left)) else: return self._rotate_left(tallest_child) def _rotate_left(self, pivot): self.right = pivot.left pivot.left = self self._height = self._recalculate_height() pivot._height = pivot._recalculate_height() self._balance_factor = self._calculate_balance_factor() pivot.balance_factor = pivot._calculate_balance_factor() self.size = self._recalculate_size() pivot.size = pivot._recalculate_size() return pivot def _rotate_right(self, pivot): self.left = pivot.right pivot.right = self self._height = self._recalculate_height() pivot._height = pivot._recalculate_height() self._balance_factor = self._calculate_balance_factor() pivot.balance_factor = pivot._calculate_balance_factor() self.size = self._recalculate_size() pivot.size = pivot._recalculate_size() return pivot def _recalculate_height(self): return max(self.left._height if self._has_left_child() else -1, self.right._height if self._has_right_child() else -1) + 1 def _recalculate_size(self): size = 1 if self._has_left_child(): size += self.left.size if self._has_right_child(): size += self.right.size return size def _has_two_children(self): return self._has_left_child() and self._has_right_child() def _has_left_child(self): return self.left is not None def _has_right_child(self): return self.right is not None def _is_right_heavy(self): return self._balance_factor > 0 def _is_left_heavy(self): return self._balance_factor < 0
# # lithospheres # # ============================================================================= lith200 = { "numlayers": 7, "nature_layers": ['matUC','matMC','matLC','matLM1','matLM2','matLM3','matSLM'], "thicknesses": [15e3,10e3,10e3,45e3,45e3,75e3,400e3], "thermalBc": ['thermBcUC','thermBcMC','thermBcLC','thermBcLM1','thermBcLM2','thermBcLM3','thermBcSLM'], "matUC": { "temp_top": 0.0e0, "H": 1.78e-6 }, "matMC": { "H": 1.78e-6 }, "matLC": { "H": 0.82e-6 }, "matLM1": { "rho": 3300 }, "matLM2": { "rho": 3300 }, "matSLM": { "rho": 3300 }, "thermBcSLM": { "temp_bottom": 1793.15e0, "temp_potential": 1553.15e0, "q_bottom": 12.4460937e-3 } } # ============================================================================= lith250 = { "numlayers": 7, "nature_layers": ['matUC','matMC','matLC','matLM1','matLM2','matLM3','matSLM'], "thicknesses": [15e3,10e3,10e3,55e3,160e3,0.0e0,350e3], "thermalBc": ['thermBcUC','thermBcMC','thermBcLC','thermBcLM1','thermBcLM2','thermBcLM3','thermBcSLM'], "matUC": { "temp_top": 0.0e0, "H": 1.78e-6 }, "matMC": { "H": 1.78e-6 }, "matLC": { "H": 0.82e-6 }, "matLM1": { "rho": 3300 }, "matLM2": { "rho": 3300 }, "matSLM": { "rho": 3300 }, "thermBcSLM": { "temp_bottom": 1793.15e0, "temp_potential": 1553.15e0, "q_bottom": 12.4460937e-3 } } # ============================================================================= lith240 = { "numlayers": 7, "nature_layers": ['matUC','matMC','matLC','matLM1','matLM2','matLM3','matSLM'], "thicknesses": [15e3,10e3,10e3,55e3,150e3,0.0e0,360e3], "thermalBc": ['thermBcUC','thermBcMC','thermBcLC','thermBcLM1','thermBcLM2','thermBcLM3','thermBcSLM'], "matUC": { "temp_top": 0.0e0, "H": 1.78e-6 }, "matMC": { "H": 1.78e-6 }, "matLC": { "H": 0.82e-6 }, "matLM1": { "rho": 3300 }, "matLM2": { "rho": 3300 }, "matSLM": { "rho": 3300 }, "thermBcSLM": { "temp_bottom": 1793.15e0, "temp_potential": 1553.15e0, "q_bottom": 12.4460937e-3 } } # ============================================================================= lith280 = { "numlayers": 7, "nature_layers": ['matUC','matMC','matLC','matLM1','matLM2','matLM3','matSLM'], "thicknesses": [15e3,10e3,10e3,80e3,10e3,155e3,320e3], "thermalBc": ['thermBcUC','thermBcMC','thermBcLC','thermBcLM1','thermBcLM2','thermBcLM3','thermBcSLM'], "matUC": { "temp_top": 0.0e0, "H": 1.78e-6 }, "matMC": { "H": 1.78e-6 }, "matLC": { "H": 0.82e-6 }, "matLM1": { "rho": 3300 }, "matLM2": { "rho": 3300 }, "matSLM": { "rho": 3300 }, "thermBcSLM": { "temp_bottom": 1793.15e0, "temp_potential": 1553.15e0, "q_bottom": 12.4460937e-3 } } # ============================================================================= lith160 = { "numlayers": 7, "nature_layers": ['matUC','matMC','matLC','matLM1','matLM2','matLM3','matSLM'], "thicknesses": [15e3,10e3,10e3,55e3,70e3,0.0e0,440e3], "thermalBc": ['thermBcUC','thermBcMC','thermBcLC','thermBcLM1','thermBcLM2','thermBcLM3','thermBcSLM'], "matUC": { "temp_top": 0.0e0, "H": 1.78e-6 }, "matMC": { "H": 1.78e-6 }, "matLC": { "H": 0.82e-6 }, "matLM1": { "rho": 3300 }, "matLM2": { "rho": 3300 }, "matSLM": { "rho": 3300 }, "thermBcSLM": { "temp_bottom": 1793.15e0, "temp_potential": 1553.15e0, "q_bottom": 12.4460937e-3 } } # ============================================================================= lith180 = { "numlayers": 7, "nature_layers": ['matUC','matMC','matLC','matLM1','matLM2','matLM3','matSLM'], "thicknesses": [15e3,10e3,10e3,45e3,45e3,55e3,420e3], "thermalBc": ['thermBcUC','thermBcMC','thermBcLC','thermBcLM1','thermBcLM2','thermBcLM3','thermBcSLM'], "matUC": { "temp_top": 0.0e0, "H": 1.78e-6 }, "matMC": { "H": 1.78e-6 }, "matLC": { "H": 0.82e-6 }, "matLM1": { "rho": 3300 }, "matLM2": { "rho": 3300 }, "matSLM": { "rho": 3300 }, "thermBcSLM": { "temp_bottom": 1793.15e0, "temp_potential": 1553.15e0, "q_bottom": 12.4460937e-3 } } # ============================================================================= lith120 = { "numlayers": 6, "nature_layers": ['matUC','matMC','matLC','matLM1','matLM2','matSLM'], "thicknesses": [15e3,10e3,10e3,85.0e3,0.0e0,480e3], "thermalBc": ['thermBcUC','thermBcMC','thermBcLC','thermBcLM1','thermBcLM2','thermBcSLM'], "matUC": { "temp_top": 0.0e0, "H": 1.2e-6 }, "matMC": { "H": 1.2e-6 }, "matLC": { "H": 0.473e-6 }, "matLM1": { "rho": 3300 }, "matLM2": { "rho": 3300 }, "matSLM": { "rho": 3300 }, "thermBcSLM": { "temp_bottom": 1793.15e0, "temp_potential": 1553.15e0, "q_bottom": 20.59375e-3 } } # ============================================================================= lith125 = { "numlayers": 7, "nature_layers": ['matUC','matMC','matLC','matLM1','matLM2','matLM3','matSLM'], "thicknesses": [15e3,10e3,10e3,90e3,0.0e0,0.0e0,475e3], "thermalBc": ['thermBcUC','thermBcMC','thermBcLC','thermBcLM1','thermBcLM2','thermBcLM3','thermBcSLM'], "matUC": { "temp_top": 0.0e0, "H": 1.299e-6 }, "matMC": { "H": 1.299e-6 }, "matLC": { "H": 0.498e-6 }, "matLM1": { "rho": 3300 }, "matLM2": { "rho": 3300 }, "matSLM": { "rho": 3300 }, "thermBcSLM": { "temp_bottom": 1793.15e0, "temp_potential": 1553.15e0, "q_bottom": 19.5e-3 } } # ============================================================================= ridge_NoOc_NoDiffLayer = { "numlayers": 1, "nature_layers": ['matSLM'], "thicknesses": [600e3], "thermalBc": ['thermBcSLM'], "matSLM": { "rho": 3300 }, "thermBcSLM": { "temp_top": 0.0e0, "temp_bottom": 1793.15e0, "temp_potential": 1553.15e0, "q_bottom": 19.5e-3 } } # ============================================================================= ridge_Oc6_5_NoDiffLayer = { "numlayers": 5, "nature_layers": ['matUC','matMC','matLC','matSLMd','matSLM'], "thicknesses": [6.5e3, 0.0e0, 0.0e0, 118.5e3, 475.0e3], "thermalBc": ['thermBcUC','thermBcMC','thermBcLC','thermBcSLMd', 'thermBcSLM'], "matUC": { "temp_top": 0.0e0, "H" : 0.0e0, "rho": 2900.e0 }, "matMC": { "H": 0.0e0, "rho": 2900.e0 }, "matLC": { "H": 0.0e0, "rho": 2900.e0 }, "matSLMd": { "rho": 3300, "H": 0.0e0 }, "matSLM": { "rho": 3300 }, "thermBcSLMd": { "temp_bottom": 1603.15e0, "temp_potential": 1553.15e0, "q_bottom": 437.2421875e-3 }, "thermBcSLM": { "temp_bottom": 1793.15e0, "temp_potential": 1553.15e0, "q_bottom": 437.2421875e-3 } }
lith200 = {'numlayers': 7, 'nature_layers': ['matUC', 'matMC', 'matLC', 'matLM1', 'matLM2', 'matLM3', 'matSLM'], 'thicknesses': [15000.0, 10000.0, 10000.0, 45000.0, 45000.0, 75000.0, 400000.0], 'thermalBc': ['thermBcUC', 'thermBcMC', 'thermBcLC', 'thermBcLM1', 'thermBcLM2', 'thermBcLM3', 'thermBcSLM'], 'matUC': {'temp_top': 0.0, 'H': 1.78e-06}, 'matMC': {'H': 1.78e-06}, 'matLC': {'H': 8.2e-07}, 'matLM1': {'rho': 3300}, 'matLM2': {'rho': 3300}, 'matSLM': {'rho': 3300}, 'thermBcSLM': {'temp_bottom': 1793.15, 'temp_potential': 1553.15, 'q_bottom': 0.0124460937}} lith250 = {'numlayers': 7, 'nature_layers': ['matUC', 'matMC', 'matLC', 'matLM1', 'matLM2', 'matLM3', 'matSLM'], 'thicknesses': [15000.0, 10000.0, 10000.0, 55000.0, 160000.0, 0.0, 350000.0], 'thermalBc': ['thermBcUC', 'thermBcMC', 'thermBcLC', 'thermBcLM1', 'thermBcLM2', 'thermBcLM3', 'thermBcSLM'], 'matUC': {'temp_top': 0.0, 'H': 1.78e-06}, 'matMC': {'H': 1.78e-06}, 'matLC': {'H': 8.2e-07}, 'matLM1': {'rho': 3300}, 'matLM2': {'rho': 3300}, 'matSLM': {'rho': 3300}, 'thermBcSLM': {'temp_bottom': 1793.15, 'temp_potential': 1553.15, 'q_bottom': 0.0124460937}} lith240 = {'numlayers': 7, 'nature_layers': ['matUC', 'matMC', 'matLC', 'matLM1', 'matLM2', 'matLM3', 'matSLM'], 'thicknesses': [15000.0, 10000.0, 10000.0, 55000.0, 150000.0, 0.0, 360000.0], 'thermalBc': ['thermBcUC', 'thermBcMC', 'thermBcLC', 'thermBcLM1', 'thermBcLM2', 'thermBcLM3', 'thermBcSLM'], 'matUC': {'temp_top': 0.0, 'H': 1.78e-06}, 'matMC': {'H': 1.78e-06}, 'matLC': {'H': 8.2e-07}, 'matLM1': {'rho': 3300}, 'matLM2': {'rho': 3300}, 'matSLM': {'rho': 3300}, 'thermBcSLM': {'temp_bottom': 1793.15, 'temp_potential': 1553.15, 'q_bottom': 0.0124460937}} lith280 = {'numlayers': 7, 'nature_layers': ['matUC', 'matMC', 'matLC', 'matLM1', 'matLM2', 'matLM3', 'matSLM'], 'thicknesses': [15000.0, 10000.0, 10000.0, 80000.0, 10000.0, 155000.0, 320000.0], 'thermalBc': ['thermBcUC', 'thermBcMC', 'thermBcLC', 'thermBcLM1', 'thermBcLM2', 'thermBcLM3', 'thermBcSLM'], 'matUC': {'temp_top': 0.0, 'H': 1.78e-06}, 'matMC': {'H': 1.78e-06}, 'matLC': {'H': 8.2e-07}, 'matLM1': {'rho': 3300}, 'matLM2': {'rho': 3300}, 'matSLM': {'rho': 3300}, 'thermBcSLM': {'temp_bottom': 1793.15, 'temp_potential': 1553.15, 'q_bottom': 0.0124460937}} lith160 = {'numlayers': 7, 'nature_layers': ['matUC', 'matMC', 'matLC', 'matLM1', 'matLM2', 'matLM3', 'matSLM'], 'thicknesses': [15000.0, 10000.0, 10000.0, 55000.0, 70000.0, 0.0, 440000.0], 'thermalBc': ['thermBcUC', 'thermBcMC', 'thermBcLC', 'thermBcLM1', 'thermBcLM2', 'thermBcLM3', 'thermBcSLM'], 'matUC': {'temp_top': 0.0, 'H': 1.78e-06}, 'matMC': {'H': 1.78e-06}, 'matLC': {'H': 8.2e-07}, 'matLM1': {'rho': 3300}, 'matLM2': {'rho': 3300}, 'matSLM': {'rho': 3300}, 'thermBcSLM': {'temp_bottom': 1793.15, 'temp_potential': 1553.15, 'q_bottom': 0.0124460937}} lith180 = {'numlayers': 7, 'nature_layers': ['matUC', 'matMC', 'matLC', 'matLM1', 'matLM2', 'matLM3', 'matSLM'], 'thicknesses': [15000.0, 10000.0, 10000.0, 45000.0, 45000.0, 55000.0, 420000.0], 'thermalBc': ['thermBcUC', 'thermBcMC', 'thermBcLC', 'thermBcLM1', 'thermBcLM2', 'thermBcLM3', 'thermBcSLM'], 'matUC': {'temp_top': 0.0, 'H': 1.78e-06}, 'matMC': {'H': 1.78e-06}, 'matLC': {'H': 8.2e-07}, 'matLM1': {'rho': 3300}, 'matLM2': {'rho': 3300}, 'matSLM': {'rho': 3300}, 'thermBcSLM': {'temp_bottom': 1793.15, 'temp_potential': 1553.15, 'q_bottom': 0.0124460937}} lith120 = {'numlayers': 6, 'nature_layers': ['matUC', 'matMC', 'matLC', 'matLM1', 'matLM2', 'matSLM'], 'thicknesses': [15000.0, 10000.0, 10000.0, 85000.0, 0.0, 480000.0], 'thermalBc': ['thermBcUC', 'thermBcMC', 'thermBcLC', 'thermBcLM1', 'thermBcLM2', 'thermBcSLM'], 'matUC': {'temp_top': 0.0, 'H': 1.2e-06}, 'matMC': {'H': 1.2e-06}, 'matLC': {'H': 4.73e-07}, 'matLM1': {'rho': 3300}, 'matLM2': {'rho': 3300}, 'matSLM': {'rho': 3300}, 'thermBcSLM': {'temp_bottom': 1793.15, 'temp_potential': 1553.15, 'q_bottom': 0.02059375}} lith125 = {'numlayers': 7, 'nature_layers': ['matUC', 'matMC', 'matLC', 'matLM1', 'matLM2', 'matLM3', 'matSLM'], 'thicknesses': [15000.0, 10000.0, 10000.0, 90000.0, 0.0, 0.0, 475000.0], 'thermalBc': ['thermBcUC', 'thermBcMC', 'thermBcLC', 'thermBcLM1', 'thermBcLM2', 'thermBcLM3', 'thermBcSLM'], 'matUC': {'temp_top': 0.0, 'H': 1.299e-06}, 'matMC': {'H': 1.299e-06}, 'matLC': {'H': 4.98e-07}, 'matLM1': {'rho': 3300}, 'matLM2': {'rho': 3300}, 'matSLM': {'rho': 3300}, 'thermBcSLM': {'temp_bottom': 1793.15, 'temp_potential': 1553.15, 'q_bottom': 0.0195}} ridge__no_oc__no_diff_layer = {'numlayers': 1, 'nature_layers': ['matSLM'], 'thicknesses': [600000.0], 'thermalBc': ['thermBcSLM'], 'matSLM': {'rho': 3300}, 'thermBcSLM': {'temp_top': 0.0, 'temp_bottom': 1793.15, 'temp_potential': 1553.15, 'q_bottom': 0.0195}} ridge__oc6_5__no_diff_layer = {'numlayers': 5, 'nature_layers': ['matUC', 'matMC', 'matLC', 'matSLMd', 'matSLM'], 'thicknesses': [6500.0, 0.0, 0.0, 118500.0, 475000.0], 'thermalBc': ['thermBcUC', 'thermBcMC', 'thermBcLC', 'thermBcSLMd', 'thermBcSLM'], 'matUC': {'temp_top': 0.0, 'H': 0.0, 'rho': 2900.0}, 'matMC': {'H': 0.0, 'rho': 2900.0}, 'matLC': {'H': 0.0, 'rho': 2900.0}, 'matSLMd': {'rho': 3300, 'H': 0.0}, 'matSLM': {'rho': 3300}, 'thermBcSLMd': {'temp_bottom': 1603.15, 'temp_potential': 1553.15, 'q_bottom': 0.4372421875}, 'thermBcSLM': {'temp_bottom': 1793.15, 'temp_potential': 1553.15, 'q_bottom': 0.4372421875}}
def solution(A): refSum = len(A) + 1 curSum = 0 for i in range(0, len(A)): refSum += i + 1 curSum += A[i] return refSum - curSum assert 1 == solution([]) assert 2 == solution([ 1 ]) assert 1 == solution([ 2 ]) assert 4 == solution([ 2, 3, 1, 5 ]) MaxArrSize = 100000 # by the task stressTestArr = [] for i in range(MaxArrSize): stressTestArr.append(i + 1) assert MaxArrSize + 1 == solution(stressTestArr)
def solution(A): ref_sum = len(A) + 1 cur_sum = 0 for i in range(0, len(A)): ref_sum += i + 1 cur_sum += A[i] return refSum - curSum assert 1 == solution([]) assert 2 == solution([1]) assert 1 == solution([2]) assert 4 == solution([2, 3, 1, 5]) max_arr_size = 100000 stress_test_arr = [] for i in range(MaxArrSize): stressTestArr.append(i + 1) assert MaxArrSize + 1 == solution(stressTestArr)
class Punto2D(): def __init__(self, x, y) -> None: self.x = x self.y = y def traslacion(self, a, b): punto = [self.x + a, self.y + b] print(punto)
class Punto2D: def __init__(self, x, y) -> None: self.x = x self.y = y def traslacion(self, a, b): punto = [self.x + a, self.y + b] print(punto)
# class Tree: # def __init__(self, val, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def solve(self, root): ans = [] dfs = [[root,0]] while dfs: cur,i = dfs.pop() if i >= len(ans): ans.append(0) ans[i] += cur.val if cur.left: dfs.append([cur.left,i+1]) if cur.right: dfs.append([cur.right,i]) return ans
class Solution: def solve(self, root): ans = [] dfs = [[root, 0]] while dfs: (cur, i) = dfs.pop() if i >= len(ans): ans.append(0) ans[i] += cur.val if cur.left: dfs.append([cur.left, i + 1]) if cur.right: dfs.append([cur.right, i]) return ans
dataset_type = 'UnconditionalImageDataset' train_pipeline = [ dict( type='LoadImageFromFile', key='real_img', io_backend='disk', ), dict(type='Resize', keys=['real_img'], scale=(512, 384)), dict( type='NumpyPad', keys=['real_img'], padding=((64, 64), (0, 0), (0, 0)), ), dict(type='Flip', keys=['real_img'], direction='horizontal'), dict( type='Normalize', keys=['real_img'], mean=[127.5] * 3, std=[127.5] * 3, to_rgb=False), dict(type='ImageToTensor', keys=['real_img']), dict(type='Collect', keys=['real_img'], meta_keys=['real_img_path']) ] # `samples_per_gpu` and `imgs_root` need to be set. data = dict( samples_per_gpu=None, workers_per_gpu=4, train=dict( type='RepeatDataset', times=5, dataset=dict( type=dataset_type, imgs_root=None, pipeline=train_pipeline)), val=dict(type=dataset_type, imgs_root=None, pipeline=train_pipeline))
dataset_type = 'UnconditionalImageDataset' train_pipeline = [dict(type='LoadImageFromFile', key='real_img', io_backend='disk'), dict(type='Resize', keys=['real_img'], scale=(512, 384)), dict(type='NumpyPad', keys=['real_img'], padding=((64, 64), (0, 0), (0, 0))), dict(type='Flip', keys=['real_img'], direction='horizontal'), dict(type='Normalize', keys=['real_img'], mean=[127.5] * 3, std=[127.5] * 3, to_rgb=False), dict(type='ImageToTensor', keys=['real_img']), dict(type='Collect', keys=['real_img'], meta_keys=['real_img_path'])] data = dict(samples_per_gpu=None, workers_per_gpu=4, train=dict(type='RepeatDataset', times=5, dataset=dict(type=dataset_type, imgs_root=None, pipeline=train_pipeline)), val=dict(type=dataset_type, imgs_root=None, pipeline=train_pipeline))
id_to_glfunc = { 160: "glAlphaFunc", 161: "GL_ALPHA_TEST", 162: "glBlendFunc", 163: "glBlendEquationSeparate", 164: "GL_BLEND", 165: "glCullFace", 166: "GL_CULL_FACE", 167: "glDepthFunc", 168: "glDepthMask", 169: "GL_DEPTH_TEST", 172: "glColorMask" } glBool_options = { 1: "GL_TRUE", 0: "GL_FALSE" } glEnable_options = { 1: "glEnable", 0: "glDisable" } glBlendFunc_options = { 0x0000: "GL_ZERO", 0x0001: "GL_ONE", 0x0300: "GL_SRC_COLOR", 0x0301: "GL_ONE_MINUS_SRC_COLOR", 0x0302: "GL_SRC_ALPHA", 0x0303: "GL_ONE_MINUS_SRC_ALPHA", 0x0304: "GL_DST_ALPHA", 0x0305: "GL_ONE_MINUS_DST_ALPHA" } glBlendEquationSeparate_options = { 0x8006: "GL_FUNC_ADD", 0x800A: "GL_FUNC_SUBTRACT", 0x800B: "GL_FUNC_REVERSE_SUBTRACT", 0x8007: "GL_MIN", 0x8008: "GL_MAX" } glCullFace_options = { 0x0404: "GL_FRONT", 0x0405: "GL_BACK", 0x0408: "GL_FRONT_AND_BACK" } glComparison_options = { 0x0200: "GL_NEVER", 0x0201: "GL_LESS", 0x0202: "GL_EQUAL", 0x0203: "GL_LEQUAL", 0x0204: "GL_GREATER", 0x0205: "GL_NOTEQUAL", 0x0206: "GL_GEQUAL", 0x0207: "GL_ALWAYS" }
id_to_glfunc = {160: 'glAlphaFunc', 161: 'GL_ALPHA_TEST', 162: 'glBlendFunc', 163: 'glBlendEquationSeparate', 164: 'GL_BLEND', 165: 'glCullFace', 166: 'GL_CULL_FACE', 167: 'glDepthFunc', 168: 'glDepthMask', 169: 'GL_DEPTH_TEST', 172: 'glColorMask'} gl_bool_options = {1: 'GL_TRUE', 0: 'GL_FALSE'} gl_enable_options = {1: 'glEnable', 0: 'glDisable'} gl_blend_func_options = {0: 'GL_ZERO', 1: 'GL_ONE', 768: 'GL_SRC_COLOR', 769: 'GL_ONE_MINUS_SRC_COLOR', 770: 'GL_SRC_ALPHA', 771: 'GL_ONE_MINUS_SRC_ALPHA', 772: 'GL_DST_ALPHA', 773: 'GL_ONE_MINUS_DST_ALPHA'} gl_blend_equation_separate_options = {32774: 'GL_FUNC_ADD', 32778: 'GL_FUNC_SUBTRACT', 32779: 'GL_FUNC_REVERSE_SUBTRACT', 32775: 'GL_MIN', 32776: 'GL_MAX'} gl_cull_face_options = {1028: 'GL_FRONT', 1029: 'GL_BACK', 1032: 'GL_FRONT_AND_BACK'} gl_comparison_options = {512: 'GL_NEVER', 513: 'GL_LESS', 514: 'GL_EQUAL', 515: 'GL_LEQUAL', 516: 'GL_GREATER', 517: 'GL_NOTEQUAL', 518: 'GL_GEQUAL', 519: 'GL_ALWAYS'}
class Page: def __init__(browser, fix, driver): browser.fix = fix browser.driver = driver def find_element(browser, *locator): return browser.fix.driver.find_element(*locator) def find_elements(browser, *locator): return browser.fix.driver.find_elements(*locator) def click(browser, *locator): e = browser.fix.driver.find_element(*locator) e.click() def input(browser, text, *locator): e = browser.fix.driver.find_element(*locator) e.click() e.send_keys(text)
class Page: def __init__(browser, fix, driver): browser.fix = fix browser.driver = driver def find_element(browser, *locator): return browser.fix.driver.find_element(*locator) def find_elements(browser, *locator): return browser.fix.driver.find_elements(*locator) def click(browser, *locator): e = browser.fix.driver.find_element(*locator) e.click() def input(browser, text, *locator): e = browser.fix.driver.find_element(*locator) e.click() e.send_keys(text)
''' module for implementation of Z algorithm for pattern matching ''' def z_arr(string: str, z: list): ''' fills z array for given string ''' len_str = len(string) l, r, k = 0, 0, 0 for i in range (1, len_str): if (i > r): l, r = i, i while (r < len_str and string[r - l] == string[r]): r += 1 z[i] = r - l r -= 1 else: k = i - l if (z[k] < r - i + 1): z[i] = z[k] else: l = i while (r < len_str and string[r - l] == string[r]): r += 1 z[i] = r - l r -= 1 def z_algorithm(text: str, pattern: str): ''' returns all occurences of pattern in the given text ''' result = [] concat = pattern + "$" + text len_con = len(concat) z = [0] * len_con z_arr(concat, z) for i in range (len_con): if (z[i] == len(pattern)): result.append(i - len(pattern) - 1) return result ''' PyAlgo Devansh Singh, 2021 '''
""" module for implementation of Z algorithm for pattern matching """ def z_arr(string: str, z: list): """ fills z array for given string """ len_str = len(string) (l, r, k) = (0, 0, 0) for i in range(1, len_str): if i > r: (l, r) = (i, i) while r < len_str and string[r - l] == string[r]: r += 1 z[i] = r - l r -= 1 else: k = i - l if z[k] < r - i + 1: z[i] = z[k] else: l = i while r < len_str and string[r - l] == string[r]: r += 1 z[i] = r - l r -= 1 def z_algorithm(text: str, pattern: str): """ returns all occurences of pattern in the given text """ result = [] concat = pattern + '$' + text len_con = len(concat) z = [0] * len_con z_arr(concat, z) for i in range(len_con): if z[i] == len(pattern): result.append(i - len(pattern) - 1) return result '\nPyAlgo\nDevansh Singh, 2021\n'
def isIn(char, aStr): ''' char: a single character aStr: an alphabetized string returns: True if char is in aStr; False otherwise ''' # Your code here midIndex = round(len(aStr)/2) if len(aStr) == 0 or len(aStr) == 1 and char != aStr[0]: return False # elif len(aStr) == 1 and char != aStr[0]: # return False elif char == aStr[midIndex]: return True elif char < aStr[midIndex]: return isIn(char, aStr[:midIndex]) else: return isIn(char, aStr[midIndex+1:]) print(isIn('e', 'bcfhhiklnrsvxxy'))
def is_in(char, aStr): """ char: a single character aStr: an alphabetized string returns: True if char is in aStr; False otherwise """ mid_index = round(len(aStr) / 2) if len(aStr) == 0 or (len(aStr) == 1 and char != aStr[0]): return False elif char == aStr[midIndex]: return True elif char < aStr[midIndex]: return is_in(char, aStr[:midIndex]) else: return is_in(char, aStr[midIndex + 1:]) print(is_in('e', 'bcfhhiklnrsvxxy'))
INPUT = 314 pos = 0 l = [0] for i in range(1,2018): pos = (pos + INPUT) % len(l) + 1 l.insert(pos, i) pos += 1 if pos == len(l): pos = 0 print("Part 1", l[pos]) size = 1 pos = 0 val = 1 for i in range(1,50000001): pos = (pos + INPUT) % size + 1 if pos == 1: val = size size += 1 print("Part 2", val)
input = 314 pos = 0 l = [0] for i in range(1, 2018): pos = (pos + INPUT) % len(l) + 1 l.insert(pos, i) pos += 1 if pos == len(l): pos = 0 print('Part 1', l[pos]) size = 1 pos = 0 val = 1 for i in range(1, 50000001): pos = (pos + INPUT) % size + 1 if pos == 1: val = size size += 1 print('Part 2', val)
counter = 0 def handler(event, context): global counter result = {"counter": counter} counter += 1 return result
counter = 0 def handler(event, context): global counter result = {'counter': counter} counter += 1 return result
# Advent Of Code 2018, day 11, part 1 # http://adventofcode.com/2018/day/11 # solution by ByteCommander, 2018-12-11 with open("inputs/aoc2018_11.txt") as file: serial = int(file.read()) def get_power(x_, y_): rack_id = x_ + 10 power_lv = (rack_id * y_ + serial) * rack_id return power_lv % 1000 // 100 - 5 biggest = None # (total power, (x, y)) for x in range(1, 301): for y in range(1, 301): big_square = sum(get_power(x + dx, y + dy) for dx in range(3) for dy in range(3)) if biggest is None or big_square > biggest[0]: biggest = (big_square, (x, y)) print(f"The highest powered 3x3 square has {biggest[0]} total power " f"and the coordinates {','.join(map(str, biggest[1]))}")
with open('inputs/aoc2018_11.txt') as file: serial = int(file.read()) def get_power(x_, y_): rack_id = x_ + 10 power_lv = (rack_id * y_ + serial) * rack_id return power_lv % 1000 // 100 - 5 biggest = None for x in range(1, 301): for y in range(1, 301): big_square = sum((get_power(x + dx, y + dy) for dx in range(3) for dy in range(3))) if biggest is None or big_square > biggest[0]: biggest = (big_square, (x, y)) print(f"The highest powered 3x3 square has {biggest[0]} total power and the coordinates {','.join(map(str, biggest[1]))}")
class Contorno: def __init__(self, x, altura): self.x = x self.altura = altura def __str__(self): return str([self.x, self.altura]) class Edificio: def __init__(self, izquierda, altura, derecha): self.izquierda = izquierda self.altura = altura self.derecha = derecha def conquista(listaA, listaB): contornos = [] alturaA = 0 alturaB = 0 alturaActual = 0 while(listaA or listaB): if(not listaB or (listaA and listaA[0].x < listaB[0].x)): contorno = listaA.pop(0) alturaA = contorno.altura else: contorno = listaB.pop(0) alturaB = contorno.altura alturaMax = max(alturaA, alturaB) if alturaActual != alturaMax: contornos.append(Contorno(contorno.x, alturaMax)) alturaActual = alturaMax return contornos def obtenerContorno(listaDeEdificios): if len(listaDeEdificios) == 1: edificio = listaDeEdificios[0] return [Contorno(edificio.izquierda, edificio.altura), Contorno(edificio.derecha, 0)] return conquista( obtenerContorno(listaDeEdificios[:len(listaDeEdificios) // 2]), obtenerContorno(listaDeEdificios[len(listaDeEdificios) // 2:]) ) def tuplasAEdificios(tuplas): return [Edificio(a, b, c) for a,b,c in tuplas] tuplas = [ (4,5,8) , (1,15,5) , (16,11,19) , (10,12,11) , (7,7,15) ] # esperado (1,15) , (5,5) , (7,7) , (10,12) , (11,7) , (15,0) , (16,11) , (19,0) result = obtenerContorno(tuplasAEdificios(tuplas)) for r in result: print(r) print('otra tuplaa') otraTupla = [ (1, 11, 5), (2, 6, 7), (3, 13, 9), (12, 7, 16) , (14, 3, 25), (19,18,22) ] # esperado Contorno: (1,11),(3,13),(9,0),(12,7),(16,3),(19,18),(22,3),(25,0) result = obtenerContorno(tuplasAEdificios(otraTupla)) for r in result: print(r)
class Contorno: def __init__(self, x, altura): self.x = x self.altura = altura def __str__(self): return str([self.x, self.altura]) class Edificio: def __init__(self, izquierda, altura, derecha): self.izquierda = izquierda self.altura = altura self.derecha = derecha def conquista(listaA, listaB): contornos = [] altura_a = 0 altura_b = 0 altura_actual = 0 while listaA or listaB: if not listaB or (listaA and listaA[0].x < listaB[0].x): contorno = listaA.pop(0) altura_a = contorno.altura else: contorno = listaB.pop(0) altura_b = contorno.altura altura_max = max(alturaA, alturaB) if alturaActual != alturaMax: contornos.append(contorno(contorno.x, alturaMax)) altura_actual = alturaMax return contornos def obtener_contorno(listaDeEdificios): if len(listaDeEdificios) == 1: edificio = listaDeEdificios[0] return [contorno(edificio.izquierda, edificio.altura), contorno(edificio.derecha, 0)] return conquista(obtener_contorno(listaDeEdificios[:len(listaDeEdificios) // 2]), obtener_contorno(listaDeEdificios[len(listaDeEdificios) // 2:])) def tuplas_a_edificios(tuplas): return [edificio(a, b, c) for (a, b, c) in tuplas] tuplas = [(4, 5, 8), (1, 15, 5), (16, 11, 19), (10, 12, 11), (7, 7, 15)] result = obtener_contorno(tuplas_a_edificios(tuplas)) for r in result: print(r) print('otra tuplaa') otra_tupla = [(1, 11, 5), (2, 6, 7), (3, 13, 9), (12, 7, 16), (14, 3, 25), (19, 18, 22)] result = obtener_contorno(tuplas_a_edificios(otraTupla)) for r in result: print(r)
#Famous Quote: Famous_person = "M. S. Dhoni" Quote = "Hardwork, dedication, persevrance, disipline, etc all is required. But what matters the most in life is HONESTY." print(Famous_person+" once said, \"" + Quote + "\"")
famous_person = 'M. S. Dhoni' quote = 'Hardwork, dedication, persevrance, disipline, etc all is required. But what matters the most in life is HONESTY.' print(Famous_person + ' once said, "' + Quote + '"')
EAST, NORTH, WEST, SOUTH = range(4) def move(pos, dir): x, y = pos if dir == EAST: return x + 1, y if dir == WEST: return x - 1, y if dir == NORTH: return x, y + 1 if dir == SOUTH: return x, y - 1 def generate_spiral(n): g = {} x = 1 direction = EAST pos= (0, 0) s = 1 while x <= n: for i in range(2): for j in range(s): g[x] = pos pos = move(pos, direction) x += 1 direction = (direction+1)%4 s += 1 return g def num_steps_to(pos): x, y = pos return abs(x) + abs(y) def main(): n = int(input()) g = generate_spiral(n) print(num_steps_to(g[n])) if __name__ == '__main__': main()
(east, north, west, south) = range(4) def move(pos, dir): (x, y) = pos if dir == EAST: return (x + 1, y) if dir == WEST: return (x - 1, y) if dir == NORTH: return (x, y + 1) if dir == SOUTH: return (x, y - 1) def generate_spiral(n): g = {} x = 1 direction = EAST pos = (0, 0) s = 1 while x <= n: for i in range(2): for j in range(s): g[x] = pos pos = move(pos, direction) x += 1 direction = (direction + 1) % 4 s += 1 return g def num_steps_to(pos): (x, y) = pos return abs(x) + abs(y) def main(): n = int(input()) g = generate_spiral(n) print(num_steps_to(g[n])) if __name__ == '__main__': main()
def insertionSort(listku): for index in range(1,len(listku)): current_element = listku[index] i = index while current_element < listku[i-1] and i > 0: listku[i] = listku[i-1] i = i-1 listku[i] = current_element jumlah = int(input("Berapa banyak element yang diinginkan : ")) list1 = [int(input()) for i in range (jumlah)] insertionSort(list1) print (list1)
def insertion_sort(listku): for index in range(1, len(listku)): current_element = listku[index] i = index while current_element < listku[i - 1] and i > 0: listku[i] = listku[i - 1] i = i - 1 listku[i] = current_element jumlah = int(input('Berapa banyak element yang diinginkan : ')) list1 = [int(input()) for i in range(jumlah)] insertion_sort(list1) print(list1)
a = 2 b = 7 area = a * b print(area) c = 7 d = 8 area1 = c * d print(area1) e = 12 f = 5 area2 = e * f print(area2) side_g = int(input()) side_h = int(input()) print(side_g * side_h)
a = 2 b = 7 area = a * b print(area) c = 7 d = 8 area1 = c * d print(area1) e = 12 f = 5 area2 = e * f print(area2) side_g = int(input()) side_h = int(input()) print(side_g * side_h)
#code class Node: def __init__(self,data): self.data = data self.next = None self.prev = None class DoublyLinkedList: def __init__(self): self.head = None def Push(self,new_data): temp = self.head new_node = Node(new_data) if self.head is None: self.head = new_node return while temp.next is not None: temp = temp.next temp.next = new_node new_node.prev = temp def PrintDList(self): temp = self.head if self.head is None: return while temp is not None: print(temp.data,end=" ") temp = temp.next print() def ReversePrint(self): temp = self.head while temp.next is not None: temp = temp.next rev = temp while rev is not None: print(rev.data,end=" ") rev = rev.prev print() if (__name__ == "__main__"): arr = [8,2,3,1,7] dlist = DoublyLinkedList() for i in arr : dlist.Push(i) dlist.PrintDList() dlist.ReversePrint()
class Node: def __init__(self, data): self.data = data self.next = None self.prev = None class Doublylinkedlist: def __init__(self): self.head = None def push(self, new_data): temp = self.head new_node = node(new_data) if self.head is None: self.head = new_node return while temp.next is not None: temp = temp.next temp.next = new_node new_node.prev = temp def print_d_list(self): temp = self.head if self.head is None: return while temp is not None: print(temp.data, end=' ') temp = temp.next print() def reverse_print(self): temp = self.head while temp.next is not None: temp = temp.next rev = temp while rev is not None: print(rev.data, end=' ') rev = rev.prev print() if __name__ == '__main__': arr = [8, 2, 3, 1, 7] dlist = doubly_linked_list() for i in arr: dlist.Push(i) dlist.PrintDList() dlist.ReversePrint()
# -*- coding: utf-8 -*- def test_add_contact(app, db, json_contacts, check_ui): contact = json_contacts old_contacts = db.get_contact_list() app.contact.add_new(contact) app.contact.check_add_new_success(db, contact, old_contacts, check_ui)
def test_add_contact(app, db, json_contacts, check_ui): contact = json_contacts old_contacts = db.get_contact_list() app.contact.add_new(contact) app.contact.check_add_new_success(db, contact, old_contacts, check_ui)
def get_greater(project_arr): version0 = project_arr[0].split(',')[1].lower() version1 = project_arr[1].split(',')[1].lower() split_char = None if '.' in version0: split_char = '.' elif '_' in version0: split_char = '_' if split_char == None: if version0 < version1: return project_arr[0].split(',') , project_arr[1].split(',') else: return project_arr[1].split(',') , project_arr[0].split(',') version0_splited = version0.split(split_char) version1_splited = version1.split(split_char) for i in range(len(version0_splited)): number0 = version0_splited[i] if (i + 1) > len(version1_splited): break number1 = version1_splited[i] if number0.isdigit() and number1.isdigit(): if int(number0) < int(number1): return project_arr[0].split(',') , project_arr[1].split(',') elif int(number0) > int(number1): return project_arr[1].split(',') , project_arr[0].split(',') else: if number0.lower() < number1.lower(): return project_arr[0].split(',') , project_arr[1].split(',') elif number0.lower() > number1.lower(): return project_arr[1].split(',') , project_arr[0].split(',') return project_arr[0].split(',') , project_arr[1].split(',') projects = {} with open('result.csv', 'r') as f: skip_line = True for line in f: if skip_line: skip_line = False continue line = line.strip() projectname = line.split(',')[0] if projectname not in projects: projects[projectname] = [line] else: projects[projectname].append(line) with open('compare.csv', 'w') as f: f.write('projectname,diff loc,diff blocks,diff % disciplined,diff disciplined\n') for project in projects: if len(projects[project]) < 2: continue #first, second = ['',''] first,second = get_greater(projects[project]) #if projects[project][0].split(',')[1].lower() < projects[project][1].split(',')[1].lower(): # first = projects[project][0].split(',') # second = projects[project][1].split(',') #else: # first = projects[project][1].split(',') # second = projects[project][0].split(',') diff_loc = int(second[3]) - int(first[3]) diff_blocks = int(second[4]) - int(first[4]) diff_disciplined = float(second[5]) - float(first[5]) diff_n_disciplined = int(second[-1]) - int(first[-1]) f.write(project + ',' + str(diff_loc) + ',' + str(diff_blocks) + ',' + \ str(round(diff_disciplined,2)) + ',' + str(diff_n_disciplined) + '\n')
def get_greater(project_arr): version0 = project_arr[0].split(',')[1].lower() version1 = project_arr[1].split(',')[1].lower() split_char = None if '.' in version0: split_char = '.' elif '_' in version0: split_char = '_' if split_char == None: if version0 < version1: return (project_arr[0].split(','), project_arr[1].split(',')) else: return (project_arr[1].split(','), project_arr[0].split(',')) version0_splited = version0.split(split_char) version1_splited = version1.split(split_char) for i in range(len(version0_splited)): number0 = version0_splited[i] if i + 1 > len(version1_splited): break number1 = version1_splited[i] if number0.isdigit() and number1.isdigit(): if int(number0) < int(number1): return (project_arr[0].split(','), project_arr[1].split(',')) elif int(number0) > int(number1): return (project_arr[1].split(','), project_arr[0].split(',')) elif number0.lower() < number1.lower(): return (project_arr[0].split(','), project_arr[1].split(',')) elif number0.lower() > number1.lower(): return (project_arr[1].split(','), project_arr[0].split(',')) return (project_arr[0].split(','), project_arr[1].split(',')) projects = {} with open('result.csv', 'r') as f: skip_line = True for line in f: if skip_line: skip_line = False continue line = line.strip() projectname = line.split(',')[0] if projectname not in projects: projects[projectname] = [line] else: projects[projectname].append(line) with open('compare.csv', 'w') as f: f.write('projectname,diff loc,diff blocks,diff % disciplined,diff disciplined\n') for project in projects: if len(projects[project]) < 2: continue (first, second) = get_greater(projects[project]) diff_loc = int(second[3]) - int(first[3]) diff_blocks = int(second[4]) - int(first[4]) diff_disciplined = float(second[5]) - float(first[5]) diff_n_disciplined = int(second[-1]) - int(first[-1]) f.write(project + ',' + str(diff_loc) + ',' + str(diff_blocks) + ',' + str(round(diff_disciplined, 2)) + ',' + str(diff_n_disciplined) + '\n')
#Get states and coordinates and generates a csv file lats = [] lons = [] states = [] lat = 0.0 lon = 0.0 infile = 'all_states.json' with open(infile, 'r') as f: for line in f: if ('coordinates' in line): lon = float(f.readline().strip().split(',')[0]) lat = float(f.readline().strip().split(',')[0]) #Pick only US states if ('state' in line): st = line.strip().split(':')[1] print(st) temp = f.readline() country = f.readline().split(',')[0] if ('country' in country): country = country.split(':')[1] else: country = "" if (len(st) < 40 and "United States of America" in country): states.append(st) lons.append(lon) lats.append(lat) with open("geo.dat", "w") as f: f.write("state, lat, lon\n") tam = len(states) i = 0 while (i < tam): line = states[i] + " " + str(lats[i]) + ", " + str(lons[i]) + "\n" f.write(line) i+=1
lats = [] lons = [] states = [] lat = 0.0 lon = 0.0 infile = 'all_states.json' with open(infile, 'r') as f: for line in f: if 'coordinates' in line: lon = float(f.readline().strip().split(',')[0]) lat = float(f.readline().strip().split(',')[0]) if 'state' in line: st = line.strip().split(':')[1] print(st) temp = f.readline() country = f.readline().split(',')[0] if 'country' in country: country = country.split(':')[1] else: country = '' if len(st) < 40 and 'United States of America' in country: states.append(st) lons.append(lon) lats.append(lat) with open('geo.dat', 'w') as f: f.write('state, lat, lon\n') tam = len(states) i = 0 while i < tam: line = states[i] + ' ' + str(lats[i]) + ', ' + str(lons[i]) + '\n' f.write(line) i += 1
# Allows us to read a espionage def read_espionage(espionage, structures): ans = {} carefull = False espionage = espionage.split('\n') line = espionage[0].split(' ') j = 4 while line[j][0] != '[': j += 1 ans.update({'planet':' '.join(line[4:j])}) ans.update({'coordinates':line[j]}) ans.update({'date':'{} {}'.format(line[j+1], line[j+2])}) i = 2 name = ' '.join(espionage[i].split(' ')[1:])[1:] pos = name.find('(') if pos != -1: name = name[:pos] ans.update({'name':name}) ans.update({'inactive':pos!=-1}) i += 1 ans.update({'counterspionage':espionage[i].split(' ')[3]}) i += 3 line = espionage[i].split(' ') resources = {} resources.update({'metal':line[0]}) resources.update({'crystal':line[1]}) resources.update({'deuteryum':line[2]}) resources.update({'energy':line[3]}) ans.update({'resources':resources}) pipeline = ['ships','defense','buildings','research'] for element in pipeline: i += 2 line = espionage[i].replace('.','') care, entities = read_entities(line,structures[element]) if care: carefull = True ans.update({element:entities}) ans.update({'care':carefull}) return ans def read_entity(structure,line): num_structure = 0 #print(':' + structure + ': ---> :' + line[:len(structure)] + ':') if structure == line[:len(structure)]: line = line[len(structure)+1:] j = 1 while j-1 < len(line) and line[:j].isdigit(): j += 1 num_structure = int(line[:j-1]) line = line[j-1:] return line, num_structure def read_entities(line, structure): ans = {} length = len(line) while line != '': for s in structure: line, num = read_entity(structure[s], line) if num != 0: ans.update({s:num}) if len(line) == length: break; return len(ans) == 0, ans
def read_espionage(espionage, structures): ans = {} carefull = False espionage = espionage.split('\n') line = espionage[0].split(' ') j = 4 while line[j][0] != '[': j += 1 ans.update({'planet': ' '.join(line[4:j])}) ans.update({'coordinates': line[j]}) ans.update({'date': '{} {}'.format(line[j + 1], line[j + 2])}) i = 2 name = ' '.join(espionage[i].split(' ')[1:])[1:] pos = name.find('(') if pos != -1: name = name[:pos] ans.update({'name': name}) ans.update({'inactive': pos != -1}) i += 1 ans.update({'counterspionage': espionage[i].split(' ')[3]}) i += 3 line = espionage[i].split(' ') resources = {} resources.update({'metal': line[0]}) resources.update({'crystal': line[1]}) resources.update({'deuteryum': line[2]}) resources.update({'energy': line[3]}) ans.update({'resources': resources}) pipeline = ['ships', 'defense', 'buildings', 'research'] for element in pipeline: i += 2 line = espionage[i].replace('.', '') (care, entities) = read_entities(line, structures[element]) if care: carefull = True ans.update({element: entities}) ans.update({'care': carefull}) return ans def read_entity(structure, line): num_structure = 0 if structure == line[:len(structure)]: line = line[len(structure) + 1:] j = 1 while j - 1 < len(line) and line[:j].isdigit(): j += 1 num_structure = int(line[:j - 1]) line = line[j - 1:] return (line, num_structure) def read_entities(line, structure): ans = {} length = len(line) while line != '': for s in structure: (line, num) = read_entity(structure[s], line) if num != 0: ans.update({s: num}) if len(line) == length: break return (len(ans) == 0, ans)
########################## ###### MINI-MAX ###### ########################## class MiniMax: # print utility value of root node (assuming it is max) # print names of all nodes visited during search def __init__(self, root): #self.game_tree = game_tree # GameTree self.root = root # GameNode #self.currentNode = None # GameNode self.successors = root.children # List of GameNodes return def minimax(self, node): # first, find the max value #best_val = self.max_value(node) # should be root node of tree # second, find the node which HAS that max value # --> means we need to propagate the values back up the # tree as part of our minimax algorithm successors = node.children #print ("MiniMax: Utility Value of Root Node: = " + str(best_val)) # find the node with our best move best_move = None best_val = -1 for elem in successors: # ---> Need to propagate values up tree for this to work print("Looking at ",elem.move, "with value: ", elem.value) if elem.value >= best_val: best_move = elem.move best_val = elem.value # return that best value that we've found print("Best move is: ",best_move) return best_move def max_value(self, node): #print ("MiniMax-->MAX: Visited Node :: " + str(node.move)) if self.isTerminal(node): return self.getUtility(node) infinity = float('inf') max_value = -infinity successors_states = self.getSuccessors(node) for state in successors_states: max_value = max(max_value, self.min_value(state)) return max_value def min_value(self, node): #print ("MiniMax-->MIN: Visited Node :: " + str(node.move)) if self.isTerminal(node): return self.getUtility(node) infinity = float('inf') min_value = infinity successor_states = self.getSuccessors(node) for state in successor_states: min_value = min(min_value, self.max_value(state)) return min_value # # # UTILITY METHODS # # # # successor states in a game tree are the child nodes... def getSuccessors(self, node): assert node is not None return node.children # return true if the node has NO children (successor states) # return false if the node has children (successor states) def isTerminal(self, node): assert node is not None return len(node.children) == 0 def getUtility(self, node): assert node is not None return node.value
class Minimax: def __init__(self, root): self.root = root self.successors = root.children return def minimax(self, node): successors = node.children best_move = None best_val = -1 for elem in successors: print('Looking at ', elem.move, 'with value: ', elem.value) if elem.value >= best_val: best_move = elem.move best_val = elem.value print('Best move is: ', best_move) return best_move def max_value(self, node): if self.isTerminal(node): return self.getUtility(node) infinity = float('inf') max_value = -infinity successors_states = self.getSuccessors(node) for state in successors_states: max_value = max(max_value, self.min_value(state)) return max_value def min_value(self, node): if self.isTerminal(node): return self.getUtility(node) infinity = float('inf') min_value = infinity successor_states = self.getSuccessors(node) for state in successor_states: min_value = min(min_value, self.max_value(state)) return min_value def get_successors(self, node): assert node is not None return node.children def is_terminal(self, node): assert node is not None return len(node.children) == 0 def get_utility(self, node): assert node is not None return node.value
# Creating a dictionary called 'birthdays' containing famous people's names as # key and their birthday date as values. birthdays = { 'Albert Einstein': '03/14/1879', 'Benjamin Franklin': '01/17/1706', 'Ada Lovelace': '12/10/1815', 'Donald Trump': '06/14/1946', 'Rowan Atkinson': '01/6/1955'} # Creating a function 'print_birthdays' to display, through a for loop, the # names of the people whose birthday date we have. def print_birthdays(): print('''Welcome to the birthday dictionary. We know the birthdays of these people:''') for name in birthdays: print(name) # Creating a function 'return_birthday' to return the date of the requested # famous person in the form of {famous person's name}'s birthday is # {famous person's birthday date}; in case the requested famous person is # not in our dictionary, we return the message 'Sadly, we don't have # {famous person's name}'s birthday'. def return_birthday(name): if name in birthdays: print('{}\'s birthday is {}.'.format(name, birthdays[name])) else: print('Sadly, we don\'t have {}\'s birthday.'.format(name)) def name_is_valid(name): # Check whether an input name is valid according to # some conditions if len(name) > 20: return False if name not in birthdays: return False if name.islower(): return False return True def just_the_surname(name): # Return just the surname of the person if name in birthdays: fullname = [name] fullname = fullname[0].split() return fullname[1] def not_digit(name): # Check whether the input is a digit if not name.isdigit(): return True
birthdays = {'Albert Einstein': '03/14/1879', 'Benjamin Franklin': '01/17/1706', 'Ada Lovelace': '12/10/1815', 'Donald Trump': '06/14/1946', 'Rowan Atkinson': '01/6/1955'} def print_birthdays(): print('Welcome to the birthday dictionary. We know the birthdays of these\n people:') for name in birthdays: print(name) def return_birthday(name): if name in birthdays: print("{}'s birthday is {}.".format(name, birthdays[name])) else: print("Sadly, we don't have {}'s birthday.".format(name)) def name_is_valid(name): if len(name) > 20: return False if name not in birthdays: return False if name.islower(): return False return True def just_the_surname(name): if name in birthdays: fullname = [name] fullname = fullname[0].split() return fullname[1] def not_digit(name): if not name.isdigit(): return True
# See: https://docs.djangoproject.com/en/1.5/ref/settings/#authentication-backends AUTH_USER_MODEL = 'auth.User' AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', )
auth_user_model = 'auth.User' authentication_backends = ('django.contrib.auth.backends.ModelBackend',)
# https://codeforces.com/problemset/problem/1519/B t = int(input()) cases = [list(map(int, input().split())) for _ in range(t)] for case in cases: if (case[0]-1) + (case[0] * (case[1]-1)) == case[2]: print('YES') else: print('NO')
t = int(input()) cases = [list(map(int, input().split())) for _ in range(t)] for case in cases: if case[0] - 1 + case[0] * (case[1] - 1) == case[2]: print('YES') else: print('NO')
subt = '' file = 'BookCorpus2' groups = ['ArXiv', 'BookCorpus2', 'Books3', 'DM Mathematics', 'Enron Emails', 'EuroParl', 'FreeLaw', 'Github', 'Gutenberg (PG-19)', 'HackerNews', 'NIH ExPorter', 'OpenSubtitles', 'OpenWebText2', 'Pile-CC', 'PhilPapers', 'PubMed Central', 'PubMed Abstracts', 'StackExchange', 'Ubuntu IRC', 'USPTO Backgrounds', 'Wikipedia (en)', 'YoutubeSubtitles'] for element in groups: for a in range(0, 15): print(f'{element}{a}') with open(f'{element}{a}', 'r') as f: subt = f.read() subt = subt.encode('ascii', 'ignore').decode('unicode_escape') # subt.join(subtL) with open(f'lb/{element}{a}', "w") as f: f.write(subt) print(f'end of {a}')
subt = '' file = 'BookCorpus2' groups = ['ArXiv', 'BookCorpus2', 'Books3', 'DM Mathematics', 'Enron Emails', 'EuroParl', 'FreeLaw', 'Github', 'Gutenberg (PG-19)', 'HackerNews', 'NIH ExPorter', 'OpenSubtitles', 'OpenWebText2', 'Pile-CC', 'PhilPapers', 'PubMed Central', 'PubMed Abstracts', 'StackExchange', 'Ubuntu IRC', 'USPTO Backgrounds', 'Wikipedia (en)', 'YoutubeSubtitles'] for element in groups: for a in range(0, 15): print(f'{element}{a}') with open(f'{element}{a}', 'r') as f: subt = f.read() subt = subt.encode('ascii', 'ignore').decode('unicode_escape') with open(f'lb/{element}{a}', 'w') as f: f.write(subt) print(f'end of {a}')
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # def f_gold ( s , t ) : count = 0 for i in range ( 0 , len ( t ) ) : if ( count == len ( s ) ) : break if ( t [ i ] == s [ count ] ) : count = count + 1 return count #TOFILL if __name__ == '__main__': param = [ ('nObYIOjEQZ','uARTDTQbmGI',), ('84574','8538229',), ('1010001010010','11',), ('DjZtAfUudk','OewGm',), ('550','132744553919',), ('1110','0101',), ('GywyxwH','LPQqEqrDZiwY',), ('67318370914755','9928',), ('11011000000101','00000',), ('G','V',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
def f_gold(s, t): count = 0 for i in range(0, len(t)): if count == len(s): break if t[i] == s[count]: count = count + 1 return count if __name__ == '__main__': param = [('nObYIOjEQZ', 'uARTDTQbmGI'), ('84574', '8538229'), ('1010001010010', '11'), ('DjZtAfUudk', 'OewGm'), ('550', '132744553919'), ('1110', '0101'), ('GywyxwH', 'LPQqEqrDZiwY'), ('67318370914755', '9928'), ('11011000000101', '00000'), ('G', 'V')] n_success = 0 for (i, parameters_set) in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print('#Results: %i, %i' % (n_success, len(param)))
class No: def __init__(self, valor): self.valor = valor self.proximo = None self.anterior = None def mostrar_no(self): print(self.valor) class FilaListaDuplamenteEncadeada: def __init__(self): self.primeiro = None self.ultimo = None def __fila_vazia(self): return self.primeiro == None def enfileirar(self, valor): novo = No(valor) if self.__fila_vazia(): self.primeiro = novo else: self.ultimo.proximo = novo novo.anterior = self.ultimo self.ultimo = novo def mostrar_fila(self): atual = self.primeiro while atual != None: atual.mostrar_no() atual = atual.proximo def desenfileirar(self): temp = self.primeiro if self.primeiro.proximo == None: self.ultimo = None else: self.primeiro.proximo.anterior = None self.primeiro = self.primeiro.proximo return temp fila = FilaListaDuplamenteEncadeada() fila.enfileirar(4) fila.enfileirar(3) fila.enfileirar(2) fila.enfileirar(1) fila.enfileirar(0) print('-'*7) fila.mostrar_fila() fila.desenfileirar() fila.desenfileirar() fila.desenfileirar() fila.enfileirar(8) print('-'*7) fila.mostrar_fila()
class No: def __init__(self, valor): self.valor = valor self.proximo = None self.anterior = None def mostrar_no(self): print(self.valor) class Filalistaduplamenteencadeada: def __init__(self): self.primeiro = None self.ultimo = None def __fila_vazia(self): return self.primeiro == None def enfileirar(self, valor): novo = no(valor) if self.__fila_vazia(): self.primeiro = novo else: self.ultimo.proximo = novo novo.anterior = self.ultimo self.ultimo = novo def mostrar_fila(self): atual = self.primeiro while atual != None: atual.mostrar_no() atual = atual.proximo def desenfileirar(self): temp = self.primeiro if self.primeiro.proximo == None: self.ultimo = None else: self.primeiro.proximo.anterior = None self.primeiro = self.primeiro.proximo return temp fila = fila_lista_duplamente_encadeada() fila.enfileirar(4) fila.enfileirar(3) fila.enfileirar(2) fila.enfileirar(1) fila.enfileirar(0) print('-' * 7) fila.mostrar_fila() fila.desenfileirar() fila.desenfileirar() fila.desenfileirar() fila.enfileirar(8) print('-' * 7) fila.mostrar_fila()
class SinglyLinkedList: def __init__(self, single_link_node_factory, *args, **kwargs): super().__init__(*args, **kwargs) self._linked_node_factory = single_link_node_factory self._header = self._linked_node_factory() self._tail = None def __iter__(self): return iter(self.head) def __repr__(self): return f"{self.__module__}.{self.__class__.__name__}()" def __str__(self): return self.__repr__() def append(self, value=None): self.insert(value) def insert(self, value=None, link_before=None): if link_before is not None: link_after = link_before.next_link link_before.next_link = self._linked_node_factory(value, link_after) elif self.is_empty: self._header.next_link = self._linked_node_factory(value) self._tail = self._header.next_link else: old_tail = self._tail old_tail.next_link = self._linked_node_factory(value) self._tail = old_tail.next_link def find(self, value): if self.is_empty: return None current_link = self.head while current_link is not None: if current_link.value == value: break current_link = current_link.next_link return current_link @property def head(self): return self._header.next_link @property def tail(self): return self._tail @property def is_empty(self): return self.head is None
class Singlylinkedlist: def __init__(self, single_link_node_factory, *args, **kwargs): super().__init__(*args, **kwargs) self._linked_node_factory = single_link_node_factory self._header = self._linked_node_factory() self._tail = None def __iter__(self): return iter(self.head) def __repr__(self): return f'{self.__module__}.{self.__class__.__name__}()' def __str__(self): return self.__repr__() def append(self, value=None): self.insert(value) def insert(self, value=None, link_before=None): if link_before is not None: link_after = link_before.next_link link_before.next_link = self._linked_node_factory(value, link_after) elif self.is_empty: self._header.next_link = self._linked_node_factory(value) self._tail = self._header.next_link else: old_tail = self._tail old_tail.next_link = self._linked_node_factory(value) self._tail = old_tail.next_link def find(self, value): if self.is_empty: return None current_link = self.head while current_link is not None: if current_link.value == value: break current_link = current_link.next_link return current_link @property def head(self): return self._header.next_link @property def tail(self): return self._tail @property def is_empty(self): return self.head is None
class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def distribute_coins(self, root: TreeNode) -> int: self.result = 0 self.post_order(root) return self.result def post_order(self, root) -> int: if root is not None: left = self.post_order(root.left) right = self.post_order(root.right) val = left + right + root.val - 1 self.result += abs(val) return val return 0
class Treenode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def distribute_coins(self, root: TreeNode) -> int: self.result = 0 self.post_order(root) return self.result def post_order(self, root) -> int: if root is not None: left = self.post_order(root.left) right = self.post_order(root.right) val = left + right + root.val - 1 self.result += abs(val) return val return 0
class Broker: def purchase_shares(): raise NotImplementedError def sell_shares(): raise NotImplementedError
class Broker: def purchase_shares(): raise NotImplementedError def sell_shares(): raise NotImplementedError
print("#===Welcome to DNA/mRNA/tRNA/Anino Acid (Protein) Sequence Converter===#") start = input("Press Enter to continue...") while True: if start == "": print("Check Available Options:") print("1. DNA") print("2. mRNA") print("3. tRNA") print("4. Amino Acid(Protein)") print("") command = (input("Select input option(1-4): ")) if command == "1": print("1. mRNA") print("2. tRNA") command2 = (input("Select output option(1,2): ")) data = input("Enter the DNA sequence: ") result = "" if command2 == "1": for x in data: if x.upper() == "A": result += "A" elif x.upper() == "T": result += "U" elif x.upper() == "C": result += "C" elif x.upper() == "G": result += "G" elif command2 == "2": for x in data: if x.upper() == "A": result += "U" elif x.upper() == "T": result += "A" elif x.upper() == "C": result += "G" elif x.upper() == "G": result += "C" else: print("Invalid Command") print(result) elif command == "2": print("1. DNA") print("2. tRNA") command2 = (input("Select output option(1,2): ")) data = input("Enter the mRNA sequence: ") result = "" if command2 == "1": for x in data: if x.upper() == "A": result += "A" elif x.upper() == "T": result += "U" elif x.upper() == "C": result += "C" elif x.upper() == "G": result += "G" elif command2 == "2": for x in data: if x.upper() == "A": result += "U" elif x.upper() == "U": result += "A" elif x.upper() == "C": result += "G" elif x.upper() == "G": result += "C" print(result) else: print("Invalid Command") elif command == "3": print("1. DNA") print("2. mRNA") command2 = (input("Select output option(1,2): ")) data = input("Enter the tRNA sequence: ") result = "" if command2 == "1": for x in data: if x.upper() == "A": result += "T" elif x.upper() == "U": result += "A" elif x.upper() == "C": result += "G" elif x.upper() == "G": result += "C" print(result) elif command2 == "2": for x in data: if x.upper() == "A": result += "U" elif x.upper() == "U": result += "A" elif x.upper() == "C": result += "G" elif x.upper() == "G": result += "C" print(result) elif command2 == "3": print(data) else: print("Invalid Command") elif command == "4": data = input("Enter mRNA sequence: ") result = "" array = [] if len(data)%3 != 0: print("Invalid Sequence") else: for x in range(len(array)): if array[x] == "UUU" or array[x] == "UUC": result += "Phe"+"-" elif array[x] == "UUA" or array[x] == "UUG" or array[x] == "CUU" or array[x] == "CUC" or array[x] == "CUA" or array[x] == "CUG": result += "Leu"+"-" elif array[x] == "UCU" or array[x] == "UCC" or array[x] == "UCA" or array[x] == "UCG" or array[x] == "AGU" or array[x] == "AGC": result += "Ser"+"-" elif array[x] == "UAU" or array[x] == "UAC": result += "Tyr"+"-" elif array[x] == "UGU" or array[x] == "UGC": result += "Cys"+"-" elif array[x] == "CCU" or array[x] == "CCC" or array[x] == "CCA" or array[x] == "CAG": result += "Pro"+"-" elif array[x] == "CAU" or array[x] == "CAC": result += "His"+"-" elif array[x] == "CAA" or array[x] == "CAG": result += "Gin"+"-" elif array[x] == "CGU" or array[x] == "CGC" or array[x] == "CGA" or array[x] == "CGG" or array[x] == "AGA" or array[x] == "AGG": result += "Arg"+"-" elif array[x] == "UGG": result += "Trp"+"-" elif array[x] == "AUG": result += "Met"+"-" elif array[x] == "AUU" or array[x] == "AUC" or array[x] == "AUA": result += "Ile"+"-" elif array[x] == "ACU" or array[x] == "ACC" or array[x] == "ACA" or array[x] == "ACG": result += "Thr"+"-" elif array[x] == "AAU" or array[x] == "AAC": result += "Asn"+"-" elif array[x] == "AAA" or array[x] == "AAG": result += "Lys"+"-" elif array[x] == "GUU" or array[x] == "GUC" or array[x] == "GUA" or array[x] == "GUG": result += "Val"+"-" elif array[x] == "GCU" or array[x] == "GCC" or array[x] == "GCA" or array[x] == "GCG": result += "Ala"+"-" elif array[x] == "GGU" or array[x] == "GGC" or array[x] == "GGA" or array[x] == "GGG": result += "Gly"+"-" elif array[x] == "GAU" or array[x] == "GAC": result += "Asp"+"-" elif array[x] == "GAA" or array[x] == "GAG": result += "Glu"+"-" else: pass final = result[:-1] print(final) else: print("Something Went Wrong") else: break self = input()
print('#===Welcome to DNA/mRNA/tRNA/Anino Acid (Protein) Sequence Converter===#') start = input('Press Enter to continue...') while True: if start == '': print('Check Available Options:') print('1. DNA') print('2. mRNA') print('3. tRNA') print('4. Amino Acid(Protein)') print('') command = input('Select input option(1-4): ') if command == '1': print('1. mRNA') print('2. tRNA') command2 = input('Select output option(1,2): ') data = input('Enter the DNA sequence: ') result = '' if command2 == '1': for x in data: if x.upper() == 'A': result += 'A' elif x.upper() == 'T': result += 'U' elif x.upper() == 'C': result += 'C' elif x.upper() == 'G': result += 'G' elif command2 == '2': for x in data: if x.upper() == 'A': result += 'U' elif x.upper() == 'T': result += 'A' elif x.upper() == 'C': result += 'G' elif x.upper() == 'G': result += 'C' else: print('Invalid Command') print(result) elif command == '2': print('1. DNA') print('2. tRNA') command2 = input('Select output option(1,2): ') data = input('Enter the mRNA sequence: ') result = '' if command2 == '1': for x in data: if x.upper() == 'A': result += 'A' elif x.upper() == 'T': result += 'U' elif x.upper() == 'C': result += 'C' elif x.upper() == 'G': result += 'G' elif command2 == '2': for x in data: if x.upper() == 'A': result += 'U' elif x.upper() == 'U': result += 'A' elif x.upper() == 'C': result += 'G' elif x.upper() == 'G': result += 'C' print(result) else: print('Invalid Command') elif command == '3': print('1. DNA') print('2. mRNA') command2 = input('Select output option(1,2): ') data = input('Enter the tRNA sequence: ') result = '' if command2 == '1': for x in data: if x.upper() == 'A': result += 'T' elif x.upper() == 'U': result += 'A' elif x.upper() == 'C': result += 'G' elif x.upper() == 'G': result += 'C' print(result) elif command2 == '2': for x in data: if x.upper() == 'A': result += 'U' elif x.upper() == 'U': result += 'A' elif x.upper() == 'C': result += 'G' elif x.upper() == 'G': result += 'C' print(result) elif command2 == '3': print(data) else: print('Invalid Command') elif command == '4': data = input('Enter mRNA sequence: ') result = '' array = [] if len(data) % 3 != 0: print('Invalid Sequence') else: for x in range(len(array)): if array[x] == 'UUU' or array[x] == 'UUC': result += 'Phe' + '-' elif array[x] == 'UUA' or array[x] == 'UUG' or array[x] == 'CUU' or (array[x] == 'CUC') or (array[x] == 'CUA') or (array[x] == 'CUG'): result += 'Leu' + '-' elif array[x] == 'UCU' or array[x] == 'UCC' or array[x] == 'UCA' or (array[x] == 'UCG') or (array[x] == 'AGU') or (array[x] == 'AGC'): result += 'Ser' + '-' elif array[x] == 'UAU' or array[x] == 'UAC': result += 'Tyr' + '-' elif array[x] == 'UGU' or array[x] == 'UGC': result += 'Cys' + '-' elif array[x] == 'CCU' or array[x] == 'CCC' or array[x] == 'CCA' or (array[x] == 'CAG'): result += 'Pro' + '-' elif array[x] == 'CAU' or array[x] == 'CAC': result += 'His' + '-' elif array[x] == 'CAA' or array[x] == 'CAG': result += 'Gin' + '-' elif array[x] == 'CGU' or array[x] == 'CGC' or array[x] == 'CGA' or (array[x] == 'CGG') or (array[x] == 'AGA') or (array[x] == 'AGG'): result += 'Arg' + '-' elif array[x] == 'UGG': result += 'Trp' + '-' elif array[x] == 'AUG': result += 'Met' + '-' elif array[x] == 'AUU' or array[x] == 'AUC' or array[x] == 'AUA': result += 'Ile' + '-' elif array[x] == 'ACU' or array[x] == 'ACC' or array[x] == 'ACA' or (array[x] == 'ACG'): result += 'Thr' + '-' elif array[x] == 'AAU' or array[x] == 'AAC': result += 'Asn' + '-' elif array[x] == 'AAA' or array[x] == 'AAG': result += 'Lys' + '-' elif array[x] == 'GUU' or array[x] == 'GUC' or array[x] == 'GUA' or (array[x] == 'GUG'): result += 'Val' + '-' elif array[x] == 'GCU' or array[x] == 'GCC' or array[x] == 'GCA' or (array[x] == 'GCG'): result += 'Ala' + '-' elif array[x] == 'GGU' or array[x] == 'GGC' or array[x] == 'GGA' or (array[x] == 'GGG'): result += 'Gly' + '-' elif array[x] == 'GAU' or array[x] == 'GAC': result += 'Asp' + '-' elif array[x] == 'GAA' or array[x] == 'GAG': result += 'Glu' + '-' else: pass final = result[:-1] print(final) else: print('Something Went Wrong') else: break self = input()
# Recitation Lab 5 Question 1: Program to find smallest power of 2 greater than or equal to a number # Author: Asmit De # Date: 03/02/2017 # Input number num = int(input('Enter a number: ')) # Initialize variable to the lowest power of 2 powervalue = 2 # Run loop until powervalue becomes greater than or equal to num while powervalue < num: # Generate the next power of 2 and update powervalue (just double it!) powervalue *= 2 # Display final powervalue print('The smallest power of 2 greater than or equal to', num, 'is', powervalue)
num = int(input('Enter a number: ')) powervalue = 2 while powervalue < num: powervalue *= 2 print('The smallest power of 2 greater than or equal to', num, 'is', powervalue)
players = { "name" : "Messi", "age" : 32, "goals": 800, "cap" : 700} players.keys() for k in players.keys(): print(k)
players = {'name': 'Messi', 'age': 32, 'goals': 800, 'cap': 700} players.keys() for k in players.keys(): print(k)
#maximo def maximo(a,b): if a > b: return a else: return b
def maximo(a, b): if a > b: return a else: return b
n = int(input()) #lost fights helmet_price = float(input()) sword_price = float(input()) shield_price = float(input()) armor_price = float(input()) lost_fights_count = 0 helmet_brakes = 0 sword_brakes = 0 shield_brakes = 0 armor_brakes = 0 total_shield_brakes = 0 for x in range(n): lost_fights_count += 1 if lost_fights_count % 2 == 0: helmet_brakes += 1 if lost_fights_count % 3 == 0: sword_brakes += 1 if lost_fights_count % 2 == 0: shield_brakes += 1 total_shield_brakes += 1 if shield_brakes % 2 == 0 and shield_brakes != 0: armor_brakes += 1 shield_brakes = 0 expenses = (helmet_brakes * helmet_price) + (sword_brakes * sword_price) \ + (total_shield_brakes * shield_price) + (armor_brakes * armor_price) print(f"Gladiator expenses: {expenses:.2f} aureus")
n = int(input()) helmet_price = float(input()) sword_price = float(input()) shield_price = float(input()) armor_price = float(input()) lost_fights_count = 0 helmet_brakes = 0 sword_brakes = 0 shield_brakes = 0 armor_brakes = 0 total_shield_brakes = 0 for x in range(n): lost_fights_count += 1 if lost_fights_count % 2 == 0: helmet_brakes += 1 if lost_fights_count % 3 == 0: sword_brakes += 1 if lost_fights_count % 2 == 0: shield_brakes += 1 total_shield_brakes += 1 if shield_brakes % 2 == 0 and shield_brakes != 0: armor_brakes += 1 shield_brakes = 0 expenses = helmet_brakes * helmet_price + sword_brakes * sword_price + total_shield_brakes * shield_price + armor_brakes * armor_price print(f'Gladiator expenses: {expenses:.2f} aureus')
#!/usr/bin/env python # coding: utf-8 # In[5]: def left(i): return 2 * i def right(i): return 2 * i + 1 def parent(i): return i // 2 def MaxHeapify(lis, heap_size, i): l = left(i) r = right(i) largest = 0 temp = 0 if (l <= heap_size) and lis[l] > lis[i]: largest = l else: largest = i if (r <= heap_size) and lis[r] > lis[largest]: largest = r if (largest != i): temp = lis[i] lis[i] = lis[largest] lis[largest] = temp MaxHeapify(lis, heap_size, largest) def build_max_heap(lis, heap_size): k = heap_size//2 while k >= 1: MaxHeapify(lis, heap_size, k) k = k - 1 return lis lis = [0,12,7,13,5,10,17,1,2,3] print(build_max_heap(lis, len(lis)-1))
def left(i): return 2 * i def right(i): return 2 * i + 1 def parent(i): return i // 2 def max_heapify(lis, heap_size, i): l = left(i) r = right(i) largest = 0 temp = 0 if l <= heap_size and lis[l] > lis[i]: largest = l else: largest = i if r <= heap_size and lis[r] > lis[largest]: largest = r if largest != i: temp = lis[i] lis[i] = lis[largest] lis[largest] = temp max_heapify(lis, heap_size, largest) def build_max_heap(lis, heap_size): k = heap_size // 2 while k >= 1: max_heapify(lis, heap_size, k) k = k - 1 return lis lis = [0, 12, 7, 13, 5, 10, 17, 1, 2, 3] print(build_max_heap(lis, len(lis) - 1))
lista = []; lista.append(float(input("Digite o primeiro elemento"))); lista.append(float(input("Digite o segundo elemento"))); lista.append(float(input("Digite o terceiro elemento"))); lista.sort(); print(lista)
lista = [] lista.append(float(input('Digite o primeiro elemento'))) lista.append(float(input('Digite o segundo elemento'))) lista.append(float(input('Digite o terceiro elemento'))) lista.sort() print(lista)
class HeapBinaryMin: def __init__(self, data=[]): self.data = data self.build_max_heap() def build_min_heap(self): pass def get_min(self): return self.data[0] def extract_min(self): popped, self.data[0] = self.data[0], self.data[-1] return popped def insert(self, A: list): current = len(self.data) self.data.append(A) while self.data[current] < self.data[self.parent(current)]: self.data[current], self.data[self.parent(current)] = self.data[self.parent(current)], self.data[current] current = self.parent(current) def min_heapify(self, index): pass def parent(self, index: int) -> int: '''Returns position of parent of element at index''' return index // 2 def left_child(self, index: int) -> int: '''Returns position of left child of element at index''' return 2 * index def right_child(self, index): '''Returns position of right child of element at index''' return 2 * index + 1
class Heapbinarymin: def __init__(self, data=[]): self.data = data self.build_max_heap() def build_min_heap(self): pass def get_min(self): return self.data[0] def extract_min(self): (popped, self.data[0]) = (self.data[0], self.data[-1]) return popped def insert(self, A: list): current = len(self.data) self.data.append(A) while self.data[current] < self.data[self.parent(current)]: (self.data[current], self.data[self.parent(current)]) = (self.data[self.parent(current)], self.data[current]) current = self.parent(current) def min_heapify(self, index): pass def parent(self, index: int) -> int: """Returns position of parent of element at index""" return index // 2 def left_child(self, index: int) -> int: """Returns position of left child of element at index""" return 2 * index def right_child(self, index): """Returns position of right child of element at index""" return 2 * index + 1
class ClassifierBase(object): def getClassDistribution(self, instance): raise NotImplementedError("This must be implemented by a concrete adapter.") def classify(self, instance): raise NotImplementedError("This must be implemented by a concrete adapter.")
class Classifierbase(object): def get_class_distribution(self, instance): raise not_implemented_error('This must be implemented by a concrete adapter.') def classify(self, instance): raise not_implemented_error('This must be implemented by a concrete adapter.')
i=int(input('enter a year')) if (i%4)==0: if (i%100)==0: if (i%400)==0: print('leap year') else: print('not a lep year') else: print('not a lep year') else: print('not a lep year')
i = int(input('enter a year')) if i % 4 == 0: if i % 100 == 0: if i % 400 == 0: print('leap year') else: print('not a lep year') else: print('not a lep year') else: print('not a lep year')
# -- MocaMultiProcessLock -------------------------------------------------------------------------- class MocaMultiProcessLock: __slots__ = ("_rlock", "_blocking", "_acquired") def __init__(self, rlock, blocking): self._rlock = rlock self._blocking = blocking self._acquired = False @property def acquired(self): return self._acquired def __enter__(self): self._acquired = self._rlock.acquire(blocking=self._blocking) return self def __exit__(self, exc_type, exc_val, exc_tb): if self._acquired: self._rlock.release() # -------------------------------------------------------------------------- MocaMultiProcessLock --
class Mocamultiprocesslock: __slots__ = ('_rlock', '_blocking', '_acquired') def __init__(self, rlock, blocking): self._rlock = rlock self._blocking = blocking self._acquired = False @property def acquired(self): return self._acquired def __enter__(self): self._acquired = self._rlock.acquire(blocking=self._blocking) return self def __exit__(self, exc_type, exc_val, exc_tb): if self._acquired: self._rlock.release()
''' Problem Statement : Single Number Link : https://leetcode.com/explore/featured/card/30-day-leetcoding-challenge/528/week-1/3283/ score : accepted ''' class Solution: def singleNumber(self, nums: List[int]) -> int: for i in nums: if nums.count(i)==1: return i
""" Problem Statement : Single Number Link : https://leetcode.com/explore/featured/card/30-day-leetcoding-challenge/528/week-1/3283/ score : accepted """ class Solution: def single_number(self, nums: List[int]) -> int: for i in nums: if nums.count(i) == 1: return i
## PARAMETERS TO CALCULATE LEARNING TIME "----------------------------------------------------------------------------------------------------------------------" ############################################# Imports ################################################################## "----------------------------------------------------------------------------------------------------------------------" "--- Standard library imports ---" "--- Third party imports ---" "--- Local application imports ---" "----------------------------------------------------------------------------------------------------------------------" ############### Test parameters ######################################################################################## "----------------------------------------------------------------------------------------------------------------------" "--------------- Sample videos ---------------" ## Sample video to use module to determine duration time duration_test_path = "/Users/rp_mbp/Desktop/USMLE STEP 1/Kaplan USMLE Step 1 Videos 2020/01 Anatomy 34h27m/01 Embryology & Histology/01 Gonad Development - Gonad Development.mp4" "--------------- Test directory ---------------" ## Fictional directory to algorithm to convert dictionary into dataframe test_dict_dir = { "Topic_1": { "Subtopic_1.1": { "Class_1.1.1": { "duration": 0.5 }, "Class_1.1.2": { "duration": 0.75 }, "Class_1.1.3": { "duration": 0.8 }, }, "Subtopic_1.2": { "Class_1.2.1": { "duration": 0.5 }, "Class_1.2.2": { "duration": 0.75 }, "Class_1.2.3": { "duration": 0.8 }, }, }, "Topic_2": { "Subtopic_2.1": { "Class_2.1.1": { "duration": 0.5 }, "Class_2.1.2": { "duration": 0.75 }, "Class_2.1.3": { "duration": 0.8 }, }, "Subtopic_2.2": { "Class_2.2.1": { "duration": 0.5 }, "Class_2.2.2": { "duration": 0.75 }, "Class_2.2.3": { "duration": 0.8 }, }, }, } "----------------------------------------------------------------------------------------------------------------------" "----------------------------------------------------------------------------------------------------------------------" ############################################# END OF FILE ############################################################## "----------------------------------------------------------------------------------------------------------------------" "----------------------------------------------------------------------------------------------------------------------"
"""----------------------------------------------------------------------------------------------------------------------""" '----------------------------------------------------------------------------------------------------------------------' '--- Standard library imports ---' '--- Third party imports ---' '--- Local application imports ---' '----------------------------------------------------------------------------------------------------------------------' '----------------------------------------------------------------------------------------------------------------------' '--------------- Sample videos ---------------' duration_test_path = '/Users/rp_mbp/Desktop/USMLE STEP 1/Kaplan USMLE Step 1 Videos 2020/01 Anatomy 34h27m/01 Embryology & Histology/01 Gonad Development - Gonad Development.mp4' '--------------- Test directory ---------------' test_dict_dir = {'Topic_1': {'Subtopic_1.1': {'Class_1.1.1': {'duration': 0.5}, 'Class_1.1.2': {'duration': 0.75}, 'Class_1.1.3': {'duration': 0.8}}, 'Subtopic_1.2': {'Class_1.2.1': {'duration': 0.5}, 'Class_1.2.2': {'duration': 0.75}, 'Class_1.2.3': {'duration': 0.8}}}, 'Topic_2': {'Subtopic_2.1': {'Class_2.1.1': {'duration': 0.5}, 'Class_2.1.2': {'duration': 0.75}, 'Class_2.1.3': {'duration': 0.8}}, 'Subtopic_2.2': {'Class_2.2.1': {'duration': 0.5}, 'Class_2.2.2': {'duration': 0.75}, 'Class_2.2.3': {'duration': 0.8}}}} '----------------------------------------------------------------------------------------------------------------------' '----------------------------------------------------------------------------------------------------------------------' '----------------------------------------------------------------------------------------------------------------------' '----------------------------------------------------------------------------------------------------------------------'
# Copyright 2019 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. config_type='servod' revs = [513] inas = [('ina3221', '0x40:0', 'pp1000_a_pmic', 7.6, 0.010, 'rem', True), # PR127, ppvar_sys_pmic_v1 ('ina3221', '0x40:1', 'ppvar_bl_pwr', 7.6, 0.005, 'rem', True), # F1, originally fuse ('ina3221', '0x40:2', 'ppvar_vcc', 7.6, 0.010, 'rem', True), # PR87, +8.4VB_VCC1_VIN ('ina3221', '0x41:0', 'pp5000_a', 5.0, 0.005, 'rem', True), # PR160 ('ina3221', '0x41:1', 'pp5000_a_pmic', 7.6, 0.010, 'rem', True), # PR159, ppvar_sys_pmic_v5 ('ina3221', '0x41:2', 'pp1800_a', 1.8, 0.010, 'rem', True), # PR137 ('ina3221', '0x42:0', 'pp1200_vddq', 1.2, 0.005, 'rem', True), # PR152 ('ina3221', '0x42:1', 'pp0600_ddrvtt', 0.6, 0.010, 'rem', True), # PR929 ('ina3221', '0x42:2', 'pp1200_vddq_pmic', 7.6, 0.000, 'rem', False), # PR151, ppvar_sys_pmic_v4 ('ina3221', '0x43:0', 'pp1800_a_pmic', 3.3, 0.000, 'rem', False), # PR1236, vinvr2_650830 ('ina3221', '0x43:1', 'pp0600_ddrvtt_pmic', 1.2, 0.000, 'rem', False), # PR931, pp1200_vddq_ddrvttin ('ina3221', '0x43:2', 'pp3300_dsw_pmic', 7.6, 0.010, 'rem', True), # PR140, ppvar_sys_pmic_v3 # ('ina219', '0x44', 'ppvar_vcc2', 7.6, 0.010, 'rem', True), # PR92, +8.4VB_VCC2_VIN, not stuffed ('ina219', '0x45', 'ppvar_sa', 7.6, 0.010, 'rem', True), # PR99 ('ina219', '0x46', 'pp3300_dsw', 3.3, 0.005, 'rem', True), # PR138 ('ina219', '0x47', 'vbat', 7.6, 0.010, 'rem', True), # PR11 ('ina219', '0x48', 'ppvar_gt', 7.6, 0.010, 'rem', True), # PR97 ('ina219', '0x49', 'pp3300_s', 3.3, 0.010, 'rem', True), # R4920 ('ina219', '0x4a', 'pp3300_dx_wlan', 3.3, 0.010, 'rem', True), # R381 ('ina219', '0x4b', 'pp1000_a', 1.0, 0.005, 'rem', True), # PR128 ('ina219', '0x4c', 'pp3300_dx_edp', 3.3, 0.010, 'rem', True), # R378 ('ina219', '0x4d', 'pp3300_dsw_ec', 3.3, 0.010, 'rem', True)] # R953
config_type = 'servod' revs = [513] inas = [('ina3221', '0x40:0', 'pp1000_a_pmic', 7.6, 0.01, 'rem', True), ('ina3221', '0x40:1', 'ppvar_bl_pwr', 7.6, 0.005, 'rem', True), ('ina3221', '0x40:2', 'ppvar_vcc', 7.6, 0.01, 'rem', True), ('ina3221', '0x41:0', 'pp5000_a', 5.0, 0.005, 'rem', True), ('ina3221', '0x41:1', 'pp5000_a_pmic', 7.6, 0.01, 'rem', True), ('ina3221', '0x41:2', 'pp1800_a', 1.8, 0.01, 'rem', True), ('ina3221', '0x42:0', 'pp1200_vddq', 1.2, 0.005, 'rem', True), ('ina3221', '0x42:1', 'pp0600_ddrvtt', 0.6, 0.01, 'rem', True), ('ina3221', '0x42:2', 'pp1200_vddq_pmic', 7.6, 0.0, 'rem', False), ('ina3221', '0x43:0', 'pp1800_a_pmic', 3.3, 0.0, 'rem', False), ('ina3221', '0x43:1', 'pp0600_ddrvtt_pmic', 1.2, 0.0, 'rem', False), ('ina3221', '0x43:2', 'pp3300_dsw_pmic', 7.6, 0.01, 'rem', True), ('ina219', '0x45', 'ppvar_sa', 7.6, 0.01, 'rem', True), ('ina219', '0x46', 'pp3300_dsw', 3.3, 0.005, 'rem', True), ('ina219', '0x47', 'vbat', 7.6, 0.01, 'rem', True), ('ina219', '0x48', 'ppvar_gt', 7.6, 0.01, 'rem', True), ('ina219', '0x49', 'pp3300_s', 3.3, 0.01, 'rem', True), ('ina219', '0x4a', 'pp3300_dx_wlan', 3.3, 0.01, 'rem', True), ('ina219', '0x4b', 'pp1000_a', 1.0, 0.005, 'rem', True), ('ina219', '0x4c', 'pp3300_dx_edp', 3.3, 0.01, 'rem', True), ('ina219', '0x4d', 'pp3300_dsw_ec', 3.3, 0.01, 'rem', True)]
#!/usr/bin/env python3 with open("input.txt", "r") as f: lines = [int(x) for x in f.read().splitlines()] def part1(lines, preamble = 25): for i, line in enumerate(lines[preamble:], preamble): possible = lines[i - preamble : i] for a in possible: for b in possible: if a + b == line: break else: continue break else: return line def part2(lines, target): for i, current in enumerate(lines): sum = 0 for j in range(i + 1, len(lines)): if sum == target: group = lines[i : j - 1] return min(group) + max(group) if sum > target: break sum += lines[j] j += 1 print(num := part1(lines)) print(part2(lines, num))
with open('input.txt', 'r') as f: lines = [int(x) for x in f.read().splitlines()] def part1(lines, preamble=25): for (i, line) in enumerate(lines[preamble:], preamble): possible = lines[i - preamble:i] for a in possible: for b in possible: if a + b == line: break else: continue break else: return line def part2(lines, target): for (i, current) in enumerate(lines): sum = 0 for j in range(i + 1, len(lines)): if sum == target: group = lines[i:j - 1] return min(group) + max(group) if sum > target: break sum += lines[j] j += 1 print((num := part1(lines))) print(part2(lines, num))
Cell = DT('Cell', ('vitality', int)) def main(): assert match(Cell(50), ("Cell(n)", lambda n: n + 1)) == 51, "Match" m = match(Cell(20)) if m('Cell(21)'): assert False, "Wrong block intlit match" elif m('Cell(x)'): assert m.x == 20, "Block intlit binding" return 0
cell = dt('Cell', ('vitality', int)) def main(): assert match(cell(50), ('Cell(n)', lambda n: n + 1)) == 51, 'Match' m = match(cell(20)) if m('Cell(21)'): assert False, 'Wrong block intlit match' elif m('Cell(x)'): assert m.x == 20, 'Block intlit binding' return 0
#!/usr/bin/env python3 mat_mul = __import__('8-ridin_bareback').mat_mul mat1 = [[1, 2], [3, 4], [5, 6]] mat2 = [[1, 2, 3, 4], [5, 6, 7, 8]] print(mat_mul(mat1, mat2))
mat_mul = __import__('8-ridin_bareback').mat_mul mat1 = [[1, 2], [3, 4], [5, 6]] mat2 = [[1, 2, 3, 4], [5, 6, 7, 8]] print(mat_mul(mat1, mat2))
OK = 0 ERROR = 1 INVALID_ARGUMENT = 2 INTERNAL_ERROR = 3 REQUIRE_LANG = 4 REQUIRE_CAPTCHA = 5 CAPTCHA_ERROR = 6 VALIDATE_CODE_ERROR = 7 PROTECT_OPERATE_ERROR = 8 PROTECT_OPERATE_REQUIRED = 9 REQUIRE_NUMBER = 10 IMAGE_FORMAT_ERROR = 11 FILE_FORMAT_ERROR = 12 IMAGE_TOO_BIG = 13 CANCEL_FAILED = 14 EDIT_FAILED = 15 ADD_FAILED = 16 CAN_NOT_CANCEL = 17 STATUS_PASS = 18 DELETE_ERROR = 19 STATUS_FINISH = 20 STATUS_CREATED = 21 STATUS_NOT_PASS = 22 IP_NOT_ALLOW = 23 ACCESS_ID_NOT_EXIST = 24 SIGNATURE_ERROR = 25 STATUS_PROCESSING = 26 TOO_MANY_REQUESTS = 27 CAPTCHA_WAS_USED = 28 SMS_REQUEST_TOO_MANY = 29 CAS_ERROR = 30 APP_UPDATE_CONFIG_EXISTS = 31 APP_VERSION_LESS = 32 APP_UPDATE_LOG_REPEAT = 33 INVALID_APP_CLIENT_VERSION = 34 MESSAGES = { # 0-99 common error 0: 'OK', 1: 'Error', 2: 'Invalid argument', 3: 'Internal error', 4: 'The header is missing a accept-language', 5: 'Captcha is missing', 6: 'Captcha error', 7: 'Verification code error', 8: 'Protect operate error', 9: 'Protect operate is required.', 10: 'Number is required.', 11: 'Only supports upload png/jpg/jpeg/bmp/gif image format.', 12: 'Only supports upload .xls file format.', 13: 'Only supports upload 6M.', 14: 'Cancel failed', 15: 'Edit failed', 16: 'Add failed', 17: 'Can not cancel', 18: 'Status pass', 19: 'Delete error', 20: 'Status finish', 21: 'Status created', 22: 'Status not pass', 23: 'IP not allow', 24: 'Access id not exist', 25: 'Signature error', 26: 'Status processing', 27: 'Too many requests', 28: 'Captcha was used', 29: 'Sms request too many', 30: 'Cas api error', 31: 'App update config exists', 32: 'App version less than current', 33: 'App update log repeat', 34: 'Invalid app1 client version', }
ok = 0 error = 1 invalid_argument = 2 internal_error = 3 require_lang = 4 require_captcha = 5 captcha_error = 6 validate_code_error = 7 protect_operate_error = 8 protect_operate_required = 9 require_number = 10 image_format_error = 11 file_format_error = 12 image_too_big = 13 cancel_failed = 14 edit_failed = 15 add_failed = 16 can_not_cancel = 17 status_pass = 18 delete_error = 19 status_finish = 20 status_created = 21 status_not_pass = 22 ip_not_allow = 23 access_id_not_exist = 24 signature_error = 25 status_processing = 26 too_many_requests = 27 captcha_was_used = 28 sms_request_too_many = 29 cas_error = 30 app_update_config_exists = 31 app_version_less = 32 app_update_log_repeat = 33 invalid_app_client_version = 34 messages = {0: 'OK', 1: 'Error', 2: 'Invalid argument', 3: 'Internal error', 4: 'The header is missing a accept-language', 5: 'Captcha is missing', 6: 'Captcha error', 7: 'Verification code error', 8: 'Protect operate error', 9: 'Protect operate is required.', 10: 'Number is required.', 11: 'Only supports upload png/jpg/jpeg/bmp/gif image format.', 12: 'Only supports upload .xls file format.', 13: 'Only supports upload 6M.', 14: 'Cancel failed', 15: 'Edit failed', 16: 'Add failed', 17: 'Can not cancel', 18: 'Status pass', 19: 'Delete error', 20: 'Status finish', 21: 'Status created', 22: 'Status not pass', 23: 'IP not allow', 24: 'Access id not exist', 25: 'Signature error', 26: 'Status processing', 27: 'Too many requests', 28: 'Captcha was used', 29: 'Sms request too many', 30: 'Cas api error', 31: 'App update config exists', 32: 'App version less than current', 33: 'App update log repeat', 34: 'Invalid app1 client version'}
class Solution: def strStr(self, haystack: str, needle: str) -> int: def my_startswith(haystack: str, needle: str, start: int): if len(needle) + start > len(haystack): return False for i in range(len(needle)): if haystack[start + i] != needle[i]: return False return True if needle == '': return 0 for i in range(len(haystack) - len(needle) + 1): if my_startswith(haystack, needle, i): return i return -1
class Solution: def str_str(self, haystack: str, needle: str) -> int: def my_startswith(haystack: str, needle: str, start: int): if len(needle) + start > len(haystack): return False for i in range(len(needle)): if haystack[start + i] != needle[i]: return False return True if needle == '': return 0 for i in range(len(haystack) - len(needle) + 1): if my_startswith(haystack, needle, i): return i return -1
# # PySNMP MIB module ELTEX-MES-COPY-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ELTEX-MES-COPY-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:01:07 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint") eltMesCopy, = mibBuilder.importSymbols("ELTEX-MES", "eltMesCopy") InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress") RlCopyLocationType, = mibBuilder.importSymbols("RADLAN-COPY-MIB", "RlCopyLocationType") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") TimeTicks, Bits, Integer32, NotificationType, ObjectIdentity, Gauge32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, Unsigned32, IpAddress, iso, ModuleIdentity, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "Bits", "Integer32", "NotificationType", "ObjectIdentity", "Gauge32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "Unsigned32", "IpAddress", "iso", "ModuleIdentity", "Counter64") RowStatus, DisplayString, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "DisplayString", "TruthValue", "TextualConvention") eltCopyAutoBackupEnable = MibScalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 1), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltCopyAutoBackupEnable.setStatus('current') if mibBuilder.loadTexts: eltCopyAutoBackupEnable.setDescription('Enabling on automatic backup configuration.') eltCopyAutoBackupTimeout = MibScalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 2), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltCopyAutoBackupTimeout.setStatus('current') if mibBuilder.loadTexts: eltCopyAutoBackupTimeout.setDescription(' This MIB should be used in order to change the time-interval of automatic copy of running-config to external server. The value should be the number of minutes for the interval of time from the backup.') eltCopyAutoBackupFilePath = MibScalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltCopyAutoBackupFilePath.setStatus('current') if mibBuilder.loadTexts: eltCopyAutoBackupFilePath.setDescription('The name of the destination file.') eltCopyAutoBackupServerAddress = MibScalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltCopyAutoBackupServerAddress.setStatus('current') if mibBuilder.loadTexts: eltCopyAutoBackupServerAddress.setDescription('The Inet address of the destination remote host') eltCopyAutoBackupOnWrite = MibScalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 5), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltCopyAutoBackupOnWrite.setStatus('current') if mibBuilder.loadTexts: eltCopyAutoBackupOnWrite.setDescription('Performing automatic backups every time you write configuration in memory.') class EltCopyUserBackupStatus(TextualConvention, Integer32): description = 'Starting backup manually.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("starting", 1), ("stopped", 2)) eltCopyUserBackupStart = MibScalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 6), EltCopyUserBackupStatus().clone('stopped')).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltCopyUserBackupStart.setStatus('current') if mibBuilder.loadTexts: eltCopyUserBackupStart.setDescription('Starting backup manually.') eltCopyBackupHistoryEnable = MibScalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 7), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltCopyBackupHistoryEnable.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryEnable.setDescription('Performing automatic backups every time you write configuration in memory.') eltCopyBackupHistoryTable = MibTable((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8), ) if mibBuilder.loadTexts: eltCopyBackupHistoryTable.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryTable.setDescription('A DHCP interface configuration table.') eltCopyBackupHistoryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1), ).setIndexNames((0, "ELTEX-MES-COPY-MIB", "eltCopyBackupHistoryIndex")) if mibBuilder.loadTexts: eltCopyBackupHistoryEntry.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryEntry.setDescription('A DHCP interface configuration entry.') eltCopyBackupHistoryIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1, 1), Integer32()) if mibBuilder.loadTexts: eltCopyBackupHistoryIndex.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryIndex.setDescription('An arbitrary incremental index for the profiles table. Zero for next free index.') eltCopyBackupHistoryDateTime = MibTableColumn((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltCopyBackupHistoryDateTime.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryDateTime.setDescription('Name of profile.') eltCopyBackupHistoryDstLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1, 3), RlCopyLocationType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltCopyBackupHistoryDstLocation.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryDstLocation.setDescription('Destination File Location') eltCopyBackupHistoryServerAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltCopyBackupHistoryServerAddr.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryServerAddr.setDescription('Name of profile.') eltCopyBackupHistoryFilePath = MibTableColumn((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltCopyBackupHistoryFilePath.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryFilePath.setDescription('Name of profile.') eltCopyBackupHistoryStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1, 6), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltCopyBackupHistoryStatus.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryStatus.setDescription('The status of a table entry. Only three statuses are aceptable: CreateAndGo to create, Active to update,Destroy to delete. All other values cause error.') eltCopyBackupHistoryAction = MibScalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("noAction", 1), ("clearNow", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltCopyBackupHistoryAction.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryAction.setDescription('Used to clear backup Table.') mibBuilder.exportSymbols("ELTEX-MES-COPY-MIB", eltCopyBackupHistoryFilePath=eltCopyBackupHistoryFilePath, eltCopyAutoBackupOnWrite=eltCopyAutoBackupOnWrite, eltCopyBackupHistoryDateTime=eltCopyBackupHistoryDateTime, eltCopyBackupHistoryServerAddr=eltCopyBackupHistoryServerAddr, eltCopyBackupHistoryTable=eltCopyBackupHistoryTable, eltCopyBackupHistoryDstLocation=eltCopyBackupHistoryDstLocation, eltCopyBackupHistoryEntry=eltCopyBackupHistoryEntry, EltCopyUserBackupStatus=EltCopyUserBackupStatus, eltCopyAutoBackupEnable=eltCopyAutoBackupEnable, eltCopyBackupHistoryEnable=eltCopyBackupHistoryEnable, eltCopyBackupHistoryAction=eltCopyBackupHistoryAction, eltCopyBackupHistoryIndex=eltCopyBackupHistoryIndex, eltCopyAutoBackupTimeout=eltCopyAutoBackupTimeout, eltCopyAutoBackupFilePath=eltCopyAutoBackupFilePath, eltCopyUserBackupStart=eltCopyUserBackupStart, eltCopyBackupHistoryStatus=eltCopyBackupHistoryStatus, eltCopyAutoBackupServerAddress=eltCopyAutoBackupServerAddress)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, single_value_constraint, constraints_intersection, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint') (elt_mes_copy,) = mibBuilder.importSymbols('ELTEX-MES', 'eltMesCopy') (inet_address_type, inet_address) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddressType', 'InetAddress') (rl_copy_location_type,) = mibBuilder.importSymbols('RADLAN-COPY-MIB', 'RlCopyLocationType') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (time_ticks, bits, integer32, notification_type, object_identity, gauge32, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, unsigned32, ip_address, iso, module_identity, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'Bits', 'Integer32', 'NotificationType', 'ObjectIdentity', 'Gauge32', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'Unsigned32', 'IpAddress', 'iso', 'ModuleIdentity', 'Counter64') (row_status, display_string, truth_value, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'DisplayString', 'TruthValue', 'TextualConvention') elt_copy_auto_backup_enable = mib_scalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 1), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltCopyAutoBackupEnable.setStatus('current') if mibBuilder.loadTexts: eltCopyAutoBackupEnable.setDescription('Enabling on automatic backup configuration.') elt_copy_auto_backup_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 2), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltCopyAutoBackupTimeout.setStatus('current') if mibBuilder.loadTexts: eltCopyAutoBackupTimeout.setDescription(' This MIB should be used in order to change the time-interval of automatic copy of running-config to external server. The value should be the number of minutes for the interval of time from the backup.') elt_copy_auto_backup_file_path = mib_scalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 3), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltCopyAutoBackupFilePath.setStatus('current') if mibBuilder.loadTexts: eltCopyAutoBackupFilePath.setDescription('The name of the destination file.') elt_copy_auto_backup_server_address = mib_scalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 4), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltCopyAutoBackupServerAddress.setStatus('current') if mibBuilder.loadTexts: eltCopyAutoBackupServerAddress.setDescription('The Inet address of the destination remote host') elt_copy_auto_backup_on_write = mib_scalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 5), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltCopyAutoBackupOnWrite.setStatus('current') if mibBuilder.loadTexts: eltCopyAutoBackupOnWrite.setDescription('Performing automatic backups every time you write configuration in memory.') class Eltcopyuserbackupstatus(TextualConvention, Integer32): description = 'Starting backup manually.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('starting', 1), ('stopped', 2)) elt_copy_user_backup_start = mib_scalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 6), elt_copy_user_backup_status().clone('stopped')).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltCopyUserBackupStart.setStatus('current') if mibBuilder.loadTexts: eltCopyUserBackupStart.setDescription('Starting backup manually.') elt_copy_backup_history_enable = mib_scalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 7), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltCopyBackupHistoryEnable.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryEnable.setDescription('Performing automatic backups every time you write configuration in memory.') elt_copy_backup_history_table = mib_table((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8)) if mibBuilder.loadTexts: eltCopyBackupHistoryTable.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryTable.setDescription('A DHCP interface configuration table.') elt_copy_backup_history_entry = mib_table_row((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1)).setIndexNames((0, 'ELTEX-MES-COPY-MIB', 'eltCopyBackupHistoryIndex')) if mibBuilder.loadTexts: eltCopyBackupHistoryEntry.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryEntry.setDescription('A DHCP interface configuration entry.') elt_copy_backup_history_index = mib_table_column((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1, 1), integer32()) if mibBuilder.loadTexts: eltCopyBackupHistoryIndex.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryIndex.setDescription('An arbitrary incremental index for the profiles table. Zero for next free index.') elt_copy_backup_history_date_time = mib_table_column((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1, 2), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltCopyBackupHistoryDateTime.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryDateTime.setDescription('Name of profile.') elt_copy_backup_history_dst_location = mib_table_column((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1, 3), rl_copy_location_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltCopyBackupHistoryDstLocation.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryDstLocation.setDescription('Destination File Location') elt_copy_backup_history_server_addr = mib_table_column((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1, 4), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltCopyBackupHistoryServerAddr.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryServerAddr.setDescription('Name of profile.') elt_copy_backup_history_file_path = mib_table_column((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1, 5), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltCopyBackupHistoryFilePath.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryFilePath.setDescription('Name of profile.') elt_copy_backup_history_status = mib_table_column((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 8, 1, 6), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltCopyBackupHistoryStatus.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryStatus.setDescription('The status of a table entry. Only three statuses are aceptable: CreateAndGo to create, Active to update,Destroy to delete. All other values cause error.') elt_copy_backup_history_action = mib_scalar((1, 3, 6, 1, 4, 1, 35265, 1, 23, 3, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('noAction', 1), ('clearNow', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltCopyBackupHistoryAction.setStatus('current') if mibBuilder.loadTexts: eltCopyBackupHistoryAction.setDescription('Used to clear backup Table.') mibBuilder.exportSymbols('ELTEX-MES-COPY-MIB', eltCopyBackupHistoryFilePath=eltCopyBackupHistoryFilePath, eltCopyAutoBackupOnWrite=eltCopyAutoBackupOnWrite, eltCopyBackupHistoryDateTime=eltCopyBackupHistoryDateTime, eltCopyBackupHistoryServerAddr=eltCopyBackupHistoryServerAddr, eltCopyBackupHistoryTable=eltCopyBackupHistoryTable, eltCopyBackupHistoryDstLocation=eltCopyBackupHistoryDstLocation, eltCopyBackupHistoryEntry=eltCopyBackupHistoryEntry, EltCopyUserBackupStatus=EltCopyUserBackupStatus, eltCopyAutoBackupEnable=eltCopyAutoBackupEnable, eltCopyBackupHistoryEnable=eltCopyBackupHistoryEnable, eltCopyBackupHistoryAction=eltCopyBackupHistoryAction, eltCopyBackupHistoryIndex=eltCopyBackupHistoryIndex, eltCopyAutoBackupTimeout=eltCopyAutoBackupTimeout, eltCopyAutoBackupFilePath=eltCopyAutoBackupFilePath, eltCopyUserBackupStart=eltCopyUserBackupStart, eltCopyBackupHistoryStatus=eltCopyBackupHistoryStatus, eltCopyAutoBackupServerAddress=eltCopyAutoBackupServerAddress)
#Input: length of the series N n=int(input()) if n <=0 or n >100: #Check for boundary conditions print("invalid") else: # Check for in range conditions for i in range(1,n+1): if i%2==0: #For even positions sum=0 for j in range(1, i+1): sum=sum+(j*j) print(sum,end=' ') else: #For odd positions print(2*i,end=' ')
n = int(input()) if n <= 0 or n > 100: print('invalid') else: for i in range(1, n + 1): if i % 2 == 0: sum = 0 for j in range(1, i + 1): sum = sum + j * j print(sum, end=' ') else: print(2 * i, end=' ')