content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# # PySNMP MIB module Juniper-PPPOE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-PPPOE-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:53:05 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") ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint") InterfaceIndexOrZero, InterfaceIndex = mibBuilder.importSymbols("IF-MIB", "InterfaceIndexOrZero", "InterfaceIndex") juniMibs, = mibBuilder.importSymbols("Juniper-MIBs", "juniMibs") JuniNextIfIndex, JuniEnable = mibBuilder.importSymbols("Juniper-TC", "JuniNextIfIndex", "JuniEnable") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, TimeTicks, Gauge32, IpAddress, iso, MibIdentifier, Bits, NotificationType, Counter64, Integer32, ObjectIdentity, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "TimeTicks", "Gauge32", "IpAddress", "iso", "MibIdentifier", "Bits", "NotificationType", "Counter64", "Integer32", "ObjectIdentity", "Unsigned32") MacAddress, TextualConvention, DisplayString, RowStatus, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "MacAddress", "TextualConvention", "DisplayString", "RowStatus", "TruthValue") juniPPPoEMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18)) juniPPPoEMIB.setRevisions(('2008-11-27 10:23', '2008-06-18 09:42', '2005-08-03 20:58', '2005-05-18 12:01', '2004-06-09 20:58', '2003-03-10 18:30', '2002-10-02 20:12', '2002-10-01 18:27', '2002-08-16 21:46', '2001-06-19 14:27', '2001-03-21 15:00', '2001-02-12 00:00', '2000-10-25 00:00', '1999-05-13 00:00',)) if mibBuilder.loadTexts: juniPPPoEMIB.setLastUpdated('200811271023Z') if mibBuilder.loadTexts: juniPPPoEMIB.setOrganization('Juniper Networks, Inc.') class JuniPPPoEServiceNameAction(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1)) namedValues = NamedValues(("drop", 0), ("terminate", 1)) juniPPPoEObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1)) juniPPPoEIfLayer = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1)) juniPPPoESubIfLayer = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2)) juniPPPoEGlobal = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 3)) juniPPPoEProfile = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4)) juniPPPoESummary = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5)) juniPPPoEServices = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6)) juniPPPoENextIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 1), JuniNextIfIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoENextIfIndex.setStatus('current') juniPPPoEIfTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2), ) if mibBuilder.loadTexts: juniPPPoEIfTable.setStatus('current') juniPPPoEIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1), ).setIndexNames((0, "Juniper-PPPOE-MIB", "juniPPPoEIfIfIndex")) if mibBuilder.loadTexts: juniPPPoEIfEntry.setStatus('current') juniPPPoEIfIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 1), InterfaceIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfIfIndex.setStatus('current') juniPPPoEIfMaxNumSessions = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65335))).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEIfMaxNumSessions.setStatus('current') juniPPPoEIfRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEIfRowStatus.setStatus('current') juniPPPoEIfLowerIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 4), InterfaceIndexOrZero()).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEIfLowerIfIndex.setStatus('current') juniPPPoEIfAcName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEIfAcName.setStatus('current') juniPPPoEIfDupProtect = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 6), JuniEnable().clone('disable')).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEIfDupProtect.setStatus('current') juniPPPoEIfPADIFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 7), JuniEnable().clone('disable')).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEIfPADIFlag.setStatus('current') juniPPPoEIfAutoconfig = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 8), JuniEnable().clone('disable')).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEIfAutoconfig.setStatus('current') juniPPPoEIfServiceNameTable = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 9), Unsigned32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEIfServiceNameTable.setStatus('current') juniPPPoEIfPadrRemoteCircuitIdCapture = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 10), JuniEnable().clone('disable')).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEIfPadrRemoteCircuitIdCapture.setStatus('current') juniPPPoEIfMtu = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(1, 1), ValueRangeConstraint(2, 2), ValueRangeConstraint(66, 65535), )).clone(1494)).setMaxAccess("readwrite") if mibBuilder.loadTexts: juniPPPoEIfMtu.setStatus('current') juniPPPoEIfLockoutMin = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 86400))).setMaxAccess("readwrite") if mibBuilder.loadTexts: juniPPPoEIfLockoutMin.setStatus('current') juniPPPoEIfLockoutMax = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 86400))).setMaxAccess("readwrite") if mibBuilder.loadTexts: juniPPPoEIfLockoutMax.setStatus('current') juniPPPoEMaxSessionVsa = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("override", 1), ("ignore", 2))).clone('ignore')).setMaxAccess("readwrite") if mibBuilder.loadTexts: juniPPPoEMaxSessionVsa.setStatus('current') juniPPPoEIfStatsTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3), ) if mibBuilder.loadTexts: juniPPPoEIfStatsTable.setStatus('current') juniPPPoEIfStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1), ).setIndexNames((0, "Juniper-PPPOE-MIB", "juniPPPoEIfIfIndex")) if mibBuilder.loadTexts: juniPPPoEIfStatsEntry.setStatus('current') juniPPPoEIfStatsRxPADI = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxPADI.setStatus('current') juniPPPoEIfStatsTxPADO = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsTxPADO.setStatus('current') juniPPPoEIfStatsRxPADR = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxPADR.setStatus('current') juniPPPoEIfStatsTxPADS = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsTxPADS.setStatus('current') juniPPPoEIfStatsRxPADT = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxPADT.setStatus('current') juniPPPoEIfStatsTxPADT = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsTxPADT.setStatus('current') juniPPPoEIfStatsRxInvVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvVersion.setStatus('current') juniPPPoEIfStatsRxInvCode = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvCode.setStatus('current') juniPPPoEIfStatsRxInvTags = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvTags.setStatus('current') juniPPPoEIfStatsRxInvSession = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvSession.setStatus('obsolete') juniPPPoEIfStatsRxInvTypes = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvTypes.setStatus('current') juniPPPoEIfStatsRxInvPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvPackets.setStatus('current') juniPPPoEIfStatsRxInsufficientResources = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxInsufficientResources.setStatus('current') juniPPPoEIfStatsTxPADM = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsTxPADM.setStatus('current') juniPPPoEIfStatsTxPADN = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsTxPADN.setStatus('current') juniPPPoEIfStatsRxInvTagLength = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvTagLength.setStatus('current') juniPPPoEIfStatsRxInvLength = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvLength.setStatus('current') juniPPPoEIfStatsRxInvPadISession = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvPadISession.setStatus('current') juniPPPoEIfStatsRxInvPadRSession = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvPadRSession.setStatus('current') juniPPPoEIfLockoutTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 4), ) if mibBuilder.loadTexts: juniPPPoEIfLockoutTable.setStatus('current') juniPPPoEIfLockoutEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 4, 1), ).setIndexNames((0, "Juniper-PPPOE-MIB", "juniPPPoEIfIfIndex"), (0, "Juniper-PPPOE-MIB", "juniPPPoEIfLockoutClientAddress")) if mibBuilder.loadTexts: juniPPPoEIfLockoutEntry.setStatus('current') juniPPPoEIfLockoutClientAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 4, 1, 1), MacAddress()) if mibBuilder.loadTexts: juniPPPoEIfLockoutClientAddress.setStatus('current') juniPPPoEIfLockoutTime = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 86400))).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfLockoutTime.setStatus('current') juniPPPoEIfLockoutElapsedTime = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 86400))).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfLockoutElapsedTime.setStatus('current') juniPPPoEIfLockoutNextTime = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 4, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 86400))).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEIfLockoutNextTime.setStatus('current') juniPPPoESubIfNextIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 1), JuniNextIfIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESubIfNextIfIndex.setStatus('current') juniPPPoESubIfTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2), ) if mibBuilder.loadTexts: juniPPPoESubIfTable.setStatus('current') juniPPPoESubIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1), ).setIndexNames((0, "Juniper-PPPOE-MIB", "juniPPPoESubIfIndex")) if mibBuilder.loadTexts: juniPPPoESubIfEntry.setStatus('current') juniPPPoESubIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: juniPPPoESubIfIndex.setStatus('current') juniPPPoESubIfRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoESubIfRowStatus.setStatus('current') juniPPPoESubIfLowerIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 3), InterfaceIndexOrZero()).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoESubIfLowerIfIndex.setStatus('current') juniPPPoESubIfId = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647)).clone(-1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoESubIfId.setStatus('current') juniPPPoESubIfSessionId = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESubIfSessionId.setStatus('current') juniPPPoESubIfMotm = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 127))).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoESubIfMotm.setStatus('current') juniPPPoESubIfUrl = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 127))).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoESubIfUrl.setStatus('current') juniPPPoEGlobalMotm = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 3, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 127))).setMaxAccess("readwrite") if mibBuilder.loadTexts: juniPPPoEGlobalMotm.setStatus('current') juniPPPoEServiceNameTableNextIndex = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 1), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEServiceNameTableNextIndex.setStatus('current') juniPPPoEServiceNameTableTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2), ) if mibBuilder.loadTexts: juniPPPoEServiceNameTableTable.setStatus('current') juniPPPoEServiceNameTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2, 1), ).setIndexNames((0, "Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableIndex")) if mibBuilder.loadTexts: juniPPPoEServiceNameTableEntry.setStatus('current') juniPPPoEServiceNameTableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2, 1, 1), Unsigned32()) if mibBuilder.loadTexts: juniPPPoEServiceNameTableIndex.setStatus('current') juniPPPoEServiceNameTableName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEServiceNameTableName.setStatus('current') juniPPPoEServiceNameTableEmptyAction = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2, 1, 3), JuniPPPoEServiceNameAction()).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEServiceNameTableEmptyAction.setStatus('current') juniPPPoEServiceNameTableRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEServiceNameTableRowStatus.setStatus('current') juniPPPoEServiceNameTableUnknownAction = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2, 1, 5), JuniPPPoEServiceNameAction()).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEServiceNameTableUnknownAction.setStatus('current') juniPPPoEServiceNameTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 3), ) if mibBuilder.loadTexts: juniPPPoEServiceNameTable.setStatus('current') juniPPPoEServiceNameEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 3, 1), ).setIndexNames((0, "Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableIndex"), (0, "Juniper-PPPOE-MIB", "juniPPPoEServiceName")) if mibBuilder.loadTexts: juniPPPoEServiceNameEntry.setStatus('current') juniPPPoEServiceName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 3, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))) if mibBuilder.loadTexts: juniPPPoEServiceName.setStatus('current') juniPPPoEServiceNameAction = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 3, 1, 2), JuniPPPoEServiceNameAction()).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEServiceNameAction.setStatus('current') juniPPPoEServiceNameRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 3, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEServiceNameRowStatus.setStatus('current') juniPPPoEProfileTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4, 1), ) if mibBuilder.loadTexts: juniPPPoEProfileTable.setStatus('deprecated') juniPPPoEProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4, 1, 1), ).setIndexNames((0, "Juniper-PPPOE-MIB", "juniPPPoEProfileIndex")) if mibBuilder.loadTexts: juniPPPoEProfileEntry.setStatus('deprecated') juniPPPoEProfileIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4, 1, 1, 1), Unsigned32()) if mibBuilder.loadTexts: juniPPPoEProfileIndex.setStatus('deprecated') juniPPPoEProfileRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4, 1, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEProfileRowStatus.setStatus('deprecated') juniPPPoEProfileMotm = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 127))).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEProfileMotm.setStatus('deprecated') juniPPPoEProfileUrl = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 127))).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniPPPoEProfileUrl.setStatus('deprecated') juniPPPoEMajorInterfaceCount = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoEMajorInterfaceCount.setStatus('current') juniPPPoESummaryMajorIfAdminUp = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESummaryMajorIfAdminUp.setStatus('current') juniPPPoESummaryMajorIfAdminDown = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESummaryMajorIfAdminDown.setStatus('current') juniPPPoESummaryMajorIfOperUp = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESummaryMajorIfOperUp.setStatus('current') juniPPPoESummaryMajorIfOperDown = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESummaryMajorIfOperDown.setStatus('current') juniPPPoESummaryMajorIfLowerLayerDown = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESummaryMajorIfLowerLayerDown.setStatus('current') juniPPPoESummaryMajorIfNotPresent = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESummaryMajorIfNotPresent.setStatus('current') juniPPPoESummarySubInterfaceCount = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESummarySubInterfaceCount.setStatus('current') juniPPPoESummarySubIfAdminUp = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESummarySubIfAdminUp.setStatus('current') juniPPPoESummarySubIfAdminDown = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESummarySubIfAdminDown.setStatus('current') juniPPPoESummarySubIfOperUp = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESummarySubIfOperUp.setStatus('current') juniPPPoESummarySubIfOperDown = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESummarySubIfOperDown.setStatus('current') juniPPPoESummarySubIfLowerLayerDown = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESummarySubIfLowerLayerDown.setStatus('current') juniPPPoESummarySubIfNotPresent = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: juniPPPoESummarySubIfNotPresent.setStatus('current') juniPPPoEConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4)) juniPPPoECompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5)) juniPPPoEGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4)) juniPPPoECompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 1)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEGroup"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoECompliance = juniPPPoECompliance.setStatus('obsolete') juniPPPoECompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 2)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoEProfileGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoECompliance2 = juniPPPoECompliance2.setStatus('obsolete') juniPPPoECompliance3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 3)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoEProfileGroup"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoECompliance3 = juniPPPoECompliance3.setStatus('obsolete') juniPPPoECompliance4 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 4)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoECompliance4 = juniPPPoECompliance4.setStatus('obsolete') juniPPPoECompliance5 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 5)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEGroup3"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoECompliance5 = juniPPPoECompliance5.setStatus('obsolete') juniPPPoECompliance6 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 6)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEGroup4"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoECompliance6 = juniPPPoECompliance6.setStatus('obsolete') juniPPPoECompliance7 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 7)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEGroup5"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoECompliance7 = juniPPPoECompliance7.setStatus('obsolete') juniPPPoECompliance8 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 8)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEGroup6"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryGroup"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoECompliance8 = juniPPPoECompliance8.setStatus('obsolete') juniPPPoECompliance9 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 9)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEGroup7"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryGroup"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoECompliance9 = juniPPPoECompliance9.setStatus('obsolete') juniPPPoECompliance10 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 10)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEGroup8"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryGroup"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoECompliance10 = juniPPPoECompliance10.setStatus('obsolete') juniPPPoECompliance11 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 11)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEGroup9"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryGroup"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableGroup"), ("Juniper-PPPOE-MIB", "juniPPPoELockoutTableGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoECompliance11 = juniPPPoECompliance11.setStatus('obsolete') juniPPPoECompliance12 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 12)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEGroup10"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryGroup"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableGroup"), ("Juniper-PPPOE-MIB", "juniPPPoELockoutTableGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoECompliance12 = juniPPPoECompliance12.setStatus('obsolete') juniPPPoECompliance13 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 13)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEGroup10"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfGroup2"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryGroup"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableGroup1"), ("Juniper-PPPOE-MIB", "juniPPPoELockoutTableGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoECompliance13 = juniPPPoECompliance13.setStatus('current') juniPPPoEGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 1)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoENextIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfMaxNumSessions"), ("Juniper-PPPOE-MIB", "juniPPPoEIfRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLowerIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADI"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADO"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADR"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADS"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvVersion"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvCode"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTags"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvSession"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTypes"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPackets"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInsufficientResources")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoEGroup = juniPPPoEGroup.setStatus('obsolete') juniPPPoESubIfGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 2)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoESubIfNextIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfLowerIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfId"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfSessionId")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoESubIfGroup = juniPPPoESubIfGroup.setStatus('obsolete') juniPPPoEProfileGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 3)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEProfileRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEProfileUrl"), ("Juniper-PPPOE-MIB", "juniPPPoEProfileMotm")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoEProfileGroup = juniPPPoEProfileGroup.setStatus('deprecated') juniPPPoEGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 4)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoENextIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfMaxNumSessions"), ("Juniper-PPPOE-MIB", "juniPPPoEIfRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLowerIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADI"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADO"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADR"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADS"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvVersion"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvCode"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTags"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvSession"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTypes"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPackets"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInsufficientResources"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADM"), ("Juniper-PPPOE-MIB", "juniPPPoEGlobalMotm")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoEGroup2 = juniPPPoEGroup2.setStatus('obsolete') juniPPPoESubIfGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 5)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoESubIfNextIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfLowerIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfId"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfSessionId"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfUrl"), ("Juniper-PPPOE-MIB", "juniPPPoESubIfMotm")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoESubIfGroup2 = juniPPPoESubIfGroup2.setStatus('current') juniPPPoESummaryGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 6)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEMajorInterfaceCount"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryMajorIfAdminUp"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryMajorIfAdminDown"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryMajorIfOperUp"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryMajorIfOperDown"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryMajorIfNotPresent"), ("Juniper-PPPOE-MIB", "juniPPPoESummaryMajorIfLowerLayerDown"), ("Juniper-PPPOE-MIB", "juniPPPoESummarySubInterfaceCount"), ("Juniper-PPPOE-MIB", "juniPPPoESummarySubIfAdminUp"), ("Juniper-PPPOE-MIB", "juniPPPoESummarySubIfAdminDown"), ("Juniper-PPPOE-MIB", "juniPPPoESummarySubIfOperUp"), ("Juniper-PPPOE-MIB", "juniPPPoESummarySubIfOperDown"), ("Juniper-PPPOE-MIB", "juniPPPoESummarySubIfNotPresent"), ("Juniper-PPPOE-MIB", "juniPPPoESummarySubIfLowerLayerDown")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoESummaryGroup = juniPPPoESummaryGroup.setStatus('current') juniPPPoEGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 7)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoENextIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfMaxNumSessions"), ("Juniper-PPPOE-MIB", "juniPPPoEIfRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLowerIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAcName"), ("Juniper-PPPOE-MIB", "juniPPPoEIfDupProtect"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADI"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADO"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADR"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADS"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvVersion"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvCode"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTags"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvSession"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTypes"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPackets"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInsufficientResources"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADM"), ("Juniper-PPPOE-MIB", "juniPPPoEGlobalMotm")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoEGroup3 = juniPPPoEGroup3.setStatus('obsolete') juniPPPoEGroup4 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 8)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoENextIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfMaxNumSessions"), ("Juniper-PPPOE-MIB", "juniPPPoEIfRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLowerIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAcName"), ("Juniper-PPPOE-MIB", "juniPPPoEIfDupProtect"), ("Juniper-PPPOE-MIB", "juniPPPoEIfPADIFlag"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAutoconfig"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADI"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADO"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADR"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADS"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvVersion"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvCode"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTags"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvSession"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTypes"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPackets"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInsufficientResources"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADM"), ("Juniper-PPPOE-MIB", "juniPPPoEGlobalMotm")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoEGroup4 = juniPPPoEGroup4.setStatus('obsolete') juniPPPoEGroup5 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 9)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoENextIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfMaxNumSessions"), ("Juniper-PPPOE-MIB", "juniPPPoEIfRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLowerIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAcName"), ("Juniper-PPPOE-MIB", "juniPPPoEIfDupProtect"), ("Juniper-PPPOE-MIB", "juniPPPoEIfPADIFlag"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAutoconfig"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADI"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADO"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADR"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADS"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvVersion"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvCode"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTags"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvSession"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTypes"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPackets"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInsufficientResources"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADM"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADN"), ("Juniper-PPPOE-MIB", "juniPPPoEGlobalMotm")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoEGroup5 = juniPPPoEGroup5.setStatus('obsolete') juniPPPoEGroup6 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 10)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoENextIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfMaxNumSessions"), ("Juniper-PPPOE-MIB", "juniPPPoEIfRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLowerIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAcName"), ("Juniper-PPPOE-MIB", "juniPPPoEIfDupProtect"), ("Juniper-PPPOE-MIB", "juniPPPoEIfPADIFlag"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAutoconfig"), ("Juniper-PPPOE-MIB", "juniPPPoEIfServiceNameTable"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADI"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADO"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADR"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADS"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvVersion"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvCode"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTags"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTagLength"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvLength"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTypes"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPackets"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInsufficientResources"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADM"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADN"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPadISession"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPadRSession"), ("Juniper-PPPOE-MIB", "juniPPPoEGlobalMotm")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoEGroup6 = juniPPPoEGroup6.setStatus('obsolete') juniPPPoEServiceNameTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 11)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableNextIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableName"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableEmptyAction"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameAction"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoEServiceNameTableGroup = juniPPPoEServiceNameTableGroup.setStatus('obsolete') juniPPPoEGroup7 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 12)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoENextIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfMaxNumSessions"), ("Juniper-PPPOE-MIB", "juniPPPoEIfRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLowerIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAcName"), ("Juniper-PPPOE-MIB", "juniPPPoEIfDupProtect"), ("Juniper-PPPOE-MIB", "juniPPPoEIfPADIFlag"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAutoconfig"), ("Juniper-PPPOE-MIB", "juniPPPoEIfServiceNameTable"), ("Juniper-PPPOE-MIB", "juniPPPoEIfPadrRemoteCircuitIdCapture"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADI"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADO"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADR"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADS"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvVersion"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvCode"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTags"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTagLength"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvLength"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTypes"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPackets"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInsufficientResources"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADM"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADN"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPadISession"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPadRSession"), ("Juniper-PPPOE-MIB", "juniPPPoEGlobalMotm")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoEGroup7 = juniPPPoEGroup7.setStatus('obsolete') juniPPPoEGroup8 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 13)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoENextIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfMaxNumSessions"), ("Juniper-PPPOE-MIB", "juniPPPoEIfRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLowerIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAcName"), ("Juniper-PPPOE-MIB", "juniPPPoEIfDupProtect"), ("Juniper-PPPOE-MIB", "juniPPPoEIfPADIFlag"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAutoconfig"), ("Juniper-PPPOE-MIB", "juniPPPoEIfServiceNameTable"), ("Juniper-PPPOE-MIB", "juniPPPoEIfPadrRemoteCircuitIdCapture"), ("Juniper-PPPOE-MIB", "juniPPPoEIfMtu"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADI"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADO"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADR"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADS"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvVersion"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvCode"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTags"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTagLength"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvLength"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTypes"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPackets"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInsufficientResources"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADM"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADN"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPadISession"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPadRSession"), ("Juniper-PPPOE-MIB", "juniPPPoEGlobalMotm")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoEGroup8 = juniPPPoEGroup8.setStatus('current') juniPPPoELockoutTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 14)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEIfLockoutTime"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLockoutElapsedTime"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLockoutNextTime")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoELockoutTableGroup = juniPPPoELockoutTableGroup.setStatus('current') juniPPPoEGroup9 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 15)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoENextIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfMaxNumSessions"), ("Juniper-PPPOE-MIB", "juniPPPoEIfRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLowerIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAcName"), ("Juniper-PPPOE-MIB", "juniPPPoEIfDupProtect"), ("Juniper-PPPOE-MIB", "juniPPPoEIfPADIFlag"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAutoconfig"), ("Juniper-PPPOE-MIB", "juniPPPoEIfServiceNameTable"), ("Juniper-PPPOE-MIB", "juniPPPoEIfPadrRemoteCircuitIdCapture"), ("Juniper-PPPOE-MIB", "juniPPPoEIfMtu"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLockoutMin"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLockoutMax"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADI"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADO"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADR"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADS"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvVersion"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvCode"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTags"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTagLength"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvLength"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTypes"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPackets"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInsufficientResources"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADM"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADN"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPadISession"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPadRSession"), ("Juniper-PPPOE-MIB", "juniPPPoEGlobalMotm")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoEGroup9 = juniPPPoEGroup9.setStatus('obsolete') juniPPPoEGroup10 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 16)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoENextIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfMaxNumSessions"), ("Juniper-PPPOE-MIB", "juniPPPoEIfRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLowerIfIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAcName"), ("Juniper-PPPOE-MIB", "juniPPPoEIfDupProtect"), ("Juniper-PPPOE-MIB", "juniPPPoEIfPADIFlag"), ("Juniper-PPPOE-MIB", "juniPPPoEIfAutoconfig"), ("Juniper-PPPOE-MIB", "juniPPPoEIfServiceNameTable"), ("Juniper-PPPOE-MIB", "juniPPPoEIfPadrRemoteCircuitIdCapture"), ("Juniper-PPPOE-MIB", "juniPPPoEIfMtu"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLockoutMin"), ("Juniper-PPPOE-MIB", "juniPPPoEIfLockoutMax"), ("Juniper-PPPOE-MIB", "juniPPPoEMaxSessionVsa"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADI"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADO"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADR"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADS"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADT"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvVersion"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvCode"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTags"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTagLength"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvLength"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvTypes"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPackets"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInsufficientResources"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADM"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsTxPADN"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPadISession"), ("Juniper-PPPOE-MIB", "juniPPPoEIfStatsRxInvPadRSession"), ("Juniper-PPPOE-MIB", "juniPPPoEGlobalMotm")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoEGroup10 = juniPPPoEGroup10.setStatus('current') juniPPPoEServiceNameTableGroup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 17)).setObjects(("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableNextIndex"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableName"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableEmptyAction"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameAction"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameRowStatus"), ("Juniper-PPPOE-MIB", "juniPPPoEServiceNameTableUnknownAction")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPPPoEServiceNameTableGroup1 = juniPPPoEServiceNameTableGroup1.setStatus('current') mibBuilder.exportSymbols("Juniper-PPPOE-MIB", juniPPPoESummaryMajorIfAdminDown=juniPPPoESummaryMajorIfAdminDown, juniPPPoESubIfUrl=juniPPPoESubIfUrl, juniPPPoEIfStatsTxPADT=juniPPPoEIfStatsTxPADT, juniPPPoESubIfSessionId=juniPPPoESubIfSessionId, juniPPPoEIfLowerIfIndex=juniPPPoEIfLowerIfIndex, juniPPPoESummaryMajorIfOperDown=juniPPPoESummaryMajorIfOperDown, juniPPPoEServiceNameTableIndex=juniPPPoEServiceNameTableIndex, juniPPPoECompliance4=juniPPPoECompliance4, juniPPPoEIfStatsTxPADM=juniPPPoEIfStatsTxPADM, juniPPPoEIfLockoutElapsedTime=juniPPPoEIfLockoutElapsedTime, juniPPPoESubIfMotm=juniPPPoESubIfMotm, juniPPPoEIfStatsTxPADO=juniPPPoEIfStatsTxPADO, juniPPPoESummarySubIfLowerLayerDown=juniPPPoESummarySubIfLowerLayerDown, juniPPPoEIfStatsRxInvPadRSession=juniPPPoEIfStatsRxInvPadRSession, juniPPPoEIfAutoconfig=juniPPPoEIfAutoconfig, juniPPPoECompliance8=juniPPPoECompliance8, juniPPPoEIfPADIFlag=juniPPPoEIfPADIFlag, juniPPPoESummarySubInterfaceCount=juniPPPoESummarySubInterfaceCount, juniPPPoEIfStatsRxInvCode=juniPPPoEIfStatsRxInvCode, juniPPPoENextIfIndex=juniPPPoENextIfIndex, juniPPPoEObjects=juniPPPoEObjects, juniPPPoEIfStatsTable=juniPPPoEIfStatsTable, juniPPPoECompliance3=juniPPPoECompliance3, juniPPPoEServices=juniPPPoEServices, juniPPPoEIfLockoutTable=juniPPPoEIfLockoutTable, JuniPPPoEServiceNameAction=JuniPPPoEServiceNameAction, juniPPPoEMIB=juniPPPoEMIB, juniPPPoEServiceNameEntry=juniPPPoEServiceNameEntry, juniPPPoESubIfEntry=juniPPPoESubIfEntry, juniPPPoESubIfTable=juniPPPoESubIfTable, juniPPPoEGroup3=juniPPPoEGroup3, juniPPPoEGlobal=juniPPPoEGlobal, juniPPPoEGroup8=juniPPPoEGroup8, juniPPPoEServiceNameAction=juniPPPoEServiceNameAction, juniPPPoEServiceNameTableEmptyAction=juniPPPoEServiceNameTableEmptyAction, juniPPPoEServiceNameTableUnknownAction=juniPPPoEServiceNameTableUnknownAction, juniPPPoEIfIfIndex=juniPPPoEIfIfIndex, juniPPPoEProfileGroup=juniPPPoEProfileGroup, juniPPPoELockoutTableGroup=juniPPPoELockoutTableGroup, juniPPPoECompliance11=juniPPPoECompliance11, juniPPPoEIfMaxNumSessions=juniPPPoEIfMaxNumSessions, juniPPPoECompliance12=juniPPPoECompliance12, juniPPPoEIfStatsRxInvLength=juniPPPoEIfStatsRxInvLength, juniPPPoEServiceNameTable=juniPPPoEServiceNameTable, juniPPPoEGroup5=juniPPPoEGroup5, juniPPPoEIfLockoutMax=juniPPPoEIfLockoutMax, juniPPPoEServiceNameTableGroup1=juniPPPoEServiceNameTableGroup1, juniPPPoEGroup9=juniPPPoEGroup9, juniPPPoEProfileEntry=juniPPPoEProfileEntry, juniPPPoEIfStatsRxInvPadISession=juniPPPoEIfStatsRxInvPadISession, juniPPPoEProfileIndex=juniPPPoEProfileIndex, juniPPPoEServiceNameTableGroup=juniPPPoEServiceNameTableGroup, juniPPPoESummaryGroup=juniPPPoESummaryGroup, juniPPPoEIfLayer=juniPPPoEIfLayer, juniPPPoEIfStatsRxInsufficientResources=juniPPPoEIfStatsRxInsufficientResources, juniPPPoEIfStatsRxPADR=juniPPPoEIfStatsRxPADR, juniPPPoEIfDupProtect=juniPPPoEIfDupProtect, juniPPPoEIfStatsRxInvVersion=juniPPPoEIfStatsRxInvVersion, juniPPPoEProfile=juniPPPoEProfile, juniPPPoEIfStatsTxPADN=juniPPPoEIfStatsTxPADN, juniPPPoESummarySubIfAdminUp=juniPPPoESummarySubIfAdminUp, juniPPPoEIfTable=juniPPPoEIfTable, juniPPPoESummary=juniPPPoESummary, juniPPPoESubIfLayer=juniPPPoESubIfLayer, juniPPPoEIfLockoutTime=juniPPPoEIfLockoutTime, juniPPPoEIfLockoutClientAddress=juniPPPoEIfLockoutClientAddress, juniPPPoEGroup10=juniPPPoEGroup10, juniPPPoEProfileTable=juniPPPoEProfileTable, juniPPPoEIfLockoutNextTime=juniPPPoEIfLockoutNextTime, juniPPPoEProfileUrl=juniPPPoEProfileUrl, juniPPPoESubIfRowStatus=juniPPPoESubIfRowStatus, juniPPPoESubIfGroup=juniPPPoESubIfGroup, juniPPPoESummaryMajorIfAdminUp=juniPPPoESummaryMajorIfAdminUp, juniPPPoEGroup2=juniPPPoEGroup2, juniPPPoEServiceNameTableEntry=juniPPPoEServiceNameTableEntry, juniPPPoEGroup6=juniPPPoEGroup6, juniPPPoECompliance9=juniPPPoECompliance9, juniPPPoESubIfGroup2=juniPPPoESubIfGroup2, juniPPPoEIfServiceNameTable=juniPPPoEIfServiceNameTable, juniPPPoESubIfLowerIfIndex=juniPPPoESubIfLowerIfIndex, juniPPPoEIfStatsEntry=juniPPPoEIfStatsEntry, juniPPPoEIfStatsRxInvTags=juniPPPoEIfStatsRxInvTags, juniPPPoEServiceName=juniPPPoEServiceName, juniPPPoEMaxSessionVsa=juniPPPoEMaxSessionVsa, juniPPPoEProfileMotm=juniPPPoEProfileMotm, juniPPPoEGlobalMotm=juniPPPoEGlobalMotm, juniPPPoESubIfNextIfIndex=juniPPPoESubIfNextIfIndex, juniPPPoECompliance5=juniPPPoECompliance5, juniPPPoEServiceNameRowStatus=juniPPPoEServiceNameRowStatus, juniPPPoEIfStatsRxPADI=juniPPPoEIfStatsRxPADI, juniPPPoEGroup7=juniPPPoEGroup7, juniPPPoECompliance2=juniPPPoECompliance2, juniPPPoESubIfIndex=juniPPPoESubIfIndex, juniPPPoEServiceNameTableRowStatus=juniPPPoEServiceNameTableRowStatus, juniPPPoEIfStatsRxInvPackets=juniPPPoEIfStatsRxInvPackets, juniPPPoESummaryMajorIfOperUp=juniPPPoESummaryMajorIfOperUp, juniPPPoESummarySubIfAdminDown=juniPPPoESummarySubIfAdminDown, juniPPPoEIfAcName=juniPPPoEIfAcName, juniPPPoEGroups=juniPPPoEGroups, PYSNMP_MODULE_ID=juniPPPoEMIB, juniPPPoEIfEntry=juniPPPoEIfEntry, juniPPPoESummarySubIfOperUp=juniPPPoESummarySubIfOperUp, juniPPPoECompliances=juniPPPoECompliances, juniPPPoEIfMtu=juniPPPoEIfMtu, juniPPPoEServiceNameTableName=juniPPPoEServiceNameTableName, juniPPPoESummaryMajorIfLowerLayerDown=juniPPPoESummaryMajorIfLowerLayerDown, juniPPPoEServiceNameTableTable=juniPPPoEServiceNameTableTable, juniPPPoEIfLockoutMin=juniPPPoEIfLockoutMin, juniPPPoEConformance=juniPPPoEConformance, juniPPPoEProfileRowStatus=juniPPPoEProfileRowStatus, juniPPPoEServiceNameTableNextIndex=juniPPPoEServiceNameTableNextIndex, juniPPPoESubIfId=juniPPPoESubIfId, juniPPPoEGroup4=juniPPPoEGroup4, juniPPPoESummarySubIfNotPresent=juniPPPoESummarySubIfNotPresent, juniPPPoECompliance6=juniPPPoECompliance6, juniPPPoECompliance13=juniPPPoECompliance13, juniPPPoEIfStatsRxInvTagLength=juniPPPoEIfStatsRxInvTagLength, juniPPPoEIfStatsTxPADS=juniPPPoEIfStatsTxPADS, juniPPPoESummaryMajorIfNotPresent=juniPPPoESummaryMajorIfNotPresent, juniPPPoECompliance7=juniPPPoECompliance7, juniPPPoEIfPadrRemoteCircuitIdCapture=juniPPPoEIfPadrRemoteCircuitIdCapture, juniPPPoEIfStatsRxInvSession=juniPPPoEIfStatsRxInvSession, juniPPPoECompliance10=juniPPPoECompliance10, juniPPPoEMajorInterfaceCount=juniPPPoEMajorInterfaceCount, juniPPPoEIfStatsRxInvTypes=juniPPPoEIfStatsRxInvTypes, juniPPPoESummarySubIfOperDown=juniPPPoESummarySubIfOperDown, juniPPPoEIfRowStatus=juniPPPoEIfRowStatus, juniPPPoEIfLockoutEntry=juniPPPoEIfLockoutEntry, juniPPPoEIfStatsRxPADT=juniPPPoEIfStatsRxPADT, juniPPPoECompliance=juniPPPoECompliance, juniPPPoEGroup=juniPPPoEGroup)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, single_value_constraint, constraints_intersection, value_range_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ValueSizeConstraint') (interface_index_or_zero, interface_index) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndexOrZero', 'InterfaceIndex') (juni_mibs,) = mibBuilder.importSymbols('Juniper-MIBs', 'juniMibs') (juni_next_if_index, juni_enable) = mibBuilder.importSymbols('Juniper-TC', 'JuniNextIfIndex', 'JuniEnable') (module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup') (module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, time_ticks, gauge32, ip_address, iso, mib_identifier, bits, notification_type, counter64, integer32, object_identity, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'TimeTicks', 'Gauge32', 'IpAddress', 'iso', 'MibIdentifier', 'Bits', 'NotificationType', 'Counter64', 'Integer32', 'ObjectIdentity', 'Unsigned32') (mac_address, textual_convention, display_string, row_status, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'MacAddress', 'TextualConvention', 'DisplayString', 'RowStatus', 'TruthValue') juni_pp_po_emib = module_identity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18)) juniPPPoEMIB.setRevisions(('2008-11-27 10:23', '2008-06-18 09:42', '2005-08-03 20:58', '2005-05-18 12:01', '2004-06-09 20:58', '2003-03-10 18:30', '2002-10-02 20:12', '2002-10-01 18:27', '2002-08-16 21:46', '2001-06-19 14:27', '2001-03-21 15:00', '2001-02-12 00:00', '2000-10-25 00:00', '1999-05-13 00:00')) if mibBuilder.loadTexts: juniPPPoEMIB.setLastUpdated('200811271023Z') if mibBuilder.loadTexts: juniPPPoEMIB.setOrganization('Juniper Networks, Inc.') class Junipppoeservicenameaction(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1)) named_values = named_values(('drop', 0), ('terminate', 1)) juni_pp_po_e_objects = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1)) juni_pp_po_e_if_layer = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1)) juni_pp_po_e_sub_if_layer = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2)) juni_pp_po_e_global = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 3)) juni_pp_po_e_profile = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4)) juni_pp_po_e_summary = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5)) juni_pp_po_e_services = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6)) juni_pp_po_e_next_if_index = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 1), juni_next_if_index()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoENextIfIndex.setStatus('current') juni_pp_po_e_if_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2)) if mibBuilder.loadTexts: juniPPPoEIfTable.setStatus('current') juni_pp_po_e_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1)).setIndexNames((0, 'Juniper-PPPOE-MIB', 'juniPPPoEIfIfIndex')) if mibBuilder.loadTexts: juniPPPoEIfEntry.setStatus('current') juni_pp_po_e_if_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 1), interface_index()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfIfIndex.setStatus('current') juni_pp_po_e_if_max_num_sessions = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65335))).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEIfMaxNumSessions.setStatus('current') juni_pp_po_e_if_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 3), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEIfRowStatus.setStatus('current') juni_pp_po_e_if_lower_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 4), interface_index_or_zero()).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEIfLowerIfIndex.setStatus('current') juni_pp_po_e_if_ac_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEIfAcName.setStatus('current') juni_pp_po_e_if_dup_protect = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 6), juni_enable().clone('disable')).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEIfDupProtect.setStatus('current') juni_pp_po_e_if_padi_flag = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 7), juni_enable().clone('disable')).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEIfPADIFlag.setStatus('current') juni_pp_po_e_if_autoconfig = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 8), juni_enable().clone('disable')).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEIfAutoconfig.setStatus('current') juni_pp_po_e_if_service_name_table = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 9), unsigned32()).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEIfServiceNameTable.setStatus('current') juni_pp_po_e_if_padr_remote_circuit_id_capture = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 10), juni_enable().clone('disable')).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEIfPadrRemoteCircuitIdCapture.setStatus('current') juni_pp_po_e_if_mtu = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 11), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(1, 1), value_range_constraint(2, 2), value_range_constraint(66, 65535))).clone(1494)).setMaxAccess('readwrite') if mibBuilder.loadTexts: juniPPPoEIfMtu.setStatus('current') juni_pp_po_e_if_lockout_min = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 86400))).setMaxAccess('readwrite') if mibBuilder.loadTexts: juniPPPoEIfLockoutMin.setStatus('current') juni_pp_po_e_if_lockout_max = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 86400))).setMaxAccess('readwrite') if mibBuilder.loadTexts: juniPPPoEIfLockoutMax.setStatus('current') juni_pp_po_e_max_session_vsa = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 2, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('override', 1), ('ignore', 2))).clone('ignore')).setMaxAccess('readwrite') if mibBuilder.loadTexts: juniPPPoEMaxSessionVsa.setStatus('current') juni_pp_po_e_if_stats_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3)) if mibBuilder.loadTexts: juniPPPoEIfStatsTable.setStatus('current') juni_pp_po_e_if_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1)).setIndexNames((0, 'Juniper-PPPOE-MIB', 'juniPPPoEIfIfIndex')) if mibBuilder.loadTexts: juniPPPoEIfStatsEntry.setStatus('current') juni_pp_po_e_if_stats_rx_padi = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxPADI.setStatus('current') juni_pp_po_e_if_stats_tx_pado = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsTxPADO.setStatus('current') juni_pp_po_e_if_stats_rx_padr = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxPADR.setStatus('current') juni_pp_po_e_if_stats_tx_pads = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsTxPADS.setStatus('current') juni_pp_po_e_if_stats_rx_padt = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxPADT.setStatus('current') juni_pp_po_e_if_stats_tx_padt = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsTxPADT.setStatus('current') juni_pp_po_e_if_stats_rx_inv_version = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvVersion.setStatus('current') juni_pp_po_e_if_stats_rx_inv_code = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvCode.setStatus('current') juni_pp_po_e_if_stats_rx_inv_tags = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvTags.setStatus('current') juni_pp_po_e_if_stats_rx_inv_session = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvSession.setStatus('obsolete') juni_pp_po_e_if_stats_rx_inv_types = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvTypes.setStatus('current') juni_pp_po_e_if_stats_rx_inv_packets = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvPackets.setStatus('current') juni_pp_po_e_if_stats_rx_insufficient_resources = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxInsufficientResources.setStatus('current') juni_pp_po_e_if_stats_tx_padm = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsTxPADM.setStatus('current') juni_pp_po_e_if_stats_tx_padn = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsTxPADN.setStatus('current') juni_pp_po_e_if_stats_rx_inv_tag_length = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvTagLength.setStatus('current') juni_pp_po_e_if_stats_rx_inv_length = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvLength.setStatus('current') juni_pp_po_e_if_stats_rx_inv_pad_i_session = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvPadISession.setStatus('current') juni_pp_po_e_if_stats_rx_inv_pad_r_session = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 3, 1, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfStatsRxInvPadRSession.setStatus('current') juni_pp_po_e_if_lockout_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 4)) if mibBuilder.loadTexts: juniPPPoEIfLockoutTable.setStatus('current') juni_pp_po_e_if_lockout_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 4, 1)).setIndexNames((0, 'Juniper-PPPOE-MIB', 'juniPPPoEIfIfIndex'), (0, 'Juniper-PPPOE-MIB', 'juniPPPoEIfLockoutClientAddress')) if mibBuilder.loadTexts: juniPPPoEIfLockoutEntry.setStatus('current') juni_pp_po_e_if_lockout_client_address = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 4, 1, 1), mac_address()) if mibBuilder.loadTexts: juniPPPoEIfLockoutClientAddress.setStatus('current') juni_pp_po_e_if_lockout_time = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 4, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 86400))).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfLockoutTime.setStatus('current') juni_pp_po_e_if_lockout_elapsed_time = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 4, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 86400))).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfLockoutElapsedTime.setStatus('current') juni_pp_po_e_if_lockout_next_time = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 1, 4, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 86400))).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEIfLockoutNextTime.setStatus('current') juni_pp_po_e_sub_if_next_if_index = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 1), juni_next_if_index()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESubIfNextIfIndex.setStatus('current') juni_pp_po_e_sub_if_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2)) if mibBuilder.loadTexts: juniPPPoESubIfTable.setStatus('current') juni_pp_po_e_sub_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1)).setIndexNames((0, 'Juniper-PPPOE-MIB', 'juniPPPoESubIfIndex')) if mibBuilder.loadTexts: juniPPPoESubIfEntry.setStatus('current') juni_pp_po_e_sub_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 1), interface_index()) if mibBuilder.loadTexts: juniPPPoESubIfIndex.setStatus('current') juni_pp_po_e_sub_if_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 2), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoESubIfRowStatus.setStatus('current') juni_pp_po_e_sub_if_lower_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 3), interface_index_or_zero()).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoESubIfLowerIfIndex.setStatus('current') juni_pp_po_e_sub_if_id = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(-1, 2147483647)).clone(-1)).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoESubIfId.setStatus('current') juni_pp_po_e_sub_if_session_id = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESubIfSessionId.setStatus('current') juni_pp_po_e_sub_if_motm = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 127))).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoESubIfMotm.setStatus('current') juni_pp_po_e_sub_if_url = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 2, 2, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 127))).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoESubIfUrl.setStatus('current') juni_pp_po_e_global_motm = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 3, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 127))).setMaxAccess('readwrite') if mibBuilder.loadTexts: juniPPPoEGlobalMotm.setStatus('current') juni_pp_po_e_service_name_table_next_index = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 1), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEServiceNameTableNextIndex.setStatus('current') juni_pp_po_e_service_name_table_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2)) if mibBuilder.loadTexts: juniPPPoEServiceNameTableTable.setStatus('current') juni_pp_po_e_service_name_table_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2, 1)).setIndexNames((0, 'Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableIndex')) if mibBuilder.loadTexts: juniPPPoEServiceNameTableEntry.setStatus('current') juni_pp_po_e_service_name_table_index = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2, 1, 1), unsigned32()) if mibBuilder.loadTexts: juniPPPoEServiceNameTableIndex.setStatus('current') juni_pp_po_e_service_name_table_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEServiceNameTableName.setStatus('current') juni_pp_po_e_service_name_table_empty_action = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2, 1, 3), juni_pp_po_e_service_name_action()).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEServiceNameTableEmptyAction.setStatus('current') juni_pp_po_e_service_name_table_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEServiceNameTableRowStatus.setStatus('current') juni_pp_po_e_service_name_table_unknown_action = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 2, 1, 5), juni_pp_po_e_service_name_action()).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEServiceNameTableUnknownAction.setStatus('current') juni_pp_po_e_service_name_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 3)) if mibBuilder.loadTexts: juniPPPoEServiceNameTable.setStatus('current') juni_pp_po_e_service_name_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 3, 1)).setIndexNames((0, 'Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableIndex'), (0, 'Juniper-PPPOE-MIB', 'juniPPPoEServiceName')) if mibBuilder.loadTexts: juniPPPoEServiceNameEntry.setStatus('current') juni_pp_po_e_service_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 3, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 31))) if mibBuilder.loadTexts: juniPPPoEServiceName.setStatus('current') juni_pp_po_e_service_name_action = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 3, 1, 2), juni_pp_po_e_service_name_action()).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEServiceNameAction.setStatus('current') juni_pp_po_e_service_name_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 6, 3, 1, 3), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEServiceNameRowStatus.setStatus('current') juni_pp_po_e_profile_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4, 1)) if mibBuilder.loadTexts: juniPPPoEProfileTable.setStatus('deprecated') juni_pp_po_e_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4, 1, 1)).setIndexNames((0, 'Juniper-PPPOE-MIB', 'juniPPPoEProfileIndex')) if mibBuilder.loadTexts: juniPPPoEProfileEntry.setStatus('deprecated') juni_pp_po_e_profile_index = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4, 1, 1, 1), unsigned32()) if mibBuilder.loadTexts: juniPPPoEProfileIndex.setStatus('deprecated') juni_pp_po_e_profile_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4, 1, 1, 2), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEProfileRowStatus.setStatus('deprecated') juni_pp_po_e_profile_motm = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 127))).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEProfileMotm.setStatus('deprecated') juni_pp_po_e_profile_url = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 4, 1, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 127))).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniPPPoEProfileUrl.setStatus('deprecated') juni_pp_po_e_major_interface_count = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoEMajorInterfaceCount.setStatus('current') juni_pp_po_e_summary_major_if_admin_up = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESummaryMajorIfAdminUp.setStatus('current') juni_pp_po_e_summary_major_if_admin_down = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESummaryMajorIfAdminDown.setStatus('current') juni_pp_po_e_summary_major_if_oper_up = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESummaryMajorIfOperUp.setStatus('current') juni_pp_po_e_summary_major_if_oper_down = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESummaryMajorIfOperDown.setStatus('current') juni_pp_po_e_summary_major_if_lower_layer_down = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESummaryMajorIfLowerLayerDown.setStatus('current') juni_pp_po_e_summary_major_if_not_present = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESummaryMajorIfNotPresent.setStatus('current') juni_pp_po_e_summary_sub_interface_count = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESummarySubInterfaceCount.setStatus('current') juni_pp_po_e_summary_sub_if_admin_up = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESummarySubIfAdminUp.setStatus('current') juni_pp_po_e_summary_sub_if_admin_down = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESummarySubIfAdminDown.setStatus('current') juni_pp_po_e_summary_sub_if_oper_up = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESummarySubIfOperUp.setStatus('current') juni_pp_po_e_summary_sub_if_oper_down = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 12), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESummarySubIfOperDown.setStatus('current') juni_pp_po_e_summary_sub_if_lower_layer_down = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 13), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESummarySubIfLowerLayerDown.setStatus('current') juni_pp_po_e_summary_sub_if_not_present = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 1, 5, 14), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: juniPPPoESummarySubIfNotPresent.setStatus('current') juni_pp_po_e_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4)) juni_pp_po_e_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5)) juni_pp_po_e_groups = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4)) juni_pp_po_e_compliance = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 1)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEGroup'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_compliance = juniPPPoECompliance.setStatus('obsolete') juni_pp_po_e_compliance2 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 2)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoEProfileGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_compliance2 = juniPPPoECompliance2.setStatus('obsolete') juni_pp_po_e_compliance3 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 3)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoEProfileGroup'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_compliance3 = juniPPPoECompliance3.setStatus('obsolete') juni_pp_po_e_compliance4 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 4)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_compliance4 = juniPPPoECompliance4.setStatus('obsolete') juni_pp_po_e_compliance5 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 5)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEGroup3'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_compliance5 = juniPPPoECompliance5.setStatus('obsolete') juni_pp_po_e_compliance6 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 6)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEGroup4'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_compliance6 = juniPPPoECompliance6.setStatus('obsolete') juni_pp_po_e_compliance7 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 7)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEGroup5'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_compliance7 = juniPPPoECompliance7.setStatus('obsolete') juni_pp_po_e_compliance8 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 8)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEGroup6'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryGroup'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_compliance8 = juniPPPoECompliance8.setStatus('obsolete') juni_pp_po_e_compliance9 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 9)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEGroup7'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryGroup'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_compliance9 = juniPPPoECompliance9.setStatus('obsolete') juni_pp_po_e_compliance10 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 10)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEGroup8'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryGroup'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_compliance10 = juniPPPoECompliance10.setStatus('obsolete') juni_pp_po_e_compliance11 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 11)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEGroup9'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryGroup'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableGroup'), ('Juniper-PPPOE-MIB', 'juniPPPoELockoutTableGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_compliance11 = juniPPPoECompliance11.setStatus('obsolete') juni_pp_po_e_compliance12 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 12)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEGroup10'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryGroup'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableGroup'), ('Juniper-PPPOE-MIB', 'juniPPPoELockoutTableGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_compliance12 = juniPPPoECompliance12.setStatus('obsolete') juni_pp_po_e_compliance13 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 5, 13)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEGroup10'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfGroup2'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryGroup'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableGroup1'), ('Juniper-PPPOE-MIB', 'juniPPPoELockoutTableGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_compliance13 = juniPPPoECompliance13.setStatus('current') juni_pp_po_e_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 1)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoENextIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfMaxNumSessions'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLowerIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADI'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADO'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADR'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADS'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvVersion'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvCode'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTags'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvSession'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTypes'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPackets'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInsufficientResources')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_group = juniPPPoEGroup.setStatus('obsolete') juni_pp_po_e_sub_if_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 2)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoESubIfNextIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfLowerIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfId'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfSessionId')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_sub_if_group = juniPPPoESubIfGroup.setStatus('obsolete') juni_pp_po_e_profile_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 3)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEProfileRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEProfileUrl'), ('Juniper-PPPOE-MIB', 'juniPPPoEProfileMotm')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_profile_group = juniPPPoEProfileGroup.setStatus('deprecated') juni_pp_po_e_group2 = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 4)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoENextIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfMaxNumSessions'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLowerIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADI'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADO'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADR'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADS'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvVersion'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvCode'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTags'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvSession'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTypes'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPackets'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInsufficientResources'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADM'), ('Juniper-PPPOE-MIB', 'juniPPPoEGlobalMotm')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_group2 = juniPPPoEGroup2.setStatus('obsolete') juni_pp_po_e_sub_if_group2 = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 5)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoESubIfNextIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfLowerIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfId'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfSessionId'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfUrl'), ('Juniper-PPPOE-MIB', 'juniPPPoESubIfMotm')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_sub_if_group2 = juniPPPoESubIfGroup2.setStatus('current') juni_pp_po_e_summary_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 6)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEMajorInterfaceCount'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryMajorIfAdminUp'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryMajorIfAdminDown'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryMajorIfOperUp'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryMajorIfOperDown'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryMajorIfNotPresent'), ('Juniper-PPPOE-MIB', 'juniPPPoESummaryMajorIfLowerLayerDown'), ('Juniper-PPPOE-MIB', 'juniPPPoESummarySubInterfaceCount'), ('Juniper-PPPOE-MIB', 'juniPPPoESummarySubIfAdminUp'), ('Juniper-PPPOE-MIB', 'juniPPPoESummarySubIfAdminDown'), ('Juniper-PPPOE-MIB', 'juniPPPoESummarySubIfOperUp'), ('Juniper-PPPOE-MIB', 'juniPPPoESummarySubIfOperDown'), ('Juniper-PPPOE-MIB', 'juniPPPoESummarySubIfNotPresent'), ('Juniper-PPPOE-MIB', 'juniPPPoESummarySubIfLowerLayerDown')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_summary_group = juniPPPoESummaryGroup.setStatus('current') juni_pp_po_e_group3 = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 7)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoENextIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfMaxNumSessions'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLowerIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAcName'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfDupProtect'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADI'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADO'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADR'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADS'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvVersion'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvCode'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTags'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvSession'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTypes'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPackets'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInsufficientResources'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADM'), ('Juniper-PPPOE-MIB', 'juniPPPoEGlobalMotm')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_group3 = juniPPPoEGroup3.setStatus('obsolete') juni_pp_po_e_group4 = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 8)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoENextIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfMaxNumSessions'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLowerIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAcName'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfDupProtect'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfPADIFlag'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAutoconfig'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADI'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADO'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADR'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADS'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvVersion'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvCode'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTags'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvSession'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTypes'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPackets'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInsufficientResources'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADM'), ('Juniper-PPPOE-MIB', 'juniPPPoEGlobalMotm')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_group4 = juniPPPoEGroup4.setStatus('obsolete') juni_pp_po_e_group5 = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 9)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoENextIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfMaxNumSessions'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLowerIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAcName'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfDupProtect'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfPADIFlag'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAutoconfig'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADI'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADO'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADR'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADS'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvVersion'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvCode'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTags'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvSession'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTypes'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPackets'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInsufficientResources'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADM'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADN'), ('Juniper-PPPOE-MIB', 'juniPPPoEGlobalMotm')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_group5 = juniPPPoEGroup5.setStatus('obsolete') juni_pp_po_e_group6 = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 10)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoENextIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfMaxNumSessions'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLowerIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAcName'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfDupProtect'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfPADIFlag'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAutoconfig'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfServiceNameTable'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADI'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADO'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADR'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADS'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvVersion'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvCode'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTags'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTagLength'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvLength'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTypes'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPackets'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInsufficientResources'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADM'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADN'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPadISession'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPadRSession'), ('Juniper-PPPOE-MIB', 'juniPPPoEGlobalMotm')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_group6 = juniPPPoEGroup6.setStatus('obsolete') juni_pp_po_e_service_name_table_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 11)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableNextIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableName'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableEmptyAction'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameAction'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_service_name_table_group = juniPPPoEServiceNameTableGroup.setStatus('obsolete') juni_pp_po_e_group7 = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 12)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoENextIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfMaxNumSessions'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLowerIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAcName'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfDupProtect'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfPADIFlag'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAutoconfig'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfServiceNameTable'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfPadrRemoteCircuitIdCapture'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADI'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADO'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADR'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADS'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvVersion'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvCode'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTags'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTagLength'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvLength'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTypes'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPackets'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInsufficientResources'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADM'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADN'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPadISession'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPadRSession'), ('Juniper-PPPOE-MIB', 'juniPPPoEGlobalMotm')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_group7 = juniPPPoEGroup7.setStatus('obsolete') juni_pp_po_e_group8 = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 13)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoENextIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfMaxNumSessions'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLowerIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAcName'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfDupProtect'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfPADIFlag'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAutoconfig'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfServiceNameTable'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfPadrRemoteCircuitIdCapture'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfMtu'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADI'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADO'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADR'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADS'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvVersion'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvCode'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTags'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTagLength'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvLength'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTypes'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPackets'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInsufficientResources'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADM'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADN'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPadISession'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPadRSession'), ('Juniper-PPPOE-MIB', 'juniPPPoEGlobalMotm')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_group8 = juniPPPoEGroup8.setStatus('current') juni_pp_po_e_lockout_table_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 14)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEIfLockoutTime'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLockoutElapsedTime'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLockoutNextTime')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_lockout_table_group = juniPPPoELockoutTableGroup.setStatus('current') juni_pp_po_e_group9 = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 15)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoENextIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfMaxNumSessions'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLowerIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAcName'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfDupProtect'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfPADIFlag'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAutoconfig'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfServiceNameTable'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfPadrRemoteCircuitIdCapture'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfMtu'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLockoutMin'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLockoutMax'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADI'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADO'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADR'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADS'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvVersion'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvCode'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTags'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTagLength'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvLength'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTypes'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPackets'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInsufficientResources'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADM'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADN'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPadISession'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPadRSession'), ('Juniper-PPPOE-MIB', 'juniPPPoEGlobalMotm')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_group9 = juniPPPoEGroup9.setStatus('obsolete') juni_pp_po_e_group10 = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 16)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoENextIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfMaxNumSessions'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLowerIfIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAcName'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfDupProtect'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfPADIFlag'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfAutoconfig'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfServiceNameTable'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfPadrRemoteCircuitIdCapture'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfMtu'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLockoutMin'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfLockoutMax'), ('Juniper-PPPOE-MIB', 'juniPPPoEMaxSessionVsa'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADI'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADO'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADR'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADS'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADT'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvVersion'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvCode'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTags'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTagLength'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvLength'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvTypes'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPackets'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInsufficientResources'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADM'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsTxPADN'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPadISession'), ('Juniper-PPPOE-MIB', 'juniPPPoEIfStatsRxInvPadRSession'), ('Juniper-PPPOE-MIB', 'juniPPPoEGlobalMotm')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_group10 = juniPPPoEGroup10.setStatus('current') juni_pp_po_e_service_name_table_group1 = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 18, 4, 4, 17)).setObjects(('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableNextIndex'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableName'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableEmptyAction'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameAction'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameRowStatus'), ('Juniper-PPPOE-MIB', 'juniPPPoEServiceNameTableUnknownAction')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_pp_po_e_service_name_table_group1 = juniPPPoEServiceNameTableGroup1.setStatus('current') mibBuilder.exportSymbols('Juniper-PPPOE-MIB', juniPPPoESummaryMajorIfAdminDown=juniPPPoESummaryMajorIfAdminDown, juniPPPoESubIfUrl=juniPPPoESubIfUrl, juniPPPoEIfStatsTxPADT=juniPPPoEIfStatsTxPADT, juniPPPoESubIfSessionId=juniPPPoESubIfSessionId, juniPPPoEIfLowerIfIndex=juniPPPoEIfLowerIfIndex, juniPPPoESummaryMajorIfOperDown=juniPPPoESummaryMajorIfOperDown, juniPPPoEServiceNameTableIndex=juniPPPoEServiceNameTableIndex, juniPPPoECompliance4=juniPPPoECompliance4, juniPPPoEIfStatsTxPADM=juniPPPoEIfStatsTxPADM, juniPPPoEIfLockoutElapsedTime=juniPPPoEIfLockoutElapsedTime, juniPPPoESubIfMotm=juniPPPoESubIfMotm, juniPPPoEIfStatsTxPADO=juniPPPoEIfStatsTxPADO, juniPPPoESummarySubIfLowerLayerDown=juniPPPoESummarySubIfLowerLayerDown, juniPPPoEIfStatsRxInvPadRSession=juniPPPoEIfStatsRxInvPadRSession, juniPPPoEIfAutoconfig=juniPPPoEIfAutoconfig, juniPPPoECompliance8=juniPPPoECompliance8, juniPPPoEIfPADIFlag=juniPPPoEIfPADIFlag, juniPPPoESummarySubInterfaceCount=juniPPPoESummarySubInterfaceCount, juniPPPoEIfStatsRxInvCode=juniPPPoEIfStatsRxInvCode, juniPPPoENextIfIndex=juniPPPoENextIfIndex, juniPPPoEObjects=juniPPPoEObjects, juniPPPoEIfStatsTable=juniPPPoEIfStatsTable, juniPPPoECompliance3=juniPPPoECompliance3, juniPPPoEServices=juniPPPoEServices, juniPPPoEIfLockoutTable=juniPPPoEIfLockoutTable, JuniPPPoEServiceNameAction=JuniPPPoEServiceNameAction, juniPPPoEMIB=juniPPPoEMIB, juniPPPoEServiceNameEntry=juniPPPoEServiceNameEntry, juniPPPoESubIfEntry=juniPPPoESubIfEntry, juniPPPoESubIfTable=juniPPPoESubIfTable, juniPPPoEGroup3=juniPPPoEGroup3, juniPPPoEGlobal=juniPPPoEGlobal, juniPPPoEGroup8=juniPPPoEGroup8, juniPPPoEServiceNameAction=juniPPPoEServiceNameAction, juniPPPoEServiceNameTableEmptyAction=juniPPPoEServiceNameTableEmptyAction, juniPPPoEServiceNameTableUnknownAction=juniPPPoEServiceNameTableUnknownAction, juniPPPoEIfIfIndex=juniPPPoEIfIfIndex, juniPPPoEProfileGroup=juniPPPoEProfileGroup, juniPPPoELockoutTableGroup=juniPPPoELockoutTableGroup, juniPPPoECompliance11=juniPPPoECompliance11, juniPPPoEIfMaxNumSessions=juniPPPoEIfMaxNumSessions, juniPPPoECompliance12=juniPPPoECompliance12, juniPPPoEIfStatsRxInvLength=juniPPPoEIfStatsRxInvLength, juniPPPoEServiceNameTable=juniPPPoEServiceNameTable, juniPPPoEGroup5=juniPPPoEGroup5, juniPPPoEIfLockoutMax=juniPPPoEIfLockoutMax, juniPPPoEServiceNameTableGroup1=juniPPPoEServiceNameTableGroup1, juniPPPoEGroup9=juniPPPoEGroup9, juniPPPoEProfileEntry=juniPPPoEProfileEntry, juniPPPoEIfStatsRxInvPadISession=juniPPPoEIfStatsRxInvPadISession, juniPPPoEProfileIndex=juniPPPoEProfileIndex, juniPPPoEServiceNameTableGroup=juniPPPoEServiceNameTableGroup, juniPPPoESummaryGroup=juniPPPoESummaryGroup, juniPPPoEIfLayer=juniPPPoEIfLayer, juniPPPoEIfStatsRxInsufficientResources=juniPPPoEIfStatsRxInsufficientResources, juniPPPoEIfStatsRxPADR=juniPPPoEIfStatsRxPADR, juniPPPoEIfDupProtect=juniPPPoEIfDupProtect, juniPPPoEIfStatsRxInvVersion=juniPPPoEIfStatsRxInvVersion, juniPPPoEProfile=juniPPPoEProfile, juniPPPoEIfStatsTxPADN=juniPPPoEIfStatsTxPADN, juniPPPoESummarySubIfAdminUp=juniPPPoESummarySubIfAdminUp, juniPPPoEIfTable=juniPPPoEIfTable, juniPPPoESummary=juniPPPoESummary, juniPPPoESubIfLayer=juniPPPoESubIfLayer, juniPPPoEIfLockoutTime=juniPPPoEIfLockoutTime, juniPPPoEIfLockoutClientAddress=juniPPPoEIfLockoutClientAddress, juniPPPoEGroup10=juniPPPoEGroup10, juniPPPoEProfileTable=juniPPPoEProfileTable, juniPPPoEIfLockoutNextTime=juniPPPoEIfLockoutNextTime, juniPPPoEProfileUrl=juniPPPoEProfileUrl, juniPPPoESubIfRowStatus=juniPPPoESubIfRowStatus, juniPPPoESubIfGroup=juniPPPoESubIfGroup, juniPPPoESummaryMajorIfAdminUp=juniPPPoESummaryMajorIfAdminUp, juniPPPoEGroup2=juniPPPoEGroup2, juniPPPoEServiceNameTableEntry=juniPPPoEServiceNameTableEntry, juniPPPoEGroup6=juniPPPoEGroup6, juniPPPoECompliance9=juniPPPoECompliance9, juniPPPoESubIfGroup2=juniPPPoESubIfGroup2, juniPPPoEIfServiceNameTable=juniPPPoEIfServiceNameTable, juniPPPoESubIfLowerIfIndex=juniPPPoESubIfLowerIfIndex, juniPPPoEIfStatsEntry=juniPPPoEIfStatsEntry, juniPPPoEIfStatsRxInvTags=juniPPPoEIfStatsRxInvTags, juniPPPoEServiceName=juniPPPoEServiceName, juniPPPoEMaxSessionVsa=juniPPPoEMaxSessionVsa, juniPPPoEProfileMotm=juniPPPoEProfileMotm, juniPPPoEGlobalMotm=juniPPPoEGlobalMotm, juniPPPoESubIfNextIfIndex=juniPPPoESubIfNextIfIndex, juniPPPoECompliance5=juniPPPoECompliance5, juniPPPoEServiceNameRowStatus=juniPPPoEServiceNameRowStatus, juniPPPoEIfStatsRxPADI=juniPPPoEIfStatsRxPADI, juniPPPoEGroup7=juniPPPoEGroup7, juniPPPoECompliance2=juniPPPoECompliance2, juniPPPoESubIfIndex=juniPPPoESubIfIndex, juniPPPoEServiceNameTableRowStatus=juniPPPoEServiceNameTableRowStatus, juniPPPoEIfStatsRxInvPackets=juniPPPoEIfStatsRxInvPackets, juniPPPoESummaryMajorIfOperUp=juniPPPoESummaryMajorIfOperUp, juniPPPoESummarySubIfAdminDown=juniPPPoESummarySubIfAdminDown, juniPPPoEIfAcName=juniPPPoEIfAcName, juniPPPoEGroups=juniPPPoEGroups, PYSNMP_MODULE_ID=juniPPPoEMIB, juniPPPoEIfEntry=juniPPPoEIfEntry, juniPPPoESummarySubIfOperUp=juniPPPoESummarySubIfOperUp, juniPPPoECompliances=juniPPPoECompliances, juniPPPoEIfMtu=juniPPPoEIfMtu, juniPPPoEServiceNameTableName=juniPPPoEServiceNameTableName, juniPPPoESummaryMajorIfLowerLayerDown=juniPPPoESummaryMajorIfLowerLayerDown, juniPPPoEServiceNameTableTable=juniPPPoEServiceNameTableTable, juniPPPoEIfLockoutMin=juniPPPoEIfLockoutMin, juniPPPoEConformance=juniPPPoEConformance, juniPPPoEProfileRowStatus=juniPPPoEProfileRowStatus, juniPPPoEServiceNameTableNextIndex=juniPPPoEServiceNameTableNextIndex, juniPPPoESubIfId=juniPPPoESubIfId, juniPPPoEGroup4=juniPPPoEGroup4, juniPPPoESummarySubIfNotPresent=juniPPPoESummarySubIfNotPresent, juniPPPoECompliance6=juniPPPoECompliance6, juniPPPoECompliance13=juniPPPoECompliance13, juniPPPoEIfStatsRxInvTagLength=juniPPPoEIfStatsRxInvTagLength, juniPPPoEIfStatsTxPADS=juniPPPoEIfStatsTxPADS, juniPPPoESummaryMajorIfNotPresent=juniPPPoESummaryMajorIfNotPresent, juniPPPoECompliance7=juniPPPoECompliance7, juniPPPoEIfPadrRemoteCircuitIdCapture=juniPPPoEIfPadrRemoteCircuitIdCapture, juniPPPoEIfStatsRxInvSession=juniPPPoEIfStatsRxInvSession, juniPPPoECompliance10=juniPPPoECompliance10, juniPPPoEMajorInterfaceCount=juniPPPoEMajorInterfaceCount, juniPPPoEIfStatsRxInvTypes=juniPPPoEIfStatsRxInvTypes, juniPPPoESummarySubIfOperDown=juniPPPoESummarySubIfOperDown, juniPPPoEIfRowStatus=juniPPPoEIfRowStatus, juniPPPoEIfLockoutEntry=juniPPPoEIfLockoutEntry, juniPPPoEIfStatsRxPADT=juniPPPoEIfStatsRxPADT, juniPPPoECompliance=juniPPPoECompliance, juniPPPoEGroup=juniPPPoEGroup)
n=int(input()) s=[str(input()) for a in range(n)] for i in range(n): c=0 for j in range(len(s[i])): if s[i][j] == "W": for k in range(max(0,j-2),min(len(s[i]),j+2)): if s[i][k]=="B": c+=1 break print(c)
n = int(input()) s = [str(input()) for a in range(n)] for i in range(n): c = 0 for j in range(len(s[i])): if s[i][j] == 'W': for k in range(max(0, j - 2), min(len(s[i]), j + 2)): if s[i][k] == 'B': c += 1 break print(c)
t = int(input()) for _ in range(t): n = int(input()) l1 = set(list(map(int,input().split()))) l2 = set(list(map(int,input().split()))) if l1==l2: print(1) else: print(0)
t = int(input()) for _ in range(t): n = int(input()) l1 = set(list(map(int, input().split()))) l2 = set(list(map(int, input().split()))) if l1 == l2: print(1) else: print(0)
""" sentry_twilio ~~~~~~~~~~~~~ :copyright: (c) 2012 by Matt Robenolt. :license: BSD, see LICENSE for more details. """ try: VERSION = __import__('pkg_resources') \ .get_distribution('sentry-twilio').version except Exception as e: VERSION = 'unknown'
""" sentry_twilio ~~~~~~~~~~~~~ :copyright: (c) 2012 by Matt Robenolt. :license: BSD, see LICENSE for more details. """ try: version = __import__('pkg_resources').get_distribution('sentry-twilio').version except Exception as e: version = 'unknown'
#/* *** ODSATag: Sequential *** */ # Return the position of an element in a list. # If the element is not found, return -1. def sequentialSearch(elements, e): for i in range(len(elements)): # For each element if elements[i] == e: # if we found it return i # return this position return -1 # Otherwise, return -1 #/* *** ODSAendTag: Sequential *** */ if __name__ == '__main__': arr = [2, 3, 4, 5, 7, 10] print(arr) for key in [4, 6, 10]: pos = sequentialSearch(arr, key) print(f"Search for {key} --> position {pos}")
def sequential_search(elements, e): for i in range(len(elements)): if elements[i] == e: return i return -1 if __name__ == '__main__': arr = [2, 3, 4, 5, 7, 10] print(arr) for key in [4, 6, 10]: pos = sequential_search(arr, key) print(f'Search for {key} --> position {pos}')
############################################################################## # 01: Is Unique? ############################################################################## def caseAndSpaceTreat(inputString, caseSensitive=True, spaces=True): ''' Returns a lowercase string if case insensitive, and removes spaces if necessary ''' # String pre-treatment if caseSensitive == False: inputString = inputString.lower() if spaces == False: inputString = inputString.replace(" ", "") return inputString def isUnique_Set(inputString, caseSensitive=True, spaces=True): ''' Returns true, if all the characters in the input string are unique. This function uses an additional structure (set) to store the unique characters already used. ''' inputString = caseAndSpaceTreat(inputString,caseSensitive,spaces) lettersSet = {inputString[0]} allUnique = True for i in range(1, len(inputString)): letter = inputString[i] if(letter not in lettersSet): lettersSet.add(letter) else: allUnique = False break return(allUnique) def isUnique_NoStructs(inputString, caseSensitive=True, spaces=True): ''' Returns true, if all the characters in the input string are unique. This function does not use any additional structures. It goes through the string element by element, checking for matches. ''' inputString = caseAndSpaceTreat(inputString,caseSensitive,spaces) allUnique = True for i in range(0, len(inputString)): for j in range(i + 1, len(inputString)): if inputString[i] == inputString[j]: allUnique = False break if (allUnique is False): break return(allUnique) ############################################################################## # Test and Debug ############################################################################## if __name__ == '__main__': inputString = "aAbcdez xy" case = True spaces = False uniqueA = isUnique_Set(inputString, caseSensitive=case, spaces=spaces) uniqueB = isUnique_NoStructs(inputString, caseSensitive=case, spaces=spaces) print( "Sets: " + str(uniqueA) + "\n" + "NoStruct: " + str(uniqueB) + "\n" + "\n" "Match: " + str(uniqueA == uniqueB) )
def case_and_space_treat(inputString, caseSensitive=True, spaces=True): """ Returns a lowercase string if case insensitive, and removes spaces if necessary """ if caseSensitive == False: input_string = inputString.lower() if spaces == False: input_string = inputString.replace(' ', '') return inputString def is_unique__set(inputString, caseSensitive=True, spaces=True): """ Returns true, if all the characters in the input string are unique. This function uses an additional structure (set) to store the unique characters already used. """ input_string = case_and_space_treat(inputString, caseSensitive, spaces) letters_set = {inputString[0]} all_unique = True for i in range(1, len(inputString)): letter = inputString[i] if letter not in lettersSet: lettersSet.add(letter) else: all_unique = False break return allUnique def is_unique__no_structs(inputString, caseSensitive=True, spaces=True): """ Returns true, if all the characters in the input string are unique. This function does not use any additional structures. It goes through the string element by element, checking for matches. """ input_string = case_and_space_treat(inputString, caseSensitive, spaces) all_unique = True for i in range(0, len(inputString)): for j in range(i + 1, len(inputString)): if inputString[i] == inputString[j]: all_unique = False break if allUnique is False: break return allUnique if __name__ == '__main__': input_string = 'aAbcdez xy' case = True spaces = False unique_a = is_unique__set(inputString, caseSensitive=case, spaces=spaces) unique_b = is_unique__no_structs(inputString, caseSensitive=case, spaces=spaces) print('Sets: ' + str(uniqueA) + '\n' + 'NoStruct: ' + str(uniqueB) + '\n' + '\nMatch: ' + str(uniqueA == uniqueB))
d = 3255 f = d // 15-17 z = d // (f*5) d = d % (z+1) print("d = ", d)
d = 3255 f = d // 15 - 17 z = d // (f * 5) d = d % (z + 1) print('d = ', d)
"""The objective function to optimize using the GSO algorithm""" class ObjectiveFunction(object): """Objective functions interface""" def __call__(self, coordinates): raise NotImplementedError()
"""The objective function to optimize using the GSO algorithm""" class Objectivefunction(object): """Objective functions interface""" def __call__(self, coordinates): raise not_implemented_error()
message = "o" def scope(): global message message = "p" scope() print(message)
message = 'o' def scope(): global message message = 'p' scope() print(message)
# This file is part of the faebryk project # SPDX-License-Identifier: MIT class lazy: def __init__(self, expr): self.expr = expr def __str__(self): return str(self.expr()) def __repr__(self): return repr(self.expr()) def kw2dict(**kw): return dict(kw) class hashable_dict: def __init__(self, obj: dict): self.obj = obj def __hash__(self): return hash(sum(map(hash, self.obj.items()))) def __repr__(self): return "{}({})".format(type(self), repr(self.obj)) def __eq__(self, other): return hash(self) == hash(other)
class Lazy: def __init__(self, expr): self.expr = expr def __str__(self): return str(self.expr()) def __repr__(self): return repr(self.expr()) def kw2dict(**kw): return dict(kw) class Hashable_Dict: def __init__(self, obj: dict): self.obj = obj def __hash__(self): return hash(sum(map(hash, self.obj.items()))) def __repr__(self): return '{}({})'.format(type(self), repr(self.obj)) def __eq__(self, other): return hash(self) == hash(other)
def Sum_Divisors(x): s = 0 for i in range(1,(x // 2) + 1): if x % i == 0: s += i return s def Amicable(x,y): if x!=y: if Sum_Divisors(x) == y and Sum_Divisors(y) == x : return True return False def Sum_Amicable(): l=[] for i in range(284,10000): if Amicable(i,Sum_Divisors(i)): if i not in l: l.append(i) if Sum_Divisors(i) not in l: l.append(Sum_Divisors(i)) print(sum(l)) Sum_Amicable()
def sum__divisors(x): s = 0 for i in range(1, x // 2 + 1): if x % i == 0: s += i return s def amicable(x, y): if x != y: if sum__divisors(x) == y and sum__divisors(y) == x: return True return False def sum__amicable(): l = [] for i in range(284, 10000): if amicable(i, sum__divisors(i)): if i not in l: l.append(i) if sum__divisors(i) not in l: l.append(sum__divisors(i)) print(sum(l)) sum__amicable()
def is_odd(n): '''Return True if the number is odd and False otherwise.''' if n % 2 != 0: odd = True else: odd = False return odd def main(): '''Define main function.''' # Prompt the user for a number number = float(input('Please enter a number: ')) # Determine whether the number is even print(is_odd(number)) # Call main function main()
def is_odd(n): """Return True if the number is odd and False otherwise.""" if n % 2 != 0: odd = True else: odd = False return odd def main(): """Define main function.""" number = float(input('Please enter a number: ')) print(is_odd(number)) main()
def ans(x): if len(x) == 2 or len(x) == 10: return False return True
def ans(x): if len(x) == 2 or len(x) == 10: return False return True
# Autogenerated config.py # Documentation: # qute://help/configuring.html # qute://help/settings.html # Uncomment this to still load settings configured via autoconfig.yml config.load_autoconfig() config.source('colors_qutebrowser.py')
config.load_autoconfig() config.source('colors_qutebrowser.py')
L, R = map(int, input().split()) L -= 1 R -= 1 S = input() print(S[:L] + ''.join(reversed(S[L:R+1])) + S[R+1:len(S)])
(l, r) = map(int, input().split()) l -= 1 r -= 1 s = input() print(S[:L] + ''.join(reversed(S[L:R + 1])) + S[R + 1:len(S)])
# https://codeforces.com/problemset/problem/339/A s = [x for x in input().split("+")] if len(s) == 1: print(s[0]) else: s.sort() print("+".join(s))
s = [x for x in input().split('+')] if len(s) == 1: print(s[0]) else: s.sort() print('+'.join(s))
GIT_BRANCH_MASTER = "master" GIT_BRANCH_MAIN = "main" GITHUB_PUBLIC_DOMAIN_NAME = "github.com" KNOWN_DEFAULT_BRANCHES = (GIT_BRANCH_MASTER, GIT_BRANCH_MAIN)
git_branch_master = 'master' git_branch_main = 'main' github_public_domain_name = 'github.com' known_default_branches = (GIT_BRANCH_MASTER, GIT_BRANCH_MAIN)
# # PySNMP MIB module AC-V5-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/AC-V5-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 16:54:49 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection") acProducts, acRegistrations, audioCodes, acGeneric, acBoardMibs = mibBuilder.importSymbols("AUDIOCODES-TYPES-MIB", "acProducts", "acRegistrations", "audioCodes", "acGeneric", "acBoardMibs") InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") IpAddress, TimeTicks, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, ModuleIdentity, enterprises, MibIdentifier, Unsigned32, Counter32, NotificationType, iso, Counter64, Gauge32, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "TimeTicks", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "ModuleIdentity", "enterprises", "MibIdentifier", "Unsigned32", "Counter32", "NotificationType", "iso", "Counter64", "Gauge32", "Integer32") DisplayString, RowStatus, TextualConvention, TAddress, DateAndTime = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TextualConvention", "TAddress", "DateAndTime") acV5 = ModuleIdentity((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13)) if mibBuilder.loadTexts: acV5.setLastUpdated('200911251109Z') if mibBuilder.loadTexts: acV5.setOrganization('AudioCodes Ltd') acV5Configuration = MibIdentifier((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1)) acv5Interfce = MibIdentifier((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1)) acV5InterfceTable = MibTable((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1), ) if mibBuilder.loadTexts: acV5InterfceTable.setStatus('current') acV5InterfceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1), ).setIndexNames((0, "AC-V5-MIB", "acV5InterfceIndex")) if mibBuilder.loadTexts: acV5InterfceEntry.setStatus('current') acV5InterfceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceIndex.setStatus('current') acV5InterfceRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5InterfceRowStatus.setStatus('current') acV5InterfceAction = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("offline", 0), ("protectionSwitchOver", 1), ("inService", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5InterfceAction.setStatus('current') acV5InterfceActionResult = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("succeeded", 0), ("inProgress", 1), ("failed", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceActionResult.setStatus('current') acV5InterfceOperationalState = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("offline", 0), ("busy", 1), ("inService", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceOperationalState.setStatus('current') acV5InterfceAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2))).clone(namedValues=NamedValues(("offline", 0), ("inService", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceAdminState.setStatus('current') acV5InterfceActiveSignalingLink = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(-1, 0, 1))).clone(namedValues=NamedValues(("notConfigured", -1), ("primary", 0), ("secondary", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceActiveSignalingLink.setStatus('current') acV5InterfceIdNotEqual = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("cleared", 0), ("raised", 1), ("unknown", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceIdNotEqual.setStatus('current') acV5InterfceVariantNotEqual = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("cleared", 0), ("raised", 1), ("unknown", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceVariantNotEqual.setStatus('current') acV5InterfceIDCheckTimeOutError = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("cleared", 0), ("raised", 1), ("unknown", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceIDCheckTimeOutError.setStatus('current') acV5InterfceL2StartupFailed = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("cleared", 0), ("raised", 1), ("unknown", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceL2StartupFailed.setStatus('current') acV5InterfceRestartFailed = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("cleared", 0), ("raised", 1), ("unknown", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceRestartFailed.setStatus('current') acV5InterfceControlProtocolDataLinkError = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("cleared", 0), ("raised", 1), ("unknown", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceControlProtocolDataLinkError.setStatus('current') acV5InterfceLinkControlProtocolDataLinkError = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("cleared", 0), ("raised", 1), ("unknown", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceLinkControlProtocolDataLinkError.setStatus('current') acV5InterfceBCCProtocolDataLinkError = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("cleared", 0), ("raised", 1), ("unknown", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceBCCProtocolDataLinkError.setStatus('current') acV5InterfcePSTNProtocolDataLinkError = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("cleared", 0), ("raised", 1), ("unknown", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfcePSTNProtocolDataLinkError.setStatus('current') acV5InterfceProtectionDL1Error = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("cleared", 0), ("raised", 1), ("unknown", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceProtectionDL1Error.setStatus('current') acV5InterfceProtectionDL2Error = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("cleared", 0), ("raised", 1), ("unknown", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceProtectionDL2Error.setStatus('current') acV5InterfceType = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("v52", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceType.setStatus('current') acV5InterfceProtocolSide = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("an-Side", 0), ("le-Side", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5InterfceProtocolSide.setStatus('current') acV5InterfceId = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 16777215))).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5InterfceId.setStatus('current') acV5InterfceVariantId = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 22), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 127))).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5InterfceVariantId.setStatus('current') acV5InterfceLogicalCchannelId = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 23), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5InterfceLogicalCchannelId.setStatus('current') acV5InterfceTraceLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 20, 21, 22, 23))).clone(namedValues=NamedValues(("noTrace", 0), ("full-Trace-No-Duplication", 20), ("full-Trace-With-Duplication", 21), ("layer3-Up-Trace-No-Duplication", 22), ("layer3-Up-Trace-With-Duplication", 23)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5InterfceTraceLevel.setStatus('current') acV5InterfceNumberOfPortsInCard = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 25), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65533))).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5InterfceNumberOfPortsInCard.setStatus('current') acV5InterfceEnableRegisterRecallConfiguration = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5InterfceEnableRegisterRecallConfiguration.setStatus('current') acV5InterfceRegisterRecallDurationType = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 27), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5InterfceRegisterRecallDurationType.setStatus('current') acV5Link = MibIdentifier((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2)) acV5LinkTable = MibTable((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1), ) if mibBuilder.loadTexts: acV5LinkTable.setStatus('current') acV5LinkEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1), ).setIndexNames((0, "AC-V5-MIB", "acV5LinkIndex")) if mibBuilder.loadTexts: acV5LinkEntry.setStatus('current') acV5LinkIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 62))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5LinkIndex.setStatus('current') acV5LinkRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5LinkRowStatus.setStatus('current') acV5LinkAction = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unBlock", 0), ("block", 1), ("linkIdCheck", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5LinkAction.setStatus('current') acV5LinkActionResult = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("succeeded", 0), ("inProgress", 1), ("failed", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5LinkActionResult.setStatus('current') acV5LinkIdCheckStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("succes", 0), ("failure", 1), ("testRejected", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5LinkIdCheckStatus.setStatus('current') acV5LinkOperationalState = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("operational", 0), ("blocked", 1), ("failed", 2), ("blockedAndFailed", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5LinkOperationalState.setStatus('current') acV5LinkInterfaceIndx = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 30))).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5LinkInterfaceIndx.setStatus('current') acV5LinkId = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 16777215))).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5LinkId.setStatus('current') acV5LinkType = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("normal", 0), ("primary", 1), ("secondary", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: acV5LinkType.setStatus('current') acV5Action = MibIdentifier((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 3)) acV5PortAction = MibIdentifier((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 3, 1)) acV5PortActionType = MibScalar((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 10))).clone(namedValues=NamedValues(("none", 0), ("removeAllPorts", 1), ("removeIFPorts", 2), ("actionDone", 10)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: acV5PortActionType.setStatus('current') acV5PortActionID = MibScalar((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 3, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readwrite") if mibBuilder.loadTexts: acV5PortActionID.setStatus('current') acV5PortActionParams = MibScalar((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 3, 1, 3), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 200))).setMaxAccess("readwrite") if mibBuilder.loadTexts: acV5PortActionParams.setStatus('current') acV5PortActionResult = MibScalar((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 3, 1, 4), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 200))).setMaxAccess("readonly") if mibBuilder.loadTexts: acV5PortActionResult.setStatus('current') mibBuilder.exportSymbols("AC-V5-MIB", acV5LinkOperationalState=acV5LinkOperationalState, acV5InterfcePSTNProtocolDataLinkError=acV5InterfcePSTNProtocolDataLinkError, acV5PortActionType=acV5PortActionType, acV5InterfceLinkControlProtocolDataLinkError=acV5InterfceLinkControlProtocolDataLinkError, acV5InterfceEnableRegisterRecallConfiguration=acV5InterfceEnableRegisterRecallConfiguration, acV5InterfceTraceLevel=acV5InterfceTraceLevel, acV5InterfceRegisterRecallDurationType=acV5InterfceRegisterRecallDurationType, acV5InterfceOperationalState=acV5InterfceOperationalState, acV5InterfceAdminState=acV5InterfceAdminState, acV5LinkInterfaceIndx=acV5LinkInterfaceIndx, acV5InterfceRowStatus=acV5InterfceRowStatus, acV5InterfceEntry=acV5InterfceEntry, acV5InterfceProtectionDL1Error=acV5InterfceProtectionDL1Error, acV5InterfceId=acV5InterfceId, acv5Interfce=acv5Interfce, acV5LinkTable=acV5LinkTable, acV5LinkRowStatus=acV5LinkRowStatus, acV5PortAction=acV5PortAction, acV5InterfceIndex=acV5InterfceIndex, acV5Configuration=acV5Configuration, acV5LinkAction=acV5LinkAction, acV5InterfceControlProtocolDataLinkError=acV5InterfceControlProtocolDataLinkError, acV5InterfceActiveSignalingLink=acV5InterfceActiveSignalingLink, acV5PortActionResult=acV5PortActionResult, acV5InterfceL2StartupFailed=acV5InterfceL2StartupFailed, acV5LinkIdCheckStatus=acV5LinkIdCheckStatus, acV5InterfceBCCProtocolDataLinkError=acV5InterfceBCCProtocolDataLinkError, acV5InterfceVariantId=acV5InterfceVariantId, acV5Action=acV5Action, acV5InterfceVariantNotEqual=acV5InterfceVariantNotEqual, acV5InterfceNumberOfPortsInCard=acV5InterfceNumberOfPortsInCard, PYSNMP_MODULE_ID=acV5, acV5PortActionID=acV5PortActionID, acV5InterfceProtocolSide=acV5InterfceProtocolSide, acV5LinkIndex=acV5LinkIndex, acV5LinkType=acV5LinkType, acV5LinkActionResult=acV5LinkActionResult, acV5InterfceIdNotEqual=acV5InterfceIdNotEqual, acV5InterfceLogicalCchannelId=acV5InterfceLogicalCchannelId, acV5InterfceTable=acV5InterfceTable, acV5PortActionParams=acV5PortActionParams, acV5InterfceIDCheckTimeOutError=acV5InterfceIDCheckTimeOutError, acV5InterfceType=acV5InterfceType, acV5InterfceProtectionDL2Error=acV5InterfceProtectionDL2Error, acV5InterfceActionResult=acV5InterfceActionResult, acV5LinkEntry=acV5LinkEntry, acV5InterfceRestartFailed=acV5InterfceRestartFailed, acV5=acV5, acV5InterfceAction=acV5InterfceAction, acV5Link=acV5Link, acV5LinkId=acV5LinkId)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_union, single_value_constraint, value_size_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection') (ac_products, ac_registrations, audio_codes, ac_generic, ac_board_mibs) = mibBuilder.importSymbols('AUDIOCODES-TYPES-MIB', 'acProducts', 'acRegistrations', 'audioCodes', 'acGeneric', 'acBoardMibs') (inet_address_type, inet_address) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddressType', 'InetAddress') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup') (ip_address, time_ticks, bits, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, module_identity, enterprises, mib_identifier, unsigned32, counter32, notification_type, iso, counter64, gauge32, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'TimeTicks', 'Bits', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'ModuleIdentity', 'enterprises', 'MibIdentifier', 'Unsigned32', 'Counter32', 'NotificationType', 'iso', 'Counter64', 'Gauge32', 'Integer32') (display_string, row_status, textual_convention, t_address, date_and_time) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'RowStatus', 'TextualConvention', 'TAddress', 'DateAndTime') ac_v5 = module_identity((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13)) if mibBuilder.loadTexts: acV5.setLastUpdated('200911251109Z') if mibBuilder.loadTexts: acV5.setOrganization('AudioCodes Ltd') ac_v5_configuration = mib_identifier((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1)) acv5_interfce = mib_identifier((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1)) ac_v5_interfce_table = mib_table((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1)) if mibBuilder.loadTexts: acV5InterfceTable.setStatus('current') ac_v5_interfce_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1)).setIndexNames((0, 'AC-V5-MIB', 'acV5InterfceIndex')) if mibBuilder.loadTexts: acV5InterfceEntry.setStatus('current') ac_v5_interfce_index = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 30))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceIndex.setStatus('current') ac_v5_interfce_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 2), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5InterfceRowStatus.setStatus('current') ac_v5_interfce_action = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('offline', 0), ('protectionSwitchOver', 1), ('inService', 2)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5InterfceAction.setStatus('current') ac_v5_interfce_action_result = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('succeeded', 0), ('inProgress', 1), ('failed', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceActionResult.setStatus('current') ac_v5_interfce_operational_state = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('offline', 0), ('busy', 1), ('inService', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceOperationalState.setStatus('current') ac_v5_interfce_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 2))).clone(namedValues=named_values(('offline', 0), ('inService', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceAdminState.setStatus('current') ac_v5_interfce_active_signaling_link = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(-1, 0, 1))).clone(namedValues=named_values(('notConfigured', -1), ('primary', 0), ('secondary', 1)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceActiveSignalingLink.setStatus('current') ac_v5_interfce_id_not_equal = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('cleared', 0), ('raised', 1), ('unknown', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceIdNotEqual.setStatus('current') ac_v5_interfce_variant_not_equal = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('cleared', 0), ('raised', 1), ('unknown', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceVariantNotEqual.setStatus('current') ac_v5_interfce_id_check_time_out_error = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('cleared', 0), ('raised', 1), ('unknown', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceIDCheckTimeOutError.setStatus('current') ac_v5_interfce_l2_startup_failed = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('cleared', 0), ('raised', 1), ('unknown', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceL2StartupFailed.setStatus('current') ac_v5_interfce_restart_failed = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('cleared', 0), ('raised', 1), ('unknown', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceRestartFailed.setStatus('current') ac_v5_interfce_control_protocol_data_link_error = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('cleared', 0), ('raised', 1), ('unknown', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceControlProtocolDataLinkError.setStatus('current') ac_v5_interfce_link_control_protocol_data_link_error = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('cleared', 0), ('raised', 1), ('unknown', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceLinkControlProtocolDataLinkError.setStatus('current') ac_v5_interfce_bcc_protocol_data_link_error = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('cleared', 0), ('raised', 1), ('unknown', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceBCCProtocolDataLinkError.setStatus('current') ac_v5_interfce_pstn_protocol_data_link_error = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('cleared', 0), ('raised', 1), ('unknown', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfcePSTNProtocolDataLinkError.setStatus('current') ac_v5_interfce_protection_dl1_error = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('cleared', 0), ('raised', 1), ('unknown', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceProtectionDL1Error.setStatus('current') ac_v5_interfce_protection_dl2_error = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('cleared', 0), ('raised', 1), ('unknown', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceProtectionDL2Error.setStatus('current') ac_v5_interfce_type = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('v52', 1)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceType.setStatus('current') ac_v5_interfce_protocol_side = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('an-Side', 0), ('le-Side', 1)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5InterfceProtocolSide.setStatus('current') ac_v5_interfce_id = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 21), integer32().subtype(subtypeSpec=value_range_constraint(-1, 16777215))).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5InterfceId.setStatus('current') ac_v5_interfce_variant_id = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 22), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 127))).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5InterfceVariantId.setStatus('current') ac_v5_interfce_logical_cchannel_id = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 23), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5InterfceLogicalCchannelId.setStatus('current') ac_v5_interfce_trace_level = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 24), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 20, 21, 22, 23))).clone(namedValues=named_values(('noTrace', 0), ('full-Trace-No-Duplication', 20), ('full-Trace-With-Duplication', 21), ('layer3-Up-Trace-No-Duplication', 22), ('layer3-Up-Trace-With-Duplication', 23)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5InterfceTraceLevel.setStatus('current') ac_v5_interfce_number_of_ports_in_card = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 25), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65533))).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5InterfceNumberOfPortsInCard.setStatus('current') ac_v5_interfce_enable_register_recall_configuration = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 26), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disable', 0), ('enable', 1)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5InterfceEnableRegisterRecallConfiguration.setStatus('current') ac_v5_interfce_register_recall_duration_type = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 1, 1, 1, 27), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5InterfceRegisterRecallDurationType.setStatus('current') ac_v5_link = mib_identifier((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2)) ac_v5_link_table = mib_table((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1)) if mibBuilder.loadTexts: acV5LinkTable.setStatus('current') ac_v5_link_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1)).setIndexNames((0, 'AC-V5-MIB', 'acV5LinkIndex')) if mibBuilder.loadTexts: acV5LinkEntry.setStatus('current') ac_v5_link_index = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 62))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5LinkIndex.setStatus('current') ac_v5_link_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 2), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5LinkRowStatus.setStatus('current') ac_v5_link_action = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unBlock', 0), ('block', 1), ('linkIdCheck', 2)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5LinkAction.setStatus('current') ac_v5_link_action_result = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('succeeded', 0), ('inProgress', 1), ('failed', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5LinkActionResult.setStatus('current') ac_v5_link_id_check_status = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('succes', 0), ('failure', 1), ('testRejected', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5LinkIdCheckStatus.setStatus('current') ac_v5_link_operational_state = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('operational', 0), ('blocked', 1), ('failed', 2), ('blockedAndFailed', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5LinkOperationalState.setStatus('current') ac_v5_link_interface_indx = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 30))).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5LinkInterfaceIndx.setStatus('current') ac_v5_link_id = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(-1, 16777215))).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5LinkId.setStatus('current') ac_v5_link_type = mib_table_column((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 1, 2, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('normal', 0), ('primary', 1), ('secondary', 2)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: acV5LinkType.setStatus('current') ac_v5_action = mib_identifier((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 3)) ac_v5_port_action = mib_identifier((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 3, 1)) ac_v5_port_action_type = mib_scalar((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 10))).clone(namedValues=named_values(('none', 0), ('removeAllPorts', 1), ('removeIFPorts', 2), ('actionDone', 10)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: acV5PortActionType.setStatus('current') ac_v5_port_action_id = mib_scalar((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 3, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readwrite') if mibBuilder.loadTexts: acV5PortActionID.setStatus('current') ac_v5_port_action_params = mib_scalar((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 3, 1, 3), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 200))).setMaxAccess('readwrite') if mibBuilder.loadTexts: acV5PortActionParams.setStatus('current') ac_v5_port_action_result = mib_scalar((1, 3, 6, 1, 4, 1, 5003, 9, 10, 13, 3, 1, 4), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 200))).setMaxAccess('readonly') if mibBuilder.loadTexts: acV5PortActionResult.setStatus('current') mibBuilder.exportSymbols('AC-V5-MIB', acV5LinkOperationalState=acV5LinkOperationalState, acV5InterfcePSTNProtocolDataLinkError=acV5InterfcePSTNProtocolDataLinkError, acV5PortActionType=acV5PortActionType, acV5InterfceLinkControlProtocolDataLinkError=acV5InterfceLinkControlProtocolDataLinkError, acV5InterfceEnableRegisterRecallConfiguration=acV5InterfceEnableRegisterRecallConfiguration, acV5InterfceTraceLevel=acV5InterfceTraceLevel, acV5InterfceRegisterRecallDurationType=acV5InterfceRegisterRecallDurationType, acV5InterfceOperationalState=acV5InterfceOperationalState, acV5InterfceAdminState=acV5InterfceAdminState, acV5LinkInterfaceIndx=acV5LinkInterfaceIndx, acV5InterfceRowStatus=acV5InterfceRowStatus, acV5InterfceEntry=acV5InterfceEntry, acV5InterfceProtectionDL1Error=acV5InterfceProtectionDL1Error, acV5InterfceId=acV5InterfceId, acv5Interfce=acv5Interfce, acV5LinkTable=acV5LinkTable, acV5LinkRowStatus=acV5LinkRowStatus, acV5PortAction=acV5PortAction, acV5InterfceIndex=acV5InterfceIndex, acV5Configuration=acV5Configuration, acV5LinkAction=acV5LinkAction, acV5InterfceControlProtocolDataLinkError=acV5InterfceControlProtocolDataLinkError, acV5InterfceActiveSignalingLink=acV5InterfceActiveSignalingLink, acV5PortActionResult=acV5PortActionResult, acV5InterfceL2StartupFailed=acV5InterfceL2StartupFailed, acV5LinkIdCheckStatus=acV5LinkIdCheckStatus, acV5InterfceBCCProtocolDataLinkError=acV5InterfceBCCProtocolDataLinkError, acV5InterfceVariantId=acV5InterfceVariantId, acV5Action=acV5Action, acV5InterfceVariantNotEqual=acV5InterfceVariantNotEqual, acV5InterfceNumberOfPortsInCard=acV5InterfceNumberOfPortsInCard, PYSNMP_MODULE_ID=acV5, acV5PortActionID=acV5PortActionID, acV5InterfceProtocolSide=acV5InterfceProtocolSide, acV5LinkIndex=acV5LinkIndex, acV5LinkType=acV5LinkType, acV5LinkActionResult=acV5LinkActionResult, acV5InterfceIdNotEqual=acV5InterfceIdNotEqual, acV5InterfceLogicalCchannelId=acV5InterfceLogicalCchannelId, acV5InterfceTable=acV5InterfceTable, acV5PortActionParams=acV5PortActionParams, acV5InterfceIDCheckTimeOutError=acV5InterfceIDCheckTimeOutError, acV5InterfceType=acV5InterfceType, acV5InterfceProtectionDL2Error=acV5InterfceProtectionDL2Error, acV5InterfceActionResult=acV5InterfceActionResult, acV5LinkEntry=acV5LinkEntry, acV5InterfceRestartFailed=acV5InterfceRestartFailed, acV5=acV5, acV5InterfceAction=acV5InterfceAction, acV5Link=acV5Link, acV5LinkId=acV5LinkId)
""" You are playing a simplified Pacman game. You start at the point (0, 0), and your destination is (target[0], target[1]). There are several ghosts on the map, the i-th ghost starts at (ghosts[i][0], ghosts[i][1]). Each turn, you and all ghosts simultaneously *may* move in one of 4 cardinal directions: north, east, west, or south, going from the previous point to a new point 1 unit of distance away. You escape if and only if you can reach the target before any ghost reaches you (for any given moves the ghosts may take.) If you reach any square (including the target) at the same time as a ghost, it doesn't count as an escape. Return True if and only if it is possible to escape. Example 1: Input: ghosts = [[1, 0], [0, 3]] target = [0, 1] Output: true Explanation: You can directly reach the destination (0, 1) at time 1, while the ghosts located at (1, 0) or (0, 3) have no way to catch up with you. Example 2: Input: ghosts = [[1, 0]] target = [2, 0] Output: false Explanation: You need to reach the destination (2, 0), but the ghost at (1, 0) lies between you and the destination. Example 3: Input: ghosts = [[2, 0]] target = [1, 0] Output: false Explanation: The ghost can reach the target at the same time as you. Note: All points have coordinates with absolute value <= 10000. The number of ghosts will not exceed 100. """
""" You are playing a simplified Pacman game. You start at the point (0, 0), and your destination is (target[0], target[1]). There are several ghosts on the map, the i-th ghost starts at (ghosts[i][0], ghosts[i][1]). Each turn, you and all ghosts simultaneously *may* move in one of 4 cardinal directions: north, east, west, or south, going from the previous point to a new point 1 unit of distance away. You escape if and only if you can reach the target before any ghost reaches you (for any given moves the ghosts may take.) If you reach any square (including the target) at the same time as a ghost, it doesn't count as an escape. Return True if and only if it is possible to escape. Example 1: Input: ghosts = [[1, 0], [0, 3]] target = [0, 1] Output: true Explanation: You can directly reach the destination (0, 1) at time 1, while the ghosts located at (1, 0) or (0, 3) have no way to catch up with you. Example 2: Input: ghosts = [[1, 0]] target = [2, 0] Output: false Explanation: You need to reach the destination (2, 0), but the ghost at (1, 0) lies between you and the destination. Example 3: Input: ghosts = [[2, 0]] target = [1, 0] Output: false Explanation: The ghost can reach the target at the same time as you. Note: All points have coordinates with absolute value <= 10000. The number of ghosts will not exceed 100. """
# Name:COLLIN FRANCE # Date:JULY 11 17 # proj02: sum # Write a program that prompts the user to enter numbers, one per line, # ending with a line containing 0, and keep a running sum of the numbers. # Only print out the sum after all the numbers are entered # (at least in your final version). Each time you read in a number, # you can immediately use it for your sum, # and then be done with the number just entered. #Example: # Enter a number to sum, or 0 to indicate you are finished: 4 # Enter a number to sum, or 0 to indicate you are finished: 5 # Enter a number to sum, or 0 to indicate you are finished: 2 # Enter a number to sum, or 0 to indicate you are finished: 10 # Enter a number to sum, or 0 to indicate you are finished: 0 #The sum of your numbers iS:2 # True/False loop: end ewhen usr type in a 0 # loop control variable=True # n1=raw_input ("enter a number") # sum=0 # while loop control variable is True: # if user types in 0 # loop control is False # else raw_input ("enter a number") # sum=sum +user input loop_control = True collin=0 while loop_control == True: Number=raw_input("any number to a start equation. Enter a zero to show you are finished") if (Number) == "0": loop_control = False collin = int(Number) + collin print (collin),'is the sum'
loop_control = True collin = 0 while loop_control == True: number = raw_input('any number to a start equation. Enter a zero to show you are finished') if Number == '0': loop_control = False collin = int(Number) + collin (print(collin), 'is the sum')
#cons(a,b) constructs a pair, and car(pair) returns the first and cdr(pair) returns the last element of the pair. #For example , car(cons(3,4)) returns 3, and cdr(cons(3,4)) returns 4. #Given this implementation of cons: '''def cons(a,b): def pair(f): return f(a,b) return pair() ''' #Implement car and cdr
"""def cons(a,b): def pair(f): return f(a,b) return pair() """
def rotateImage(a): w = len(a) h = w img = [0] * h for col in range(h): img_row = [0] * w for row in range(w): img_row[h - row - 1] = a[row][col] img[col] = img_row return img
def rotate_image(a): w = len(a) h = w img = [0] * h for col in range(h): img_row = [0] * w for row in range(w): img_row[h - row - 1] = a[row][col] img[col] = img_row return img
""" def strange_counter(t): cur_start = 3 counter = 3 for i in range(1, t): counter -= 1 if counter == 0: cur_start *= 2 counter = cur_start return counter """ def strange_counter(t): """Hackerrank Problem: https://www.hackerrank.com/challenges/strange-code/problem Bob has a strange counter. At the first second, it displays the number 3. Each second, the number displayed by the counter decrements by 1 until it reaches 1. The counter counts down in cycles. In next second, the timer resets to 2 x the initial number of the prior cycle and continues counting down. The diagram below shows the counter values for each time t in the first three cycles: time | value 1 3 2 2 3 1 time | value 4 6 5 5 6 4 7 3 8 2 9 1 Find and print the value displayed by the counter at time t. Args: t: an integer to find the count for Returns: int: the value based on the strange counter """ cur_start = 3 while t > cur_start: t -= cur_start cur_start *= 2 # Now find the value to return return cur_start - t + 1 if __name__ == "__main__": print(strange_counter(4)) print(strange_counter(12))
""" def strange_counter(t): cur_start = 3 counter = 3 for i in range(1, t): counter -= 1 if counter == 0: cur_start *= 2 counter = cur_start return counter """ def strange_counter(t): """Hackerrank Problem: https://www.hackerrank.com/challenges/strange-code/problem Bob has a strange counter. At the first second, it displays the number 3. Each second, the number displayed by the counter decrements by 1 until it reaches 1. The counter counts down in cycles. In next second, the timer resets to 2 x the initial number of the prior cycle and continues counting down. The diagram below shows the counter values for each time t in the first three cycles: time | value 1 3 2 2 3 1 time | value 4 6 5 5 6 4 7 3 8 2 9 1 Find and print the value displayed by the counter at time t. Args: t: an integer to find the count for Returns: int: the value based on the strange counter """ cur_start = 3 while t > cur_start: t -= cur_start cur_start *= 2 return cur_start - t + 1 if __name__ == '__main__': print(strange_counter(4)) print(strange_counter(12))
def ajuda(msg): help(msg) n=str(input('Digite um comando para ver a ajuda: ')) ajuda(n)
def ajuda(msg): help(msg) n = str(input('Digite um comando para ver a ajuda: ')) ajuda(n)
def tower_of_hanoi(num_of_disks, mv_from, mv_to, tmp_bar): if num_of_disks == 1: print(f'Move disk 1 from {mv_from} to {mv_to}') return tower_of_hanoi(num_of_disks - 1, mv_from, tmp_bar, mv_to) print(f'Move disk {num_of_disks} from {mv_from} to {mv_to}') tower_of_hanoi(num_of_disks - 1, tmp_bar, mv_to, mv_from) tower_of_hanoi(1, 'A', 'C', 'B')
def tower_of_hanoi(num_of_disks, mv_from, mv_to, tmp_bar): if num_of_disks == 1: print(f'Move disk 1 from {mv_from} to {mv_to}') return tower_of_hanoi(num_of_disks - 1, mv_from, tmp_bar, mv_to) print(f'Move disk {num_of_disks} from {mv_from} to {mv_to}') tower_of_hanoi(num_of_disks - 1, tmp_bar, mv_to, mv_from) tower_of_hanoi(1, 'A', 'C', 'B')
# https://www.codewars.com/kata/5a2d70a6f28b821ab4000004/ ''' Instructions : This kata is part of the collection Mary's Puzzle Books. Zero Terminated Sum Mary has another puzzle book, and it's up to you to help her out! This book is filled with zero-terminated substrings, and you have to find the substring with the largest sum of its digits. For example, one puzzle looks like this: "72102450111111090" Here, there are 4 different substrings: 721, 245, 111111, and 9. The sums of their digits are 10, 11, 6, and 9 respectively. Therefore, the substring with the largest sum of its digits is 245, and its sum is 11. Write a function largest_sum which takes a string and returns the maximum of the sums of the substrings. In the example above, your function should return 11. Notes: A substring can have length 0. For example, 123004560 has three substrings, and the middle one has length 0. All inputs will be valid strings of digits, and the last digit will always be 0. ''' def largest_sum(s): arr = [] s = s.split('0') for i in s: sum = 0 for j in i: sum += int(j) arr.append(sum) return max(arr)
""" Instructions : This kata is part of the collection Mary's Puzzle Books. Zero Terminated Sum Mary has another puzzle book, and it's up to you to help her out! This book is filled with zero-terminated substrings, and you have to find the substring with the largest sum of its digits. For example, one puzzle looks like this: "72102450111111090" Here, there are 4 different substrings: 721, 245, 111111, and 9. The sums of their digits are 10, 11, 6, and 9 respectively. Therefore, the substring with the largest sum of its digits is 245, and its sum is 11. Write a function largest_sum which takes a string and returns the maximum of the sums of the substrings. In the example above, your function should return 11. Notes: A substring can have length 0. For example, 123004560 has three substrings, and the middle one has length 0. All inputs will be valid strings of digits, and the last digit will always be 0. """ def largest_sum(s): arr = [] s = s.split('0') for i in s: sum = 0 for j in i: sum += int(j) arr.append(sum) return max(arr)
# -*- coding: utf-8 -*- """ Spyder Editor @author: syenpark Python Version: 3.6 """ def lowest_payment(balance, annual_interest_rate): ''' inputs returns lowest payment ''' epsilon = 0.01 lower = balance / 12.0 upper = (balance * (1 + annual_interest_rate / 12.0)**12) / 12.0 def updated_balance(balance, m): for i in range(12): balance = (1 + annual_interest_rate / 12.0) * (balance - m) return balance while True: mid = (lower + upper) / 2.0 if updated_balance(balance, mid) == 0 or (upper - lower) / 2.0 < epsilon: return 'Lowest Payment: ' + str(round(mid, 2)) + " " elif updated_balance(balance, mid) * updated_balance(balance, lower) > 0: lower = mid else: upper = mid balance = 320000 annualInterestRate = 0.2 print(lowest_payment(balance, annualInterestRate))
""" Spyder Editor @author: syenpark Python Version: 3.6 """ def lowest_payment(balance, annual_interest_rate): """ inputs returns lowest payment """ epsilon = 0.01 lower = balance / 12.0 upper = balance * (1 + annual_interest_rate / 12.0) ** 12 / 12.0 def updated_balance(balance, m): for i in range(12): balance = (1 + annual_interest_rate / 12.0) * (balance - m) return balance while True: mid = (lower + upper) / 2.0 if updated_balance(balance, mid) == 0 or (upper - lower) / 2.0 < epsilon: return 'Lowest Payment: ' + str(round(mid, 2)) + ' ' elif updated_balance(balance, mid) * updated_balance(balance, lower) > 0: lower = mid else: upper = mid balance = 320000 annual_interest_rate = 0.2 print(lowest_payment(balance, annualInterestRate))
class PPO: def get_specs(env=None): specs = { "type": "ppo_agent", "states_preprocessing": { "type":"flatten" }, "subsampling_fraction": 0.1, "optimization_steps": 50, "entropy_regularization": 0.01, "gae_lambda": None, "likelihood_ratio_clipping": 0.2, "actions_exploration":{ "type": "epsilon_decay", "initial_epsilon": 1.0, "final_epsilon": 0.1, "timesteps": 10000 }, "update_mode": { "unit": "episodes", "batch_size": 32, "frequency": 32 }, "memory": { "type": "latest", "include_next_states": False, "capacity": 50000 }, "step_optimizer": { "type": "adam", "learning_rate": 1e-3 }, "discount": 0.99, "saver": { "directory": None, "seconds": 600 }, "summarizer": { "directory": None, "time": 50, "labels": [] } } return specs
class Ppo: def get_specs(env=None): specs = {'type': 'ppo_agent', 'states_preprocessing': {'type': 'flatten'}, 'subsampling_fraction': 0.1, 'optimization_steps': 50, 'entropy_regularization': 0.01, 'gae_lambda': None, 'likelihood_ratio_clipping': 0.2, 'actions_exploration': {'type': 'epsilon_decay', 'initial_epsilon': 1.0, 'final_epsilon': 0.1, 'timesteps': 10000}, 'update_mode': {'unit': 'episodes', 'batch_size': 32, 'frequency': 32}, 'memory': {'type': 'latest', 'include_next_states': False, 'capacity': 50000}, 'step_optimizer': {'type': 'adam', 'learning_rate': 0.001}, 'discount': 0.99, 'saver': {'directory': None, 'seconds': 600}, 'summarizer': {'directory': None, 'time': 50, 'labels': []}} return specs
class Solution: # This will technically work, but it's slow as all get-out. # Worst case would be O(n^2) as you have to traverse your # entire list of n numbers k times, which if k is 1 less # than the length of nums, is effectively n. def rotate(self, nums, k): start = end = len(nums) if k >= start: k = k % start if k == 0: return x = 1 while k > 0: k -= 1 for i in range(1, end): # print(nums) temp = nums[-i] nums[-i] = nums[(-i-1) % end] nums[(-i-1) % end] = temp
class Solution: def rotate(self, nums, k): start = end = len(nums) if k >= start: k = k % start if k == 0: return x = 1 while k > 0: k -= 1 for i in range(1, end): temp = nums[-i] nums[-i] = nums[(-i - 1) % end] nums[(-i - 1) % end] = temp
ACCESS_DENIED = "access_denied" INVALID_CLIENT = "invalid_client" INVALID_GRANT = "invalid_grant" INVALID_REQUEST = "invalid_request" INVALID_SCOPE = "invalid_scope" INVALID_STATE = "invalid_state" INVALID_RESPONSE = "invalid_response" SERVER_ERROR = "server_error" TEMPORARILY_UNAVAILABLE = "temporarily_unavailable" UNAUTHORIZED_CLIENT = "unauthorized_client" UNSUPPORTED_GRANT_TYPE = "unsupported_grant_type" UNSUPPORTED_RESPONSE_TYPE = "unsupported_response_type" DESCRIPTIONS: dict[str, str] = { INVALID_REQUEST: ( "The request is missing a required parameter, includes an invalid " "parameter value, includes a parameter more than once, or is " "otherwise malformed." ), INVALID_CLIENT: ( "Client authentication failed (e.g., unknown client, no client " "authentication included, or unsupported authentication method)." ), INVALID_GRANT: ( "The provided authorization grant or refresh token is invalid, " "expired or revoked." ), UNAUTHORIZED_CLIENT: ("The client is not authorized to perform this action."), ACCESS_DENIED: ("The resource owner or authorization server denied the request."), UNSUPPORTED_RESPONSE_TYPE: ( "The authorization server does not support obtaining an authorization " "code using this method." ), UNSUPPORTED_GRANT_TYPE: ( "The authorization grant type is not supported by the authorization " "server." ), INVALID_SCOPE: ("The requested scope is invalid, unknown, or malformed."), SERVER_ERROR: ( "The server encountered an unexpected condition that prevented it " "from fulfilling the request." ), TEMPORARILY_UNAVAILABLE: ( "The server is currently unable to handle the request due to a " "temporary overloading or maintenance of the server." ), }
access_denied = 'access_denied' invalid_client = 'invalid_client' invalid_grant = 'invalid_grant' invalid_request = 'invalid_request' invalid_scope = 'invalid_scope' invalid_state = 'invalid_state' invalid_response = 'invalid_response' server_error = 'server_error' temporarily_unavailable = 'temporarily_unavailable' unauthorized_client = 'unauthorized_client' unsupported_grant_type = 'unsupported_grant_type' unsupported_response_type = 'unsupported_response_type' descriptions: dict[str, str] = {INVALID_REQUEST: 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.', INVALID_CLIENT: 'Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method).', INVALID_GRANT: 'The provided authorization grant or refresh token is invalid, expired or revoked.', UNAUTHORIZED_CLIENT: 'The client is not authorized to perform this action.', ACCESS_DENIED: 'The resource owner or authorization server denied the request.', UNSUPPORTED_RESPONSE_TYPE: 'The authorization server does not support obtaining an authorization code using this method.', UNSUPPORTED_GRANT_TYPE: 'The authorization grant type is not supported by the authorization server.', INVALID_SCOPE: 'The requested scope is invalid, unknown, or malformed.', SERVER_ERROR: 'The server encountered an unexpected condition that prevented it from fulfilling the request.', TEMPORARILY_UNAVAILABLE: 'The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.'}
def sum(n): return n * (n + 1) // 2 print(sum(46341))
def sum(n): return n * (n + 1) // 2 print(sum(46341))
pessoas = {'nome':'Gilson', 'Idade':55, 'Sexo': 'M'} print(pessoas) print(pessoas['nome']) print(pessoas['Idade']) print(f'{pessoas["nome"]}') print(pessoas.keys()) print(pessoas.values()) print(pessoas.items()) for k in pessoas.values(): print(k) for k ,v in pessoas.items(): print(f'{k} = {v}') brasil = [] estado1 = {'UF':'Rio de Janeiro', 'SIGLA' : 'RJ'} estado2 = {'UF':'PERNAMBUCO', 'SIGLA':'PE'} brasil.append(estado1) brasil.append(estado2) print(brasil) print(estado2) estado3 = dict() brasil1 = list() for c in range(0, 3): estado3['UF'] = str(input('Estado: ')) estado3['SIGLA'] = str(input('SIGLA: ')) brasil1.append(estado3.copy()) print(brasil1)
pessoas = {'nome': 'Gilson', 'Idade': 55, 'Sexo': 'M'} print(pessoas) print(pessoas['nome']) print(pessoas['Idade']) print(f"{pessoas['nome']}") print(pessoas.keys()) print(pessoas.values()) print(pessoas.items()) for k in pessoas.values(): print(k) for (k, v) in pessoas.items(): print(f'{k} = {v}') brasil = [] estado1 = {'UF': 'Rio de Janeiro', 'SIGLA': 'RJ'} estado2 = {'UF': 'PERNAMBUCO', 'SIGLA': 'PE'} brasil.append(estado1) brasil.append(estado2) print(brasil) print(estado2) estado3 = dict() brasil1 = list() for c in range(0, 3): estado3['UF'] = str(input('Estado: ')) estado3['SIGLA'] = str(input('SIGLA: ')) brasil1.append(estado3.copy()) print(brasil1)
# simple inheritance # base class class student: def __init__(self, name, age): self.name = name self.age = age def getdata(self): self.name = input('enter name') self.age = input('enter age') def putdata(self): print(self.name, self.age) # Derived class or sub class class scienceStudent(student): def science(self): print('this is a science method') obstudent = scienceStudent("amar", "12") obstudent.getdata() # Accessible obstudent.putdata() # Accessible obstudent.science() # Multiple inheritance # class c(a,b) where a,b are base class # Multilevel inheritance # class b(a): a-base class, b-derived class # class c(b): b-base class, c-derived class
class Student: def __init__(self, name, age): self.name = name self.age = age def getdata(self): self.name = input('enter name') self.age = input('enter age') def putdata(self): print(self.name, self.age) class Sciencestudent(student): def science(self): print('this is a science method') obstudent = science_student('amar', '12') obstudent.getdata() obstudent.putdata() obstudent.science()
#!/user/bin/env python '''rWork.py: This filter returns True if the r_work value for this structure is within the specified range ''' __author__ = "Mars (Shih-Cheng) Huang" __maintainer__ = "Mars (Shih-Cheng) Huang" __email__ = "marshuang80@gmail.com" __version__ = "0.2.0" __status__ = "Done" class RWork(object): '''This filter returns True if the rWork value for this structure is within the specified range. Attributes ---------- min_Rwork : float The lower bound r_work value max_Rwork : float The upper bound r_work value ''' def __init__(self, minRwork, maxRwork): self.min_Rwork = minRwork self.max_Rwork = maxRwork def __call__(self, t): if t[1].r_work == None: return False return t[1].r_work >= self.min_Rwork and t[1].r_work <= self.max_Rwork
"""rWork.py: This filter returns True if the r_work value for this structure is within the specified range """ __author__ = 'Mars (Shih-Cheng) Huang' __maintainer__ = 'Mars (Shih-Cheng) Huang' __email__ = 'marshuang80@gmail.com' __version__ = '0.2.0' __status__ = 'Done' class Rwork(object): """This filter returns True if the rWork value for this structure is within the specified range. Attributes ---------- min_Rwork : float The lower bound r_work value max_Rwork : float The upper bound r_work value """ def __init__(self, minRwork, maxRwork): self.min_Rwork = minRwork self.max_Rwork = maxRwork def __call__(self, t): if t[1].r_work == None: return False return t[1].r_work >= self.min_Rwork and t[1].r_work <= self.max_Rwork
#%% # nums = [-1,2,1,-4] # target = 1 # nums = [0, 1, 2] # target = 0 nums = [1, 1, 1, 0] target = 100 nums = [0, 2, 1, -3, -5] target = 1 def threeSumClosest(nums: list, target: int)->int: nums.sort() ptrLow = 0 ptrHigh = len(nums) - 1 bestEstimate = 10e10 #remember that we are dealing with three numbers while ptrHigh - ptrLow - 1 >= 0: for ind in range(ptrLow+1, ptrHigh): currentValue = nums[ptrLow] + nums[ind] + nums[ptrHigh] print(nums[ptrLow]) print(nums[ind]) print(nums[ptrHigh]) print('-'*10) if abs(target - bestEstimate) > abs(target - currentValue): bestEstimate = currentValue if target - currentValue == 0: return currentValue if bestEstimate < target: ptrLow += 1 else: ptrHigh -= 1 return bestEstimate threeSumClosest(nums, target) # %%
nums = [1, 1, 1, 0] target = 100 nums = [0, 2, 1, -3, -5] target = 1 def three_sum_closest(nums: list, target: int) -> int: nums.sort() ptr_low = 0 ptr_high = len(nums) - 1 best_estimate = 100000000000.0 while ptrHigh - ptrLow - 1 >= 0: for ind in range(ptrLow + 1, ptrHigh): current_value = nums[ptrLow] + nums[ind] + nums[ptrHigh] print(nums[ptrLow]) print(nums[ind]) print(nums[ptrHigh]) print('-' * 10) if abs(target - bestEstimate) > abs(target - currentValue): best_estimate = currentValue if target - currentValue == 0: return currentValue if bestEstimate < target: ptr_low += 1 else: ptr_high -= 1 return bestEstimate three_sum_closest(nums, target)
""" None """ class Solution: def isOneEditDistance(self, s: str, t: str) -> bool: if abs(len(s) - len(t)) > 1: return False if len(s) < len(t): s, t = t, s i, j = 0, 0 seen_change = False while i < len(s) and j < len(t): if s[i] != t[j]: if seen_change: return False seen_change = True if len(s) > len(t): i += 1 else: i += 1 j += 1 else: i += 1 j += 1 if i != len(s) or j != len(t): if not seen_change: seen_change = True else: return False return seen_change
""" None """ class Solution: def is_one_edit_distance(self, s: str, t: str) -> bool: if abs(len(s) - len(t)) > 1: return False if len(s) < len(t): (s, t) = (t, s) (i, j) = (0, 0) seen_change = False while i < len(s) and j < len(t): if s[i] != t[j]: if seen_change: return False seen_change = True if len(s) > len(t): i += 1 else: i += 1 j += 1 else: i += 1 j += 1 if i != len(s) or j != len(t): if not seen_change: seen_change = True else: return False return seen_change
# md5 : 696999570c6da88ed87e96e1014f4fd0 # sha1 : bbf782f04e4b5dafbfe1afef6b08ab08a1777852 # sha256 : 8d6c894aeb73da24ba8c8af002f7299211c23a616cccf18443c6f38b43c33b3e ord_names = { 102: b'ChooseColorA', 103: b'ChooseColorW', 104: b'ChooseFontA', 105: b'ChooseFontW', 106: b'CommDlgExtendedError', 107: b'DllCanUnloadNow', 108: b'DllGetClassObject', 109: b'FindTextA', 110: b'FindTextW', 111: b'GetFileTitleA', 112: b'GetFileTitleW', 113: b'GetOpenFileNameA', 114: b'GetOpenFileNameW', 115: b'GetSaveFileNameA', 116: b'GetSaveFileNameW', 117: b'LoadAlterBitmap', 118: b'PageSetupDlgA', 119: b'PageSetupDlgW', 120: b'PrintDlgA', 121: b'PrintDlgExA', 122: b'PrintDlgExW', 123: b'PrintDlgW', 124: b'ReplaceTextA', 125: b'ReplaceTextW', 126: b'Ssync_ANSI_UNICODE_Struct_For_WOW', 127: b'WantArrows', 128: b'dwLBSubclass', 129: b'dwOKSubclass', }
ord_names = {102: b'ChooseColorA', 103: b'ChooseColorW', 104: b'ChooseFontA', 105: b'ChooseFontW', 106: b'CommDlgExtendedError', 107: b'DllCanUnloadNow', 108: b'DllGetClassObject', 109: b'FindTextA', 110: b'FindTextW', 111: b'GetFileTitleA', 112: b'GetFileTitleW', 113: b'GetOpenFileNameA', 114: b'GetOpenFileNameW', 115: b'GetSaveFileNameA', 116: b'GetSaveFileNameW', 117: b'LoadAlterBitmap', 118: b'PageSetupDlgA', 119: b'PageSetupDlgW', 120: b'PrintDlgA', 121: b'PrintDlgExA', 122: b'PrintDlgExW', 123: b'PrintDlgW', 124: b'ReplaceTextA', 125: b'ReplaceTextW', 126: b'Ssync_ANSI_UNICODE_Struct_For_WOW', 127: b'WantArrows', 128: b'dwLBSubclass', 129: b'dwOKSubclass'}
# Copyright 2014 The Bazel Authors. All rights reserved. # # 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. load("@io_bazel_rules_go//go/private:common.bzl", "get_go_toolchain", "DEFAULT_LIB", "VENDOR_PREFIX", "go_filetype") load("@io_bazel_rules_go//go/private:asm.bzl", "emit_go_asm_action") load("@io_bazel_rules_go//go/private:providers.bzl", "GoLibrary", "GoSource") def emit_library_actions(ctx, sources, deps, cgo_object, library, want_coverage): go_toolchain = get_go_toolchain(ctx) go_srcs = depset([s for s in sources if s.basename.endswith('.go')]) asm_srcs = [s for s in sources if s.basename.endswith('.s') or s.basename.endswith('.S')] asm_hdrs = [s for s in sources if s.basename.endswith('.h')] dep_runfiles = [d.data_runfiles for d in deps] if library: golib = library[GoLibrary] gosrc = library[GoSource] go_srcs += gosrc.go_sources asm_srcs += gosrc.asm_sources asm_hdrs += gosrc.asm_headers deps += golib.direct_deps dep_runfiles += [library.data_runfiles] if golib.cgo_object: if cgo_object: fail("go_library %s cannot have cgo_object because the package " + "already has cgo_object in %s" % (ctx.label.name, golib.name)) cgo_object = golib.cgo_object if not go_srcs: fail("may not be empty", "srcs") transitive_cgo_deps = depset([], order="link") if cgo_object: dep_runfiles += [cgo_object.data_runfiles] transitive_cgo_deps += cgo_object.cgo_deps extra_objects = [cgo_object.cgo_obj] if cgo_object else [] for src in asm_srcs: obj = ctx.new_file(src, "%s.dir/%s.o" % (ctx.label.name, src.basename[:-2])) emit_go_asm_action(ctx, src, asm_hdrs, obj) extra_objects += [obj] importpath = go_importpath(ctx) lib_name = importpath + ".a" out_lib = ctx.new_file("~lib~/"+lib_name) out_object = ctx.new_file("~lib~/" + ctx.label.name + ".o") searchpath = out_lib.path[:-len(lib_name)] race_lib = ctx.new_file("~race~/"+lib_name) race_object = ctx.new_file("~race~/" + ctx.label.name + ".o") searchpath_race = race_lib.path[:-len(lib_name)] gc_goopts = get_gc_goopts(ctx) direct_go_library_deps = [] direct_go_library_deps_race = [] direct_search_paths = [] direct_search_paths_race = [] direct_import_paths = [] transitive_go_library_deps = depset() transitive_go_library_deps_race = depset() transitive_go_library_paths = depset([searchpath]) transitive_go_library_paths_race = depset([searchpath_race]) for dep in deps: golib = dep[GoLibrary] direct_go_library_deps += [golib.library] direct_go_library_deps_race += [golib.race] direct_search_paths += [golib.searchpath] direct_search_paths_race += [golib.searchpath_race] direct_import_paths += [golib.importpath] transitive_go_library_deps += golib.transitive_go_libraries transitive_go_library_deps_race += golib.transitive_go_libraries_race transitive_cgo_deps += golib.transitive_cgo_deps transitive_go_library_paths += golib.transitive_go_library_paths transitive_go_library_paths_race += golib.transitive_go_library_paths_race if want_coverage: go_srcs = _emit_go_cover_action(ctx, out_object, go_srcs) emit_go_compile_action(ctx, sources = go_srcs, libs = direct_go_library_deps, lib_paths = direct_search_paths, direct_paths = direct_import_paths, out_object = out_object, gc_goopts = gc_goopts, ) emit_go_pack_action(ctx, out_lib, [out_object] + extra_objects) emit_go_compile_action(ctx, sources = go_srcs, libs = direct_go_library_deps_race, lib_paths = direct_search_paths_race, direct_paths = direct_import_paths, out_object = race_object, gc_goopts = gc_goopts + ["-race"], ) emit_go_pack_action(ctx, race_lib, [race_object] + extra_objects) dylibs = [] if cgo_object: dylibs += [d for d in cgo_object.cgo_deps if d.path.endswith(".so")] runfiles = ctx.runfiles(files = dylibs, collect_data = True) for d in dep_runfiles: runfiles = runfiles.merge(d) return struct( label = ctx.label, files = depset([out_lib]), library = out_lib, race = race_lib, searchpath = searchpath, searchpath_race = searchpath_race, runfiles = runfiles, go_sources = go_srcs, asm_sources = asm_srcs, asm_headers = asm_hdrs, importpath = importpath, cgo_object = cgo_object, direct_deps = deps, transitive_cgo_deps = transitive_cgo_deps, transitive_go_libraries = transitive_go_library_deps + [out_lib], transitive_go_libraries_race = transitive_go_library_deps_race + [race_lib], transitive_go_library_paths = transitive_go_library_paths, transitive_go_library_paths_race = transitive_go_library_paths_race, gc_goopts = gc_goopts, ) def _go_library_impl(ctx): """Implements the go_library() rule.""" cgo_object = None if hasattr(ctx.attr, "cgo_object"): cgo_object = ctx.attr.cgo_object lib_result = emit_library_actions(ctx, sources = depset(ctx.files.srcs), deps = ctx.attr.deps, cgo_object = cgo_object, library = ctx.attr.library, want_coverage = ctx.coverage_instrumented(), ) return [ GoLibrary( label = ctx.label, library = lib_result.library, race = lib_result.race, searchpath = lib_result.searchpath, searchpath_race = lib_result.searchpath_race, importpath = lib_result.importpath, cgo_object = lib_result.cgo_object, direct_deps = lib_result.direct_deps, transitive_cgo_deps = lib_result.transitive_cgo_deps, transitive_go_libraries = lib_result.transitive_go_libraries, transitive_go_libraries_race = lib_result.transitive_go_libraries_race, transitive_go_library_paths = lib_result.transitive_go_library_paths, transitive_go_library_paths_race = lib_result.transitive_go_library_paths_race, gc_goopts = lib_result.gc_goopts, ), GoSource( go_sources = lib_result.go_sources, asm_sources = lib_result.asm_sources, asm_headers = lib_result.asm_headers, ), DefaultInfo( files = lib_result.files, runfiles = lib_result.runfiles, ), OutputGroupInfo( race = depset([lib_result.race]), ), ] go_library = rule( _go_library_impl, attrs = { "data": attr.label_list(allow_files = True, cfg = "data"), "srcs": attr.label_list(allow_files = go_filetype), "deps": attr.label_list(providers = [GoLibrary]), "importpath": attr.string(), "library": attr.label(providers = [GoLibrary]), "gc_goopts": attr.string_list(), "cgo_object": attr.label( providers = [ "cgo_obj", "cgo_deps", ], ), #TODO(toolchains): Remove _toolchain attribute when real toolchains arrive "_go_toolchain": attr.label(default = Label("@io_bazel_rules_go_toolchain//:go_toolchain")), "_go_prefix": attr.label(default=Label("//:go_prefix", relative_to_caller_repository = True)), }, fragments = ["cpp"], ) def go_importpath(ctx): """Returns the expected importpath of the go_library being built. Args: ctx: The skylark Context Returns: Go importpath of the library """ path = ctx.attr.importpath if path != "": return path path = ctx.attr._go_prefix.go_prefix if path.endswith("/"): path = path[:-1] if ctx.label.package: path += "/" + ctx.label.package if ctx.label.name != DEFAULT_LIB: path += "/" + ctx.label.name if path.rfind(VENDOR_PREFIX) != -1: path = path[len(VENDOR_PREFIX) + path.rfind(VENDOR_PREFIX):] if path[0] == "/": path = path[1:] return path def get_gc_goopts(ctx): gc_goopts = ctx.attr.gc_goopts if ctx.attr.library: gc_goopts += ctx.attr.library[GoLibrary].gc_goopts return gc_goopts def emit_go_compile_action(ctx, sources, libs, lib_paths, direct_paths, out_object, gc_goopts): """Construct the command line for compiling Go code. Args: ctx: The skylark Context. sources: an iterable of source code artifacts (or CTs? or labels?) libs: a depset of representing all imported libraries. lib_paths: the set of paths to search for imported libraries. direct_paths: iterable of of import paths for the package's direct deps, including those in the library attribute. Used for strict dep checking. out_object: the object file that should be produced gc_goopts: additional flags to pass to the compiler. """ go_toolchain = get_go_toolchain(ctx) gc_goopts = [ctx.expand_make_variables("gc_goopts", f, {}) for f in gc_goopts] inputs = depset([go_toolchain.go]) + sources + libs go_sources = [s.path for s in sources if not s.basename.startswith("_cgo")] cgo_sources = [s.path for s in sources if s.basename.startswith("_cgo")] args = [go_toolchain.go.path] for src in go_sources: args += ["-src", src] for dep in direct_paths: args += ["-dep", dep] args += ["-o", out_object.path, "-trimpath", ".", "-I", "."] for path in lib_paths: args += ["-I", path] args += ["--"] + gc_goopts + cgo_sources ctx.action( inputs = list(inputs), outputs = [out_object], mnemonic = "GoCompile", executable = go_toolchain.compile, arguments = args, env = go_toolchain.env, ) def emit_go_pack_action(ctx, out_lib, objects): """Construct the command line for packing objects together. Args: ctx: The skylark Context. out_lib: the archive that should be produced objects: an iterable of object files to be added to the output archive file. """ go_toolchain = get_go_toolchain(ctx) ctx.action( inputs = objects + go_toolchain.tools, outputs = [out_lib], mnemonic = "GoPack", executable = go_toolchain.go, arguments = ["tool", "pack", "c", out_lib.path] + [a.path for a in objects], env = go_toolchain.env, ) def _emit_go_cover_action(ctx, out_object, sources): """Construct the command line for test coverage instrument. Args: ctx: The skylark Context. out_object: the object file for the library being compiled. Used to name cover files. sources: an iterable of Go source files. Returns: A list of Go source code files which might be coverage instrumented. """ go_toolchain = get_go_toolchain(ctx) outputs = [] # TODO(linuxerwang): make the mode configurable. count = 0 for src in sources: if (not src.basename.endswith(".go") or src.basename.endswith("_test.go") or src.basename.endswith(".cover.go")): outputs += [src] continue cover_var = "GoCover_%d" % count out = ctx.new_file(out_object, out_object.basename + '_' + src.basename[:-3] + '_' + cover_var + '.cover.go') outputs += [out] ctx.action( inputs = [src] + go_toolchain.tools, outputs = [out], mnemonic = "GoCover", executable = go_toolchain.go, arguments = ["tool", "cover", "--mode=set", "-var=%s" % cover_var, "-o", out.path, src.path], env = go_toolchain.env, ) count += 1 return outputs
load('@io_bazel_rules_go//go/private:common.bzl', 'get_go_toolchain', 'DEFAULT_LIB', 'VENDOR_PREFIX', 'go_filetype') load('@io_bazel_rules_go//go/private:asm.bzl', 'emit_go_asm_action') load('@io_bazel_rules_go//go/private:providers.bzl', 'GoLibrary', 'GoSource') def emit_library_actions(ctx, sources, deps, cgo_object, library, want_coverage): go_toolchain = get_go_toolchain(ctx) go_srcs = depset([s for s in sources if s.basename.endswith('.go')]) asm_srcs = [s for s in sources if s.basename.endswith('.s') or s.basename.endswith('.S')] asm_hdrs = [s for s in sources if s.basename.endswith('.h')] dep_runfiles = [d.data_runfiles for d in deps] if library: golib = library[GoLibrary] gosrc = library[GoSource] go_srcs += gosrc.go_sources asm_srcs += gosrc.asm_sources asm_hdrs += gosrc.asm_headers deps += golib.direct_deps dep_runfiles += [library.data_runfiles] if golib.cgo_object: if cgo_object: fail('go_library %s cannot have cgo_object because the package ' + 'already has cgo_object in %s' % (ctx.label.name, golib.name)) cgo_object = golib.cgo_object if not go_srcs: fail('may not be empty', 'srcs') transitive_cgo_deps = depset([], order='link') if cgo_object: dep_runfiles += [cgo_object.data_runfiles] transitive_cgo_deps += cgo_object.cgo_deps extra_objects = [cgo_object.cgo_obj] if cgo_object else [] for src in asm_srcs: obj = ctx.new_file(src, '%s.dir/%s.o' % (ctx.label.name, src.basename[:-2])) emit_go_asm_action(ctx, src, asm_hdrs, obj) extra_objects += [obj] importpath = go_importpath(ctx) lib_name = importpath + '.a' out_lib = ctx.new_file('~lib~/' + lib_name) out_object = ctx.new_file('~lib~/' + ctx.label.name + '.o') searchpath = out_lib.path[:-len(lib_name)] race_lib = ctx.new_file('~race~/' + lib_name) race_object = ctx.new_file('~race~/' + ctx.label.name + '.o') searchpath_race = race_lib.path[:-len(lib_name)] gc_goopts = get_gc_goopts(ctx) direct_go_library_deps = [] direct_go_library_deps_race = [] direct_search_paths = [] direct_search_paths_race = [] direct_import_paths = [] transitive_go_library_deps = depset() transitive_go_library_deps_race = depset() transitive_go_library_paths = depset([searchpath]) transitive_go_library_paths_race = depset([searchpath_race]) for dep in deps: golib = dep[GoLibrary] direct_go_library_deps += [golib.library] direct_go_library_deps_race += [golib.race] direct_search_paths += [golib.searchpath] direct_search_paths_race += [golib.searchpath_race] direct_import_paths += [golib.importpath] transitive_go_library_deps += golib.transitive_go_libraries transitive_go_library_deps_race += golib.transitive_go_libraries_race transitive_cgo_deps += golib.transitive_cgo_deps transitive_go_library_paths += golib.transitive_go_library_paths transitive_go_library_paths_race += golib.transitive_go_library_paths_race if want_coverage: go_srcs = _emit_go_cover_action(ctx, out_object, go_srcs) emit_go_compile_action(ctx, sources=go_srcs, libs=direct_go_library_deps, lib_paths=direct_search_paths, direct_paths=direct_import_paths, out_object=out_object, gc_goopts=gc_goopts) emit_go_pack_action(ctx, out_lib, [out_object] + extra_objects) emit_go_compile_action(ctx, sources=go_srcs, libs=direct_go_library_deps_race, lib_paths=direct_search_paths_race, direct_paths=direct_import_paths, out_object=race_object, gc_goopts=gc_goopts + ['-race']) emit_go_pack_action(ctx, race_lib, [race_object] + extra_objects) dylibs = [] if cgo_object: dylibs += [d for d in cgo_object.cgo_deps if d.path.endswith('.so')] runfiles = ctx.runfiles(files=dylibs, collect_data=True) for d in dep_runfiles: runfiles = runfiles.merge(d) return struct(label=ctx.label, files=depset([out_lib]), library=out_lib, race=race_lib, searchpath=searchpath, searchpath_race=searchpath_race, runfiles=runfiles, go_sources=go_srcs, asm_sources=asm_srcs, asm_headers=asm_hdrs, importpath=importpath, cgo_object=cgo_object, direct_deps=deps, transitive_cgo_deps=transitive_cgo_deps, transitive_go_libraries=transitive_go_library_deps + [out_lib], transitive_go_libraries_race=transitive_go_library_deps_race + [race_lib], transitive_go_library_paths=transitive_go_library_paths, transitive_go_library_paths_race=transitive_go_library_paths_race, gc_goopts=gc_goopts) def _go_library_impl(ctx): """Implements the go_library() rule.""" cgo_object = None if hasattr(ctx.attr, 'cgo_object'): cgo_object = ctx.attr.cgo_object lib_result = emit_library_actions(ctx, sources=depset(ctx.files.srcs), deps=ctx.attr.deps, cgo_object=cgo_object, library=ctx.attr.library, want_coverage=ctx.coverage_instrumented()) return [go_library(label=ctx.label, library=lib_result.library, race=lib_result.race, searchpath=lib_result.searchpath, searchpath_race=lib_result.searchpath_race, importpath=lib_result.importpath, cgo_object=lib_result.cgo_object, direct_deps=lib_result.direct_deps, transitive_cgo_deps=lib_result.transitive_cgo_deps, transitive_go_libraries=lib_result.transitive_go_libraries, transitive_go_libraries_race=lib_result.transitive_go_libraries_race, transitive_go_library_paths=lib_result.transitive_go_library_paths, transitive_go_library_paths_race=lib_result.transitive_go_library_paths_race, gc_goopts=lib_result.gc_goopts), go_source(go_sources=lib_result.go_sources, asm_sources=lib_result.asm_sources, asm_headers=lib_result.asm_headers), default_info(files=lib_result.files, runfiles=lib_result.runfiles), output_group_info(race=depset([lib_result.race]))] go_library = rule(_go_library_impl, attrs={'data': attr.label_list(allow_files=True, cfg='data'), 'srcs': attr.label_list(allow_files=go_filetype), 'deps': attr.label_list(providers=[GoLibrary]), 'importpath': attr.string(), 'library': attr.label(providers=[GoLibrary]), 'gc_goopts': attr.string_list(), 'cgo_object': attr.label(providers=['cgo_obj', 'cgo_deps']), '_go_toolchain': attr.label(default=label('@io_bazel_rules_go_toolchain//:go_toolchain')), '_go_prefix': attr.label(default=label('//:go_prefix', relative_to_caller_repository=True))}, fragments=['cpp']) def go_importpath(ctx): """Returns the expected importpath of the go_library being built. Args: ctx: The skylark Context Returns: Go importpath of the library """ path = ctx.attr.importpath if path != '': return path path = ctx.attr._go_prefix.go_prefix if path.endswith('/'): path = path[:-1] if ctx.label.package: path += '/' + ctx.label.package if ctx.label.name != DEFAULT_LIB: path += '/' + ctx.label.name if path.rfind(VENDOR_PREFIX) != -1: path = path[len(VENDOR_PREFIX) + path.rfind(VENDOR_PREFIX):] if path[0] == '/': path = path[1:] return path def get_gc_goopts(ctx): gc_goopts = ctx.attr.gc_goopts if ctx.attr.library: gc_goopts += ctx.attr.library[GoLibrary].gc_goopts return gc_goopts def emit_go_compile_action(ctx, sources, libs, lib_paths, direct_paths, out_object, gc_goopts): """Construct the command line for compiling Go code. Args: ctx: The skylark Context. sources: an iterable of source code artifacts (or CTs? or labels?) libs: a depset of representing all imported libraries. lib_paths: the set of paths to search for imported libraries. direct_paths: iterable of of import paths for the package's direct deps, including those in the library attribute. Used for strict dep checking. out_object: the object file that should be produced gc_goopts: additional flags to pass to the compiler. """ go_toolchain = get_go_toolchain(ctx) gc_goopts = [ctx.expand_make_variables('gc_goopts', f, {}) for f in gc_goopts] inputs = depset([go_toolchain.go]) + sources + libs go_sources = [s.path for s in sources if not s.basename.startswith('_cgo')] cgo_sources = [s.path for s in sources if s.basename.startswith('_cgo')] args = [go_toolchain.go.path] for src in go_sources: args += ['-src', src] for dep in direct_paths: args += ['-dep', dep] args += ['-o', out_object.path, '-trimpath', '.', '-I', '.'] for path in lib_paths: args += ['-I', path] args += ['--'] + gc_goopts + cgo_sources ctx.action(inputs=list(inputs), outputs=[out_object], mnemonic='GoCompile', executable=go_toolchain.compile, arguments=args, env=go_toolchain.env) def emit_go_pack_action(ctx, out_lib, objects): """Construct the command line for packing objects together. Args: ctx: The skylark Context. out_lib: the archive that should be produced objects: an iterable of object files to be added to the output archive file. """ go_toolchain = get_go_toolchain(ctx) ctx.action(inputs=objects + go_toolchain.tools, outputs=[out_lib], mnemonic='GoPack', executable=go_toolchain.go, arguments=['tool', 'pack', 'c', out_lib.path] + [a.path for a in objects], env=go_toolchain.env) def _emit_go_cover_action(ctx, out_object, sources): """Construct the command line for test coverage instrument. Args: ctx: The skylark Context. out_object: the object file for the library being compiled. Used to name cover files. sources: an iterable of Go source files. Returns: A list of Go source code files which might be coverage instrumented. """ go_toolchain = get_go_toolchain(ctx) outputs = [] count = 0 for src in sources: if not src.basename.endswith('.go') or src.basename.endswith('_test.go') or src.basename.endswith('.cover.go'): outputs += [src] continue cover_var = 'GoCover_%d' % count out = ctx.new_file(out_object, out_object.basename + '_' + src.basename[:-3] + '_' + cover_var + '.cover.go') outputs += [out] ctx.action(inputs=[src] + go_toolchain.tools, outputs=[out], mnemonic='GoCover', executable=go_toolchain.go, arguments=['tool', 'cover', '--mode=set', '-var=%s' % cover_var, '-o', out.path, src.path], env=go_toolchain.env) count += 1 return outputs
first = int(input()) i = 0 list = [] outputval = 0 if(first>0 and first<11): while(i<first): i+=1 f, s = map(int, input().split()) list.append(int(s/f)) if (min(list)<0): print(0) else: print(min(list))
first = int(input()) i = 0 list = [] outputval = 0 if first > 0 and first < 11: while i < first: i += 1 (f, s) = map(int, input().split()) list.append(int(s / f)) if min(list) < 0: print(0) else: print(min(list))
# Simple recursion program in python def fun(n): """ This method prints the number in reverse order n to 1""" if n==0: return print(n) fun(n-1) if __name__ == '__main__': n = int(input("Enter Number:")) fun(n)
def fun(n): """ This method prints the number in reverse order n to 1""" if n == 0: return print(n) fun(n - 1) if __name__ == '__main__': n = int(input('Enter Number:')) fun(n)
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. class TableProperties(object): COMMIT_NUM_RETRIES = "commit.retry.num-retries" COMMIT_NUM_RETRIES_DEFAULT = 4 COMMIT_MIN_RETRY_WAIT_MS = "commit.retry.min-wait-ms" COMMIT_MIN_RETRY_WAIT_MS_DEFAULT = 100 COMMIT_MAX_RETRY_WAIT_MS = "commit.retry.max-wait-ms" COMMIT_MAX_RETRY_WAIT_MS_DEFAULT = 60000 COMMIT_TOTAL_RETRY_TIME_MS = "commit.retry.total-timeout-ms" COMMIT_TOTAL_RETRY_TIME_MS_DEFAULT = 1800000 MANIFEST_TARGET_SIZE_BYTES = "commit.manifest.target-size-bytes" MANIFEST_TARGET_SIZE_BYTES_DEFAULT = 8388608 MANIFEST_MIN_MERGE_COUNT = "commit.manifest.min-count-to-merge" MANIFEST_MIN_MERGE_COUNT_DEFAULT = 100 DEFAULT_FILE_FORMAT = "write.format.default" DEFAULT_FILE_FORMAT_DEFAULT = "parquet" PARQUET_ROW_GROUP_SIZE_BYTES = "write.parquet.row-group-size-bytes" PARQUET_ROW_GROUP_SIZE_BYTES_DEFAULT = "134217728" PARQUET_PAGE_SIZE_BYTES = "write.parquet.page-size-bytes" PARQUET_PAGE_SIZE_BYTES_DEFAULT = "1048576" PARQUET_DICT_SIZE_BYTES = "write.parquet.dict-size-bytes" PARQUET_DICT_SIZE_BYTES_DEFAULT = "2097152" PARQUET_COMPRESSION = "write.parquet.compression-codec" PARQUET_COMPRESSION_DEFAULT = "gzip" AVRO_COMPRESSION = "write.avro.compression-codec" AVRO_COMPRESSION_DEFAULT = "gzip" SPLIT_SIZE = "read.split.target-size" SPLIT_SIZE_DEFAULT = 134217728 SPLIT_LOOKBACK = "read.split.planning-lookback" SPLIT_LOOKBACK_DEFAULT = 10 SPLIT_OPEN_FILE_COST = "read.split.open-file-cost" SPLIT_OPEN_FILE_COST_DEFAULT = 4 * 1024 * 1024 OBJECT_STORE_ENABLED = "write.object-storage.enabled" OBJECT_STORE_ENABLED_DEFAULT = False OBJECT_STORE_PATH = "write.object-storage.path" WRITE_LOCATION_PROVIDER_IMPL = "write.location-provider.impl" WRITE_NEW_DATA_LOCATION = "write.folder-storage.path" WRITE_METADATA_LOCATION = "write.metadata.path" MANIFEST_LISTS_ENABLED = "write.manifest-lists.enabled" MANIFEST_LISTS_ENABLED_DEFAULT = True
class Tableproperties(object): commit_num_retries = 'commit.retry.num-retries' commit_num_retries_default = 4 commit_min_retry_wait_ms = 'commit.retry.min-wait-ms' commit_min_retry_wait_ms_default = 100 commit_max_retry_wait_ms = 'commit.retry.max-wait-ms' commit_max_retry_wait_ms_default = 60000 commit_total_retry_time_ms = 'commit.retry.total-timeout-ms' commit_total_retry_time_ms_default = 1800000 manifest_target_size_bytes = 'commit.manifest.target-size-bytes' manifest_target_size_bytes_default = 8388608 manifest_min_merge_count = 'commit.manifest.min-count-to-merge' manifest_min_merge_count_default = 100 default_file_format = 'write.format.default' default_file_format_default = 'parquet' parquet_row_group_size_bytes = 'write.parquet.row-group-size-bytes' parquet_row_group_size_bytes_default = '134217728' parquet_page_size_bytes = 'write.parquet.page-size-bytes' parquet_page_size_bytes_default = '1048576' parquet_dict_size_bytes = 'write.parquet.dict-size-bytes' parquet_dict_size_bytes_default = '2097152' parquet_compression = 'write.parquet.compression-codec' parquet_compression_default = 'gzip' avro_compression = 'write.avro.compression-codec' avro_compression_default = 'gzip' split_size = 'read.split.target-size' split_size_default = 134217728 split_lookback = 'read.split.planning-lookback' split_lookback_default = 10 split_open_file_cost = 'read.split.open-file-cost' split_open_file_cost_default = 4 * 1024 * 1024 object_store_enabled = 'write.object-storage.enabled' object_store_enabled_default = False object_store_path = 'write.object-storage.path' write_location_provider_impl = 'write.location-provider.impl' write_new_data_location = 'write.folder-storage.path' write_metadata_location = 'write.metadata.path' manifest_lists_enabled = 'write.manifest-lists.enabled' manifest_lists_enabled_default = True
#!/usr/bin/env python # encoding: utf-8 ''' #-------------------------------------------------------------------# # CONFIDENTIAL --- CUSTOM STUDIOS # #-------------------------------------------------------------------# # # # @Project Name : t5p-mcdtb # # # # @File Name : __init__.py.py # # # # @Programmer : Jeffrey # # # # @Start Date : 2021/4/18 20:24 # # # # @Last Update : 2021/4/18 20:24 # # # #-------------------------------------------------------------------# # Classes: # # # #-------------------------------------------------------------------# '''
""" #-------------------------------------------------------------------# # CONFIDENTIAL --- CUSTOM STUDIOS # #-------------------------------------------------------------------# # # # @Project Name : t5p-mcdtb # # # # @File Name : __init__.py.py # # # # @Programmer : Jeffrey # # # # @Start Date : 2021/4/18 20:24 # # # # @Last Update : 2021/4/18 20:24 # # # #-------------------------------------------------------------------# # Classes: # # # #-------------------------------------------------------------------# """
class Solution: # O(n^2) time | O(1) space - where n is the length of the input array def maxDistance(self, colors: List[int]) -> int: maxDist = 0 for i in range(len(colors)): for j in range(i, len(colors)): if colors[i] != colors[j]: maxDist = max(maxDist, j - i) return maxDist
class Solution: def max_distance(self, colors: List[int]) -> int: max_dist = 0 for i in range(len(colors)): for j in range(i, len(colors)): if colors[i] != colors[j]: max_dist = max(maxDist, j - i) return maxDist
''' @File : init.py @Author : Zehong Ma @Version : 1.0 @Contact : zehongma@qq.com @Desc : None '''
""" @File : init.py @Author : Zehong Ma @Version : 1.0 @Contact : zehongma@qq.com @Desc : None """
# https://www.codechef.com/LTIME98C/problems/REDALERT for T in range(int(input())): n,d,h=map(int,input().split()) l,check=list(map(int,input().split())),0 for i in l: if(i==0): if(check<d): check=0 else: check-=d continue check+=i if(check>h): print("YES") break else: print("NO")
for t in range(int(input())): (n, d, h) = map(int, input().split()) (l, check) = (list(map(int, input().split())), 0) for i in l: if i == 0: if check < d: check = 0 else: check -= d continue check += i if check > h: print('YES') break else: print('NO')
"""Represent models quotes.""" class QuoteModel: """A quote model that houses the body and author.""" def __init__(self, body, author): """Create a new `QuoteModel`. :param body: The body of the quote model :param author: The author of the quote model """ self.body = body self.author = author def __str__(self): """Return `str(self)`.""" return f'"{self.body}" - {self.author}' def __repr__(self): """Return `repr(self)`, a computer-readable string representation of this object.""" return f"QuoteModel(body={self.body!r}, author={self.author!r})" if __name__ == "__main__": body = "Chase the mailman" author = "Skittle" quote = QuoteModel(body, author)
"""Represent models quotes.""" class Quotemodel: """A quote model that houses the body and author.""" def __init__(self, body, author): """Create a new `QuoteModel`. :param body: The body of the quote model :param author: The author of the quote model """ self.body = body self.author = author def __str__(self): """Return `str(self)`.""" return f'"{self.body}" - {self.author}' def __repr__(self): """Return `repr(self)`, a computer-readable string representation of this object.""" return f'QuoteModel(body={self.body!r}, author={self.author!r})' if __name__ == '__main__': body = 'Chase the mailman' author = 'Skittle' quote = quote_model(body, author)
# print("Hello") # print("Hello") i = 0 while i < 5: print("Hello No.", i) i += 1 print("Always happens once loop is finished") print("i is now", i) i = 10 while i > 0: print("Going down the floor:", i) # i could do more stuff i -= 2 print("Whew we are done with this i:", i) i = 20 while True: print("i is",i) if i > 28: break i += 2 while True: res = input("Enter number or q to quit ") if res == "q": print("No more calculations today") break elif res == "a": # TODO check if if the input is text print("I can't cube a letter a") continue # means we are not going to try to convert "a" to float num = float(res) print(f"My calculator says cube of {num} is {num**3}") print("All done whew!")
i = 0 while i < 5: print('Hello No.', i) i += 1 print('Always happens once loop is finished') print('i is now', i) i = 10 while i > 0: print('Going down the floor:', i) i -= 2 print('Whew we are done with this i:', i) i = 20 while True: print('i is', i) if i > 28: break i += 2 while True: res = input('Enter number or q to quit ') if res == 'q': print('No more calculations today') break elif res == 'a': print("I can't cube a letter a") continue num = float(res) print(f'My calculator says cube of {num} is {num ** 3}') print('All done whew!')
""" categories: Syntax description: Argument unpacking does not work if the argument being unpacked is the nth or greater argument where n is the number of bits in an MP_SMALL_INT. cause: The implementation uses an MP_SMALL_INT to flag args that need to be unpacked. workaround: Use fewer arguments. """ def example(*args): print(len(args)) MORE = ["a", "b", "c"] # fmt: off example( 0, 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, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, *MORE, ) # fmt: on
""" categories: Syntax description: Argument unpacking does not work if the argument being unpacked is the nth or greater argument where n is the number of bits in an MP_SMALL_INT. cause: The implementation uses an MP_SMALL_INT to flag args that need to be unpacked. workaround: Use fewer arguments. """ def example(*args): print(len(args)) more = ['a', 'b', 'c'] example(0, 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, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, *MORE)
# -*- coding: utf-8 -*- class RpcSetPassword: def __init__(self, hashed_password): self.hashed_password = hashed_password def out_rpc_set_password(self, pack): pack.add_value("HashedPassword", self.hashed_password)
class Rpcsetpassword: def __init__(self, hashed_password): self.hashed_password = hashed_password def out_rpc_set_password(self, pack): pack.add_value('HashedPassword', self.hashed_password)
class LinkedList: class _Node: def __init__(self, e=None, node_next=None): self.e = e self.next = node_next def __str__(self): return str(self.e) def __repr__(self): return self.__str__() def __init__(self): self._dummy_head = self._Node() self._size = 0 def get_size(self): return self._size def is_empty(self): return self._size == 0 def add_first(self, e): self.add(0, e) def add_last(self, e): self.add(self._size, e) def add(self, index, e): if index < 0 or index > self._size: raise ValueError('Add failed. Illegal index.') prev = self._dummy_head for i in range(index): prev = prev.next node = self._Node(e) node.next = prev.next prev.next = node self._size += 1 def getter(self, index): if index < 0 or index >= self._size: raise ValueError('Get failed. Illegal index.') curr = self._dummy_head.next for i in range(index): curr = curr.next return curr.e def get_first(self): return self.getter(0) def get_last(self): return self.getter(self._size - 1) def setter(self, index): if index < 0 or index >= self._size: raise ValueError('Set failed. Illegal index.') curr = self._dummy_head.next for i in range(index): curr = curr.next curr.e = e def contains(self, e): curr = self._dummy_head.next while curr: if curr.e == e: return True curr = curr.next return False def remove(self, index): if index < 0 or index >= self._size: raise ValueError('Remove failed. Illegal index.') prev = self._dummy_head for i in range(index): prev = prev.next ret = prev.next prev.next = ret.next ret.next = None self._size -= 1 return ret.e def remove_first(self): return self.remove(0) def remove_last(self): return self.remove(self._size - 1) def __str__(self): curr = self._dummy_head.next data = [] while curr: data.append(str(curr.e)) curr = curr.next return '<chapter_03_LinkedList.linkedlist.LinkedList>: (Head) ' + \ ' -> '.join(data) + ' (Tail)' def __repr__(self): return self.__str__() if __name__ == '__main__': linkedlist = LinkedList() print(linkedlist.get_size()) linkedlist.add_first(1) linkedlist.add_first(2) linkedlist.add_first(4) linkedlist.add_first(5) print(linkedlist.get_size()) print(linkedlist) print(linkedlist.getter(3)) print(linkedlist.get_first()) print(linkedlist.get_last()) print(linkedlist) linkedlist.remove(2) linkedlist.remove_first() linkedlist.remove_last() print(linkedlist)
class Linkedlist: class _Node: def __init__(self, e=None, node_next=None): self.e = e self.next = node_next def __str__(self): return str(self.e) def __repr__(self): return self.__str__() def __init__(self): self._dummy_head = self._Node() self._size = 0 def get_size(self): return self._size def is_empty(self): return self._size == 0 def add_first(self, e): self.add(0, e) def add_last(self, e): self.add(self._size, e) def add(self, index, e): if index < 0 or index > self._size: raise value_error('Add failed. Illegal index.') prev = self._dummy_head for i in range(index): prev = prev.next node = self._Node(e) node.next = prev.next prev.next = node self._size += 1 def getter(self, index): if index < 0 or index >= self._size: raise value_error('Get failed. Illegal index.') curr = self._dummy_head.next for i in range(index): curr = curr.next return curr.e def get_first(self): return self.getter(0) def get_last(self): return self.getter(self._size - 1) def setter(self, index): if index < 0 or index >= self._size: raise value_error('Set failed. Illegal index.') curr = self._dummy_head.next for i in range(index): curr = curr.next curr.e = e def contains(self, e): curr = self._dummy_head.next while curr: if curr.e == e: return True curr = curr.next return False def remove(self, index): if index < 0 or index >= self._size: raise value_error('Remove failed. Illegal index.') prev = self._dummy_head for i in range(index): prev = prev.next ret = prev.next prev.next = ret.next ret.next = None self._size -= 1 return ret.e def remove_first(self): return self.remove(0) def remove_last(self): return self.remove(self._size - 1) def __str__(self): curr = self._dummy_head.next data = [] while curr: data.append(str(curr.e)) curr = curr.next return '<chapter_03_LinkedList.linkedlist.LinkedList>: (Head) ' + ' -> '.join(data) + ' (Tail)' def __repr__(self): return self.__str__() if __name__ == '__main__': linkedlist = linked_list() print(linkedlist.get_size()) linkedlist.add_first(1) linkedlist.add_first(2) linkedlist.add_first(4) linkedlist.add_first(5) print(linkedlist.get_size()) print(linkedlist) print(linkedlist.getter(3)) print(linkedlist.get_first()) print(linkedlist.get_last()) print(linkedlist) linkedlist.remove(2) linkedlist.remove_first() linkedlist.remove_last() print(linkedlist)
#================================================================ # Runge-Kutta 4th Order Function for Spring Damping # # Author: Bayu R. J. (remove this lol) # Version: 1.0 *initial release # Level: Beginner # Python : IDLE 3.6.3 (use 'new file' to make a whole script) #================================================================ # Compatibility # # *Function can be seperate independently #---------------------------------------------------------------- # Known Bugs # # *None #----------------------------------------------------------------- def dy(u): dy = u return dy def du(x, u): k = 2 # spring constant c = 460 # damping coefficient m = 450 # mass du = (-c*u - k*x) / m; return du; #initial value y = 0.01 u = 0 r = 0 # number of steps N = 10 # initial y a = y # final y b = 1 #step size h = (b-a)/N xpoints = [y] for i in range(99999): r += h if (r < b): xpoints.append(r) i += 1 ypoints = [] upoints = [] #print(xpoints) buat debugging #Runge-Kutta 4th Order for x in xpoints: ypoints.append(y) upoints.append(u) k1 = dy(u) m1 = du(y, u); k2 = dy(u + m1*h) m2 = du(y + k1*h / 2, u + m1*h / 2) k3 = dy(u + m2*h / 2) m3 = du(y + k2*h / 2, u + m2*h / 2) k4 = dy(u + m3*h) m4 = du(y + k3*h, u + m3*h) y += (k1 + 2*k2 + 2*k3 + k4)/6 u += (m1 + 2*m2 + 2*m3 + m4)/6 print (y)
def dy(u): dy = u return dy def du(x, u): k = 2 c = 460 m = 450 du = (-c * u - k * x) / m return du y = 0.01 u = 0 r = 0 n = 10 a = y b = 1 h = (b - a) / N xpoints = [y] for i in range(99999): r += h if r < b: xpoints.append(r) i += 1 ypoints = [] upoints = [] for x in xpoints: ypoints.append(y) upoints.append(u) k1 = dy(u) m1 = du(y, u) k2 = dy(u + m1 * h) m2 = du(y + k1 * h / 2, u + m1 * h / 2) k3 = dy(u + m2 * h / 2) m3 = du(y + k2 * h / 2, u + m2 * h / 2) k4 = dy(u + m3 * h) m4 = du(y + k3 * h, u + m3 * h) y += (k1 + 2 * k2 + 2 * k3 + k4) / 6 u += (m1 + 2 * m2 + 2 * m3 + m4) / 6 print(y)
n = 9 while n>=1: if(n>1): print(str(n) + " bottles of beer on the wall, " + str(n) + " bottles of beer.") n-=1 print("take one down and pass it around, " + str(n) + " bottles of beer on the wall.\n\n") else: print(str(n) + " bottles of beer on the wall, " + str(n) + " bottle of beer.") n-=1 print("take one down and pass it around, there are no bottles of beer on the wall.\n\n") pass
n = 9 while n >= 1: if n > 1: print(str(n) + ' bottles of beer on the wall, ' + str(n) + ' bottles of beer.') n -= 1 print('take one down and pass it around, ' + str(n) + ' bottles of beer on the wall.\n\n') else: print(str(n) + ' bottles of beer on the wall, ' + str(n) + ' bottle of beer.') n -= 1 print('take one down and pass it around, there are no bottles of beer on the wall.\n\n') pass
dy_import_module_symbols("testdatalimit_helper") # Send 10MB of data through with a high limit of 3MB. Which means as soon as it sends # 3MB, the shim should block until the time limit (in this case 20 seconds) is up. UPLOAD_LIMIT = 1024 * 1024 * 3 # 3MB DOWNLOAD_LIMIT = 1024 * 1024 * 3 # 3MB TIME_LIMIT = 10 DATA_TO_SEND = "HelloWorld" * 1024 * 1024 launch_test()
dy_import_module_symbols('testdatalimit_helper') upload_limit = 1024 * 1024 * 3 download_limit = 1024 * 1024 * 3 time_limit = 10 data_to_send = 'HelloWorld' * 1024 * 1024 launch_test()
def check_ignition(b_grid, f_grid, h_grid, i_threshold, w_direction, i, j): # TODO implement this function """ returns True if that cell will catch fire at time t + 1 and False otherwise. """ # Only cells that are located within the bounds of the land scape grid # can contribute to a cell's ignition factore # initialise ignition_factor ignition_factor = 0 # Find the coordinate of the cell that is burning burning_cells_list = [] for burning_row_num in range(len(b_grid)): for burning_column_num in range(len(b_grid[burning_row_num])): if b_grid[burning_row_num][burning_column_num] is True: burning_cells = burning_row_num, burning_column_num burning_cells_list.append(burning_cells) # Find Cell i, j in f_grid's fuel_load fuel_i_j = f_grid[i][j] # print('fuel_i_j: ' + str(fuel_i_j)) # List of all potential adjacent_cells to Cell i, j adjacent_cells = [(i - 1, j - 1), (i - 1, j), (i - 1, j + 1), (i, j - 1), (i, j + 1), (i + 1, j - 1), (i + 1, j), (i + 1, j + 1)] # Wind: # Carry burning that allows a fire to spread more rapidly in a particular # direction, up to 3 additional cells are consider to be ajacent to cell # for the purpose of calculatin its ignition factor # When considering the joint effects of height & wind, compare to heights # of cells and each ots adjacent cells on a pairwise basis, disregarding # the heights of any other surrounding ccells # Add additional adjacent cells based on direction given if w_direction == 'N': adjacent_cells.append((i - 2, j - 1)) adjacent_cells.append((i - 2, j)) adjacent_cells.append((i -2, j + 1)) elif w_direction == 'NW': adjacent_cells.append((i - 1, j - 2)) adjacent_cells.append((i - 2, j - 2)) adjacent_cells.append((i - 2, j - 1)) elif w_direction == 'W': adjacent_cells.append((i, j - 2)) adjacent_cells.append((i - 1, j - 2)) adjacent_cells.append((i + 1, j - 2)) elif w_direction == 'SW': adjacent_cells.append((i + 1, j - 2)) adjacent_cells.append((i + 2, j - 2)) adjacent_cells.append((i + 2, j - 1)) elif w_direction == 'S': adjacent_cells.append((i + 2, j - 1)) adjacent_cells.append((i + 2, j)) adjacent_cells.append((i + 2, j + 1)) elif w_direction == 'SE': adjacent_cells.append((i + 2, j + 1)) adjacent_cells.append((i + 2, j + 2)) adjacent_cells.append((i + 1, j + 2)) elif w_direction == 'E': adjacent_cells.append((i + 1, j + 2)) adjacent_cells.append((i, j + 2)) adjacent_cells.append((i - 1, j + 2)) elif w_direction == 'NE': adjacent_cells.append((i - 1, j + 2)) adjacent_cells.append((i - 2, j + 2)) adjacent_cells.append((i - 2, j + 1)) adjacent_burning_cells = [] for adjacent_burning in adjacent_cells: if adjacent_burning in burning_cells_list: adjacent_burning_cells.append(adjacent_burning) # Height: # If a cell has height greter than that if adjacent burning cell, # that cell will contribute twice as much to the ignition factor # Find the height of the burning cells height_ij = h_grid[i][j] for h_row_num in range(len(h_grid)): for h_column_num in range(len(h_grid[h_row_num])): h_cell = (h_row_num, h_column_num) if h_cell in adjacent_burning_cells: if height_ij > h_grid[h_row_num][h_column_num]: ignition_factor += 1 * 2 elif height_ij < h_grid[h_row_num][h_column_num]: ignition_factor += 1 / 2 else: ignition_factor += 1 # a cell will catch fire if its ignition factor is greater than or equal to # the ignition threshold. A cell must be currently not burning and have a # fuel load greater than 0 (zero) in order to catch fire burn_cell = b_grid[i][j] if ignition_factor >= i_threshold and fuel_i_j > 0 and burn_cell is False: return True else: return False pass
def check_ignition(b_grid, f_grid, h_grid, i_threshold, w_direction, i, j): """ returns True if that cell will catch fire at time t + 1 and False otherwise. """ ignition_factor = 0 burning_cells_list = [] for burning_row_num in range(len(b_grid)): for burning_column_num in range(len(b_grid[burning_row_num])): if b_grid[burning_row_num][burning_column_num] is True: burning_cells = (burning_row_num, burning_column_num) burning_cells_list.append(burning_cells) fuel_i_j = f_grid[i][j] adjacent_cells = [(i - 1, j - 1), (i - 1, j), (i - 1, j + 1), (i, j - 1), (i, j + 1), (i + 1, j - 1), (i + 1, j), (i + 1, j + 1)] if w_direction == 'N': adjacent_cells.append((i - 2, j - 1)) adjacent_cells.append((i - 2, j)) adjacent_cells.append((i - 2, j + 1)) elif w_direction == 'NW': adjacent_cells.append((i - 1, j - 2)) adjacent_cells.append((i - 2, j - 2)) adjacent_cells.append((i - 2, j - 1)) elif w_direction == 'W': adjacent_cells.append((i, j - 2)) adjacent_cells.append((i - 1, j - 2)) adjacent_cells.append((i + 1, j - 2)) elif w_direction == 'SW': adjacent_cells.append((i + 1, j - 2)) adjacent_cells.append((i + 2, j - 2)) adjacent_cells.append((i + 2, j - 1)) elif w_direction == 'S': adjacent_cells.append((i + 2, j - 1)) adjacent_cells.append((i + 2, j)) adjacent_cells.append((i + 2, j + 1)) elif w_direction == 'SE': adjacent_cells.append((i + 2, j + 1)) adjacent_cells.append((i + 2, j + 2)) adjacent_cells.append((i + 1, j + 2)) elif w_direction == 'E': adjacent_cells.append((i + 1, j + 2)) adjacent_cells.append((i, j + 2)) adjacent_cells.append((i - 1, j + 2)) elif w_direction == 'NE': adjacent_cells.append((i - 1, j + 2)) adjacent_cells.append((i - 2, j + 2)) adjacent_cells.append((i - 2, j + 1)) adjacent_burning_cells = [] for adjacent_burning in adjacent_cells: if adjacent_burning in burning_cells_list: adjacent_burning_cells.append(adjacent_burning) height_ij = h_grid[i][j] for h_row_num in range(len(h_grid)): for h_column_num in range(len(h_grid[h_row_num])): h_cell = (h_row_num, h_column_num) if h_cell in adjacent_burning_cells: if height_ij > h_grid[h_row_num][h_column_num]: ignition_factor += 1 * 2 elif height_ij < h_grid[h_row_num][h_column_num]: ignition_factor += 1 / 2 else: ignition_factor += 1 burn_cell = b_grid[i][j] if ignition_factor >= i_threshold and fuel_i_j > 0 and (burn_cell is False): return True else: return False pass
class Hand: def __init__(self, stay=False): self.stay = stay self.cards = [] def drawCard(self, deck): self.cards.append(deck.dealCard()) def displayHand(self): return f"{[f'{card.num}{card.face},' for card in self.cards]}" # Corner case to be resolved: # --> Ace Ace Jack will fail (e.g. 11 + 1 + 10 = 22) def calculateScore(self): values = { 'Ace': 1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8, 9:9, 10:10, 'Jack': 10, 'Queen': 10, 'King': 10 } aces = [] total = 0 for card in self.cards: if card.num == 'Ace': aces.append(card) else: total += values[card.num] for ace in aces: if total <= 10: total += 11 else: total += 1 return total
class Hand: def __init__(self, stay=False): self.stay = stay self.cards = [] def draw_card(self, deck): self.cards.append(deck.dealCard()) def display_hand(self): return f"{[f'{card.num}{card.face},' for card in self.cards]}" def calculate_score(self): values = {'Ace': 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 'Jack': 10, 'Queen': 10, 'King': 10} aces = [] total = 0 for card in self.cards: if card.num == 'Ace': aces.append(card) else: total += values[card.num] for ace in aces: if total <= 10: total += 11 else: total += 1 return total
class Fee(object): def __init__(self, currency, fastest, slowest): self.currency = currency self.fastest = fastest self.slowest = slowest def __str__(self): return "Fees for %s [Fastest %s] [Slowest %s]" % (self.currency, self.fastest, self.slowest) def __repr__(self): return "Fees for %s [Fastest %s] [Slowest %s]" % (self.currency, self.fastest, self.slowest) def __eq__(self, other): return self.currency == other.currency
class Fee(object): def __init__(self, currency, fastest, slowest): self.currency = currency self.fastest = fastest self.slowest = slowest def __str__(self): return 'Fees for %s [Fastest %s] [Slowest %s]' % (self.currency, self.fastest, self.slowest) def __repr__(self): return 'Fees for %s [Fastest %s] [Slowest %s]' % (self.currency, self.fastest, self.slowest) def __eq__(self, other): return self.currency == other.currency
f = open("input.txt",'r') L = [] for item in f: L.append(item.strip()) # Construct arrays of possible keys: creden = ["ecl","eyr","hcl","byr","iyr","pid","hgt"] creden_plus = ["ecl","eyr","hcl","byr","iyr","pid","hgt","cid"] creden.sort() creden_plus.sort() # stores all passports passports = [] # stores key-value pairs (in string form): passport = [] for item in L: # if empty line, append passport, and reinitialize passport variable: if item == "": passports.append(passport) passport = [] # otherwise, loop through current line and append # key value pairs to passport items = item.split(" ") for att in items: if att != "": passport.append(att) # grab the last passport passports.append(passport) print(passports) count = 0 # loop through passports: for passport in passports: keys = [] # extract out the keys: for att in passport: keys.append(att.split(":")[0]) # sort them keys.sort() # see if keys are valid: if keys == creden or keys == creden_plus: count += 1 print(count)
f = open('input.txt', 'r') l = [] for item in f: L.append(item.strip()) creden = ['ecl', 'eyr', 'hcl', 'byr', 'iyr', 'pid', 'hgt'] creden_plus = ['ecl', 'eyr', 'hcl', 'byr', 'iyr', 'pid', 'hgt', 'cid'] creden.sort() creden_plus.sort() passports = [] passport = [] for item in L: if item == '': passports.append(passport) passport = [] items = item.split(' ') for att in items: if att != '': passport.append(att) passports.append(passport) print(passports) count = 0 for passport in passports: keys = [] for att in passport: keys.append(att.split(':')[0]) keys.sort() if keys == creden or keys == creden_plus: count += 1 print(count)
# Auxiliary def goodness(x,y): xx = x-np.average(x) yy = y-np.average(y) A = np.sqrt(np.inner(xx,xx)) B = np.sqrt(np.inner(yy,yy)) return np.inner(xx/A,yy/B) def argminrnd(items, target): # Returns the argmin item. if there are many, returns one at random. # items and target must be the same length candidates = np.where(target == target.min())[0] return items[random.choice(candidates)] def argmaxrnd(items, target): return argminrnd(items, -target) def gen_values(size, a=1, b=100, normalize=False, sort=False, \ desc=False, power=False, alpha = 2): # useful function to generate discrete linear and potential (power) distributions. # Generates values for various initializations. if not power: x = np.array(list(map(lambda x: random.randint(a,b),range(size)))) else: x = np.exp(alpha*np.array(list(map(lambda x: random.expovariate(1),range(size))))) if normalize: # Ensure x adds up to 1 x = x/x.sum() if sort: x = np.sort(x) # Note: defaults to quicksort, worstcase O(n**2). # check https://numpy.org/doc/stable/reference/generated/numpy.sort.html if desc: x = x[::-1] return x # p = gen_values(M, normalize=True, sort=True, desc=True, power=True, alpha = 0.75) # Miscellaneous # colored text and background def print_red(text): print("\033[91m {}\033[00m" .format(text)) def print_green(text): print("\033[92m {}\033[00m" .format(text)) def print_yellow(text): print("\033[93m {}\033[00m" .format(text)) def print_purple(text): print("\033[94m {}\033[00m" .format(text)) def print_cyan(text): print("\033[96m {}\033[00m" .format(text)) def print_gray(text): print("\033[97m {}\033[00m" .format(text))
def goodness(x, y): xx = x - np.average(x) yy = y - np.average(y) a = np.sqrt(np.inner(xx, xx)) b = np.sqrt(np.inner(yy, yy)) return np.inner(xx / A, yy / B) def argminrnd(items, target): candidates = np.where(target == target.min())[0] return items[random.choice(candidates)] def argmaxrnd(items, target): return argminrnd(items, -target) def gen_values(size, a=1, b=100, normalize=False, sort=False, desc=False, power=False, alpha=2): if not power: x = np.array(list(map(lambda x: random.randint(a, b), range(size)))) else: x = np.exp(alpha * np.array(list(map(lambda x: random.expovariate(1), range(size))))) if normalize: x = x / x.sum() if sort: x = np.sort(x) if desc: x = x[::-1] return x def print_red(text): print('\x1b[91m {}\x1b[00m'.format(text)) def print_green(text): print('\x1b[92m {}\x1b[00m'.format(text)) def print_yellow(text): print('\x1b[93m {}\x1b[00m'.format(text)) def print_purple(text): print('\x1b[94m {}\x1b[00m'.format(text)) def print_cyan(text): print('\x1b[96m {}\x1b[00m'.format(text)) def print_gray(text): print('\x1b[97m {}\x1b[00m'.format(text))
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # # # The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # # For further information on the license, see the LICENSE.txt file # # For further information please visit http://www.aiida.net # ########################################################################### class AbstractQueryTool(object): """ Class to make easy queries without extensive knowledge of SQL, Django and/or the internal storage mechanism of AiiDA. .. note:: This feature is under constant development, so the name of the methods may change in future versions to allow for increased querying capabilities. .. todo:: missing features: * add __in filter * allow __in filter to accept other querytool objects to perform a single query * implement searches through the TC table * document the methods * allow to get attributes of queried data via a single query with suitable methods * add checks to verify whether filters as <=, ==, etc are valid for the specified data type (e.g., __gt only with numbers and dates, ...) * probably many other things... """ # TODO SP: implement it completly. pass
class Abstractquerytool(object): """ Class to make easy queries without extensive knowledge of SQL, Django and/or the internal storage mechanism of AiiDA. .. note:: This feature is under constant development, so the name of the methods may change in future versions to allow for increased querying capabilities. .. todo:: missing features: * add __in filter * allow __in filter to accept other querytool objects to perform a single query * implement searches through the TC table * document the methods * allow to get attributes of queried data via a single query with suitable methods * add checks to verify whether filters as <=, ==, etc are valid for the specified data type (e.g., __gt only with numbers and dates, ...) * probably many other things... """ pass
zahlen = [] with open('AdventOfCode_01_1_Input.txt') as f: for zeile in f: zahlen.append(int(zeile)) print(sum(zahlen))
zahlen = [] with open('AdventOfCode_01_1_Input.txt') as f: for zeile in f: zahlen.append(int(zeile)) print(sum(zahlen))
if __name__ == '__main__': a = 2,4 b = 1, c = b d = c # a, b = c, d print(c) print(d) a, b = b, a print(a, b) # Sets contains non duplicate items
if __name__ == '__main__': a = (2, 4) b = (1,) c = b d = c print(c) print(d) (a, b) = (b, a) print(a, b)
class BitDecoder: def encode(self, morse_msg, morse_format, timing): if isinstance(morse_msg, int): morse_msg = bin(morse_msg)[2:] symbol_gap = '0' * timing.intra_char char_gap = '0' * timing.inter_char word_gap = '0' * timing.inter_word words = morse_msg.split(morse_format.inter_word) encoded_word = [] for w in words: encoded_char = [] for morse_char in w.split(morse_format.inter_char): encoded_symbol = [] if morse_format.intra_char: morse_char = morse_char.split(morse_format.intra_char) if not morse_char: raise ValueError(f'Invalid morse word: "{w}"') for symbol in morse_char: encoded_symbol.append( self.encode_symbol(symbol, morse_format, timing)) encoded_char.append(symbol_gap.join(encoded_symbol)) encoded_word.append(char_gap.join(encoded_char)) return word_gap.join(encoded_word) def encode_symbol(self, symbol, morse_format, timing): if symbol not in (morse_format.dot, morse_format.dash): raise ValueError(f'Invalid morse simbol: "{symbol}"') duration = timing.dot if symbol == morse_format.dot else timing.dash return '1' * duration def decode(self, bit_msg, morse_format): pass
class Bitdecoder: def encode(self, morse_msg, morse_format, timing): if isinstance(morse_msg, int): morse_msg = bin(morse_msg)[2:] symbol_gap = '0' * timing.intra_char char_gap = '0' * timing.inter_char word_gap = '0' * timing.inter_word words = morse_msg.split(morse_format.inter_word) encoded_word = [] for w in words: encoded_char = [] for morse_char in w.split(morse_format.inter_char): encoded_symbol = [] if morse_format.intra_char: morse_char = morse_char.split(morse_format.intra_char) if not morse_char: raise value_error(f'Invalid morse word: "{w}"') for symbol in morse_char: encoded_symbol.append(self.encode_symbol(symbol, morse_format, timing)) encoded_char.append(symbol_gap.join(encoded_symbol)) encoded_word.append(char_gap.join(encoded_char)) return word_gap.join(encoded_word) def encode_symbol(self, symbol, morse_format, timing): if symbol not in (morse_format.dot, morse_format.dash): raise value_error(f'Invalid morse simbol: "{symbol}"') duration = timing.dot if symbol == morse_format.dot else timing.dash return '1' * duration def decode(self, bit_msg, morse_format): pass
class Dog: def __init__(self, name, age): self.name = name self.age = age # print(name) # below method will return us the attribute value of the object # getter def get_name(self): return self.name def get_age(self): return self.age # setter # set the different age def set_age(self, age): self.age = age d = Dog("tyson", 12) d.set_age(25) # d2 = Dog("Delta", 14) # d3 = Dog("Charlie", 10) print(d.get_age()) # print(d.get_name()) # print(d2.get_name()) # print(d.name) # print(d2.name) # print(d3.name)
class Dog: def __init__(self, name, age): self.name = name self.age = age def get_name(self): return self.name def get_age(self): return self.age def set_age(self, age): self.age = age d = dog('tyson', 12) d.set_age(25) print(d.get_age())
#!/usr/bin/env python3 ############################################################################################ # # # Program purpose: Computes the sum and average of n integer numbers (input from the # # user). Stop processing input at input 0. # # Program Author : Happi Yvan <ivensteinpoker@gmail.com> # # Creation Date : January 28, 2019 # # # ############################################################################################ def do_suming(input_mess: str) -> dict: user_data, cont, main_sum = '', True, 0 count = 0 while cont: try: user_data = int(input(input_mess)) if user_data == 0: cont = False else: main_sum += user_data count += 1 except ValueError as ve: print(f'[ERROR]: {ve}') return dict(main_sum=main_sum, count=count) def do_computation(): data_info = do_suming(input_mess='Enter an integer [0 to quit]: ') main_sum = data_info['main_sum'] average = data_info['main_sum'] / data_info['count'] print('-' * 30) print(f' Sum is: {main_sum}') print(f'Average: {average}') if __name__ == "__main__": do_computation()
def do_suming(input_mess: str) -> dict: (user_data, cont, main_sum) = ('', True, 0) count = 0 while cont: try: user_data = int(input(input_mess)) if user_data == 0: cont = False else: main_sum += user_data count += 1 except ValueError as ve: print(f'[ERROR]: {ve}') return dict(main_sum=main_sum, count=count) def do_computation(): data_info = do_suming(input_mess='Enter an integer [0 to quit]: ') main_sum = data_info['main_sum'] average = data_info['main_sum'] / data_info['count'] print('-' * 30) print(f' Sum is: {main_sum}') print(f'Average: {average}') if __name__ == '__main__': do_computation()
library_list = [ 'esoctiostan', 'esohststan', 'esookestan', 'esowdstan', 'esoxshooter', 'ing_oke', 'ing_sto', 'ing_og', 'ing_mas', 'ing_fg', 'irafblackbody', 'irafbstdscal', 'irafctiocal', 'irafctionewcal', 'irafiidscal', 'irafirscal', 'irafoke1990', 'irafredcal', 'irafspec16cal', 'irafspec50cal', 'irafspechayescal' ] # https://www.eso.org/sci/observing/tools/standards/spectra/hamuystandards.html esoctiostan = [ 'cd32d9927', 'cd_34d241', 'eg21', 'eg274', 'feige110', 'feige56', 'hilt600', 'hr1544', 'hr3454', 'hr4468', 'hr4963', 'hr5501', 'hr718', 'hr7596', 'hr7950', 'hr8634', 'hr9087', 'ltt1020', 'ltt1788', 'ltt2415', 'ltt3218', 'ltt3864', 'ltt4364', 'ltt4816', 'ltt6248', 'ltt7379', 'ltt745', 'ltt7987', 'ltt9239', 'ltt9491' ] # https://www.eso.org/sci/observing/tools/standards/spectra/hststandards.html esohststan = [ 'agk81d266', 'bd28d4211', 'bd33d2642', 'bd75d325', 'bpm16274', 'feige110', 'feige34', 'g191b2b', 'g93_48', 'gd108', 'gd50', 'grw70d5824', 'hd49798', 'hd60753', 'hd93521', 'hr153', 'hr1996', 'hr4554', 'hr5191', 'hr7001', 'hz2', 'hz21', 'hz4', 'hz44', 'lb227', 'lds749b', 'ngc7293' ] # https://www.eso.org/sci/observing/tools/standards/spectra/okestandards_rev.html esookestan = [ 'bd25d4655', 'bd28d4211', 'bd33d2642', 'bd75d325', 'feige110', 'feige34', 'feige66', 'feige67', 'g138_31', 'g158_100', 'g191b2b', 'g193_74', 'g24_9', 'g60_54', 'gd108', 'gd248', 'gd50', 'grw70d5824', 'hd93521', 'hz21', 'hz4', 'hz44', 'ltt9491', 'ngc7293', 'sa95_42' ] # https://www.eso.org/sci/observing/tools/standards/spectra/wdstandards.html esowdstan = [ 'agk_81d266_005', 'alpha_lyr_004', 'bd_25d4655_002', 'bd_28d4211_005', 'bd_33d2642_004', 'bd_75d325_005', 'feige110_005', 'feige34_005', 'feige66_002', 'feige67_002', 'g93_48_004', 'gd108_005', 'gd50_004', 'gd71', 'grw_70d5824_005', 'hd93521_005', 'hz21_005', 'hz2_005', 'hz44_005', 'hz4_004', 'lb227_004', 'lds749b_005', 'ltt9491_002', 'ngc7293_005' ] # https://www.eso.org/sci/observing/tools/standards/spectra/Xshooterspec.html esoxshooter = ['EG274', 'Feige110', 'GD153', 'GD71', 'LTT3218', 'LTT7987'] # http://www.ing.iac.es/Astronomy/observing/manuals/html_manuals/tech_notes/tn065-100/workflux.html ing_oke = [ 'bd254', 'bd28', 'bd33', 'bd75', 'erib', 'f110', 'f24', 'f34', 'f66', 'f67', 'g138', 'g158', 'g191new', 'g191old', 'g193', 'g24', 'g47', 'g60', 'g99', 'gd108', 'gd140', 'gd190', 'gd248', 'gd50', 'grw705new', 'grw705old', 'grw708', 'grw73', 'hd935', 'he3', 'hz14', 'hz2', 'hz21', 'hz29', 'hz43', 'hz44new', 'hz44old', 'hz4new', 'hz4old', 'hz7', 'l1363', 'l1512', 'l745', 'l870', 'l930', 'l970', 'lb1240', 'lb227', 'lds235', 'lds749', 'ltt', 'ngc', 'r627', 'r640', 'sa29', 'sa95', 't573', 'w1346', 'w485' ] ing_sto = [ 'bd08', 'bd253', 'bd28', 'bd33', 'bd40', 'f110', 'f15', 'f25', 'f34', 'f56', 'f92', 'f98', 'h102', 'h600', 'hz15', 'k27' ] ing_og = ['bd17', 'bd26', 'hd194', 'hd849'] ing_mas = [ 'bd28', 'cyg', 'eg81', 'f110', 'f34', 'f66', 'f67', 'g191', 'gd140', 'h600', 'hd192', 'hd217', 'hz14', 'hz44', 'pg0205', 'pg0216', 'pg0310', 'pg0823', 'pg0846', 'pg0934', 'pg0939', 'pg1121', 'pg1545', 'pg1708', 'w1346' ] ing_fg = ['g138', 'g158', 'g24', 'gd248'] # The following iraf standards refer to: # https://github.com/iraf-community/iraf/tree/master/noao/lib/onedstds irafblackbody = ['U', 'B', 'V', 'R', 'I', 'J', 'H', 'K', 'L', 'Lprime', 'M'] irafbstdscal = [ 'hr718', 'hr3454', 'hr3982', 'hr4468', 'hr4534', 'hr5191', 'hr5511', 'hr7001', 'hr7596', 'hr7950', 'hr8634', 'hr9087', 'hr15318', 'hr74280', 'hr100889', 'hr188350', 'hr198001', 'hr214923', 'hr224926' ] irafctiocal = [ 'bd8', 'bd25', 'bd73632', 'cd32', 'eg11', 'eg21', 'eg26', 'eg31', 'eg54', 'eg63', 'eg76', 'eg79', 'eg99', 'eg139', 'eg149', 'eg158', 'eg248', 'eg274', 'f15', 'f25', 'f56', 'f98', 'f110', 'feige15', 'feige25', 'feige56', 'feige98', 'feige110', 'g2631', 'g9937', 'g16350', 'h600', 'hz2', 'hz4', 'hz15', 'kopf27', 'l377', 'l1020', 'l1788', 'l2415', 'l2511', 'l3218', 'l3864', 'l4364', 'l4816', 'l6248', 'l7379', 'l7987', 'l8702', 'l9239', 'l9491', 'l74546', 'l93080', 'l97030', 'lds235', 'lds749', 'ltt4099', 'ltt8702', 'rose627', 'w1346', 'w485a', 'wolf1346', 'wolf485a' ] irafctionewcal = [ 'cd32', 'eg21', 'eg274', 'f56', 'f110', 'h600', 'l377', 'l745', 'l1020', 'l1788', 'l2415', 'l2511', 'l3218', 'l3864', 'l4364', 'l4816', 'l6248', 'l7379', 'l7987', 'l9239', 'l9491', 'cd32blue', 'eg21blue', 'eg274blue', 'f56blue', 'f110blue', 'h600blue', 'l377blue', 'l1020blue', 'l1788blue', 'l2415blue', 'l2511blue', 'l3218blue', 'l3864blue', 'l4364blue', 'l4816blue', 'l6248blue', 'l7379blue', 'l7987blue', 'l9239blue', 'l9491blue', 'cd32red', 'eg21red', 'eg274red', 'f56red', 'f110red', 'h600red', 'l377red', 'l745red', 'l1020red', 'l1788red', 'l2415red', 'l2511red', 'l3218red', 'l3864red', 'l4364red', 'l4816red', 'l6248red', 'l7379red', 'l7987red', 'l9239red', 'l9491red' ] irafiidscal = [ '40erib', 'amcvn', 'bd7781', 'bd73632', 'bd82015', 'bd253941', 'bd284211', 'bd332642', 'bd404032', 'eg11', 'eg20', 'eg26', 'eg28', 'eg29', 'eg31', 'eg33', 'eg39', 'eg42', 'eg50', 'eg54', 'eg63', 'eg67', 'eg71', 'eg76', 'eg77', 'eg79', 'eg91', 'eg98', 'eg99', 'eg102', 'eg119', 'eg129', 'eg139', 'eg144', 'eg145', 'eg148', 'eg149', 'eg158', 'eg162', 'eg182', 'eg184', 'eg193', 'eg247', 'eg248', 'feige15', 'feige24', 'feige25', 'feige34', 'feige56', 'feige92', 'feige98', 'feige110', 'g88', 'g2610', 'g2631', 'g4718', 'g9937', 'g12627', 'g14563', 'g16350', 'g191b2b', 'gd128', 'gd140', 'gd190', 'gh7112', 'grw705824', 'grw708247', 'grw738031', 'he3', 'hz2', 'hz4', 'hz7', 'hz14', 'hz15', 'hz29', 'hz43', 'hz44', 'kopff27', 'hiltner102', 'hiltner600', 'l8702', 'l13633', 'l14094', 'l74546a', 'l93080', 'l97030', 'l140349', 'l151234b', 'lft1655', 'lb227', 'lb1240', 'lds235b', 'lds749b', 'lp414101', 'ltt4099', 'ltt8702', 'ltt13002', 'ltt16294', 'ross627', 'ross640', 'sa29130', 'sao131065', 'ton573', 'wolf1346', 'wolf485a' ] irafirscal = [ 'bd082015', 'bd174708', 'bd253941', 'bd262606', 'bd284211', 'bd332642', 'bd404032', 'eg50', 'eg71', 'eg139', 'eg158', 'eg247', 'feige15', 'feige25', 'feige34', 'feige56', 'feige92', 'feige98', 'feige110', 'g191b2b', 'hd2857', 'hd17520', 'hd19445', 'hd60778', 'hd74721', 'hd84937', 'hd86986', 'hd109995', 'hd117880', 'hd161817', 'hd192281', 'hd217086', 'he3', 'hiltner102', 'hiltner600', 'hr7001', 'hz44', 'kopff27', 'wolf1346' ] irafoke1990 = [ 'bd75325', 'bd284211', 'feige34', 'feige67', 'feige110', 'g249', 'g13831', 'g191b2b', 'g19374', 'gd108', 'gd248', 'hz21', 'ltt9491', 'eg71', 'eg158', 'eg247' ] irafredcal = [ '40erib', 'amcvn', 'bd7781', 'bd73632', 'bd174708', 'bd262606', 'eg20', 'eg33', 'eg50', 'eg54', 'eg63', 'eg67', 'eg76', 'eg79', 'eg91', 'eg98', 'eg99', 'eg102', 'eg119', 'eg129', 'eg139', 'eg144', 'eg145', 'eg148', 'eg149', 'eg158', 'eg162', 'eg182', 'eg184', 'eg193', 'eg247', 'eg248', 'feige24', 'g2610', 'g2631', 'g4718', 'g9937', 'g12627', 'g14563', 'g16350', 'g191b2b', 'gd140', 'gd190', 'grw705824', 'grw708247', 'grw738031', 'hd19445', 'hd84937', 'he3', 'hz29', 'hz43', 'hz44', 'l13633', 'l14094', 'l151234b', 'l74546a', 'l93080', 'l97030', 'lds235b', 'lds749b', 'lft1655', 'ltt4099', 'ltt8702', 'ltt16294', 'ross627', 'ross640', 'sa29130', 'sao131065', 'wolf1346', 'wolf485a' ] irafspec16cal = [ 'hd15318', 'hd30739', 'hd74280', 'hd100889', 'hd114330', 'hd129956', 'hd188350', 'hd198001', 'hd214923', 'hd224926', 'hr718', 'hr1544', 'hr3454', 'hr4468', 'hr4963', 'hr5501', 'hr7596', 'hr7950', 'hr8634', 'hr9087', 'hd15318blue', 'hd30739blue', 'hd74280blue', 'hd100889blue', 'hd114330blue', 'hd129956blue', 'hd188350blue', 'hd198001blue', 'hd214923blue', 'hd224926blue', 'hr718blue', 'hr1544blue', 'hr3454blue', 'hr4468blue', 'hr4963blue', 'hr5501blue', 'hr7596blue', 'hr7950blue', 'hr8634blue', 'hr9087blue', 'hd15318red', 'hd30739red', 'hd74280red', 'hd100889red', 'hd114330red', 'hd129956red', 'hd188350red', 'hd198001red', 'hd214923red', 'hd224926red', 'hr718red', 'hr1544red', 'hr3454red', 'hr4468red', 'hr4963red', 'hr5501red', 'hr7596red', 'hr7950red', 'hr8634red', 'hr9087red' ] irafspec50cal = [ 'bd284211', 'cygob2no9', 'eg20', 'eg42', 'eg71', 'eg81', 'eg139', 'eg158', 'eg247', 'feige34', 'feige66', 'feige67', 'feige110', 'g191b2b', 'gd140', 'hd192281', 'hd217086', 'hilt600', 'hz14', 'hz44', 'pg0205134', 'pg0216032', 'pg0310149', 'pg0823546', 'pg0846249', 'pg0934554', 'pg0939262', 'pg1121145', 'pg1545035', 'pg1708602', 'wolf1346' ] irafspechayescal = [ 'bd284211', 'cygob2no9', 'eg42', 'eg71', 'eg81', 'eg139', 'eg158', 'eg247', 'feige34', 'feige66', 'feige67', 'feige110', 'g191b2b', 'gd140', 'hd192281', 'hd217086', 'hilt600', 'hz14', 'hz44', 'pg0205134', 'pg0216032', 'pg0310149', 'pg0823546', 'pg0846249', 'pg0934554', 'pg0939262', 'pg1121145', 'pg1545035', 'pg1708602', 'wolf1346' ]
library_list = ['esoctiostan', 'esohststan', 'esookestan', 'esowdstan', 'esoxshooter', 'ing_oke', 'ing_sto', 'ing_og', 'ing_mas', 'ing_fg', 'irafblackbody', 'irafbstdscal', 'irafctiocal', 'irafctionewcal', 'irafiidscal', 'irafirscal', 'irafoke1990', 'irafredcal', 'irafspec16cal', 'irafspec50cal', 'irafspechayescal'] esoctiostan = ['cd32d9927', 'cd_34d241', 'eg21', 'eg274', 'feige110', 'feige56', 'hilt600', 'hr1544', 'hr3454', 'hr4468', 'hr4963', 'hr5501', 'hr718', 'hr7596', 'hr7950', 'hr8634', 'hr9087', 'ltt1020', 'ltt1788', 'ltt2415', 'ltt3218', 'ltt3864', 'ltt4364', 'ltt4816', 'ltt6248', 'ltt7379', 'ltt745', 'ltt7987', 'ltt9239', 'ltt9491'] esohststan = ['agk81d266', 'bd28d4211', 'bd33d2642', 'bd75d325', 'bpm16274', 'feige110', 'feige34', 'g191b2b', 'g93_48', 'gd108', 'gd50', 'grw70d5824', 'hd49798', 'hd60753', 'hd93521', 'hr153', 'hr1996', 'hr4554', 'hr5191', 'hr7001', 'hz2', 'hz21', 'hz4', 'hz44', 'lb227', 'lds749b', 'ngc7293'] esookestan = ['bd25d4655', 'bd28d4211', 'bd33d2642', 'bd75d325', 'feige110', 'feige34', 'feige66', 'feige67', 'g138_31', 'g158_100', 'g191b2b', 'g193_74', 'g24_9', 'g60_54', 'gd108', 'gd248', 'gd50', 'grw70d5824', 'hd93521', 'hz21', 'hz4', 'hz44', 'ltt9491', 'ngc7293', 'sa95_42'] esowdstan = ['agk_81d266_005', 'alpha_lyr_004', 'bd_25d4655_002', 'bd_28d4211_005', 'bd_33d2642_004', 'bd_75d325_005', 'feige110_005', 'feige34_005', 'feige66_002', 'feige67_002', 'g93_48_004', 'gd108_005', 'gd50_004', 'gd71', 'grw_70d5824_005', 'hd93521_005', 'hz21_005', 'hz2_005', 'hz44_005', 'hz4_004', 'lb227_004', 'lds749b_005', 'ltt9491_002', 'ngc7293_005'] esoxshooter = ['EG274', 'Feige110', 'GD153', 'GD71', 'LTT3218', 'LTT7987'] ing_oke = ['bd254', 'bd28', 'bd33', 'bd75', 'erib', 'f110', 'f24', 'f34', 'f66', 'f67', 'g138', 'g158', 'g191new', 'g191old', 'g193', 'g24', 'g47', 'g60', 'g99', 'gd108', 'gd140', 'gd190', 'gd248', 'gd50', 'grw705new', 'grw705old', 'grw708', 'grw73', 'hd935', 'he3', 'hz14', 'hz2', 'hz21', 'hz29', 'hz43', 'hz44new', 'hz44old', 'hz4new', 'hz4old', 'hz7', 'l1363', 'l1512', 'l745', 'l870', 'l930', 'l970', 'lb1240', 'lb227', 'lds235', 'lds749', 'ltt', 'ngc', 'r627', 'r640', 'sa29', 'sa95', 't573', 'w1346', 'w485'] ing_sto = ['bd08', 'bd253', 'bd28', 'bd33', 'bd40', 'f110', 'f15', 'f25', 'f34', 'f56', 'f92', 'f98', 'h102', 'h600', 'hz15', 'k27'] ing_og = ['bd17', 'bd26', 'hd194', 'hd849'] ing_mas = ['bd28', 'cyg', 'eg81', 'f110', 'f34', 'f66', 'f67', 'g191', 'gd140', 'h600', 'hd192', 'hd217', 'hz14', 'hz44', 'pg0205', 'pg0216', 'pg0310', 'pg0823', 'pg0846', 'pg0934', 'pg0939', 'pg1121', 'pg1545', 'pg1708', 'w1346'] ing_fg = ['g138', 'g158', 'g24', 'gd248'] irafblackbody = ['U', 'B', 'V', 'R', 'I', 'J', 'H', 'K', 'L', 'Lprime', 'M'] irafbstdscal = ['hr718', 'hr3454', 'hr3982', 'hr4468', 'hr4534', 'hr5191', 'hr5511', 'hr7001', 'hr7596', 'hr7950', 'hr8634', 'hr9087', 'hr15318', 'hr74280', 'hr100889', 'hr188350', 'hr198001', 'hr214923', 'hr224926'] irafctiocal = ['bd8', 'bd25', 'bd73632', 'cd32', 'eg11', 'eg21', 'eg26', 'eg31', 'eg54', 'eg63', 'eg76', 'eg79', 'eg99', 'eg139', 'eg149', 'eg158', 'eg248', 'eg274', 'f15', 'f25', 'f56', 'f98', 'f110', 'feige15', 'feige25', 'feige56', 'feige98', 'feige110', 'g2631', 'g9937', 'g16350', 'h600', 'hz2', 'hz4', 'hz15', 'kopf27', 'l377', 'l1020', 'l1788', 'l2415', 'l2511', 'l3218', 'l3864', 'l4364', 'l4816', 'l6248', 'l7379', 'l7987', 'l8702', 'l9239', 'l9491', 'l74546', 'l93080', 'l97030', 'lds235', 'lds749', 'ltt4099', 'ltt8702', 'rose627', 'w1346', 'w485a', 'wolf1346', 'wolf485a'] irafctionewcal = ['cd32', 'eg21', 'eg274', 'f56', 'f110', 'h600', 'l377', 'l745', 'l1020', 'l1788', 'l2415', 'l2511', 'l3218', 'l3864', 'l4364', 'l4816', 'l6248', 'l7379', 'l7987', 'l9239', 'l9491', 'cd32blue', 'eg21blue', 'eg274blue', 'f56blue', 'f110blue', 'h600blue', 'l377blue', 'l1020blue', 'l1788blue', 'l2415blue', 'l2511blue', 'l3218blue', 'l3864blue', 'l4364blue', 'l4816blue', 'l6248blue', 'l7379blue', 'l7987blue', 'l9239blue', 'l9491blue', 'cd32red', 'eg21red', 'eg274red', 'f56red', 'f110red', 'h600red', 'l377red', 'l745red', 'l1020red', 'l1788red', 'l2415red', 'l2511red', 'l3218red', 'l3864red', 'l4364red', 'l4816red', 'l6248red', 'l7379red', 'l7987red', 'l9239red', 'l9491red'] irafiidscal = ['40erib', 'amcvn', 'bd7781', 'bd73632', 'bd82015', 'bd253941', 'bd284211', 'bd332642', 'bd404032', 'eg11', 'eg20', 'eg26', 'eg28', 'eg29', 'eg31', 'eg33', 'eg39', 'eg42', 'eg50', 'eg54', 'eg63', 'eg67', 'eg71', 'eg76', 'eg77', 'eg79', 'eg91', 'eg98', 'eg99', 'eg102', 'eg119', 'eg129', 'eg139', 'eg144', 'eg145', 'eg148', 'eg149', 'eg158', 'eg162', 'eg182', 'eg184', 'eg193', 'eg247', 'eg248', 'feige15', 'feige24', 'feige25', 'feige34', 'feige56', 'feige92', 'feige98', 'feige110', 'g88', 'g2610', 'g2631', 'g4718', 'g9937', 'g12627', 'g14563', 'g16350', 'g191b2b', 'gd128', 'gd140', 'gd190', 'gh7112', 'grw705824', 'grw708247', 'grw738031', 'he3', 'hz2', 'hz4', 'hz7', 'hz14', 'hz15', 'hz29', 'hz43', 'hz44', 'kopff27', 'hiltner102', 'hiltner600', 'l8702', 'l13633', 'l14094', 'l74546a', 'l93080', 'l97030', 'l140349', 'l151234b', 'lft1655', 'lb227', 'lb1240', 'lds235b', 'lds749b', 'lp414101', 'ltt4099', 'ltt8702', 'ltt13002', 'ltt16294', 'ross627', 'ross640', 'sa29130', 'sao131065', 'ton573', 'wolf1346', 'wolf485a'] irafirscal = ['bd082015', 'bd174708', 'bd253941', 'bd262606', 'bd284211', 'bd332642', 'bd404032', 'eg50', 'eg71', 'eg139', 'eg158', 'eg247', 'feige15', 'feige25', 'feige34', 'feige56', 'feige92', 'feige98', 'feige110', 'g191b2b', 'hd2857', 'hd17520', 'hd19445', 'hd60778', 'hd74721', 'hd84937', 'hd86986', 'hd109995', 'hd117880', 'hd161817', 'hd192281', 'hd217086', 'he3', 'hiltner102', 'hiltner600', 'hr7001', 'hz44', 'kopff27', 'wolf1346'] irafoke1990 = ['bd75325', 'bd284211', 'feige34', 'feige67', 'feige110', 'g249', 'g13831', 'g191b2b', 'g19374', 'gd108', 'gd248', 'hz21', 'ltt9491', 'eg71', 'eg158', 'eg247'] irafredcal = ['40erib', 'amcvn', 'bd7781', 'bd73632', 'bd174708', 'bd262606', 'eg20', 'eg33', 'eg50', 'eg54', 'eg63', 'eg67', 'eg76', 'eg79', 'eg91', 'eg98', 'eg99', 'eg102', 'eg119', 'eg129', 'eg139', 'eg144', 'eg145', 'eg148', 'eg149', 'eg158', 'eg162', 'eg182', 'eg184', 'eg193', 'eg247', 'eg248', 'feige24', 'g2610', 'g2631', 'g4718', 'g9937', 'g12627', 'g14563', 'g16350', 'g191b2b', 'gd140', 'gd190', 'grw705824', 'grw708247', 'grw738031', 'hd19445', 'hd84937', 'he3', 'hz29', 'hz43', 'hz44', 'l13633', 'l14094', 'l151234b', 'l74546a', 'l93080', 'l97030', 'lds235b', 'lds749b', 'lft1655', 'ltt4099', 'ltt8702', 'ltt16294', 'ross627', 'ross640', 'sa29130', 'sao131065', 'wolf1346', 'wolf485a'] irafspec16cal = ['hd15318', 'hd30739', 'hd74280', 'hd100889', 'hd114330', 'hd129956', 'hd188350', 'hd198001', 'hd214923', 'hd224926', 'hr718', 'hr1544', 'hr3454', 'hr4468', 'hr4963', 'hr5501', 'hr7596', 'hr7950', 'hr8634', 'hr9087', 'hd15318blue', 'hd30739blue', 'hd74280blue', 'hd100889blue', 'hd114330blue', 'hd129956blue', 'hd188350blue', 'hd198001blue', 'hd214923blue', 'hd224926blue', 'hr718blue', 'hr1544blue', 'hr3454blue', 'hr4468blue', 'hr4963blue', 'hr5501blue', 'hr7596blue', 'hr7950blue', 'hr8634blue', 'hr9087blue', 'hd15318red', 'hd30739red', 'hd74280red', 'hd100889red', 'hd114330red', 'hd129956red', 'hd188350red', 'hd198001red', 'hd214923red', 'hd224926red', 'hr718red', 'hr1544red', 'hr3454red', 'hr4468red', 'hr4963red', 'hr5501red', 'hr7596red', 'hr7950red', 'hr8634red', 'hr9087red'] irafspec50cal = ['bd284211', 'cygob2no9', 'eg20', 'eg42', 'eg71', 'eg81', 'eg139', 'eg158', 'eg247', 'feige34', 'feige66', 'feige67', 'feige110', 'g191b2b', 'gd140', 'hd192281', 'hd217086', 'hilt600', 'hz14', 'hz44', 'pg0205134', 'pg0216032', 'pg0310149', 'pg0823546', 'pg0846249', 'pg0934554', 'pg0939262', 'pg1121145', 'pg1545035', 'pg1708602', 'wolf1346'] irafspechayescal = ['bd284211', 'cygob2no9', 'eg42', 'eg71', 'eg81', 'eg139', 'eg158', 'eg247', 'feige34', 'feige66', 'feige67', 'feige110', 'g191b2b', 'gd140', 'hd192281', 'hd217086', 'hilt600', 'hz14', 'hz44', 'pg0205134', 'pg0216032', 'pg0310149', 'pg0823546', 'pg0846249', 'pg0934554', 'pg0939262', 'pg1121145', 'pg1545035', 'pg1708602', 'wolf1346']
class CharacterComponent: def __init__(self, name): self.name=name def equip(self): pass class CharacterConcreteComponent(CharacterComponent): def equip(self): return f'{self.name} equipment:' class Decorator(CharacterComponent): _character: CharacterComponent def __init__(self, _character:CharacterComponent): self._character=_character def equip(self): return self._character.equip() class ArmorConcreteDecorator(Decorator): def equip(self): return f'{self._character.equip()}\nArmor: Yes' class SwordConcreteDecorator(Decorator): def equip(self): return f'{self._character.equip()}\nSword: Yes' class RingConcreteDecorator(Decorator): def equip(self): return f'{self._character.equip()}\nRing: Yes' class NecklaceConcreteDecorator(Decorator): def equip(self): return f'{self._character.equip()}\nNecklace: Yes'
class Charactercomponent: def __init__(self, name): self.name = name def equip(self): pass class Characterconcretecomponent(CharacterComponent): def equip(self): return f'{self.name} equipment:' class Decorator(CharacterComponent): _character: CharacterComponent def __init__(self, _character: CharacterComponent): self._character = _character def equip(self): return self._character.equip() class Armorconcretedecorator(Decorator): def equip(self): return f'{self._character.equip()}\nArmor: Yes' class Swordconcretedecorator(Decorator): def equip(self): return f'{self._character.equip()}\nSword: Yes' class Ringconcretedecorator(Decorator): def equip(self): return f'{self._character.equip()}\nRing: Yes' class Necklaceconcretedecorator(Decorator): def equip(self): return f'{self._character.equip()}\nNecklace: Yes'
# Code on Python 3.7.4 # Working @ Dec, 2020 # david-boo.github.io # Define sequences. Then put two strings together to produce the list of pairs that we wish to compare, and a filter returns just those pairs for which seq1 != seq2 # Taking the length of the filtered list gives us the Hamming distance seq1='AAAGAAAACGCCAACCCCCCCCCGTGCTGCAGTCTTGATTGCTGTATGAGAGATCCGGCCCTGTACGCGGTCCCCGTAGGACACTCACAGACGTCCACAGTTCTAGAAGAAGCGCTTATTCGTATTCGTCGACCTGTCCCCTGCTCCGTCCAGCGGTTAGAGTCCTACATGTACGTTGGAAGAGCACTCCCGACCGGTGCGGTTAGTACATCTTTTGTGATTTCCGAGTTCCGTGAAGGGGAGACCGATATGTACGCTCAGCATATGTCGATGCTGCAACGTGCATAAGGACGTAGACGGATACGCACAGTGATGTAAGCTTTGGACCTTGGGCCTCTACGACCTACACACGAACAGTAGTTCACACCCCTGCGCTACCGAGCATGCACTAGCGGCAGTCTTTCTCCTCCGAACGCGCCAAAGAAAATTGAATAGCTATCACCGTGCATGGGCGTGATGTGGAGTCAACATTCAGTTTGGAAAGTTCTTGCATATGTGGTCATGTACTGAGTTGTCTTCCAAGACTGCGAAATTTTCGATGCAGCGGCAACAACCGTACGTTACGCACAACTAGTAGTGGAGTTCTTGACCTTTTCGGGCAGAGTCATGCCCACCTAGCATCGCTTAAAGTCCGTAAGAAGCTATCATGGACCCACGCACGCGGGGCTTGTGAGCTAATATATCCCTGCGGGAGAAACCGAAACGGGGTAGATGGAGCGGAGCCATAGGGACACGCGGCGGCTGTTAGACACTGATGGAGCAGTTGACGGCATTTCCTACGCTAACTATCAGGGAGGGGCCCAGTACAAATCACTTCTTTAGCTATAGTTACGTGCGGACATTAGCTTTTAGTAGCTCATGGCGAATGATTTAACTAAATACCGCCACTATTGCGGGGGTACTGTTTCCCCGTTTCACAAATTTACGCGTTACCTCCCCCTTCTTAGTAGCG' seq2='CAGTATAATAACAACCCCCTACCTAGCGGCATTCAGGGACTCGTCACAACTGATACGCCACTGATCGCGAAAGAACTGGCCAACTAAGCTAGGTGCATTCTATTATCAGAATTCAATTTTCGTATTCGAGGCACGTTCGACAGAACTCGACACTGGTCCGAGTTCCGCTTATAGATTTAACATCAGGCTCTCAAGAACGCGGCTAGAATCTCCTGCGGTGACTCCAAGGTCCATCAAGGTGGGAGTAGCGTCACCGCTCCTGATCCATCAATGACATAACAGGCCGTAGAGCGGTATCAGATGTGCTGAGTACCGTAATCATTGAGGGTTTGGGATGAAGAACGAAAGCAGGGCCTCTGGCTCACATACACTCCCTACCCAGTATGCGCTGACTGGCGTCGTTATGGTAGTAACCCGCAGAGTTCTAGTGAAAGGGGTCGTTCAGGCAAATACCGCGAGTGGGATAAATTGTCGCGCTGAGAAGGAATCGAATATGTCCTAACACACGCTGTCTTTCGATATGACGACGCCTTTCTAGATTCCTAGTCAACAGATGCACCCTAAGTACGACGAGAATAGTACAGCTCGACTTCCTCCGGGTGAGTCTTGCCCGAGAAGGCGAGCGCACAACAGATGGGTTGGTATATGCTGGGCCGACGCTGGGGACGCTGGCGGAGAGATTCGTGACTAGGAGGAGGCCAGACAAGGTTCGGGTAGGGGAGGATTAGATATCCGTGGGTATCGGTAAACCTGTGTAGGGGTGTCAATTGCGGTTCTGAGGTATACACTGAGACAAGGGCCAAACACTGATGACGACTGTAGCTGGACATACATAGCGGCACTAGTTAGAAGCAGCTGCCTTTCCACGACCAAAGTAGCCTATGTTCTCACTGGGGGGCTCCCGACTTAGGCCATCCCAACCGTGCGCCACTCGTTATATTCATAAGAGGGC' print(sum(map(lambda x, y: 0 if x == y else 1, seq1, seq2)))
seq1 = 'AAAGAAAACGCCAACCCCCCCCCGTGCTGCAGTCTTGATTGCTGTATGAGAGATCCGGCCCTGTACGCGGTCCCCGTAGGACACTCACAGACGTCCACAGTTCTAGAAGAAGCGCTTATTCGTATTCGTCGACCTGTCCCCTGCTCCGTCCAGCGGTTAGAGTCCTACATGTACGTTGGAAGAGCACTCCCGACCGGTGCGGTTAGTACATCTTTTGTGATTTCCGAGTTCCGTGAAGGGGAGACCGATATGTACGCTCAGCATATGTCGATGCTGCAACGTGCATAAGGACGTAGACGGATACGCACAGTGATGTAAGCTTTGGACCTTGGGCCTCTACGACCTACACACGAACAGTAGTTCACACCCCTGCGCTACCGAGCATGCACTAGCGGCAGTCTTTCTCCTCCGAACGCGCCAAAGAAAATTGAATAGCTATCACCGTGCATGGGCGTGATGTGGAGTCAACATTCAGTTTGGAAAGTTCTTGCATATGTGGTCATGTACTGAGTTGTCTTCCAAGACTGCGAAATTTTCGATGCAGCGGCAACAACCGTACGTTACGCACAACTAGTAGTGGAGTTCTTGACCTTTTCGGGCAGAGTCATGCCCACCTAGCATCGCTTAAAGTCCGTAAGAAGCTATCATGGACCCACGCACGCGGGGCTTGTGAGCTAATATATCCCTGCGGGAGAAACCGAAACGGGGTAGATGGAGCGGAGCCATAGGGACACGCGGCGGCTGTTAGACACTGATGGAGCAGTTGACGGCATTTCCTACGCTAACTATCAGGGAGGGGCCCAGTACAAATCACTTCTTTAGCTATAGTTACGTGCGGACATTAGCTTTTAGTAGCTCATGGCGAATGATTTAACTAAATACCGCCACTATTGCGGGGGTACTGTTTCCCCGTTTCACAAATTTACGCGTTACCTCCCCCTTCTTAGTAGCG' seq2 = 'CAGTATAATAACAACCCCCTACCTAGCGGCATTCAGGGACTCGTCACAACTGATACGCCACTGATCGCGAAAGAACTGGCCAACTAAGCTAGGTGCATTCTATTATCAGAATTCAATTTTCGTATTCGAGGCACGTTCGACAGAACTCGACACTGGTCCGAGTTCCGCTTATAGATTTAACATCAGGCTCTCAAGAACGCGGCTAGAATCTCCTGCGGTGACTCCAAGGTCCATCAAGGTGGGAGTAGCGTCACCGCTCCTGATCCATCAATGACATAACAGGCCGTAGAGCGGTATCAGATGTGCTGAGTACCGTAATCATTGAGGGTTTGGGATGAAGAACGAAAGCAGGGCCTCTGGCTCACATACACTCCCTACCCAGTATGCGCTGACTGGCGTCGTTATGGTAGTAACCCGCAGAGTTCTAGTGAAAGGGGTCGTTCAGGCAAATACCGCGAGTGGGATAAATTGTCGCGCTGAGAAGGAATCGAATATGTCCTAACACACGCTGTCTTTCGATATGACGACGCCTTTCTAGATTCCTAGTCAACAGATGCACCCTAAGTACGACGAGAATAGTACAGCTCGACTTCCTCCGGGTGAGTCTTGCCCGAGAAGGCGAGCGCACAACAGATGGGTTGGTATATGCTGGGCCGACGCTGGGGACGCTGGCGGAGAGATTCGTGACTAGGAGGAGGCCAGACAAGGTTCGGGTAGGGGAGGATTAGATATCCGTGGGTATCGGTAAACCTGTGTAGGGGTGTCAATTGCGGTTCTGAGGTATACACTGAGACAAGGGCCAAACACTGATGACGACTGTAGCTGGACATACATAGCGGCACTAGTTAGAAGCAGCTGCCTTTCCACGACCAAAGTAGCCTATGTTCTCACTGGGGGGCTCCCGACTTAGGCCATCCCAACCGTGCGCCACTCGTTATATTCATAAGAGGGC' print(sum(map(lambda x, y: 0 if x == y else 1, seq1, seq2)))
class Solution: def canFormArray(self, arr: List[int], pieces: List[List[int]]) -> bool: x={} f=[] z=[] for i in pieces: x[i[0]]=i l=0 while l<len(arr): if arr[l] in x: f.append(x[arr[l]]) print(f) else: return False print(len(x[arr[l]])) l=l+len(x[arr[l]]) for i in f: for x in i: z.append(x) if z==arr: return True return False
class Solution: def can_form_array(self, arr: List[int], pieces: List[List[int]]) -> bool: x = {} f = [] z = [] for i in pieces: x[i[0]] = i l = 0 while l < len(arr): if arr[l] in x: f.append(x[arr[l]]) print(f) else: return False print(len(x[arr[l]])) l = l + len(x[arr[l]]) for i in f: for x in i: z.append(x) if z == arr: return True return False
#!/usr/bin/env python DEF_TASKDB_CONF = {'timeout': 10.0, # seconds 'task_checkout_delay': 1.0, # seconds 'task_checkout_num_tries': 10} class TASK_STATES(object): QUEUED_NO_DEP = 'QUEUED_NO_DEP' RUNNING = 'RUNNING' FAILED = 'FAILED' SUCCEEDED = 'SUCCEEDED' CHECKPOINTED = 'CHECKPOINTED' KILLED = 'KILLED' DELETED = 'DELETED' LIST_OF_TASK_STATES = [TASK_STATES.QUEUED_NO_DEP, TASK_STATES.RUNNING, TASK_STATES.FAILED, TASK_STATES.SUCCEEDED, TASK_STATES.CHECKPOINTED, TASK_STATES.DELETED, TASK_STATES.KILLED] class TASK_LOG_ACTIONS(object): ADDED = 'ADDED' RAN = 'RAN' RAN_FROM_CHECKPOINT = 'RAN_FROM_CHECKPOINT' DELETED = 'DELETED' RESET = 'RESET' FAILED = 'FAILED' SUCCEEDED = 'SUCCEEDED' CHECKPOINTED = 'CHECKPOINTED' KILLED = 'KILLED' UPDATED = 'UPDATED' CLEANED = 'CLEANED' VALID_LOG_CHECKIN_ACTIONS = [TASK_LOG_ACTIONS.FAILED, TASK_LOG_ACTIONS.SUCCEEDED, TASK_LOG_ACTIONS.CHECKPOINTED, TASK_LOG_ACTIONS.KILLED] class TASKDB_STATES(object): RUNNING = 'RUNNING' PAUSED = 'PAUSED'
def_taskdb_conf = {'timeout': 10.0, 'task_checkout_delay': 1.0, 'task_checkout_num_tries': 10} class Task_States(object): queued_no_dep = 'QUEUED_NO_DEP' running = 'RUNNING' failed = 'FAILED' succeeded = 'SUCCEEDED' checkpointed = 'CHECKPOINTED' killed = 'KILLED' deleted = 'DELETED' list_of_task_states = [TASK_STATES.QUEUED_NO_DEP, TASK_STATES.RUNNING, TASK_STATES.FAILED, TASK_STATES.SUCCEEDED, TASK_STATES.CHECKPOINTED, TASK_STATES.DELETED, TASK_STATES.KILLED] class Task_Log_Actions(object): added = 'ADDED' ran = 'RAN' ran_from_checkpoint = 'RAN_FROM_CHECKPOINT' deleted = 'DELETED' reset = 'RESET' failed = 'FAILED' succeeded = 'SUCCEEDED' checkpointed = 'CHECKPOINTED' killed = 'KILLED' updated = 'UPDATED' cleaned = 'CLEANED' valid_log_checkin_actions = [TASK_LOG_ACTIONS.FAILED, TASK_LOG_ACTIONS.SUCCEEDED, TASK_LOG_ACTIONS.CHECKPOINTED, TASK_LOG_ACTIONS.KILLED] class Taskdb_States(object): running = 'RUNNING' paused = 'PAUSED'
#!/usr/bin/env python3 ####################################################################################### # # # Program purpose: Finds the first appearance of the substring 'not' and 'poor' # # from a given string, if 'not' follows the 'poor', replace # # the whole 'not'...'poor' substring with 'good'. # # Program Author : Happi Yvan <ivensteinpoker@gmail.com> # # Creation Date : October 11, 2019 # # # ####################################################################################### def get_user_string(mess: str): is_valid = False data = '' while is_valid is False: try: data = input(mess) if len(data) == 0: raise ValueError('Please provide a string') is_valid = True except ValueError as ve: print(f'[ERROR]: {ve}') return data def process_string(main_data: str): val = main_data.find('not') new_data = '' if val != -1: temp = main_data.find('poor') if temp != -1: new_data = main_data[:val] + 'good' + main_data[temp + len('poor'):] else: temp = main_data.find('poor') if temp != -1: new_data = main_data[:temp] + 'good' + main_data[temp + len('poor'):] if len(new_data) == 0: return main_data return new_data if __name__ == "__main__": main_str = get_user_string(mess='Enter some string: ') proc_data = process_string(main_data=main_str) print(f'Processed data: {proc_data}')
def get_user_string(mess: str): is_valid = False data = '' while is_valid is False: try: data = input(mess) if len(data) == 0: raise value_error('Please provide a string') is_valid = True except ValueError as ve: print(f'[ERROR]: {ve}') return data def process_string(main_data: str): val = main_data.find('not') new_data = '' if val != -1: temp = main_data.find('poor') if temp != -1: new_data = main_data[:val] + 'good' + main_data[temp + len('poor'):] else: temp = main_data.find('poor') if temp != -1: new_data = main_data[:temp] + 'good' + main_data[temp + len('poor'):] if len(new_data) == 0: return main_data return new_data if __name__ == '__main__': main_str = get_user_string(mess='Enter some string: ') proc_data = process_string(main_data=main_str) print(f'Processed data: {proc_data}')
symbol1 = input() symbol2 = input() def return_characters(symbol1, symbol2): symbol1 = ord(symbol1) symbol2 = ord(symbol2) result = [] for i in range(symbol1 + 1, symbol2): char = chr(i) result.append(char) result = " ".join(result) return result print(return_characters(symbol1, symbol2))
symbol1 = input() symbol2 = input() def return_characters(symbol1, symbol2): symbol1 = ord(symbol1) symbol2 = ord(symbol2) result = [] for i in range(symbol1 + 1, symbol2): char = chr(i) result.append(char) result = ' '.join(result) return result print(return_characters(symbol1, symbol2))
class Messages: help = "How can I help you?" hello = "Hello!" welcome = "Welcome {name}! I'm VK-Reminder-Bot." done = "I have set the reminder!" updated = "I have updated the reminder!" missed = "I didn't get that!" get_title = "Please enter Reminder Title:" get_time = "When should I remind you?" time_retry = "Please enter a valid time:" bad_time = "Can't set reminders in the past, Reminder discarded." no_reminders = "You don't have any reminders!"
class Messages: help = 'How can I help you?' hello = 'Hello!' welcome = "Welcome {name}! I'm VK-Reminder-Bot." done = 'I have set the reminder!' updated = 'I have updated the reminder!' missed = "I didn't get that!" get_title = 'Please enter Reminder Title:' get_time = 'When should I remind you?' time_retry = 'Please enter a valid time:' bad_time = "Can't set reminders in the past, Reminder discarded." no_reminders = "You don't have any reminders!"
class Solution: def kthPalindrome(self, queries: List[int], intLength: int) -> List[int]: start = pow(10, (intLength + 1) // 2 - 1) end = pow(10, (intLength + 1) // 2) mul = pow(10, intLength // 2) def reverse(num: int) -> int: res = 0 while num: res = res * 10 + num % 10 num //= 10 return res def getKthPalindrome(q: int) -> int: prefix = start + q - 1 return prefix * mul + reverse(prefix // 10 if intLength & 1 else prefix) return [-1 if start + q > end else getKthPalindrome(q) for q in queries]
class Solution: def kth_palindrome(self, queries: List[int], intLength: int) -> List[int]: start = pow(10, (intLength + 1) // 2 - 1) end = pow(10, (intLength + 1) // 2) mul = pow(10, intLength // 2) def reverse(num: int) -> int: res = 0 while num: res = res * 10 + num % 10 num //= 10 return res def get_kth_palindrome(q: int) -> int: prefix = start + q - 1 return prefix * mul + reverse(prefix // 10 if intLength & 1 else prefix) return [-1 if start + q > end else get_kth_palindrome(q) for q in queries]
def checkMagazine(magazine, note): if len(magazine) < len(note): print("No") # Program would not stop if not return return None note_dict = {} for word in note: if word not in note_dict: note_dict[word] = 1 else: note_dict[word] += 1 for word in magazine: if word in note_dict: note_dict[word] = max(0, note_dict[word]-1) print(["No", "Yes"][int(sum(note_dict.values())==0)])
def check_magazine(magazine, note): if len(magazine) < len(note): print('No') return None note_dict = {} for word in note: if word not in note_dict: note_dict[word] = 1 else: note_dict[word] += 1 for word in magazine: if word in note_dict: note_dict[word] = max(0, note_dict[word] - 1) print(['No', 'Yes'][int(sum(note_dict.values()) == 0)])
#!/usr/bin/env python # definitions of packets that go from the App to Artoo or App to Solo and vice versa. # All packets are of the form (in little endian) # 32-bit type identifier # 32-bit length # n bytes value # https://docs.google.com/a/3drobotics.com/document/d/1rA1zs3T7X1n9ip9YMGZEcLCW6Mx1RR1bNlh9gF0i8nM/edit#heading=h.tcfcw63p9sfk # packet type definitions # Solo-App messages # NOTE: Make sure this stays in sync with the app's definitions! Those are in iSolo/networking/SoloPacket.swift SOLO_MESSAGE_HEADER_LENGTH = 8 # Sends Solo's current shot to the app SOLO_MESSAGE_GET_CURRENT_SHOT = 0 SOLO_MESSAGE_SET_CURRENT_SHOT = 1 # send a location SOLO_MESSAGE_LOCATION = 2 # record a position (for cable cam) SOLO_RECORD_POSITION = 3 SOLO_CABLE_CAM_OPTIONS = 4 SOLO_MESSAGE_GET_BUTTON_SETTING = 5 SOLO_MESSAGE_SET_BUTTON_SETTING = 6 SOLO_PAUSE = 7 SOLO_FOLLOW_OPTIONS = 19 SOLO_FOLLOW_OPTIONS_V2 = 119 SOLO_SHOT_OPTIONS = 20 SOLO_SHOT_ERROR = 21 SOLO_PANO_OPTIONS = 22 SOLO_ZIPLINE_OPTIONS = 23 SOLO_REWIND_OPTIONS = 24 SOLO_PANO_STATE = 25 SOLO_HOME_LOCATION = 26 SOLO_POWER_STATE = 27 SOLO_ZIPLINE_LOCK = 28 SOLO_SPLINE_RECORD = 50 SOLO_SPLINE_PLAY = 51 SOLO_SPLINE_POINT = 52 SOLO_SPLINE_SEEK = 53 SOLO_SPLINE_PLAYBACK_STATUS = 54 SOLO_SPLINE_PATH_SETTINGS = 55 SOLO_SPLINE_DURATIONS = 56 SOLO_SPLINE_ATTACH = 57 # Artoo-App messages start at 100 # Shot manager to app messages start at 1000 SOLO_MESSAGE_SHOTMANAGER_ERROR = 1000 # recorded waypoint contents SOLO_CABLE_CAM_WAYPOINT = 1001 # IG shots. ## IG Inspect - app to shotmanager SOLO_INSPECT_START = 10001 SOLO_INSPECT_SET_WAYPOINT = 10002 SOLO_INSPECT_MOVE_GIMBAL = 10003 SOLO_INSPECT_MOVE_VEHICLE = 10004 ## IG Scan SOLO_SCAN_START = 10101 ## IG Survey SOLO_SURVEY_START = 10201 # Geo Fence GEOFENCE_SET_DATA = 3000 GEOFENCE_SET_ACK = 3001 GEOFENCE_UPDATE_POLY = 3002 GEOFENCE_CLEAR = 3003 GEOFENCE_ACTIVATED = 3004 # Gopro control messages GOPRO_SET_ENABLED = 5000 GOPRO_SET_REQUEST = 5001 GOPRO_RECORD = 5003 GOPRO_V1_STATE = 5005 GOPRO_V2_STATE = 5006 GOPRO_REQUEST_STATE = 5007 GOPRO_SET_EXTENDED_REQUEST = 5009 GOPRO_PHOTO = 5020 # Added to Open Solo for solex app photo logging # enums for packet types # failure to enter a shot due to poor ekf SHOT_ERROR_BAD_EKF = 0 # can't enter shot if we're not armed SHOT_ERROR_UNARMED = 1 #can't enter shot if we're RTL SHOT_ERROR_RTL = 2 # status error codes for spline point message SPLINE_ERROR_NONE = 0 SPLINE_ERROR_MODE = -1 SPLINE_ERROR_DUPLICATE = -2
solo_message_header_length = 8 solo_message_get_current_shot = 0 solo_message_set_current_shot = 1 solo_message_location = 2 solo_record_position = 3 solo_cable_cam_options = 4 solo_message_get_button_setting = 5 solo_message_set_button_setting = 6 solo_pause = 7 solo_follow_options = 19 solo_follow_options_v2 = 119 solo_shot_options = 20 solo_shot_error = 21 solo_pano_options = 22 solo_zipline_options = 23 solo_rewind_options = 24 solo_pano_state = 25 solo_home_location = 26 solo_power_state = 27 solo_zipline_lock = 28 solo_spline_record = 50 solo_spline_play = 51 solo_spline_point = 52 solo_spline_seek = 53 solo_spline_playback_status = 54 solo_spline_path_settings = 55 solo_spline_durations = 56 solo_spline_attach = 57 solo_message_shotmanager_error = 1000 solo_cable_cam_waypoint = 1001 solo_inspect_start = 10001 solo_inspect_set_waypoint = 10002 solo_inspect_move_gimbal = 10003 solo_inspect_move_vehicle = 10004 solo_scan_start = 10101 solo_survey_start = 10201 geofence_set_data = 3000 geofence_set_ack = 3001 geofence_update_poly = 3002 geofence_clear = 3003 geofence_activated = 3004 gopro_set_enabled = 5000 gopro_set_request = 5001 gopro_record = 5003 gopro_v1_state = 5005 gopro_v2_state = 5006 gopro_request_state = 5007 gopro_set_extended_request = 5009 gopro_photo = 5020 shot_error_bad_ekf = 0 shot_error_unarmed = 1 shot_error_rtl = 2 spline_error_none = 0 spline_error_mode = -1 spline_error_duplicate = -2
tempo_em_segundo = int(input()) horas = tempo_em_segundo//3600 tempo_em_segundo -= horas*3600 minutos = tempo_em_segundo//60 segundos = tempo_em_segundo - minutos*60 print(f"{horas}:{minutos}:{segundos}")
tempo_em_segundo = int(input()) horas = tempo_em_segundo // 3600 tempo_em_segundo -= horas * 3600 minutos = tempo_em_segundo // 60 segundos = tempo_em_segundo - minutos * 60 print(f'{horas}:{minutos}:{segundos}')
#!/usr/bin/env python def rev(stack): return stack[::-1] def cut(stack, n): return stack[n:] + stack[:n] def incr(stack, n): size = len(stack) new_stack = [-1] * size i = 0 for a in range(size): new_stack[i % size] = stack[a] i += n return new_stack def solve(inp, size): steps = [line.split(' ') for line in inp.strip().splitlines()] stack = list(range(size)) for techn in steps: if techn[1] == 'into': stack = rev(stack) if techn[0] == 'cut': stack = cut(stack, int(techn[1])) if techn[1] == 'with': stack = incr(stack, int(techn[-1])) return stack # with open('test.txt', 'r') as f: # inp = f.read() # print(solve(inp, 10)) with open('input.txt', 'r') as f: inp = f.read() print(solve(inp, 10007).index(2019))
def rev(stack): return stack[::-1] def cut(stack, n): return stack[n:] + stack[:n] def incr(stack, n): size = len(stack) new_stack = [-1] * size i = 0 for a in range(size): new_stack[i % size] = stack[a] i += n return new_stack def solve(inp, size): steps = [line.split(' ') for line in inp.strip().splitlines()] stack = list(range(size)) for techn in steps: if techn[1] == 'into': stack = rev(stack) if techn[0] == 'cut': stack = cut(stack, int(techn[1])) if techn[1] == 'with': stack = incr(stack, int(techn[-1])) return stack with open('input.txt', 'r') as f: inp = f.read() print(solve(inp, 10007).index(2019))
def multiply(a, b): """ Takes two values and returns the product :param a: :param b: :return: product """ res = a * b return res def add(a, b, c): """ Takes two values and returns the addition :param c: :param a: :param b: :return: addition """ res = a + b + c return res # calculate (2.5*3) +4 print(add(multiply(2.5, 3), 4, 0)) # calculate (1*2) +3 print(add(multiply(1, 2), 3, 0)) print(__name__)
def multiply(a, b): """ Takes two values and returns the product :param a: :param b: :return: product """ res = a * b return res def add(a, b, c): """ Takes two values and returns the addition :param c: :param a: :param b: :return: addition """ res = a + b + c return res print(add(multiply(2.5, 3), 4, 0)) print(add(multiply(1, 2), 3, 0)) print(__name__)
class ParseError(Exception): pass class UnsupportedFile(Exception): pass class MultipleParentsGFF(UnsupportedFile): pass
class Parseerror(Exception): pass class Unsupportedfile(Exception): pass class Multipleparentsgff(UnsupportedFile): pass
#Done by Carlos Amaral in 02/07/2020 #Imports def show_messages(text_messages): """Prints the text message in the list.""" print("Showing messages:") for text_message in text_messages: print(text_message) def send_messages(text_messages, sent_messages): """Prints each text message and moves each message to sent message.""" print("\nSending messages:") while text_messages: current_message = text_messages.pop() print(current_message) sent_messages.append(current_message)
def show_messages(text_messages): """Prints the text message in the list.""" print('Showing messages:') for text_message in text_messages: print(text_message) def send_messages(text_messages, sent_messages): """Prints each text message and moves each message to sent message.""" print('\nSending messages:') while text_messages: current_message = text_messages.pop() print(current_message) sent_messages.append(current_message)
class MissingGraphicSettings(Exception): """Error raised when there is no `graphic_settings` dictionary available. """ def __init__(self, msg: str): """Initializes MissingGraphicSettings with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class MissingGraphicInfoField(Exception): """Error raised when a `graphic_settings` dictionary is missing a required field. """ def __init__(self, msg: str): """Initializes MissingGraphicInfoField with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class FontNotFound(Exception): """Error raised when the specified `font_family` of a `graphic_settings` dictionary is not found in the machine. """ def __init__(self, msg: str): """Initializes FontNotFound with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class InvalidColorFormat(Exception): """Error raised when a color of the `color_schemes` field is not given in a valid Hexadecimal format. """ def __init__(self, msg: str): """Initializes InvalidColorFormat with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class InvalidFormatOption(Exception): """Error raised when the default `graphic_settings` format chosen is not a valid option. """ def __init__(self, msg: str): """Initializes InvalidFormatOption with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class InvalidFieldLength(Exception): """Error raised when a `graphic_settings` field that takes a list of values does not have enough values. """ def __init__(self, msg: str): """Initializes InvalidFieldLength with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class MissingDictKeys(Exception): """Error raised when a dictionary does not have all the required fields. """ def __init__(self, msg: str): """Initializes MissingDictKeys with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class MissingTitles(Exception): """Error raised when the `graphic_info` dictionary does not have a `title` field. """ def __init__(self, msg: str): """Initializes MissingTitles with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class MissingQuotes(Exception): """Error raised when the `graphic_info` dictionary does not have a `quote` field. """ def __init__(self, msg: str): """Initializes MissingQuotes with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class MissingTitlesOrQuotes(Exception): """Error raised when the titles and quotes loaded from a .txt file have been loaded in uneven quantity. """ def __init__(self, msg: str): """Initializes MissingTitlesOrQuotes with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg
class Missinggraphicsettings(Exception): """Error raised when there is no `graphic_settings` dictionary available. """ def __init__(self, msg: str): """Initializes MissingGraphicSettings with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class Missinggraphicinfofield(Exception): """Error raised when a `graphic_settings` dictionary is missing a required field. """ def __init__(self, msg: str): """Initializes MissingGraphicInfoField with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class Fontnotfound(Exception): """Error raised when the specified `font_family` of a `graphic_settings` dictionary is not found in the machine. """ def __init__(self, msg: str): """Initializes FontNotFound with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class Invalidcolorformat(Exception): """Error raised when a color of the `color_schemes` field is not given in a valid Hexadecimal format. """ def __init__(self, msg: str): """Initializes InvalidColorFormat with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class Invalidformatoption(Exception): """Error raised when the default `graphic_settings` format chosen is not a valid option. """ def __init__(self, msg: str): """Initializes InvalidFormatOption with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class Invalidfieldlength(Exception): """Error raised when a `graphic_settings` field that takes a list of values does not have enough values. """ def __init__(self, msg: str): """Initializes InvalidFieldLength with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class Missingdictkeys(Exception): """Error raised when a dictionary does not have all the required fields. """ def __init__(self, msg: str): """Initializes MissingDictKeys with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class Missingtitles(Exception): """Error raised when the `graphic_info` dictionary does not have a `title` field. """ def __init__(self, msg: str): """Initializes MissingTitles with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class Missingquotes(Exception): """Error raised when the `graphic_info` dictionary does not have a `quote` field. """ def __init__(self, msg: str): """Initializes MissingQuotes with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg class Missingtitlesorquotes(Exception): """Error raised when the titles and quotes loaded from a .txt file have been loaded in uneven quantity. """ def __init__(self, msg: str): """Initializes MissingTitlesOrQuotes with an error message. Parameters ---------- msg : str The error message. """ self.msg = msg
def show_message(unread_books, read_books): """ List all the book to be read. Print the book to be read, move to read_books. """ while unread_books: toread_book = unread_books.pop() print(f"To read books: {toread_book}") read_books.append(toread_book) def send_message(read_books): print('\n:These books have been read : ') for book in read_books: print(book) unread_books = ['python', 'java', 'c'] read_books = [] show_message(unread_books, read_books) send_message(read_books)
def show_message(unread_books, read_books): """ List all the book to be read. Print the book to be read, move to read_books. """ while unread_books: toread_book = unread_books.pop() print(f'To read books: {toread_book}') read_books.append(toread_book) def send_message(read_books): print('\n:These books have been read : ') for book in read_books: print(book) unread_books = ['python', 'java', 'c'] read_books = [] show_message(unread_books, read_books) send_message(read_books)
""" Finding the percentage https://www.hackerrank.com/challenges/finding-the-percentage/problem """ if __name__ == '__main__': n = int(input()) student_marks = {} for _ in range(n): name, *line = input().split() scores = list(map(float, line)) student_marks[name] = scores query_name = input() print("%.02f" % (sum(student_marks[query_name]) / 3))
""" Finding the percentage https://www.hackerrank.com/challenges/finding-the-percentage/problem """ if __name__ == '__main__': n = int(input()) student_marks = {} for _ in range(n): (name, *line) = input().split() scores = list(map(float, line)) student_marks[name] = scores query_name = input() print('%.02f' % (sum(student_marks[query_name]) / 3))
# m row X n col # Quadrant 1 | Quadrant 2 # ---------------------> # Quadrant 4 | Quadrant 3 # Q1: (x, y) # Q2: (y, m - 1 - x) # Q3: (m - 1 - x, n - 1 - y) # Q4: (n - 1 - y, x) in Q4 # rotate +90 mirror up and down, and switch x and y # rotate -90 mirror left and right, and switch x and y class Solution(object): def rotate(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ # mirror upside down matrix[::-1] # zip switch x and y matrix[:] = zip(*matrix[::-1]) class Solution2(object): def rotate(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ if matrix is None or len(matrix) == 0: return # mirror up and down up = 0 down = len(matrix) - 1 while(up < down): for j in range(len(matrix[0])): matrix[up][j], matrix[down][j] = matrix[down][j], matrix[up][j] up += 1 down -= 1 for i in range(len(matrix)): for j in range(i + 1, len(matrix[i])): matrix[i][j], matrix[j][i] = matrix[j][i], matrix[i][j]
class Solution(object): def rotate(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ matrix[:] = zip(*matrix[::-1]) class Solution2(object): def rotate(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ if matrix is None or len(matrix) == 0: return up = 0 down = len(matrix) - 1 while up < down: for j in range(len(matrix[0])): (matrix[up][j], matrix[down][j]) = (matrix[down][j], matrix[up][j]) up += 1 down -= 1 for i in range(len(matrix)): for j in range(i + 1, len(matrix[i])): (matrix[i][j], matrix[j][i]) = (matrix[j][i], matrix[i][j])
mariadb = dict( ip_address = 'localhost', port = 3307, user = 'root', password = 'password', db = 'cego', users_table = 'users' ) test = dict( query = 'SELECT id, firstName, lastName, email FROM users', filename = 'Test.txt' )
mariadb = dict(ip_address='localhost', port=3307, user='root', password='password', db='cego', users_table='users') test = dict(query='SELECT id, firstName, lastName, email FROM users', filename='Test.txt')
class Graph: def __init__ (self, adj = None): ''' Creates new graph from adjacency list. ''' if adj is None: adj = [] self.adj = adj def GetEdges (self): ''' Returns list of the graph's edges. ''' edges = [] for vertex in self.adj: for edge in self.adj [vertex]: if {edge, vertex} not in edges: edges.append ({vertex, edge}) return edges def AddEdge (self, edge): ''' Adds edge to adj. dict if not present. ''' edge = set (edge) (vertexOne, vertexTwo) = tuple (edge) if vertexOne in self.adj: self.adj [vertexOne].append (vertexTwo) else: self.adj [vertexOne] = [vertexTwo] def GetVertices (self): ''' Returns list of the graph's vertices. ''' return list (self.adj.keys ()) def AddVertex (self, vertex): ''' Adds vertex to adjacency dict as key. ''' if vertex not in self.adj: self.adj [vertex] = []
class Graph: def __init__(self, adj=None): """ Creates new graph from adjacency list. """ if adj is None: adj = [] self.adj = adj def get_edges(self): """ Returns list of the graph's edges. """ edges = [] for vertex in self.adj: for edge in self.adj[vertex]: if {edge, vertex} not in edges: edges.append({vertex, edge}) return edges def add_edge(self, edge): """ Adds edge to adj. dict if not present. """ edge = set(edge) (vertex_one, vertex_two) = tuple(edge) if vertexOne in self.adj: self.adj[vertexOne].append(vertexTwo) else: self.adj[vertexOne] = [vertexTwo] def get_vertices(self): """ Returns list of the graph's vertices. """ return list(self.adj.keys()) def add_vertex(self, vertex): """ Adds vertex to adjacency dict as key. """ if vertex not in self.adj: self.adj[vertex] = []
def euler8(): """Solves problem 7 of Project Euler.""" big = "73167176531330624919225119674426574742355349194934" big += "96983520312774506326239578318016984801869478851843" big += "85861560789112949495459501737958331952853208805511" big += "12540698747158523863050715693290963295227443043557" big += "66896648950445244523161731856403098711121722383113" big += "62229893423380308135336276614282806444486645238749" big += "30358907296290491560440772390713810515859307960866" big += "70172427121883998797908792274921901699720888093776" big += "65727333001053367881220235421809751254540594752243" big += "52584907711670556013604839586446706324415722155397" big += "53697817977846174064955149290862569321978468622482" big += "83972241375657056057490261407972968652414535100474" big += "82166370484403199890008895243450658541227588666881" big += "16427171479924442928230863465674813919123162824586" big += "17866458359124566529476545682848912883142607690042" big += "24219022671055626321111109370544217506941658960408" big += "07198403850962455444362981230987879927244284909188" big += "84580156166097919133875499200524063689912560717606" big += "05886116467109405077541002256983155200055935729725" big += "71636269561882670428252483600823257530420752963450" maxprod = 1 for i in range(len(big) - 5): prod = 1 for j in map(int, big[i:i+5]): prod *= j maxprod = max(prod, maxprod) print(maxprod) if __name__ == "__main__": euler8()
def euler8(): """Solves problem 7 of Project Euler.""" big = '73167176531330624919225119674426574742355349194934' big += '96983520312774506326239578318016984801869478851843' big += '85861560789112949495459501737958331952853208805511' big += '12540698747158523863050715693290963295227443043557' big += '66896648950445244523161731856403098711121722383113' big += '62229893423380308135336276614282806444486645238749' big += '30358907296290491560440772390713810515859307960866' big += '70172427121883998797908792274921901699720888093776' big += '65727333001053367881220235421809751254540594752243' big += '52584907711670556013604839586446706324415722155397' big += '53697817977846174064955149290862569321978468622482' big += '83972241375657056057490261407972968652414535100474' big += '82166370484403199890008895243450658541227588666881' big += '16427171479924442928230863465674813919123162824586' big += '17866458359124566529476545682848912883142607690042' big += '24219022671055626321111109370544217506941658960408' big += '07198403850962455444362981230987879927244284909188' big += '84580156166097919133875499200524063689912560717606' big += '05886116467109405077541002256983155200055935729725' big += '71636269561882670428252483600823257530420752963450' maxprod = 1 for i in range(len(big) - 5): prod = 1 for j in map(int, big[i:i + 5]): prod *= j maxprod = max(prod, maxprod) print(maxprod) if __name__ == '__main__': euler8()
def philosophy(statement): def thought(): return statement return thought question = philosophy('To B, or not to B. It depends where the bomb is.') print(question())
def philosophy(statement): def thought(): return statement return thought question = philosophy('To B, or not to B. It depends where the bomb is.') print(question())
class Solution: def generateParenthesis(self, n): """ :type n: int :rtype: List[str] """ def foo(l, r, path): if l == 0 and r == 0 : res.append(path[:]) return if r >= l: if l != 0: foo(l-1, r, path+'{') if r != 0: foo(l, r-1, path+'}') res = [] foo(n-1, n, "{") print(res) return res ne = Solution() ne.generateParenthesis(10)
class Solution: def generate_parenthesis(self, n): """ :type n: int :rtype: List[str] """ def foo(l, r, path): if l == 0 and r == 0: res.append(path[:]) return if r >= l: if l != 0: foo(l - 1, r, path + '{') if r != 0: foo(l, r - 1, path + '}') res = [] foo(n - 1, n, '{') print(res) return res ne = solution() ne.generateParenthesis(10)
class Solution: def numMatchingSubseq(self, S, words): """ :type S: str :type words: List[str] :rtype: int """ d = collections.defaultdict(list) for word in words: d[word[0]].append(word[1:]) cnt = 0 for ch in S: if ch in d: for item in d.pop(ch): if len(item) == 0: cnt += 1 else: d[item[0]].append(item[1:]) return cnt
class Solution: def num_matching_subseq(self, S, words): """ :type S: str :type words: List[str] :rtype: int """ d = collections.defaultdict(list) for word in words: d[word[0]].append(word[1:]) cnt = 0 for ch in S: if ch in d: for item in d.pop(ch): if len(item) == 0: cnt += 1 else: d[item[0]].append(item[1:]) return cnt
pass # import os # from unittest.mock import MagicMock, patch # import pytest # from JumpscaleZrobot.test.utils import ZrobotBaseTest, mock_decorator # from node_port_manager import NODE_CLIENT, NodePortManager # from zerorobot.template.state import StateCheckError # import itertools # class TestNodePortManagerTemplate(ZrobotBaseTest): # @classmethod # def setUpClass(cls): # super().preTest(os.path.dirname(__file__), NodePortManager) # def setUp(self): # patch('jumpscale.j.clients', MagicMock()).start() # def tearDown(self): # patch.stopall() # def test_reserve(self): # node_sal = MagicMock() # def freeports(nrports=1): # import itertools # i = 0 # def f(): # while True: # yield i # i += 1 # iter = f() # return list(itertools.islice(iter, nrports)) # node_sal.freeports = freeports # # get_node = patch('jumpscale.j.clients.zos.get', MagicMock(return_value=node_sal)).start() # mgr = NodePortManager(name="name")
pass
test = { 'name': 'q41', 'points': 1, 'suites': [ { 'cases': [ { 'code': '>>> # Oops, your name is assigned to the wrong data type!;\n' '>>> type(year_population_crossed_6_billion) == int or type(year_population_crossed_6_billion) == np.int32\n' 'True', 'hidden': False, 'locked': False}, {'code': '>>> year_population_crossed_6_billion == 1999\nTrue', 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]}
test = {'name': 'q41', 'points': 1, 'suites': [{'cases': [{'code': '>>> # Oops, your name is assigned to the wrong data type!;\n>>> type(year_population_crossed_6_billion) == int or type(year_population_crossed_6_billion) == np.int32\nTrue', 'hidden': False, 'locked': False}, {'code': '>>> year_population_crossed_6_billion == 1999\nTrue', 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]}
class RtlSignalBase(): """ Main base class for all rtl signals """ pass class RtlMemoryBase(RtlSignalBase): """ Main base class for all rtl memories """ pass
class Rtlsignalbase: """ Main base class for all rtl signals """ pass class Rtlmemorybase(RtlSignalBase): """ Main base class for all rtl memories """ pass
class UrlConstructor: def __init__(self, key='', base_url='https://androzoo.uni.lu/api/download?apikey={0}&sha256={01}'): self.base_url = base_url self.key = key def construct(self, apk): return self.base_url.format(self.key, apk.sha256)
class Urlconstructor: def __init__(self, key='', base_url='https://androzoo.uni.lu/api/download?apikey={0}&sha256={01}'): self.base_url = base_url self.key = key def construct(self, apk): return self.base_url.format(self.key, apk.sha256)
class Node: def __init__(self,data=None,next=None,position = 0): self.data = data self.next = next self.position = position class LinkedList: def __init__(self) -> None: self.head = None # Initialising the head as None def insetElement(self,data): newNode = Node(data) # Creates a new node if self.head: current = self.head while current.next: current = current.next current.next = newNode else: self.head = newNode def size(self): count = 0 current = self.head while current != None: count += 1 current = current.next return count def addLast(self,data): new_node = Node(data) # if our nexted list is empty we create a new node if self.head is None: self.head = new_node return # if our nexted list is not empty we traverse and insert at last last = self.head while (last.next): last = last.next last.next = new_node def addFirst(self,data): # Create a new node with the data newNode = Node(data) # Swap our head as new node and rest of the element as next newNode.next,self.head = self.head,newNode def getFirst(self): if self.size() == 0: return 'No element in list' # As we know the first data is head so we just returning the head of our nexted list return self.head.data def getLast(self): if self.size() == 0: return 'No element in list' return self.display()[-1] def fetch(self,index): current = self.head count = 0 if self.size() == 0: return 'No element in list' # traversing the node and if our count matches the index then we return the data while current: if count == index: return current.data count += 1 current = current.next return 'List Index outbound' ''' # Method 1 using while loop def fropple(self): current = self.head while current and current.next: if current.data != current.next.data: current.data,current.next.data = current.next.data,current.data current = current.next.next return current.data ''' ''' Method 2 def swapNodes(self): cur = self.head while cur and cur.next: cur.data, cur.next.data = cur.next.data, cur.data cur = cur.next.next return head ''' def swapElement(self): current = self.head if self.size() == 0: return 'No element in the list' for i in range(self.size()): if i % 2 == 0: current.data,current.next.data = current.next.data,current.data return current.data def appendLinkedList(self,newList): current = self.head # if our head is null so we assign the head as new list if current is None: current = newList # dummy head last = self.head while last.next != None: last = last.next # adding the new list at last using addLast method last.next = self.addLast(Node(newList)) ''' def mergeAlternate(self, q): p_curr = self.head q_curr = q.head # While there are available positions in p; while p_curr != None and q_curr != None: # Save next pointers p_next = p_curr.next q_next = q_curr.next # make q_curr as next of p_curr q_curr.next = p_next # change next pointer of q_curr p_curr.next = q_curr # change next pointer of p_curr # update current pointers for next iteration p_curr = p_next q_curr = q_next q.head = q_curr ''' def reverse(self): prev = None current = self.head while current is not None: nextElement = current.next current.next = prev prev = current current = nextElement self.head = prev def sortList(self): swap = 0 current = self.head if current != None: while(1): swap = 0 tmp = current while(tmp.next != None): if tmp.data > tmp.next.data: # swap them swap += 1 p = tmp.data tmp.data = tmp.next.data tmp.next.data = p tmp = tmp.next else: tmp = tmp.next if swap == 0: break else: continue return current return current def index(self,item): current = self.head while current != None: if current.data == item: return current.position current = current.next # return def InsertNth(self, data, position): start = self.head if position == 0: return Node(data, self.head) while position > 1: self.head = self.head.next position -= 1 self.head.next = Node(data, self.head.next) return start def insertElements(self,newData): current = self.head # if the data not in linked list add at first if newData != current.data: self.addFirst(newData) while current != None: if current.data == newData: self.InsertNth(newData,self.index(current.data)+1) current = current.next # return self.sortList() # Method to display the list def display(self): if self.size() == 0: return 'No element in list' output = [] current = self.head while(current): output.append(current.data) # print(current.data) current = current.next return output
class Node: def __init__(self, data=None, next=None, position=0): self.data = data self.next = next self.position = position class Linkedlist: def __init__(self) -> None: self.head = None def inset_element(self, data): new_node = node(data) if self.head: current = self.head while current.next: current = current.next current.next = newNode else: self.head = newNode def size(self): count = 0 current = self.head while current != None: count += 1 current = current.next return count def add_last(self, data): new_node = node(data) if self.head is None: self.head = new_node return last = self.head while last.next: last = last.next last.next = new_node def add_first(self, data): new_node = node(data) (newNode.next, self.head) = (self.head, newNode) def get_first(self): if self.size() == 0: return 'No element in list' return self.head.data def get_last(self): if self.size() == 0: return 'No element in list' return self.display()[-1] def fetch(self, index): current = self.head count = 0 if self.size() == 0: return 'No element in list' while current: if count == index: return current.data count += 1 current = current.next return 'List Index outbound' '\n # Method 1 using while loop\n def fropple(self):\n current = self.head\n while current and current.next:\n if current.data != current.next.data:\n current.data,current.next.data = current.next.data,current.data\n current = current.next.next\n return current.data\n ' ' Method 2 \n def swapNodes(self):\n cur = self.head\n while cur and cur.next:\n cur.data, cur.next.data = cur.next.data, cur.data\n cur = cur.next.next\n \n return head\n ' def swap_element(self): current = self.head if self.size() == 0: return 'No element in the list' for i in range(self.size()): if i % 2 == 0: (current.data, current.next.data) = (current.next.data, current.data) return current.data def append_linked_list(self, newList): current = self.head if current is None: current = newList last = self.head while last.next != None: last = last.next last.next = self.addLast(node(newList)) '\n def mergeAlternate(self, q):\n p_curr = self.head\n q_curr = q.head\n \n # While there are available positions in p;\n while p_curr != None and q_curr != None:\n \n # Save next pointers\n p_next = p_curr.next\n q_next = q_curr.next\n \n # make q_curr as next of p_curr\n q_curr.next = p_next # change next pointer of q_curr\n p_curr.next = q_curr # change next pointer of p_curr\n \n # update current pointers for next iteration\n p_curr = p_next\n q_curr = q_next\n q.head = q_curr\n ' def reverse(self): prev = None current = self.head while current is not None: next_element = current.next current.next = prev prev = current current = nextElement self.head = prev def sort_list(self): swap = 0 current = self.head if current != None: while 1: swap = 0 tmp = current while tmp.next != None: if tmp.data > tmp.next.data: swap += 1 p = tmp.data tmp.data = tmp.next.data tmp.next.data = p tmp = tmp.next else: tmp = tmp.next if swap == 0: break else: continue return current return current def index(self, item): current = self.head while current != None: if current.data == item: return current.position current = current.next def insert_nth(self, data, position): start = self.head if position == 0: return node(data, self.head) while position > 1: self.head = self.head.next position -= 1 self.head.next = node(data, self.head.next) return start def insert_elements(self, newData): current = self.head if newData != current.data: self.addFirst(newData) while current != None: if current.data == newData: self.InsertNth(newData, self.index(current.data) + 1) current = current.next def display(self): if self.size() == 0: return 'No element in list' output = [] current = self.head while current: output.append(current.data) current = current.next return output
def solution(A): count = [] len_a = len(A) for i in range(len_a): sub_count = 0 for j in range(len_a): if i != j and A[i] % A[j] != 0: sub_count += 1 count.append(sub_count) return count print(solution([3, 1, 2, 3, 6]))
def solution(A): count = [] len_a = len(A) for i in range(len_a): sub_count = 0 for j in range(len_a): if i != j and A[i] % A[j] != 0: sub_count += 1 count.append(sub_count) return count print(solution([3, 1, 2, 3, 6]))
""" Module: 'array' on esp32 1.12.0 """ # MCU: (sysname='esp32', nodename='esp32', release='1.12.0', version='v1.12 on 2019-12-26', machine='ESP32 module with ESP32') # Stubber: 1.3.2 class array: '' def append(): pass def decode(): pass def extend(): pass
""" Module: 'array' on esp32 1.12.0 """ class Array: """""" def append(): pass def decode(): pass def extend(): pass
# def isPrime(number): # counter = 2 # isPrime = True # # while counter < number: # if number % counter == 0: # isPrime = False # break # # counter = counter + 1 # # return isPrime # function isPrime def isPrime(number): counter = 2 while counter < number: if number % counter == 0: return False counter = counter + 1 return True # main Code print("Give me a number?") inputNum = int(input()) if isPrime(inputNum): print("It's a prime") else: print("It's not a prime")
def is_prime(number): counter = 2 while counter < number: if number % counter == 0: return False counter = counter + 1 return True print('Give me a number?') input_num = int(input()) if is_prime(inputNum): print("It's a prime") else: print("It's not a prime")
i = 0 num = int(input("Enter your number:- ")) while i <= num: if num > 0: print("it is positive") elif num < 0: print("it is negative") else : print("zero") i = i + 1
i = 0 num = int(input('Enter your number:- ')) while i <= num: if num > 0: print('it is positive') elif num < 0: print('it is negative') else: print('zero') i = i + 1
DATA = { "B01003_001E": "Total Population", "B01002_001E": "Median Age", "B11005_001E": "Total Households Age", "B11005_002E": "Total Households With Under 18", # household income "B19013_001E": "Median Household Income", "B19001_001E": "Total Households Income", "B19001_002E": "Household Income $0 - $10,000", "B19001_003E": "Household Income $10,000 - $14,999", "B19001_004E": "Household Income $15,000 - $19,999", "B19001_005E": "Household Income $20,000 - $24,999", "B19001_006E": "Household Income $25,000 - $29,999", "B19001_007E": "Household Income $30,000 - $34,999", "B19001_008E": "Household Income $35,000 - $39,999", "B19001_009E": "Household Income $40,000 - $44,999", "B19001_010E": "Household Income $45,000 - $49,999", "B19001_011E": "Household Income $50,000 - $59,999", "B19001_012E": "Household Income $60,000 - $74,999", "B19001_013E": "Household Income $75,000 - $99,999", "B19001_014E": "Household Income $100,000 - $124,999", "B19001_015E": "Household Income $125,000 - $149,999", "B19001_016E": "Household Income $150,000 - $199,999", "B19001_017E": "Household Income $200,000+", # population by age "B01001_001E": "Total", "B01001_002E": "Male", "B01001_003E": "Male - Under 5 years", "B01001_004E": "Male - 5 to 9 years", "B01001_005E": "Male - 10 to 14 years", "B01001_006E": "Male - 15 to 17 years", "B01001_007E": "Male - 18 and 19 years", "B01001_008E": "Male - 20 years", "B01001_009E": "Male - 21 years", "B01001_010E": "Male - 22 to 24 years", "B01001_011E": "Male - 25 to 29 years", "B01001_012E": "Male - 30 to 34 years", "B01001_013E": "Male - 35 to 39 years", "B01001_014E": "Male - 40 to 44 years", "B01001_015E": "Male - 45 to 49 years", "B01001_016E": "Male - 50 to 54 years", "B01001_017E": "Male - 55 to 59 years", "B01001_018E": "Male - 60 and 61 years", "B01001_019E": "Male - 62 to 64 years", "B01001_020E": "Male - 65 and 66 years", "B01001_021E": "Male - 67 to 69 years", "B01001_022E": "Male - 70 to 74 years", "B01001_023E": "Male - 75 to 79 years", "B01001_024E": "Male - 80 to 84 years", "B01001_025E": "Male - 85+ years", "B01001_026E": "Female", "B01001_027E": "Female - Under 5 years", "B01001_028E": "Female - 5 to 9 years", "B01001_029E": "Female - 10 to 14 years", "B01001_030E": "Female - 15 to 17 years", "B01001_031E": "Female - 18 and 19 years", "B01001_032E": "Female - 20 years", "B01001_033E": "Female - 21 years", "B01001_034E": "Female - 22 to 24 years", "B01001_035E": "Female - 25 to 29 years", "B01001_036E": "Female - 30 to 34 years", "B01001_037E": "Female - 35 to 39 years", "B01001_038E": "Female - 40 to 44 years", "B01001_039E": "Female - 45 to 49 years", "B01001_040E": "Female - 50 to 54 years", "B01001_041E": "Female - 55 to 59 years", "B01001_042E": "Female - 60 and 61 years", "B01001_043E": "Female - 62 to 64 years", "B01001_044E": "Female - 65 and 66 years", "B01001_045E": "Female - 67 to 69 years", "B01001_046E": "Female - 70 to 74 years", "B01001_047E": "Female - 75 to 79 years", "B01001_048E": "Female - 80 to 84 years", "B01001_049E": "Female - 85+ years", # ethnicity distribution "B04003_001E": "Ethnicity Total", "B04003_002E": "Afghan", "B04003_003E": "Albanian", "B04003_004E": "Alsatian", "B04003_005E": "American", "B04003_006E": "Arab", "B04003_007E": "Arab - Egyptian", "B04003_008E": "Arab - Iraqi", "B04003_009E": "Arab - Jordanian", "B04003_010E": "Arab - Lebanese", "B04003_011E": "Arab - Moroccan", "B04003_012E": "Arab - Palestinian", "B04003_013E": "Arab - Syrian", "B04003_014E": "Arab - Arab", "B04003_015E": "Arab - Other Arab", "B04003_016E": "Armenian", "B04003_017E": "Assyrian/Chaldean/Syriac", "B04003_018E": "Australian", "B04003_019E": "Austrian", "B04003_020E": "Basque", "B04003_021E": "Belgian", "B04003_022E": "Brazilian", "B04003_023E": "British", "B04003_024E": "Bulgarian", "B04003_025E": "Cajun", "B04003_026E": "Canadian", "B04003_027E": "Carpatho Rusyn", "B04003_028E": "Celtic", "B04003_029E": "Croatian", "B04003_030E": "Cypriot", "B04003_031E": "Czech", "B04003_032E": "Czechoslovakian", "B04003_033E": "Danish", "B04003_034E": "Dutch", "B04003_035E": "Eastern European", "B04003_036E": "English", "B04003_037E": "Estonian", "B04003_038E": "European", "B04003_039E": "Finnish", "B04003_040E": "French (except Basque)", "B04003_041E": "French Canadian", "B04003_042E": "German", "B04003_043E": "German Russian", "B04003_044E": "Greek", "B04003_045E": "Guyanese", "B04003_046E": "Hungarian", "B04003_047E": "Icelander", "B04003_048E": "Iranian", "B04003_049E": "Irish", "B04003_050E": "Israeli", "B04003_051E": "Italian", "B04003_052E": "Latvian", "B04003_053E": "Lithuanian", "B04003_054E": "Luxemburger", "B04003_055E": "Macedonian", "B04003_056E": "Maltese", "B04003_057E": "New Zealander", "B04003_058E": "Northern European", "B04003_059E": "Norwegian", "B04003_060E": "Pennsylvania German", "B04003_061E": "Polish", "B04003_062E": "Portuguese", "B04003_063E": "Romanian", "B04003_064E": "Russian", "B04003_065E": "Scandinavian", "B04003_066E": "Scotch-Irish", "B04003_067E": "Scottish", "B04003_068E": "Serbian", "B04003_069E": "Slavic", "B04003_070E": "Slovak", "B04003_071E": "Slovene", "B04003_072E": "Soviet Union", "B04003_073E": "Subsaharan African", "B04003_074E": "Subsaharan African - Cape Verdean", "B04003_075E": "Subsaharan African - Ethiopian", "B04003_076E": "Subsaharan African - Ghanaian", "B04003_077E": "Subsaharan African - Kenyan", "B04003_078E": "Subsaharan African - Liberian", "B04003_079E": "Subsaharan African - Nigerian", "B04003_080E": "Subsaharan African - Senegalese", "B04003_081E": "Subsaharan African - Sierra Leonean", "B04003_082E": "Subsaharan African - Somalian", "B04003_083E": "Subsaharan African - South African", "B04003_084E": "Subsaharan African - Sudanese", "B04003_085E": "Subsaharan African - Ugandan", "B04003_086E": "Subsaharan African - Zimbabwean", "B04003_087E": "Subsaharan African - African", "B04003_088E": "Subsaharan African - Other Subsaharan African", "B04003_089E": "Swedish", "B04003_090E": "Swiss", "B04003_091E": "Turkish", "B04003_092E": "Ukrainian", "B04003_093E": "Welsh", "B04003_094E": "West Indian", "B04003_095E": "West Indian - Bahamian", "B04003_096E": "West Indian - Barbadian", "B04003_097E": "West Indian - Belizean", "B04003_098E": "West Indian - Bermudan", "B04003_099E": "West Indian - British West Indian", "B04003_100E": "West Indian - Dutch West Indian", "B04003_101E": "West Indian - Haitian", "B04003_102E": "West Indian - Jamaican", "B04003_103E": "West Indian - Trinidadian and Tobagonian", "B04003_104E": "West Indian - U.S. Virgin Islander", "B04003_105E": "West Indian - West Indian", "B04003_106E": "West Indian - Other West Indian", "B04003_107E": "Yugoslavian", "B04003_108E": "Other groups", # # new as of 2012-12-03 # # rent "B25058_001E": "Median contract rent", "B25064_001E": "Median gross rent", # owning "B25077_001E": "Median value (dollars)", # own v rent #"B25003_001E": "Total", "B25003_002E": "Owner occupied", "B25003_003E": "Renter occupied", # # new as of 2012-12-05 # # means of transportation to work "B08301_001E": "Total", "B08301_002E": "Car, truck, or van", #### "B08301_003E": "Drove alone", "B08301_004E": "Carpooled", "B08301_005E": "In 2-person carpool", "B08301_006E": "In 3-person carpool", "B08301_007E": "In 4-person carpool", "B08301_008E": "In 5- or 6-person carpool", "B08301_009E": "In 7-or-more-person carpool", "B08301_010E": "Public transportation (excluding taxicab)", #### "B08301_011E": "Bus or trolley bus", "B08301_012E": "Streetcar or trolley car (carro publico in Puerto Rico)", "B08301_013E": "Subway or elevated", "B08301_014E": "Railroad", "B08301_015E": "Ferryboat", "B08301_016E": "Taxicab", #### "B08301_017E": "Motorcycle", #### "B08301_018E": "Bicycle", #### "B08301_019E": "Walked", #### "B08301_020E": "Other means", #### "B08301_021E": "Worked at home", #### # # new as of 2012-12-11 # "B25035_001E": "Median year structure built", }
data = {'B01003_001E': 'Total Population', 'B01002_001E': 'Median Age', 'B11005_001E': 'Total Households Age', 'B11005_002E': 'Total Households With Under 18', 'B19013_001E': 'Median Household Income', 'B19001_001E': 'Total Households Income', 'B19001_002E': 'Household Income $0 - $10,000', 'B19001_003E': 'Household Income $10,000 - $14,999', 'B19001_004E': 'Household Income $15,000 - $19,999', 'B19001_005E': 'Household Income $20,000 - $24,999', 'B19001_006E': 'Household Income $25,000 - $29,999', 'B19001_007E': 'Household Income $30,000 - $34,999', 'B19001_008E': 'Household Income $35,000 - $39,999', 'B19001_009E': 'Household Income $40,000 - $44,999', 'B19001_010E': 'Household Income $45,000 - $49,999', 'B19001_011E': 'Household Income $50,000 - $59,999', 'B19001_012E': 'Household Income $60,000 - $74,999', 'B19001_013E': 'Household Income $75,000 - $99,999', 'B19001_014E': 'Household Income $100,000 - $124,999', 'B19001_015E': 'Household Income $125,000 - $149,999', 'B19001_016E': 'Household Income $150,000 - $199,999', 'B19001_017E': 'Household Income $200,000+', 'B01001_001E': 'Total', 'B01001_002E': 'Male', 'B01001_003E': 'Male - Under 5 years', 'B01001_004E': 'Male - 5 to 9 years', 'B01001_005E': 'Male - 10 to 14 years', 'B01001_006E': 'Male - 15 to 17 years', 'B01001_007E': 'Male - 18 and 19 years', 'B01001_008E': 'Male - 20 years', 'B01001_009E': 'Male - 21 years', 'B01001_010E': 'Male - 22 to 24 years', 'B01001_011E': 'Male - 25 to 29 years', 'B01001_012E': 'Male - 30 to 34 years', 'B01001_013E': 'Male - 35 to 39 years', 'B01001_014E': 'Male - 40 to 44 years', 'B01001_015E': 'Male - 45 to 49 years', 'B01001_016E': 'Male - 50 to 54 years', 'B01001_017E': 'Male - 55 to 59 years', 'B01001_018E': 'Male - 60 and 61 years', 'B01001_019E': 'Male - 62 to 64 years', 'B01001_020E': 'Male - 65 and 66 years', 'B01001_021E': 'Male - 67 to 69 years', 'B01001_022E': 'Male - 70 to 74 years', 'B01001_023E': 'Male - 75 to 79 years', 'B01001_024E': 'Male - 80 to 84 years', 'B01001_025E': 'Male - 85+ years', 'B01001_026E': 'Female', 'B01001_027E': 'Female - Under 5 years', 'B01001_028E': 'Female - 5 to 9 years', 'B01001_029E': 'Female - 10 to 14 years', 'B01001_030E': 'Female - 15 to 17 years', 'B01001_031E': 'Female - 18 and 19 years', 'B01001_032E': 'Female - 20 years', 'B01001_033E': 'Female - 21 years', 'B01001_034E': 'Female - 22 to 24 years', 'B01001_035E': 'Female - 25 to 29 years', 'B01001_036E': 'Female - 30 to 34 years', 'B01001_037E': 'Female - 35 to 39 years', 'B01001_038E': 'Female - 40 to 44 years', 'B01001_039E': 'Female - 45 to 49 years', 'B01001_040E': 'Female - 50 to 54 years', 'B01001_041E': 'Female - 55 to 59 years', 'B01001_042E': 'Female - 60 and 61 years', 'B01001_043E': 'Female - 62 to 64 years', 'B01001_044E': 'Female - 65 and 66 years', 'B01001_045E': 'Female - 67 to 69 years', 'B01001_046E': 'Female - 70 to 74 years', 'B01001_047E': 'Female - 75 to 79 years', 'B01001_048E': 'Female - 80 to 84 years', 'B01001_049E': 'Female - 85+ years', 'B04003_001E': 'Ethnicity Total', 'B04003_002E': 'Afghan', 'B04003_003E': 'Albanian', 'B04003_004E': 'Alsatian', 'B04003_005E': 'American', 'B04003_006E': 'Arab', 'B04003_007E': 'Arab - Egyptian', 'B04003_008E': 'Arab - Iraqi', 'B04003_009E': 'Arab - Jordanian', 'B04003_010E': 'Arab - Lebanese', 'B04003_011E': 'Arab - Moroccan', 'B04003_012E': 'Arab - Palestinian', 'B04003_013E': 'Arab - Syrian', 'B04003_014E': 'Arab - Arab', 'B04003_015E': 'Arab - Other Arab', 'B04003_016E': 'Armenian', 'B04003_017E': 'Assyrian/Chaldean/Syriac', 'B04003_018E': 'Australian', 'B04003_019E': 'Austrian', 'B04003_020E': 'Basque', 'B04003_021E': 'Belgian', 'B04003_022E': 'Brazilian', 'B04003_023E': 'British', 'B04003_024E': 'Bulgarian', 'B04003_025E': 'Cajun', 'B04003_026E': 'Canadian', 'B04003_027E': 'Carpatho Rusyn', 'B04003_028E': 'Celtic', 'B04003_029E': 'Croatian', 'B04003_030E': 'Cypriot', 'B04003_031E': 'Czech', 'B04003_032E': 'Czechoslovakian', 'B04003_033E': 'Danish', 'B04003_034E': 'Dutch', 'B04003_035E': 'Eastern European', 'B04003_036E': 'English', 'B04003_037E': 'Estonian', 'B04003_038E': 'European', 'B04003_039E': 'Finnish', 'B04003_040E': 'French (except Basque)', 'B04003_041E': 'French Canadian', 'B04003_042E': 'German', 'B04003_043E': 'German Russian', 'B04003_044E': 'Greek', 'B04003_045E': 'Guyanese', 'B04003_046E': 'Hungarian', 'B04003_047E': 'Icelander', 'B04003_048E': 'Iranian', 'B04003_049E': 'Irish', 'B04003_050E': 'Israeli', 'B04003_051E': 'Italian', 'B04003_052E': 'Latvian', 'B04003_053E': 'Lithuanian', 'B04003_054E': 'Luxemburger', 'B04003_055E': 'Macedonian', 'B04003_056E': 'Maltese', 'B04003_057E': 'New Zealander', 'B04003_058E': 'Northern European', 'B04003_059E': 'Norwegian', 'B04003_060E': 'Pennsylvania German', 'B04003_061E': 'Polish', 'B04003_062E': 'Portuguese', 'B04003_063E': 'Romanian', 'B04003_064E': 'Russian', 'B04003_065E': 'Scandinavian', 'B04003_066E': 'Scotch-Irish', 'B04003_067E': 'Scottish', 'B04003_068E': 'Serbian', 'B04003_069E': 'Slavic', 'B04003_070E': 'Slovak', 'B04003_071E': 'Slovene', 'B04003_072E': 'Soviet Union', 'B04003_073E': 'Subsaharan African', 'B04003_074E': 'Subsaharan African - Cape Verdean', 'B04003_075E': 'Subsaharan African - Ethiopian', 'B04003_076E': 'Subsaharan African - Ghanaian', 'B04003_077E': 'Subsaharan African - Kenyan', 'B04003_078E': 'Subsaharan African - Liberian', 'B04003_079E': 'Subsaharan African - Nigerian', 'B04003_080E': 'Subsaharan African - Senegalese', 'B04003_081E': 'Subsaharan African - Sierra Leonean', 'B04003_082E': 'Subsaharan African - Somalian', 'B04003_083E': 'Subsaharan African - South African', 'B04003_084E': 'Subsaharan African - Sudanese', 'B04003_085E': 'Subsaharan African - Ugandan', 'B04003_086E': 'Subsaharan African - Zimbabwean', 'B04003_087E': 'Subsaharan African - African', 'B04003_088E': 'Subsaharan African - Other Subsaharan African', 'B04003_089E': 'Swedish', 'B04003_090E': 'Swiss', 'B04003_091E': 'Turkish', 'B04003_092E': 'Ukrainian', 'B04003_093E': 'Welsh', 'B04003_094E': 'West Indian', 'B04003_095E': 'West Indian - Bahamian', 'B04003_096E': 'West Indian - Barbadian', 'B04003_097E': 'West Indian - Belizean', 'B04003_098E': 'West Indian - Bermudan', 'B04003_099E': 'West Indian - British West Indian', 'B04003_100E': 'West Indian - Dutch West Indian', 'B04003_101E': 'West Indian - Haitian', 'B04003_102E': 'West Indian - Jamaican', 'B04003_103E': 'West Indian - Trinidadian and Tobagonian', 'B04003_104E': 'West Indian - U.S. Virgin Islander', 'B04003_105E': 'West Indian - West Indian', 'B04003_106E': 'West Indian - Other West Indian', 'B04003_107E': 'Yugoslavian', 'B04003_108E': 'Other groups', 'B25058_001E': 'Median contract rent', 'B25064_001E': 'Median gross rent', 'B25077_001E': 'Median value (dollars)', 'B25003_002E': 'Owner occupied', 'B25003_003E': 'Renter occupied', 'B08301_001E': 'Total', 'B08301_002E': 'Car, truck, or van', 'B08301_003E': 'Drove alone', 'B08301_004E': 'Carpooled', 'B08301_005E': 'In 2-person carpool', 'B08301_006E': 'In 3-person carpool', 'B08301_007E': 'In 4-person carpool', 'B08301_008E': 'In 5- or 6-person carpool', 'B08301_009E': 'In 7-or-more-person carpool', 'B08301_010E': 'Public transportation (excluding taxicab)', 'B08301_011E': 'Bus or trolley bus', 'B08301_012E': 'Streetcar or trolley car (carro publico in Puerto Rico)', 'B08301_013E': 'Subway or elevated', 'B08301_014E': 'Railroad', 'B08301_015E': 'Ferryboat', 'B08301_016E': 'Taxicab', 'B08301_017E': 'Motorcycle', 'B08301_018E': 'Bicycle', 'B08301_019E': 'Walked', 'B08301_020E': 'Other means', 'B08301_021E': 'Worked at home', 'B25035_001E': 'Median year structure built'}