content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
#
# PySNMP MIB module CISCO-ALPS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-ALPS-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:32:43 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
ifIndex, InterfaceIndex = mibBuilder.importSymbols("IF-MIB", "ifIndex", "InterfaceIndex")
X121Address, = mibBuilder.importSymbols("RFC1382-MIB", "X121Address")
ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup")
NotificationType, ObjectIdentity, IpAddress, TimeTicks, MibIdentifier, Unsigned32, Counter32, ModuleIdentity, Gauge32, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Counter64, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "ObjectIdentity", "IpAddress", "TimeTicks", "MibIdentifier", "Unsigned32", "Counter32", "ModuleIdentity", "Gauge32", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Counter64", "Bits")
RowStatus, TruthValue, TextualConvention, TimeInterval, TimeStamp, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "TruthValue", "TextualConvention", "TimeInterval", "TimeStamp", "DisplayString")
ciscoAlpsMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 95))
ciscoAlpsMIB.setRevisions(('2008-02-14 00:00', '2000-01-28 00:00', '1999-01-07 00:00', '1998-12-31 00:00', '1998-12-08 00:00', '1998-05-20 00:00',))
if mibBuilder.loadTexts: ciscoAlpsMIB.setLastUpdated('200802140000Z')
if mibBuilder.loadTexts: ciscoAlpsMIB.setOrganization('Cisco Systems, Inc.')
ciscoAlpsMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1))
class AlpsCktName(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 12)
class AlpsAscuA1A2Value(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 255)
alpsGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 1))
alpsPeerObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2))
alpsCktObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3))
alpsIfObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4))
alpsAscuObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5))
alpsGlobalObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6))
alpsPeer = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 1))
alpsPeerLocalIpAddr = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 1, 1), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsPeerLocalIpAddr.setStatus('current')
alpsPeerLocalAtpPort = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsPeerLocalAtpPort.setStatus('current')
alpsPeerKeepaliveTimeout = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 1, 3), TimeInterval()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsPeerKeepaliveTimeout.setStatus('current')
alpsPeerKeepaliveMaxRetries = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsPeerKeepaliveMaxRetries.setStatus('current')
alpsPeerInCallsAcceptFlag = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 1, 5), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsPeerInCallsAcceptFlag.setStatus('current')
alpsRemPeerTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2), )
if mibBuilder.loadTexts: alpsRemPeerTable.setStatus('deprecated')
alpsRemPeerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1), ).setIndexNames((0, "CISCO-ALPS-MIB", "alpsRemPeerIpAddr"))
if mibBuilder.loadTexts: alpsRemPeerEntry.setStatus('deprecated')
alpsRemPeerIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 1), IpAddress())
if mibBuilder.loadTexts: alpsRemPeerIpAddr.setStatus('deprecated')
alpsRemPeerConnType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("permanent", 1), ("dynamic", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsRemPeerConnType.setStatus('deprecated')
alpsRemPeerLocalPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerLocalPort.setStatus('deprecated')
alpsRemPeerRemotePort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerRemotePort.setStatus('deprecated')
alpsRemPeerState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("closed", 1), ("opening", 2), ("opened", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerState.setStatus('deprecated')
alpsRemPeerUptime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 6), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerUptime.setStatus('deprecated')
alpsRemPeerNumActiveCkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 7), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerNumActiveCkts.setStatus('deprecated')
alpsRemPeerIdleTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 8), TimeInterval()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsRemPeerIdleTimer.setStatus('deprecated')
alpsRemPeerAlarmsEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 9), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsRemPeerAlarmsEnabled.setStatus('deprecated')
alpsRemPeerTCPQlen = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 200))).setUnits('packets').setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsRemPeerTCPQlen.setStatus('deprecated')
alpsRemPeerOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 11), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerOutPackets.setStatus('deprecated')
alpsRemPeerOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 12), Counter32()).setUnits('octets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerOutOctets.setStatus('deprecated')
alpsRemPeerInPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 13), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerInPackets.setStatus('deprecated')
alpsRemPeerInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 14), Counter32()).setUnits('octets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerInOctets.setStatus('deprecated')
alpsRemPeerDropsGiant = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 15), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerDropsGiant.setStatus('deprecated')
alpsRemPeerDropsQFull = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 16), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerDropsQFull.setStatus('deprecated')
alpsRemPeerDropsPeerUnreach = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 17), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerDropsPeerUnreach.setStatus('deprecated')
alpsRemPeerRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 18), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsRemPeerRowStatus.setStatus('deprecated')
alpsRemPeerCfgTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3), )
if mibBuilder.loadTexts: alpsRemPeerCfgTable.setStatus('current')
alpsRemPeerCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1), ).setIndexNames((0, "CISCO-ALPS-MIB", "alpsRemPeerCfgIpAddr"), (0, "CISCO-ALPS-MIB", "alpsRemPeerCfgProtocol"))
if mibBuilder.loadTexts: alpsRemPeerCfgEntry.setStatus('current')
alpsRemPeerCfgIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 1), IpAddress())
if mibBuilder.loadTexts: alpsRemPeerCfgIpAddr.setStatus('current')
alpsRemPeerCfgProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("atp", 1), ("matipTypeA", 2))))
if mibBuilder.loadTexts: alpsRemPeerCfgProtocol.setStatus('current')
alpsRemPeerCfgActivation = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("permanent", 1), ("dynamic", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsRemPeerCfgActivation.setStatus('current')
alpsRemPeerCfgTCPQLen = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))).setUnits('packets').setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsRemPeerCfgTCPQLen.setStatus('current')
alpsRemPeerCfgIdleTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 5), TimeInterval()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsRemPeerCfgIdleTimer.setStatus('current')
alpsRemPeerCfgNoCircTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 6), TimeInterval()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsRemPeerCfgNoCircTimer.setStatus('current')
alpsRemPeerCfgAlarmsOn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 7), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsRemPeerCfgAlarmsOn.setStatus('current')
alpsRemPeerCfgStatIntvl = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 8), TimeInterval()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsRemPeerCfgStatIntvl.setStatus('current')
alpsRemPeerCfgStatRetry = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsRemPeerCfgStatRetry.setStatus('current')
alpsRemPeerCfgRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 10), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsRemPeerCfgRowStatus.setStatus('current')
alpsRemPeerConnTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4), )
if mibBuilder.loadTexts: alpsRemPeerConnTable.setStatus('current')
alpsRemPeerConnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1), ).setIndexNames((0, "CISCO-ALPS-MIB", "alpsRemPeerConnIpAddr"), (0, "CISCO-ALPS-MIB", "alpsRemPeerConnIdString"))
if mibBuilder.loadTexts: alpsRemPeerConnEntry.setStatus('current')
alpsRemPeerConnIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 1), IpAddress())
if mibBuilder.loadTexts: alpsRemPeerConnIpAddr.setStatus('current')
alpsRemPeerConnIdString = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 20)))
if mibBuilder.loadTexts: alpsRemPeerConnIdString.setStatus('current')
alpsRemPeerConnLocalPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnLocalPort.setStatus('current')
alpsRemPeerConnForeignPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnForeignPort.setStatus('current')
alpsRemPeerConnState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("closed", 1), ("opening", 2), ("opened", 3), ("busy", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnState.setStatus('current')
alpsRemPeerConnProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("atp", 1), ("matipTypeA", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnProtocol.setStatus('current')
alpsRemPeerConnCreation = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("admin", 1), ("learned", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnCreation.setStatus('current')
alpsRemPeerConnActivation = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("permanent", 1), ("dynamic", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnActivation.setStatus('current')
alpsRemPeerConnUptime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 9), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnUptime.setStatus('current')
alpsRemPeerConnNumActCirc = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnNumActCirc.setStatus('current')
alpsRemPeerConnLastTxRx = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 11), TimeStamp()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnLastTxRx.setStatus('current')
alpsRemPeerConnLastRxAny = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 12), TimeStamp()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnLastRxAny.setStatus('current')
alpsRemPeerConnIdleTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 13), TimeInterval()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnIdleTimer.setStatus('current')
alpsRemPeerConnNoCircTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 14), TimeInterval()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnNoCircTimer.setStatus('current')
alpsRemPeerConnTCPQLen = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnTCPQLen.setStatus('current')
alpsRemPeerConnAlarmsOn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 16), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnAlarmsOn.setStatus('current')
alpsRemPeerConnStatIntvl = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 300))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnStatIntvl.setStatus('current')
alpsRemPeerConnStatRetry = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnStatRetry.setStatus('current')
alpsRemPeerConnDownReason = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("unknown", 1), ("idle", 2), ("noCircuits", 3), ("destUnreachable", 4), ("foreignReset", 5), ("localReset", 6), ("noMemory", 7), ("openingTimeout", 8)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnDownReason.setStatus('current')
alpsRemPeerConnOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 20), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnOutPackets.setStatus('current')
alpsRemPeerConnOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 21), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnOutOctets.setStatus('current')
alpsRemPeerConnInPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 22), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnInPackets.setStatus('current')
alpsRemPeerConnInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 23), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnInOctets.setStatus('current')
alpsRemPeerConnDropsGiant = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 24), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnDropsGiant.setStatus('current')
alpsRemPeerConnDropsQFull = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 25), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnDropsQFull.setStatus('current')
alpsRemPeerConnDropsUnreach = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 26), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnDropsUnreach.setStatus('current')
alpsRemPeerConnDropsVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 27), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsRemPeerConnDropsVersion.setStatus('current')
alpsCktBaseTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1), )
if mibBuilder.loadTexts: alpsCktBaseTable.setStatus('current')
alpsCktBaseEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1), ).setIndexNames((0, "CISCO-ALPS-MIB", "alpsCktBaseName"), (0, "CISCO-ALPS-MIB", "alpsCktBaseDlcType"))
if mibBuilder.loadTexts: alpsCktBaseEntry.setStatus('current')
alpsCktBaseName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 1), AlpsCktName())
if mibBuilder.loadTexts: alpsCktBaseName.setStatus('current')
alpsCktBaseDlcType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("emtox", 1), ("ax25", 2), ("alc", 3), ("uts", 4))))
if mibBuilder.loadTexts: alpsCktBaseDlcType.setStatus('current')
alpsCktBasePriPeerAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 3), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktBasePriPeerAddr.setStatus('current')
alpsCktBaseAlarmsEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 4), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktBaseAlarmsEnabled.setStatus('current')
alpsCktBaseConnType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("permanent", 1), ("dynamic", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktBaseConnType.setStatus('current')
alpsCktBaseState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("disabled", 1), ("inoperable", 2), ("opening", 3), ("opened", 4), ("cktBusy", 5), ("peerBusy", 6), ("updating", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktBaseState.setStatus('current')
alpsCktBaseNumActiveAscus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktBaseNumActiveAscus.setStatus('current')
alpsCktBaseCurrentPeer = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 8), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktBaseCurrentPeer.setStatus('current')
alpsCktBaseLifeTimeTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 9), TimeInterval()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktBaseLifeTimeTimer.setStatus('current')
alpsCktBaseHostLinkNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktBaseHostLinkNumber.setStatus('current')
alpsCktBaseHostLinkType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ax25", 1), ("emtox", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktBaseHostLinkType.setStatus('current')
alpsCktBaseRemHld = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 32639))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktBaseRemHld.setStatus('current')
alpsCktBaseLocalHld = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 32639))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktBaseLocalHld.setStatus('current')
alpsCktBaseDownReason = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42))).clone(namedValues=NamedValues(("unknown", 1), ("noReason", 2), ("hostLinkDown", 3), ("cktDisabled", 4), ("hostLinkDisabled", 5), ("noHostLinkMatched", 6), ("noHldMatched", 7), ("cktNameInUse", 8), ("pvcLcnOutOfRange", 9), ("x25ParamInvalid", 10), ("cktOpeningTimeout", 11), ("x25ClearDteNoReason", 12), ("configMismatch", 13), ("noResourcesAvail", 14), ("incompatibleA1A2", 15), ("cktIdle", 16), ("peerDown", 17), ("noAscusConfigured", 18), ("x25ClearHostUnknown", 19), ("x25ClearHostDown", 20), ("x25ClearHostDisabled", 21), ("x25ClearHostSaturated", 22), ("x25ClearCallerUnknown", 23), ("x25ClearCallerUnauth", 24), ("x25ClearConfigRejected", 25), ("x25ClearConfigFallback", 26), ("x25ClearConfigIncompat", 27), ("x25ClearHLDUnknown", 28), ("x25ClearPIDUnknown", 29), ("x25ClearFacilRejected", 30), ("x25ClearNetNoReason", 31), ("pvcLcnInUse", 32), ("noSvcLcnAvail", 33), ("peerIdle", 34), ("presUnknown", 35), ("presMismatch", 36), ("openMsgTooShort", 37), ("mpxUnknown", 38), ("mpxHdrMismatch", 39), ("trafTypeMismatch", 40), ("codingMismatch", 41), ("ascuInSession", 42))).clone('noReason')).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktBaseDownReason.setStatus('current')
alpsCktBaseOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 15), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktBaseOutPackets.setStatus('current')
alpsCktBaseOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 16), Counter32()).setUnits('octets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktBaseOutOctets.setStatus('current')
alpsCktBaseInPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 17), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktBaseInPackets.setStatus('current')
alpsCktBaseInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 18), Counter32()).setUnits('octets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktBaseInOctets.setStatus('current')
alpsCktBaseDropsCktDisabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 19), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktBaseDropsCktDisabled.setStatus('current')
alpsCktBaseDropsQOverflow = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 20), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktBaseDropsQOverflow.setStatus('current')
alpsCktBaseDropsLifeTimeExpd = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 21), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktBaseDropsLifeTimeExpd.setStatus('current')
alpsCktBaseEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 22), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktBaseEnabled.setStatus('current')
alpsCktBaseRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 23), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktBaseRowStatus.setStatus('current')
alpsCktBaseCurrPeerConnId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 24), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 20))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktBaseCurrPeerConnId.setStatus('current')
alpsCktX25Table = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2), )
if mibBuilder.loadTexts: alpsCktX25Table.setStatus('current')
alpsCktX25Entry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1), ).setIndexNames((0, "CISCO-ALPS-MIB", "alpsCktBaseName"), (0, "CISCO-ALPS-MIB", "alpsCktX25DlcType"))
if mibBuilder.loadTexts: alpsCktX25Entry.setStatus('current')
alpsCktX25DlcType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("emtox", 1), ("ax25", 2))))
if mibBuilder.loadTexts: alpsCktX25DlcType.setStatus('current')
alpsCktX25IfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1, 2), InterfaceIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktX25IfIndex.setStatus('current')
alpsCktX25LCN = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktX25LCN.setStatus('current')
alpsCktX25HostX121 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1, 4), X121Address()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktX25HostX121.setStatus('current')
alpsCktX25RemoteX121 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1, 5), X121Address()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktX25RemoteX121.setStatus('current')
alpsCktX25DropsVcReset = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktX25DropsVcReset.setStatus('current')
alpsCktP1024Table = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3), )
if mibBuilder.loadTexts: alpsCktP1024Table.setStatus('current')
alpsCktP1024Entry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1), ).setIndexNames((0, "CISCO-ALPS-MIB", "alpsCktBaseName"), (0, "CISCO-ALPS-MIB", "alpsCktP1024DlcType"))
if mibBuilder.loadTexts: alpsCktP1024Entry.setStatus('current')
alpsCktP1024DlcType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(3, 4))).clone(namedValues=NamedValues(("alc", 3), ("uts", 4))))
if mibBuilder.loadTexts: alpsCktP1024DlcType.setStatus('current')
alpsCktP1024BackupPeerAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 2), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktP1024BackupPeerAddr.setStatus('current')
alpsCktP1024RetryTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 3), TimeInterval()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktP1024RetryTimer.setStatus('current')
alpsCktP1024IdleTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 4), TimeInterval()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktP1024IdleTimer.setStatus('current')
alpsCktP1024EmtoxX121 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 5), X121Address()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktP1024EmtoxX121.setStatus('current')
alpsCktP1024Ax25LCN = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4096))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktP1024Ax25LCN.setStatus('current')
alpsCktP1024WinOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 7))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktP1024WinOut.setStatus('current')
alpsCktP1024WinIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 7))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktP1024WinIn.setStatus('current')
alpsCktP1024OutPktSize = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 4096))).setUnits('bytes').setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktP1024OutPktSize.setStatus('current')
alpsCktP1024InPktSize = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 4096))).setUnits('bytes').setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktP1024InPktSize.setStatus('current')
alpsCktP1024SvcMsgList = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 8))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktP1024SvcMsgList.setStatus('current')
alpsCktP1024SvcMsgIntvl = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 12), TimeTicks()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktP1024SvcMsgIntvl.setStatus('current')
alpsCktP1024DropsUnkAscu = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 13), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktP1024DropsUnkAscu.setStatus('current')
alpsCktP1024RowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 14), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktP1024RowStatus.setStatus('current')
alpsCktP1024MatipCloseDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 15), TimeInterval()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsCktP1024MatipCloseDelay.setStatus('current')
alpsCktAscuTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4), )
if mibBuilder.loadTexts: alpsCktAscuTable.setStatus('current')
alpsCktAscuEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1), ).setIndexNames((0, "CISCO-ALPS-MIB", "alpsCktAscuCktName"), (0, "CISCO-ALPS-MIB", "alpsCktAscuCktDlcType"), (0, "CISCO-ALPS-MIB", "alpsCktAscuA1"), (0, "CISCO-ALPS-MIB", "alpsCktAscuA2"))
if mibBuilder.loadTexts: alpsCktAscuEntry.setStatus('current')
alpsCktAscuCktName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 1), AlpsCktName())
if mibBuilder.loadTexts: alpsCktAscuCktName.setStatus('current')
alpsCktAscuCktDlcType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("emtox", 1), ("ax25", 2), ("alc", 3), ("uts", 4))))
if mibBuilder.loadTexts: alpsCktAscuCktDlcType.setStatus('current')
alpsCktAscuA1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 3), AlpsAscuA1A2Value())
if mibBuilder.loadTexts: alpsCktAscuA1.setStatus('current')
alpsCktAscuA2 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 4), AlpsAscuA1A2Value())
if mibBuilder.loadTexts: alpsCktAscuA2.setStatus('current')
alpsCktAscuIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 5), InterfaceIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktAscuIfIndex.setStatus('current')
alpsCktAscuId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 127))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktAscuId.setStatus('current')
alpsCktAscuStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("ok", 2), ("reject", 3), ("new", 4), ("pending", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsCktAscuStatus.setStatus('current')
alpsIfP1024Table = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1), )
if mibBuilder.loadTexts: alpsIfP1024Table.setStatus('current')
alpsIfP1024Entry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: alpsIfP1024Entry.setStatus('current')
alpsIfP1024EncapType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("alc", 1), ("uts", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsIfP1024EncapType.setStatus('current')
alpsIfP1024PollRespTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 2), TimeInterval().clone(500)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsIfP1024PollRespTimeout.setStatus('current')
alpsIfP1024GATimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 3), TimeInterval().clone(600)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsIfP1024GATimeout.setStatus('current')
alpsIfP1024PollPauseTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 4), TimeInterval().clone(50)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsIfP1024PollPauseTimeout.setStatus('current')
alpsIfP1024MaxErrCnt = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 30))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsIfP1024MaxErrCnt.setStatus('current')
alpsIfP1024MaxRetrans = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10)).clone(3)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsIfP1024MaxRetrans.setStatus('current')
alpsIfP1024CurrErrCnt = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 30))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsIfP1024CurrErrCnt.setStatus('current')
alpsIfP1024MinGoodPollResp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 30)).clone(1)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsIfP1024MinGoodPollResp.setStatus('current')
alpsIfP1024PollingRatio = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 30)).clone(30)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsIfP1024PollingRatio.setStatus('current')
alpsIfP1024NumAscus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 10), Gauge32()).setUnits('Ascus').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsIfP1024NumAscus.setStatus('current')
alpsIfP1024ServMsgFormat = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("sita", 1), ("apollo", 2))).clone('sita')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsIfP1024ServMsgFormat.setStatus('current')
alpsIfP1024ServMsgStatusChange = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 12), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsIfP1024ServMsgStatusChange.setStatus('current')
alpsIfP1024ServMsgDropTermAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("msgterm", 1), ("configterm", 2))).clone('configterm')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alpsIfP1024ServMsgDropTermAddr.setStatus('current')
alpsIfHLinkTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2), )
if mibBuilder.loadTexts: alpsIfHLinkTable.setStatus('current')
alpsIfHLinkEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "CISCO-ALPS-MIB", "alpsIfHLinkHostHld"), (0, "CISCO-ALPS-MIB", "alpsIfHLinkNumber"))
if mibBuilder.loadTexts: alpsIfHLinkEntry.setStatus('current')
alpsIfHLinkHostHld = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: alpsIfHLinkHostHld.setStatus('current')
alpsIfHLinkNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255)))
if mibBuilder.loadTexts: alpsIfHLinkNumber.setStatus('current')
alpsIfHLinkX25ProtocolType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ax25", 1), ("emtox", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsIfHLinkX25ProtocolType.setStatus('current')
alpsIfHLinkAx25PvcDamp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1, 4), TimeInterval()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsIfHLinkAx25PvcDamp.setStatus('current')
alpsIfHLinkEmtoxHostX121 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1, 5), X121Address()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsIfHLinkEmtoxHostX121.setStatus('current')
alpsIfHLinkActiveCkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4096))).setUnits('circuits').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsIfHLinkActiveCkts.setStatus('current')
alpsAscuTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1), )
if mibBuilder.loadTexts: alpsAscuTable.setStatus('current')
alpsAscuEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "CISCO-ALPS-MIB", "alpsAscuId"))
if mibBuilder.loadTexts: alpsAscuEntry.setStatus('current')
alpsAscuId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 127)))
if mibBuilder.loadTexts: alpsAscuId.setStatus('current')
alpsAscuA1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 2), AlpsAscuA1A2Value()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsAscuA1.setStatus('current')
alpsAscuA2 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 3), AlpsAscuA1A2Value()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsAscuA2.setStatus('current')
alpsAscuCktName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 4), AlpsCktName()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsAscuCktName.setStatus('current')
alpsAscuAlarmsEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 5), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsAscuAlarmsEnabled.setStatus('current')
alpsAscuRetryOption = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("resend", 1), ("reenter", 2), ("none", 3))).clone('none')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsAscuRetryOption.setStatus('current')
alpsAscuMaxMsgLength = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 3840)).clone(962)).setUnits('bytes').setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsAscuMaxMsgLength.setStatus('current')
alpsAscuFwdStatusOption = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 8), TruthValue().clone('true')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsAscuFwdStatusOption.setStatus('current')
alpsAscuState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("disabled", 1), ("unknown", 2), ("down", 3), ("up", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsAscuState.setStatus('current')
alpsAscuDownReason = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("noReason", 2), ("notDown", 3), ("ascuDisabled", 4), ("errorThresholdExceeded", 5))).clone('noReason')).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsAscuDownReason.setStatus('current')
alpsAscuOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 11), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsAscuOutPackets.setStatus('current')
alpsAscuOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsAscuOutOctets.setStatus('current')
alpsAscuInPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 13), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsAscuInPackets.setStatus('current')
alpsAscuInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsAscuInOctets.setStatus('current')
alpsAscuDropsGarbledPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsAscuDropsGarbledPkts.setStatus('current')
alpsAscuDropsAscuDown = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsAscuDropsAscuDown.setStatus('current')
alpsAscuDropsAscuDisabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alpsAscuDropsAscuDisabled.setStatus('current')
alpsAscuEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 18), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsAscuEnabled.setStatus('current')
alpsAscuRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 19), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsAscuRowStatus.setStatus('current')
alpsAscuAutoReset = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 20), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsAscuAutoReset.setStatus('current')
alpsSvcMsgTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 1), )
if mibBuilder.loadTexts: alpsSvcMsgTable.setStatus('current')
alpsSvcMsgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 1, 1), ).setIndexNames((0, "CISCO-ALPS-MIB", "alpsSvcMsgListNum"), (0, "CISCO-ALPS-MIB", "alpsSvcMsgNum"))
if mibBuilder.loadTexts: alpsSvcMsgEntry.setStatus('current')
alpsSvcMsgListNum = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 8)))
if mibBuilder.loadTexts: alpsSvcMsgListNum.setStatus('current')
alpsSvcMsgNum = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 8)))
if mibBuilder.loadTexts: alpsSvcMsgNum.setStatus('current')
alpsSvcMsg = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 50))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsSvcMsg.setStatus('current')
alpsSvcMsgRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 1, 1, 4), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsSvcMsgRowStatus.setStatus('current')
alpsX121ToIpTransTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 2), )
if mibBuilder.loadTexts: alpsX121ToIpTransTable.setStatus('current')
alpsX121ToIpTransEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "CISCO-ALPS-MIB", "alpsX121"))
if mibBuilder.loadTexts: alpsX121ToIpTransEntry.setStatus('current')
alpsX121 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 2, 1, 1), X121Address())
if mibBuilder.loadTexts: alpsX121.setStatus('current')
alpsIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 2, 1, 2), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsIpAddress.setStatus('current')
alpsX121ToIpTransRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 2, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: alpsX121ToIpTransRowStatus.setStatus('current')
ciscoAlpsMIBNotificationPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 2))
ciscoAlpsMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0))
alpsPeerStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0, 1)).setObjects(("CISCO-ALPS-MIB", "alpsRemPeerState"))
if mibBuilder.loadTexts: alpsPeerStatusChange.setStatus('deprecated')
alpsCktStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0, 2)).setObjects(("CISCO-ALPS-MIB", "alpsCktBaseState"))
if mibBuilder.loadTexts: alpsCktStatusChange.setStatus('current')
alpsAscuStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0, 3)).setObjects(("CISCO-ALPS-MIB", "alpsAscuState"))
if mibBuilder.loadTexts: alpsAscuStatusChange.setStatus('current')
alpsPeerConnStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0, 4)).setObjects(("CISCO-ALPS-MIB", "alpsRemPeerConnState"))
if mibBuilder.loadTexts: alpsPeerConnStatusChange.setStatus('current')
alpsCktOpenFailure = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0, 5)).setObjects(("CISCO-ALPS-MIB", "alpsCktBaseDownReason"))
if mibBuilder.loadTexts: alpsCktOpenFailure.setStatus('current')
alpsCktPartialReject = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0, 6)).setObjects(("CISCO-ALPS-MIB", "alpsCktAscuIfIndex"), ("CISCO-ALPS-MIB", "alpsCktAscuId"))
if mibBuilder.loadTexts: alpsCktPartialReject.setStatus('current')
alpsMibConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 3))
alpsMibCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 1))
alpsMibGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2))
alpsMibCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 1, 1)).setObjects(("CISCO-ALPS-MIB", "alpsPeerGroup"), ("CISCO-ALPS-MIB", "alpsCktGroup"), ("CISCO-ALPS-MIB", "alpsIfP1024Group"), ("CISCO-ALPS-MIB", "alpsIfHostlinkGroup"), ("CISCO-ALPS-MIB", "alpsAscuGroup"), ("CISCO-ALPS-MIB", "alpsSvcMsgGroup"), ("CISCO-ALPS-MIB", "alpsAddrTransGroup"), ("CISCO-ALPS-MIB", "alpsNotificationGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsMibCompliance = alpsMibCompliance.setStatus('deprecated')
alpsMibComplianceRev1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 1, 2)).setObjects(("CISCO-ALPS-MIB", "alpsCktGroup"), ("CISCO-ALPS-MIB", "alpsIfP1024Group"), ("CISCO-ALPS-MIB", "alpsIfHostlinkGroup"), ("CISCO-ALPS-MIB", "alpsAscuGroup"), ("CISCO-ALPS-MIB", "alpsSvcMsgGroup"), ("CISCO-ALPS-MIB", "alpsAddrTransGroup"), ("CISCO-ALPS-MIB", "alpsPeerGroupRev1"), ("CISCO-ALPS-MIB", "alpsNotificationGroupRev1"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsMibComplianceRev1 = alpsMibComplianceRev1.setStatus('deprecated')
alpsMibComplianceRev2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 1, 3)).setObjects(("CISCO-ALPS-MIB", "alpsCktGroup"), ("CISCO-ALPS-MIB", "alpsIfP1024GroupRev1"), ("CISCO-ALPS-MIB", "alpsIfHostlinkGroup"), ("CISCO-ALPS-MIB", "alpsAscuGroupRev1"), ("CISCO-ALPS-MIB", "alpsSvcMsgGroup"), ("CISCO-ALPS-MIB", "alpsAddrTransGroup"), ("CISCO-ALPS-MIB", "alpsPeerGroupRev1"), ("CISCO-ALPS-MIB", "alpsNotificationGroupRev2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsMibComplianceRev2 = alpsMibComplianceRev2.setStatus('current')
alpsPeerGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 1)).setObjects(("CISCO-ALPS-MIB", "alpsPeerLocalIpAddr"), ("CISCO-ALPS-MIB", "alpsPeerLocalAtpPort"), ("CISCO-ALPS-MIB", "alpsPeerKeepaliveTimeout"), ("CISCO-ALPS-MIB", "alpsPeerKeepaliveMaxRetries"), ("CISCO-ALPS-MIB", "alpsPeerInCallsAcceptFlag"), ("CISCO-ALPS-MIB", "alpsRemPeerConnType"), ("CISCO-ALPS-MIB", "alpsRemPeerLocalPort"), ("CISCO-ALPS-MIB", "alpsRemPeerRemotePort"), ("CISCO-ALPS-MIB", "alpsRemPeerState"), ("CISCO-ALPS-MIB", "alpsRemPeerUptime"), ("CISCO-ALPS-MIB", "alpsRemPeerNumActiveCkts"), ("CISCO-ALPS-MIB", "alpsRemPeerIdleTimer"), ("CISCO-ALPS-MIB", "alpsRemPeerAlarmsEnabled"), ("CISCO-ALPS-MIB", "alpsRemPeerTCPQlen"), ("CISCO-ALPS-MIB", "alpsRemPeerOutPackets"), ("CISCO-ALPS-MIB", "alpsRemPeerOutOctets"), ("CISCO-ALPS-MIB", "alpsRemPeerInPackets"), ("CISCO-ALPS-MIB", "alpsRemPeerInOctets"), ("CISCO-ALPS-MIB", "alpsRemPeerDropsGiant"), ("CISCO-ALPS-MIB", "alpsRemPeerDropsQFull"), ("CISCO-ALPS-MIB", "alpsRemPeerDropsPeerUnreach"), ("CISCO-ALPS-MIB", "alpsRemPeerRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsPeerGroup = alpsPeerGroup.setStatus('deprecated')
alpsCktGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 2)).setObjects(("CISCO-ALPS-MIB", "alpsCktBasePriPeerAddr"), ("CISCO-ALPS-MIB", "alpsCktBaseAlarmsEnabled"), ("CISCO-ALPS-MIB", "alpsCktBaseConnType"), ("CISCO-ALPS-MIB", "alpsCktBaseState"), ("CISCO-ALPS-MIB", "alpsCktBaseNumActiveAscus"), ("CISCO-ALPS-MIB", "alpsCktBaseCurrentPeer"), ("CISCO-ALPS-MIB", "alpsCktBaseLifeTimeTimer"), ("CISCO-ALPS-MIB", "alpsCktBaseHostLinkNumber"), ("CISCO-ALPS-MIB", "alpsCktBaseHostLinkType"), ("CISCO-ALPS-MIB", "alpsCktBaseRemHld"), ("CISCO-ALPS-MIB", "alpsCktBaseLocalHld"), ("CISCO-ALPS-MIB", "alpsCktBaseDownReason"), ("CISCO-ALPS-MIB", "alpsCktBaseOutPackets"), ("CISCO-ALPS-MIB", "alpsCktBaseOutOctets"), ("CISCO-ALPS-MIB", "alpsCktBaseInPackets"), ("CISCO-ALPS-MIB", "alpsCktBaseInOctets"), ("CISCO-ALPS-MIB", "alpsCktBaseDropsCktDisabled"), ("CISCO-ALPS-MIB", "alpsCktBaseDropsQOverflow"), ("CISCO-ALPS-MIB", "alpsCktBaseDropsLifeTimeExpd"), ("CISCO-ALPS-MIB", "alpsCktBaseEnabled"), ("CISCO-ALPS-MIB", "alpsCktBaseRowStatus"), ("CISCO-ALPS-MIB", "alpsCktX25IfIndex"), ("CISCO-ALPS-MIB", "alpsCktX25LCN"), ("CISCO-ALPS-MIB", "alpsCktX25HostX121"), ("CISCO-ALPS-MIB", "alpsCktX25RemoteX121"), ("CISCO-ALPS-MIB", "alpsCktX25DropsVcReset"), ("CISCO-ALPS-MIB", "alpsCktP1024BackupPeerAddr"), ("CISCO-ALPS-MIB", "alpsCktP1024RetryTimer"), ("CISCO-ALPS-MIB", "alpsCktP1024IdleTimer"), ("CISCO-ALPS-MIB", "alpsCktP1024EmtoxX121"), ("CISCO-ALPS-MIB", "alpsCktP1024Ax25LCN"), ("CISCO-ALPS-MIB", "alpsCktP1024WinOut"), ("CISCO-ALPS-MIB", "alpsCktP1024WinIn"), ("CISCO-ALPS-MIB", "alpsCktP1024OutPktSize"), ("CISCO-ALPS-MIB", "alpsCktP1024InPktSize"), ("CISCO-ALPS-MIB", "alpsCktP1024SvcMsgList"), ("CISCO-ALPS-MIB", "alpsCktP1024SvcMsgIntvl"), ("CISCO-ALPS-MIB", "alpsCktP1024DropsUnkAscu"), ("CISCO-ALPS-MIB", "alpsCktP1024RowStatus"), ("CISCO-ALPS-MIB", "alpsCktAscuIfIndex"), ("CISCO-ALPS-MIB", "alpsCktAscuId"), ("CISCO-ALPS-MIB", "alpsCktAscuStatus"), ("CISCO-ALPS-MIB", "alpsCktBaseCurrPeerConnId"), ("CISCO-ALPS-MIB", "alpsCktP1024MatipCloseDelay"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsCktGroup = alpsCktGroup.setStatus('current')
alpsIfP1024Group = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 3)).setObjects(("CISCO-ALPS-MIB", "alpsIfP1024EncapType"), ("CISCO-ALPS-MIB", "alpsIfP1024PollRespTimeout"), ("CISCO-ALPS-MIB", "alpsIfP1024GATimeout"), ("CISCO-ALPS-MIB", "alpsIfP1024PollPauseTimeout"), ("CISCO-ALPS-MIB", "alpsIfP1024MaxErrCnt"), ("CISCO-ALPS-MIB", "alpsIfP1024MaxRetrans"), ("CISCO-ALPS-MIB", "alpsIfP1024CurrErrCnt"), ("CISCO-ALPS-MIB", "alpsIfP1024MinGoodPollResp"), ("CISCO-ALPS-MIB", "alpsIfP1024PollingRatio"), ("CISCO-ALPS-MIB", "alpsIfP1024NumAscus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsIfP1024Group = alpsIfP1024Group.setStatus('deprecated')
alpsIfHostlinkGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 4)).setObjects(("CISCO-ALPS-MIB", "alpsIfHLinkX25ProtocolType"), ("CISCO-ALPS-MIB", "alpsIfHLinkAx25PvcDamp"), ("CISCO-ALPS-MIB", "alpsIfHLinkEmtoxHostX121"), ("CISCO-ALPS-MIB", "alpsIfHLinkActiveCkts"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsIfHostlinkGroup = alpsIfHostlinkGroup.setStatus('current')
alpsAscuGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 5)).setObjects(("CISCO-ALPS-MIB", "alpsAscuA1"), ("CISCO-ALPS-MIB", "alpsAscuA2"), ("CISCO-ALPS-MIB", "alpsAscuCktName"), ("CISCO-ALPS-MIB", "alpsAscuAlarmsEnabled"), ("CISCO-ALPS-MIB", "alpsAscuRetryOption"), ("CISCO-ALPS-MIB", "alpsAscuMaxMsgLength"), ("CISCO-ALPS-MIB", "alpsAscuFwdStatusOption"), ("CISCO-ALPS-MIB", "alpsAscuState"), ("CISCO-ALPS-MIB", "alpsAscuDownReason"), ("CISCO-ALPS-MIB", "alpsAscuOutPackets"), ("CISCO-ALPS-MIB", "alpsAscuOutOctets"), ("CISCO-ALPS-MIB", "alpsAscuInPackets"), ("CISCO-ALPS-MIB", "alpsAscuInOctets"), ("CISCO-ALPS-MIB", "alpsAscuDropsGarbledPkts"), ("CISCO-ALPS-MIB", "alpsAscuDropsAscuDown"), ("CISCO-ALPS-MIB", "alpsAscuDropsAscuDisabled"), ("CISCO-ALPS-MIB", "alpsAscuEnabled"), ("CISCO-ALPS-MIB", "alpsAscuRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsAscuGroup = alpsAscuGroup.setStatus('deprecated')
alpsSvcMsgGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 6)).setObjects(("CISCO-ALPS-MIB", "alpsSvcMsg"), ("CISCO-ALPS-MIB", "alpsSvcMsgRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsSvcMsgGroup = alpsSvcMsgGroup.setStatus('current')
alpsAddrTransGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 7)).setObjects(("CISCO-ALPS-MIB", "alpsIpAddress"), ("CISCO-ALPS-MIB", "alpsX121ToIpTransRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsAddrTransGroup = alpsAddrTransGroup.setStatus('current')
alpsPeerGroupRev1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 9)).setObjects(("CISCO-ALPS-MIB", "alpsPeerLocalIpAddr"), ("CISCO-ALPS-MIB", "alpsPeerLocalAtpPort"), ("CISCO-ALPS-MIB", "alpsPeerKeepaliveTimeout"), ("CISCO-ALPS-MIB", "alpsPeerKeepaliveMaxRetries"), ("CISCO-ALPS-MIB", "alpsPeerInCallsAcceptFlag"), ("CISCO-ALPS-MIB", "alpsRemPeerCfgActivation"), ("CISCO-ALPS-MIB", "alpsRemPeerCfgTCPQLen"), ("CISCO-ALPS-MIB", "alpsRemPeerCfgIdleTimer"), ("CISCO-ALPS-MIB", "alpsRemPeerCfgNoCircTimer"), ("CISCO-ALPS-MIB", "alpsRemPeerCfgAlarmsOn"), ("CISCO-ALPS-MIB", "alpsRemPeerCfgStatIntvl"), ("CISCO-ALPS-MIB", "alpsRemPeerCfgStatRetry"), ("CISCO-ALPS-MIB", "alpsRemPeerCfgRowStatus"), ("CISCO-ALPS-MIB", "alpsRemPeerConnLocalPort"), ("CISCO-ALPS-MIB", "alpsRemPeerConnForeignPort"), ("CISCO-ALPS-MIB", "alpsRemPeerConnState"), ("CISCO-ALPS-MIB", "alpsRemPeerConnProtocol"), ("CISCO-ALPS-MIB", "alpsRemPeerConnCreation"), ("CISCO-ALPS-MIB", "alpsRemPeerConnActivation"), ("CISCO-ALPS-MIB", "alpsRemPeerConnUptime"), ("CISCO-ALPS-MIB", "alpsRemPeerConnNumActCirc"), ("CISCO-ALPS-MIB", "alpsRemPeerConnLastTxRx"), ("CISCO-ALPS-MIB", "alpsRemPeerConnLastRxAny"), ("CISCO-ALPS-MIB", "alpsRemPeerConnIdleTimer"), ("CISCO-ALPS-MIB", "alpsRemPeerConnNoCircTimer"), ("CISCO-ALPS-MIB", "alpsRemPeerConnTCPQLen"), ("CISCO-ALPS-MIB", "alpsRemPeerConnAlarmsOn"), ("CISCO-ALPS-MIB", "alpsRemPeerConnStatIntvl"), ("CISCO-ALPS-MIB", "alpsRemPeerConnStatRetry"), ("CISCO-ALPS-MIB", "alpsRemPeerConnDownReason"), ("CISCO-ALPS-MIB", "alpsRemPeerConnOutPackets"), ("CISCO-ALPS-MIB", "alpsRemPeerConnOutOctets"), ("CISCO-ALPS-MIB", "alpsRemPeerConnInPackets"), ("CISCO-ALPS-MIB", "alpsRemPeerConnInOctets"), ("CISCO-ALPS-MIB", "alpsRemPeerConnDropsGiant"), ("CISCO-ALPS-MIB", "alpsRemPeerConnDropsQFull"), ("CISCO-ALPS-MIB", "alpsRemPeerConnDropsUnreach"), ("CISCO-ALPS-MIB", "alpsRemPeerConnDropsVersion"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsPeerGroupRev1 = alpsPeerGroupRev1.setStatus('current')
alpsIfP1024GroupRev1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 11)).setObjects(("CISCO-ALPS-MIB", "alpsIfP1024EncapType"), ("CISCO-ALPS-MIB", "alpsIfP1024PollRespTimeout"), ("CISCO-ALPS-MIB", "alpsIfP1024GATimeout"), ("CISCO-ALPS-MIB", "alpsIfP1024PollPauseTimeout"), ("CISCO-ALPS-MIB", "alpsIfP1024MaxErrCnt"), ("CISCO-ALPS-MIB", "alpsIfP1024MaxRetrans"), ("CISCO-ALPS-MIB", "alpsIfP1024CurrErrCnt"), ("CISCO-ALPS-MIB", "alpsIfP1024MinGoodPollResp"), ("CISCO-ALPS-MIB", "alpsIfP1024PollingRatio"), ("CISCO-ALPS-MIB", "alpsIfP1024NumAscus"), ("CISCO-ALPS-MIB", "alpsIfP1024ServMsgFormat"), ("CISCO-ALPS-MIB", "alpsIfP1024ServMsgStatusChange"), ("CISCO-ALPS-MIB", "alpsIfP1024ServMsgDropTermAddr"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsIfP1024GroupRev1 = alpsIfP1024GroupRev1.setStatus('current')
alpsAscuGroupRev1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 12)).setObjects(("CISCO-ALPS-MIB", "alpsAscuA1"), ("CISCO-ALPS-MIB", "alpsAscuA2"), ("CISCO-ALPS-MIB", "alpsAscuCktName"), ("CISCO-ALPS-MIB", "alpsAscuAlarmsEnabled"), ("CISCO-ALPS-MIB", "alpsAscuRetryOption"), ("CISCO-ALPS-MIB", "alpsAscuMaxMsgLength"), ("CISCO-ALPS-MIB", "alpsAscuFwdStatusOption"), ("CISCO-ALPS-MIB", "alpsAscuState"), ("CISCO-ALPS-MIB", "alpsAscuDownReason"), ("CISCO-ALPS-MIB", "alpsAscuOutPackets"), ("CISCO-ALPS-MIB", "alpsAscuOutOctets"), ("CISCO-ALPS-MIB", "alpsAscuInPackets"), ("CISCO-ALPS-MIB", "alpsAscuInOctets"), ("CISCO-ALPS-MIB", "alpsAscuDropsGarbledPkts"), ("CISCO-ALPS-MIB", "alpsAscuDropsAscuDown"), ("CISCO-ALPS-MIB", "alpsAscuDropsAscuDisabled"), ("CISCO-ALPS-MIB", "alpsAscuEnabled"), ("CISCO-ALPS-MIB", "alpsAscuRowStatus"), ("CISCO-ALPS-MIB", "alpsAscuAutoReset"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsAscuGroupRev1 = alpsAscuGroupRev1.setStatus('current')
alpsNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 8)).setObjects(("CISCO-ALPS-MIB", "alpsPeerStatusChange"), ("CISCO-ALPS-MIB", "alpsCktStatusChange"), ("CISCO-ALPS-MIB", "alpsAscuStatusChange"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsNotificationGroup = alpsNotificationGroup.setStatus('obsolete')
alpsNotificationGroupRev1 = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 10)).setObjects(("CISCO-ALPS-MIB", "alpsCktStatusChange"), ("CISCO-ALPS-MIB", "alpsAscuStatusChange"), ("CISCO-ALPS-MIB", "alpsPeerConnStatusChange"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsNotificationGroupRev1 = alpsNotificationGroupRev1.setStatus('deprecated')
alpsNotificationGroupRev2 = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 13)).setObjects(("CISCO-ALPS-MIB", "alpsCktStatusChange"), ("CISCO-ALPS-MIB", "alpsAscuStatusChange"), ("CISCO-ALPS-MIB", "alpsPeerConnStatusChange"), ("CISCO-ALPS-MIB", "alpsCktOpenFailure"), ("CISCO-ALPS-MIB", "alpsCktPartialReject"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alpsNotificationGroupRev2 = alpsNotificationGroupRev2.setStatus('current')
mibBuilder.exportSymbols("CISCO-ALPS-MIB", alpsIfObjects=alpsIfObjects, alpsCktP1024MatipCloseDelay=alpsCktP1024MatipCloseDelay, alpsRemPeerConnCreation=alpsRemPeerConnCreation, alpsRemPeerCfgTCPQLen=alpsRemPeerCfgTCPQLen, alpsRemPeerCfgAlarmsOn=alpsRemPeerCfgAlarmsOn, alpsNotificationGroupRev2=alpsNotificationGroupRev2, alpsPeerGroupRev1=alpsPeerGroupRev1, alpsAscuObjects=alpsAscuObjects, alpsCktP1024BackupPeerAddr=alpsCktP1024BackupPeerAddr, alpsCktAscuTable=alpsCktAscuTable, alpsAscuMaxMsgLength=alpsAscuMaxMsgLength, alpsIfP1024Group=alpsIfP1024Group, alpsRemPeerConnStatIntvl=alpsRemPeerConnStatIntvl, alpsAscuA2=alpsAscuA2, alpsIfHLinkX25ProtocolType=alpsIfHLinkX25ProtocolType, alpsRemPeerConnAlarmsOn=alpsRemPeerConnAlarmsOn, alpsCktX25LCN=alpsCktX25LCN, alpsCktBaseHostLinkType=alpsCktBaseHostLinkType, alpsIfHLinkActiveCkts=alpsIfHLinkActiveCkts, alpsRemPeerCfgRowStatus=alpsRemPeerCfgRowStatus, alpsPeer=alpsPeer, alpsRemPeerCfgActivation=alpsRemPeerCfgActivation, alpsRemPeerConnInOctets=alpsRemPeerConnInOctets, alpsCktBaseTable=alpsCktBaseTable, alpsRemPeerConnDropsUnreach=alpsRemPeerConnDropsUnreach, alpsAscuRetryOption=alpsAscuRetryOption, alpsCktP1024WinOut=alpsCktP1024WinOut, alpsCktBaseLocalHld=alpsCktBaseLocalHld, alpsRemPeerUptime=alpsRemPeerUptime, alpsCktBaseDlcType=alpsCktBaseDlcType, alpsCktBaseState=alpsCktBaseState, alpsSvcMsgEntry=alpsSvcMsgEntry, alpsSvcMsgNum=alpsSvcMsgNum, alpsIfP1024Entry=alpsIfP1024Entry, alpsCktBaseCurrPeerConnId=alpsCktBaseCurrPeerConnId, alpsPeerInCallsAcceptFlag=alpsPeerInCallsAcceptFlag, alpsRemPeerConnUptime=alpsRemPeerConnUptime, alpsAscuDownReason=alpsAscuDownReason, alpsIfHLinkHostHld=alpsIfHLinkHostHld, alpsAscuInPackets=alpsAscuInPackets, alpsRemPeerConnInPackets=alpsRemPeerConnInPackets, alpsRemPeerCfgEntry=alpsRemPeerCfgEntry, alpsRemPeerConnProtocol=alpsRemPeerConnProtocol, alpsRemPeerDropsPeerUnreach=alpsRemPeerDropsPeerUnreach, ciscoAlpsMIB=ciscoAlpsMIB, alpsRemPeerConnNoCircTimer=alpsRemPeerConnNoCircTimer, alpsCktP1024InPktSize=alpsCktP1024InPktSize, alpsAscuDropsGarbledPkts=alpsAscuDropsGarbledPkts, alpsX121=alpsX121, alpsRemPeerConnDropsQFull=alpsRemPeerConnDropsQFull, alpsRemPeerOutPackets=alpsRemPeerOutPackets, alpsRemPeerConnState=alpsRemPeerConnState, alpsRemPeerConnIdString=alpsRemPeerConnIdString, alpsIfHLinkAx25PvcDamp=alpsIfHLinkAx25PvcDamp, alpsCktP1024RowStatus=alpsCktP1024RowStatus, alpsIfP1024Table=alpsIfP1024Table, alpsMibComplianceRev2=alpsMibComplianceRev2, alpsCktGroup=alpsCktGroup, alpsCktBaseOutPackets=alpsCktBaseOutPackets, alpsAscuAutoReset=alpsAscuAutoReset, alpsMibConformance=alpsMibConformance, alpsCktP1024Entry=alpsCktP1024Entry, alpsNotificationGroupRev1=alpsNotificationGroupRev1, alpsRemPeerCfgNoCircTimer=alpsRemPeerCfgNoCircTimer, alpsRemPeerRowStatus=alpsRemPeerRowStatus, alpsRemPeerConnActivation=alpsRemPeerConnActivation, alpsAscuA1=alpsAscuA1, alpsIfP1024CurrErrCnt=alpsIfP1024CurrErrCnt, alpsRemPeerDropsGiant=alpsRemPeerDropsGiant, alpsAscuFwdStatusOption=alpsAscuFwdStatusOption, alpsPeerObjects=alpsPeerObjects, alpsCktP1024IdleTimer=alpsCktP1024IdleTimer, alpsIfHLinkEntry=alpsIfHLinkEntry, alpsRemPeerConnTable=alpsRemPeerConnTable, alpsAscuDropsAscuDisabled=alpsAscuDropsAscuDisabled, alpsIfHLinkTable=alpsIfHLinkTable, alpsCktAscuEntry=alpsCktAscuEntry, alpsRemPeerState=alpsRemPeerState, alpsCktBaseName=alpsCktBaseName, alpsCktObjects=alpsCktObjects, alpsMibComplianceRev1=alpsMibComplianceRev1, alpsRemPeerInPackets=alpsRemPeerInPackets, alpsRemPeerConnOutOctets=alpsRemPeerConnOutOctets, alpsPeerKeepaliveMaxRetries=alpsPeerKeepaliveMaxRetries, alpsCktAscuA1=alpsCktAscuA1, alpsRemPeerRemotePort=alpsRemPeerRemotePort, alpsRemPeerIdleTimer=alpsRemPeerIdleTimer, alpsRemPeerConnDropsGiant=alpsRemPeerConnDropsGiant, alpsAscuAlarmsEnabled=alpsAscuAlarmsEnabled, alpsCktBaseLifeTimeTimer=alpsCktBaseLifeTimeTimer, alpsCktAscuId=alpsCktAscuId, alpsRemPeerInOctets=alpsRemPeerInOctets, alpsAscuState=alpsAscuState, alpsAscuInOctets=alpsAscuInOctets, alpsRemPeerConnIpAddr=alpsRemPeerConnIpAddr, alpsCktP1024WinIn=alpsCktP1024WinIn, alpsRemPeerConnDropsVersion=alpsRemPeerConnDropsVersion, alpsIfP1024ServMsgStatusChange=alpsIfP1024ServMsgStatusChange, alpsRemPeerCfgIpAddr=alpsRemPeerCfgIpAddr, ciscoAlpsMIBNotificationPrefix=ciscoAlpsMIBNotificationPrefix, alpsIfP1024MaxErrCnt=alpsIfP1024MaxErrCnt, alpsIfP1024PollingRatio=alpsIfP1024PollingRatio, alpsRemPeerConnLastTxRx=alpsRemPeerConnLastTxRx, alpsAscuEntry=alpsAscuEntry, alpsRemPeerConnTCPQLen=alpsRemPeerConnTCPQLen, alpsCktX25Entry=alpsCktX25Entry, alpsIfP1024MaxRetrans=alpsIfP1024MaxRetrans, alpsX121ToIpTransRowStatus=alpsX121ToIpTransRowStatus, alpsSvcMsgRowStatus=alpsSvcMsgRowStatus, alpsSvcMsgGroup=alpsSvcMsgGroup, alpsCktBaseHostLinkNumber=alpsCktBaseHostLinkNumber, alpsCktBaseRemHld=alpsCktBaseRemHld, alpsIfP1024ServMsgFormat=alpsIfP1024ServMsgFormat, PYSNMP_MODULE_ID=ciscoAlpsMIB, alpsIfP1024ServMsgDropTermAddr=alpsIfP1024ServMsgDropTermAddr, alpsCktP1024OutPktSize=alpsCktP1024OutPktSize, alpsAscuCktName=alpsAscuCktName, alpsPeerConnStatusChange=alpsPeerConnStatusChange, alpsIfP1024PollPauseTimeout=alpsIfP1024PollPauseTimeout, alpsCktBaseEnabled=alpsCktBaseEnabled, alpsAscuId=alpsAscuId, alpsMibGroups=alpsMibGroups, alpsCktOpenFailure=alpsCktOpenFailure, alpsCktP1024RetryTimer=alpsCktP1024RetryTimer, alpsRemPeerCfgProtocol=alpsRemPeerCfgProtocol, alpsIpAddress=alpsIpAddress, alpsAddrTransGroup=alpsAddrTransGroup, alpsRemPeerConnLastRxAny=alpsRemPeerConnLastRxAny, alpsCktBaseInPackets=alpsCktBaseInPackets, alpsX121ToIpTransTable=alpsX121ToIpTransTable, alpsCktP1024SvcMsgIntvl=alpsCktP1024SvcMsgIntvl, alpsRemPeerNumActiveCkts=alpsRemPeerNumActiveCkts, alpsRemPeerTCPQlen=alpsRemPeerTCPQlen, alpsCktX25HostX121=alpsCktX25HostX121, alpsRemPeerCfgIdleTimer=alpsRemPeerCfgIdleTimer, alpsIfHLinkNumber=alpsIfHLinkNumber, alpsIfP1024PollRespTimeout=alpsIfP1024PollRespTimeout, alpsRemPeerCfgStatRetry=alpsRemPeerCfgStatRetry, alpsIfP1024NumAscus=alpsIfP1024NumAscus, alpsX121ToIpTransEntry=alpsX121ToIpTransEntry, alpsCktPartialReject=alpsCktPartialReject, alpsAscuRowStatus=alpsAscuRowStatus, alpsMibCompliances=alpsMibCompliances, alpsAscuEnabled=alpsAscuEnabled, alpsGroups=alpsGroups, alpsRemPeerConnIdleTimer=alpsRemPeerConnIdleTimer, alpsPeerStatusChange=alpsPeerStatusChange, alpsCktBaseNumActiveAscus=alpsCktBaseNumActiveAscus, alpsIfP1024EncapType=alpsIfP1024EncapType, alpsCktBaseDownReason=alpsCktBaseDownReason, alpsSvcMsg=alpsSvcMsg, alpsCktX25DropsVcReset=alpsCktX25DropsVcReset, alpsCktBaseEntry=alpsCktBaseEntry, alpsMibCompliance=alpsMibCompliance, alpsCktAscuIfIndex=alpsCktAscuIfIndex, alpsCktStatusChange=alpsCktStatusChange, alpsCktP1024SvcMsgList=alpsCktP1024SvcMsgList, alpsAscuGroupRev1=alpsAscuGroupRev1, alpsRemPeerConnNumActCirc=alpsRemPeerConnNumActCirc, alpsCktP1024DlcType=alpsCktP1024DlcType, alpsRemPeerConnDownReason=alpsRemPeerConnDownReason, alpsRemPeerOutOctets=alpsRemPeerOutOctets, alpsCktBaseInOctets=alpsCktBaseInOctets, ciscoAlpsMIBNotifications=ciscoAlpsMIBNotifications, alpsIfP1024MinGoodPollResp=alpsIfP1024MinGoodPollResp, alpsAscuStatusChange=alpsAscuStatusChange, alpsAscuDropsAscuDown=alpsAscuDropsAscuDown, alpsGlobalObjects=alpsGlobalObjects, alpsPeerLocalAtpPort=alpsPeerLocalAtpPort, alpsRemPeerConnLocalPort=alpsRemPeerConnLocalPort, alpsCktBaseConnType=alpsCktBaseConnType, alpsCktX25IfIndex=alpsCktX25IfIndex, alpsSvcMsgListNum=alpsSvcMsgListNum, alpsCktBaseOutOctets=alpsCktBaseOutOctets, alpsCktBaseRowStatus=alpsCktBaseRowStatus, AlpsCktName=AlpsCktName, alpsCktBaseAlarmsEnabled=alpsCktBaseAlarmsEnabled, alpsCktBasePriPeerAddr=alpsCktBasePriPeerAddr, alpsRemPeerConnType=alpsRemPeerConnType, alpsRemPeerCfgTable=alpsRemPeerCfgTable, alpsCktBaseCurrentPeer=alpsCktBaseCurrentPeer, alpsCktP1024EmtoxX121=alpsCktP1024EmtoxX121, alpsCktP1024Ax25LCN=alpsCktP1024Ax25LCN, alpsAscuOutOctets=alpsAscuOutOctets, alpsAscuOutPackets=alpsAscuOutPackets, alpsCktAscuA2=alpsCktAscuA2, alpsIfHLinkEmtoxHostX121=alpsIfHLinkEmtoxHostX121, alpsRemPeerAlarmsEnabled=alpsRemPeerAlarmsEnabled, alpsCktBaseDropsCktDisabled=alpsCktBaseDropsCktDisabled, alpsPeerKeepaliveTimeout=alpsPeerKeepaliveTimeout, alpsPeerLocalIpAddr=alpsPeerLocalIpAddr, alpsRemPeerCfgStatIntvl=alpsRemPeerCfgStatIntvl, alpsRemPeerConnOutPackets=alpsRemPeerConnOutPackets, alpsRemPeerConnForeignPort=alpsRemPeerConnForeignPort, alpsCktX25DlcType=alpsCktX25DlcType, alpsPeerGroup=alpsPeerGroup, alpsCktAscuStatus=alpsCktAscuStatus, alpsRemPeerTable=alpsRemPeerTable, alpsRemPeerIpAddr=alpsRemPeerIpAddr, alpsRemPeerConnEntry=alpsRemPeerConnEntry, alpsCktBaseDropsLifeTimeExpd=alpsCktBaseDropsLifeTimeExpd, alpsCktAscuCktName=alpsCktAscuCktName, alpsIfP1024GroupRev1=alpsIfP1024GroupRev1, AlpsAscuA1A2Value=AlpsAscuA1A2Value, ciscoAlpsMIBObjects=ciscoAlpsMIBObjects, alpsNotificationGroup=alpsNotificationGroup, alpsCktP1024DropsUnkAscu=alpsCktP1024DropsUnkAscu, alpsRemPeerLocalPort=alpsRemPeerLocalPort, alpsCktBaseDropsQOverflow=alpsCktBaseDropsQOverflow, alpsCktX25RemoteX121=alpsCktX25RemoteX121, alpsRemPeerConnStatRetry=alpsRemPeerConnStatRetry, alpsAscuTable=alpsAscuTable, alpsCktP1024Table=alpsCktP1024Table, alpsSvcMsgTable=alpsSvcMsgTable, alpsRemPeerEntry=alpsRemPeerEntry, alpsAscuGroup=alpsAscuGroup, alpsIfP1024GATimeout=alpsIfP1024GATimeout, alpsCktAscuCktDlcType=alpsCktAscuCktDlcType, alpsIfHostlinkGroup=alpsIfHostlinkGroup, alpsRemPeerDropsQFull=alpsRemPeerDropsQFull, alpsCktX25Table=alpsCktX25Table)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, constraints_union, value_size_constraint, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(if_index, interface_index) = mibBuilder.importSymbols('IF-MIB', 'ifIndex', 'InterfaceIndex')
(x121_address,) = mibBuilder.importSymbols('RFC1382-MIB', 'X121Address')
(object_group, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'ModuleCompliance', 'NotificationGroup')
(notification_type, object_identity, ip_address, time_ticks, mib_identifier, unsigned32, counter32, module_identity, gauge32, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, counter64, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'ObjectIdentity', 'IpAddress', 'TimeTicks', 'MibIdentifier', 'Unsigned32', 'Counter32', 'ModuleIdentity', 'Gauge32', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'Counter64', 'Bits')
(row_status, truth_value, textual_convention, time_interval, time_stamp, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'TruthValue', 'TextualConvention', 'TimeInterval', 'TimeStamp', 'DisplayString')
cisco_alps_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 95))
ciscoAlpsMIB.setRevisions(('2008-02-14 00:00', '2000-01-28 00:00', '1999-01-07 00:00', '1998-12-31 00:00', '1998-12-08 00:00', '1998-05-20 00:00'))
if mibBuilder.loadTexts:
ciscoAlpsMIB.setLastUpdated('200802140000Z')
if mibBuilder.loadTexts:
ciscoAlpsMIB.setOrganization('Cisco Systems, Inc.')
cisco_alps_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1))
class Alpscktname(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(1, 12)
class Alpsascua1A2Value(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 255)
alps_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 1))
alps_peer_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2))
alps_ckt_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3))
alps_if_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4))
alps_ascu_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5))
alps_global_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6))
alps_peer = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 1))
alps_peer_local_ip_addr = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 1, 1), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsPeerLocalIpAddr.setStatus('current')
alps_peer_local_atp_port = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsPeerLocalAtpPort.setStatus('current')
alps_peer_keepalive_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 1, 3), time_interval()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsPeerKeepaliveTimeout.setStatus('current')
alps_peer_keepalive_max_retries = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 10))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsPeerKeepaliveMaxRetries.setStatus('current')
alps_peer_in_calls_accept_flag = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 1, 5), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsPeerInCallsAcceptFlag.setStatus('current')
alps_rem_peer_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2))
if mibBuilder.loadTexts:
alpsRemPeerTable.setStatus('deprecated')
alps_rem_peer_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1)).setIndexNames((0, 'CISCO-ALPS-MIB', 'alpsRemPeerIpAddr'))
if mibBuilder.loadTexts:
alpsRemPeerEntry.setStatus('deprecated')
alps_rem_peer_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 1), ip_address())
if mibBuilder.loadTexts:
alpsRemPeerIpAddr.setStatus('deprecated')
alps_rem_peer_conn_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('permanent', 1), ('dynamic', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsRemPeerConnType.setStatus('deprecated')
alps_rem_peer_local_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerLocalPort.setStatus('deprecated')
alps_rem_peer_remote_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerRemotePort.setStatus('deprecated')
alps_rem_peer_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('closed', 1), ('opening', 2), ('opened', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerState.setStatus('deprecated')
alps_rem_peer_uptime = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 6), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerUptime.setStatus('deprecated')
alps_rem_peer_num_active_ckts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 7), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerNumActiveCkts.setStatus('deprecated')
alps_rem_peer_idle_timer = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 8), time_interval()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsRemPeerIdleTimer.setStatus('deprecated')
alps_rem_peer_alarms_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 9), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsRemPeerAlarmsEnabled.setStatus('deprecated')
alps_rem_peer_tcp_qlen = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(1, 200))).setUnits('packets').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsRemPeerTCPQlen.setStatus('deprecated')
alps_rem_peer_out_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 11), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerOutPackets.setStatus('deprecated')
alps_rem_peer_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 12), counter32()).setUnits('octets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerOutOctets.setStatus('deprecated')
alps_rem_peer_in_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 13), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerInPackets.setStatus('deprecated')
alps_rem_peer_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 14), counter32()).setUnits('octets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerInOctets.setStatus('deprecated')
alps_rem_peer_drops_giant = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 15), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerDropsGiant.setStatus('deprecated')
alps_rem_peer_drops_q_full = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 16), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerDropsQFull.setStatus('deprecated')
alps_rem_peer_drops_peer_unreach = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 17), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerDropsPeerUnreach.setStatus('deprecated')
alps_rem_peer_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 2, 1, 18), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsRemPeerRowStatus.setStatus('deprecated')
alps_rem_peer_cfg_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3))
if mibBuilder.loadTexts:
alpsRemPeerCfgTable.setStatus('current')
alps_rem_peer_cfg_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1)).setIndexNames((0, 'CISCO-ALPS-MIB', 'alpsRemPeerCfgIpAddr'), (0, 'CISCO-ALPS-MIB', 'alpsRemPeerCfgProtocol'))
if mibBuilder.loadTexts:
alpsRemPeerCfgEntry.setStatus('current')
alps_rem_peer_cfg_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 1), ip_address())
if mibBuilder.loadTexts:
alpsRemPeerCfgIpAddr.setStatus('current')
alps_rem_peer_cfg_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('atp', 1), ('matipTypeA', 2))))
if mibBuilder.loadTexts:
alpsRemPeerCfgProtocol.setStatus('current')
alps_rem_peer_cfg_activation = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('permanent', 1), ('dynamic', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsRemPeerCfgActivation.setStatus('current')
alps_rem_peer_cfg_tcpq_len = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 100))).setUnits('packets').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsRemPeerCfgTCPQLen.setStatus('current')
alps_rem_peer_cfg_idle_timer = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 5), time_interval()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsRemPeerCfgIdleTimer.setStatus('current')
alps_rem_peer_cfg_no_circ_timer = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 6), time_interval()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsRemPeerCfgNoCircTimer.setStatus('current')
alps_rem_peer_cfg_alarms_on = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 7), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsRemPeerCfgAlarmsOn.setStatus('current')
alps_rem_peer_cfg_stat_intvl = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 8), time_interval()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsRemPeerCfgStatIntvl.setStatus('current')
alps_rem_peer_cfg_stat_retry = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsRemPeerCfgStatRetry.setStatus('current')
alps_rem_peer_cfg_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 3, 1, 10), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsRemPeerCfgRowStatus.setStatus('current')
alps_rem_peer_conn_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4))
if mibBuilder.loadTexts:
alpsRemPeerConnTable.setStatus('current')
alps_rem_peer_conn_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1)).setIndexNames((0, 'CISCO-ALPS-MIB', 'alpsRemPeerConnIpAddr'), (0, 'CISCO-ALPS-MIB', 'alpsRemPeerConnIdString'))
if mibBuilder.loadTexts:
alpsRemPeerConnEntry.setStatus('current')
alps_rem_peer_conn_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 1), ip_address())
if mibBuilder.loadTexts:
alpsRemPeerConnIpAddr.setStatus('current')
alps_rem_peer_conn_id_string = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(1, 20)))
if mibBuilder.loadTexts:
alpsRemPeerConnIdString.setStatus('current')
alps_rem_peer_conn_local_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnLocalPort.setStatus('current')
alps_rem_peer_conn_foreign_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnForeignPort.setStatus('current')
alps_rem_peer_conn_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('closed', 1), ('opening', 2), ('opened', 3), ('busy', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnState.setStatus('current')
alps_rem_peer_conn_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('atp', 1), ('matipTypeA', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnProtocol.setStatus('current')
alps_rem_peer_conn_creation = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('admin', 1), ('learned', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnCreation.setStatus('current')
alps_rem_peer_conn_activation = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('permanent', 1), ('dynamic', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnActivation.setStatus('current')
alps_rem_peer_conn_uptime = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 9), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnUptime.setStatus('current')
alps_rem_peer_conn_num_act_circ = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnNumActCirc.setStatus('current')
alps_rem_peer_conn_last_tx_rx = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 11), time_stamp()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnLastTxRx.setStatus('current')
alps_rem_peer_conn_last_rx_any = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 12), time_stamp()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnLastRxAny.setStatus('current')
alps_rem_peer_conn_idle_timer = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 13), time_interval()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnIdleTimer.setStatus('current')
alps_rem_peer_conn_no_circ_timer = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 14), time_interval()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnNoCircTimer.setStatus('current')
alps_rem_peer_conn_tcpq_len = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(1, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnTCPQLen.setStatus('current')
alps_rem_peer_conn_alarms_on = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 16), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnAlarmsOn.setStatus('current')
alps_rem_peer_conn_stat_intvl = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 300))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnStatIntvl.setStatus('current')
alps_rem_peer_conn_stat_retry = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnStatRetry.setStatus('current')
alps_rem_peer_conn_down_reason = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('unknown', 1), ('idle', 2), ('noCircuits', 3), ('destUnreachable', 4), ('foreignReset', 5), ('localReset', 6), ('noMemory', 7), ('openingTimeout', 8)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnDownReason.setStatus('current')
alps_rem_peer_conn_out_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 20), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnOutPackets.setStatus('current')
alps_rem_peer_conn_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 21), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnOutOctets.setStatus('current')
alps_rem_peer_conn_in_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 22), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnInPackets.setStatus('current')
alps_rem_peer_conn_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 23), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnInOctets.setStatus('current')
alps_rem_peer_conn_drops_giant = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 24), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnDropsGiant.setStatus('current')
alps_rem_peer_conn_drops_q_full = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 25), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnDropsQFull.setStatus('current')
alps_rem_peer_conn_drops_unreach = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 26), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnDropsUnreach.setStatus('current')
alps_rem_peer_conn_drops_version = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 2, 4, 1, 27), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsRemPeerConnDropsVersion.setStatus('current')
alps_ckt_base_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1))
if mibBuilder.loadTexts:
alpsCktBaseTable.setStatus('current')
alps_ckt_base_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1)).setIndexNames((0, 'CISCO-ALPS-MIB', 'alpsCktBaseName'), (0, 'CISCO-ALPS-MIB', 'alpsCktBaseDlcType'))
if mibBuilder.loadTexts:
alpsCktBaseEntry.setStatus('current')
alps_ckt_base_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 1), alps_ckt_name())
if mibBuilder.loadTexts:
alpsCktBaseName.setStatus('current')
alps_ckt_base_dlc_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('emtox', 1), ('ax25', 2), ('alc', 3), ('uts', 4))))
if mibBuilder.loadTexts:
alpsCktBaseDlcType.setStatus('current')
alps_ckt_base_pri_peer_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 3), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktBasePriPeerAddr.setStatus('current')
alps_ckt_base_alarms_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 4), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktBaseAlarmsEnabled.setStatus('current')
alps_ckt_base_conn_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('permanent', 1), ('dynamic', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktBaseConnType.setStatus('current')
alps_ckt_base_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('disabled', 1), ('inoperable', 2), ('opening', 3), ('opened', 4), ('cktBusy', 5), ('peerBusy', 6), ('updating', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktBaseState.setStatus('current')
alps_ckt_base_num_active_ascus = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktBaseNumActiveAscus.setStatus('current')
alps_ckt_base_current_peer = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 8), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktBaseCurrentPeer.setStatus('current')
alps_ckt_base_life_time_timer = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 9), time_interval()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktBaseLifeTimeTimer.setStatus('current')
alps_ckt_base_host_link_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(1, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktBaseHostLinkNumber.setStatus('current')
alps_ckt_base_host_link_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('ax25', 1), ('emtox', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktBaseHostLinkType.setStatus('current')
alps_ckt_base_rem_hld = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(1, 32639))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktBaseRemHld.setStatus('current')
alps_ckt_base_local_hld = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(1, 32639))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktBaseLocalHld.setStatus('current')
alps_ckt_base_down_reason = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42))).clone(namedValues=named_values(('unknown', 1), ('noReason', 2), ('hostLinkDown', 3), ('cktDisabled', 4), ('hostLinkDisabled', 5), ('noHostLinkMatched', 6), ('noHldMatched', 7), ('cktNameInUse', 8), ('pvcLcnOutOfRange', 9), ('x25ParamInvalid', 10), ('cktOpeningTimeout', 11), ('x25ClearDteNoReason', 12), ('configMismatch', 13), ('noResourcesAvail', 14), ('incompatibleA1A2', 15), ('cktIdle', 16), ('peerDown', 17), ('noAscusConfigured', 18), ('x25ClearHostUnknown', 19), ('x25ClearHostDown', 20), ('x25ClearHostDisabled', 21), ('x25ClearHostSaturated', 22), ('x25ClearCallerUnknown', 23), ('x25ClearCallerUnauth', 24), ('x25ClearConfigRejected', 25), ('x25ClearConfigFallback', 26), ('x25ClearConfigIncompat', 27), ('x25ClearHLDUnknown', 28), ('x25ClearPIDUnknown', 29), ('x25ClearFacilRejected', 30), ('x25ClearNetNoReason', 31), ('pvcLcnInUse', 32), ('noSvcLcnAvail', 33), ('peerIdle', 34), ('presUnknown', 35), ('presMismatch', 36), ('openMsgTooShort', 37), ('mpxUnknown', 38), ('mpxHdrMismatch', 39), ('trafTypeMismatch', 40), ('codingMismatch', 41), ('ascuInSession', 42))).clone('noReason')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktBaseDownReason.setStatus('current')
alps_ckt_base_out_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 15), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktBaseOutPackets.setStatus('current')
alps_ckt_base_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 16), counter32()).setUnits('octets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktBaseOutOctets.setStatus('current')
alps_ckt_base_in_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 17), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktBaseInPackets.setStatus('current')
alps_ckt_base_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 18), counter32()).setUnits('octets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktBaseInOctets.setStatus('current')
alps_ckt_base_drops_ckt_disabled = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 19), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktBaseDropsCktDisabled.setStatus('current')
alps_ckt_base_drops_q_overflow = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 20), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktBaseDropsQOverflow.setStatus('current')
alps_ckt_base_drops_life_time_expd = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 21), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktBaseDropsLifeTimeExpd.setStatus('current')
alps_ckt_base_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 22), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktBaseEnabled.setStatus('current')
alps_ckt_base_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 23), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktBaseRowStatus.setStatus('current')
alps_ckt_base_curr_peer_conn_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 1, 1, 24), display_string().subtype(subtypeSpec=value_size_constraint(1, 20))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktBaseCurrPeerConnId.setStatus('current')
alps_ckt_x25_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2))
if mibBuilder.loadTexts:
alpsCktX25Table.setStatus('current')
alps_ckt_x25_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1)).setIndexNames((0, 'CISCO-ALPS-MIB', 'alpsCktBaseName'), (0, 'CISCO-ALPS-MIB', 'alpsCktX25DlcType'))
if mibBuilder.loadTexts:
alpsCktX25Entry.setStatus('current')
alps_ckt_x25_dlc_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('emtox', 1), ('ax25', 2))))
if mibBuilder.loadTexts:
alpsCktX25DlcType.setStatus('current')
alps_ckt_x25_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1, 2), interface_index()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktX25IfIndex.setStatus('current')
alps_ckt_x25_lcn = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 4096))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktX25LCN.setStatus('current')
alps_ckt_x25_host_x121 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1, 4), x121_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktX25HostX121.setStatus('current')
alps_ckt_x25_remote_x121 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1, 5), x121_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktX25RemoteX121.setStatus('current')
alps_ckt_x25_drops_vc_reset = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 2, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktX25DropsVcReset.setStatus('current')
alps_ckt_p1024_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3))
if mibBuilder.loadTexts:
alpsCktP1024Table.setStatus('current')
alps_ckt_p1024_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1)).setIndexNames((0, 'CISCO-ALPS-MIB', 'alpsCktBaseName'), (0, 'CISCO-ALPS-MIB', 'alpsCktP1024DlcType'))
if mibBuilder.loadTexts:
alpsCktP1024Entry.setStatus('current')
alps_ckt_p1024_dlc_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(3, 4))).clone(namedValues=named_values(('alc', 3), ('uts', 4))))
if mibBuilder.loadTexts:
alpsCktP1024DlcType.setStatus('current')
alps_ckt_p1024_backup_peer_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 2), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktP1024BackupPeerAddr.setStatus('current')
alps_ckt_p1024_retry_timer = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 3), time_interval()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktP1024RetryTimer.setStatus('current')
alps_ckt_p1024_idle_timer = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 4), time_interval()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktP1024IdleTimer.setStatus('current')
alps_ckt_p1024_emtox_x121 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 5), x121_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktP1024EmtoxX121.setStatus('current')
alps_ckt_p1024_ax25_lcn = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 4096))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktP1024Ax25LCN.setStatus('current')
alps_ckt_p1024_win_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(1, 7))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktP1024WinOut.setStatus('current')
alps_ckt_p1024_win_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(1, 7))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktP1024WinIn.setStatus('current')
alps_ckt_p1024_out_pkt_size = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(128, 4096))).setUnits('bytes').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktP1024OutPktSize.setStatus('current')
alps_ckt_p1024_in_pkt_size = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(128, 4096))).setUnits('bytes').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktP1024InPktSize.setStatus('current')
alps_ckt_p1024_svc_msg_list = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 8))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktP1024SvcMsgList.setStatus('current')
alps_ckt_p1024_svc_msg_intvl = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 12), time_ticks()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktP1024SvcMsgIntvl.setStatus('current')
alps_ckt_p1024_drops_unk_ascu = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 13), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktP1024DropsUnkAscu.setStatus('current')
alps_ckt_p1024_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 14), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktP1024RowStatus.setStatus('current')
alps_ckt_p1024_matip_close_delay = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 3, 1, 15), time_interval()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsCktP1024MatipCloseDelay.setStatus('current')
alps_ckt_ascu_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4))
if mibBuilder.loadTexts:
alpsCktAscuTable.setStatus('current')
alps_ckt_ascu_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1)).setIndexNames((0, 'CISCO-ALPS-MIB', 'alpsCktAscuCktName'), (0, 'CISCO-ALPS-MIB', 'alpsCktAscuCktDlcType'), (0, 'CISCO-ALPS-MIB', 'alpsCktAscuA1'), (0, 'CISCO-ALPS-MIB', 'alpsCktAscuA2'))
if mibBuilder.loadTexts:
alpsCktAscuEntry.setStatus('current')
alps_ckt_ascu_ckt_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 1), alps_ckt_name())
if mibBuilder.loadTexts:
alpsCktAscuCktName.setStatus('current')
alps_ckt_ascu_ckt_dlc_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('emtox', 1), ('ax25', 2), ('alc', 3), ('uts', 4))))
if mibBuilder.loadTexts:
alpsCktAscuCktDlcType.setStatus('current')
alps_ckt_ascu_a1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 3), alps_ascu_a1_a2_value())
if mibBuilder.loadTexts:
alpsCktAscuA1.setStatus('current')
alps_ckt_ascu_a2 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 4), alps_ascu_a1_a2_value())
if mibBuilder.loadTexts:
alpsCktAscuA2.setStatus('current')
alps_ckt_ascu_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 5), interface_index()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktAscuIfIndex.setStatus('current')
alps_ckt_ascu_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 127))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktAscuId.setStatus('current')
alps_ckt_ascu_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 3, 4, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('ok', 2), ('reject', 3), ('new', 4), ('pending', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsCktAscuStatus.setStatus('current')
alps_if_p1024_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1))
if mibBuilder.loadTexts:
alpsIfP1024Table.setStatus('current')
alps_if_p1024_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
alpsIfP1024Entry.setStatus('current')
alps_if_p1024_encap_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('alc', 1), ('uts', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsIfP1024EncapType.setStatus('current')
alps_if_p1024_poll_resp_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 2), time_interval().clone(500)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsIfP1024PollRespTimeout.setStatus('current')
alps_if_p1024_ga_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 3), time_interval().clone(600)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsIfP1024GATimeout.setStatus('current')
alps_if_p1024_poll_pause_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 4), time_interval().clone(50)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsIfP1024PollPauseTimeout.setStatus('current')
alps_if_p1024_max_err_cnt = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 30))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsIfP1024MaxErrCnt.setStatus('current')
alps_if_p1024_max_retrans = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 10)).clone(3)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsIfP1024MaxRetrans.setStatus('current')
alps_if_p1024_curr_err_cnt = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 30))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsIfP1024CurrErrCnt.setStatus('current')
alps_if_p1024_min_good_poll_resp = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(1, 30)).clone(1)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsIfP1024MinGoodPollResp.setStatus('current')
alps_if_p1024_polling_ratio = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(1, 30)).clone(30)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsIfP1024PollingRatio.setStatus('current')
alps_if_p1024_num_ascus = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 10), gauge32()).setUnits('Ascus').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsIfP1024NumAscus.setStatus('current')
alps_if_p1024_serv_msg_format = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('sita', 1), ('apollo', 2))).clone('sita')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsIfP1024ServMsgFormat.setStatus('current')
alps_if_p1024_serv_msg_status_change = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 12), truth_value().clone('true')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsIfP1024ServMsgStatusChange.setStatus('current')
alps_if_p1024_serv_msg_drop_term_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('msgterm', 1), ('configterm', 2))).clone('configterm')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alpsIfP1024ServMsgDropTermAddr.setStatus('current')
alps_if_h_link_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2))
if mibBuilder.loadTexts:
alpsIfHLinkTable.setStatus('current')
alps_if_h_link_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'CISCO-ALPS-MIB', 'alpsIfHLinkHostHld'), (0, 'CISCO-ALPS-MIB', 'alpsIfHLinkNumber'))
if mibBuilder.loadTexts:
alpsIfHLinkEntry.setStatus('current')
alps_if_h_link_host_hld = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535)))
if mibBuilder.loadTexts:
alpsIfHLinkHostHld.setStatus('current')
alps_if_h_link_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 255)))
if mibBuilder.loadTexts:
alpsIfHLinkNumber.setStatus('current')
alps_if_h_link_x25_protocol_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('ax25', 1), ('emtox', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsIfHLinkX25ProtocolType.setStatus('current')
alps_if_h_link_ax25_pvc_damp = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1, 4), time_interval()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsIfHLinkAx25PvcDamp.setStatus('current')
alps_if_h_link_emtox_host_x121 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1, 5), x121_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsIfHLinkEmtoxHostX121.setStatus('current')
alps_if_h_link_active_ckts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 4, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 4096))).setUnits('circuits').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsIfHLinkActiveCkts.setStatus('current')
alps_ascu_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1))
if mibBuilder.loadTexts:
alpsAscuTable.setStatus('current')
alps_ascu_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'CISCO-ALPS-MIB', 'alpsAscuId'))
if mibBuilder.loadTexts:
alpsAscuEntry.setStatus('current')
alps_ascu_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 127)))
if mibBuilder.loadTexts:
alpsAscuId.setStatus('current')
alps_ascu_a1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 2), alps_ascu_a1_a2_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsAscuA1.setStatus('current')
alps_ascu_a2 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 3), alps_ascu_a1_a2_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsAscuA2.setStatus('current')
alps_ascu_ckt_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 4), alps_ckt_name()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsAscuCktName.setStatus('current')
alps_ascu_alarms_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 5), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsAscuAlarmsEnabled.setStatus('current')
alps_ascu_retry_option = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('resend', 1), ('reenter', 2), ('none', 3))).clone('none')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsAscuRetryOption.setStatus('current')
alps_ascu_max_msg_length = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(1, 3840)).clone(962)).setUnits('bytes').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsAscuMaxMsgLength.setStatus('current')
alps_ascu_fwd_status_option = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 8), truth_value().clone('true')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsAscuFwdStatusOption.setStatus('current')
alps_ascu_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('disabled', 1), ('unknown', 2), ('down', 3), ('up', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsAscuState.setStatus('current')
alps_ascu_down_reason = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('noReason', 2), ('notDown', 3), ('ascuDisabled', 4), ('errorThresholdExceeded', 5))).clone('noReason')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsAscuDownReason.setStatus('current')
alps_ascu_out_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 11), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsAscuOutPackets.setStatus('current')
alps_ascu_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsAscuOutOctets.setStatus('current')
alps_ascu_in_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 13), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsAscuInPackets.setStatus('current')
alps_ascu_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsAscuInOctets.setStatus('current')
alps_ascu_drops_garbled_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsAscuDropsGarbledPkts.setStatus('current')
alps_ascu_drops_ascu_down = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsAscuDropsAscuDown.setStatus('current')
alps_ascu_drops_ascu_disabled = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alpsAscuDropsAscuDisabled.setStatus('current')
alps_ascu_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 18), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsAscuEnabled.setStatus('current')
alps_ascu_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 19), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsAscuRowStatus.setStatus('current')
alps_ascu_auto_reset = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 5, 1, 1, 20), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsAscuAutoReset.setStatus('current')
alps_svc_msg_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 1))
if mibBuilder.loadTexts:
alpsSvcMsgTable.setStatus('current')
alps_svc_msg_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 1, 1)).setIndexNames((0, 'CISCO-ALPS-MIB', 'alpsSvcMsgListNum'), (0, 'CISCO-ALPS-MIB', 'alpsSvcMsgNum'))
if mibBuilder.loadTexts:
alpsSvcMsgEntry.setStatus('current')
alps_svc_msg_list_num = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 8)))
if mibBuilder.loadTexts:
alpsSvcMsgListNum.setStatus('current')
alps_svc_msg_num = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 8)))
if mibBuilder.loadTexts:
alpsSvcMsgNum.setStatus('current')
alps_svc_msg = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(1, 50))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsSvcMsg.setStatus('current')
alps_svc_msg_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 1, 1, 4), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsSvcMsgRowStatus.setStatus('current')
alps_x121_to_ip_trans_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 2))
if mibBuilder.loadTexts:
alpsX121ToIpTransTable.setStatus('current')
alps_x121_to_ip_trans_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'CISCO-ALPS-MIB', 'alpsX121'))
if mibBuilder.loadTexts:
alpsX121ToIpTransEntry.setStatus('current')
alps_x121 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 2, 1, 1), x121_address())
if mibBuilder.loadTexts:
alpsX121.setStatus('current')
alps_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 2, 1, 2), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsIpAddress.setStatus('current')
alps_x121_to_ip_trans_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 95, 1, 6, 2, 1, 3), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
alpsX121ToIpTransRowStatus.setStatus('current')
cisco_alps_mib_notification_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 2))
cisco_alps_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0))
alps_peer_status_change = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0, 1)).setObjects(('CISCO-ALPS-MIB', 'alpsRemPeerState'))
if mibBuilder.loadTexts:
alpsPeerStatusChange.setStatus('deprecated')
alps_ckt_status_change = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0, 2)).setObjects(('CISCO-ALPS-MIB', 'alpsCktBaseState'))
if mibBuilder.loadTexts:
alpsCktStatusChange.setStatus('current')
alps_ascu_status_change = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0, 3)).setObjects(('CISCO-ALPS-MIB', 'alpsAscuState'))
if mibBuilder.loadTexts:
alpsAscuStatusChange.setStatus('current')
alps_peer_conn_status_change = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0, 4)).setObjects(('CISCO-ALPS-MIB', 'alpsRemPeerConnState'))
if mibBuilder.loadTexts:
alpsPeerConnStatusChange.setStatus('current')
alps_ckt_open_failure = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0, 5)).setObjects(('CISCO-ALPS-MIB', 'alpsCktBaseDownReason'))
if mibBuilder.loadTexts:
alpsCktOpenFailure.setStatus('current')
alps_ckt_partial_reject = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 95, 2, 0, 6)).setObjects(('CISCO-ALPS-MIB', 'alpsCktAscuIfIndex'), ('CISCO-ALPS-MIB', 'alpsCktAscuId'))
if mibBuilder.loadTexts:
alpsCktPartialReject.setStatus('current')
alps_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 3))
alps_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 1))
alps_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2))
alps_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 1, 1)).setObjects(('CISCO-ALPS-MIB', 'alpsPeerGroup'), ('CISCO-ALPS-MIB', 'alpsCktGroup'), ('CISCO-ALPS-MIB', 'alpsIfP1024Group'), ('CISCO-ALPS-MIB', 'alpsIfHostlinkGroup'), ('CISCO-ALPS-MIB', 'alpsAscuGroup'), ('CISCO-ALPS-MIB', 'alpsSvcMsgGroup'), ('CISCO-ALPS-MIB', 'alpsAddrTransGroup'), ('CISCO-ALPS-MIB', 'alpsNotificationGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_mib_compliance = alpsMibCompliance.setStatus('deprecated')
alps_mib_compliance_rev1 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 1, 2)).setObjects(('CISCO-ALPS-MIB', 'alpsCktGroup'), ('CISCO-ALPS-MIB', 'alpsIfP1024Group'), ('CISCO-ALPS-MIB', 'alpsIfHostlinkGroup'), ('CISCO-ALPS-MIB', 'alpsAscuGroup'), ('CISCO-ALPS-MIB', 'alpsSvcMsgGroup'), ('CISCO-ALPS-MIB', 'alpsAddrTransGroup'), ('CISCO-ALPS-MIB', 'alpsPeerGroupRev1'), ('CISCO-ALPS-MIB', 'alpsNotificationGroupRev1'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_mib_compliance_rev1 = alpsMibComplianceRev1.setStatus('deprecated')
alps_mib_compliance_rev2 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 1, 3)).setObjects(('CISCO-ALPS-MIB', 'alpsCktGroup'), ('CISCO-ALPS-MIB', 'alpsIfP1024GroupRev1'), ('CISCO-ALPS-MIB', 'alpsIfHostlinkGroup'), ('CISCO-ALPS-MIB', 'alpsAscuGroupRev1'), ('CISCO-ALPS-MIB', 'alpsSvcMsgGroup'), ('CISCO-ALPS-MIB', 'alpsAddrTransGroup'), ('CISCO-ALPS-MIB', 'alpsPeerGroupRev1'), ('CISCO-ALPS-MIB', 'alpsNotificationGroupRev2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_mib_compliance_rev2 = alpsMibComplianceRev2.setStatus('current')
alps_peer_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 1)).setObjects(('CISCO-ALPS-MIB', 'alpsPeerLocalIpAddr'), ('CISCO-ALPS-MIB', 'alpsPeerLocalAtpPort'), ('CISCO-ALPS-MIB', 'alpsPeerKeepaliveTimeout'), ('CISCO-ALPS-MIB', 'alpsPeerKeepaliveMaxRetries'), ('CISCO-ALPS-MIB', 'alpsPeerInCallsAcceptFlag'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnType'), ('CISCO-ALPS-MIB', 'alpsRemPeerLocalPort'), ('CISCO-ALPS-MIB', 'alpsRemPeerRemotePort'), ('CISCO-ALPS-MIB', 'alpsRemPeerState'), ('CISCO-ALPS-MIB', 'alpsRemPeerUptime'), ('CISCO-ALPS-MIB', 'alpsRemPeerNumActiveCkts'), ('CISCO-ALPS-MIB', 'alpsRemPeerIdleTimer'), ('CISCO-ALPS-MIB', 'alpsRemPeerAlarmsEnabled'), ('CISCO-ALPS-MIB', 'alpsRemPeerTCPQlen'), ('CISCO-ALPS-MIB', 'alpsRemPeerOutPackets'), ('CISCO-ALPS-MIB', 'alpsRemPeerOutOctets'), ('CISCO-ALPS-MIB', 'alpsRemPeerInPackets'), ('CISCO-ALPS-MIB', 'alpsRemPeerInOctets'), ('CISCO-ALPS-MIB', 'alpsRemPeerDropsGiant'), ('CISCO-ALPS-MIB', 'alpsRemPeerDropsQFull'), ('CISCO-ALPS-MIB', 'alpsRemPeerDropsPeerUnreach'), ('CISCO-ALPS-MIB', 'alpsRemPeerRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_peer_group = alpsPeerGroup.setStatus('deprecated')
alps_ckt_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 2)).setObjects(('CISCO-ALPS-MIB', 'alpsCktBasePriPeerAddr'), ('CISCO-ALPS-MIB', 'alpsCktBaseAlarmsEnabled'), ('CISCO-ALPS-MIB', 'alpsCktBaseConnType'), ('CISCO-ALPS-MIB', 'alpsCktBaseState'), ('CISCO-ALPS-MIB', 'alpsCktBaseNumActiveAscus'), ('CISCO-ALPS-MIB', 'alpsCktBaseCurrentPeer'), ('CISCO-ALPS-MIB', 'alpsCktBaseLifeTimeTimer'), ('CISCO-ALPS-MIB', 'alpsCktBaseHostLinkNumber'), ('CISCO-ALPS-MIB', 'alpsCktBaseHostLinkType'), ('CISCO-ALPS-MIB', 'alpsCktBaseRemHld'), ('CISCO-ALPS-MIB', 'alpsCktBaseLocalHld'), ('CISCO-ALPS-MIB', 'alpsCktBaseDownReason'), ('CISCO-ALPS-MIB', 'alpsCktBaseOutPackets'), ('CISCO-ALPS-MIB', 'alpsCktBaseOutOctets'), ('CISCO-ALPS-MIB', 'alpsCktBaseInPackets'), ('CISCO-ALPS-MIB', 'alpsCktBaseInOctets'), ('CISCO-ALPS-MIB', 'alpsCktBaseDropsCktDisabled'), ('CISCO-ALPS-MIB', 'alpsCktBaseDropsQOverflow'), ('CISCO-ALPS-MIB', 'alpsCktBaseDropsLifeTimeExpd'), ('CISCO-ALPS-MIB', 'alpsCktBaseEnabled'), ('CISCO-ALPS-MIB', 'alpsCktBaseRowStatus'), ('CISCO-ALPS-MIB', 'alpsCktX25IfIndex'), ('CISCO-ALPS-MIB', 'alpsCktX25LCN'), ('CISCO-ALPS-MIB', 'alpsCktX25HostX121'), ('CISCO-ALPS-MIB', 'alpsCktX25RemoteX121'), ('CISCO-ALPS-MIB', 'alpsCktX25DropsVcReset'), ('CISCO-ALPS-MIB', 'alpsCktP1024BackupPeerAddr'), ('CISCO-ALPS-MIB', 'alpsCktP1024RetryTimer'), ('CISCO-ALPS-MIB', 'alpsCktP1024IdleTimer'), ('CISCO-ALPS-MIB', 'alpsCktP1024EmtoxX121'), ('CISCO-ALPS-MIB', 'alpsCktP1024Ax25LCN'), ('CISCO-ALPS-MIB', 'alpsCktP1024WinOut'), ('CISCO-ALPS-MIB', 'alpsCktP1024WinIn'), ('CISCO-ALPS-MIB', 'alpsCktP1024OutPktSize'), ('CISCO-ALPS-MIB', 'alpsCktP1024InPktSize'), ('CISCO-ALPS-MIB', 'alpsCktP1024SvcMsgList'), ('CISCO-ALPS-MIB', 'alpsCktP1024SvcMsgIntvl'), ('CISCO-ALPS-MIB', 'alpsCktP1024DropsUnkAscu'), ('CISCO-ALPS-MIB', 'alpsCktP1024RowStatus'), ('CISCO-ALPS-MIB', 'alpsCktAscuIfIndex'), ('CISCO-ALPS-MIB', 'alpsCktAscuId'), ('CISCO-ALPS-MIB', 'alpsCktAscuStatus'), ('CISCO-ALPS-MIB', 'alpsCktBaseCurrPeerConnId'), ('CISCO-ALPS-MIB', 'alpsCktP1024MatipCloseDelay'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_ckt_group = alpsCktGroup.setStatus('current')
alps_if_p1024_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 3)).setObjects(('CISCO-ALPS-MIB', 'alpsIfP1024EncapType'), ('CISCO-ALPS-MIB', 'alpsIfP1024PollRespTimeout'), ('CISCO-ALPS-MIB', 'alpsIfP1024GATimeout'), ('CISCO-ALPS-MIB', 'alpsIfP1024PollPauseTimeout'), ('CISCO-ALPS-MIB', 'alpsIfP1024MaxErrCnt'), ('CISCO-ALPS-MIB', 'alpsIfP1024MaxRetrans'), ('CISCO-ALPS-MIB', 'alpsIfP1024CurrErrCnt'), ('CISCO-ALPS-MIB', 'alpsIfP1024MinGoodPollResp'), ('CISCO-ALPS-MIB', 'alpsIfP1024PollingRatio'), ('CISCO-ALPS-MIB', 'alpsIfP1024NumAscus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_if_p1024_group = alpsIfP1024Group.setStatus('deprecated')
alps_if_hostlink_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 4)).setObjects(('CISCO-ALPS-MIB', 'alpsIfHLinkX25ProtocolType'), ('CISCO-ALPS-MIB', 'alpsIfHLinkAx25PvcDamp'), ('CISCO-ALPS-MIB', 'alpsIfHLinkEmtoxHostX121'), ('CISCO-ALPS-MIB', 'alpsIfHLinkActiveCkts'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_if_hostlink_group = alpsIfHostlinkGroup.setStatus('current')
alps_ascu_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 5)).setObjects(('CISCO-ALPS-MIB', 'alpsAscuA1'), ('CISCO-ALPS-MIB', 'alpsAscuA2'), ('CISCO-ALPS-MIB', 'alpsAscuCktName'), ('CISCO-ALPS-MIB', 'alpsAscuAlarmsEnabled'), ('CISCO-ALPS-MIB', 'alpsAscuRetryOption'), ('CISCO-ALPS-MIB', 'alpsAscuMaxMsgLength'), ('CISCO-ALPS-MIB', 'alpsAscuFwdStatusOption'), ('CISCO-ALPS-MIB', 'alpsAscuState'), ('CISCO-ALPS-MIB', 'alpsAscuDownReason'), ('CISCO-ALPS-MIB', 'alpsAscuOutPackets'), ('CISCO-ALPS-MIB', 'alpsAscuOutOctets'), ('CISCO-ALPS-MIB', 'alpsAscuInPackets'), ('CISCO-ALPS-MIB', 'alpsAscuInOctets'), ('CISCO-ALPS-MIB', 'alpsAscuDropsGarbledPkts'), ('CISCO-ALPS-MIB', 'alpsAscuDropsAscuDown'), ('CISCO-ALPS-MIB', 'alpsAscuDropsAscuDisabled'), ('CISCO-ALPS-MIB', 'alpsAscuEnabled'), ('CISCO-ALPS-MIB', 'alpsAscuRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_ascu_group = alpsAscuGroup.setStatus('deprecated')
alps_svc_msg_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 6)).setObjects(('CISCO-ALPS-MIB', 'alpsSvcMsg'), ('CISCO-ALPS-MIB', 'alpsSvcMsgRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_svc_msg_group = alpsSvcMsgGroup.setStatus('current')
alps_addr_trans_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 7)).setObjects(('CISCO-ALPS-MIB', 'alpsIpAddress'), ('CISCO-ALPS-MIB', 'alpsX121ToIpTransRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_addr_trans_group = alpsAddrTransGroup.setStatus('current')
alps_peer_group_rev1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 9)).setObjects(('CISCO-ALPS-MIB', 'alpsPeerLocalIpAddr'), ('CISCO-ALPS-MIB', 'alpsPeerLocalAtpPort'), ('CISCO-ALPS-MIB', 'alpsPeerKeepaliveTimeout'), ('CISCO-ALPS-MIB', 'alpsPeerKeepaliveMaxRetries'), ('CISCO-ALPS-MIB', 'alpsPeerInCallsAcceptFlag'), ('CISCO-ALPS-MIB', 'alpsRemPeerCfgActivation'), ('CISCO-ALPS-MIB', 'alpsRemPeerCfgTCPQLen'), ('CISCO-ALPS-MIB', 'alpsRemPeerCfgIdleTimer'), ('CISCO-ALPS-MIB', 'alpsRemPeerCfgNoCircTimer'), ('CISCO-ALPS-MIB', 'alpsRemPeerCfgAlarmsOn'), ('CISCO-ALPS-MIB', 'alpsRemPeerCfgStatIntvl'), ('CISCO-ALPS-MIB', 'alpsRemPeerCfgStatRetry'), ('CISCO-ALPS-MIB', 'alpsRemPeerCfgRowStatus'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnLocalPort'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnForeignPort'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnState'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnProtocol'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnCreation'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnActivation'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnUptime'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnNumActCirc'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnLastTxRx'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnLastRxAny'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnIdleTimer'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnNoCircTimer'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnTCPQLen'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnAlarmsOn'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnStatIntvl'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnStatRetry'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnDownReason'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnOutPackets'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnOutOctets'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnInPackets'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnInOctets'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnDropsGiant'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnDropsQFull'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnDropsUnreach'), ('CISCO-ALPS-MIB', 'alpsRemPeerConnDropsVersion'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_peer_group_rev1 = alpsPeerGroupRev1.setStatus('current')
alps_if_p1024_group_rev1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 11)).setObjects(('CISCO-ALPS-MIB', 'alpsIfP1024EncapType'), ('CISCO-ALPS-MIB', 'alpsIfP1024PollRespTimeout'), ('CISCO-ALPS-MIB', 'alpsIfP1024GATimeout'), ('CISCO-ALPS-MIB', 'alpsIfP1024PollPauseTimeout'), ('CISCO-ALPS-MIB', 'alpsIfP1024MaxErrCnt'), ('CISCO-ALPS-MIB', 'alpsIfP1024MaxRetrans'), ('CISCO-ALPS-MIB', 'alpsIfP1024CurrErrCnt'), ('CISCO-ALPS-MIB', 'alpsIfP1024MinGoodPollResp'), ('CISCO-ALPS-MIB', 'alpsIfP1024PollingRatio'), ('CISCO-ALPS-MIB', 'alpsIfP1024NumAscus'), ('CISCO-ALPS-MIB', 'alpsIfP1024ServMsgFormat'), ('CISCO-ALPS-MIB', 'alpsIfP1024ServMsgStatusChange'), ('CISCO-ALPS-MIB', 'alpsIfP1024ServMsgDropTermAddr'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_if_p1024_group_rev1 = alpsIfP1024GroupRev1.setStatus('current')
alps_ascu_group_rev1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 12)).setObjects(('CISCO-ALPS-MIB', 'alpsAscuA1'), ('CISCO-ALPS-MIB', 'alpsAscuA2'), ('CISCO-ALPS-MIB', 'alpsAscuCktName'), ('CISCO-ALPS-MIB', 'alpsAscuAlarmsEnabled'), ('CISCO-ALPS-MIB', 'alpsAscuRetryOption'), ('CISCO-ALPS-MIB', 'alpsAscuMaxMsgLength'), ('CISCO-ALPS-MIB', 'alpsAscuFwdStatusOption'), ('CISCO-ALPS-MIB', 'alpsAscuState'), ('CISCO-ALPS-MIB', 'alpsAscuDownReason'), ('CISCO-ALPS-MIB', 'alpsAscuOutPackets'), ('CISCO-ALPS-MIB', 'alpsAscuOutOctets'), ('CISCO-ALPS-MIB', 'alpsAscuInPackets'), ('CISCO-ALPS-MIB', 'alpsAscuInOctets'), ('CISCO-ALPS-MIB', 'alpsAscuDropsGarbledPkts'), ('CISCO-ALPS-MIB', 'alpsAscuDropsAscuDown'), ('CISCO-ALPS-MIB', 'alpsAscuDropsAscuDisabled'), ('CISCO-ALPS-MIB', 'alpsAscuEnabled'), ('CISCO-ALPS-MIB', 'alpsAscuRowStatus'), ('CISCO-ALPS-MIB', 'alpsAscuAutoReset'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_ascu_group_rev1 = alpsAscuGroupRev1.setStatus('current')
alps_notification_group = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 8)).setObjects(('CISCO-ALPS-MIB', 'alpsPeerStatusChange'), ('CISCO-ALPS-MIB', 'alpsCktStatusChange'), ('CISCO-ALPS-MIB', 'alpsAscuStatusChange'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_notification_group = alpsNotificationGroup.setStatus('obsolete')
alps_notification_group_rev1 = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 10)).setObjects(('CISCO-ALPS-MIB', 'alpsCktStatusChange'), ('CISCO-ALPS-MIB', 'alpsAscuStatusChange'), ('CISCO-ALPS-MIB', 'alpsPeerConnStatusChange'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_notification_group_rev1 = alpsNotificationGroupRev1.setStatus('deprecated')
alps_notification_group_rev2 = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 95, 3, 2, 13)).setObjects(('CISCO-ALPS-MIB', 'alpsCktStatusChange'), ('CISCO-ALPS-MIB', 'alpsAscuStatusChange'), ('CISCO-ALPS-MIB', 'alpsPeerConnStatusChange'), ('CISCO-ALPS-MIB', 'alpsCktOpenFailure'), ('CISCO-ALPS-MIB', 'alpsCktPartialReject'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
alps_notification_group_rev2 = alpsNotificationGroupRev2.setStatus('current')
mibBuilder.exportSymbols('CISCO-ALPS-MIB', alpsIfObjects=alpsIfObjects, alpsCktP1024MatipCloseDelay=alpsCktP1024MatipCloseDelay, alpsRemPeerConnCreation=alpsRemPeerConnCreation, alpsRemPeerCfgTCPQLen=alpsRemPeerCfgTCPQLen, alpsRemPeerCfgAlarmsOn=alpsRemPeerCfgAlarmsOn, alpsNotificationGroupRev2=alpsNotificationGroupRev2, alpsPeerGroupRev1=alpsPeerGroupRev1, alpsAscuObjects=alpsAscuObjects, alpsCktP1024BackupPeerAddr=alpsCktP1024BackupPeerAddr, alpsCktAscuTable=alpsCktAscuTable, alpsAscuMaxMsgLength=alpsAscuMaxMsgLength, alpsIfP1024Group=alpsIfP1024Group, alpsRemPeerConnStatIntvl=alpsRemPeerConnStatIntvl, alpsAscuA2=alpsAscuA2, alpsIfHLinkX25ProtocolType=alpsIfHLinkX25ProtocolType, alpsRemPeerConnAlarmsOn=alpsRemPeerConnAlarmsOn, alpsCktX25LCN=alpsCktX25LCN, alpsCktBaseHostLinkType=alpsCktBaseHostLinkType, alpsIfHLinkActiveCkts=alpsIfHLinkActiveCkts, alpsRemPeerCfgRowStatus=alpsRemPeerCfgRowStatus, alpsPeer=alpsPeer, alpsRemPeerCfgActivation=alpsRemPeerCfgActivation, alpsRemPeerConnInOctets=alpsRemPeerConnInOctets, alpsCktBaseTable=alpsCktBaseTable, alpsRemPeerConnDropsUnreach=alpsRemPeerConnDropsUnreach, alpsAscuRetryOption=alpsAscuRetryOption, alpsCktP1024WinOut=alpsCktP1024WinOut, alpsCktBaseLocalHld=alpsCktBaseLocalHld, alpsRemPeerUptime=alpsRemPeerUptime, alpsCktBaseDlcType=alpsCktBaseDlcType, alpsCktBaseState=alpsCktBaseState, alpsSvcMsgEntry=alpsSvcMsgEntry, alpsSvcMsgNum=alpsSvcMsgNum, alpsIfP1024Entry=alpsIfP1024Entry, alpsCktBaseCurrPeerConnId=alpsCktBaseCurrPeerConnId, alpsPeerInCallsAcceptFlag=alpsPeerInCallsAcceptFlag, alpsRemPeerConnUptime=alpsRemPeerConnUptime, alpsAscuDownReason=alpsAscuDownReason, alpsIfHLinkHostHld=alpsIfHLinkHostHld, alpsAscuInPackets=alpsAscuInPackets, alpsRemPeerConnInPackets=alpsRemPeerConnInPackets, alpsRemPeerCfgEntry=alpsRemPeerCfgEntry, alpsRemPeerConnProtocol=alpsRemPeerConnProtocol, alpsRemPeerDropsPeerUnreach=alpsRemPeerDropsPeerUnreach, ciscoAlpsMIB=ciscoAlpsMIB, alpsRemPeerConnNoCircTimer=alpsRemPeerConnNoCircTimer, alpsCktP1024InPktSize=alpsCktP1024InPktSize, alpsAscuDropsGarbledPkts=alpsAscuDropsGarbledPkts, alpsX121=alpsX121, alpsRemPeerConnDropsQFull=alpsRemPeerConnDropsQFull, alpsRemPeerOutPackets=alpsRemPeerOutPackets, alpsRemPeerConnState=alpsRemPeerConnState, alpsRemPeerConnIdString=alpsRemPeerConnIdString, alpsIfHLinkAx25PvcDamp=alpsIfHLinkAx25PvcDamp, alpsCktP1024RowStatus=alpsCktP1024RowStatus, alpsIfP1024Table=alpsIfP1024Table, alpsMibComplianceRev2=alpsMibComplianceRev2, alpsCktGroup=alpsCktGroup, alpsCktBaseOutPackets=alpsCktBaseOutPackets, alpsAscuAutoReset=alpsAscuAutoReset, alpsMibConformance=alpsMibConformance, alpsCktP1024Entry=alpsCktP1024Entry, alpsNotificationGroupRev1=alpsNotificationGroupRev1, alpsRemPeerCfgNoCircTimer=alpsRemPeerCfgNoCircTimer, alpsRemPeerRowStatus=alpsRemPeerRowStatus, alpsRemPeerConnActivation=alpsRemPeerConnActivation, alpsAscuA1=alpsAscuA1, alpsIfP1024CurrErrCnt=alpsIfP1024CurrErrCnt, alpsRemPeerDropsGiant=alpsRemPeerDropsGiant, alpsAscuFwdStatusOption=alpsAscuFwdStatusOption, alpsPeerObjects=alpsPeerObjects, alpsCktP1024IdleTimer=alpsCktP1024IdleTimer, alpsIfHLinkEntry=alpsIfHLinkEntry, alpsRemPeerConnTable=alpsRemPeerConnTable, alpsAscuDropsAscuDisabled=alpsAscuDropsAscuDisabled, alpsIfHLinkTable=alpsIfHLinkTable, alpsCktAscuEntry=alpsCktAscuEntry, alpsRemPeerState=alpsRemPeerState, alpsCktBaseName=alpsCktBaseName, alpsCktObjects=alpsCktObjects, alpsMibComplianceRev1=alpsMibComplianceRev1, alpsRemPeerInPackets=alpsRemPeerInPackets, alpsRemPeerConnOutOctets=alpsRemPeerConnOutOctets, alpsPeerKeepaliveMaxRetries=alpsPeerKeepaliveMaxRetries, alpsCktAscuA1=alpsCktAscuA1, alpsRemPeerRemotePort=alpsRemPeerRemotePort, alpsRemPeerIdleTimer=alpsRemPeerIdleTimer, alpsRemPeerConnDropsGiant=alpsRemPeerConnDropsGiant, alpsAscuAlarmsEnabled=alpsAscuAlarmsEnabled, alpsCktBaseLifeTimeTimer=alpsCktBaseLifeTimeTimer, alpsCktAscuId=alpsCktAscuId, alpsRemPeerInOctets=alpsRemPeerInOctets, alpsAscuState=alpsAscuState, alpsAscuInOctets=alpsAscuInOctets, alpsRemPeerConnIpAddr=alpsRemPeerConnIpAddr, alpsCktP1024WinIn=alpsCktP1024WinIn, alpsRemPeerConnDropsVersion=alpsRemPeerConnDropsVersion, alpsIfP1024ServMsgStatusChange=alpsIfP1024ServMsgStatusChange, alpsRemPeerCfgIpAddr=alpsRemPeerCfgIpAddr, ciscoAlpsMIBNotificationPrefix=ciscoAlpsMIBNotificationPrefix, alpsIfP1024MaxErrCnt=alpsIfP1024MaxErrCnt, alpsIfP1024PollingRatio=alpsIfP1024PollingRatio, alpsRemPeerConnLastTxRx=alpsRemPeerConnLastTxRx, alpsAscuEntry=alpsAscuEntry, alpsRemPeerConnTCPQLen=alpsRemPeerConnTCPQLen, alpsCktX25Entry=alpsCktX25Entry, alpsIfP1024MaxRetrans=alpsIfP1024MaxRetrans, alpsX121ToIpTransRowStatus=alpsX121ToIpTransRowStatus, alpsSvcMsgRowStatus=alpsSvcMsgRowStatus, alpsSvcMsgGroup=alpsSvcMsgGroup, alpsCktBaseHostLinkNumber=alpsCktBaseHostLinkNumber, alpsCktBaseRemHld=alpsCktBaseRemHld, alpsIfP1024ServMsgFormat=alpsIfP1024ServMsgFormat, PYSNMP_MODULE_ID=ciscoAlpsMIB, alpsIfP1024ServMsgDropTermAddr=alpsIfP1024ServMsgDropTermAddr, alpsCktP1024OutPktSize=alpsCktP1024OutPktSize, alpsAscuCktName=alpsAscuCktName, alpsPeerConnStatusChange=alpsPeerConnStatusChange, alpsIfP1024PollPauseTimeout=alpsIfP1024PollPauseTimeout, alpsCktBaseEnabled=alpsCktBaseEnabled, alpsAscuId=alpsAscuId, alpsMibGroups=alpsMibGroups, alpsCktOpenFailure=alpsCktOpenFailure, alpsCktP1024RetryTimer=alpsCktP1024RetryTimer, alpsRemPeerCfgProtocol=alpsRemPeerCfgProtocol, alpsIpAddress=alpsIpAddress, alpsAddrTransGroup=alpsAddrTransGroup, alpsRemPeerConnLastRxAny=alpsRemPeerConnLastRxAny, alpsCktBaseInPackets=alpsCktBaseInPackets, alpsX121ToIpTransTable=alpsX121ToIpTransTable, alpsCktP1024SvcMsgIntvl=alpsCktP1024SvcMsgIntvl, alpsRemPeerNumActiveCkts=alpsRemPeerNumActiveCkts, alpsRemPeerTCPQlen=alpsRemPeerTCPQlen, alpsCktX25HostX121=alpsCktX25HostX121, alpsRemPeerCfgIdleTimer=alpsRemPeerCfgIdleTimer, alpsIfHLinkNumber=alpsIfHLinkNumber, alpsIfP1024PollRespTimeout=alpsIfP1024PollRespTimeout, alpsRemPeerCfgStatRetry=alpsRemPeerCfgStatRetry, alpsIfP1024NumAscus=alpsIfP1024NumAscus, alpsX121ToIpTransEntry=alpsX121ToIpTransEntry, alpsCktPartialReject=alpsCktPartialReject, alpsAscuRowStatus=alpsAscuRowStatus, alpsMibCompliances=alpsMibCompliances, alpsAscuEnabled=alpsAscuEnabled, alpsGroups=alpsGroups, alpsRemPeerConnIdleTimer=alpsRemPeerConnIdleTimer, alpsPeerStatusChange=alpsPeerStatusChange, alpsCktBaseNumActiveAscus=alpsCktBaseNumActiveAscus, alpsIfP1024EncapType=alpsIfP1024EncapType, alpsCktBaseDownReason=alpsCktBaseDownReason, alpsSvcMsg=alpsSvcMsg, alpsCktX25DropsVcReset=alpsCktX25DropsVcReset, alpsCktBaseEntry=alpsCktBaseEntry, alpsMibCompliance=alpsMibCompliance, alpsCktAscuIfIndex=alpsCktAscuIfIndex, alpsCktStatusChange=alpsCktStatusChange, alpsCktP1024SvcMsgList=alpsCktP1024SvcMsgList, alpsAscuGroupRev1=alpsAscuGroupRev1, alpsRemPeerConnNumActCirc=alpsRemPeerConnNumActCirc, alpsCktP1024DlcType=alpsCktP1024DlcType, alpsRemPeerConnDownReason=alpsRemPeerConnDownReason, alpsRemPeerOutOctets=alpsRemPeerOutOctets, alpsCktBaseInOctets=alpsCktBaseInOctets, ciscoAlpsMIBNotifications=ciscoAlpsMIBNotifications, alpsIfP1024MinGoodPollResp=alpsIfP1024MinGoodPollResp, alpsAscuStatusChange=alpsAscuStatusChange, alpsAscuDropsAscuDown=alpsAscuDropsAscuDown, alpsGlobalObjects=alpsGlobalObjects, alpsPeerLocalAtpPort=alpsPeerLocalAtpPort, alpsRemPeerConnLocalPort=alpsRemPeerConnLocalPort, alpsCktBaseConnType=alpsCktBaseConnType, alpsCktX25IfIndex=alpsCktX25IfIndex, alpsSvcMsgListNum=alpsSvcMsgListNum, alpsCktBaseOutOctets=alpsCktBaseOutOctets, alpsCktBaseRowStatus=alpsCktBaseRowStatus, AlpsCktName=AlpsCktName, alpsCktBaseAlarmsEnabled=alpsCktBaseAlarmsEnabled, alpsCktBasePriPeerAddr=alpsCktBasePriPeerAddr, alpsRemPeerConnType=alpsRemPeerConnType, alpsRemPeerCfgTable=alpsRemPeerCfgTable, alpsCktBaseCurrentPeer=alpsCktBaseCurrentPeer, alpsCktP1024EmtoxX121=alpsCktP1024EmtoxX121, alpsCktP1024Ax25LCN=alpsCktP1024Ax25LCN, alpsAscuOutOctets=alpsAscuOutOctets, alpsAscuOutPackets=alpsAscuOutPackets, alpsCktAscuA2=alpsCktAscuA2, alpsIfHLinkEmtoxHostX121=alpsIfHLinkEmtoxHostX121, alpsRemPeerAlarmsEnabled=alpsRemPeerAlarmsEnabled, alpsCktBaseDropsCktDisabled=alpsCktBaseDropsCktDisabled, alpsPeerKeepaliveTimeout=alpsPeerKeepaliveTimeout, alpsPeerLocalIpAddr=alpsPeerLocalIpAddr, alpsRemPeerCfgStatIntvl=alpsRemPeerCfgStatIntvl, alpsRemPeerConnOutPackets=alpsRemPeerConnOutPackets, alpsRemPeerConnForeignPort=alpsRemPeerConnForeignPort, alpsCktX25DlcType=alpsCktX25DlcType, alpsPeerGroup=alpsPeerGroup, alpsCktAscuStatus=alpsCktAscuStatus, alpsRemPeerTable=alpsRemPeerTable, alpsRemPeerIpAddr=alpsRemPeerIpAddr, alpsRemPeerConnEntry=alpsRemPeerConnEntry, alpsCktBaseDropsLifeTimeExpd=alpsCktBaseDropsLifeTimeExpd, alpsCktAscuCktName=alpsCktAscuCktName, alpsIfP1024GroupRev1=alpsIfP1024GroupRev1, AlpsAscuA1A2Value=AlpsAscuA1A2Value, ciscoAlpsMIBObjects=ciscoAlpsMIBObjects, alpsNotificationGroup=alpsNotificationGroup, alpsCktP1024DropsUnkAscu=alpsCktP1024DropsUnkAscu, alpsRemPeerLocalPort=alpsRemPeerLocalPort, alpsCktBaseDropsQOverflow=alpsCktBaseDropsQOverflow, alpsCktX25RemoteX121=alpsCktX25RemoteX121, alpsRemPeerConnStatRetry=alpsRemPeerConnStatRetry, alpsAscuTable=alpsAscuTable, alpsCktP1024Table=alpsCktP1024Table, alpsSvcMsgTable=alpsSvcMsgTable, alpsRemPeerEntry=alpsRemPeerEntry, alpsAscuGroup=alpsAscuGroup, alpsIfP1024GATimeout=alpsIfP1024GATimeout, alpsCktAscuCktDlcType=alpsCktAscuCktDlcType, alpsIfHostlinkGroup=alpsIfHostlinkGroup, alpsRemPeerDropsQFull=alpsRemPeerDropsQFull, alpsCktX25Table=alpsCktX25Table) |
load("@bazel_skylib//lib:types.bzl", "types")
load("//rules:library.bzl", "write_file")
load("//rules/library:xcconfig.bzl", "build_setting_name")
def write_info_plists_if_needed(name, plists):
"""
Writes info plists for a bundle if needed.
Given a list of infoplists, will write out any plists that are passed as a
dict, and will add a default app Info.plist if no non-dict plists are passed.
Args:
name: The name of the bundle target these infoplists are for.
plists: A list of either labels or dicts.
"""
already_written_plists = []
written_plists = []
for idx, plist in enumerate(plists):
if types.is_dict(plist):
plist_name = "{name}.infoplist.{idx}".format(name = name, idx = idx)
write_file(
name = plist_name,
destination = plist_name + ".plist",
content = struct(**plist).to_json(),
)
written_plists.append(plist_name)
else:
already_written_plists.append(plist)
if not already_written_plists:
already_written_plists.append("@build_bazel_rules_ios//rules/test_host_app:Info.plist")
return already_written_plists + written_plists
def info_plists_by_setting(*, name, infoplists_by_build_setting, default_infoplists):
infoplists_by_build_setting = dict(infoplists_by_build_setting)
for (build_setting, plists) in infoplists_by_build_setting.items():
name_suffix = build_setting_name(build_setting)
infoplists_by_build_setting[build_setting] = write_info_plists_if_needed(name = "%s.%s" % (name, name_suffix), plists = plists)
default_infoplists = infoplists_by_build_setting.get("//conditions:default", default_infoplists)
infoplists_by_build_setting["//conditions:default"] = write_info_plists_if_needed(name = name, plists = default_infoplists)
return select(infoplists_by_build_setting)
| load('@bazel_skylib//lib:types.bzl', 'types')
load('//rules:library.bzl', 'write_file')
load('//rules/library:xcconfig.bzl', 'build_setting_name')
def write_info_plists_if_needed(name, plists):
"""
Writes info plists for a bundle if needed.
Given a list of infoplists, will write out any plists that are passed as a
dict, and will add a default app Info.plist if no non-dict plists are passed.
Args:
name: The name of the bundle target these infoplists are for.
plists: A list of either labels or dicts.
"""
already_written_plists = []
written_plists = []
for (idx, plist) in enumerate(plists):
if types.is_dict(plist):
plist_name = '{name}.infoplist.{idx}'.format(name=name, idx=idx)
write_file(name=plist_name, destination=plist_name + '.plist', content=struct(**plist).to_json())
written_plists.append(plist_name)
else:
already_written_plists.append(plist)
if not already_written_plists:
already_written_plists.append('@build_bazel_rules_ios//rules/test_host_app:Info.plist')
return already_written_plists + written_plists
def info_plists_by_setting(*, name, infoplists_by_build_setting, default_infoplists):
infoplists_by_build_setting = dict(infoplists_by_build_setting)
for (build_setting, plists) in infoplists_by_build_setting.items():
name_suffix = build_setting_name(build_setting)
infoplists_by_build_setting[build_setting] = write_info_plists_if_needed(name='%s.%s' % (name, name_suffix), plists=plists)
default_infoplists = infoplists_by_build_setting.get('//conditions:default', default_infoplists)
infoplists_by_build_setting['//conditions:default'] = write_info_plists_if_needed(name=name, plists=default_infoplists)
return select(infoplists_by_build_setting) |
PROTEOMIC_RESSOURCE_HEADER = ['Accession']#, 'Corrected_Abundance_Ratio','LOG2(Corrected_Abundance_Ratio)', 'LOG10(Adj.P-val)']
UNIPROT_STRING_MAPPER_RESSOURCE_HEADER = [ 'String_id', 'Uniprot_id' ]
STRING_RESSOURCE_HEADER = ['protein1', 'protein2', 'experimental']
def defineProteomicRessourcHeader(columnLabel):
global PROTEOMIC_RESSOURCE_HEADER
PROTEOMIC_RESSOURCE_HEADER = list( set(PROTEOMIC_RESSOURCE_HEADER) | set([columnLabel]) )
#print(PROTEOMIC_RESSOURCE_HEADER)
def assertValidproteomicRessource(data):
try:
data.columns
except AttributeError as e:
raise ValueError("proteomic Ressource is not a panda frame")
missingHead = set(PROTEOMIC_RESSOURCE_HEADER) - set(data.columns)
if len(missingHead) > 0:
raise ValueError(f"Following columns are missing in proteomic Ressource {missingHead}")
return True
def assertValidGoRessource(data):
try :
for k,v in data.items():
if not k.startswith("GO:"):
raise ValueError(f"Invalid key in GO ressource{k}")
if (not 'Proteins' in v) or (not 'Name' in v):
raise ValueError(f"Invalid pathway key in GO ressource {v}")
except AttributeError as e:
raise ValueError("Go Ressource is not a dictionary")
return True
def assertValidSTRINGRessource(data):
try:
data.columns
except AttributeError as e:
raise ValueError("STRING Ressource is not a panda frame")
missingHead = set(STRING_RESSOURCE_HEADER) - set(data.columns)
if len(missingHead) > 0:
raise ValueError(f"Following columns are missing in STRING ressource {missingHead}")
return True
def assertValidUniprotStringMapper(data):
try:
data.columns
except AttributeError as e:
raise ValueError("UniprotStringMapper Ressource is not a panda frame")
missingHead = set(UNIPROT_STRING_MAPPER_RESSOURCE_HEADER) - set(data.columns)
if len(missingHead) > 0:
raise ValueError(f"Following columns are missing in UniprotStringMapper {missingHead}")
return True | proteomic_ressource_header = ['Accession']
uniprot_string_mapper_ressource_header = ['String_id', 'Uniprot_id']
string_ressource_header = ['protein1', 'protein2', 'experimental']
def define_proteomic_ressourc_header(columnLabel):
global PROTEOMIC_RESSOURCE_HEADER
proteomic_ressource_header = list(set(PROTEOMIC_RESSOURCE_HEADER) | set([columnLabel]))
def assert_validproteomic_ressource(data):
try:
data.columns
except AttributeError as e:
raise value_error('proteomic Ressource is not a panda frame')
missing_head = set(PROTEOMIC_RESSOURCE_HEADER) - set(data.columns)
if len(missingHead) > 0:
raise value_error(f'Following columns are missing in proteomic Ressource {missingHead}')
return True
def assert_valid_go_ressource(data):
try:
for (k, v) in data.items():
if not k.startswith('GO:'):
raise value_error(f'Invalid key in GO ressource{k}')
if not 'Proteins' in v or not 'Name' in v:
raise value_error(f'Invalid pathway key in GO ressource {v}')
except AttributeError as e:
raise value_error('Go Ressource is not a dictionary')
return True
def assert_valid_string_ressource(data):
try:
data.columns
except AttributeError as e:
raise value_error('STRING Ressource is not a panda frame')
missing_head = set(STRING_RESSOURCE_HEADER) - set(data.columns)
if len(missingHead) > 0:
raise value_error(f'Following columns are missing in STRING ressource {missingHead}')
return True
def assert_valid_uniprot_string_mapper(data):
try:
data.columns
except AttributeError as e:
raise value_error('UniprotStringMapper Ressource is not a panda frame')
missing_head = set(UNIPROT_STRING_MAPPER_RESSOURCE_HEADER) - set(data.columns)
if len(missingHead) > 0:
raise value_error(f'Following columns are missing in UniprotStringMapper {missingHead}')
return True |
class Singleton(object):
def __new__(cls, *args, **kargs):
if not hasattr(cls, "_instance"):
cls._instance = super(Singleton, cls).__new__(cls)
return cls._instance
class SeedMng(Singleton):
_root_seed = 0
_system_seed = 0
_tf_graph_seed = 0
_tf_system_seed = 0
_np_seed = 0
_dummy = 0
_julia_seed = []
_start_iteration = 0
_policy_type = ""
def __init__(self):
_dummy = 0
def set_root(self, input):
self._root_seed = input
for i in range(0, 1000):
seed = int(i) * int(210) + int(999)
self._julia_seed.append(seed)
def set_start_iteration(self, iteration):
self._start_iteration = iteration
def set_iteration(self, n_iter):
self._system_seed = self._root_seed + n_iter * 110 + 123
self._tf_graph_seed = self._root_seed + n_iter * 130 + 456
self._tf_system_seed = self._root_seed + n_iter * 170 + 789
self._np_seed = self._root_seed + n_iter * 190 + 369
def get_system_seed(self, id = 0):
return self._system_seed + id
def get_tf_graph_seed(self, id = 0):
return self._tf_graph_seed + id
def get_tf_system_seed(self, id = 0):
return self._tf_system_seed + id
def get_np_seed(self, id = 0):
return self._np_seed + id
def get_julia_seed(self, id = 0):
return self._julia_seed
def get_start_iteration(self):
return self._start_iteration
def set_policy_type(self, type):
self._policy_type = type
def get_policy_type(self):
return self._policy_type
| class Singleton(object):
def __new__(cls, *args, **kargs):
if not hasattr(cls, '_instance'):
cls._instance = super(Singleton, cls).__new__(cls)
return cls._instance
class Seedmng(Singleton):
_root_seed = 0
_system_seed = 0
_tf_graph_seed = 0
_tf_system_seed = 0
_np_seed = 0
_dummy = 0
_julia_seed = []
_start_iteration = 0
_policy_type = ''
def __init__(self):
_dummy = 0
def set_root(self, input):
self._root_seed = input
for i in range(0, 1000):
seed = int(i) * int(210) + int(999)
self._julia_seed.append(seed)
def set_start_iteration(self, iteration):
self._start_iteration = iteration
def set_iteration(self, n_iter):
self._system_seed = self._root_seed + n_iter * 110 + 123
self._tf_graph_seed = self._root_seed + n_iter * 130 + 456
self._tf_system_seed = self._root_seed + n_iter * 170 + 789
self._np_seed = self._root_seed + n_iter * 190 + 369
def get_system_seed(self, id=0):
return self._system_seed + id
def get_tf_graph_seed(self, id=0):
return self._tf_graph_seed + id
def get_tf_system_seed(self, id=0):
return self._tf_system_seed + id
def get_np_seed(self, id=0):
return self._np_seed + id
def get_julia_seed(self, id=0):
return self._julia_seed
def get_start_iteration(self):
return self._start_iteration
def set_policy_type(self, type):
self._policy_type = type
def get_policy_type(self):
return self._policy_type |
dictionary = {"name": "Zara", "age": 7, "class": "First"}
phone_numbers = {"Alice": "2341", "Beth": "9102", "Cecil": "3258"}
empty_dict = {}
print(dictionary)
print(phone_numbers)
print(empty_dict)
| dictionary = {'name': 'Zara', 'age': 7, 'class': 'First'}
phone_numbers = {'Alice': '2341', 'Beth': '9102', 'Cecil': '3258'}
empty_dict = {}
print(dictionary)
print(phone_numbers)
print(empty_dict) |
# Copyright (C) 2015-2019 by Vd.
# This file is part of RocketGram, the modern Telegram bot framework.
# RocketGram is released under the MIT License (see LICENSE).
class ReplyKeyboardRemove:
def __init__(self, *, selective=False):
self.set_selective(selective)
def set_selective(self, selective=False):
self.__selective = selective
return self
def render(self):
keyboard = {'remove_keyboard': True}
if self.__selective:
keyboard['selective'] = True
return keyboard
| class Replykeyboardremove:
def __init__(self, *, selective=False):
self.set_selective(selective)
def set_selective(self, selective=False):
self.__selective = selective
return self
def render(self):
keyboard = {'remove_keyboard': True}
if self.__selective:
keyboard['selective'] = True
return keyboard |
number = input().split()
order = input()
output_number = []
stringed_number = ''
for num in number:
output_number.append(int(num))
sorted_number = sorted(output_number)
if order == 'ABC':
print("{} {} {}".format(sorted_number[0],sorted_number[1],sorted_number[2]))
elif order == 'ACB':
print("{} {} {}".format(sorted_number[0], sorted_number[2], sorted_number[1]))
elif order == 'BAC':
print("{} {} {}".format(sorted_number[1], sorted_number[0], sorted_number[2]))
elif order == 'BCA':
print("{} {} {}".format(sorted_number[1], sorted_number[2], sorted_number[0]))
elif order == 'CAB':
print("{} {} {}".format(sorted_number[2], sorted_number[0], sorted_number[1]))
elif order == 'CBA':
print("{} {} {}".format(sorted_number[2], sorted_number[1], sorted_number[0]))
else:
print("You typed the incorrect format") | number = input().split()
order = input()
output_number = []
stringed_number = ''
for num in number:
output_number.append(int(num))
sorted_number = sorted(output_number)
if order == 'ABC':
print('{} {} {}'.format(sorted_number[0], sorted_number[1], sorted_number[2]))
elif order == 'ACB':
print('{} {} {}'.format(sorted_number[0], sorted_number[2], sorted_number[1]))
elif order == 'BAC':
print('{} {} {}'.format(sorted_number[1], sorted_number[0], sorted_number[2]))
elif order == 'BCA':
print('{} {} {}'.format(sorted_number[1], sorted_number[2], sorted_number[0]))
elif order == 'CAB':
print('{} {} {}'.format(sorted_number[2], sorted_number[0], sorted_number[1]))
elif order == 'CBA':
print('{} {} {}'.format(sorted_number[2], sorted_number[1], sorted_number[0]))
else:
print('You typed the incorrect format') |
# Let's write our own function!
def cheer(player):
return ('Go ' + player + '!')
yell = cheer('Thelma')
print(yell)
yell = cheer('Twi')
print(yell)
# Now combine the steps
print(cheer('Dottie'))
| def cheer(player):
return 'Go ' + player + '!'
yell = cheer('Thelma')
print(yell)
yell = cheer('Twi')
print(yell)
print(cheer('Dottie')) |
class TrieNode:
# Initialize your data structure here.
def __init__(self):
self.edges = dict()
self.word_end = False
class Trie:
def __init__(self):
self.root = TrieNode()
# @param {string} word
# @return {void}
# Inserts a word into the trie.
def insert(self, word):
current = self.root
for c in word:
next_elem = current.edges.get(c)
if next_elem is None:
next_elem = TrieNode()
current.edges[c] = next_elem
current = next_elem
current.word_end = True
# @param {string} word
# @return {boolean}
# Returns if the word is in the trie.
def search(self, word):
end_node = self.traverse(word)
if end_node is None:
return False
return end_node.word_end
def traverse(self, word):
current = self.root
for c in word:
next_elem = current.edges.get(c)
if next_elem is None:
return None
current = next_elem
return current
# @param {string} prefix
# @return {boolean}
# Returns if there is any word in the trie
# that starts with the given prefix.
def startsWith(self, prefix):
end_node = self.traverse(prefix)
if end_node is None:
return False
return True
# Your Trie object will be instantiated and called as such:
# trie = Trie()
# trie.insert("somestring")
# trie.search("key") | class Trienode:
def __init__(self):
self.edges = dict()
self.word_end = False
class Trie:
def __init__(self):
self.root = trie_node()
def insert(self, word):
current = self.root
for c in word:
next_elem = current.edges.get(c)
if next_elem is None:
next_elem = trie_node()
current.edges[c] = next_elem
current = next_elem
current.word_end = True
def search(self, word):
end_node = self.traverse(word)
if end_node is None:
return False
return end_node.word_end
def traverse(self, word):
current = self.root
for c in word:
next_elem = current.edges.get(c)
if next_elem is None:
return None
current = next_elem
return current
def starts_with(self, prefix):
end_node = self.traverse(prefix)
if end_node is None:
return False
return True |
lookup = {'squeezenet1_1': 224, 'vgg16_bn': 224, 'inception_v3': 224, 'resnet18': 224, 'resnet34': 224, 'resnet50': 224, 'resnet101': 224, 'resnet152': 224, 'inceptionresnetv2': 235, 'inceptionresnetv2_avgpool': 235, 'densenet121': 224, 'densenet169': 224, 'nasnetalarge': 224, 'nasnetasmall': 224, 'inceptionv4': 299, 'resnext101_32x4d': 224, 'resnext101_64x4d': 224, 'dpn92': 224, 'xception': 224}
# resnet18, 34, 50, 101
# resnext
# googlenet
# inceptionv3
# irv2
# vgg16
# nas
# squeezenet
# shufflenet
# mobilenet
# densenet
# dual-path net
| lookup = {'squeezenet1_1': 224, 'vgg16_bn': 224, 'inception_v3': 224, 'resnet18': 224, 'resnet34': 224, 'resnet50': 224, 'resnet101': 224, 'resnet152': 224, 'inceptionresnetv2': 235, 'inceptionresnetv2_avgpool': 235, 'densenet121': 224, 'densenet169': 224, 'nasnetalarge': 224, 'nasnetasmall': 224, 'inceptionv4': 299, 'resnext101_32x4d': 224, 'resnext101_64x4d': 224, 'dpn92': 224, 'xception': 224} |
def addMe2Me(x):
return x + x
def self(f, y):
print(f(y))
self(addMe2Me, 2.2) | def add_me2_me(x):
return x + x
def self(f, y):
print(f(y))
self(addMe2Me, 2.2) |
class Solution(object):
def get_manhattan(self, a, b):
return abs(a[0] - b[0]) + abs(a[1] - b[1])
def assignBikes(self, workers, bikes):
"""
:type workers: List[List[int]]
:type bikes: List[List[int]]
:rtype: List[int]
"""
d = dict()
ans = [None] * len(bikes)
for i, worker in enumerate(workers):
for j, bike in enumerate(bikes):
k = self.get_manhattan(a=worker, b=bike)
if d.get(k):
d[k].append((i, j))
else:
d[k] = [(i, j)]
# print(d)
for k in sorted(list(d.keys())):
# print(k)
for v in sorted(d[k]):
i, j = v
# print(i)
if i in ans or ans[j] is not None:
continue
ans[j] = i
print(ans)
S = Solution()
S.assignBikes(workers=[[0, 0], [2, 1]], bikes=[[1, 2], [3, 3]])
| class Solution(object):
def get_manhattan(self, a, b):
return abs(a[0] - b[0]) + abs(a[1] - b[1])
def assign_bikes(self, workers, bikes):
"""
:type workers: List[List[int]]
:type bikes: List[List[int]]
:rtype: List[int]
"""
d = dict()
ans = [None] * len(bikes)
for (i, worker) in enumerate(workers):
for (j, bike) in enumerate(bikes):
k = self.get_manhattan(a=worker, b=bike)
if d.get(k):
d[k].append((i, j))
else:
d[k] = [(i, j)]
for k in sorted(list(d.keys())):
for v in sorted(d[k]):
(i, j) = v
if i in ans or ans[j] is not None:
continue
ans[j] = i
print(ans)
s = solution()
S.assignBikes(workers=[[0, 0], [2, 1]], bikes=[[1, 2], [3, 3]]) |
num = int(input())
l = [str(i*num) for i in range(1,11)]
print (l)
sentence = '\n'.join(l)
print (sentence)
| num = int(input())
l = [str(i * num) for i in range(1, 11)]
print(l)
sentence = '\n'.join(l)
print(sentence) |
pwd = "C:/Users/HP 8460p/Documents/Biology master/En tibi internship/Data/"
in_file = "Structure/structure_table_bases_remapped.str"
out_file = "heterozygosity_table.tsv"
individuals = 115
f_out = open(pwd + out_file, 'w')
f_in = open(pwd + in_file)
# Reading in both sequences from the structure file. The two strands are written on separate lines.
for i in range(individuals):
strand_1 = f_in.readline()
strand_1 = strand_1.split('\t')
strand_2 = f_in.readline()
strand_2 = strand_2.split('\t')
# Storing the individual ID and the Botanical variety
ID = strand_1[4]
Bot_variety = strand_1[5]
Origin = strand_1[1]
# loop to count heterozygous sites
heterozygous = 0
for j in range(6, len(strand_1)):
if strand_1[j] != strand_2[j]:
heterozygous = heterozygous + 1
# Calculating heterozygous/total bases
total_bases = len(strand_1) - 6
heterozygosity = heterozygous/total_bases
# writing data out to file.
if i == 0:
line = '\t'.join(['ID', 'Bot_variety', 'Origin', 'heterozygosity'])
line = line + '\n'
f_out.write(line)
line = '\t'.join([ID, Bot_variety, Origin, str(heterozygosity)])
line = line + '\n'
f_out.write(line) | pwd = 'C:/Users/HP 8460p/Documents/Biology master/En tibi internship/Data/'
in_file = 'Structure/structure_table_bases_remapped.str'
out_file = 'heterozygosity_table.tsv'
individuals = 115
f_out = open(pwd + out_file, 'w')
f_in = open(pwd + in_file)
for i in range(individuals):
strand_1 = f_in.readline()
strand_1 = strand_1.split('\t')
strand_2 = f_in.readline()
strand_2 = strand_2.split('\t')
id = strand_1[4]
bot_variety = strand_1[5]
origin = strand_1[1]
heterozygous = 0
for j in range(6, len(strand_1)):
if strand_1[j] != strand_2[j]:
heterozygous = heterozygous + 1
total_bases = len(strand_1) - 6
heterozygosity = heterozygous / total_bases
if i == 0:
line = '\t'.join(['ID', 'Bot_variety', 'Origin', 'heterozygosity'])
line = line + '\n'
f_out.write(line)
line = '\t'.join([ID, Bot_variety, Origin, str(heterozygosity)])
line = line + '\n'
f_out.write(line) |
'''
Descripttion:
version:
Author: HuSharp
Date: 2021-02-09 12:01:25
LastEditors: HuSharp
LastEditTime: 2021-02-09 12:08:55
@Email: 8211180515@csu.edu.cn
'''
def list_create(n):
'''
>>> list_create(3)
[0, 1]
>>> list_create(4)
[0, 1, 2]
>>> list_create(8)
[0, 1, 2, 4]
>>> list_create(12)
[0, 1, 2, 3, 4, 6]
'''
return [0, 1] + [x for x in range(2, n) if n % x == 0] | """
Descripttion:
version:
Author: HuSharp
Date: 2021-02-09 12:01:25
LastEditors: HuSharp
LastEditTime: 2021-02-09 12:08:55
@Email: 8211180515@csu.edu.cn
"""
def list_create(n):
"""
>>> list_create(3)
[0, 1]
>>> list_create(4)
[0, 1, 2]
>>> list_create(8)
[0, 1, 2, 4]
>>> list_create(12)
[0, 1, 2, 3, 4, 6]
"""
return [0, 1] + [x for x in range(2, n) if n % x == 0] |
# Palindrome Partitioning: Given a string s, partition s, such that every substring of the parition is a palindrome. The goal is to find all possible partitioning of s.
class Solution:
def isPalindrome(self, s, start, end):
while start < end:
if s[start] != s[end]:
return False
start, end = start + 1, end - 1
return True
def dfs(self, s, start, currentList, result):
# if all characters are used, append to result
if start >= len(s):
result.append(currentList[:])
for end in range(start, len(s)):
# check if string is a palindrome
if self.isPalindrome(s, start, end):
# get the substring and add to current list
self.dfs(s, end + 1, currentList + [s[start:end+1]], result)
def partition(self, s):
result = []
self.dfs(s, 0, [], result)
return result
def main():
mySol = Solution()
print("All possible palindrome partitions of aababc are")
print(mySol.partition("aababc"))
if __name__ == "__main__":
main() | class Solution:
def is_palindrome(self, s, start, end):
while start < end:
if s[start] != s[end]:
return False
(start, end) = (start + 1, end - 1)
return True
def dfs(self, s, start, currentList, result):
if start >= len(s):
result.append(currentList[:])
for end in range(start, len(s)):
if self.isPalindrome(s, start, end):
self.dfs(s, end + 1, currentList + [s[start:end + 1]], result)
def partition(self, s):
result = []
self.dfs(s, 0, [], result)
return result
def main():
my_sol = solution()
print('All possible palindrome partitions of aababc are')
print(mySol.partition('aababc'))
if __name__ == '__main__':
main() |
#! /usr/bin/env python3
class ConnectionException(Exception):
pass
class HomingException(Exception):
pass
class PathException(Exception):
pass | class Connectionexception(Exception):
pass
class Homingexception(Exception):
pass
class Pathexception(Exception):
pass |
#!/usr/bin/env python3
# Write a program that computes the running sum from 1..n
# Also, have it compute the factorial of n while you're at it
# No, you may not use math.factorial()
# Use the same loop for both calculations
n = 5
n_sum = 0
n_fac = 1
for i in range(1, n+1):
n_sum = n_sum + i
n_fac = n_fac * i
print (n, n_sum, n_fac)
# your code goes here
"""
python3 sumfac.py
5 15 120
"""
| n = 5
n_sum = 0
n_fac = 1
for i in range(1, n + 1):
n_sum = n_sum + i
n_fac = n_fac * i
print(n, n_sum, n_fac)
'\npython3 sumfac.py\n5 15 120\n' |
___used___ = []
___depth___ = 0
def monit(level):
def decorator(function):
def wrapper(*args):
global ___used___, ___depth___
t = (level, ___depth___, wrapper, function.__name__)
___used___.append((t, (0, args)))
___depth___ += 1
value = function(*args)
___depth___ -= 1
___used___.append((t, (1, value)))
return value
return wrapper
return decorator
def ___print___(depth, isReturn, indent, add, name):
for i in range(depth):
print(indent, end='')
if isReturn:
print('return', add)
else:
argsStr = ','.join(map(str, add))
print(f"{name}({argsStr})")
def report(level, indent= "->", limits=None):
good = []
for k in ___used___:
(lev, d, wr, name) = k[0]
isReturn = k[1][0]
add = k[1][1]
if lev <= level:
if limits != None and wr in limits:
first, second = limits[wr]
if d+1 >= first and second >= d+1:
___print___(d, isReturn, indent, add, name)
else:
___print___(d, isReturn, indent, add, name)
def clear():
global ___used___
___used___ = []
# @monit(1)
# def fib(a):
# if a == 0: return 1
# if a == 1: return 1
# return fib(a-1) + fib(a-2)
# fib(6)
# report(1, limits = {fib:(1,2)})
# report(1,limits = {fib:(6,6)})
# clear()
# @monit(2)
# def f(a):
# if a == 0:
# return 1
# return f(a-1)*a
# #f = monit(2)(f) -- monit(2) = convert, wiec monit(2)(f) = convert(f)
# @monit(1)
# def g(a, b):
# if b == 0:
# return 1
# return g(a, b-1) * f(a)
# g(2, 2)
# report(2)
# report(1)
# report(2, limits = {f:(1,2), g:(1,2)})
# clear() | ___used___ = []
___depth___ = 0
def monit(level):
def decorator(function):
def wrapper(*args):
global ___used___, ___depth___
t = (level, ___depth___, wrapper, function.__name__)
___used___.append((t, (0, args)))
___depth___ += 1
value = function(*args)
___depth___ -= 1
___used___.append((t, (1, value)))
return value
return wrapper
return decorator
def ___print___(depth, isReturn, indent, add, name):
for i in range(depth):
print(indent, end='')
if isReturn:
print('return', add)
else:
args_str = ','.join(map(str, add))
print(f'{name}({argsStr})')
def report(level, indent='->', limits=None):
good = []
for k in ___used___:
(lev, d, wr, name) = k[0]
is_return = k[1][0]
add = k[1][1]
if lev <= level:
if limits != None and wr in limits:
(first, second) = limits[wr]
if d + 1 >= first and second >= d + 1:
___print___(d, isReturn, indent, add, name)
else:
___print___(d, isReturn, indent, add, name)
def clear():
global ___used___
___used___ = [] |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
class CA:
def __init__(self):
self.n = 0
def fca(self):
self.n += 1
class CB(CA):
def fca(self):
super().fca()
self.n += 2
b = CB()
b.fca()
assert b.n == 3
super(CB, b).fca()
assert b.n == 4
| class Ca:
def __init__(self):
self.n = 0
def fca(self):
self.n += 1
class Cb(CA):
def fca(self):
super().fca()
self.n += 2
b = cb()
b.fca()
assert b.n == 3
super(CB, b).fca()
assert b.n == 4 |
# Copyright 2012 10gen, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Utilities for testing pymongo
"""
def delay(sec):
return '''function() {
var d = new Date((new Date()).getTime() + %s * 1000);
while (d > (new Date())) { }; return true;
}''' % sec
def get_command_line(connection):
command_line = connection.admin.command('getCmdLineOpts')
assert command_line['ok'] == 1, "getCmdLineOpts() failed"
return command_line['argv']
def server_started_with_auth(connection):
argv = get_command_line(connection)
return '--auth' in argv or '--keyFile' in argv
def server_is_master_with_slave(connection):
return '--master' in get_command_line(connection)
def drop_collections(db):
for coll in db.collection_names():
if not coll.startswith('system'):
db.drop_collection(coll)
| """Utilities for testing pymongo
"""
def delay(sec):
return 'function() {\n var d = new Date((new Date()).getTime() + %s * 1000);\n while (d > (new Date())) { }; return true;\n }' % sec
def get_command_line(connection):
command_line = connection.admin.command('getCmdLineOpts')
assert command_line['ok'] == 1, 'getCmdLineOpts() failed'
return command_line['argv']
def server_started_with_auth(connection):
argv = get_command_line(connection)
return '--auth' in argv or '--keyFile' in argv
def server_is_master_with_slave(connection):
return '--master' in get_command_line(connection)
def drop_collections(db):
for coll in db.collection_names():
if not coll.startswith('system'):
db.drop_collection(coll) |
class Solution:
def findRepeatedDnaSequences(self, s: str) -> List[str]:
sequences = dict()
n = 0
for x in range(len(s) - 9):
sequence = s[n:n+10]
if sequence in sequences:
sequences[sequence] += 1
else:
sequences[sequence] = 1
n += 1
return list(map(lambda k : k[0], filter(lambda k : k[1] > 1, sequences.items()))) | class Solution:
def find_repeated_dna_sequences(self, s: str) -> List[str]:
sequences = dict()
n = 0
for x in range(len(s) - 9):
sequence = s[n:n + 10]
if sequence in sequences:
sequences[sequence] += 1
else:
sequences[sequence] = 1
n += 1
return list(map(lambda k: k[0], filter(lambda k: k[1] > 1, sequences.items()))) |
#!/usr/bin/python
'''
--- Day 2: Corruption Checksum ---
As you walk through the door, a glowing humanoid shape yells in your direction. "You there! Your state appears to be idle. Come help us repair the corruption in this spreadsheet - if we take another millisecond, we'll have to display an hourglass cursor!"
The spreadsheet consists of rows of apparently-random numbers. To make sure the recovery process is on the right track, they need you to calculate the spreadsheet's checksum. For each row, determine the difference between the largest value and the smallest value; the checksum is the sum of all of these differences.
'''
inFile = open("2.txt",'r')
lines = inFile.readlines() #real input
#lines = ["5 1 9 5","7 5 3","2 4 6 8"] #debug only, should yield 18
checksum = 0
for line in lines:
line = map(int,line.strip().split())
diff = 0
low = high = line[0]
for num in line[1:]:
if num < low:
low = num
elif num > high:
high = num
diff = high - low
checksum += diff
print("Solution: "+str(checksum))
| """
--- Day 2: Corruption Checksum ---
As you walk through the door, a glowing humanoid shape yells in your direction. "You there! Your state appears to be idle. Come help us repair the corruption in this spreadsheet - if we take another millisecond, we'll have to display an hourglass cursor!"
The spreadsheet consists of rows of apparently-random numbers. To make sure the recovery process is on the right track, they need you to calculate the spreadsheet's checksum. For each row, determine the difference between the largest value and the smallest value; the checksum is the sum of all of these differences.
"""
in_file = open('2.txt', 'r')
lines = inFile.readlines()
checksum = 0
for line in lines:
line = map(int, line.strip().split())
diff = 0
low = high = line[0]
for num in line[1:]:
if num < low:
low = num
elif num > high:
high = num
diff = high - low
checksum += diff
print('Solution: ' + str(checksum)) |
class Account(object):
CREDIT = 0
PAYPAL = 1
TYPE = [ CREDIT, PAYPAL ]
def __init__(self, username, account_num, atype):
self.username = username
self.account_num = account_num
self.type = atype | class Account(object):
credit = 0
paypal = 1
type = [CREDIT, PAYPAL]
def __init__(self, username, account_num, atype):
self.username = username
self.account_num = account_num
self.type = atype |
class PluginServerException(Exception):
pass
class PDKException(Exception):
pass | class Pluginserverexception(Exception):
pass
class Pdkexception(Exception):
pass |
# example class
class intSet(object):
def __init__(self):
self.vals = []
def insert(self, e):
if not e in self.vals:
self.vals.append(e)
def member(self, e):
return e in self.vals
def remove(self, e):
try:
self.vals.remove(e)
except:
raise ValueError(str(e) + ' not found')
#returns a string representation of self
def __str__(self):
self.vals.sort()
result = ''
for e in self.vals:
result = result + str(e) + ','
return '{' + result[:-1] + '}'
def intersect(self, other):
assert type(other) == type(self)
res = intSet()
for item in other.vals:
if self.member(item):
res.insert(item)
return res
def __len__(self):
return len(self.vals)
s = intSet()
s.insert(3)
s.insert(4)
s.insert(5)
s.member(3)
s.remove(3)
print(s)
print('len ', len(s))
| class Intset(object):
def __init__(self):
self.vals = []
def insert(self, e):
if not e in self.vals:
self.vals.append(e)
def member(self, e):
return e in self.vals
def remove(self, e):
try:
self.vals.remove(e)
except:
raise value_error(str(e) + ' not found')
def __str__(self):
self.vals.sort()
result = ''
for e in self.vals:
result = result + str(e) + ','
return '{' + result[:-1] + '}'
def intersect(self, other):
assert type(other) == type(self)
res = int_set()
for item in other.vals:
if self.member(item):
res.insert(item)
return res
def __len__(self):
return len(self.vals)
s = int_set()
s.insert(3)
s.insert(4)
s.insert(5)
s.member(3)
s.remove(3)
print(s)
print('len ', len(s)) |
class Error(Exception):
"""Base class for exceptions in this module."""
pass
class ParserError(Error):
"""Exception raised for errors in the input.
Attributes:
command -- input command in which the error occurred
message -- explanation of the error
"""
def __init__(self, command, message):
self.expression = command
self.message = message
class UnrecognizedCommand(ParserError):
"""Exception raised when the parser encounters a command it does not recognize"""
pass
class CommandResponseTimeout(Error):
"""Exception raised when we don't receive a response to a command to the route within
the allowed timeout."""
def __init__(self, command):
self.expression = command
| class Error(Exception):
"""Base class for exceptions in this module."""
pass
class Parsererror(Error):
"""Exception raised for errors in the input.
Attributes:
command -- input command in which the error occurred
message -- explanation of the error
"""
def __init__(self, command, message):
self.expression = command
self.message = message
class Unrecognizedcommand(ParserError):
"""Exception raised when the parser encounters a command it does not recognize"""
pass
class Commandresponsetimeout(Error):
"""Exception raised when we don't receive a response to a command to the route within
the allowed timeout."""
def __init__(self, command):
self.expression = command |
class NumMatrix:
def __init__(self, matrix):
self.rowSums = [[0] * len(matrix[0]) for _ in range(len(matrix))]
for i in range(len(matrix)):
for j in range(len(matrix[i])):
self.rowSums[i][j] = matrix[i][j] if j == 0 else self.rowSums[i][j-1] + matrix[i][j]
def sumRegion(self, row1, col1, row2, col2):
rsum = 0
for i in range(row1, row2 + 1):
if col1 == 0:
rsum += self.rowSums[i][col2]
else:
rsum += self.rowSums[i][col2] - self.rowSums[i][col1-1]
return rsum
s = NumMatrix([[-1]])
print(s.sumRegion(0, 0, 0, 0))
class NumMatrixCacheSmarter:
def __init__(self, matrix):
self.sums = [[0] * len(matrix[0]) for _ in range(len(matrix))]
for i in range(len(matrix)):
for j in range(len(matrix[i])):
if i == 0:
self.sums[i][j] = matrix[i][j] if j == 0 else self.sums[i][j-1] + matrix[i][j]
elif j == 0:
self.sums[i][j] = matrix[i][j] if i == 0 else self.sums[i-1][j] + matrix[i][j]
else:
self.sums[i][j] = matrix[i][j] + self.sums[i][j-1] + self.sums[i-1][j] - self.sums[i-1][j-1]
def sumRegion(self, row1, col1, row2, col2):
rsum = self.sums[row2][col2]
if row1 > 0:
rsum -= self.sums[row1 - 1][col2]
if col1 > 0:
rsum -= self.sums[row2][col1 - 1]
if row1 > 0 and col1 > 0:
rsum += self.sums[row1 - 1][col1 - 1]
return rsum
ss = NumMatrixCacheSmarter([[3,0,1,4,2],[5,6,3,2,1],[1,2,0,1,5],[4,1,0,1,7],[1,0,3,0,5]])
print(ss.sumRegion(1,1,2,2))
print(ss.sumRegion(2,1,4,3))
print(ss.sumRegion(1,2,2,4))
| class Nummatrix:
def __init__(self, matrix):
self.rowSums = [[0] * len(matrix[0]) for _ in range(len(matrix))]
for i in range(len(matrix)):
for j in range(len(matrix[i])):
self.rowSums[i][j] = matrix[i][j] if j == 0 else self.rowSums[i][j - 1] + matrix[i][j]
def sum_region(self, row1, col1, row2, col2):
rsum = 0
for i in range(row1, row2 + 1):
if col1 == 0:
rsum += self.rowSums[i][col2]
else:
rsum += self.rowSums[i][col2] - self.rowSums[i][col1 - 1]
return rsum
s = num_matrix([[-1]])
print(s.sumRegion(0, 0, 0, 0))
class Nummatrixcachesmarter:
def __init__(self, matrix):
self.sums = [[0] * len(matrix[0]) for _ in range(len(matrix))]
for i in range(len(matrix)):
for j in range(len(matrix[i])):
if i == 0:
self.sums[i][j] = matrix[i][j] if j == 0 else self.sums[i][j - 1] + matrix[i][j]
elif j == 0:
self.sums[i][j] = matrix[i][j] if i == 0 else self.sums[i - 1][j] + matrix[i][j]
else:
self.sums[i][j] = matrix[i][j] + self.sums[i][j - 1] + self.sums[i - 1][j] - self.sums[i - 1][j - 1]
def sum_region(self, row1, col1, row2, col2):
rsum = self.sums[row2][col2]
if row1 > 0:
rsum -= self.sums[row1 - 1][col2]
if col1 > 0:
rsum -= self.sums[row2][col1 - 1]
if row1 > 0 and col1 > 0:
rsum += self.sums[row1 - 1][col1 - 1]
return rsum
ss = num_matrix_cache_smarter([[3, 0, 1, 4, 2], [5, 6, 3, 2, 1], [1, 2, 0, 1, 5], [4, 1, 0, 1, 7], [1, 0, 3, 0, 5]])
print(ss.sumRegion(1, 1, 2, 2))
print(ss.sumRegion(2, 1, 4, 3))
print(ss.sumRegion(1, 2, 2, 4)) |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
def get_tag_by_key(tags, key):
tags = list(filter(lambda t: t['Key'] == key, tags))
if len(tags):
return tags[0]['Value']
return None
| def get_tag_by_key(tags, key):
tags = list(filter(lambda t: t['Key'] == key, tags))
if len(tags):
return tags[0]['Value']
return None |
class Solution:
def twoSum(self, nums: list[int], target: int) -> list[int]:
hashmap = {}
for idx, num in enumerate(nums):
if num not in hashmap:
hashmap[target - num] = idx
else:
return [hashmap[num], idx]
| class Solution:
def two_sum(self, nums: list[int], target: int) -> list[int]:
hashmap = {}
for (idx, num) in enumerate(nums):
if num not in hashmap:
hashmap[target - num] = idx
else:
return [hashmap[num], idx] |
'''
This program returns an integer representing the maximum possible sum of the contiguous subarray using Kadane's Algorithm
- Creating a function maxSubArray() which will take one argument as a List A
- Initializing two variables max_so_far and curr_max which will store the first element in the List A
- Traversing the List A from second element till the last and find the maximum sum from the contiguous subarray
- curr_max will store the maximum value between the current element and the curr_max + current element
- max_so_far will store the maximum value between max_so_far and curr_max
- At last returning the maximum possible sum of the contiguous subarray
'''
def maxSubArray(A):
max_so_far =A[0]
curr_max = A[0]
for i in range(1,len(A)):
curr_max = max(A[i], curr_max + A[i])
max_so_far = max(max_so_far,curr_max)
return max_so_far
if __name__ == "__main__":
A=[ -342, -193, 47, 33, -346, -245, -161, -153, 23, 99, -239, -256, -141, -94, -473, -185, -56, -243, -95, -118, -77, -122, -46, -56, -276, -208, -469, -429, -193, 61, -302, -247, -388, -348, 1, -431, -130, -216, -324, 12, -195, -408, -191, -368, 93, -269, -386, 43, -334, -19, 18, -291, -257, -325, 11, -200, -266, 85, -496, -30, -369, -236, -465, -476, -478, -211, 45, 56, -485, 11, 3, -201, 3, -22, -260, -400, -393, -422, -463, 79, -77, -114, -81, -301, -115, -102, -299, -468, -339, -433, 66, 53, 49, -343, -342, -189, 0, -392, 76, -226, -273, -355, -256, -317, -188, -286, -351, 59, -88, 65, -57, -67, 30, -92, -400, 9, -459, -334, -342, -259, -217, -330, -126, -279, -190, -350, -60, -437, 58, -143, -209, 60, -333, 68, -358, -335, -214, -186, -130, -54, -17, -480, -489, -448, -352, 40, -64, -469, -355, 24, -282, 6, -63, -325, -93, -60, 59, -307, -201, 79, -90, -61, -52, 77, -172, -18, -203, 6, -99, -303, -365, -256, 18, -252, -188, -128, 20, 48, -285, -135, -405, -462, -53, -61, -259, -423, -357, -224, -319, -305, -235, -360, -319, -70, -210, -364, -101, -205, -307, -165, -84, -497, 50, -366, -339, -262, -129, -410, -35, -236, -28, -486, -14, -267, -95, -424, -38, -424, -378, -237, -155, -386, -247, -186, -285, -489, -26, -148, -429, 64, -27, -358, -338, -469, -8, -330, -242, -434, -49, -385, -326, -2, -406, -372, -483, -69, -420, -116, -498, -484, -242, -441, -18, -395, -116, -297, -163, -238, -269, -472, -15, -69, -340, -498, -387, -365, -412, -413, -180, -104, -427, -306, -143, -228, -473, -475, -177, -105, 47, -408, -401, -118, -157, -27, -182, -319, 63, -300, 6, -64, -22, -68, -395, -423, -499, 34, -184, -238, -386, -54, 61, -25, -12, -285, -112, -145, 32, -294, -10, -325, -132, -143, -201, 53, -393, -33, -77, -300, -252, -123, 99, -39, -289, -415, -280, -163, -77, 53, -183, 32, -479, -358, -188, -42, -73, -130, -215, 75, 0, -80, -396, -145, -286, -443, 77, -296, -100, -410, 11, -417, -371, 8, -123, -341, -487, -419, -256, -179, -62, 90, -290, -400, -217, -240, 60, 26, -320, -227, -349, -295, -489, 15, -42, -267, -43, -77, 28, -456, -312, 68, -445, -230, -375, -47, -218, -344, -9, -196, -327, -336, -459, -93, 40, -166, -270, -52, -392, -271, -19, -419, -405, -499, -395, -257, -411, -289, -362, -242, -398, -147, -410, -62, -399, 15, -449, -286, -25, -319, -446, -422, -174, -439, -218, -230, -64, -96, -473, -252, 64, -284, -94, 41, -375, -273, -22, -363, -133, -172, -185, -99, 90, -360, -201, -395, -24, -113, 98, -496, -451, -164, -388, -192, -18, 86, -409, -469, -38, -194, -72, -318, -415, 66, -318, -400, -60, 2, -178, -55, 86, -367, -186, 9, -430, -309, -477, -388, -75, -369, -196, -261, -492, -142, -16, -386, -76, -330, 1, -332, 66, -115, -309, -485, -210, -189, 17, -202, -254, 72, -106, -490, -450, -259, -135, -30, -459, -215, -149, -110, -480, -107, -18, 91, -2, -269, -64, -347, -404, -346, -390, -300, 50, -33, 92, -91, -32, 77, -58, -336, 77, -483, -488, 49, -497, 33, -435, -431, -123, 68, -11, -125, -397, 9, -446, -267, -91, 63, -107, -49, 69, -368, -320, -348, -143, 51, -452, -96, 90, 83, -97, -84, 17, -3, -125, -124, -27, -439, 99, -379, -143, -101, -306, -364, -228, -289, -414, -411, -435, -51, -47, -353, -488, -232, -405, -90, -442, -242, 49, -196, 59, -281, -303, -33, -337, -427, -356, 32, -117, -438, 5, -158, 60, -252, -138, -131, 40, -41, 81, -459, -477, 100, -144, -495, 86, -321, 21, -30, -71, -40, -236, -180, -211, 64, -338, -67, -20, -428, -230, -262, -383, -463, 29, -166, -477, -393, -472, -405, -436, 25, -460, 59, -254, -337, 89, -232, -250, 41, -433, -125, -10, -74, 38, -351, -140, -92, -413, -279, 91, -63, -110, -81, -33, -55, -20, -148, 90, 73, -79, -91, -247, -219, -185, -133, -392, -427, -253, 65, -410, -368, 57, -66, -108, 90, -437, -90, -346, -51, -198, -287, 96, -386, 71, -406, -282, -42, -313, -164, -201, 7, -143, -8, -253, -78, -115, -99, -143, 25, 95, -448, -17, -309, -95, -433, -388, -353, -319, -172, -91, -274, -420, 78, -438, -244, -319, -164, -287, -197, 49, -78, -11, -262, -425, -40, -170, -182, 65, -466, -456, -453, 51, -382, -6, -177, -128, -55, 19, -260, -194, -52, 8, -482, -452, -99, -406, -323, -405, -154, -359, 74, -241, -253, -206, 58, -154, -311, -182, -433, -377, -81, -499, -468, -491, -292, -146, 81, -200, -145, -142, -238, -377, -98, -410, 37, -306, -233, -187, 96, 29, -415, -165, -127, 8, -497, -204, -409, -475, -420, -55, -25, 59, -490, -426, -178, -447, -412, 80, -305, -246, -398, -164, 93, -342, 76, 78, -387, -235, 34, -248, -11, -421, 85, -240, -159, -330, -381, -36, -317, -313, -221, -119, -181, 23, 11, -399, 75, -224, -154, -23, -66, 94, -488, 71, -74, -94, -292, -293, -154, 16, -39, -274, -23, -270, -231, 75, -439, -268, -94, 19, -8, -155, -213, 0, -124, -314, -74, -352, -294, -44, -465, -129, -342, -215, -472, -116, -17, -228, -28, -214, -164, 0, -299, -470, 15, -67, -238, 75, -48, -411, -72, -344, 100, -316, -365, -219, -274, -125, -162, 85, -344, -240, -411, -99, -211, -358, -67, -20, -154, -119, -153, -86, -406, 87, -366, -360, -479, -358, -431, -317, -26, -359, -423, -490, -244, -24, -124, 63, -416, -55, 17, -439, 46, -139, -234, 89, -329, -270, 36, 29, -32, -161, -165, -171, -14, -219, -225, -85, 24, -123, -249, -413, 58, 84, -1, -417, -492, -358, -397, -240, -47, -133, -163, -490, -171, 87, -418, -386, -355, -289, -323, -355, -379, 75, -52, -230, 93, -191, -31, -357, -164, -359, -188 ]
print(maxSubArray(A)) | """
This program returns an integer representing the maximum possible sum of the contiguous subarray using Kadane's Algorithm
- Creating a function maxSubArray() which will take one argument as a List A
- Initializing two variables max_so_far and curr_max which will store the first element in the List A
- Traversing the List A from second element till the last and find the maximum sum from the contiguous subarray
- curr_max will store the maximum value between the current element and the curr_max + current element
- max_so_far will store the maximum value between max_so_far and curr_max
- At last returning the maximum possible sum of the contiguous subarray
"""
def max_sub_array(A):
max_so_far = A[0]
curr_max = A[0]
for i in range(1, len(A)):
curr_max = max(A[i], curr_max + A[i])
max_so_far = max(max_so_far, curr_max)
return max_so_far
if __name__ == '__main__':
a = [-342, -193, 47, 33, -346, -245, -161, -153, 23, 99, -239, -256, -141, -94, -473, -185, -56, -243, -95, -118, -77, -122, -46, -56, -276, -208, -469, -429, -193, 61, -302, -247, -388, -348, 1, -431, -130, -216, -324, 12, -195, -408, -191, -368, 93, -269, -386, 43, -334, -19, 18, -291, -257, -325, 11, -200, -266, 85, -496, -30, -369, -236, -465, -476, -478, -211, 45, 56, -485, 11, 3, -201, 3, -22, -260, -400, -393, -422, -463, 79, -77, -114, -81, -301, -115, -102, -299, -468, -339, -433, 66, 53, 49, -343, -342, -189, 0, -392, 76, -226, -273, -355, -256, -317, -188, -286, -351, 59, -88, 65, -57, -67, 30, -92, -400, 9, -459, -334, -342, -259, -217, -330, -126, -279, -190, -350, -60, -437, 58, -143, -209, 60, -333, 68, -358, -335, -214, -186, -130, -54, -17, -480, -489, -448, -352, 40, -64, -469, -355, 24, -282, 6, -63, -325, -93, -60, 59, -307, -201, 79, -90, -61, -52, 77, -172, -18, -203, 6, -99, -303, -365, -256, 18, -252, -188, -128, 20, 48, -285, -135, -405, -462, -53, -61, -259, -423, -357, -224, -319, -305, -235, -360, -319, -70, -210, -364, -101, -205, -307, -165, -84, -497, 50, -366, -339, -262, -129, -410, -35, -236, -28, -486, -14, -267, -95, -424, -38, -424, -378, -237, -155, -386, -247, -186, -285, -489, -26, -148, -429, 64, -27, -358, -338, -469, -8, -330, -242, -434, -49, -385, -326, -2, -406, -372, -483, -69, -420, -116, -498, -484, -242, -441, -18, -395, -116, -297, -163, -238, -269, -472, -15, -69, -340, -498, -387, -365, -412, -413, -180, -104, -427, -306, -143, -228, -473, -475, -177, -105, 47, -408, -401, -118, -157, -27, -182, -319, 63, -300, 6, -64, -22, -68, -395, -423, -499, 34, -184, -238, -386, -54, 61, -25, -12, -285, -112, -145, 32, -294, -10, -325, -132, -143, -201, 53, -393, -33, -77, -300, -252, -123, 99, -39, -289, -415, -280, -163, -77, 53, -183, 32, -479, -358, -188, -42, -73, -130, -215, 75, 0, -80, -396, -145, -286, -443, 77, -296, -100, -410, 11, -417, -371, 8, -123, -341, -487, -419, -256, -179, -62, 90, -290, -400, -217, -240, 60, 26, -320, -227, -349, -295, -489, 15, -42, -267, -43, -77, 28, -456, -312, 68, -445, -230, -375, -47, -218, -344, -9, -196, -327, -336, -459, -93, 40, -166, -270, -52, -392, -271, -19, -419, -405, -499, -395, -257, -411, -289, -362, -242, -398, -147, -410, -62, -399, 15, -449, -286, -25, -319, -446, -422, -174, -439, -218, -230, -64, -96, -473, -252, 64, -284, -94, 41, -375, -273, -22, -363, -133, -172, -185, -99, 90, -360, -201, -395, -24, -113, 98, -496, -451, -164, -388, -192, -18, 86, -409, -469, -38, -194, -72, -318, -415, 66, -318, -400, -60, 2, -178, -55, 86, -367, -186, 9, -430, -309, -477, -388, -75, -369, -196, -261, -492, -142, -16, -386, -76, -330, 1, -332, 66, -115, -309, -485, -210, -189, 17, -202, -254, 72, -106, -490, -450, -259, -135, -30, -459, -215, -149, -110, -480, -107, -18, 91, -2, -269, -64, -347, -404, -346, -390, -300, 50, -33, 92, -91, -32, 77, -58, -336, 77, -483, -488, 49, -497, 33, -435, -431, -123, 68, -11, -125, -397, 9, -446, -267, -91, 63, -107, -49, 69, -368, -320, -348, -143, 51, -452, -96, 90, 83, -97, -84, 17, -3, -125, -124, -27, -439, 99, -379, -143, -101, -306, -364, -228, -289, -414, -411, -435, -51, -47, -353, -488, -232, -405, -90, -442, -242, 49, -196, 59, -281, -303, -33, -337, -427, -356, 32, -117, -438, 5, -158, 60, -252, -138, -131, 40, -41, 81, -459, -477, 100, -144, -495, 86, -321, 21, -30, -71, -40, -236, -180, -211, 64, -338, -67, -20, -428, -230, -262, -383, -463, 29, -166, -477, -393, -472, -405, -436, 25, -460, 59, -254, -337, 89, -232, -250, 41, -433, -125, -10, -74, 38, -351, -140, -92, -413, -279, 91, -63, -110, -81, -33, -55, -20, -148, 90, 73, -79, -91, -247, -219, -185, -133, -392, -427, -253, 65, -410, -368, 57, -66, -108, 90, -437, -90, -346, -51, -198, -287, 96, -386, 71, -406, -282, -42, -313, -164, -201, 7, -143, -8, -253, -78, -115, -99, -143, 25, 95, -448, -17, -309, -95, -433, -388, -353, -319, -172, -91, -274, -420, 78, -438, -244, -319, -164, -287, -197, 49, -78, -11, -262, -425, -40, -170, -182, 65, -466, -456, -453, 51, -382, -6, -177, -128, -55, 19, -260, -194, -52, 8, -482, -452, -99, -406, -323, -405, -154, -359, 74, -241, -253, -206, 58, -154, -311, -182, -433, -377, -81, -499, -468, -491, -292, -146, 81, -200, -145, -142, -238, -377, -98, -410, 37, -306, -233, -187, 96, 29, -415, -165, -127, 8, -497, -204, -409, -475, -420, -55, -25, 59, -490, -426, -178, -447, -412, 80, -305, -246, -398, -164, 93, -342, 76, 78, -387, -235, 34, -248, -11, -421, 85, -240, -159, -330, -381, -36, -317, -313, -221, -119, -181, 23, 11, -399, 75, -224, -154, -23, -66, 94, -488, 71, -74, -94, -292, -293, -154, 16, -39, -274, -23, -270, -231, 75, -439, -268, -94, 19, -8, -155, -213, 0, -124, -314, -74, -352, -294, -44, -465, -129, -342, -215, -472, -116, -17, -228, -28, -214, -164, 0, -299, -470, 15, -67, -238, 75, -48, -411, -72, -344, 100, -316, -365, -219, -274, -125, -162, 85, -344, -240, -411, -99, -211, -358, -67, -20, -154, -119, -153, -86, -406, 87, -366, -360, -479, -358, -431, -317, -26, -359, -423, -490, -244, -24, -124, 63, -416, -55, 17, -439, 46, -139, -234, 89, -329, -270, 36, 29, -32, -161, -165, -171, -14, -219, -225, -85, 24, -123, -249, -413, 58, 84, -1, -417, -492, -358, -397, -240, -47, -133, -163, -490, -171, 87, -418, -386, -355, -289, -323, -355, -379, 75, -52, -230, 93, -191, -31, -357, -164, -359, -188]
print(max_sub_array(A)) |
"""
One string is an anagram of another if the second is simply a rearrangement of the first.
For example, 'heart' and 'earth' are anagrams. The strings 'python' and 'typhon' are anagrams as
well.
"""
def is_anagram(str1, str2):
d = {}
for char in str1:
if char not in d.keys():
d[char] = 0
d[char] += 1
is_anagram = True
for char in str2:
if char in d.keys():
d[char] -= 1
if d[char] < 0:
is_anagram = False
else:
is_anagram = False
return is_anagram
print(is_anagram('lal', 'all'))
| """
One string is an anagram of another if the second is simply a rearrangement of the first.
For example, 'heart' and 'earth' are anagrams. The strings 'python' and 'typhon' are anagrams as
well.
"""
def is_anagram(str1, str2):
d = {}
for char in str1:
if char not in d.keys():
d[char] = 0
d[char] += 1
is_anagram = True
for char in str2:
if char in d.keys():
d[char] -= 1
if d[char] < 0:
is_anagram = False
else:
is_anagram = False
return is_anagram
print(is_anagram('lal', 'all')) |
#!/usr/bin/python3
sonar_input_file = open("input_day1.txt", "r")
sonar_input_data = sonar_input_file.readlines()
sonar_data_clean = []
print(sonar_input_data[0])
for item in sonar_input_data:
sonar_data_clean.append(item.strip())
for item in sonar_data_clean:
int(item)
def method1():
increase_count=0
for count,value in enumerate(sonar_data_clean):
if count > 2:
print(count)
print(value)
current_window = sonar_data_clean[count] + sonar_data_clean[count-1] + sonar_data_clean[count-2]
previous_window = sonar_data_clean[count-1] + sonar_data_clean[count-2] + sonar_data_clean[count-3]
if current_window > previous_window:
print(increase_count)
increase_count=increase_count+1
return increase_count
def method2():
debug_list = [zip(sonar_data_clean,sonar_data_clean[1:],sonar_data_clean[2:])]
print(debug_list)
sum_list = [sum([int(x) for x in sonar_tuple]) for sonar_tuple in zip(sonar_data_clean,sonar_data_clean[1:],sonar_data_clean[2:])]
#sum_list = [sum(sonar_tuple) for sonar_tuple in zipped_list]
compare_list = [currentNum < nextNum for currentNum, nextNum in zip(sum_list,sum_list[1:])]
return sum(compare_list)
print(len(sonar_data_clean))
print('The depth increase the following number of times: ',method1())
print('The depth increase according to our second calculation method: ',method2())
| sonar_input_file = open('input_day1.txt', 'r')
sonar_input_data = sonar_input_file.readlines()
sonar_data_clean = []
print(sonar_input_data[0])
for item in sonar_input_data:
sonar_data_clean.append(item.strip())
for item in sonar_data_clean:
int(item)
def method1():
increase_count = 0
for (count, value) in enumerate(sonar_data_clean):
if count > 2:
print(count)
print(value)
current_window = sonar_data_clean[count] + sonar_data_clean[count - 1] + sonar_data_clean[count - 2]
previous_window = sonar_data_clean[count - 1] + sonar_data_clean[count - 2] + sonar_data_clean[count - 3]
if current_window > previous_window:
print(increase_count)
increase_count = increase_count + 1
return increase_count
def method2():
debug_list = [zip(sonar_data_clean, sonar_data_clean[1:], sonar_data_clean[2:])]
print(debug_list)
sum_list = [sum([int(x) for x in sonar_tuple]) for sonar_tuple in zip(sonar_data_clean, sonar_data_clean[1:], sonar_data_clean[2:])]
compare_list = [currentNum < nextNum for (current_num, next_num) in zip(sum_list, sum_list[1:])]
return sum(compare_list)
print(len(sonar_data_clean))
print('The depth increase the following number of times: ', method1())
print('The depth increase according to our second calculation method: ', method2()) |
class Dictionary(dict):
newentry = dict.__setitem__
def look(self, key):
return self.get(key, f"Can't find entry for {key}") | class Dictionary(dict):
newentry = dict.__setitem__
def look(self, key):
return self.get(key, f"Can't find entry for {key}") |
"""Kata for basic string functions"""
mystring = 'Hello Strings!'
print(mystring) # Prints complete string
print(mystring[0]) # Prints first character of the string
print(mystring[2:5]) # Prints characters starting from 3rd to 5th
print(mystring[2:]) # Prints string starting from 3rd character
print(mystring * 2) # Prints string two times
print(mystring + "TEST") # Prints concatenated string
| """Kata for basic string functions"""
mystring = 'Hello Strings!'
print(mystring)
print(mystring[0])
print(mystring[2:5])
print(mystring[2:])
print(mystring * 2)
print(mystring + 'TEST') |
#author SANKALP SAXENA
def is_leap(year):
leap = False
if(year % 4 == 0) and (year %400 == 0 or year %100 !=0):
return True;
return False;
| def is_leap(year):
leap = False
if year % 4 == 0 and (year % 400 == 0 or year % 100 != 0):
return True
return False |
data ={'12.04.2021, 00:00 Uhr': {'AdmUnitId': 3351,
'BEZ': 'Landkreis',
'GEN': 'Celle',
'OBJECTID': 34,
'cases': 3813,
'cases7_bl': 8217,
'cases7_bl_per_100k': 102.794632911696,
'cases7_lk': 191,
'cases7_per_100k': 106.697353793901,
'cases7_per_100k_txt': '106,7',
'cases_per_100k': 2130.03670165521,
'cases_per_population': 2.13003670165521,
'death7_bl': 7,
'death7_lk': 0,
'death_rate': 1.5211119853134,
'deaths': 58,
'last_update': '12.04.2021, 00:00 Uhr',
'recovered': None},
'13.04.2021, 00:00 Uhr': {'AdmUnitId': 3351,
'BEZ': 'Landkreis',
'GEN': 'Celle',
'OBJECTID': 34,
'cases': 3831,
'cases7_bl': 8534,
'cases7_bl_per_100k': 106.760301480883,
'cases7_lk': 207,
'cases7_per_100k': 115.635352017474,
'cases7_per_100k_txt': '115,6',
'cases_per_100k': 2140.09194965672,
'cases_per_population': 2.14009194965672,
'death7_bl': 9,
'death7_lk': 0,
'death_rate': 1.54006786739755,
'deaths': 59,
'last_update': '13.04.2021, 00:00 Uhr',
'recovered': None},
'14.04.2021, 00:00 Uhr': {'AdmUnitId': 3351,
'BEZ': 'Landkreis',
'GEN': 'Celle',
'OBJECTID': 34,
'cases': 3850,
'cases7_bl': 8877,
'cases7_bl_per_100k': 111.051229932716,
'cases7_lk': 199,
'cases7_per_100k': 111.166352905687,
'cases7_per_100k_txt': '111,2',
'cases_per_100k': 2150.70582254722,
'cases_per_population': 2.15070582254722,
'death7_bl': 13,
'death7_lk': 0,
'death_rate': 1.53246753246753,
'deaths': 59,
'last_update': '14.04.2021, 00:00 Uhr',
'recovered': None},
'15.04.2021, 00:00 Uhr': {'AdmUnitId': 3351,
'BEZ': 'Landkreis',
'GEN': 'Celle',
'OBJECTID': 34,
'cases': 3904,
'cases7_bl': 9436,
'cases7_bl_per_100k': 118.04431740961,
'cases7_lk': 238,
'cases7_per_100k': 132.952723575646,
'cases7_per_100k_txt': '133,0',
'cases_per_100k': 2180.87156655178,
'cases_per_population': 2.18087156655178,
'death7_bl': 10,
'death7_lk': 0,
'death_rate': 1.53688524590164,
'deaths': 60,
'last_update': '15.04.2021, 00:00 Uhr',
'recovered': None},
'16.04.2021, 00:00 Uhr': {'AdmUnitId': 3351,
'BEZ': 'Landkreis',
'GEN': 'Celle',
'OBJECTID': 34,
'cases': 3932,
'cases7_bl': 9295,
'cases7_bl_per_100k': 116.280408046029,
'cases7_lk': 228,
'cases7_per_100k': 127.366474685913,
'cases7_per_100k_txt': '127,4',
'cases_per_100k': 2196.51306344303,
'cases_per_population': 2.19651306344303,
'death7_bl': 9,
'death7_lk': 0,
'death_rate': 1.52594099694812,
'deaths': 60,
'last_update': '16.04.2021, 00:00 Uhr',
'recovered': None},
'17.04.2021, 00:00 Uhr': {'AdmUnitId': 3351,
'BEZ': 'Landkreis',
'GEN': 'Celle',
'OBJECTID': 34,
'cases': 3966,
'cases7_bl': 9267,
'cases7_bl_per_100k': 115.93012817241,
'cases7_lk': 188,
'cases7_per_100k': 105.021479126981,
'cases7_per_100k_txt': '105,0',
'cases_per_100k': 2215.50630966812,
'cases_per_population': 2.21550630966812,
'death7_bl': 8,
'death7_lk': 0,
'death_rate': 1.51285930408472,
'deaths': 60,
'last_update': '17.04.2021, 00:00 Uhr',
'recovered': None},
'18.04.2021, 00:00 Uhr': {'AdmUnitId': 3351,
'BEZ': 'Landkreis',
'GEN': 'Celle',
'OBJECTID': 34,
'cases': 3999,
'cases7_bl': 9370,
'cases7_bl_per_100k': 117.218657707508,
'cases7_lk': 186,
'cases7_per_100k': 103.904229349034,
'cases7_per_100k_txt': '103,9',
'cases_per_100k': 2233.94093100424,
'cases_per_population': 2.23394093100424,
'death7_bl': 5,
'death7_lk': 0,
'death_rate': 1.50037509377344,
'deaths': 60,
'last_update': '18.04.2021, 00:00 Uhr',
'recovered': None},
'19.04.2021, 00:00 Uhr': {'AdmUnitId': 3351,
'BEZ': 'Landkreis',
'GEN': 'Celle',
'OBJECTID': 34,
'cases': 4027,
'cases7_bl': 9866,
'cases7_bl_per_100k': 123.42361546876,
'cases7_lk': 214,
'cases7_per_100k': 119.545726240287,
'cases7_per_100k_txt': '119,5',
'cases_per_100k': 2249.58242789549,
'cases_per_population': 2.24958242789549,
'death7_bl': 5,
'death7_lk': 0,
'death_rate': 1.48994288552272,
'deaths': 60,
'last_update': '19.04.2021, 00:00 Uhr',
'recovered': None},
'20.04.2021, 00:00 Uhr': {'AdmUnitId': 3351,
'BEZ': 'Landkreis',
'GEN': 'Celle',
'OBJECTID': 34,
'cases': 4039,
'cases7_bl': 9714,
'cases7_bl_per_100k': 121.522096154828,
'cases7_lk': 208,
'cases7_per_100k': 116.193976906447,
'cases7_per_100k_txt': '116,2',
'cases_per_100k': 2256.28592656317,
'cases_per_population': 2.25628592656317,
'death7_bl': 5,
'death7_lk': 0,
'death_rate': 1.48551621688537,
'deaths': 60,
'last_update': '20.04.2021, 00:00 Uhr',
'recovered': None},
'21.04.2021, 00:00 Uhr': {'AdmUnitId': 3351,
'BEZ': 'Landkreis',
'GEN': 'Celle',
'OBJECTID': 34,
'cases': 4042,
'cases7_bl': 9236,
'cases7_bl_per_100k': 115.542318312332,
'cases7_lk': 180,
'cases7_per_100k': 100.552480015195,
'cases7_per_100k_txt': '100,6',
'cases_per_100k': 2257.96180123009,
'cases_per_population': 2.25796180123009,
'death7_bl': 4,
'death7_lk': 0,
'death_rate': 1.50915388421573,
'deaths': 61,
'last_update': '21.04.2021, 00:00 Uhr',
'recovered': None},
'22.04.2021, 00:00 Uhr': {'AdmUnitId': 3351,
'BEZ': 'Landkreis',
'GEN': 'Celle',
'OBJECTID': 34,
'cases': 4075,
'cases7_bl': 9003,
'cases7_bl_per_100k': 112.627489364002,
'cases7_lk': 168,
'cases7_per_100k': 93.848981347515,
'cases7_per_100k_txt': '93,8',
'cases_per_100k': 2276.39642256621,
'cases_per_population': 2.27639642256621,
'death7_bl': 5,
'death7_lk': 0,
'death_rate': 1.49693251533742,
'deaths': 61,
'last_update': '22.04.2021, 00:00 Uhr',
'recovered': None}} | data = {'12.04.2021, 00:00 Uhr': {'AdmUnitId': 3351, 'BEZ': 'Landkreis', 'GEN': 'Celle', 'OBJECTID': 34, 'cases': 3813, 'cases7_bl': 8217, 'cases7_bl_per_100k': 102.794632911696, 'cases7_lk': 191, 'cases7_per_100k': 106.697353793901, 'cases7_per_100k_txt': '106,7', 'cases_per_100k': 2130.03670165521, 'cases_per_population': 2.13003670165521, 'death7_bl': 7, 'death7_lk': 0, 'death_rate': 1.5211119853134, 'deaths': 58, 'last_update': '12.04.2021, 00:00 Uhr', 'recovered': None}, '13.04.2021, 00:00 Uhr': {'AdmUnitId': 3351, 'BEZ': 'Landkreis', 'GEN': 'Celle', 'OBJECTID': 34, 'cases': 3831, 'cases7_bl': 8534, 'cases7_bl_per_100k': 106.760301480883, 'cases7_lk': 207, 'cases7_per_100k': 115.635352017474, 'cases7_per_100k_txt': '115,6', 'cases_per_100k': 2140.09194965672, 'cases_per_population': 2.14009194965672, 'death7_bl': 9, 'death7_lk': 0, 'death_rate': 1.54006786739755, 'deaths': 59, 'last_update': '13.04.2021, 00:00 Uhr', 'recovered': None}, '14.04.2021, 00:00 Uhr': {'AdmUnitId': 3351, 'BEZ': 'Landkreis', 'GEN': 'Celle', 'OBJECTID': 34, 'cases': 3850, 'cases7_bl': 8877, 'cases7_bl_per_100k': 111.051229932716, 'cases7_lk': 199, 'cases7_per_100k': 111.166352905687, 'cases7_per_100k_txt': '111,2', 'cases_per_100k': 2150.70582254722, 'cases_per_population': 2.15070582254722, 'death7_bl': 13, 'death7_lk': 0, 'death_rate': 1.53246753246753, 'deaths': 59, 'last_update': '14.04.2021, 00:00 Uhr', 'recovered': None}, '15.04.2021, 00:00 Uhr': {'AdmUnitId': 3351, 'BEZ': 'Landkreis', 'GEN': 'Celle', 'OBJECTID': 34, 'cases': 3904, 'cases7_bl': 9436, 'cases7_bl_per_100k': 118.04431740961, 'cases7_lk': 238, 'cases7_per_100k': 132.952723575646, 'cases7_per_100k_txt': '133,0', 'cases_per_100k': 2180.87156655178, 'cases_per_population': 2.18087156655178, 'death7_bl': 10, 'death7_lk': 0, 'death_rate': 1.53688524590164, 'deaths': 60, 'last_update': '15.04.2021, 00:00 Uhr', 'recovered': None}, '16.04.2021, 00:00 Uhr': {'AdmUnitId': 3351, 'BEZ': 'Landkreis', 'GEN': 'Celle', 'OBJECTID': 34, 'cases': 3932, 'cases7_bl': 9295, 'cases7_bl_per_100k': 116.280408046029, 'cases7_lk': 228, 'cases7_per_100k': 127.366474685913, 'cases7_per_100k_txt': '127,4', 'cases_per_100k': 2196.51306344303, 'cases_per_population': 2.19651306344303, 'death7_bl': 9, 'death7_lk': 0, 'death_rate': 1.52594099694812, 'deaths': 60, 'last_update': '16.04.2021, 00:00 Uhr', 'recovered': None}, '17.04.2021, 00:00 Uhr': {'AdmUnitId': 3351, 'BEZ': 'Landkreis', 'GEN': 'Celle', 'OBJECTID': 34, 'cases': 3966, 'cases7_bl': 9267, 'cases7_bl_per_100k': 115.93012817241, 'cases7_lk': 188, 'cases7_per_100k': 105.021479126981, 'cases7_per_100k_txt': '105,0', 'cases_per_100k': 2215.50630966812, 'cases_per_population': 2.21550630966812, 'death7_bl': 8, 'death7_lk': 0, 'death_rate': 1.51285930408472, 'deaths': 60, 'last_update': '17.04.2021, 00:00 Uhr', 'recovered': None}, '18.04.2021, 00:00 Uhr': {'AdmUnitId': 3351, 'BEZ': 'Landkreis', 'GEN': 'Celle', 'OBJECTID': 34, 'cases': 3999, 'cases7_bl': 9370, 'cases7_bl_per_100k': 117.218657707508, 'cases7_lk': 186, 'cases7_per_100k': 103.904229349034, 'cases7_per_100k_txt': '103,9', 'cases_per_100k': 2233.94093100424, 'cases_per_population': 2.23394093100424, 'death7_bl': 5, 'death7_lk': 0, 'death_rate': 1.50037509377344, 'deaths': 60, 'last_update': '18.04.2021, 00:00 Uhr', 'recovered': None}, '19.04.2021, 00:00 Uhr': {'AdmUnitId': 3351, 'BEZ': 'Landkreis', 'GEN': 'Celle', 'OBJECTID': 34, 'cases': 4027, 'cases7_bl': 9866, 'cases7_bl_per_100k': 123.42361546876, 'cases7_lk': 214, 'cases7_per_100k': 119.545726240287, 'cases7_per_100k_txt': '119,5', 'cases_per_100k': 2249.58242789549, 'cases_per_population': 2.24958242789549, 'death7_bl': 5, 'death7_lk': 0, 'death_rate': 1.48994288552272, 'deaths': 60, 'last_update': '19.04.2021, 00:00 Uhr', 'recovered': None}, '20.04.2021, 00:00 Uhr': {'AdmUnitId': 3351, 'BEZ': 'Landkreis', 'GEN': 'Celle', 'OBJECTID': 34, 'cases': 4039, 'cases7_bl': 9714, 'cases7_bl_per_100k': 121.522096154828, 'cases7_lk': 208, 'cases7_per_100k': 116.193976906447, 'cases7_per_100k_txt': '116,2', 'cases_per_100k': 2256.28592656317, 'cases_per_population': 2.25628592656317, 'death7_bl': 5, 'death7_lk': 0, 'death_rate': 1.48551621688537, 'deaths': 60, 'last_update': '20.04.2021, 00:00 Uhr', 'recovered': None}, '21.04.2021, 00:00 Uhr': {'AdmUnitId': 3351, 'BEZ': 'Landkreis', 'GEN': 'Celle', 'OBJECTID': 34, 'cases': 4042, 'cases7_bl': 9236, 'cases7_bl_per_100k': 115.542318312332, 'cases7_lk': 180, 'cases7_per_100k': 100.552480015195, 'cases7_per_100k_txt': '100,6', 'cases_per_100k': 2257.96180123009, 'cases_per_population': 2.25796180123009, 'death7_bl': 4, 'death7_lk': 0, 'death_rate': 1.50915388421573, 'deaths': 61, 'last_update': '21.04.2021, 00:00 Uhr', 'recovered': None}, '22.04.2021, 00:00 Uhr': {'AdmUnitId': 3351, 'BEZ': 'Landkreis', 'GEN': 'Celle', 'OBJECTID': 34, 'cases': 4075, 'cases7_bl': 9003, 'cases7_bl_per_100k': 112.627489364002, 'cases7_lk': 168, 'cases7_per_100k': 93.848981347515, 'cases7_per_100k_txt': '93,8', 'cases_per_100k': 2276.39642256621, 'cases_per_population': 2.27639642256621, 'death7_bl': 5, 'death7_lk': 0, 'death_rate': 1.49693251533742, 'deaths': 61, 'last_update': '22.04.2021, 00:00 Uhr', 'recovered': None}} |
def solution(data, n):
b = data[:]
lenb = len(b)
for i in range(lenb):
count = b.count(b[i])
if count > n:
lena = len(data)
j = 0
while j < lena:
if data[j] == b[i]:
data.pop(j)
lena -= 1
j += 1
return data
data = [1, 2, 2, 3, 3, 3, 4, 5, 5]
n = 1
print(solution(data, n))
| def solution(data, n):
b = data[:]
lenb = len(b)
for i in range(lenb):
count = b.count(b[i])
if count > n:
lena = len(data)
j = 0
while j < lena:
if data[j] == b[i]:
data.pop(j)
lena -= 1
j += 1
return data
data = [1, 2, 2, 3, 3, 3, 4, 5, 5]
n = 1
print(solution(data, n)) |
class Solution:
def lemonadeChange(self, bills: List[int]) -> bool:
change = [0, 0, 0]
for bill in bills:
if bill == 5: change[0] += 5
elif bill == 10:
change[1] += 10; change[0] -= 5
else:
change[2] += 20;
if change[1] >= 10:
change[1] -= 10; change[0] -= 5
else:
change[0] -= 3*5
if change[0] < 0 or change[1] < 0 or change[2] < 0: return False
return True | class Solution:
def lemonade_change(self, bills: List[int]) -> bool:
change = [0, 0, 0]
for bill in bills:
if bill == 5:
change[0] += 5
elif bill == 10:
change[1] += 10
change[0] -= 5
else:
change[2] += 20
if change[1] >= 10:
change[1] -= 10
change[0] -= 5
else:
change[0] -= 3 * 5
if change[0] < 0 or change[1] < 0 or change[2] < 0:
return False
return True |
"""
Simultaneous Tracker: "Historian"
Date: July 11, 2020
Author: Karen Urate
File: model.py
Description: This file contains the class object representation for Knowledge.
------------------------------------------------------------------
PROJECT DESCRIPTION
------------------------------------------------------------------
Create a knowledge-based agent prototype that will compute and trace
for the source of infection for an individual who has contracted Covid-19
disease from Location 1 to Location 6 in a span of 12-hour period on
9th of January 2020, based on fictional raw data provided.
The agent must have an ability to learn, create new models,
and find the source of infection based on built-up knowledge base.
Upon acquiring sufficient knowledge, the agent must be able to find
the following: where the exact source of infection took place,
from whom the viral infection possibly came from, and which location category
the virus had been spread from.
"""
class Knowledge:
def __init__(self, location=None, contacts=[], area=""):
self.id = 0
self.location = location
self.contacts = contacts
self.area = area
def print(self):
print("Knowledge [" + str(self.id) + "]: " + str(self.location.text()) + " | Contacts: " + str(self.contacts) + " | Visited Area: " + self.area) | """
Simultaneous Tracker: "Historian"
Date: July 11, 2020
Author: Karen Urate
File: model.py
Description: This file contains the class object representation for Knowledge.
------------------------------------------------------------------
PROJECT DESCRIPTION
------------------------------------------------------------------
Create a knowledge-based agent prototype that will compute and trace
for the source of infection for an individual who has contracted Covid-19
disease from Location 1 to Location 6 in a span of 12-hour period on
9th of January 2020, based on fictional raw data provided.
The agent must have an ability to learn, create new models,
and find the source of infection based on built-up knowledge base.
Upon acquiring sufficient knowledge, the agent must be able to find
the following: where the exact source of infection took place,
from whom the viral infection possibly came from, and which location category
the virus had been spread from.
"""
class Knowledge:
def __init__(self, location=None, contacts=[], area=''):
self.id = 0
self.location = location
self.contacts = contacts
self.area = area
def print(self):
print('Knowledge [' + str(self.id) + ']: ' + str(self.location.text()) + ' | Contacts: ' + str(self.contacts) + ' | Visited Area: ' + self.area) |
with open('input') as input:
lines = input.readlines()
def getMostFrequentBit(index, lines):
zero_bits = 0
one_bits = 0
for line in lines:
if line[index] == '0':
zero_bits += 1
else:
one_bits += 1
if zero_bits > one_bits:
greater = 0
else:
greater = 1
return greater
def getLeastFrequentBit(index, lines):
zero_bits = 0
one_bits = 0
for line in lines:
if line[index] == '0':
zero_bits += 1
else:
one_bits += 1
if zero_bits > one_bits:
lesser = 1
else:
lesser = 0
return lesser
def removeInvalidNumbers(frequent_bit, index, lines):
lines_copy = list(lines)
for line in lines:
if int(line[index]) != frequent_bit:
lines_copy.remove(line)
return lines_copy
def recursivelyGetOxygenGeneratorRating(index, lines):
bit = getMostFrequentBit(index, lines)
remaining_lines = removeInvalidNumbers(bit, index, lines)
# print(remaining_lines)
if len(remaining_lines) == 1:
return remaining_lines
else:
return recursivelyGetOxygenGeneratorRating(index+1, remaining_lines)
def recursivelyGetCO2ScrubberRating(index, lines):
bit = getLeastFrequentBit(index, lines)
remaining_lines = removeInvalidNumbers(bit, index, lines)
# print(remaining_lines)
if len(remaining_lines) == 1:
return remaining_lines
else:
return recursivelyGetCO2ScrubberRating(index+1, remaining_lines)
oxygen_generator_binary = recursivelyGetOxygenGeneratorRating(0, lines)
co2_generator_binary = recursivelyGetCO2ScrubberRating(0, lines)
oxygen_generator_binary = oxygen_generator_binary[0].strip('\n')
co2_generator_binary = co2_generator_binary[0].strip('\n')
oxygen_generator_decimal = int(oxygen_generator_binary, 2)
co2_generator_decimal = int(co2_generator_binary, 2)
solution = oxygen_generator_decimal*co2_generator_decimal
print(solution) | with open('input') as input:
lines = input.readlines()
def get_most_frequent_bit(index, lines):
zero_bits = 0
one_bits = 0
for line in lines:
if line[index] == '0':
zero_bits += 1
else:
one_bits += 1
if zero_bits > one_bits:
greater = 0
else:
greater = 1
return greater
def get_least_frequent_bit(index, lines):
zero_bits = 0
one_bits = 0
for line in lines:
if line[index] == '0':
zero_bits += 1
else:
one_bits += 1
if zero_bits > one_bits:
lesser = 1
else:
lesser = 0
return lesser
def remove_invalid_numbers(frequent_bit, index, lines):
lines_copy = list(lines)
for line in lines:
if int(line[index]) != frequent_bit:
lines_copy.remove(line)
return lines_copy
def recursively_get_oxygen_generator_rating(index, lines):
bit = get_most_frequent_bit(index, lines)
remaining_lines = remove_invalid_numbers(bit, index, lines)
if len(remaining_lines) == 1:
return remaining_lines
else:
return recursively_get_oxygen_generator_rating(index + 1, remaining_lines)
def recursively_get_co2_scrubber_rating(index, lines):
bit = get_least_frequent_bit(index, lines)
remaining_lines = remove_invalid_numbers(bit, index, lines)
if len(remaining_lines) == 1:
return remaining_lines
else:
return recursively_get_co2_scrubber_rating(index + 1, remaining_lines)
oxygen_generator_binary = recursively_get_oxygen_generator_rating(0, lines)
co2_generator_binary = recursively_get_co2_scrubber_rating(0, lines)
oxygen_generator_binary = oxygen_generator_binary[0].strip('\n')
co2_generator_binary = co2_generator_binary[0].strip('\n')
oxygen_generator_decimal = int(oxygen_generator_binary, 2)
co2_generator_decimal = int(co2_generator_binary, 2)
solution = oxygen_generator_decimal * co2_generator_decimal
print(solution) |
test = {
'name': 'make-adder',
'points': 1,
'suites': [
{
'cases': [
{
'code': r"""
scm> (add-two 2)
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
scm> (add-two 3)
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
scm> (add-three 3)
6
""",
'hidden': False,
'locked': False
},
{
'code': r"""
scm> (add-three 9)
12
""",
'hidden': False,
'locked': False
}
],
'scored': True,
'setup': r"""
scm> (load 'lab09)
scm> (define add-two (make-adder 2))
scm> (define add-three (make-adder 3))
""",
'teardown': '',
'type': 'scheme'
}
]
} | test = {'name': 'make-adder', 'points': 1, 'suites': [{'cases': [{'code': '\n scm> (add-two 2)\n 4\n ', 'hidden': False, 'locked': False}, {'code': '\n scm> (add-two 3)\n 5\n ', 'hidden': False, 'locked': False}, {'code': '\n scm> (add-three 3)\n 6\n ', 'hidden': False, 'locked': False}, {'code': '\n scm> (add-three 9)\n 12\n ', 'hidden': False, 'locked': False}], 'scored': True, 'setup': "\n scm> (load 'lab09)\n scm> (define add-two (make-adder 2))\n scm> (define add-three (make-adder 3))\n ", 'teardown': '', 'type': 'scheme'}]} |
#C2
items_list = []
cost_list = []
for x in range(3):
item = input("Enter item: ")
items_list.append(item)
cost = float(input("Enter cost: "))
cost_list.append(cost)
total = sum(cost_list)
sale = input("Sale item (y/n): ").lower()
if sale == "y":
total = total - (total * 0.1)
print("Total: ${:.2f}".format(total))
| items_list = []
cost_list = []
for x in range(3):
item = input('Enter item: ')
items_list.append(item)
cost = float(input('Enter cost: '))
cost_list.append(cost)
total = sum(cost_list)
sale = input('Sale item (y/n): ').lower()
if sale == 'y':
total = total - total * 0.1
print('Total: ${:.2f}'.format(total)) |
def profile_to_json(profile):
data = {
'username': profile.username,
'first_name': profile.first_name,
'last_name': profile.last_name,
'email_id': profile.email_id,
'profile_img': profile.profile_img,
'about_me': profile.about_me,
'resume': profile.resume,
'created_at': profile.created_at.isoformat(),
'updated_at': profile.updated_at.isoformat(),
'enabled_sections': profile.enabled_sections,
'phone': phone_to_json(profile.phone)
}
return data
def phone_to_json(phone):
data = {
'country_code': phone.country_code,
'primary': phone.primary,
'secondary': phone.secondary
}
return data
| def profile_to_json(profile):
data = {'username': profile.username, 'first_name': profile.first_name, 'last_name': profile.last_name, 'email_id': profile.email_id, 'profile_img': profile.profile_img, 'about_me': profile.about_me, 'resume': profile.resume, 'created_at': profile.created_at.isoformat(), 'updated_at': profile.updated_at.isoformat(), 'enabled_sections': profile.enabled_sections, 'phone': phone_to_json(profile.phone)}
return data
def phone_to_json(phone):
data = {'country_code': phone.country_code, 'primary': phone.primary, 'secondary': phone.secondary}
return data |
"""
Exceptions -
"""
# basic try/except clause
try:
file = open('test.txt', 'rb')
except IOError as e:
print('An IOError occurred. {}'.format(e.args[-1]))
# handling multiple exceptions
try:
file = open('test.txt', 'rb')
except (IOError, EOFError) as e:
print('An IOError occurred. {}'.format(e.args[-1]))
try:
file = open('test.txt', 'rb')
except EOFError as e:
print("An EOF error occurred...")
#raise e
except IOError as e:
print('An IOError occurred...')
#raise e
# generic exception
try:
file = open('test.txt', 'rb')
except Exception:
print("Exception found...")
#raise
# finally clause
try:
file = open('test.txt', 'rb')
except IOError as e:
print('An IOError occurred. {}'.format(e.args[-1]))
finally:
print("This would be printed whether or not an exception occurred")
# An IOError occurred. No such file or directory
# This would be printed whether or not an exception occurred
# try/else clause
try:
print("An exception shouldn't happen!")
except Exception:
print('Exception!')
else:
# any code that should only run if no exception occurs
# in the try, but for which exceptions should NOT
# be caught
print('This would run only if no exception occurs')
finally:
print('Printed anyways...')
| """
Exceptions -
"""
try:
file = open('test.txt', 'rb')
except IOError as e:
print('An IOError occurred. {}'.format(e.args[-1]))
try:
file = open('test.txt', 'rb')
except (IOError, EOFError) as e:
print('An IOError occurred. {}'.format(e.args[-1]))
try:
file = open('test.txt', 'rb')
except EOFError as e:
print('An EOF error occurred...')
except IOError as e:
print('An IOError occurred...')
try:
file = open('test.txt', 'rb')
except Exception:
print('Exception found...')
try:
file = open('test.txt', 'rb')
except IOError as e:
print('An IOError occurred. {}'.format(e.args[-1]))
finally:
print('This would be printed whether or not an exception occurred')
try:
print("An exception shouldn't happen!")
except Exception:
print('Exception!')
else:
print('This would run only if no exception occurs')
finally:
print('Printed anyways...') |
COOL_COLORS = [
"#66CDAA",
"#fe4a49",
"#fed766",
"#ee4035",
"#f37736",
"#7bc043",
"#0392cf",
"#d11141",
"#00b159",
"#7D3C98",
"#9B59B6",
"#34495E",
"#00aedb",
"#f37735",
"#95A5A6",
"#CD5C5C",
"#D4AC0D",
"#3E8FCD",
"#ffc425",
"#cc2a36",
"#4f372d",
"#00a0b0",
"#FE4365",
"#A7226E",
"#45ADA8",
"#2A363B",
"#229954",
]
| cool_colors = ['#66CDAA', '#fe4a49', '#fed766', '#ee4035', '#f37736', '#7bc043', '#0392cf', '#d11141', '#00b159', '#7D3C98', '#9B59B6', '#34495E', '#00aedb', '#f37735', '#95A5A6', '#CD5C5C', '#D4AC0D', '#3E8FCD', '#ffc425', '#cc2a36', '#4f372d', '#00a0b0', '#FE4365', '#A7226E', '#45ADA8', '#2A363B', '#229954'] |
# Longest Substring Without Repeating Characters
class Solution:
def lengthOfLongestSubstring2(self, s: str) -> int:
mx = l = r = 0
while r < len(s):
if len(set(s[l:r+1])) == r-l+1:
mx = max(mx, r-l+1)
r += 1
else:
l += 1
return mx
def lengthOfLongestSubstring(self, s: str) -> int:
mx = l = 0
st = set()
for c in s:
while st and c in st:
st.remove(s[l])
l += 1
st.add(c)
mx = max(mx, len(st))
return mx
| class Solution:
def length_of_longest_substring2(self, s: str) -> int:
mx = l = r = 0
while r < len(s):
if len(set(s[l:r + 1])) == r - l + 1:
mx = max(mx, r - l + 1)
r += 1
else:
l += 1
return mx
def length_of_longest_substring(self, s: str) -> int:
mx = l = 0
st = set()
for c in s:
while st and c in st:
st.remove(s[l])
l += 1
st.add(c)
mx = max(mx, len(st))
return mx |
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'dracidoupe_cz',
'USER': 'root',
'HOST': 'db',
'PASSWORD': 'docker',
'OPTIONS': {
'charset': 'latin2'
},
'TEST': {
'NAME': 'test_dracidoupe_cz',
'CHARSET': 'latin2',
}
}
}
| debug = True
databases = {'default': {'ENGINE': 'django.db.backends.mysql', 'NAME': 'dracidoupe_cz', 'USER': 'root', 'HOST': 'db', 'PASSWORD': 'docker', 'OPTIONS': {'charset': 'latin2'}, 'TEST': {'NAME': 'test_dracidoupe_cz', 'CHARSET': 'latin2'}}} |
def multi_bracket_validation(strings):
open = tuple('({[')
close = tuple(')}]')
map = dict(zip(open, close))
# print(map)
arr_multi = []
for i in strings:
if i in open:
arr_multi.append(map[i])
elif i in close:
if not arr_multi or i != arr_multi.pop():
return False
if not arr_multi:
return True
else:
return False
if __name__ == "__main__":
print(multi_bracket_validation('(){}'))
print(multi_bracket_validation('()[[Extra Characters]]'))
print(multi_bracket_validation('({()}'))
print(multi_bracket_validation('({()})'))
print(multi_bracket_validation('({())))'))
print(multi_bracket_validation('([{()}])'))
print(multi_bracket_validation('({()})'))
| def multi_bracket_validation(strings):
open = tuple('({[')
close = tuple(')}]')
map = dict(zip(open, close))
arr_multi = []
for i in strings:
if i in open:
arr_multi.append(map[i])
elif i in close:
if not arr_multi or i != arr_multi.pop():
return False
if not arr_multi:
return True
else:
return False
if __name__ == '__main__':
print(multi_bracket_validation('(){}'))
print(multi_bracket_validation('()[[Extra Characters]]'))
print(multi_bracket_validation('({()}'))
print(multi_bracket_validation('({()})'))
print(multi_bracket_validation('({())))'))
print(multi_bracket_validation('([{()}])'))
print(multi_bracket_validation('({()})')) |
# Leo colorizer control file for pyrex mode.
# This file is in the public domain.
# Properties for pyrex mode.
properties = {
"indentNextLines": "\\s*[^#]{3,}:\\s*(#.*)?",
"lineComment": "#",
}
# Attributes dict for pyrex_main ruleset.
pyrex_main_attributes_dict = {
"default": "null",
"digit_re": "",
"escape": "\\",
"highlight_digits": "true",
"ignore_case": "false",
"no_word_sep": "",
}
# Dictionary of attributes dictionaries for pyrex mode.
attributesDictDict = {
"pyrex_main": pyrex_main_attributes_dict,
}
# Keywords dict for pyrex_main ruleset.
pyrex_main_keywords_dict = {
"NULL": "literal3",
"cdef": "keyword4",
"char": "keyword4",
"cinclude": "keyword4",
"ctypedef": "keyword4",
"double": "keyword4",
"enum": "keyword4",
"extern": "keyword4",
"float": "keyword4",
"include": "keyword4",
"private": "keyword4",
"public": "keyword4",
"short": "keyword4",
"signed": "keyword4",
"sizeof": "keyword4",
"struct": "keyword4",
"union": "keyword4",
"unsigned": "keyword4",
"void": "keyword4",
}
# Dictionary of keywords dictionaries for pyrex mode.
keywordsDictDict = {
"pyrex_main": pyrex_main_keywords_dict,
}
# Rules for pyrex_main ruleset.
def pyrex_rule0(colorer, s, i):
return colorer.match_keywords(s, i)
# Rules dict for pyrex_main ruleset.
rulesDict1 = {
"0": [pyrex_rule0,],
"1": [pyrex_rule0,],
"2": [pyrex_rule0,],
"3": [pyrex_rule0,],
"4": [pyrex_rule0,],
"5": [pyrex_rule0,],
"6": [pyrex_rule0,],
"7": [pyrex_rule0,],
"8": [pyrex_rule0,],
"9": [pyrex_rule0,],
"@": [pyrex_rule0,],
"A": [pyrex_rule0,],
"B": [pyrex_rule0,],
"C": [pyrex_rule0,],
"D": [pyrex_rule0,],
"E": [pyrex_rule0,],
"F": [pyrex_rule0,],
"G": [pyrex_rule0,],
"H": [pyrex_rule0,],
"I": [pyrex_rule0,],
"J": [pyrex_rule0,],
"K": [pyrex_rule0,],
"L": [pyrex_rule0,],
"M": [pyrex_rule0,],
"N": [pyrex_rule0,],
"O": [pyrex_rule0,],
"P": [pyrex_rule0,],
"Q": [pyrex_rule0,],
"R": [pyrex_rule0,],
"S": [pyrex_rule0,],
"T": [pyrex_rule0,],
"U": [pyrex_rule0,],
"V": [pyrex_rule0,],
"W": [pyrex_rule0,],
"X": [pyrex_rule0,],
"Y": [pyrex_rule0,],
"Z": [pyrex_rule0,],
"a": [pyrex_rule0,],
"b": [pyrex_rule0,],
"c": [pyrex_rule0,],
"d": [pyrex_rule0,],
"e": [pyrex_rule0,],
"f": [pyrex_rule0,],
"g": [pyrex_rule0,],
"h": [pyrex_rule0,],
"i": [pyrex_rule0,],
"j": [pyrex_rule0,],
"k": [pyrex_rule0,],
"l": [pyrex_rule0,],
"m": [pyrex_rule0,],
"n": [pyrex_rule0,],
"o": [pyrex_rule0,],
"p": [pyrex_rule0,],
"q": [pyrex_rule0,],
"r": [pyrex_rule0,],
"s": [pyrex_rule0,],
"t": [pyrex_rule0,],
"u": [pyrex_rule0,],
"v": [pyrex_rule0,],
"w": [pyrex_rule0,],
"x": [pyrex_rule0,],
"y": [pyrex_rule0,],
"z": [pyrex_rule0,],
}
# x.rulesDictDict for pyrex mode.
rulesDictDict = {
"pyrex_main": rulesDict1,
}
# Import dict for pyrex mode.
importDict = {
"pyrex_main": ["python::main",],
}
| properties = {'indentNextLines': '\\s*[^#]{3,}:\\s*(#.*)?', 'lineComment': '#'}
pyrex_main_attributes_dict = {'default': 'null', 'digit_re': '', 'escape': '\\', 'highlight_digits': 'true', 'ignore_case': 'false', 'no_word_sep': ''}
attributes_dict_dict = {'pyrex_main': pyrex_main_attributes_dict}
pyrex_main_keywords_dict = {'NULL': 'literal3', 'cdef': 'keyword4', 'char': 'keyword4', 'cinclude': 'keyword4', 'ctypedef': 'keyword4', 'double': 'keyword4', 'enum': 'keyword4', 'extern': 'keyword4', 'float': 'keyword4', 'include': 'keyword4', 'private': 'keyword4', 'public': 'keyword4', 'short': 'keyword4', 'signed': 'keyword4', 'sizeof': 'keyword4', 'struct': 'keyword4', 'union': 'keyword4', 'unsigned': 'keyword4', 'void': 'keyword4'}
keywords_dict_dict = {'pyrex_main': pyrex_main_keywords_dict}
def pyrex_rule0(colorer, s, i):
return colorer.match_keywords(s, i)
rules_dict1 = {'0': [pyrex_rule0], '1': [pyrex_rule0], '2': [pyrex_rule0], '3': [pyrex_rule0], '4': [pyrex_rule0], '5': [pyrex_rule0], '6': [pyrex_rule0], '7': [pyrex_rule0], '8': [pyrex_rule0], '9': [pyrex_rule0], '@': [pyrex_rule0], 'A': [pyrex_rule0], 'B': [pyrex_rule0], 'C': [pyrex_rule0], 'D': [pyrex_rule0], 'E': [pyrex_rule0], 'F': [pyrex_rule0], 'G': [pyrex_rule0], 'H': [pyrex_rule0], 'I': [pyrex_rule0], 'J': [pyrex_rule0], 'K': [pyrex_rule0], 'L': [pyrex_rule0], 'M': [pyrex_rule0], 'N': [pyrex_rule0], 'O': [pyrex_rule0], 'P': [pyrex_rule0], 'Q': [pyrex_rule0], 'R': [pyrex_rule0], 'S': [pyrex_rule0], 'T': [pyrex_rule0], 'U': [pyrex_rule0], 'V': [pyrex_rule0], 'W': [pyrex_rule0], 'X': [pyrex_rule0], 'Y': [pyrex_rule0], 'Z': [pyrex_rule0], 'a': [pyrex_rule0], 'b': [pyrex_rule0], 'c': [pyrex_rule0], 'd': [pyrex_rule0], 'e': [pyrex_rule0], 'f': [pyrex_rule0], 'g': [pyrex_rule0], 'h': [pyrex_rule0], 'i': [pyrex_rule0], 'j': [pyrex_rule0], 'k': [pyrex_rule0], 'l': [pyrex_rule0], 'm': [pyrex_rule0], 'n': [pyrex_rule0], 'o': [pyrex_rule0], 'p': [pyrex_rule0], 'q': [pyrex_rule0], 'r': [pyrex_rule0], 's': [pyrex_rule0], 't': [pyrex_rule0], 'u': [pyrex_rule0], 'v': [pyrex_rule0], 'w': [pyrex_rule0], 'x': [pyrex_rule0], 'y': [pyrex_rule0], 'z': [pyrex_rule0]}
rules_dict_dict = {'pyrex_main': rulesDict1}
import_dict = {'pyrex_main': ['python::main']} |
# Databricks notebook source
# MAGIC %md-sandbox
# MAGIC
# MAGIC <div style="text-align: center; line-height: 0; padding-top: 9px;">
# MAGIC <img src="https://databricks.com/wp-content/uploads/2018/03/db-academy-rgb-1200px.png" alt="Databricks Learning" style="width: 600px">
# MAGIC </div>
# COMMAND ----------
# MAGIC %md
# MAGIC # Lab: Orchestrating Jobs with Databricks
# MAGIC
# MAGIC In this lab, you'll be configuring a multi-task job comprising of:
# MAGIC * A notebook that lands a new batch of data in a storage directory
# MAGIC * A Delta Live Table pipeline that processes this data through a series of tables
# MAGIC * A notebook that queries the gold table produced by this pipeline as well as various metrics output by DLT
# MAGIC
# MAGIC By the end of this lab, you should feel confident:
# MAGIC * Scheduling a notebook as a Databricks Job
# MAGIC * Scheduling a DLT pipeline as a Databricks Job
# MAGIC * Configuring linear dependencies between tasks using the Databricks Jobs UI
# COMMAND ----------
# MAGIC %run ../../Includes/Classroom-Setup-9.2.1L
# COMMAND ----------
# MAGIC %md
# MAGIC ## Land Initial Data
# MAGIC Seed the landing zone with some data before proceeding. You will re-run this command to land additional data later.
# COMMAND ----------
DA.data_factory.load()
# COMMAND ----------
# MAGIC %md
# MAGIC ## Create and Configure a Pipeline
# MAGIC
# MAGIC The pipline we create here is nearly identical to the one in the previous unit.
# MAGIC
# MAGIC We will use it as part of a scheduled job in this lesson.
# MAGIC
# MAGIC Execute the following cell to print out the values that will be used during the following configuration steps.
# COMMAND ----------
print_pipeline_config()
# COMMAND ----------
# MAGIC %md
# MAGIC Steps:
# MAGIC 1. Click the **Jobs** button on the sidebar.
# MAGIC 1. Select the **Delta Live Tables** tab.
# MAGIC 1. Click **Create Pipeline**.
# MAGIC 1. Fill in a **Pipeline Name** - because these names must be unique, we suggest using the **Pipline Name** provided in the cell above.
# MAGIC 1. For **Notebook Libraries**, use the navigator to locate and select the companion notebook called **DE 9.2.3L - DLT Job**.
# MAGIC * Alternatively, you can copy the **Notebook Path** specified above and paste it into the field provided.
# MAGIC 1. Configure the Source
# MAGIC * Click **`Add configuration`**
# MAGIC * Enter the word **`source`** in the **Key** field
# MAGIC * Enter the **Source** value specified above to the **`Value`** field
# MAGIC 1. In the **Target** field, specify the database name printed out next to **Target** in the cell above.<br/>
# MAGIC This should follow the pattern **`dbacademy_<username>_dewd_jobs_lab_92`**
# MAGIC 1. In the **Storage location** field, copy the directory as printed above.
# MAGIC 1. For **Pipeline Mode**, select **Triggered**
# MAGIC 1. Uncheck the **Enable autoscaling** box
# MAGIC 1. Set the number of workers to **`1`** (one)
# MAGIC 1. Click **Create**.
# MAGIC
# MAGIC
# MAGIC <img src="https://files.training.databricks.com/images/icon_note_24.png"> **Note**: we won't be executing this pipline directly as it will be executed by our job later in this lesson,<br/>
# MAGIC but if you want to test it real quick, you can click the **Start** button now.
# COMMAND ----------
# MAGIC %md
# MAGIC ## Schedule a Notebook Job
# MAGIC
# MAGIC When using the Jobs UI to orchestrate a workload with multiple tasks, you'll always begin by scheduling a single task.
# MAGIC
# MAGIC Before we start run the following cell to get the values used in this step.
# COMMAND ----------
print_job_config()
# COMMAND ----------
# MAGIC %md
# MAGIC Here, we'll start by scheduling the notebook batch job.
# MAGIC
# MAGIC Steps:
# MAGIC 1. Navigate to the Jobs UI using the Databricks left side navigation bar.
# MAGIC 1. Click the blue **Create Job** button
# MAGIC 1. Configure the task:
# MAGIC 1. Enter **Batch-Job** for the task name
# MAGIC 1. Select the notebook **DE 9.2.2L - Batch Job** using the notebook picker
# MAGIC 1. From the **Cluster** dropdown, under **Existing All Purpose Cluster**, select your cluster
# MAGIC 1. Click **Create**
# MAGIC 1. In the top-left of the screen rename the job (not the task) from **`Batch-Job`** (the defaulted value) to the **Job Name** provided for you in the previous cell.
# MAGIC 1. Click the blue **Run now** button in the top right to start the job to test the job real quick.
# MAGIC
# MAGIC <img src="https://files.training.databricks.com/images/icon_note_24.png"> **Note**: When selecting your all purpose cluster, you will get a warning about how this will be billed as all purpose compute. Production jobs should always be scheduled against new job clusters appropriately sized for the workload, as this is billed at a much lower rate.
# COMMAND ----------
# MAGIC %md
# MAGIC ## Schedule a DLT Pipeline as a Task
# MAGIC
# MAGIC In this step, we'll add a DLT pipeline to execute after the success of the task we configured at the start of this lesson.
# MAGIC
# MAGIC Steps:
# MAGIC 1. At the top left of your screen, click the **Tasks** tab if it is not already selected.
# MAGIC 1. Click the large blue circle with a **+** at the center bottom of the screen to add a new task
# MAGIC 1. Specify the **Task name** as **DLT-Pipeline**
# MAGIC 1. From **Type**, select **`Delta Live Tables pipeline`**
# MAGIC 1. Click the **Pipeline** field and select the DLT pipeline you configured previously<br/>
# MAGIC Note: The pipeline will start with **Jobs-Labs-92** and will end with your email address.
# MAGIC 1. The **Depends on** field defaults to your previously defined task but may have renamed itself from the value **reset** that you specified previously to something like **Jobs-Lab-92-youremailaddress**.
# MAGIC 1. Click the blue **Create task** button
# MAGIC
# MAGIC You should now see a screen with 2 boxes and a downward arrow between them.
# MAGIC
# MAGIC Your **`Batch-Job`** task (possibly renamed to something like **Jobs-Labs-92-youremailaddress**) will be at the top,
# MAGIC leading into your **`DLT-Pipeline`** task.
# COMMAND ----------
# MAGIC %md
# MAGIC ## Schedule an Additional Notebook Task
# MAGIC
# MAGIC An additional notebook has been provided which queries some of the DLT metrics and the gold table defined in the DLT pipeline.
# MAGIC
# MAGIC We'll add this as a final task in our job.
# MAGIC
# MAGIC Steps:
# MAGIC 1. At the top left of your screen, click the **Tasks** tab if it is not already selected.
# MAGIC 1. Click the large blue circle with a **+** at the center bottom of the screen to add a new task
# MAGIC 1. Specify the **Task name** as **Query-Results**
# MAGIC 1. Leave the **Type** set to **Notebook**
# MAGIC 1. Select the notebook **DE 9.2.4L - Query Results Job** using the notebook picker
# MAGIC 1. Note that the **Depends on** field defaults to your previously defined task, **DLT-Pipeline**
# MAGIC 1. From the **Cluster** dropdown, under **Existing All Purpose Cluster**, select your cluster
# MAGIC 1. Click the blue **Create task** button
# MAGIC
# MAGIC Click the blue **Run now** button in the top right of the screen to run this job.
# MAGIC
# MAGIC From the **Runs** tab, you will be able to click on the start time for this run under the **Active runs** section and visually track task progress.
# MAGIC
# MAGIC Once all your tasks have succeeded, review the contents of each task to confirm expected behavior.
# COMMAND ----------
# MAGIC %md-sandbox
# MAGIC © 2022 Databricks, Inc. All rights reserved.<br/>
# MAGIC Apache, Apache Spark, Spark and the Spark logo are trademarks of the <a href="https://www.apache.org/">Apache Software Foundation</a>.<br/>
# MAGIC <br/>
# MAGIC <a href="https://databricks.com/privacy-policy">Privacy Policy</a> | <a href="https://databricks.com/terms-of-use">Terms of Use</a> | <a href="https://help.databricks.com/">Support</a>
| DA.data_factory.load()
print_pipeline_config()
print_job_config() |
def join(base, path):
return ensure_trailing_separator(base) + _ensure_no_leading_separator(path)
def ensure_trailing_separator(url: str) -> str:
if not url.endswith('/'):
return url + '/'
return url
def ensure_leading_separator(url: str) -> str:
if not url.startswith('/'):
return '/' + url
return url
def _ensure_no_leading_separator(url: str) -> str:
if url.startswith('/'):
return url[1:]
return url
| def join(base, path):
return ensure_trailing_separator(base) + _ensure_no_leading_separator(path)
def ensure_trailing_separator(url: str) -> str:
if not url.endswith('/'):
return url + '/'
return url
def ensure_leading_separator(url: str) -> str:
if not url.startswith('/'):
return '/' + url
return url
def _ensure_no_leading_separator(url: str) -> str:
if url.startswith('/'):
return url[1:]
return url |
def displayEfficiencies(toShow):
table = 'Konverter Type ; Effizienz [%] ;\n'
for name , converter in toShow.items():
table += name+'; %3.2f ; \n'%converter.efficiency_percent
print(table)
def displayResults(toShow):
table = 'Konverter Type ; Effizienz [%] ;dIout [mA] ;dUout [mV];Iout [A] ;Uout [V];dIin [A] ;\n'
for converter in toShow:
table += converter.name+';%3.0f ; %3.2f ; %3.2f; %.3f ;%.3f; %.3f ; \n'%converter.getValues()
print(table)
def displayResultsTEX(toShow):
table = 'Konverter Type & Eff. [\%] & dIout [mA] &dUout [mV]&Iout [A] &Uout [V]&dIin [A] \\\\ \hline \n'
for converter in toShow:
table += ''+converter.name+'& %3.2f & %3.2f & %3.2f & %.3f & %.3f & %.3f \\\\ \n'%converter.getValues()
print(table.replace('.',',')) | def display_efficiencies(toShow):
table = 'Konverter Type ; Effizienz [%] ;\n'
for (name, converter) in toShow.items():
table += name + '; %3.2f ; \n' % converter.efficiency_percent
print(table)
def display_results(toShow):
table = 'Konverter Type ; Effizienz [%] ;dIout [mA] ;dUout [mV];Iout [A] ;Uout [V];dIin [A] ;\n'
for converter in toShow:
table += converter.name + ';%3.0f ; %3.2f ; %3.2f; %.3f ;%.3f; %.3f ; \n' % converter.getValues()
print(table)
def display_results_tex(toShow):
table = 'Konverter Type & Eff. [\\%] & dIout [mA] &dUout [mV]&Iout [A] &Uout [V]&dIin [A] \\\\ \\hline \n'
for converter in toShow:
table += '' + converter.name + '& %3.2f & %3.2f & %3.2f & %.3f & %.3f & %.3f \\\\ \n' % converter.getValues()
print(table.replace('.', ',')) |
"""
@author Huaze Shen
@date 2019-07-24
"""
def jump(nums):
if nums is None or len(nums) < 2:
return 0
level = 0
i = 0
current_max = 0
while i <= current_max:
furthest = current_max
for j in range(i, current_max + 1):
furthest = max(furthest, j + nums[j])
if furthest >= len(nums) - 1:
return level + 1
i = current_max + 1
current_max = furthest
level += 1
return -1
if __name__ == '__main__':
nums_ = [2, 3, 1, 1, 4]
print(jump(nums_))
| """
@author Huaze Shen
@date 2019-07-24
"""
def jump(nums):
if nums is None or len(nums) < 2:
return 0
level = 0
i = 0
current_max = 0
while i <= current_max:
furthest = current_max
for j in range(i, current_max + 1):
furthest = max(furthest, j + nums[j])
if furthest >= len(nums) - 1:
return level + 1
i = current_max + 1
current_max = furthest
level += 1
return -1
if __name__ == '__main__':
nums_ = [2, 3, 1, 1, 4]
print(jump(nums_)) |
status=False
batas=4
pengguna =["Rosnia La Bania"]
kata_sandi =["12345678"]
while batas > 0:
pwd1=input("masukkan nama pengguna: ")
pwd2=input("masukkan kata sandi anda: ")
for pengguna in pengguna:
for kata_sandi in kata_sandi:
if pwd1 == pengguna and kata_sandi == kata_sandi:
print("selamat anda berhasil masuk di server BANK BRI")
status=True
break
if not status:
print("nama pengguna & kata_sandi yang anda masukan salah, silahkan login kembali")
batas=batas -1
continue
else:
break
| status = False
batas = 4
pengguna = ['Rosnia La Bania']
kata_sandi = ['12345678']
while batas > 0:
pwd1 = input('masukkan nama pengguna: ')
pwd2 = input('masukkan kata sandi anda: ')
for pengguna in pengguna:
for kata_sandi in kata_sandi:
if pwd1 == pengguna and kata_sandi == kata_sandi:
print('selamat anda berhasil masuk di server BANK BRI')
status = True
break
if not status:
print('nama pengguna & kata_sandi yang anda masukan salah, silahkan login kembali')
batas = batas - 1
continue
else:
break |
# Copyright 2014 Midokura SARL
#
# 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.
"""
Provides utility functions.
"""
def ping4_cmd(ipv4_addr, interval=0.5, count=3, size=56):
"""Constructs a ping command line to an IPv4 address."""
return 'ping -i {0} -c {1} -s {2} {3}'.format(interval,
count,
size,
ipv4_addr) | """
Provides utility functions.
"""
def ping4_cmd(ipv4_addr, interval=0.5, count=3, size=56):
"""Constructs a ping command line to an IPv4 address."""
return 'ping -i {0} -c {1} -s {2} {3}'.format(interval, count, size, ipv4_addr) |
# These are all from IS-GPS-200G unless otherwise noted
SPEED_OF_LIGHT = 2.99792458e8 # m/s
# Physical parameters of the Earth
EARTH_GM = 3.986005e14 # m^3/s^2 (gravitational constant * mass of earth)
EARTH_RADIUS = 6.3781e6 # m
EARTH_ROTATION_RATE = 7.2921151467e-005 # rad/s (WGS84 earth rotation rate)
# GPS system parameters:
GPS_L1 = l1 = 1.57542e9 # Hz
GPS_L2 = l2 = 1.22760e9 # Hz
#GLONASS system parameters
#TODO this is old convention
GLONASS_L1 = 1.602e9
GLONASS_L1_DELTA = 0.5625e6
GLONASS_L2 = 1.246e9
GLONASS_L2_DELTA = 0.4375e6
SECS_IN_MIN = 60
SECS_IN_HR = 60*SECS_IN_MIN
SECS_IN_DAY = 24*SECS_IN_HR
SECS_IN_WEEK = 7*SECS_IN_DAY
SECS_IN_YEAR = 365*SECS_IN_DAY
| speed_of_light = 299792458.0
earth_gm = 398600500000000.0
earth_radius = 6378100.0
earth_rotation_rate = 7.2921151467e-05
gps_l1 = l1 = 1575420000.0
gps_l2 = l2 = 1227600000.0
glonass_l1 = 1602000000.0
glonass_l1_delta = 562500.0
glonass_l2 = 1246000000.0
glonass_l2_delta = 437500.0
secs_in_min = 60
secs_in_hr = 60 * SECS_IN_MIN
secs_in_day = 24 * SECS_IN_HR
secs_in_week = 7 * SECS_IN_DAY
secs_in_year = 365 * SECS_IN_DAY |
"""Text-related stuff I meant to put in site-packages
"""
class FoundItem(Exception):
pass
class DataError(Exception):
pass
def splitjoin(orig, zoek, vervang):
"""
dit is een routine waarin de binnenkomende string eerst gesplitst wordt
in woorden (gescheiden door 1 of meer spaties en/of tabs e.d.);
tegelijkertijd worden de scheidende strings ook bepaald.
Daarna worden de woorden die vervangen moeten worden vervangen
en tenslotte wordt de string weer aan elkaar geplakt.
De truc is dat we de scheidende strings intact laten.
Deze routine zit ook in site-packages\mystuff.py
"""
heeftreturn = False
if orig[-1:] == "\n":
heeftreturn = True
h = orig.split()
s = orig.split(h[0]) # eerste woord eraf halen
sp = [] # list met "split's
for w in h[1:]:
s = s[1].split(w)
sp.append(s[0])
for i in enumerate(h):
if h[i[0]] == zoek:
h[i[0]] = vervang
news = ""
for i in enumerate(sp):
news = h[i[0]].join((news, i[1]))
news = news + h[-1]
if heeftreturn:
news = news + "\n"
return news
def test_splitjoin():
"""testing the previous
"""
orig = "Hallo, dit is een test"
zoek = "is"
vervang = "was"
news = splitjoin(orig, zoek, vervang)
print(orig)
print(news)
if __name__ == "__main__":
## raise FoundItem
## raise DataError
test_splitjoin()
| """Text-related stuff I meant to put in site-packages
"""
class Founditem(Exception):
pass
class Dataerror(Exception):
pass
def splitjoin(orig, zoek, vervang):
"""
dit is een routine waarin de binnenkomende string eerst gesplitst wordt
in woorden (gescheiden door 1 of meer spaties en/of tabs e.d.);
tegelijkertijd worden de scheidende strings ook bepaald.
Daarna worden de woorden die vervangen moeten worden vervangen
en tenslotte wordt de string weer aan elkaar geplakt.
De truc is dat we de scheidende strings intact laten.
Deze routine zit ook in site-packages\\mystuff.py
"""
heeftreturn = False
if orig[-1:] == '\n':
heeftreturn = True
h = orig.split()
s = orig.split(h[0])
sp = []
for w in h[1:]:
s = s[1].split(w)
sp.append(s[0])
for i in enumerate(h):
if h[i[0]] == zoek:
h[i[0]] = vervang
news = ''
for i in enumerate(sp):
news = h[i[0]].join((news, i[1]))
news = news + h[-1]
if heeftreturn:
news = news + '\n'
return news
def test_splitjoin():
"""testing the previous
"""
orig = 'Hallo, dit is een test'
zoek = 'is'
vervang = 'was'
news = splitjoin(orig, zoek, vervang)
print(orig)
print(news)
if __name__ == '__main__':
test_splitjoin() |
#!/usr/bin/python3
WTF_CSRF_ENABLED = False
SECRET_KEY = '438qwYcOwwi0QwTNBbPQPc73x'
CIPHER_GLOBAL_SEED = 42
CIPHER_KEY_LEN = 1024
| wtf_csrf_enabled = False
secret_key = '438qwYcOwwi0QwTNBbPQPc73x'
cipher_global_seed = 42
cipher_key_len = 1024 |
"""
This file sets parameters used in real-time OpenEEW algorithm
"""
# TRAVEL TIME GRID AND CALCULATION
lat_min = 13 # minimum latitude
lat_max = 23 # maximum latitude
lon_min = -106 # minimum longitude
lon_max = -90 # maximum longitude
step = 0.01 # step in degrees
eq_depth = 20 # earthquake depth
vel_model = "iasp91" # velocity model from obspy list
tt_path = "./obj/travel_times" # relative path to the travel_time folder
buffer_len = 15 # buffer_len*samp_rate must be longer than array_samp
# DETECTION
det_type = "stalta" # 'stalta' or 'ml' for machine learning
detection_model_name = "detection_model.model" # name of the ml model
STA_len = 32 # STA length in samples
LTA_len = 320 # LTA length in samples
array_samp = 352 # must be >= STA_len+LTA_len for 'stalta', or 300 for 'ml'
STALTA_thresh = 3 # threshold for STA/LTA
no_det_win = 60 # window without new detections after a detection
vert_chan = "x" # which channel is oriented in the vertical direction
sleep_time = (
1 # the detection algorithm is going to pause for this time after each loop
)
# LOCATION AND MAGNITUDE REGRESSION PARAMS
tsl_max = 20 # save/discard event after this many seconds without a new detection
assoc_win = 1 # window for associated phases
ndef_min = 4 # minimum number of station detections defining an event
sigma_type = "const" # either 'const' sigma or 'linear' function
sigma_const = 3 # overall time error (travel time + pick + cloud_time)
nya_weight = 1 # how much to weight not-yet-arrived information
nya_nos = 1 # use not-yet-arrived information for this number of seconds after the first arrival
prior_type = (
"constant" # 'constant' or 'gutenberg' if you like to start with GR distribution
)
mc = 3 # magnitude of completeness for GR distribution
b_value = 1 # b-value for GR distribution
sleep_time = 1 # the event algorithm is going to pause for this time after each loop
# a, b, c, std params in M = a*pd + b, c is distance normalization, std is pd scatter
mag1 = (1.67, 5.68, 1, 0.85)
mag2 = (1.56, 5.47, 1, 0.74)
mag3 = (1.44, 5.35, 1, 0.66)
mag4 = (1.41, 5.32, 1, 0.59)
mag5 = (1.41, 5.29, 1, 0.57)
mag6 = (1.35, 5.22, 1, 0.51)
mag7 = (1.45, 5.24, 1, 0.57)
mag8 = (1.39, 5.21, 1, 0.52)
mag9 = (1.32, 5.19, 1, 0.47)
params = {
"lat_min": lat_min,
"lat_max": lat_max,
"lon_min": lon_min,
"lon_max": lon_max,
"step": step,
"vel_model": vel_model,
"eq_depth": eq_depth,
"tt_path": tt_path,
"det_type": det_type,
"STA_len": STA_len,
"LTA_len": LTA_len,
"STALTA_thresh": STALTA_thresh,
"no_det_win": no_det_win,
"vert_chan": vert_chan,
"array_samp": array_samp,
"detection_model_name": detection_model_name,
"buffer_len": buffer_len,
"sleep_time": sleep_time,
"mag1": mag1,
"mag2": mag2,
"mag3": mag3,
"mag4": mag4,
"mag5": mag5,
"mag6": mag6,
"mag7": mag7,
"mag8": mag8,
"mag9": mag9,
"tsl_max": tsl_max,
"ndef_min": ndef_min,
"sigma_const": sigma_const,
"sigma_type": sigma_type,
"nya_weight": nya_weight,
"nya_nos": nya_nos,
"prior_type": prior_type,
"mc": mc,
"b_value": b_value,
"assoc_win": assoc_win,
"eq_depth": eq_depth,
"sleep_time": sleep_time,
}
| """
This file sets parameters used in real-time OpenEEW algorithm
"""
lat_min = 13
lat_max = 23
lon_min = -106
lon_max = -90
step = 0.01
eq_depth = 20
vel_model = 'iasp91'
tt_path = './obj/travel_times'
buffer_len = 15
det_type = 'stalta'
detection_model_name = 'detection_model.model'
sta_len = 32
lta_len = 320
array_samp = 352
stalta_thresh = 3
no_det_win = 60
vert_chan = 'x'
sleep_time = 1
tsl_max = 20
assoc_win = 1
ndef_min = 4
sigma_type = 'const'
sigma_const = 3
nya_weight = 1
nya_nos = 1
prior_type = 'constant'
mc = 3
b_value = 1
sleep_time = 1
mag1 = (1.67, 5.68, 1, 0.85)
mag2 = (1.56, 5.47, 1, 0.74)
mag3 = (1.44, 5.35, 1, 0.66)
mag4 = (1.41, 5.32, 1, 0.59)
mag5 = (1.41, 5.29, 1, 0.57)
mag6 = (1.35, 5.22, 1, 0.51)
mag7 = (1.45, 5.24, 1, 0.57)
mag8 = (1.39, 5.21, 1, 0.52)
mag9 = (1.32, 5.19, 1, 0.47)
params = {'lat_min': lat_min, 'lat_max': lat_max, 'lon_min': lon_min, 'lon_max': lon_max, 'step': step, 'vel_model': vel_model, 'eq_depth': eq_depth, 'tt_path': tt_path, 'det_type': det_type, 'STA_len': STA_len, 'LTA_len': LTA_len, 'STALTA_thresh': STALTA_thresh, 'no_det_win': no_det_win, 'vert_chan': vert_chan, 'array_samp': array_samp, 'detection_model_name': detection_model_name, 'buffer_len': buffer_len, 'sleep_time': sleep_time, 'mag1': mag1, 'mag2': mag2, 'mag3': mag3, 'mag4': mag4, 'mag5': mag5, 'mag6': mag6, 'mag7': mag7, 'mag8': mag8, 'mag9': mag9, 'tsl_max': tsl_max, 'ndef_min': ndef_min, 'sigma_const': sigma_const, 'sigma_type': sigma_type, 'nya_weight': nya_weight, 'nya_nos': nya_nos, 'prior_type': prior_type, 'mc': mc, 'b_value': b_value, 'assoc_win': assoc_win, 'eq_depth': eq_depth, 'sleep_time': sleep_time} |
r"""
Enumerated sets of partitions, tableaux, ...
============================================
Quickref
--------
Catalog
-------
- :ref:`sage.combinat.partition`
- :ref:`sage.combinat.tableau`
- :ref:`sage.combinat.partition_tuple`
- :ref:`sage.combinat.tableau_tuple`
- :ref:`sage.combinat.skew_partition`
- :ref:`sage.combinat.skew_tableau`
- :ref:`sage.combinat.ribbon`
- :ref:`sage.combinat.ribbon_tableau`
- :ref:`sage.combinat.core`
- :ref:`sage.combinat.k_tableau`
- :ref:`sage.combinat.rsk`
- :ref:`sage.combinat.tableau_residues`
"""
| """
Enumerated sets of partitions, tableaux, ...
============================================
Quickref
--------
Catalog
-------
- :ref:`sage.combinat.partition`
- :ref:`sage.combinat.tableau`
- :ref:`sage.combinat.partition_tuple`
- :ref:`sage.combinat.tableau_tuple`
- :ref:`sage.combinat.skew_partition`
- :ref:`sage.combinat.skew_tableau`
- :ref:`sage.combinat.ribbon`
- :ref:`sage.combinat.ribbon_tableau`
- :ref:`sage.combinat.core`
- :ref:`sage.combinat.k_tableau`
- :ref:`sage.combinat.rsk`
- :ref:`sage.combinat.tableau_residues`
""" |
class Faxes:
""" 2600hz Kazoo Menus API.
:param rest_request: The request client to use.
(optional, default: pykazoo.RestRequest())
:type rest_request: pykazoo.restrequest.RestRequest
"""
def __init__(self, rest_request):
self.rest_request = rest_request
def get_faxes(self, account_id, filters=None):
""" Get all Outgoing Faxes for an Account.
:param account_id: ID of Account to get menus for.
:param filters: Kazoo Filter Parameters (see official API docs).
:return: Kazoo Data (see official API docs).
:type account_id: str
:type filters: dict, None
:rtype: dict
"""
return self.rest_request.get('accounts/' + str(account_id) +
'/faxes/outgoing', filters)
def create_fax(self, account_id, data):
""" Send an Outgoing Fax
:param account_id: ID of Account to create an Outgoing Fax for.
:param data: Kazoo Device data (see official API Docs).
:return: Kazoo Data (see official API docs).
:type account_id: str
:type data: dict
:rtype: dict
"""
return self.rest_request.put('accounts/' + str(account_id) +
'/faxes/outgoing', data)
| class Faxes:
""" 2600hz Kazoo Menus API.
:param rest_request: The request client to use.
(optional, default: pykazoo.RestRequest())
:type rest_request: pykazoo.restrequest.RestRequest
"""
def __init__(self, rest_request):
self.rest_request = rest_request
def get_faxes(self, account_id, filters=None):
""" Get all Outgoing Faxes for an Account.
:param account_id: ID of Account to get menus for.
:param filters: Kazoo Filter Parameters (see official API docs).
:return: Kazoo Data (see official API docs).
:type account_id: str
:type filters: dict, None
:rtype: dict
"""
return self.rest_request.get('accounts/' + str(account_id) + '/faxes/outgoing', filters)
def create_fax(self, account_id, data):
""" Send an Outgoing Fax
:param account_id: ID of Account to create an Outgoing Fax for.
:param data: Kazoo Device data (see official API Docs).
:return: Kazoo Data (see official API docs).
:type account_id: str
:type data: dict
:rtype: dict
"""
return self.rest_request.put('accounts/' + str(account_id) + '/faxes/outgoing', data) |
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Various package dependency constants used in de/serialization."""
# Node-specific constants
CLASSES = 'classes' # Internal classes of a package.
# Edge-specific constants.
CLASS_EDGES = 'class_edges' # The class edges comprising a package edge.
| """Various package dependency constants used in de/serialization."""
classes = 'classes'
class_edges = 'class_edges' |
#!/usr/bin/python
# A comment, this is so you can read your program later
print("Blablabla ....");
print ("Not exactly done what is mentioned in the book")
| print('Blablabla ....')
print('Not exactly done what is mentioned in the book') |
#
# PySNMP MIB module HH3C-VOICE-VLAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-VOICE-VLAN-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:30:26 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)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection")
hh3cCommon, = mibBuilder.importSymbols("HH3C-OID-MIB", "hh3cCommon")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, MibIdentifier, TimeTicks, Counter32, ObjectIdentity, iso, Gauge32, Unsigned32, NotificationType, ModuleIdentity, Bits, Integer32, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "MibIdentifier", "TimeTicks", "Counter32", "ObjectIdentity", "iso", "Gauge32", "Unsigned32", "NotificationType", "ModuleIdentity", "Bits", "Integer32", "IpAddress")
TruthValue, DisplayString, RowStatus, MacAddress, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "DisplayString", "RowStatus", "MacAddress", "TextualConvention")
hh3cVoiceVlan = ModuleIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 9))
hh3cVoiceVlan.setRevisions(('2009-05-15 00:00', '2002-07-01 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: hh3cVoiceVlan.setRevisionsDescriptions(('To fix bugs in the MIB file.', 'The initial revision of this MIB module.',))
if mibBuilder.loadTexts: hh3cVoiceVlan.setLastUpdated('200905150000Z')
if mibBuilder.loadTexts: hh3cVoiceVlan.setOrganization('HH3C Tech, Inc.')
if mibBuilder.loadTexts: hh3cVoiceVlan.setContactInfo('Platform Team Beijing Institute HH3C Tech, Inc.')
if mibBuilder.loadTexts: hh3cVoiceVlan.setDescription('This MIB contains objects to manage the voice vlan operations, which is used on lanswitch products. ')
class PortList(TextualConvention, OctetString):
description = "Each octet within this value specifies a set of eight ports, with the first octet specifying ports 1 through 8, the second octet specifying ports 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered port, and the least significant bit represents the highest numbered port. Thus, each port of the bridge is represented by a single bit within the value of this object. If that bit has a value of '1' then that port is included in the set of ports; the port is not included if its bit has a value of '0'."
status = 'current'
hh3cvoiceVlanOuiTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 9, 1), )
if mibBuilder.loadTexts: hh3cvoiceVlanOuiTable.setStatus('current')
if mibBuilder.loadTexts: hh3cvoiceVlanOuiTable.setDescription(' A table containing the mac address which can be identified by voice vlan ')
hh3cvoiceVlanOuiEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 9, 1, 1), ).setIndexNames((0, "HH3C-VOICE-VLAN-MIB", "hh3cVoiceVlanOuiAddress"))
if mibBuilder.loadTexts: hh3cvoiceVlanOuiEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cvoiceVlanOuiEntry.setDescription(' A table containing the mac address which can be identified by voice vlan ')
hh3cVoiceVlanOuiAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 9, 1, 1, 1), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cVoiceVlanOuiAddress.setStatus('current')
if mibBuilder.loadTexts: hh3cVoiceVlanOuiAddress.setDescription(' Mac address can be identified by voice vlan ')
hh3cVoiceVlanOuiMask = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 9, 1, 1, 2), MacAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cVoiceVlanOuiMask.setStatus('current')
if mibBuilder.loadTexts: hh3cVoiceVlanOuiMask.setDescription(' The mask of mac address ')
hh3cVoiceVlanOuiDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 9, 1, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cVoiceVlanOuiDescription.setStatus('current')
if mibBuilder.loadTexts: hh3cVoiceVlanOuiDescription.setDescription(' The description of oui ')
hh3cVoiceVlanOuiRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 9, 1, 1, 4), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: hh3cVoiceVlanOuiRowStatus.setStatus('current')
if mibBuilder.loadTexts: hh3cVoiceVlanOuiRowStatus.setDescription(' Current operation status of the row ')
hh3cVoiceVlanEnabledId = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 9, 2), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cVoiceVlanEnabledId.setStatus('current')
if mibBuilder.loadTexts: hh3cVoiceVlanEnabledId.setDescription(' Voice vlan enable status: enabled (2..4095), disabled (0xffffffff) ')
hh3cVoiceVlanPortEnableList = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 9, 3), PortList()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cVoiceVlanPortEnableList.setStatus('current')
if mibBuilder.loadTexts: hh3cVoiceVlanPortEnableList.setDescription(' Portlist of voice vlan enabled ports ')
hh3cVoiceVlanAgingTime = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 9, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(5, 43200)).clone(1440)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cVoiceVlanAgingTime.setStatus('current')
if mibBuilder.loadTexts: hh3cVoiceVlanAgingTime.setDescription(' Voice vlan aging time, the unit of which is minute')
hh3cVoiceVlanConfigState = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 9, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("auto", 1), ("manual", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cVoiceVlanConfigState.setStatus('current')
if mibBuilder.loadTexts: hh3cVoiceVlanConfigState.setDescription(' Voice vlan configuration mode status ')
hh3cVoiceVlanSecurityState = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 9, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("security", 1), ("normal", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cVoiceVlanSecurityState.setStatus('current')
if mibBuilder.loadTexts: hh3cVoiceVlanSecurityState.setDescription(' Voice vlan security mode status ')
hh3cvoiceVlanPortTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 9, 7), )
if mibBuilder.loadTexts: hh3cvoiceVlanPortTable.setStatus('current')
if mibBuilder.loadTexts: hh3cvoiceVlanPortTable.setDescription(' A list of voice vlan mode entries.')
hh3cvoiceVlanPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 9, 7, 1), ).setIndexNames((0, "HH3C-VOICE-VLAN-MIB", "hh3cVoiceVlanPortifIndex"))
if mibBuilder.loadTexts: hh3cvoiceVlanPortEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cvoiceVlanPortEntry.setDescription(' An entry containing voice vlan mode information, which is applicable to a voice vlan enabled interface.')
hh3cVoiceVlanPortifIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 9, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: hh3cVoiceVlanPortifIndex.setReference('ifIndex in RFC1213')
if mibBuilder.loadTexts: hh3cVoiceVlanPortifIndex.setStatus('current')
if mibBuilder.loadTexts: hh3cVoiceVlanPortifIndex.setDescription(' The index of interface on which voice vlan function is enabled.')
hh3cVoiceVlanPortMode = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 9, 7, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("auto", 1), ("manual", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cVoiceVlanPortMode.setStatus('current')
if mibBuilder.loadTexts: hh3cVoiceVlanPortMode.setDescription(' Voice vlan configuration mode status, which is applicable to a voice vlan enabled interface.')
hh3cVoiceVlanPortLegacy = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 9, 7, 1, 3), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cVoiceVlanPortLegacy.setStatus('current')
if mibBuilder.loadTexts: hh3cVoiceVlanPortLegacy.setDescription(' Voice vlan configuration legacy status, which is applicable to a voice vlan enabled interface.')
hh3cVoiceVlanPortQosTrust = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 9, 7, 1, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cVoiceVlanPortQosTrust.setStatus('current')
if mibBuilder.loadTexts: hh3cVoiceVlanPortQosTrust.setDescription(' Voice vlan configuration qos trust status, which is applicable to a voice vlan enabled interface.')
mibBuilder.exportSymbols("HH3C-VOICE-VLAN-MIB", hh3cVoiceVlanPortQosTrust=hh3cVoiceVlanPortQosTrust, hh3cVoiceVlanOuiMask=hh3cVoiceVlanOuiMask, hh3cvoiceVlanOuiEntry=hh3cvoiceVlanOuiEntry, hh3cVoiceVlanOuiDescription=hh3cVoiceVlanOuiDescription, hh3cVoiceVlanConfigState=hh3cVoiceVlanConfigState, PYSNMP_MODULE_ID=hh3cVoiceVlan, hh3cVoiceVlan=hh3cVoiceVlan, hh3cVoiceVlanAgingTime=hh3cVoiceVlanAgingTime, hh3cVoiceVlanSecurityState=hh3cVoiceVlanSecurityState, hh3cVoiceVlanPortEnableList=hh3cVoiceVlanPortEnableList, hh3cVoiceVlanOuiAddress=hh3cVoiceVlanOuiAddress, hh3cvoiceVlanPortEntry=hh3cvoiceVlanPortEntry, hh3cVoiceVlanEnabledId=hh3cVoiceVlanEnabledId, PortList=PortList, hh3cvoiceVlanPortTable=hh3cvoiceVlanPortTable, hh3cVoiceVlanPortLegacy=hh3cVoiceVlanPortLegacy, hh3cvoiceVlanOuiTable=hh3cvoiceVlanOuiTable, hh3cVoiceVlanOuiRowStatus=hh3cVoiceVlanOuiRowStatus, hh3cVoiceVlanPortifIndex=hh3cVoiceVlanPortifIndex, hh3cVoiceVlanPortMode=hh3cVoiceVlanPortMode)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, value_size_constraint, constraints_union, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ConstraintsIntersection')
(hh3c_common,) = mibBuilder.importSymbols('HH3C-OID-MIB', 'hh3cCommon')
(snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, mib_identifier, time_ticks, counter32, object_identity, iso, gauge32, unsigned32, notification_type, module_identity, bits, integer32, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'MibIdentifier', 'TimeTicks', 'Counter32', 'ObjectIdentity', 'iso', 'Gauge32', 'Unsigned32', 'NotificationType', 'ModuleIdentity', 'Bits', 'Integer32', 'IpAddress')
(truth_value, display_string, row_status, mac_address, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'DisplayString', 'RowStatus', 'MacAddress', 'TextualConvention')
hh3c_voice_vlan = module_identity((1, 3, 6, 1, 4, 1, 25506, 2, 9))
hh3cVoiceVlan.setRevisions(('2009-05-15 00:00', '2002-07-01 00:00'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
hh3cVoiceVlan.setRevisionsDescriptions(('To fix bugs in the MIB file.', 'The initial revision of this MIB module.'))
if mibBuilder.loadTexts:
hh3cVoiceVlan.setLastUpdated('200905150000Z')
if mibBuilder.loadTexts:
hh3cVoiceVlan.setOrganization('HH3C Tech, Inc.')
if mibBuilder.loadTexts:
hh3cVoiceVlan.setContactInfo('Platform Team Beijing Institute HH3C Tech, Inc.')
if mibBuilder.loadTexts:
hh3cVoiceVlan.setDescription('This MIB contains objects to manage the voice vlan operations, which is used on lanswitch products. ')
class Portlist(TextualConvention, OctetString):
description = "Each octet within this value specifies a set of eight ports, with the first octet specifying ports 1 through 8, the second octet specifying ports 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered port, and the least significant bit represents the highest numbered port. Thus, each port of the bridge is represented by a single bit within the value of this object. If that bit has a value of '1' then that port is included in the set of ports; the port is not included if its bit has a value of '0'."
status = 'current'
hh3cvoice_vlan_oui_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 9, 1))
if mibBuilder.loadTexts:
hh3cvoiceVlanOuiTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cvoiceVlanOuiTable.setDescription(' A table containing the mac address which can be identified by voice vlan ')
hh3cvoice_vlan_oui_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 9, 1, 1)).setIndexNames((0, 'HH3C-VOICE-VLAN-MIB', 'hh3cVoiceVlanOuiAddress'))
if mibBuilder.loadTexts:
hh3cvoiceVlanOuiEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cvoiceVlanOuiEntry.setDescription(' A table containing the mac address which can be identified by voice vlan ')
hh3c_voice_vlan_oui_address = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 9, 1, 1, 1), mac_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cVoiceVlanOuiAddress.setStatus('current')
if mibBuilder.loadTexts:
hh3cVoiceVlanOuiAddress.setDescription(' Mac address can be identified by voice vlan ')
hh3c_voice_vlan_oui_mask = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 9, 1, 1, 2), mac_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cVoiceVlanOuiMask.setStatus('current')
if mibBuilder.loadTexts:
hh3cVoiceVlanOuiMask.setDescription(' The mask of mac address ')
hh3c_voice_vlan_oui_description = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 9, 1, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(0, 30))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cVoiceVlanOuiDescription.setStatus('current')
if mibBuilder.loadTexts:
hh3cVoiceVlanOuiDescription.setDescription(' The description of oui ')
hh3c_voice_vlan_oui_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 9, 1, 1, 4), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
hh3cVoiceVlanOuiRowStatus.setStatus('current')
if mibBuilder.loadTexts:
hh3cVoiceVlanOuiRowStatus.setDescription(' Current operation status of the row ')
hh3c_voice_vlan_enabled_id = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 9, 2), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cVoiceVlanEnabledId.setStatus('current')
if mibBuilder.loadTexts:
hh3cVoiceVlanEnabledId.setDescription(' Voice vlan enable status: enabled (2..4095), disabled (0xffffffff) ')
hh3c_voice_vlan_port_enable_list = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 9, 3), port_list()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cVoiceVlanPortEnableList.setStatus('current')
if mibBuilder.loadTexts:
hh3cVoiceVlanPortEnableList.setDescription(' Portlist of voice vlan enabled ports ')
hh3c_voice_vlan_aging_time = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 9, 4), integer32().subtype(subtypeSpec=value_range_constraint(5, 43200)).clone(1440)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cVoiceVlanAgingTime.setStatus('current')
if mibBuilder.loadTexts:
hh3cVoiceVlanAgingTime.setDescription(' Voice vlan aging time, the unit of which is minute')
hh3c_voice_vlan_config_state = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 9, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('auto', 1), ('manual', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cVoiceVlanConfigState.setStatus('current')
if mibBuilder.loadTexts:
hh3cVoiceVlanConfigState.setDescription(' Voice vlan configuration mode status ')
hh3c_voice_vlan_security_state = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 9, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('security', 1), ('normal', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cVoiceVlanSecurityState.setStatus('current')
if mibBuilder.loadTexts:
hh3cVoiceVlanSecurityState.setDescription(' Voice vlan security mode status ')
hh3cvoice_vlan_port_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 9, 7))
if mibBuilder.loadTexts:
hh3cvoiceVlanPortTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cvoiceVlanPortTable.setDescription(' A list of voice vlan mode entries.')
hh3cvoice_vlan_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 9, 7, 1)).setIndexNames((0, 'HH3C-VOICE-VLAN-MIB', 'hh3cVoiceVlanPortifIndex'))
if mibBuilder.loadTexts:
hh3cvoiceVlanPortEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cvoiceVlanPortEntry.setDescription(' An entry containing voice vlan mode information, which is applicable to a voice vlan enabled interface.')
hh3c_voice_vlan_portif_index = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 9, 7, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
hh3cVoiceVlanPortifIndex.setReference('ifIndex in RFC1213')
if mibBuilder.loadTexts:
hh3cVoiceVlanPortifIndex.setStatus('current')
if mibBuilder.loadTexts:
hh3cVoiceVlanPortifIndex.setDescription(' The index of interface on which voice vlan function is enabled.')
hh3c_voice_vlan_port_mode = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 9, 7, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('auto', 1), ('manual', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cVoiceVlanPortMode.setStatus('current')
if mibBuilder.loadTexts:
hh3cVoiceVlanPortMode.setDescription(' Voice vlan configuration mode status, which is applicable to a voice vlan enabled interface.')
hh3c_voice_vlan_port_legacy = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 9, 7, 1, 3), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cVoiceVlanPortLegacy.setStatus('current')
if mibBuilder.loadTexts:
hh3cVoiceVlanPortLegacy.setDescription(' Voice vlan configuration legacy status, which is applicable to a voice vlan enabled interface.')
hh3c_voice_vlan_port_qos_trust = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 9, 7, 1, 4), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cVoiceVlanPortQosTrust.setStatus('current')
if mibBuilder.loadTexts:
hh3cVoiceVlanPortQosTrust.setDescription(' Voice vlan configuration qos trust status, which is applicable to a voice vlan enabled interface.')
mibBuilder.exportSymbols('HH3C-VOICE-VLAN-MIB', hh3cVoiceVlanPortQosTrust=hh3cVoiceVlanPortQosTrust, hh3cVoiceVlanOuiMask=hh3cVoiceVlanOuiMask, hh3cvoiceVlanOuiEntry=hh3cvoiceVlanOuiEntry, hh3cVoiceVlanOuiDescription=hh3cVoiceVlanOuiDescription, hh3cVoiceVlanConfigState=hh3cVoiceVlanConfigState, PYSNMP_MODULE_ID=hh3cVoiceVlan, hh3cVoiceVlan=hh3cVoiceVlan, hh3cVoiceVlanAgingTime=hh3cVoiceVlanAgingTime, hh3cVoiceVlanSecurityState=hh3cVoiceVlanSecurityState, hh3cVoiceVlanPortEnableList=hh3cVoiceVlanPortEnableList, hh3cVoiceVlanOuiAddress=hh3cVoiceVlanOuiAddress, hh3cvoiceVlanPortEntry=hh3cvoiceVlanPortEntry, hh3cVoiceVlanEnabledId=hh3cVoiceVlanEnabledId, PortList=PortList, hh3cvoiceVlanPortTable=hh3cvoiceVlanPortTable, hh3cVoiceVlanPortLegacy=hh3cVoiceVlanPortLegacy, hh3cvoiceVlanOuiTable=hh3cvoiceVlanOuiTable, hh3cVoiceVlanOuiRowStatus=hh3cVoiceVlanOuiRowStatus, hh3cVoiceVlanPortifIndex=hh3cVoiceVlanPortifIndex, hh3cVoiceVlanPortMode=hh3cVoiceVlanPortMode) |
{
'target_defaults': {
'libraries': [
'-lrootdev',
],
'variables': {
'deps': [
'blkid',
'dbus-c++-1',
'glib-2.0',
'gthread-2.0',
'libbrillo-<(libbase_ver)',
'libchrome-<(libbase_ver)',
'libmetrics-<(libbase_ver)',
'libminijail',
'libudev',
],
# cros-disks uses try/catch to interact with dbus-c++.
'enable_exceptions': 1,
},
},
'targets': [
{
'target_name': 'libdisks-adaptors',
'type': 'none',
'variables': {
'xml2cpp_type': 'adaptor',
'xml2cpp_in_dir': 'dbus_bindings',
'xml2cpp_out_dir': 'include/cros-disks/dbus_adaptors',
},
'sources': [
'<(xml2cpp_in_dir)/org.chromium.CrosDisks.xml',
],
'includes': ['../common-mk/xml2cpp.gypi'],
},
{
'target_name': 'libdisks',
'type': 'static_library',
'dependencies': [
'libdisks-adaptors',
],
'sources': [
'archive_manager.cc',
'cros_disks_server.cc',
'daemon.cc',
'device_ejector.cc',
'device_event.cc',
'device_event_moderator.cc',
'device_event_queue.cc',
'disk.cc',
'disk_manager.cc',
'exfat_mounter.cc',
'external_mounter.cc',
'file_reader.cc',
'filesystem.cc',
'format_manager.cc',
'fuse_mounter.cc',
'glib_process.cc',
'metrics.cc',
'mount_entry.cc',
'mount_info.cc',
'mount_manager.cc',
'mount_options.cc',
'mounter.cc',
'ntfs_mounter.cc',
'platform.cc',
'process.cc',
'sandboxed_process.cc',
'session_manager_proxy.cc',
'system_mounter.cc',
'udev_device.cc',
'usb_device_info.cc',
],
},
{
'target_name': 'disks',
'type': 'executable',
'dependencies': ['libdisks'],
'sources': [
'main.cc',
],
},
],
'conditions': [
['USE_test == 1', {
'targets': [
{
'target_name': 'disks_testrunner',
'type': 'executable',
'dependencies': ['libdisks'],
'includes': ['../common-mk/common_test.gypi'],
'sources': [
'archive_manager_unittest.cc',
'device_event_moderator_unittest.cc',
'device_event_queue_unittest.cc',
'disk_manager_unittest.cc',
'disk_unittest.cc',
'disks_testrunner.cc',
'external_mounter_unittest.cc',
'file_reader_unittest.cc',
'format_manager_unittest.cc',
'glib_process_unittest.cc',
'metrics_unittest.cc',
'mount_info_unittest.cc',
'mount_manager_unittest.cc',
'mount_options_unittest.cc',
'mounter_unittest.cc',
'platform_unittest.cc',
'process_unittest.cc',
'system_mounter_unittest.cc',
'udev_device_unittest.cc',
'usb_device_info_unittest.cc',
],
},
],
}],
],
}
| {'target_defaults': {'libraries': ['-lrootdev'], 'variables': {'deps': ['blkid', 'dbus-c++-1', 'glib-2.0', 'gthread-2.0', 'libbrillo-<(libbase_ver)', 'libchrome-<(libbase_ver)', 'libmetrics-<(libbase_ver)', 'libminijail', 'libudev'], 'enable_exceptions': 1}}, 'targets': [{'target_name': 'libdisks-adaptors', 'type': 'none', 'variables': {'xml2cpp_type': 'adaptor', 'xml2cpp_in_dir': 'dbus_bindings', 'xml2cpp_out_dir': 'include/cros-disks/dbus_adaptors'}, 'sources': ['<(xml2cpp_in_dir)/org.chromium.CrosDisks.xml'], 'includes': ['../common-mk/xml2cpp.gypi']}, {'target_name': 'libdisks', 'type': 'static_library', 'dependencies': ['libdisks-adaptors'], 'sources': ['archive_manager.cc', 'cros_disks_server.cc', 'daemon.cc', 'device_ejector.cc', 'device_event.cc', 'device_event_moderator.cc', 'device_event_queue.cc', 'disk.cc', 'disk_manager.cc', 'exfat_mounter.cc', 'external_mounter.cc', 'file_reader.cc', 'filesystem.cc', 'format_manager.cc', 'fuse_mounter.cc', 'glib_process.cc', 'metrics.cc', 'mount_entry.cc', 'mount_info.cc', 'mount_manager.cc', 'mount_options.cc', 'mounter.cc', 'ntfs_mounter.cc', 'platform.cc', 'process.cc', 'sandboxed_process.cc', 'session_manager_proxy.cc', 'system_mounter.cc', 'udev_device.cc', 'usb_device_info.cc']}, {'target_name': 'disks', 'type': 'executable', 'dependencies': ['libdisks'], 'sources': ['main.cc']}], 'conditions': [['USE_test == 1', {'targets': [{'target_name': 'disks_testrunner', 'type': 'executable', 'dependencies': ['libdisks'], 'includes': ['../common-mk/common_test.gypi'], 'sources': ['archive_manager_unittest.cc', 'device_event_moderator_unittest.cc', 'device_event_queue_unittest.cc', 'disk_manager_unittest.cc', 'disk_unittest.cc', 'disks_testrunner.cc', 'external_mounter_unittest.cc', 'file_reader_unittest.cc', 'format_manager_unittest.cc', 'glib_process_unittest.cc', 'metrics_unittest.cc', 'mount_info_unittest.cc', 'mount_manager_unittest.cc', 'mount_options_unittest.cc', 'mounter_unittest.cc', 'platform_unittest.cc', 'process_unittest.cc', 'system_mounter_unittest.cc', 'udev_device_unittest.cc', 'usb_device_info_unittest.cc']}]}]]} |
#coding=utf-8
APIKEY = "RGAPI-6d7c4811-9073-4899-ab14-3a798d3d6f13"
class ApiUrl:
MASTER_LEAGUE_API = "/lol/league/v4/masterleagues/by-queue/"
GRANDMASTER_LEAGUE_API = "/lol/league/v4/grandmasterleagues/by-queue/"
CHALLENGER_LEAGUE_API = "/lol/league/v4/challengerleagues/by-queue/"
MATCH_API = "/lol/match/v4/matches/"
ACCOUNT_MATCH_LIST_API = "/lol/match/v4/matchlists/by-account/"
SUMMONER_DATA_API = "/lol/summoner/v4/summoners/by-name/"
SUMMONER_DATA_BY_ACCOUNT_API = "/lol/summoner/v4/summoners/by-account/"
class ApiParam:
SOLORANK = "RANKED_SOLO_5x5"
FLEXSR = "RANKED_FLEX_SR"
FLEXTT = "RANKED_FLEX_TT" | apikey = 'RGAPI-6d7c4811-9073-4899-ab14-3a798d3d6f13'
class Apiurl:
master_league_api = '/lol/league/v4/masterleagues/by-queue/'
grandmaster_league_api = '/lol/league/v4/grandmasterleagues/by-queue/'
challenger_league_api = '/lol/league/v4/challengerleagues/by-queue/'
match_api = '/lol/match/v4/matches/'
account_match_list_api = '/lol/match/v4/matchlists/by-account/'
summoner_data_api = '/lol/summoner/v4/summoners/by-name/'
summoner_data_by_account_api = '/lol/summoner/v4/summoners/by-account/'
class Apiparam:
solorank = 'RANKED_SOLO_5x5'
flexsr = 'RANKED_FLEX_SR'
flextt = 'RANKED_FLEX_TT' |
class PathReinforcement(Element,IDisposable):
""" An object that represents an Path Reinforcement within the Autodesk Revit project. """
@staticmethod
def Create(document,hostElement,curveArray,flip,pathReinforcementTypeId,rebarBarTypeId,startRebarHookTypeId,endRebarHookTypeId,rebarShapeId=None):
"""
Create(document: Document,hostElement: Element,curveArray: IList[Curve],flip: bool,pathReinforcementTypeId: ElementId,rebarBarTypeId: ElementId,startRebarHookTypeId: ElementId,endRebarHookTypeId: ElementId) -> PathReinforcement
Create(document: Document,hostElement: Element,curveArray: IList[Curve],flip: bool,pathReinforcementTypeId: ElementId,rebarBarTypeId: ElementId,startRebarHookTypeId: ElementId,endRebarHookTypeId: ElementId,rebarShapeId: ElementId) -> PathReinforcement
"""
pass
def Dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def getBoundingBox(self,*args):
""" getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ """
pass
def GetCurveElementIds(self):
"""
GetCurveElementIds(self: PathReinforcement) -> IList[ElementId]
Retrieves the set of ElementIds of curves forming the boundary of the Path
Reinforcement.
Returns: A collection of ElementIds of ModelCurve elements.
"""
pass
def GetHostId(self):
"""
GetHostId(self: PathReinforcement) -> ElementId
The element that contains the Path Reinforcement.
Returns: The element that the Path Reinforcement object belongs to,such as a structural
wall,floor or foundation.
"""
pass
@staticmethod
def GetOrCreateDefaultRebarShape(document,rebarBarTypeId,startRebarHookTypeId,endRebarHookTypeId):
"""
GetOrCreateDefaultRebarShape(document: Document,rebarBarTypeId: ElementId,startRebarHookTypeId: ElementId,endRebarHookTypeId: ElementId) -> ElementId
Creates a new RebarShape object with a default name or
returns existing one
which fulfills Path Reinforcement bending data requirements.
document: The document.
rebarBarTypeId: The id of the RebarBarType.
startRebarHookTypeId: The id of the RebarHookType for the start of the bar.
If this parameter is
InvalidElementId,it means to create a rebar with no start hook.
endRebarHookTypeId: The id of the RebarHookType for the end of the bar.
If this parameter is
InvalidElementId,it means to create a rebar with no end hook.
Returns: Rebar Shape id.
"""
pass
def GetRebarInSystemIds(self):
"""
GetRebarInSystemIds(self: PathReinforcement) -> IList[ElementId]
Returns the ids of the RebarInSystem elements owned by the PathReinforcement
element.
"""
pass
def IsAlternatingLayerEnabled(self):
"""
IsAlternatingLayerEnabled(self: PathReinforcement) -> bool
Checks if alternating bars are present in Path Reinforcement.
Returns: True if the alternating bars exist in Path Reinforcement instance.
"""
pass
def IsSolidInView(self,view):
"""
IsSolidInView(self: PathReinforcement,view: View3D) -> bool
Checks if this Path Reinforcement is shown solidly in a 3D view.
view: The 3D view element
Returns: True if Path Reinforcement is shown solidly,false otherwise.
"""
pass
def IsUnobscuredInView(self,view):
"""
IsUnobscuredInView(self: PathReinforcement,view: View) -> bool
Checks if Path Reinforcement is shown unobscured in a view.
view: The view element
Returns: True if Path Reinforcement is shown unobscured,false otherwise.
"""
pass
def IsValidAlternatingBarOrientation(self,orientation):
"""
IsValidAlternatingBarOrientation(self: PathReinforcement,orientation: ReinforcementBarOrientation) -> bool
Checks if orientation for alternating bars is valid.
orientation: An orientation.
Returns: True if orientation for alternating bars are valid.
"""
pass
def IsValidPrimaryBarOrientation(self,orientation):
"""
IsValidPrimaryBarOrientation(self: PathReinforcement,orientation: ReinforcementBarOrientation) -> bool
Checks if orientation for primary bars is valid.
orientation: An orientation.
Returns: True if orientation for primary bars are valid.
"""
pass
@staticmethod
def IsValidRebarShapeId(aDoc,elementId):
"""
IsValidRebarShapeId(aDoc: Document,elementId: ElementId) -> bool
Identifies whether an element id corresponds to a Rebar Shape element which can
be used in Path Reinforcement.
aDoc: The document.
elementId: An element id.
Returns: True if the specified element id corresponds to a Rebar Shape element.
"""
pass
def ReleaseUnmanagedResources(self,*args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
@staticmethod
def RemovePathReinforcementSystem(doc,system):
"""
RemovePathReinforcementSystem(doc: Document,system: PathReinforcement) -> IList[ElementId]
Deletes the specified PathReinforcement,and converts its RebarInSystem
elements to equivalent Rebar elements.
doc: The document.
system: A PathReinforcement element in the document.
Returns: The ids of the newly created Rebar elements.
"""
pass
def setElementType(self,*args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def SetSolidInView(self,view,solid):
"""
SetSolidInView(self: PathReinforcement,view: View3D,solid: bool)
Sets this Path Reinforcement to be shown solidly in a 3D view.
view: The 3D view element
solid: True if Path Reinforcement is shown solidly,false otherwise.
"""
pass
def SetUnobscuredInView(self,view,unobscured):
"""
SetUnobscuredInView(self: PathReinforcement,view: View,unobscured: bool)
Sets Path Reinforcement to be shown unobscured in a view.
view: The view element
unobscured: True if Path Reinforcement is shown unobscured,false otherwise.
"""
pass
def __enter__(self,*args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self,*args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
AdditionalOffset=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Additional offset of rebars in the Path Reinforcement.
Get: AdditionalOffset(self: PathReinforcement) -> float
Set: AdditionalOffset(self: PathReinforcement)=value
"""
AlternatingBarOrientation=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Orientation of alternating bars of Path Reinforcement.
Get: AlternatingBarOrientation(self: PathReinforcement) -> ReinforcementBarOrientation
Set: AlternatingBarOrientation(self: PathReinforcement)=value
"""
AlternatingBarShapeId=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The RebarShape element that defines the shape of the alternating bars of the Path Reinforcement.
Get: AlternatingBarShapeId(self: PathReinforcement) -> ElementId
Set: AlternatingBarShapeId(self: PathReinforcement)=value
"""
PathReinforcementType=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Retrieves the type of the Path Reinforcement.
Get: PathReinforcementType(self: PathReinforcement) -> PathReinforcementType
"""
PrimaryBarOrientation=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Orientation of primary bars of Path Reinforcement.
Get: PrimaryBarOrientation(self: PathReinforcement) -> ReinforcementBarOrientation
Set: PrimaryBarOrientation(self: PathReinforcement)=value
"""
PrimaryBarShapeId=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The RebarShape element that defines the shape of the primary bars of the Path Reinforcement.
Get: PrimaryBarShapeId(self: PathReinforcement) -> ElementId
Set: PrimaryBarShapeId(self: PathReinforcement)=value
"""
| class Pathreinforcement(Element, IDisposable):
""" An object that represents an Path Reinforcement within the Autodesk Revit project. """
@staticmethod
def create(document, hostElement, curveArray, flip, pathReinforcementTypeId, rebarBarTypeId, startRebarHookTypeId, endRebarHookTypeId, rebarShapeId=None):
"""
Create(document: Document,hostElement: Element,curveArray: IList[Curve],flip: bool,pathReinforcementTypeId: ElementId,rebarBarTypeId: ElementId,startRebarHookTypeId: ElementId,endRebarHookTypeId: ElementId) -> PathReinforcement
Create(document: Document,hostElement: Element,curveArray: IList[Curve],flip: bool,pathReinforcementTypeId: ElementId,rebarBarTypeId: ElementId,startRebarHookTypeId: ElementId,endRebarHookTypeId: ElementId,rebarShapeId: ElementId) -> PathReinforcement
"""
pass
def dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def get_bounding_box(self, *args):
""" getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ """
pass
def get_curve_element_ids(self):
"""
GetCurveElementIds(self: PathReinforcement) -> IList[ElementId]
Retrieves the set of ElementIds of curves forming the boundary of the Path
Reinforcement.
Returns: A collection of ElementIds of ModelCurve elements.
"""
pass
def get_host_id(self):
"""
GetHostId(self: PathReinforcement) -> ElementId
The element that contains the Path Reinforcement.
Returns: The element that the Path Reinforcement object belongs to,such as a structural
wall,floor or foundation.
"""
pass
@staticmethod
def get_or_create_default_rebar_shape(document, rebarBarTypeId, startRebarHookTypeId, endRebarHookTypeId):
"""
GetOrCreateDefaultRebarShape(document: Document,rebarBarTypeId: ElementId,startRebarHookTypeId: ElementId,endRebarHookTypeId: ElementId) -> ElementId
Creates a new RebarShape object with a default name or
returns existing one
which fulfills Path Reinforcement bending data requirements.
document: The document.
rebarBarTypeId: The id of the RebarBarType.
startRebarHookTypeId: The id of the RebarHookType for the start of the bar.
If this parameter is
InvalidElementId,it means to create a rebar with no start hook.
endRebarHookTypeId: The id of the RebarHookType for the end of the bar.
If this parameter is
InvalidElementId,it means to create a rebar with no end hook.
Returns: Rebar Shape id.
"""
pass
def get_rebar_in_system_ids(self):
"""
GetRebarInSystemIds(self: PathReinforcement) -> IList[ElementId]
Returns the ids of the RebarInSystem elements owned by the PathReinforcement
element.
"""
pass
def is_alternating_layer_enabled(self):
"""
IsAlternatingLayerEnabled(self: PathReinforcement) -> bool
Checks if alternating bars are present in Path Reinforcement.
Returns: True if the alternating bars exist in Path Reinforcement instance.
"""
pass
def is_solid_in_view(self, view):
"""
IsSolidInView(self: PathReinforcement,view: View3D) -> bool
Checks if this Path Reinforcement is shown solidly in a 3D view.
view: The 3D view element
Returns: True if Path Reinforcement is shown solidly,false otherwise.
"""
pass
def is_unobscured_in_view(self, view):
"""
IsUnobscuredInView(self: PathReinforcement,view: View) -> bool
Checks if Path Reinforcement is shown unobscured in a view.
view: The view element
Returns: True if Path Reinforcement is shown unobscured,false otherwise.
"""
pass
def is_valid_alternating_bar_orientation(self, orientation):
"""
IsValidAlternatingBarOrientation(self: PathReinforcement,orientation: ReinforcementBarOrientation) -> bool
Checks if orientation for alternating bars is valid.
orientation: An orientation.
Returns: True if orientation for alternating bars are valid.
"""
pass
def is_valid_primary_bar_orientation(self, orientation):
"""
IsValidPrimaryBarOrientation(self: PathReinforcement,orientation: ReinforcementBarOrientation) -> bool
Checks if orientation for primary bars is valid.
orientation: An orientation.
Returns: True if orientation for primary bars are valid.
"""
pass
@staticmethod
def is_valid_rebar_shape_id(aDoc, elementId):
"""
IsValidRebarShapeId(aDoc: Document,elementId: ElementId) -> bool
Identifies whether an element id corresponds to a Rebar Shape element which can
be used in Path Reinforcement.
aDoc: The document.
elementId: An element id.
Returns: True if the specified element id corresponds to a Rebar Shape element.
"""
pass
def release_unmanaged_resources(self, *args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
@staticmethod
def remove_path_reinforcement_system(doc, system):
"""
RemovePathReinforcementSystem(doc: Document,system: PathReinforcement) -> IList[ElementId]
Deletes the specified PathReinforcement,and converts its RebarInSystem
elements to equivalent Rebar elements.
doc: The document.
system: A PathReinforcement element in the document.
Returns: The ids of the newly created Rebar elements.
"""
pass
def set_element_type(self, *args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def set_solid_in_view(self, view, solid):
"""
SetSolidInView(self: PathReinforcement,view: View3D,solid: bool)
Sets this Path Reinforcement to be shown solidly in a 3D view.
view: The 3D view element
solid: True if Path Reinforcement is shown solidly,false otherwise.
"""
pass
def set_unobscured_in_view(self, view, unobscured):
"""
SetUnobscuredInView(self: PathReinforcement,view: View,unobscured: bool)
Sets Path Reinforcement to be shown unobscured in a view.
view: The view element
unobscured: True if Path Reinforcement is shown unobscured,false otherwise.
"""
pass
def __enter__(self, *args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
additional_offset = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Additional offset of rebars in the Path Reinforcement.\n\n\n\nGet: AdditionalOffset(self: PathReinforcement) -> float\n\n\n\nSet: AdditionalOffset(self: PathReinforcement)=value\n\n'
alternating_bar_orientation = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Orientation of alternating bars of Path Reinforcement.\n\n\n\nGet: AlternatingBarOrientation(self: PathReinforcement) -> ReinforcementBarOrientation\n\n\n\nSet: AlternatingBarOrientation(self: PathReinforcement)=value\n\n'
alternating_bar_shape_id = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The RebarShape element that defines the shape of the alternating bars of the Path Reinforcement.\n\n\n\nGet: AlternatingBarShapeId(self: PathReinforcement) -> ElementId\n\n\n\nSet: AlternatingBarShapeId(self: PathReinforcement)=value\n\n'
path_reinforcement_type = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Retrieves the type of the Path Reinforcement.\n\n\n\nGet: PathReinforcementType(self: PathReinforcement) -> PathReinforcementType\n\n\n\n'
primary_bar_orientation = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Orientation of primary bars of Path Reinforcement.\n\n\n\nGet: PrimaryBarOrientation(self: PathReinforcement) -> ReinforcementBarOrientation\n\n\n\nSet: PrimaryBarOrientation(self: PathReinforcement)=value\n\n'
primary_bar_shape_id = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The RebarShape element that defines the shape of the primary bars of the Path Reinforcement.\n\n\n\nGet: PrimaryBarShapeId(self: PathReinforcement) -> ElementId\n\n\n\nSet: PrimaryBarShapeId(self: PathReinforcement)=value\n\n' |
class Solution:
def compress(self, chars: List[str]) -> int:
"""String.
Running time: O(n) where n == len(chars).
"""
c = 1
l, r = 0, 1
while r <= len(chars):
if r == len(chars) or chars[r] != chars[r-1]:
chars[l] = chars[r-1]
l += 1
if c > 1:
for i in str(c):
chars[l] = i
l += 1
c = 1
else:
c += 1
r += 1
return l
| class Solution:
def compress(self, chars: List[str]) -> int:
"""String.
Running time: O(n) where n == len(chars).
"""
c = 1
(l, r) = (0, 1)
while r <= len(chars):
if r == len(chars) or chars[r] != chars[r - 1]:
chars[l] = chars[r - 1]
l += 1
if c > 1:
for i in str(c):
chars[l] = i
l += 1
c = 1
else:
c += 1
r += 1
return l |
class InvalidEnumArgumentException(ArgumentException, ISerializable, _Exception):
"""
The exception thrown when using invalid arguments that are enumerators.
InvalidEnumArgumentException()
InvalidEnumArgumentException(message: str)
InvalidEnumArgumentException(message: str,innerException: Exception)
InvalidEnumArgumentException(argumentName: str,invalidValue: int,enumClass: Type)
"""
def add_SerializeObjectState(self, *args):
""" add_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """
pass
def remove_SerializeObjectState(self, *args):
""" remove_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self, *__args):
"""
__new__(cls: type)
__new__(cls: type,message: str)
__new__(cls: type,message: str,innerException: Exception)
__new__(cls: type,argumentName: str,invalidValue: int,enumClass: Type)
__new__(cls: type,info: SerializationInfo,context: StreamingContext)
"""
pass
def __reduce_ex__(self, *args):
pass
def __str__(self, *args):
pass
| class Invalidenumargumentexception(ArgumentException, ISerializable, _Exception):
"""
The exception thrown when using invalid arguments that are enumerators.
InvalidEnumArgumentException()
InvalidEnumArgumentException(message: str)
InvalidEnumArgumentException(message: str,innerException: Exception)
InvalidEnumArgumentException(argumentName: str,invalidValue: int,enumClass: Type)
"""
def add__serialize_object_state(self, *args):
""" add_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """
pass
def remove__serialize_object_state(self, *args):
""" remove_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self, *__args):
"""
__new__(cls: type)
__new__(cls: type,message: str)
__new__(cls: type,message: str,innerException: Exception)
__new__(cls: type,argumentName: str,invalidValue: int,enumClass: Type)
__new__(cls: type,info: SerializationInfo,context: StreamingContext)
"""
pass
def __reduce_ex__(self, *args):
pass
def __str__(self, *args):
pass |
# maximum of two values
def main():
print("This program compares two numbers that you entered.")
number1 = int(input("Please enter the number 1: "))
number2 = int(input("Please enter the number 2: "))
calculate_greater(number1, number2)
def calculate_greater(a, b):
if a > b:
print("The number", a, "is greater than number", b)
elif a == b:
print("The numbers are the same. The number you entered is", a)
else:
print("The number", b, "is greater than number", a)
main()
| def main():
print('This program compares two numbers that you entered.')
number1 = int(input('Please enter the number 1: '))
number2 = int(input('Please enter the number 2: '))
calculate_greater(number1, number2)
def calculate_greater(a, b):
if a > b:
print('The number', a, 'is greater than number', b)
elif a == b:
print('The numbers are the same. The number you entered is', a)
else:
print('The number', b, 'is greater than number', a)
main() |
#file config
file_fits_flux_column = "Flux column"
file_fits_time_column = "Time column"
file_fits_hdulist_column = "Data column for hdulist"
file_ascii_skiprows = "Skipped rows in ascii file"
file_ascii_use_cols = "Used columns in ascii file"
#plot conf
plot_show = "Show plots"
plot_save = "Save plots"
#general conf
general_kic = "KIC ID"
general_binary_path = "Binary path"
general_background_result_path = "Background result path"
general_background_data_path = "Background data path"
general_analysis_result_path = "Path for results"
general_nr_of_cores = "Number of cores used"
general_sequential_run = "Sequential run"
general_run_diamonds = "Run DIAMONDS"
general_check_bayes_run = "Check Bayes factor after run"
general_use_pcb = "Activate PCB"
#analysis conf
analysis_file_path = "Paths to lightcurves"
analysis_folder_prefix = "Prefix of folder"
analysis_noise_values = "Noise values for run"
analysis_target_magnitude = "Target magnitude for run"
analysis_nr_magnitude_points = "Number of magnitude points"
analysis_nr_noise_points = "Number of noise points"
analysis_number_repeats = "Number of repeats"
analysis_obs_time_value = "Target observation time"
analysis_upper_mag_limit = "Upper mag limit"
analysis_nu_max_outer_guess = "Nu max guess"
#categories
cat_general = "General"
cat_files = "Files"
cat_analysis = "Analysis"
cat_plot = "Plot"
#List of ids
analysis_list_of_ids = "List of IDs"
#Internal
internal_literature_value = "Literature value nu max"
internal_delta_nu = "Literature value delta nu"
internal_flag_worked = "Run worked flag"
internal_noise_value = "Noise value"
internal_mag_noise = "Magnitude added noise"
internal_run_number = "Run number"
internal_mag_value = "Magnitude"
internal_teff = "T_eff"
internal_path = "Working Path"
internal_force_run = "Force run"
internal_multiple_mag = "Multiple magnitudes"
internal_id = "Internal id"
internal_use_kp_mag = "Use kepler magnitude method for computing noise"
| file_fits_flux_column = 'Flux column'
file_fits_time_column = 'Time column'
file_fits_hdulist_column = 'Data column for hdulist'
file_ascii_skiprows = 'Skipped rows in ascii file'
file_ascii_use_cols = 'Used columns in ascii file'
plot_show = 'Show plots'
plot_save = 'Save plots'
general_kic = 'KIC ID'
general_binary_path = 'Binary path'
general_background_result_path = 'Background result path'
general_background_data_path = 'Background data path'
general_analysis_result_path = 'Path for results'
general_nr_of_cores = 'Number of cores used'
general_sequential_run = 'Sequential run'
general_run_diamonds = 'Run DIAMONDS'
general_check_bayes_run = 'Check Bayes factor after run'
general_use_pcb = 'Activate PCB'
analysis_file_path = 'Paths to lightcurves'
analysis_folder_prefix = 'Prefix of folder'
analysis_noise_values = 'Noise values for run'
analysis_target_magnitude = 'Target magnitude for run'
analysis_nr_magnitude_points = 'Number of magnitude points'
analysis_nr_noise_points = 'Number of noise points'
analysis_number_repeats = 'Number of repeats'
analysis_obs_time_value = 'Target observation time'
analysis_upper_mag_limit = 'Upper mag limit'
analysis_nu_max_outer_guess = 'Nu max guess'
cat_general = 'General'
cat_files = 'Files'
cat_analysis = 'Analysis'
cat_plot = 'Plot'
analysis_list_of_ids = 'List of IDs'
internal_literature_value = 'Literature value nu max'
internal_delta_nu = 'Literature value delta nu'
internal_flag_worked = 'Run worked flag'
internal_noise_value = 'Noise value'
internal_mag_noise = 'Magnitude added noise'
internal_run_number = 'Run number'
internal_mag_value = 'Magnitude'
internal_teff = 'T_eff'
internal_path = 'Working Path'
internal_force_run = 'Force run'
internal_multiple_mag = 'Multiple magnitudes'
internal_id = 'Internal id'
internal_use_kp_mag = 'Use kepler magnitude method for computing noise' |
BAD_REQUEST = 400
CREATED = 201
FORBIDDEN = 403
LAST_ID = -1
| bad_request = 400
created = 201
forbidden = 403
last_id = -1 |
# uncompyle6 version 3.2.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: lib.coginvasion.hood.CinemaGlobals
Cinemas = {0: ('cinemas/steamboat_willie.mp4', 'cinemas/steamboat_willie.mp3'), 1: ('cinemas/mr_mouse_takes_a_trip.mp4', 'cinemas/mr_mouse_takes_a_trip.mp3'),
2: ('cinemas/trolley_troubles.mp4', 'cinemas/trolley_troubles.mp3'),
3: ('cinemas/brave_little_tailor.mp4', 'cinemas/brave_little_tailor.mp3'),
4: ('cinemas/karnival_kid.mp4', 'cinemas/karnival_kid.mp3'),
5: ('cinemas/traffic_troubles.mp4', 'cinemas/traffic_troubles.mp3')}
Zone2Block2CinemaIndex = {2100: {38: 0, 63: 1}, 2200: {14: 2, 4: 3}, 2300: {3: 4, 14: 5}}
CinemaLengths = {0: 445, 1: 470, 2: 345, 3: 535, 4: 460, 5: 435}
IntermissionLength = 120 | cinemas = {0: ('cinemas/steamboat_willie.mp4', 'cinemas/steamboat_willie.mp3'), 1: ('cinemas/mr_mouse_takes_a_trip.mp4', 'cinemas/mr_mouse_takes_a_trip.mp3'), 2: ('cinemas/trolley_troubles.mp4', 'cinemas/trolley_troubles.mp3'), 3: ('cinemas/brave_little_tailor.mp4', 'cinemas/brave_little_tailor.mp3'), 4: ('cinemas/karnival_kid.mp4', 'cinemas/karnival_kid.mp3'), 5: ('cinemas/traffic_troubles.mp4', 'cinemas/traffic_troubles.mp3')}
zone2_block2_cinema_index = {2100: {38: 0, 63: 1}, 2200: {14: 2, 4: 3}, 2300: {3: 4, 14: 5}}
cinema_lengths = {0: 445, 1: 470, 2: 345, 3: 535, 4: 460, 5: 435}
intermission_length = 120 |
'''
Useful for validation: http://www.attotron.com/cybertory/analysis/trans.htm
'''
class Translator:
rna_codons = {
"UUU": "F", "CUU": "L", "AUU": "I", "GUU": "V",
"UUC": "F", "CUC": "L", "AUC": "I", "GUC": "V",
"UUA": "L", "CUA": "L", "AUA": "I", "GUA": "V",
"UUG": "L", "CUG": "L", "AUG": "M", "GUG": "V",
"UCU": "S", "CCU": "P", "ACU": "T", "GCU": "A",
"UCC": "S", "CCC": "P", "ACC": "T", "GCC": "A",
"UCA": "S", "CCA": "P", "ACA": "T", "GCA": "A",
"UCG": "S", "CCG": "P", "ACG": "T", "GCG": "A",
"UAU": "Y", "CAU": "H", "AAU": "N", "GAU": "D",
"UAC": "Y", "CAC": "H", "AAC": "N", "GAC": "D",
"UAA": "STOP", "CAA": "Q", "AAA": "K", "GAA": "E",
"UAG": "STOP", "CAG": "Q", "AAG": "K", "GAG": "E",
"UGU": "C", "CGU": "R", "AGU": "S", "GGU": "G",
"UGC": "C", "CGC": "R", "AGC": "S", "GGC": "G",
"UGA": "STOP", "CGA": "R", "AGA": "R", "GGA": "G",
"UGG": "W", "CGG": "R", "AGG": "R", "GGG": "G"
}
def __init__(self, rna_sequence: str) -> None:
allowed_symbols = set(['A', 'C', 'G', 'T', 'U'])
symbols = set(rna_sequence.upper())
assert symbols <= allowed_symbols, 'Sequence contains invalid nucleotide symbols!'
# If find(arg) returns -1 -> arg not present in string
start_codon_pos: int = rna_sequence.find('AUG')
stop_codon_pos: int = max(rna_sequence.find('UAA'), rna_sequence.find('UAG'), rna_sequence.find('UGA'))
assert start_codon_pos > -1, 'Sequence does not contain a start codon!'
assert stop_codon_pos > -1, 'Sequence does not contain any of stop codons!'
# Notice that AUGAUG (duplicated start codons) can be read as aUGA (stop codon)
# If that situation is impossible, then we should replace 1 with 3
assert start_codon_pos + 1 <= stop_codon_pos, 'Start codon must be placed before stop codon!'
self.rna_seq = rna_sequence
@property
def to_protein(self) -> str:
'''Terminates when stop codon is found'''
protein: str = ''
# 1. Ignore everything before start codon
start_codon_pos = self.rna_seq.find('AUG')
# 2. Translate codons to amino acids until no stop codon was found
for nucl_pos in range(start_codon_pos, len(self.rna_seq), 3):
codon = self.rna_seq[nucl_pos:nucl_pos + 3]
if self.rna_codons[codon] == 'STOP':
break
protein += self.rna_codons[codon]
return protein
| """
Useful for validation: http://www.attotron.com/cybertory/analysis/trans.htm
"""
class Translator:
rna_codons = {'UUU': 'F', 'CUU': 'L', 'AUU': 'I', 'GUU': 'V', 'UUC': 'F', 'CUC': 'L', 'AUC': 'I', 'GUC': 'V', 'UUA': 'L', 'CUA': 'L', 'AUA': 'I', 'GUA': 'V', 'UUG': 'L', 'CUG': 'L', 'AUG': 'M', 'GUG': 'V', 'UCU': 'S', 'CCU': 'P', 'ACU': 'T', 'GCU': 'A', 'UCC': 'S', 'CCC': 'P', 'ACC': 'T', 'GCC': 'A', 'UCA': 'S', 'CCA': 'P', 'ACA': 'T', 'GCA': 'A', 'UCG': 'S', 'CCG': 'P', 'ACG': 'T', 'GCG': 'A', 'UAU': 'Y', 'CAU': 'H', 'AAU': 'N', 'GAU': 'D', 'UAC': 'Y', 'CAC': 'H', 'AAC': 'N', 'GAC': 'D', 'UAA': 'STOP', 'CAA': 'Q', 'AAA': 'K', 'GAA': 'E', 'UAG': 'STOP', 'CAG': 'Q', 'AAG': 'K', 'GAG': 'E', 'UGU': 'C', 'CGU': 'R', 'AGU': 'S', 'GGU': 'G', 'UGC': 'C', 'CGC': 'R', 'AGC': 'S', 'GGC': 'G', 'UGA': 'STOP', 'CGA': 'R', 'AGA': 'R', 'GGA': 'G', 'UGG': 'W', 'CGG': 'R', 'AGG': 'R', 'GGG': 'G'}
def __init__(self, rna_sequence: str) -> None:
allowed_symbols = set(['A', 'C', 'G', 'T', 'U'])
symbols = set(rna_sequence.upper())
assert symbols <= allowed_symbols, 'Sequence contains invalid nucleotide symbols!'
start_codon_pos: int = rna_sequence.find('AUG')
stop_codon_pos: int = max(rna_sequence.find('UAA'), rna_sequence.find('UAG'), rna_sequence.find('UGA'))
assert start_codon_pos > -1, 'Sequence does not contain a start codon!'
assert stop_codon_pos > -1, 'Sequence does not contain any of stop codons!'
assert start_codon_pos + 1 <= stop_codon_pos, 'Start codon must be placed before stop codon!'
self.rna_seq = rna_sequence
@property
def to_protein(self) -> str:
"""Terminates when stop codon is found"""
protein: str = ''
start_codon_pos = self.rna_seq.find('AUG')
for nucl_pos in range(start_codon_pos, len(self.rna_seq), 3):
codon = self.rna_seq[nucl_pos:nucl_pos + 3]
if self.rna_codons[codon] == 'STOP':
break
protein += self.rna_codons[codon]
return protein |
class ProjectLocation(Instance,IDisposable):
""" An object that represents a named location in a project. """
def Dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def Duplicate(self,name):
"""
Duplicate(self: ProjectLocation,name: str) -> ProjectLocation
Generate a copy of this project location with the specified name.
name: The name to be assigned to the duplicated project location.
Returns: If successful a duplicate of this project location object with the specified
name.
"""
pass
def getBoundingBox(self,*args):
""" getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ """
pass
def ReleaseUnmanagedResources(self,*args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
def setElementType(self,*args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def __enter__(self,*args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self,*args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Name=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The name of the project location.
Get: Name(self: ProjectLocation) -> str
Set: Name(self: ProjectLocation)=value
"""
SiteLocation=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The site location to which this project location refers.
Get: SiteLocation(self: ProjectLocation) -> SiteLocation
"""
| class Projectlocation(Instance, IDisposable):
""" An object that represents a named location in a project. """
def dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def duplicate(self, name):
"""
Duplicate(self: ProjectLocation,name: str) -> ProjectLocation
Generate a copy of this project location with the specified name.
name: The name to be assigned to the duplicated project location.
Returns: If successful a duplicate of this project location object with the specified
name.
"""
pass
def get_bounding_box(self, *args):
""" getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ """
pass
def release_unmanaged_resources(self, *args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
def set_element_type(self, *args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def __enter__(self, *args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
name = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The name of the project location.\n\n\n\nGet: Name(self: ProjectLocation) -> str\n\n\n\nSet: Name(self: ProjectLocation)=value\n\n'
site_location = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The site location to which this project location refers.\n\n\n\nGet: SiteLocation(self: ProjectLocation) -> SiteLocation\n\n\n\n' |
class NotificationBackend:
async def send_token_to_customer(
self,
chat_id: str,
username: str,
token: str
):
raise NotImplementedError()
| class Notificationbackend:
async def send_token_to_customer(self, chat_id: str, username: str, token: str):
raise not_implemented_error() |
'''
A python program to find gcd of two number.
GCD=greatest common divisor
a=30
b=2
30=1*2*3*5
2=1*2
GCD=multiplication of common factors
=1*2
=2
gcd1 is based on euclidean algorithm.
'''
def gcd1(a,b):
if not a:return b
return gcd1(b%a,a)
def gcd2(a,b):
while b:a,b=b,a%b
return a
print(gcd2(30,2))
print(gcd1(30,2))
| """
A python program to find gcd of two number.
GCD=greatest common divisor
a=30
b=2
30=1*2*3*5
2=1*2
GCD=multiplication of common factors
=1*2
=2
gcd1 is based on euclidean algorithm.
"""
def gcd1(a, b):
if not a:
return b
return gcd1(b % a, a)
def gcd2(a, b):
while b:
(a, b) = (b, a % b)
return a
print(gcd2(30, 2))
print(gcd1(30, 2)) |
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"V": "V.ipynb",
"build_hierplane_tree": "V.ipynb",
"get_boto_session": "aws_utils.ipynb",
"write_json_to_s3": "aws_utils.ipynb",
"write_df_to_s3": "aws_utils.ipynb",
"read_df_from_s3": "aws_utils.ipynb",
"read_json_from_s3": "aws_utils.ipynb",
"get_csv": "datasethelpers.ipynb",
"CauseBinary": "datasethelpers.ipynb",
"WikiMed": "datasethelpers.ipynb",
"GNBR": "datasethelpers.ipynb",
"GNBR_PATH": "datasethelpers.ipynb",
"CAUSE_BINARY_PATH": "datasethelpers.ipynb",
"WIKIMED_PATH": "datasethelpers.ipynb",
"PTB_BRACKETS": "datasethelpers.ipynb",
"load": "load.ipynb",
"get_sdp_path": "networks.ipynb",
"get_edges": "networks.ipynb",
"get_edges_unique": "networks.ipynb",
"get_verb": "networks.ipynb",
"triples_from_pairs": "networks.ipynb",
"is_redundant": "networks.ipynb",
"pair_down": "networks.ipynb",
"tok_format": "networks.ipynb",
"to_nltk_tree": "networks.ipynb",
"get_info": "pubmed.ipynb",
"m_parse_flat_pubmed": "pubmed.ipynb",
"MONTH_MAP": "pubmed.ipynb",
"search_medline": "pubmed.ipynb",
"fetch_details": "pubmed.ipynb",
"handle_query": "pubmed.ipynb",
"remove_html_tags": "roam_utils.ipynb",
"remove_buttons": "roam_utils.ipynb",
"remove_url": "roam_utils.ipynb",
"remove_attr": "roam_utils.ipynb",
"replace_block_ref": "roam_utils.ipynb",
"remove_duplicates": "roam_utils.ipynb",
"URL_REGEX": "roam_utils.ipynb",
"clean_sentence": "roam_utils.ipynb",
"is_too_short": "roam_utils.ipynb",
"has_stop_symbols": "roam_utils.ipynb",
"stop_symbols": "roam_utils.ipynb",
"roam_graph_to_blocks": "roam_utils.ipynb",
"roam_blocks_to_embeddings_index": "roam_utils.ipynb",
"save": "save.ipynb",
"gsheet_to_df": "spec.ipynb",
"TRANSFORMER": "spec.ipynb",
"SENTENCE_TRANSFORMER": "spec.ipynb",
"PUBMED_IDS": "spec.ipynb",
"PUBMED_CONTENT": "spec.ipynb",
"EMAIL": "spec.ipynb",
"SPACY_MODEL": "spec.ipynb",
"STANZA_MODEL": "spec.ipynb",
"GSHEET": "spec.ipynb",
"HTML_TAG": "spec.ipynb",
"URL": "spec.ipynb",
"SPEC": "spec.ipynb",
"infer_type": "spec.ipynb",
"TRANSFORMS": "spec.ipynb",
"convert": "spec.ipynb",
"STRING_FUNCS": "text.ipynb",
"text_to_vector": "text.ipynb",
"create_index": "text.ipynb",
"query_index": "text.ipynb",
"ents_w_candidates": "text.ipynb",
"candidates_lables": "text.ipynb",
"get_ent_from_token": "text.ipynb",
"load_sci_pipe": "text.ipynb",
"m_reannotate": "text.ipynb",
"last_token_of_entity": "text.ipynb",
"negated_ents": "text.ipynb",
"show_negex_entities": "text.ipynb",
"get_token_and_entities_as_spans": "text.ipynb",
"add_pipes_mutative": "text.ipynb",
"rsetattr": "text.ipynb",
"rgetattr": "text.ipynb",
"get_entity_diff": "text.ipynb",
"merge_named_entities": "text.ipynb",
"print_table": "text.ipynb",
"show_noun_chunks": "text.ipynb",
"doc_has_entity_labels": "text.ipynb",
"get_merged_docs_for_texts": "text.ipynb",
"get_tokenidx_for_char": "text.ipynb",
"extract_named_entities_info": "text.ipynb",
"pattern_vis": "text.ipynb",
"prep_pattern": "text.ipynb",
"add_matches": "text.ipynb",
"get_lemma": "text.ipynb",
"check_for_non_trees": "text.ipynb",
"annotate_NER": "text.ipynb",
"construct_pattern_old": "text.ipynb",
"construct_pattern": "text.ipynb",
"match_texts": "text.ipynb",
"merge_csv_in_dir": "utils.ipynb",
"tree_select_kv": "utils.ipynb",
"deep_path_from_keysequence": "utils.ipynb",
"get_paths": "utils.ipynb",
"show_tabs": "utils.ipynb",
"take_while": "utils.ipynb",
"partition": "utils.ipynb",
"partition_all": "utils.ipynb",
"create_embedding_files_for_visualization": "utils.ipynb",
"pipe": "utils.ipynb",
"dedupe_conseq": "utils.ipynb"}
modules = ["V.py",
"aws_utils.py",
"datasethelpers.py",
"load.py",
"networks.py",
"pubmed.py",
"roam_utils.py",
"save.py",
"spec.py",
"text.py",
"utils.py"]
doc_url = "https://mkstra.github.io/proseflow/"
git_url = "https://github.com/mkstra/proseflow/tree/master/"
def custom_doc_links(name): return None
| __all__ = ['index', 'modules', 'custom_doc_links', 'git_url']
index = {'V': 'V.ipynb', 'build_hierplane_tree': 'V.ipynb', 'get_boto_session': 'aws_utils.ipynb', 'write_json_to_s3': 'aws_utils.ipynb', 'write_df_to_s3': 'aws_utils.ipynb', 'read_df_from_s3': 'aws_utils.ipynb', 'read_json_from_s3': 'aws_utils.ipynb', 'get_csv': 'datasethelpers.ipynb', 'CauseBinary': 'datasethelpers.ipynb', 'WikiMed': 'datasethelpers.ipynb', 'GNBR': 'datasethelpers.ipynb', 'GNBR_PATH': 'datasethelpers.ipynb', 'CAUSE_BINARY_PATH': 'datasethelpers.ipynb', 'WIKIMED_PATH': 'datasethelpers.ipynb', 'PTB_BRACKETS': 'datasethelpers.ipynb', 'load': 'load.ipynb', 'get_sdp_path': 'networks.ipynb', 'get_edges': 'networks.ipynb', 'get_edges_unique': 'networks.ipynb', 'get_verb': 'networks.ipynb', 'triples_from_pairs': 'networks.ipynb', 'is_redundant': 'networks.ipynb', 'pair_down': 'networks.ipynb', 'tok_format': 'networks.ipynb', 'to_nltk_tree': 'networks.ipynb', 'get_info': 'pubmed.ipynb', 'm_parse_flat_pubmed': 'pubmed.ipynb', 'MONTH_MAP': 'pubmed.ipynb', 'search_medline': 'pubmed.ipynb', 'fetch_details': 'pubmed.ipynb', 'handle_query': 'pubmed.ipynb', 'remove_html_tags': 'roam_utils.ipynb', 'remove_buttons': 'roam_utils.ipynb', 'remove_url': 'roam_utils.ipynb', 'remove_attr': 'roam_utils.ipynb', 'replace_block_ref': 'roam_utils.ipynb', 'remove_duplicates': 'roam_utils.ipynb', 'URL_REGEX': 'roam_utils.ipynb', 'clean_sentence': 'roam_utils.ipynb', 'is_too_short': 'roam_utils.ipynb', 'has_stop_symbols': 'roam_utils.ipynb', 'stop_symbols': 'roam_utils.ipynb', 'roam_graph_to_blocks': 'roam_utils.ipynb', 'roam_blocks_to_embeddings_index': 'roam_utils.ipynb', 'save': 'save.ipynb', 'gsheet_to_df': 'spec.ipynb', 'TRANSFORMER': 'spec.ipynb', 'SENTENCE_TRANSFORMER': 'spec.ipynb', 'PUBMED_IDS': 'spec.ipynb', 'PUBMED_CONTENT': 'spec.ipynb', 'EMAIL': 'spec.ipynb', 'SPACY_MODEL': 'spec.ipynb', 'STANZA_MODEL': 'spec.ipynb', 'GSHEET': 'spec.ipynb', 'HTML_TAG': 'spec.ipynb', 'URL': 'spec.ipynb', 'SPEC': 'spec.ipynb', 'infer_type': 'spec.ipynb', 'TRANSFORMS': 'spec.ipynb', 'convert': 'spec.ipynb', 'STRING_FUNCS': 'text.ipynb', 'text_to_vector': 'text.ipynb', 'create_index': 'text.ipynb', 'query_index': 'text.ipynb', 'ents_w_candidates': 'text.ipynb', 'candidates_lables': 'text.ipynb', 'get_ent_from_token': 'text.ipynb', 'load_sci_pipe': 'text.ipynb', 'm_reannotate': 'text.ipynb', 'last_token_of_entity': 'text.ipynb', 'negated_ents': 'text.ipynb', 'show_negex_entities': 'text.ipynb', 'get_token_and_entities_as_spans': 'text.ipynb', 'add_pipes_mutative': 'text.ipynb', 'rsetattr': 'text.ipynb', 'rgetattr': 'text.ipynb', 'get_entity_diff': 'text.ipynb', 'merge_named_entities': 'text.ipynb', 'print_table': 'text.ipynb', 'show_noun_chunks': 'text.ipynb', 'doc_has_entity_labels': 'text.ipynb', 'get_merged_docs_for_texts': 'text.ipynb', 'get_tokenidx_for_char': 'text.ipynb', 'extract_named_entities_info': 'text.ipynb', 'pattern_vis': 'text.ipynb', 'prep_pattern': 'text.ipynb', 'add_matches': 'text.ipynb', 'get_lemma': 'text.ipynb', 'check_for_non_trees': 'text.ipynb', 'annotate_NER': 'text.ipynb', 'construct_pattern_old': 'text.ipynb', 'construct_pattern': 'text.ipynb', 'match_texts': 'text.ipynb', 'merge_csv_in_dir': 'utils.ipynb', 'tree_select_kv': 'utils.ipynb', 'deep_path_from_keysequence': 'utils.ipynb', 'get_paths': 'utils.ipynb', 'show_tabs': 'utils.ipynb', 'take_while': 'utils.ipynb', 'partition': 'utils.ipynb', 'partition_all': 'utils.ipynb', 'create_embedding_files_for_visualization': 'utils.ipynb', 'pipe': 'utils.ipynb', 'dedupe_conseq': 'utils.ipynb'}
modules = ['V.py', 'aws_utils.py', 'datasethelpers.py', 'load.py', 'networks.py', 'pubmed.py', 'roam_utils.py', 'save.py', 'spec.py', 'text.py', 'utils.py']
doc_url = 'https://mkstra.github.io/proseflow/'
git_url = 'https://github.com/mkstra/proseflow/tree/master/'
def custom_doc_links(name):
return None |
"""
Created on Sun Aug 8 19:27:44 2021
@author: DW
"""
| """
Created on Sun Aug 8 19:27:44 2021
@author: DW
""" |
def getPostFlopBet(game_state, current_player):
cardsNumber = len(game_state['community_cards'])
bet = game_state['current_buy_in'] - current_player['bet']
stack = current_player['stack']
minRaise = game_state['minimum_raise']
table = {
1: bet,
2: bet,
3: (1/64 * stack),
4: (1/32 * stack),
5: (1/16 * stack)
}
if game_state['bet_index'] == 0 and cardsNumber == 5:
return minRaise
if bet > table[cardsNumber]:
return bet
return 0
| def get_post_flop_bet(game_state, current_player):
cards_number = len(game_state['community_cards'])
bet = game_state['current_buy_in'] - current_player['bet']
stack = current_player['stack']
min_raise = game_state['minimum_raise']
table = {1: bet, 2: bet, 3: 1 / 64 * stack, 4: 1 / 32 * stack, 5: 1 / 16 * stack}
if game_state['bet_index'] == 0 and cardsNumber == 5:
return minRaise
if bet > table[cardsNumber]:
return bet
return 0 |
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
result = 0
for i in range(N):
t = C
A = list(map(int, input().split()))
for j in range(M):
t += A[j] * B[j]
if t > 0:
result += 1
print(result)
| (n, m, c) = map(int, input().split())
b = list(map(int, input().split()))
result = 0
for i in range(N):
t = C
a = list(map(int, input().split()))
for j in range(M):
t += A[j] * B[j]
if t > 0:
result += 1
print(result) |
def rate_trader_balances(row):
# How much BASE plus RAI in BASE is held
traders = row['rate_traders']
rp = row['target_price']
total_base = 0
base = 0
total_rai_base = 0
for trader in traders:
total_base += trader['base_balance']
total_base += trader['rai_balance'] * rp
base += trader['base_balance']
total_rai_base += trader['rai_balance'] * rp
return total_base, base, total_rai_base
def price_trader_balances(row):
# How much BASE plus RAI in BASE is held
traders = row['price_traders']
rp = row['target_price']
total_base = 0
base = 0
total_rai_base = 0
for trader in traders:
total_base += trader['base_balance']
total_base += trader['rai_balance'] * rp
base += trader['base_balance']
total_rai_base += trader['rai_balance'] * rp
return total_base, base, total_rai_base
def eth_leverager_balances(row):
eth_price = row['eth_price']
rp = row['target_price']
safes = row['cdps'] # SAFEs are initialized in timestep 1
df = safes.query(f"open == 1 and owner == 'leverager'")
total_collateral = df['locked'].sum() - df['freed'].sum() - df['v_bitten'].sum()
total_debt = df['drawn'].sum() - df['wiped'].sum() - df['u_bitten'].sum()
debt_base = total_debt * rp
collateral_base = total_collateral * eth_price
total_base = collateral_base - debt_base
return total_base, collateral_base, debt_base, total_collateral, total_debt
"""
def eth_leverager_total_base(row):
eth_price = row['eth_price']
rp = row['target_price']
safes = row['cdps'] # SAFEs are initialized in timestep 1
collateral_base = 0
debt_base = 0
for index, cdp in safes.query(f"open == 1 and owner == 'leverager'").iterrows():
locked = cdp["locked"]
freed = cdp["freed"]
drawn = cdp["drawn"]
wiped = cdp["wiped"]
dripped = cdp["dripped"]
v_bitten = cdp["v_bitten"]
u_bitten = cdp["u_bitten"]
w_bitten = cdp["w_bitten"]
collateral = locked - freed - v_bitten
debt = drawn - wiped - u_bitten
collateral_base += collateral * eth_price
debt_base += debt * rp
return collateral_base - debt_base
def eth_leverager_collateral_base(row):
eth_price = row['eth_price']
rp = row['target_price']
safes = row['cdps'] # SAFEs are initialized in timestep 1
collateral_base = 0
for index, cdp in safes.query(f"open == 1 and owner == 'leverager'").iterrows():
locked = cdp["locked"]
freed = cdp["freed"]
drawn = cdp["drawn"]
wiped = cdp["wiped"]
dripped = cdp["dripped"]
v_bitten = cdp["v_bitten"]
u_bitten = cdp["u_bitten"]
w_bitten = cdp["w_bitten"]
collateral = locked - freed - v_bitten
collateral_base += collateral * eth_price
return collateral_base
def eth_leverager_collateral(row):
eth_price = row['eth_price']
rp = row['target_price']
safes = row['cdps'] # SAFEs are initialized in timestep 1
collateral = 0
for index, cdp in safes.query(f"open == 1 and owner == 'leverager'").iterrows():
locked = cdp["locked"]
freed = cdp["freed"]
drawn = cdp["drawn"]
wiped = cdp["wiped"]
dripped = cdp["dripped"]
v_bitten = cdp["v_bitten"]
u_bitten = cdp["u_bitten"]
w_bitten = cdp["w_bitten"]
collateral = locked - freed - v_bitten
collateral += collateral
return collateral
def eth_leverager_debt_base(row):
rp = row['target_price']
safes = row['cdps'] # SAFEs are initialized in timestep 1
debt_base = 0
for index, cdp in safes.query(f"open == 1 and owner == 'leverager'").iterrows():
locked = cdp["locked"]
freed = cdp["freed"]
drawn = cdp["drawn"]
wiped = cdp["wiped"]
dripped = cdp["dripped"]
v_bitten = cdp["v_bitten"]
u_bitten = cdp["u_bitten"]
w_bitten = cdp["w_bitten"]
debt = drawn - wiped - u_bitten
debt_base += debt * rp
return debt_base
def eth_leverager_debt(row):
safes = row['cdps'] # SAFEs are initialized in timestep 1
debt = 0
for index, cdp in safes.query(f"open == 1 and owner == 'leverager'").iterrows():
locked = cdp["locked"]
freed = cdp["freed"]
drawn = cdp["drawn"]
wiped = cdp["wiped"]
dripped = cdp["dripped"]
v_bitten = cdp["v_bitten"]
u_bitten = cdp["u_bitten"]
w_bitten = cdp["w_bitten"]
debt += drawn - wiped - u_bitten
return debt
"""
def price_trader_profit(df, run):
df_run = df.query(f'run == {run}')
start_traders = df_run['price_traders'].iloc[1]
start_rp = df_run['target_price'].iloc[1]
end_traders = df_run['price_traders'].iloc[-1]
end_rp = df_run['target_price'].iloc[-1]
start_total_base = 0
for trader in start_traders:
start_total_base += trader['base_balance']
start_total_base += trader['rai_balance'] * start_rp
end_total_base = 0
for trader in end_traders:
end_total_base += trader['base_balance']
end_total_base += trader['rai_balance'] * end_rp
return end_total_base - start_total_base
def rate_trader_profit(df, run):
df_run = df.query(f'run == {run}')
start_traders = df_run['rate_traders'].iloc[1]
start_rp = df_run['target_price'].iloc[1]
final_traders = df_run['rate_traders'].iloc[-1]
final_rp = df_run['target_price'].iloc[-1]
start_total_base = 0
start_total_rai = 0
start_total_rai_base = 0
start_base_only = 0
for trader in start_traders:
start_base_only += trader['base_balance']
start_total_base += trader['base_balance']
start_total_base += trader['rai_balance'] * start_rp
start_total_rai += trader['rai_balance']
start_total_rai_base += trader['rai_balance'] * start_rp
final_total_base = 0
final_total_rai = 0
final_total_rai_base = 0
final_base_only = 0
n_trades = 0
for trader in final_traders:
final_base_only += trader['base_balance']
final_total_base += trader['base_balance']
final_total_base += trader['rai_balance'] * final_rp
final_total_rai += trader['rai_balance']
final_total_rai_base += trader['rai_balance'] * final_rp
n_trades += trader['n_buys'] + trader['n_sells']
return {'start_base_only': start_base_only,
'start_total_rai': start_total_rai,
'start_total_rai_base': start_total_rai_base,
'start_total_base': start_total_base,
'final_base_only': final_base_only,
'final_total_rai': final_total_rai,
'final_total_rai_base': final_total_rai_base,
'final_total_base': final_total_base,
'n_trades': n_trades,
'profit': final_total_base - start_total_base,
'profit_per_trade': (final_total_base - start_total_base)/n_trades
}
def cdp_profit(df, owner, run):
df_run = df.query(f'run == {run}')
start_eth_price = df_run['eth_price'].iloc[0]
start_rp = df_run['target_price'].iloc[0]
start_safes = df_run['cdps'].iloc[1] # SAFEs are initialized in timestep 1
final_eth_price = df_run['eth_price'].iloc[-1]
final_rp = df_run['target_price'].iloc[-1]
final_safes = df_run['cdps'].iloc[-1]
start_base = 0
start_collateral = 0
start_collateral_base = 0
start_debt = 0
start_debt_base = 0
for index, cdp in start_safes.query(f"open == 1 and owner == '{owner}'").iterrows():
locked = cdp["locked"]
freed = cdp["freed"]
drawn = cdp["drawn"]
wiped = cdp["wiped"]
dripped = cdp["dripped"]
v_bitten = cdp["v_bitten"]
u_bitten = cdp["u_bitten"]
w_bitten = cdp["w_bitten"]
collateral = locked - freed - v_bitten
debt = drawn - wiped - u_bitten
start_collateral += collateral
start_debt += debt
collateral_base = collateral * start_eth_price
debt_base = debt * start_rp
#print(f"start {collateral_base=}, {collateral=}, {start_eth_price=}")
start_collateral_base += collateral_base
start_debt_base += debt_base
start_base += collateral_base - debt_base
final_base = 0
final_collateral = 0
final_collateral_base = 0
final_debt = 0
final_debt_base = 0
for index, cdp in final_safes.query(f"open == 1 and owner == '{owner}'").iterrows():
locked = cdp["locked"]
freed = cdp["freed"]
drawn = cdp["drawn"]
wiped = cdp["wiped"]
dripped = cdp["dripped"]
v_bitten = cdp["v_bitten"]
u_bitten = cdp["u_bitten"]
w_bitten = cdp["w_bitten"]
collateral = locked - freed - v_bitten
debt = drawn - wiped - u_bitten
final_collateral += collateral
final_debt += debt
collateral_base = collateral * final_eth_price
debt_base = debt * final_rp
#print(f"final {collateral_base=}, {collateral=}, {final_eth_price=}")
final_collateral_base += collateral_base
final_debt_base += debt_base
final_base += collateral_base - debt_base
return {"start_collateral": start_collateral,
"start_collateral_base": start_collateral_base,
"start_debt": start_debt,
"start_debt_base": start_debt_base,
"final_collateral": final_collateral,
"final_collateral_base": final_collateral_base,
"final_debt": final_debt,
"final_debt_base": final_debt_base,
"final_new_debt": final_debt - start_debt,
"final_new_debt_base": final_debt_base - start_debt_base,
"start_base": start_base,
"final_base": final_base,
"profit": final_collateral_base - start_collateral_base - final_debt_base + start_debt_base
}
| def rate_trader_balances(row):
traders = row['rate_traders']
rp = row['target_price']
total_base = 0
base = 0
total_rai_base = 0
for trader in traders:
total_base += trader['base_balance']
total_base += trader['rai_balance'] * rp
base += trader['base_balance']
total_rai_base += trader['rai_balance'] * rp
return (total_base, base, total_rai_base)
def price_trader_balances(row):
traders = row['price_traders']
rp = row['target_price']
total_base = 0
base = 0
total_rai_base = 0
for trader in traders:
total_base += trader['base_balance']
total_base += trader['rai_balance'] * rp
base += trader['base_balance']
total_rai_base += trader['rai_balance'] * rp
return (total_base, base, total_rai_base)
def eth_leverager_balances(row):
eth_price = row['eth_price']
rp = row['target_price']
safes = row['cdps']
df = safes.query(f"open == 1 and owner == 'leverager'")
total_collateral = df['locked'].sum() - df['freed'].sum() - df['v_bitten'].sum()
total_debt = df['drawn'].sum() - df['wiped'].sum() - df['u_bitten'].sum()
debt_base = total_debt * rp
collateral_base = total_collateral * eth_price
total_base = collateral_base - debt_base
return (total_base, collateral_base, debt_base, total_collateral, total_debt)
'\ndef eth_leverager_total_base(row):\n eth_price = row[\'eth_price\']\n rp = row[\'target_price\']\n safes = row[\'cdps\'] # SAFEs are initialized in timestep 1\n \n collateral_base = 0\n debt_base = 0\n for index, cdp in safes.query(f"open == 1 and owner == \'leverager\'").iterrows():\n locked = cdp["locked"]\n freed = cdp["freed"]\n drawn = cdp["drawn"]\n wiped = cdp["wiped"]\n dripped = cdp["dripped"]\n v_bitten = cdp["v_bitten"]\n u_bitten = cdp["u_bitten"]\n w_bitten = cdp["w_bitten"]\n \n collateral = locked - freed - v_bitten\n debt = drawn - wiped - u_bitten\n \n collateral_base += collateral * eth_price\n debt_base += debt * rp\n \n return collateral_base - debt_base\n\ndef eth_leverager_collateral_base(row):\n eth_price = row[\'eth_price\']\n rp = row[\'target_price\']\n safes = row[\'cdps\'] # SAFEs are initialized in timestep 1\n \n collateral_base = 0\n for index, cdp in safes.query(f"open == 1 and owner == \'leverager\'").iterrows():\n locked = cdp["locked"]\n freed = cdp["freed"]\n drawn = cdp["drawn"]\n wiped = cdp["wiped"]\n dripped = cdp["dripped"]\n v_bitten = cdp["v_bitten"]\n u_bitten = cdp["u_bitten"]\n w_bitten = cdp["w_bitten"]\n \n collateral = locked - freed - v_bitten\n collateral_base += collateral * eth_price\n \n return collateral_base\n\ndef eth_leverager_collateral(row):\n eth_price = row[\'eth_price\']\n rp = row[\'target_price\']\n safes = row[\'cdps\'] # SAFEs are initialized in timestep 1\n \n collateral = 0\n for index, cdp in safes.query(f"open == 1 and owner == \'leverager\'").iterrows():\n locked = cdp["locked"]\n freed = cdp["freed"]\n drawn = cdp["drawn"]\n wiped = cdp["wiped"]\n dripped = cdp["dripped"]\n v_bitten = cdp["v_bitten"]\n u_bitten = cdp["u_bitten"]\n w_bitten = cdp["w_bitten"]\n \n collateral = locked - freed - v_bitten\n collateral += collateral\n \n return collateral\n\ndef eth_leverager_debt_base(row):\n rp = row[\'target_price\']\n safes = row[\'cdps\'] # SAFEs are initialized in timestep 1\n \n debt_base = 0\n for index, cdp in safes.query(f"open == 1 and owner == \'leverager\'").iterrows():\n locked = cdp["locked"]\n freed = cdp["freed"]\n drawn = cdp["drawn"]\n wiped = cdp["wiped"]\n dripped = cdp["dripped"]\n v_bitten = cdp["v_bitten"]\n u_bitten = cdp["u_bitten"]\n w_bitten = cdp["w_bitten"]\n \n debt = drawn - wiped - u_bitten\n debt_base += debt * rp\n \n return debt_base\n\ndef eth_leverager_debt(row):\n safes = row[\'cdps\'] # SAFEs are initialized in timestep 1\n \n debt = 0\n for index, cdp in safes.query(f"open == 1 and owner == \'leverager\'").iterrows():\n locked = cdp["locked"]\n freed = cdp["freed"]\n drawn = cdp["drawn"]\n wiped = cdp["wiped"]\n dripped = cdp["dripped"]\n v_bitten = cdp["v_bitten"]\n u_bitten = cdp["u_bitten"]\n w_bitten = cdp["w_bitten"]\n \n debt += drawn - wiped - u_bitten\n \n return debt\n \n'
def price_trader_profit(df, run):
df_run = df.query(f'run == {run}')
start_traders = df_run['price_traders'].iloc[1]
start_rp = df_run['target_price'].iloc[1]
end_traders = df_run['price_traders'].iloc[-1]
end_rp = df_run['target_price'].iloc[-1]
start_total_base = 0
for trader in start_traders:
start_total_base += trader['base_balance']
start_total_base += trader['rai_balance'] * start_rp
end_total_base = 0
for trader in end_traders:
end_total_base += trader['base_balance']
end_total_base += trader['rai_balance'] * end_rp
return end_total_base - start_total_base
def rate_trader_profit(df, run):
df_run = df.query(f'run == {run}')
start_traders = df_run['rate_traders'].iloc[1]
start_rp = df_run['target_price'].iloc[1]
final_traders = df_run['rate_traders'].iloc[-1]
final_rp = df_run['target_price'].iloc[-1]
start_total_base = 0
start_total_rai = 0
start_total_rai_base = 0
start_base_only = 0
for trader in start_traders:
start_base_only += trader['base_balance']
start_total_base += trader['base_balance']
start_total_base += trader['rai_balance'] * start_rp
start_total_rai += trader['rai_balance']
start_total_rai_base += trader['rai_balance'] * start_rp
final_total_base = 0
final_total_rai = 0
final_total_rai_base = 0
final_base_only = 0
n_trades = 0
for trader in final_traders:
final_base_only += trader['base_balance']
final_total_base += trader['base_balance']
final_total_base += trader['rai_balance'] * final_rp
final_total_rai += trader['rai_balance']
final_total_rai_base += trader['rai_balance'] * final_rp
n_trades += trader['n_buys'] + trader['n_sells']
return {'start_base_only': start_base_only, 'start_total_rai': start_total_rai, 'start_total_rai_base': start_total_rai_base, 'start_total_base': start_total_base, 'final_base_only': final_base_only, 'final_total_rai': final_total_rai, 'final_total_rai_base': final_total_rai_base, 'final_total_base': final_total_base, 'n_trades': n_trades, 'profit': final_total_base - start_total_base, 'profit_per_trade': (final_total_base - start_total_base) / n_trades}
def cdp_profit(df, owner, run):
df_run = df.query(f'run == {run}')
start_eth_price = df_run['eth_price'].iloc[0]
start_rp = df_run['target_price'].iloc[0]
start_safes = df_run['cdps'].iloc[1]
final_eth_price = df_run['eth_price'].iloc[-1]
final_rp = df_run['target_price'].iloc[-1]
final_safes = df_run['cdps'].iloc[-1]
start_base = 0
start_collateral = 0
start_collateral_base = 0
start_debt = 0
start_debt_base = 0
for (index, cdp) in start_safes.query(f"open == 1 and owner == '{owner}'").iterrows():
locked = cdp['locked']
freed = cdp['freed']
drawn = cdp['drawn']
wiped = cdp['wiped']
dripped = cdp['dripped']
v_bitten = cdp['v_bitten']
u_bitten = cdp['u_bitten']
w_bitten = cdp['w_bitten']
collateral = locked - freed - v_bitten
debt = drawn - wiped - u_bitten
start_collateral += collateral
start_debt += debt
collateral_base = collateral * start_eth_price
debt_base = debt * start_rp
start_collateral_base += collateral_base
start_debt_base += debt_base
start_base += collateral_base - debt_base
final_base = 0
final_collateral = 0
final_collateral_base = 0
final_debt = 0
final_debt_base = 0
for (index, cdp) in final_safes.query(f"open == 1 and owner == '{owner}'").iterrows():
locked = cdp['locked']
freed = cdp['freed']
drawn = cdp['drawn']
wiped = cdp['wiped']
dripped = cdp['dripped']
v_bitten = cdp['v_bitten']
u_bitten = cdp['u_bitten']
w_bitten = cdp['w_bitten']
collateral = locked - freed - v_bitten
debt = drawn - wiped - u_bitten
final_collateral += collateral
final_debt += debt
collateral_base = collateral * final_eth_price
debt_base = debt * final_rp
final_collateral_base += collateral_base
final_debt_base += debt_base
final_base += collateral_base - debt_base
return {'start_collateral': start_collateral, 'start_collateral_base': start_collateral_base, 'start_debt': start_debt, 'start_debt_base': start_debt_base, 'final_collateral': final_collateral, 'final_collateral_base': final_collateral_base, 'final_debt': final_debt, 'final_debt_base': final_debt_base, 'final_new_debt': final_debt - start_debt, 'final_new_debt_base': final_debt_base - start_debt_base, 'start_base': start_base, 'final_base': final_base, 'profit': final_collateral_base - start_collateral_base - final_debt_base + start_debt_base} |
'''
2520 is the smallest number that can be divided by
each of the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly
divisible by all of the numbers from 1 to 20?
'''
# VERSION 1 : Works 'great' for 10 but too slow for 20
def smallest_multiple(number):
mult = 0
while True:
print(mult)
mult += 1
isOk = True
for i in range(1, number):
if mult % i != 0:
isOk = False
break
if isOk:
break
return mult
# print( smallest_multiple(20) )
def isPrime(number):
for i in range(2, number):
if number % i == 0:
return False
return True
# Version 2: Uses prime numbers, works fine for 20 and 100 but 1000 is too slow
def smallestMultiple(number):
# Take all the prime numbers
primeNumbers = []
for i in range(2, number):
if isPrime(i):
primeNumbers.append(i)
# Multiply all the prime numbers
multiple = 1
for primeNumber in primeNumbers:
multiple *= primeNumber
# Find the smallest multiple
i = 0
while True:
i += 1
newMultiple = multiple * i
# Check if the number is a multiple of all numbers bellow
isOk = True
for j in range(1, number):
if newMultiple % j != 0:
isOk = False
break
if isOk:
return newMultiple
print( smallestMultiple(1000) )
| """
2520 is the smallest number that can be divided by
each of the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly
divisible by all of the numbers from 1 to 20?
"""
def smallest_multiple(number):
mult = 0
while True:
print(mult)
mult += 1
is_ok = True
for i in range(1, number):
if mult % i != 0:
is_ok = False
break
if isOk:
break
return mult
def is_prime(number):
for i in range(2, number):
if number % i == 0:
return False
return True
def smallest_multiple(number):
prime_numbers = []
for i in range(2, number):
if is_prime(i):
primeNumbers.append(i)
multiple = 1
for prime_number in primeNumbers:
multiple *= primeNumber
i = 0
while True:
i += 1
new_multiple = multiple * i
is_ok = True
for j in range(1, number):
if newMultiple % j != 0:
is_ok = False
break
if isOk:
return newMultiple
print(smallest_multiple(1000)) |
class SnakeHitsBoundaryError(Exception):
def __init__(self):
super().__init__("Snake hits boundary!")
class SnakeHitsItselfError(Exception):
def __init__(self):
super().__init__("Snake hits itself!")
class SnakeSpeedZeroError(Exception):
def __init__(self):
super().__init__("Snake speed is set to 0!")
class EggHitsSnakeError(Exception):
def __init__(self):
super().__init__("Egg hits snake!")
| class Snakehitsboundaryerror(Exception):
def __init__(self):
super().__init__('Snake hits boundary!')
class Snakehitsitselferror(Exception):
def __init__(self):
super().__init__('Snake hits itself!')
class Snakespeedzeroerror(Exception):
def __init__(self):
super().__init__('Snake speed is set to 0!')
class Egghitssnakeerror(Exception):
def __init__(self):
super().__init__('Egg hits snake!') |
cwarning_uniq = dict()
class CWarning:
def __init__(self, id, desc, source, place):
self.id = id
self.desc = desc
self.source = source
self.place = place
def write_to_book(self, worksheet, row):
worksheet.write(row, 0, self.id)
worksheet.write(row, 1, self.desc)
worksheet.write(row, 2, self.place)
worksheet.write(row, 3, self.source)
@staticmethod
def is_unique(place):
global cwarning_uniq
if place not in cwarning_uniq:
cwarning_uniq[place] = 1
return True
return False
@staticmethod
def get_id(line):
try:
start_ind = line.index("[")
end_ind = line.index("]") + 1
return line[start_ind:end_ind]
except Exception:
return None
@staticmethod
def get_desc(line):
start_ind = line.index("warning:")
end_ind = line.index(" [") + 1
return line[start_ind+8:end_ind]
@staticmethod
def get_place(line):
end_ind = line.index(": ")
return line[0:end_ind]
@staticmethod
def get_filename(place):
start_ind = 0
if place.find("/") >= 0:
start_ind = place.rindex("/") + 1
if place.find(":") == -1:
res = place[start_ind:]
else:
res = place[start_ind:place.index(":")]
res = res.replace("\n", "")
return res
| cwarning_uniq = dict()
class Cwarning:
def __init__(self, id, desc, source, place):
self.id = id
self.desc = desc
self.source = source
self.place = place
def write_to_book(self, worksheet, row):
worksheet.write(row, 0, self.id)
worksheet.write(row, 1, self.desc)
worksheet.write(row, 2, self.place)
worksheet.write(row, 3, self.source)
@staticmethod
def is_unique(place):
global cwarning_uniq
if place not in cwarning_uniq:
cwarning_uniq[place] = 1
return True
return False
@staticmethod
def get_id(line):
try:
start_ind = line.index('[')
end_ind = line.index(']') + 1
return line[start_ind:end_ind]
except Exception:
return None
@staticmethod
def get_desc(line):
start_ind = line.index('warning:')
end_ind = line.index(' [') + 1
return line[start_ind + 8:end_ind]
@staticmethod
def get_place(line):
end_ind = line.index(': ')
return line[0:end_ind]
@staticmethod
def get_filename(place):
start_ind = 0
if place.find('/') >= 0:
start_ind = place.rindex('/') + 1
if place.find(':') == -1:
res = place[start_ind:]
else:
res = place[start_ind:place.index(':')]
res = res.replace('\n', '')
return res |
class Crunch42Exception(Exception):
...
__all__ = ("Crunch42Exception",)
| class Crunch42Exception(Exception):
...
__all__ = ('Crunch42Exception',) |
f = open('12.input')
input = f.readlines()
f.close()
register = {}
for line in input:
id = line[:line.index('<')-1]
links = line[line.index('>')+1:].strip()
register[id] = links.split(', ')
id0groups = set([])
def recursiveAdd(key):
if key not in register:
return
if key in id0groups:
return
if key not in id0groups:
id0groups.add(key)
for x in register[key]:
recursiveAdd(x)
recursiveAdd('0')
print(len(id0groups)) | f = open('12.input')
input = f.readlines()
f.close()
register = {}
for line in input:
id = line[:line.index('<') - 1]
links = line[line.index('>') + 1:].strip()
register[id] = links.split(', ')
id0groups = set([])
def recursive_add(key):
if key not in register:
return
if key in id0groups:
return
if key not in id0groups:
id0groups.add(key)
for x in register[key]:
recursive_add(x)
recursive_add('0')
print(len(id0groups)) |
alpha = "abcdefghijklmnopqrstuvwxyz"
i = 0
while i < 26:
i += 1
for lettre in alpha:
print (alpha[i])
| alpha = 'abcdefghijklmnopqrstuvwxyz'
i = 0
while i < 26:
i += 1
for lettre in alpha:
print(alpha[i]) |
"""SINGLY LINKED LIST"""
class Node:
def __init__(self, data=None, next=None) -> None:
self.data = data
self.next = next
class SinglyLinkedList:
def __init__(self) -> None:
self.head = None
def visualizeList(self):
if self.head is None:
print("Linked List is Empty!")
else:
current = self.head
ll = ""
while current is not None:
ll = ll + str(current.data) + "-->"
current = current.next
print(ll)
def listLength(self) -> int:
count = 0
current = self.head
while current is not None:
current = current.next
count += 1
return count
def insertAtBeginining(self, data):
newNode = Node(data, None)
if self.head is None:
self.head = newNode
else:
newNode.next = self.head
self.head = newNode
def insertAtEnd(self, data):
newNode = Node(data, None)
if self.head is None:
self.head = newNode
else:
current = self.head
while current.next is not None:
current = current.next
current.next = newNode
newNode.next = None
def insertAtPosition(self, data, position: int):
newNode = Node(data, None)
if position < 0 or position > self.listLength():
print('Invalid Index! List is either empty or index is either negative or out of range')
elif position == 0:
self.insertAtBeginining(data)
elif position == self.listLength():
self.insertAtEnd(data)
else:
current = self.head
count = 0
while current is not None:
if count == position - 1:
newNode.next = current.next
current.next = newNode
break
current = current.next
count += 1
def deleteFromBegining(self):
if self.head is None:
print('Can not delete! Linked List is Empty!')
else:
self.head = self.head.next
def deleteFromEnd(self):
if self.head is None:
print('Can not delete! Linked List is Empty!')
else:
current = self.head
previous = self.head
while current.next is not None:
previous = current
current = current.next
previous.next = None
def deleteFromPosition(self, position: int):
if position < 0 or position >= self.listLength():
print('Invalid Index! List is either empty or index is either negative or out of range')
elif position == 0:
self.deleteFromBegining()
elif position == self.listLength() - 1:
self.deleteFromEnd()
else:
count = 0
current = self.head
while current.next is not None:
if count == position - 1:
current.next = current.next.next
break
count += 1
current = current.next
def insertMultipleNodes(self: object, nodesData: list):
self.head = None
for data in nodesData:
self.insertAtEnd(data) | """SINGLY LINKED LIST"""
class Node:
def __init__(self, data=None, next=None) -> None:
self.data = data
self.next = next
class Singlylinkedlist:
def __init__(self) -> None:
self.head = None
def visualize_list(self):
if self.head is None:
print('Linked List is Empty!')
else:
current = self.head
ll = ''
while current is not None:
ll = ll + str(current.data) + '-->'
current = current.next
print(ll)
def list_length(self) -> int:
count = 0
current = self.head
while current is not None:
current = current.next
count += 1
return count
def insert_at_beginining(self, data):
new_node = node(data, None)
if self.head is None:
self.head = newNode
else:
newNode.next = self.head
self.head = newNode
def insert_at_end(self, data):
new_node = node(data, None)
if self.head is None:
self.head = newNode
else:
current = self.head
while current.next is not None:
current = current.next
current.next = newNode
newNode.next = None
def insert_at_position(self, data, position: int):
new_node = node(data, None)
if position < 0 or position > self.listLength():
print('Invalid Index! List is either empty or index is either negative or out of range')
elif position == 0:
self.insertAtBeginining(data)
elif position == self.listLength():
self.insertAtEnd(data)
else:
current = self.head
count = 0
while current is not None:
if count == position - 1:
newNode.next = current.next
current.next = newNode
break
current = current.next
count += 1
def delete_from_begining(self):
if self.head is None:
print('Can not delete! Linked List is Empty!')
else:
self.head = self.head.next
def delete_from_end(self):
if self.head is None:
print('Can not delete! Linked List is Empty!')
else:
current = self.head
previous = self.head
while current.next is not None:
previous = current
current = current.next
previous.next = None
def delete_from_position(self, position: int):
if position < 0 or position >= self.listLength():
print('Invalid Index! List is either empty or index is either negative or out of range')
elif position == 0:
self.deleteFromBegining()
elif position == self.listLength() - 1:
self.deleteFromEnd()
else:
count = 0
current = self.head
while current.next is not None:
if count == position - 1:
current.next = current.next.next
break
count += 1
current = current.next
def insert_multiple_nodes(self: object, nodesData: list):
self.head = None
for data in nodesData:
self.insertAtEnd(data) |
# NOTE that: this class contains all the changable parameters
class Config:
lr = 0.001
epochs = 100
batch_size = 32
display_epoch = 1
save_model_path = r'D:\\scripts\\models\\'
opt = Config()
| class Config:
lr = 0.001
epochs = 100
batch_size = 32
display_epoch = 1
save_model_path = 'D:\\\\scripts\\\\models\\\\'
opt = config() |
#
# PySNMP MIB module CISCOSB-Redistribute (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCOSB-Redistribute
# Produced by pysmi-0.3.4 at Mon Apr 29 18:07:19 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")
ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint")
ipSpec, = mibBuilder.importSymbols("CISCOSB-IP", "ipSpec")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Gauge32, NotificationType, MibIdentifier, Integer32, Counter64, ObjectIdentity, Counter32, Bits, IpAddress, ModuleIdentity, Unsigned32, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Gauge32", "NotificationType", "MibIdentifier", "Integer32", "Counter64", "ObjectIdentity", "Counter32", "Bits", "IpAddress", "ModuleIdentity", "Unsigned32", "TimeTicks")
DisplayString, RowStatus, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TruthValue", "TextualConvention")
class RlRedistSrcProtocol(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
namedValues = NamedValues(("rlRedistProtocolConnected", 1), ("rlRedistProtocolStatic", 2), ("rlRedistProtocolRip", 3), ("rlRedistProtocolOspfv2", 4), ("rlRedistProtocolOspfv3", 5), ("rlRedistProtocolBgp", 6), ("rlRedistProtocolEigrp", 7), ("rlRedistProtocolIsIs", 8), ("rlRedistProtocolMobile", 9), ("rlRedistProtocolAll", 10))
class RlRedistDstProtocol(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(3, 4, 5, 6, 7, 8, 9))
namedValues = NamedValues(("rlRedistProtocolRip", 3), ("rlRedistProtocolOspfv2", 4), ("rlRedistProtocolOspfv3", 5), ("rlRedistProtocolBgp", 6), ("rlRedistProtocolEigrp", 7), ("rlRedistProtocolIsIs", 8), ("rlRedistProtocolMobile", 9))
class RlRedistMatchType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))
namedValues = NamedValues(("rlRedistMatchTypeNone", 0), ("rlRedistMatchTypeInternal", 1), ("rlRedistMatchTypeExternalOne", 2), ("rlRedistMatchTypeExternalTwo", 3))
class RlRedistMetricType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2))
namedValues = NamedValues(("rlRedistMetricTypeNone", 0), ("rlRedistMetricTypeExternalOne", 1), ("rlRedistMetricTypeExternalTwo", 2))
rlRedistribute = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27))
rlRedistTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1), )
if mibBuilder.loadTexts: rlRedistTable.setStatus('current')
rlRedistEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1), ).setIndexNames((0, "CISCOSB-Redistribute", "rlRedistDstProtocol"), (0, "CISCOSB-Redistribute", "rlRedistSrcProtocol"), (0, "CISCOSB-Redistribute", "rlRedistDstProcessId"), (0, "CISCOSB-Redistribute", "rlRedistSrcProcessId"), (0, "CISCOSB-Redistribute", "rlRedistMatchType"), (0, "CISCOSB-Redistribute", "rlRedistRoutMapName"))
if mibBuilder.loadTexts: rlRedistEntry.setStatus('current')
rlRedistDstProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 1), RlRedistDstProtocol())
if mibBuilder.loadTexts: rlRedistDstProtocol.setStatus('current')
rlRedistSrcProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 2), RlRedistSrcProtocol())
if mibBuilder.loadTexts: rlRedistSrcProtocol.setStatus('current')
rlRedistDstProcessId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: rlRedistDstProcessId.setStatus('current')
rlRedistSrcProcessId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: rlRedistSrcProcessId.setStatus('current')
rlRedistMatchType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 5), RlRedistMatchType())
if mibBuilder.loadTexts: rlRedistMatchType.setStatus('current')
rlRedistRoutMapName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32)))
if mibBuilder.loadTexts: rlRedistRoutMapName.setStatus('current')
rlRedistAsNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlRedistAsNumber.setStatus('current')
rlRedistMetricTransparent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 8), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlRedistMetricTransparent.setStatus('current')
rlRedistMetricValue = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 9), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlRedistMetricValue.setStatus('current')
rlRedistMetricType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 10), RlRedistMetricType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlRedistMetricType.setStatus('current')
rlRedistSubnets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 11), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlRedistSubnets.setStatus('current')
rlRedistOnlyNSSA = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 12), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlRedistOnlyNSSA.setStatus('current')
rlRedistRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 13), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: rlRedistRowStatus.setStatus('current')
mibBuilder.exportSymbols("CISCOSB-Redistribute", rlRedistRowStatus=rlRedistRowStatus, rlRedistRoutMapName=rlRedistRoutMapName, rlRedistSrcProcessId=rlRedistSrcProcessId, rlRedistSubnets=rlRedistSubnets, rlRedistEntry=rlRedistEntry, rlRedistDstProtocol=rlRedistDstProtocol, rlRedistMetricType=rlRedistMetricType, rlRedistribute=rlRedistribute, RlRedistSrcProtocol=RlRedistSrcProtocol, rlRedistSrcProtocol=rlRedistSrcProtocol, RlRedistMetricType=RlRedistMetricType, rlRedistOnlyNSSA=rlRedistOnlyNSSA, rlRedistAsNumber=rlRedistAsNumber, RlRedistMatchType=RlRedistMatchType, rlRedistMetricTransparent=rlRedistMetricTransparent, RlRedistDstProtocol=RlRedistDstProtocol, rlRedistMetricValue=rlRedistMetricValue, rlRedistDstProcessId=rlRedistDstProcessId, rlRedistMatchType=rlRedistMatchType, rlRedistTable=rlRedistTable)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, value_range_constraint, constraints_union, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'SingleValueConstraint')
(ip_spec,) = mibBuilder.importSymbols('CISCOSB-IP', 'ipSpec')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(mib_scalar, mib_table, mib_table_row, mib_table_column, iso, gauge32, notification_type, mib_identifier, integer32, counter64, object_identity, counter32, bits, ip_address, module_identity, unsigned32, time_ticks) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'Gauge32', 'NotificationType', 'MibIdentifier', 'Integer32', 'Counter64', 'ObjectIdentity', 'Counter32', 'Bits', 'IpAddress', 'ModuleIdentity', 'Unsigned32', 'TimeTicks')
(display_string, row_status, truth_value, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'RowStatus', 'TruthValue', 'TextualConvention')
class Rlredistsrcprotocol(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
named_values = named_values(('rlRedistProtocolConnected', 1), ('rlRedistProtocolStatic', 2), ('rlRedistProtocolRip', 3), ('rlRedistProtocolOspfv2', 4), ('rlRedistProtocolOspfv3', 5), ('rlRedistProtocolBgp', 6), ('rlRedistProtocolEigrp', 7), ('rlRedistProtocolIsIs', 8), ('rlRedistProtocolMobile', 9), ('rlRedistProtocolAll', 10))
class Rlredistdstprotocol(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(3, 4, 5, 6, 7, 8, 9))
named_values = named_values(('rlRedistProtocolRip', 3), ('rlRedistProtocolOspfv2', 4), ('rlRedistProtocolOspfv3', 5), ('rlRedistProtocolBgp', 6), ('rlRedistProtocolEigrp', 7), ('rlRedistProtocolIsIs', 8), ('rlRedistProtocolMobile', 9))
class Rlredistmatchtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3))
named_values = named_values(('rlRedistMatchTypeNone', 0), ('rlRedistMatchTypeInternal', 1), ('rlRedistMatchTypeExternalOne', 2), ('rlRedistMatchTypeExternalTwo', 3))
class Rlredistmetrictype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2))
named_values = named_values(('rlRedistMetricTypeNone', 0), ('rlRedistMetricTypeExternalOne', 1), ('rlRedistMetricTypeExternalTwo', 2))
rl_redistribute = mib_identifier((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27))
rl_redist_table = mib_table((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1))
if mibBuilder.loadTexts:
rlRedistTable.setStatus('current')
rl_redist_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1)).setIndexNames((0, 'CISCOSB-Redistribute', 'rlRedistDstProtocol'), (0, 'CISCOSB-Redistribute', 'rlRedistSrcProtocol'), (0, 'CISCOSB-Redistribute', 'rlRedistDstProcessId'), (0, 'CISCOSB-Redistribute', 'rlRedistSrcProcessId'), (0, 'CISCOSB-Redistribute', 'rlRedistMatchType'), (0, 'CISCOSB-Redistribute', 'rlRedistRoutMapName'))
if mibBuilder.loadTexts:
rlRedistEntry.setStatus('current')
rl_redist_dst_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 1), rl_redist_dst_protocol())
if mibBuilder.loadTexts:
rlRedistDstProtocol.setStatus('current')
rl_redist_src_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 2), rl_redist_src_protocol())
if mibBuilder.loadTexts:
rlRedistSrcProtocol.setStatus('current')
rl_redist_dst_process_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
rlRedistDstProcessId.setStatus('current')
rl_redist_src_process_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
rlRedistSrcProcessId.setStatus('current')
rl_redist_match_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 5), rl_redist_match_type())
if mibBuilder.loadTexts:
rlRedistMatchType.setStatus('current')
rl_redist_rout_map_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 32)))
if mibBuilder.loadTexts:
rlRedistRoutMapName.setStatus('current')
rl_redist_as_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rlRedistAsNumber.setStatus('current')
rl_redist_metric_transparent = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 8), truth_value().clone('true')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rlRedistMetricTransparent.setStatus('current')
rl_redist_metric_value = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 9), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rlRedistMetricValue.setStatus('current')
rl_redist_metric_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 10), rl_redist_metric_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rlRedistMetricType.setStatus('current')
rl_redist_subnets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 11), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rlRedistSubnets.setStatus('current')
rl_redist_only_nssa = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 12), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rlRedistOnlyNSSA.setStatus('current')
rl_redist_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 26, 27, 1, 1, 13), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
rlRedistRowStatus.setStatus('current')
mibBuilder.exportSymbols('CISCOSB-Redistribute', rlRedistRowStatus=rlRedistRowStatus, rlRedistRoutMapName=rlRedistRoutMapName, rlRedistSrcProcessId=rlRedistSrcProcessId, rlRedistSubnets=rlRedistSubnets, rlRedistEntry=rlRedistEntry, rlRedistDstProtocol=rlRedistDstProtocol, rlRedistMetricType=rlRedistMetricType, rlRedistribute=rlRedistribute, RlRedistSrcProtocol=RlRedistSrcProtocol, rlRedistSrcProtocol=rlRedistSrcProtocol, RlRedistMetricType=RlRedistMetricType, rlRedistOnlyNSSA=rlRedistOnlyNSSA, rlRedistAsNumber=rlRedistAsNumber, RlRedistMatchType=RlRedistMatchType, rlRedistMetricTransparent=rlRedistMetricTransparent, RlRedistDstProtocol=RlRedistDstProtocol, rlRedistMetricValue=rlRedistMetricValue, rlRedistDstProcessId=rlRedistDstProcessId, rlRedistMatchType=rlRedistMatchType, rlRedistTable=rlRedistTable) |
class Beam(object):
def __init__(self, beam_size):
self.beam_size = beam_size
self.candidates = []
self.scores = []
def step(self, prob, prev_beam, f_done):
pre_score = prob.new(prev_beam.scores)
score = prob + pre_score.unsqueeze(-1).expand_as(prob)
nbest_score, nbest_idx = score.view(-1).topk(self.beam_size, largest=False)
beam_idx = nbest_idx / prob.size(1)
token_idx = nbest_idx - beam_idx * prob.size(1)
sentence_done_list, score_done_list, remain_list = [], [], []
prev_candidates = prev_beam.candidates
for b_score, b_idx, t_idx in zip(nbest_score, beam_idx, token_idx):
candidate = prev_candidates[b_idx] + [t_idx]
if f_done(candidate):
sentence_done_list.append(candidate)
score_done_list.append(b_score)
else:
remain_list.append(b_idx)
self.candidates.append(candidate)
self.scores.append(b_score)
return sentence_done_list, score_done_list, remain_list
| class Beam(object):
def __init__(self, beam_size):
self.beam_size = beam_size
self.candidates = []
self.scores = []
def step(self, prob, prev_beam, f_done):
pre_score = prob.new(prev_beam.scores)
score = prob + pre_score.unsqueeze(-1).expand_as(prob)
(nbest_score, nbest_idx) = score.view(-1).topk(self.beam_size, largest=False)
beam_idx = nbest_idx / prob.size(1)
token_idx = nbest_idx - beam_idx * prob.size(1)
(sentence_done_list, score_done_list, remain_list) = ([], [], [])
prev_candidates = prev_beam.candidates
for (b_score, b_idx, t_idx) in zip(nbest_score, beam_idx, token_idx):
candidate = prev_candidates[b_idx] + [t_idx]
if f_done(candidate):
sentence_done_list.append(candidate)
score_done_list.append(b_score)
else:
remain_list.append(b_idx)
self.candidates.append(candidate)
self.scores.append(b_score)
return (sentence_done_list, score_done_list, remain_list) |
INSTALLED_APPS = [
'cacheops',
'django.contrib.auth',
'django.contrib.contenttypes',
'tests',
]
AUTH_PROFILE_MODULE = 'tests.UserProfile'
# Django replaces this, but it still wants it. *shrugs*
DATABASE_ENGINE = 'django.db.backends.sqlite3',
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'sqlite.db'
},
'slave': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'sqlite.db'
}
}
CACHEOPS_REDIS = {
'host': 'localhost',
'port': 6379,
'db': 13,
'socket_timeout': 3,
}
CACHEOPS = {
'tests.local': ('just_enable', 60*60, {'local_get': True}),
'tests.cacheonsavemodel': ('just_enable', 60*60, {'cache_on_save': True}),
'tests.dbbinded': ('just_enable', 60*60, {'db_agnostic': False}),
'tests.issue': ('all', 60*60),
'tests.genericcontainer': ('all', 60*60),
'*.*': ('just_enable', 60*60),
}
SECRET_KEY = 'abc'
| installed_apps = ['cacheops', 'django.contrib.auth', 'django.contrib.contenttypes', 'tests']
auth_profile_module = 'tests.UserProfile'
database_engine = ('django.db.backends.sqlite3',)
databases = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'sqlite.db'}, 'slave': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'sqlite.db'}}
cacheops_redis = {'host': 'localhost', 'port': 6379, 'db': 13, 'socket_timeout': 3}
cacheops = {'tests.local': ('just_enable', 60 * 60, {'local_get': True}), 'tests.cacheonsavemodel': ('just_enable', 60 * 60, {'cache_on_save': True}), 'tests.dbbinded': ('just_enable', 60 * 60, {'db_agnostic': False}), 'tests.issue': ('all', 60 * 60), 'tests.genericcontainer': ('all', 60 * 60), '*.*': ('just_enable', 60 * 60)}
secret_key = 'abc' |
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
def partition(head: ListNode, x: int) -> ListNode:
l1 = l1_pre = ListNode(0)
l2 = l2_pre = ListNode(0)
while head :
if head.val < x :
l1.next = ListNode(head.val)
l1 = l1.next
else :
l2.next = ListNode(head.val)
l2 = l2.next
head = head.next
l1_pre = l1_pre.next
l2_pre = l2_pre.next
if not l1_pre :
return l2_pre
result = l1_pre
while l1_pre.next :
l1_pre = l1_pre.next
l1_pre.next = l2_pre
return result
if __name__ == "__main__":
head = ListNode(1)
head.next = ListNode(4)
head.next.next = ListNode(3)
head.next.next.next = ListNode(2)
head.next.next.next.next = ListNode(5)
head.next.next.next.next.next = ListNode(2)
x = 3
result = partition(head, x)
while result :
print(result.val)
result = result.next
| class Listnode:
def __init__(self, x):
self.val = x
self.next = None
def partition(head: ListNode, x: int) -> ListNode:
l1 = l1_pre = list_node(0)
l2 = l2_pre = list_node(0)
while head:
if head.val < x:
l1.next = list_node(head.val)
l1 = l1.next
else:
l2.next = list_node(head.val)
l2 = l2.next
head = head.next
l1_pre = l1_pre.next
l2_pre = l2_pre.next
if not l1_pre:
return l2_pre
result = l1_pre
while l1_pre.next:
l1_pre = l1_pre.next
l1_pre.next = l2_pre
return result
if __name__ == '__main__':
head = list_node(1)
head.next = list_node(4)
head.next.next = list_node(3)
head.next.next.next = list_node(2)
head.next.next.next.next = list_node(5)
head.next.next.next.next.next = list_node(2)
x = 3
result = partition(head, x)
while result:
print(result.val)
result = result.next |
""" This module implements filter transformer classes for different backends. These
classes typically parse the filter with Lark and produce an appropriate query for the
given backend.
"""
| """ This module implements filter transformer classes for different backends. These
classes typically parse the filter with Lark and produce an appropriate query for the
given backend.
""" |
class Stop(RuntimeError): pass
def stop():
raise Stop()
| class Stop(RuntimeError):
pass
def stop():
raise stop() |
def reverse_array(a):
n = len(a)
for i in range(n // 2):
a[i], a[n - i - 1] = a[n - i - 1], a[i]
return a
if __name__ == '__main__':
print(reverse_array([1,2,3,4,5,6])) | def reverse_array(a):
n = len(a)
for i in range(n // 2):
(a[i], a[n - i - 1]) = (a[n - i - 1], a[i])
return a
if __name__ == '__main__':
print(reverse_array([1, 2, 3, 4, 5, 6])) |
#Write a Python program to test whether a passed letter is a vowel or no
def isvowel(letter):
vowels = 'aeiou'
if letter.lower() in vowels:
return True
else:
return False
print(isvowel('a'))
print(isvowel('c'))
print(isvowel('84')) | def isvowel(letter):
vowels = 'aeiou'
if letter.lower() in vowels:
return True
else:
return False
print(isvowel('a'))
print(isvowel('c'))
print(isvowel('84')) |
class AutoDeployAgentException(Exception):
"""Basic exception"""
def __init__(self, msg=None):
if msg is None:
msg = "Unexpected error was triggered"
super(AutoDeployAgentException, self).__init__(msg)
class NoErrorException(AutoDeployAgentException):
"""No error while checking for changes"""
def __init__(self):
msg = "no error, no problem"
super(NoErrorException, self).__init__(msg)
class CmdLineError(AutoDeployAgentException):
"""Error while executing command line"""
def __init__(self, cmd, error_msg):
msg = "Error while executing {cmd}:\n{error_msg}".format(
cmd=cmd, error_msg=error_msg)
super(CmdLineError, self).__init__(msg)
self.cmd = cmd
self.error_msg = error_msg
class ConfigurationError(AutoDeployAgentException):
"""Wrong configuration error"""
def __init__(self, msg):
super(ConfigurationError, self).__init__(msg)
class DependencyNotReadyError(AutoDeployAgentException):
"""Dependency not ready error"""
def __init__(self, msg):
super(DependencyNotReadyError, self).__init__(msg)
| class Autodeployagentexception(Exception):
"""Basic exception"""
def __init__(self, msg=None):
if msg is None:
msg = 'Unexpected error was triggered'
super(AutoDeployAgentException, self).__init__(msg)
class Noerrorexception(AutoDeployAgentException):
"""No error while checking for changes"""
def __init__(self):
msg = 'no error, no problem'
super(NoErrorException, self).__init__(msg)
class Cmdlineerror(AutoDeployAgentException):
"""Error while executing command line"""
def __init__(self, cmd, error_msg):
msg = 'Error while executing {cmd}:\n{error_msg}'.format(cmd=cmd, error_msg=error_msg)
super(CmdLineError, self).__init__(msg)
self.cmd = cmd
self.error_msg = error_msg
class Configurationerror(AutoDeployAgentException):
"""Wrong configuration error"""
def __init__(self, msg):
super(ConfigurationError, self).__init__(msg)
class Dependencynotreadyerror(AutoDeployAgentException):
"""Dependency not ready error"""
def __init__(self, msg):
super(DependencyNotReadyError, self).__init__(msg) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.