content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
def lcs(str1, str2):
if not str1 or not str2:
return ""
x, xs, y, ys = str1[0], str1[1:], str2[0], str2[1:]
if x == y:
return x + lcs(xs, ys)
else:
return max(lcs(str1, ys), lcs(xs, str2), key=len)
def ascii_deletion_distance(str1, str2):
sub = lcs(str1,str2)
x,y,= sum([ord(c) for c in str1]),sum([ord(c) for c in str2])
z = sum([ord(c) for c in sub])
result = x + y - 2 * z
return result
print(ascii_deletion_distance("at","cat")) | def lcs(str1, str2):
if not str1 or not str2:
return ''
(x, xs, y, ys) = (str1[0], str1[1:], str2[0], str2[1:])
if x == y:
return x + lcs(xs, ys)
else:
return max(lcs(str1, ys), lcs(xs, str2), key=len)
def ascii_deletion_distance(str1, str2):
sub = lcs(str1, str2)
(x, y) = (sum([ord(c) for c in str1]), sum([ord(c) for c in str2]))
z = sum([ord(c) for c in sub])
result = x + y - 2 * z
return result
print(ascii_deletion_distance('at', 'cat')) |
class SimulationResult:
def __init__(self, initialTileList, coordinateList, moves, attackStrategy):
self.initialTileList = initialTileList
self.coordinateList = coordinateList
self.moves = moves
self.attackStrategy = attackStrategy
def SimulationResultString(self):
return self.attackStrategy + ' completed in ' + str(self.moves) + ' moves'
| class Simulationresult:
def __init__(self, initialTileList, coordinateList, moves, attackStrategy):
self.initialTileList = initialTileList
self.coordinateList = coordinateList
self.moves = moves
self.attackStrategy = attackStrategy
def simulation_result_string(self):
return self.attackStrategy + ' completed in ' + str(self.moves) + ' moves' |
""" Each new term in the Fibonacci sequence is generated by
adding the previous two terms. By starting with 1 and 2,
the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
By considering the terms in the Fibonacci sequence
whose values do not exceed four million, find
the sum of the even-valued terms. """
# Author: Monirul Islam Tahir
# make a function to create fibonacci series. input is the nth term
def fibonacci(term):
out = []
if term == 1:
out.append(1)
return 1
elif term == 2:
out.append(1)
return 1
else:
result = fibonacci(term - 1) + fibonacci(term - 2)
out.append(result)
return result
# make a function that generates a list of fibonacci
# series upto a limit
def list_Fibo(limit):
result = 0
i = 1
out = []
while limit > result:
result = fibonacci(i)
out.append(result)
i = i + 1
out = out[:-1] # removing the last element of the list because
# while keeps running 1 extra time since result > limit
# only in the last iteration
return out
# a function to check each element for odd or even and sums only
# the even elements
def evensum(fibolist):
result = 0
for element in fibolist:
if (element % 2 == 0):
result = result + element
return result
problem_limit = 4000000
print(list_Fibo(problem_limit))
print(f'result is {evensum(list_Fibo(problem_limit))}')
# [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309, 3524578]
# result is 4613732
| """ Each new term in the Fibonacci sequence is generated by
adding the previous two terms. By starting with 1 and 2,
the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
By considering the terms in the Fibonacci sequence
whose values do not exceed four million, find
the sum of the even-valued terms. """
def fibonacci(term):
out = []
if term == 1:
out.append(1)
return 1
elif term == 2:
out.append(1)
return 1
else:
result = fibonacci(term - 1) + fibonacci(term - 2)
out.append(result)
return result
def list__fibo(limit):
result = 0
i = 1
out = []
while limit > result:
result = fibonacci(i)
out.append(result)
i = i + 1
out = out[:-1]
return out
def evensum(fibolist):
result = 0
for element in fibolist:
if element % 2 == 0:
result = result + element
return result
problem_limit = 4000000
print(list__fibo(problem_limit))
print(f'result is {evensum(list__fibo(problem_limit))}') |
ALPHA = dict({
('A', 'A'): 0,
('C', 'C'): 0,
('G', 'G'): 0,
('T', 'T'): 0,
('A', 'C'): 110,
('C', 'A'): 110,
('A', 'G'): 48,
('G', 'A'): 48,
('A', 'T'): 94,
('T', 'A'): 94,
('C', 'G'): 118,
('G', 'C'): 118,
('C', 'T'): 48,
('T', 'C'): 48,
('G', 'T'): 110,
('T', 'G'): 110
})
DELTA = 30
| alpha = dict({('A', 'A'): 0, ('C', 'C'): 0, ('G', 'G'): 0, ('T', 'T'): 0, ('A', 'C'): 110, ('C', 'A'): 110, ('A', 'G'): 48, ('G', 'A'): 48, ('A', 'T'): 94, ('T', 'A'): 94, ('C', 'G'): 118, ('G', 'C'): 118, ('C', 'T'): 48, ('T', 'C'): 48, ('G', 'T'): 110, ('T', 'G'): 110})
delta = 30 |
#
# PySNMP MIB module Dell-BRIDGEMIBOBJECTS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Dell-BRIDGEMIBOBJECTS-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:55:28 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection")
BridgeId, Timeout, dot1dStpPort, dot1dBasePort = mibBuilder.importSymbols("BRIDGE-MIB", "BridgeId", "Timeout", "dot1dStpPort", "dot1dBasePort")
rnd, = mibBuilder.importSymbols("Dell-MIB", "rnd")
ifIndex, InterfaceIndex = mibBuilder.importSymbols("IF-MIB", "ifIndex", "InterfaceIndex")
PortList, = mibBuilder.importSymbols("Q-BRIDGE-MIB", "PortList")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Unsigned32, TimeTicks, Gauge32, MibIdentifier, ModuleIdentity, IpAddress, ObjectIdentity, Counter32, iso, Bits, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "TimeTicks", "Gauge32", "MibIdentifier", "ModuleIdentity", "IpAddress", "ObjectIdentity", "Counter32", "iso", "Bits", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "Counter64")
RowStatus, DisplayString, TextualConvention, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "DisplayString", "TextualConvention", "TruthValue")
class VlanList1(TextualConvention, OctetString):
description = "Each octet within this value specifies a set of eight vlans, with the first octet specifying vlan 1 through 8, the second octet specifying vlan 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered vlan, and the least significant bit represents the highest numbered vlan. Thus, each vlan of the bridge is represented by a single bit within the value of this object. If that bit has a value of '1' then that vlan is included in the set of vlans; the vlan is not included if its bit has a value of '0'. VlanList1 represent vlans 1-1024"
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 128)
class VlanList2(TextualConvention, OctetString):
description = 'As VlanList1 but represent vlans 1025-2048'
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 128)
class VlanList3(TextualConvention, OctetString):
description = 'As VlanList1 but represent vlans 2049-3072'
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 128)
class VlanList4(TextualConvention, OctetString):
description = 'As VlanList1 but represent vlans 3073-4094'
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 128)
rlpBridgeMIBObjects = ModuleIdentity((1, 3, 6, 1, 4, 1, 89, 57))
rlpBridgeMIBObjects.setRevisions(('2007-01-02 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: rlpBridgeMIBObjects.setRevisionsDescriptions(('Initial revision.',))
if mibBuilder.loadTexts: rlpBridgeMIBObjects.setLastUpdated('200701020000Z')
if mibBuilder.loadTexts: rlpBridgeMIBObjects.setOrganization('Dell')
if mibBuilder.loadTexts: rlpBridgeMIBObjects.setContactInfo('www.dell.com')
if mibBuilder.loadTexts: rlpBridgeMIBObjects.setDescription('This private MIB module defines bridge MIB objects private MIBs.')
rldot1dPriority = MibIdentifier((1, 3, 6, 1, 4, 1, 89, 57, 1))
rldot1dPriorityMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dPriorityMibVersion.setStatus('current')
if mibBuilder.loadTexts: rldot1dPriorityMibVersion.setDescription("MIB's version, the current version is 1.")
rldot1dPriorityPortGroupTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 1, 2), )
if mibBuilder.loadTexts: rldot1dPriorityPortGroupTable.setStatus('current')
if mibBuilder.loadTexts: rldot1dPriorityPortGroupTable.setDescription('A list of PortGroupNumber for each port.')
rldot1dPriorityPortGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 1, 2, 1), ).setIndexNames((0, "BRIDGE-MIB", "dot1dBasePort"))
if mibBuilder.loadTexts: rldot1dPriorityPortGroupEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1dPriorityPortGroupEntry.setDescription('All ports belonging to a same group have the same User Priority to Traffic Class mapping.')
rldot1dPriorityPortGroupNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 1, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dPriorityPortGroupNumber.setStatus('current')
if mibBuilder.loadTexts: rldot1dPriorityPortGroupNumber.setDescription('A group, that port belongs to. All ports belonging to a same group have the same User Priority to Traffic Class mapping.')
rldot1dStp = MibIdentifier((1, 3, 6, 1, 4, 1, 89, 57, 2))
rldot1dStpMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpMibVersion.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpMibVersion.setDescription("MIB's version, the current version is 2.")
rldot1dStpType = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 4))).clone(namedValues=NamedValues(("perDevice", 1), ("mstp", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpType.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpType.setDescription('Specifies whether the device supports Spanning Tree per device, or per group.')
rldot1dStpEnable = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 3), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpEnable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpEnable.setDescription('Enable / Disable spanning tree. When working in per vlan mode enable / disable STP per all vlans.')
rldot1dStpPortMustBelongToVlan = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 4), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpPortMustBelongToVlan.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortMustBelongToVlan.setDescription('Specifies whether a port must belong to a VLAN in order to participate in the STP.')
rldot1dStpExtendedPortNumberFormat = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 5), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpExtendedPortNumberFormat.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpExtendedPortNumberFormat.setDescription('Specifies whether the STP uses the extended port fnumber format.')
rldot1dStpVlanTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 2, 6), )
if mibBuilder.loadTexts: rldot1dStpVlanTable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanTable.setDescription('A table that contains vlan-specific information for the Spanning Tree Protocol.')
rldot1dStpVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1), ).setIndexNames((0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1dStpVlan"))
if mibBuilder.loadTexts: rldot1dStpVlanEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanEntry.setDescription('A list of information maintained by every Vlan about the Spanning Tree Protocol state for that Vlan.')
rldot1dStpVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpVlan.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlan.setDescription('The Vlan index.')
rldot1dStpVlanEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 2), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpVlanEnable.setReference(' ?? ')
if mibBuilder.loadTexts: rldot1dStpVlanEnable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanEnable.setDescription('Specifies whether this vlan is STP enable or disable')
rldot1dStpTimeSinceTopologyChange = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 3), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpTimeSinceTopologyChange.setReference('IEEE 802.1D-1990: Section 6.8.1.1.3')
if mibBuilder.loadTexts: rldot1dStpTimeSinceTopologyChange.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpTimeSinceTopologyChange.setDescription('The time (in hundredths of a second) since the last time a topology change was detected by the bridge entity.')
rldot1dStpTopChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpTopChanges.setReference('IEEE 802.1D-1990: Section 6.8.1.1.3')
if mibBuilder.loadTexts: rldot1dStpTopChanges.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpTopChanges.setDescription('The total number of topology changes detected by this bridge since the management entity was last reset or initialized.')
rldot1dStpDesignatedRoot = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 5), BridgeId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpDesignatedRoot.setReference('IEEE 802.1D-1990: Section 4.5.3.1')
if mibBuilder.loadTexts: rldot1dStpDesignatedRoot.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpDesignatedRoot.setDescription('The bridge identifier of the root of the spanning tree as determined by the Spanning Tree Protocol as executed by this node. This value is used as the Root Identifier parameter in all Configuration Bridge PDUs originated by this node.')
rldot1dStpRootCost = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpRootCost.setReference('IEEE 802.1D-1990: Section 4.5.3.2')
if mibBuilder.loadTexts: rldot1dStpRootCost.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpRootCost.setDescription('The cost of the path to the root as seen from this bridge.')
rldot1dStpRootPort = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpRootPort.setReference('IEEE 802.1D-1990: Section 4.5.3.3')
if mibBuilder.loadTexts: rldot1dStpRootPort.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpRootPort.setDescription('The port number of the port which offers the lowest cost path from this bridge to the root bridge.')
rldot1dStpMaxAge = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 8), Timeout()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpMaxAge.setReference('IEEE 802.1D-1990: Section 4.5.3.4')
if mibBuilder.loadTexts: rldot1dStpMaxAge.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpMaxAge.setDescription('The maximum age of Spanning Tree Protocol information learned from the network on any port before it is discarded, in units of hundredths of a second. This is the actual value that this bridge is currently using.')
rldot1dStpHelloTime = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 9), Timeout()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpHelloTime.setReference('IEEE 802.1D-1990: Section 4.5.3.5')
if mibBuilder.loadTexts: rldot1dStpHelloTime.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpHelloTime.setDescription('The amount of time between the transmission of Configuration bridge PDUs by this node on any port when it is the root of the spanning tree or trying to become so, in units of hundredths of a second. This is the actual value that this bridge is currently using.')
rldot1dStpHoldTime = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpHoldTime.setReference('IEEE 802.1D-1990: Section 4.5.3.14')
if mibBuilder.loadTexts: rldot1dStpHoldTime.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpHoldTime.setDescription('This time value determines the interval length during which no more than two Configuration bridge PDUs shall be transmitted by this node, in units of hundredths of a second.')
rldot1dStpForwardDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 11), Timeout()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpForwardDelay.setReference('IEEE 802.1D-1990: Section 4.5.3.6')
if mibBuilder.loadTexts: rldot1dStpForwardDelay.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpForwardDelay.setDescription('This time value, measured in units of hundredths of a second, controls how fast a port changes its spanning state when moving towards the Forwarding state. The value determines how long the port stays in each of the Listening and Learning states, which precede the Forwarding state. This value is also used, when a topology change has been detected and is underway, to age all dynamic entries in the Forwarding Database. [Note that this value is the one that this bridge is currently using, in contrast to dot1dStpBridgeForwardDelay which is the value that this bridge and all others would start using if/when this bridge were to become the root.]')
rldot1dStpVlanPortTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 2, 7), )
if mibBuilder.loadTexts: rldot1dStpVlanPortTable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanPortTable.setDescription('A table that contains pair <vlan, port> specific information for the Spanning Tree Protocol.')
rldot1dStpVlanPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1), ).setIndexNames((0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1dStpVlanPortVlan"), (0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1dStpVlanPortPort"))
if mibBuilder.loadTexts: rldot1dStpVlanPortEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanPortEntry.setDescription('A list of information maintained by every pair <vlan, port> about the Spanning Tree Protocol state for that pair.')
rldot1dStpVlanPortVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpVlanPortVlan.setReference('IEEE 802.1s/D2-1999 ')
if mibBuilder.loadTexts: rldot1dStpVlanPortVlan.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanPortVlan.setDescription('The Vlan number that the port belongs to, and for which this entry contains Spanning Tree Protocol management information.')
rldot1dStpVlanPortPort = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpVlanPortPort.setReference('IEEE 802.1t/D2-1999: Section 9.2.6')
if mibBuilder.loadTexts: rldot1dStpVlanPortPort.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanPortPort.setDescription('The port number of the port for which this entry contains Spanning Tree Protocol management information.')
rldot1dStpVlanPortPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpVlanPortPriority.setReference('IEEE 802.1t/D2-1999: Section 9.2.6')
if mibBuilder.loadTexts: rldot1dStpVlanPortPriority.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanPortPriority.setDescription('The value of the priority field which is contained in the more significant 4 bits of the most significant octet of the (2 octet long) Port ID. The other octet of the Port ID is given by the value of rldot1dStpVlanPort.')
rldot1dStpVlanPortState = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("disabled", 1), ("blocking", 2), ("listening", 3), ("learning", 4), ("forwarding", 5), ("broken", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpVlanPortState.setReference('IEEE 802.1D-1990: Section 4.5.5.2')
if mibBuilder.loadTexts: rldot1dStpVlanPortState.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanPortState.setDescription("The port's current state as defined by application of the Spanning Tree Protocol. This state controls what action a port takes on reception of a frame. If the bridge has detected a port that is malfunctioning it will place that port into the broken(6) state. For ports which are disabled (see dot1dStpVlanPortEnable), this object will have a value of disabled(1).")
rldot1dStpVlanPortEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpVlanPortEnable.setReference('IEEE 802.1D-1990: Section 4.5.5.2')
if mibBuilder.loadTexts: rldot1dStpVlanPortEnable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanPortEnable.setDescription('The enabled/disabled status of the port.')
rldot1dStpVlanPortPathCost = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpVlanPortPathCost.setReference('IEEE 802.1D-1990: Section 4.5.5.3')
if mibBuilder.loadTexts: rldot1dStpVlanPortPathCost.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanPortPathCost.setDescription('The contribution of this port to the path cost of paths towards the spanning tree root which include this port. 802.1D-1990 recommends that the default value of this parameter be in inverse proportion to the speed of the attached LAN.')
rldot1dStpVlanPortDesignatedRoot = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 7), BridgeId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedRoot.setReference('IEEE 802.1D-1990: Section 4.5.5.4')
if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedRoot.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedRoot.setDescription('The unique Bridge Identifier of the Bridge recorded as the Root in the Configuration BPDUs transmitted by the Designated Bridge for the segment to which the port is attached.')
rldot1dStpVlanPortDesignatedCost = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedCost.setReference('IEEE 802.1D-1990: Section 4.5.5.5')
if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedCost.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedCost.setDescription('The path cost of the Designated Port of the segment connected to this port. This value is compared to the Root Path Cost field in received bridge PDUs.')
rldot1dStpVlanPortDesignatedBridge = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 9), BridgeId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedBridge.setReference('IEEE 802.1D-1990: Section 4.5.5.6')
if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedBridge.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedBridge.setDescription("The Bridge Identifier of the bridge which this port considers to be the Designated Bridge for this port's segment.")
rldot1dStpVlanPortDesignatedPort = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedPort.setReference('IEEE 802.1D-1990: Section 4.5.5.7')
if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedPort.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedPort.setDescription("The Port Identifier of the port on the Designated Bridge for this port's segment.")
rldot1dStpVlanPortForwardTransitions = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpVlanPortForwardTransitions.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpVlanPortForwardTransitions.setDescription('The number of times this port has transitioned from the Learning state to the Forwarding state.')
rldot1dStpTrapVariable = MibIdentifier((1, 3, 6, 1, 4, 1, 89, 57, 2, 8))
rldot1dStpTrapVrblifIndex = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 8, 1), InterfaceIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpTrapVrblifIndex.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpTrapVrblifIndex.setDescription('The ifIndex of port which STP status was changed')
rldot1dStpTrapVrblVID = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 8, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpTrapVrblVID.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpTrapVrblVID.setDescription('The VID of VLAN to which the port belongs which STP status was changed')
rldot1dStpTypeAfterReset = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 4))).clone(namedValues=NamedValues(("perDevice", 1), ("mstp", 4))).clone('perDevice')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpTypeAfterReset.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpTypeAfterReset.setDescription('New mode of spaning tree supported by the device after the next reset.')
rldot1dStpMonitorTime = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20)).clone(10)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpMonitorTime.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpMonitorTime.setDescription('Factor of hello-time during which a port is monotored to determine if it is stable.')
rldot1dStpBpduCount = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 60)).clone(10)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpBpduCount.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpBpduCount.setDescription('The number of bpdu that need to received for the link to be considered stable.')
rldot1dStpLastChanged = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 12), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpLastChanged.setReference('')
if mibBuilder.loadTexts: rldot1dStpLastChanged.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpLastChanged.setDescription('The last time any object in this table was changed by SNMP or other local management means.')
rldot1dStpPortTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 2, 13), )
if mibBuilder.loadTexts: rldot1dStpPortTable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortTable.setDescription('A table that contains extended pair port specific information.')
rldot1dStpPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1), ).setIndexNames((0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1dStpPortPort"))
if mibBuilder.loadTexts: rldot1dStpPortEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortEntry.setDescription('A list of information maintained by every port about the Spanning Tree Protocol state for that port.')
rldot1dStpPortPort = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpPortPort.setReference('IEEE 802.1t/D2-1999: Section 9.2.6')
if mibBuilder.loadTexts: rldot1dStpPortPort.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortPort.setDescription('The port number of the port for which this entry contains Spanning Tree Protocol management information.')
rldot1dStpPortDampEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 2), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpPortDampEnable.setReference('')
if mibBuilder.loadTexts: rldot1dStpPortDampEnable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortDampEnable.setDescription('Specified if dampening is enabled on this port.')
rldot1dStpPortDampStable = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 3), TruthValue().clone('true')).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpPortDampStable.setReference('')
if mibBuilder.loadTexts: rldot1dStpPortDampStable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortDampStable.setDescription('Specified if the port is stable.')
rldot1dStpPortFilterBpdu = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("false", 0), ("true", 1), ("none", 2))).clone('none')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpPortFilterBpdu.setReference('')
if mibBuilder.loadTexts: rldot1dStpPortFilterBpdu.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortFilterBpdu.setDescription('Specified if this port should filter bpdus when stp is disabled.')
rldot1dStpPortBpduSent = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpPortBpduSent.setReference('')
if mibBuilder.loadTexts: rldot1dStpPortBpduSent.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortBpduSent.setDescription('Specified the number of bpdu sent from this port.')
rldot1dStpPortBpduReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpPortBpduReceived.setReference('')
if mibBuilder.loadTexts: rldot1dStpPortBpduReceived.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortBpduReceived.setDescription('Specified the number of bpdu received in this port.')
rldot1dStpPortRole = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 0), ("disabled", 1), ("alternate", 2), ("backup", 3), ("root", 4), ("designated", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpPortRole.setReference('')
if mibBuilder.loadTexts: rldot1dStpPortRole.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortRole.setDescription('Specified the role of this this port.')
rldot1dStpBpduType = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("stp", 0), ("rstp", 1)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpBpduType.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpBpduType.setDescription('Specified the type of BPDU transmitted by this port.')
rldot1dStpPortRestrictedRole = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 9), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpPortRestrictedRole.setReference('IEEE 802.1ad-D3-1: Section 13.24.29')
if mibBuilder.loadTexts: rldot1dStpPortRestrictedRole.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortRestrictedRole.setDescription('If TRUE causes the Port not to be selected as Root Port for the CIST or any MSTI, even if it has the best spanning tree priority vector. Such a Port will be selected as an Alternate Port after the Root Port has been selected.')
rldot1dStpPortAutoEdgePort = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 10), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpPortAutoEdgePort.setReference('IEEE 802.1D-2004: Section 17.13.3')
if mibBuilder.loadTexts: rldot1dStpPortAutoEdgePort.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortAutoEdgePort.setDescription("If TRUE causes the Port when become up, to enter the blocking state, and if during 3 seconds it doesn't receive a BPDU, it will enter the forwarding state.")
rldot1dStpPortLoopback = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 11), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpPortLoopback.setReference('')
if mibBuilder.loadTexts: rldot1dStpPortLoopback.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortLoopback.setDescription('Specified loopback was detected on port. Usable for only a short period of time if stp loopback guard is enabled (since port enters into shutdown state).')
rldot1dStpPortBpduOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("filter", 0), ("flood", 1), ("bridge", 2), ("stp", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpPortBpduOperStatus.setReference('')
if mibBuilder.loadTexts: rldot1dStpPortBpduOperStatus.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortBpduOperStatus.setDescription('Specified BPDU handling operative status for port.')
rldot1dStpPortsEnable = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 14), TruthValue().clone('true')).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpPortsEnable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortsEnable.setDescription('Enable / Disable spanning tree on ports by default .')
rldot1dStpTaggedFlooding = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 15), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpTaggedFlooding.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpTaggedFlooding.setDescription('flooding can be done in tagged bpdu .')
rldot1dStpPortBelongToVlanDefault = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 16), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpPortBelongToVlanDefault.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortBelongToVlanDefault.setDescription('The default value of rldot1dStpPortMustBelongToVlan .')
rldot1dStpEnableByDefault = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 17), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpEnableByDefault.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpEnableByDefault.setDescription('The default value of rldot1dStpEnable .')
rldot1dStpPortToDefault = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 18), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpPortToDefault.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortToDefault.setDescription('To order port/s to revert to default setings .')
rldot1dStpSupportedType = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("perDevice", 1), ("perVlan", 2), ("mstp", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpSupportedType.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpSupportedType.setDescription('The type of stp supported by the device.')
rldot1dStpEdgeportSupportInStp = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 20), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dStpEdgeportSupportInStp.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpEdgeportSupportInStp.setDescription('If EdgePort is supported in stpCompatible mode .')
rldot1dStpFilterBpdu = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 21), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpFilterBpdu.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpFilterBpdu.setDescription('Specified if the device should filter BPDUs when STP is disabled.')
rldot1dStpFloodBpduMethod = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("classic", 0), ("bridging", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpFloodBpduMethod.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpFloodBpduMethod.setDescription('Specified flooding method: 1 - classic - untagged to all stp disabled ports 2 - bridging -normal bridging.')
rldot1dStpSeparatedBridges = MibIdentifier((1, 3, 6, 1, 4, 1, 89, 57, 2, 23))
rldot1dStpPortBpduGuardTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 2, 24), )
if mibBuilder.loadTexts: rldot1dStpPortBpduGuardTable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortBpduGuardTable.setDescription('A table that contains for each port whether it is bpdu guard .')
rldot1dStpPortBpduGuardEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 2, 24, 1), ).setIndexNames((0, "BRIDGE-MIB", "dot1dBasePort"))
if mibBuilder.loadTexts: rldot1dStpPortBpduGuardEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortBpduGuardEntry.setDescription('A list of information maintained by every port whether it is bpdu guard.')
rldot1dStpPortBpduGuardEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 24, 1, 1), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpPortBpduGuardEnable.setReference('')
if mibBuilder.loadTexts: rldot1dStpPortBpduGuardEnable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpPortBpduGuardEnable.setDescription('Specified if bpdu guard is enabled on this port.')
rldot1dStpLoopbackGuardEnable = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 25), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpLoopbackGuardEnable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpLoopbackGuardEnable.setDescription('Define if STP loopback guard feature is globally enabled.')
rldot1dStpSeparatedBridgesTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 2, 23, 1), )
if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesTable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesTable.setDescription('Define if separated bridges feature is enabled for each interface.')
rldot1dStpSeparatedBridgesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 2, 23, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesEntry.setDescription('Defines the contents of each line in the rlSeparatedBridgesTable table.')
rldot1dStpSeparatedBridgesPortEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 23, 1, 1, 1), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesPortEnable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesPortEnable.setDescription('This variable indicates whether the separated bridge feature is enabled on a specified ifIndex.')
rldot1dStpSeparatedBridgesEnable = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 23, 2), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesEnable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesEnable.setDescription('Enable / Disable Separated Bridges Feature.')
rldot1dStpSeparatedBridgesAutoConfig = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 23, 3), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesAutoConfig.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesAutoConfig.setDescription('Enable / Disable Separated Bridges Automatic Configuration.')
rldot1dStpDisabledPortStateTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 2, 26), )
if mibBuilder.loadTexts: rldot1dStpDisabledPortStateTable.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpDisabledPortStateTable.setDescription('Define stp port state for each stp disabled interface. This is auxiliary MIB emulates stp enabled port behaviour in ASIC for stp disabled port. The MIB contains only stp disabled ports entries ')
rldot1dStpDisabledPortStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 2, 26, 1), ).setIndexNames((0, "BRIDGE-MIB", "dot1dStpPort"))
if mibBuilder.loadTexts: rldot1dStpDisabledPortStateEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpDisabledPortStateEntry.setDescription('Defines the contents of each line in the rldot1dStpDisabledPortStateTable table.')
rldot1dStpDisabledPortState = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 2, 26, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 3, 4, 5))).clone(namedValues=NamedValues(("blocking", 2), ("listening", 3), ("learning", 4), ("forwarding", 5))).clone('forwarding')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1dStpDisabledPortState.setStatus('current')
if mibBuilder.loadTexts: rldot1dStpDisabledPortState.setDescription("The port's stp state as defined by external application . This state controls what action a port takes on reception of a frame.")
rldot1dExtBase = MibIdentifier((1, 3, 6, 1, 4, 1, 89, 57, 3))
rldot1dExtBaseMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 3, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dExtBaseMibVersion.setStatus('current')
if mibBuilder.loadTexts: rldot1dExtBaseMibVersion.setDescription("MIB's version, the current version is 1.")
rldot1dDeviceCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 3, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dDeviceCapabilities.setStatus('current')
if mibBuilder.loadTexts: rldot1dDeviceCapabilities.setDescription('Indicates the optional parts of private extension of IEEE 802.1D and 802.1Q that are implemented by this device and are manageable through this MIB. Capabilities that are allowed on a per-port basis are indicated in dot1dPortCapabilities.')
rldot1wRStp = MibIdentifier((1, 3, 6, 1, 4, 1, 89, 57, 4))
rldot1wRStpVlanEdgePortTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 4, 1), )
if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortTable.setStatus('current')
if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortTable.setDescription('A table that contains pair <vlan, port> specific information for the Rapid Spanning Tree Protocol.')
rldot1wRStpVlanEdgePortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 4, 1, 1), ).setIndexNames((0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1wRStpVlanEdgePortVlan"), (0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1wRStpVlanEdgePortPort"))
if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortEntry.setDescription('A list of information maintained by every pair <vlan, port> about the RAPID Spanning Tree Protocol state for that pair.')
rldot1wRStpVlanEdgePortVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortVlan.setStatus('current')
if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortVlan.setDescription('The Vlan number that the port belongs to, and for which this entry contains Spanning Tree Protocol management information, If STP per device then only one value of 1 is allowed. If STP per a VLAN then all value of 1..4095 are allowed.')
rldot1wRStpVlanEdgePortPort = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 4, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortPort.setStatus('current')
if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortPort.setDescription('The port number of the port for which this entry contains Spanning Tree Protocol management information.')
rldot1wRStpEdgePortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 4, 1, 1, 3), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1wRStpEdgePortStatus.setReference('IEEE 802.1wd6-2000: Section 17.13.3.1 ')
if mibBuilder.loadTexts: rldot1wRStpEdgePortStatus.setStatus('current')
if mibBuilder.loadTexts: rldot1wRStpEdgePortStatus.setDescription('Specifies whether this port is an Edge Port or not')
rldot1wRStpForceVersionTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 4, 2), )
if mibBuilder.loadTexts: rldot1wRStpForceVersionTable.setStatus('current')
if mibBuilder.loadTexts: rldot1wRStpForceVersionTable.setDescription('A table that contains <vlan> specific information for the Rapid Spanning Tree Protocol.')
rldot1wRStpForceVersionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 4, 2, 1), ).setIndexNames((0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1wRStpForceVersionVlan"))
if mibBuilder.loadTexts: rldot1wRStpForceVersionEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1wRStpForceVersionEntry.setDescription('A list of information maintained by every <vlan> about the RAPID Spanning Tree Protocol state for that pair.')
rldot1wRStpForceVersionVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1wRStpForceVersionVlan.setStatus('current')
if mibBuilder.loadTexts: rldot1wRStpForceVersionVlan.setDescription('The Vlan number that the port belongs to, and for which this entry contains Spanning Tree Protocol management information, If STP per device then only one value of 1 is allowed. If STP per a VLAN then all value of 1..4095 are allowed.')
rldot1wRStpForceVersionState = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 4, 2, 1, 2), Integer32().clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1wRStpForceVersionState.setReference('IEEE 802.1wd9-2000: Section 17.16.1 ')
if mibBuilder.loadTexts: rldot1wRStpForceVersionState.setStatus('current')
if mibBuilder.loadTexts: rldot1wRStpForceVersionState.setDescription('Specifies whether this Bridge uses the normal RSTP algorithm, or STP Compatibility algorythm: 0 - STP Compatibility 2 - Normal RSTP')
rldot1pPriorityMap = MibIdentifier((1, 3, 6, 1, 4, 1, 89, 57, 5))
rldot1pPriorityMapState = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 5, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1pPriorityMapState.setStatus('current')
if mibBuilder.loadTexts: rldot1pPriorityMapState.setDescription('enable / disable')
rldot1pPriorityMapTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 5, 2), )
if mibBuilder.loadTexts: rldot1pPriorityMapTable.setStatus('current')
if mibBuilder.loadTexts: rldot1pPriorityMapTable.setDescription('This table hold information the priority maps')
rldot1pPriorityMapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 5, 2, 1), ).setIndexNames((0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1pPriorityMapName"))
if mibBuilder.loadTexts: rldot1pPriorityMapEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1pPriorityMapEntry.setDescription('The row definition for this table.')
rldot1pPriorityMapName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 5, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 25))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1pPriorityMapName.setStatus('current')
if mibBuilder.loadTexts: rldot1pPriorityMapName.setDescription('The map name')
rldot1pPriorityMapPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 5, 2, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: rldot1pPriorityMapPriority.setStatus('current')
if mibBuilder.loadTexts: rldot1pPriorityMapPriority.setDescription('The map holding the queue')
rldot1pPriorityMapPort = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 5, 2, 1, 3), PortList()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: rldot1pPriorityMapPort.setStatus('current')
if mibBuilder.loadTexts: rldot1pPriorityMapPort.setDescription('the port that the map, is applied on in config')
rldot1pPriorityMapPortList = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 5, 2, 1, 4), PortList()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1pPriorityMapPortList.setStatus('current')
if mibBuilder.loadTexts: rldot1pPriorityMapPortList.setDescription('the ports that the map, is applied on in actual')
rldot1pPriorityMapStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 5, 2, 1, 5), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: rldot1pPriorityMapStatus.setStatus('current')
if mibBuilder.loadTexts: rldot1pPriorityMapStatus.setDescription("The status of the table entry. It's used to delete an entry")
rldot1sMstp = MibIdentifier((1, 3, 6, 1, 4, 1, 89, 57, 6))
rldot1sMstpInstanceTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 6, 1), )
if mibBuilder.loadTexts: rldot1sMstpInstanceTable.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceTable.setDescription('A table that contains Mstp instance specific information for the Multiple Spanning Tree Protocol.')
rldot1sMstpInstanceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1), ).setIndexNames((0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1sMstpInstanceId"))
if mibBuilder.loadTexts: rldot1sMstpInstanceEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceEntry.setDescription('A list of information maintained by every instance about the multiple Spanning Tree Protocol state for that instance.')
rldot1sMstpInstanceId = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceId.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceId.setDescription('The Instance index.')
rldot1sMstpInstanceEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 2), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceEnable.setReference(' ?? ')
if mibBuilder.loadTexts: rldot1sMstpInstanceEnable.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceEnable.setDescription('Specifies whether this Instance is STP enable or disable')
rldot1sMstpInstanceTimeSinceTopologyChange = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 3), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceTimeSinceTopologyChange.setReference('IEEE 802.1D-1990: Section 6.8.1.1.3')
if mibBuilder.loadTexts: rldot1sMstpInstanceTimeSinceTopologyChange.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceTimeSinceTopologyChange.setDescription('The time (in hundredths of a second) since the last time a topology change was detected by the Mstp Instance .')
rldot1sMstpInstanceTopChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceTopChanges.setReference('IEEE 802.1D-1990: Section 6.8.1.1.3')
if mibBuilder.loadTexts: rldot1sMstpInstanceTopChanges.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceTopChanges.setDescription('The total number of topology changes detected by this Instance since the management entity was last reset or initialized.')
rldot1sMstpInstanceDesignatedRoot = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 5), BridgeId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceDesignatedRoot.setReference('IEEE 802.1D-1990: Section 4.5.3.1')
if mibBuilder.loadTexts: rldot1sMstpInstanceDesignatedRoot.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceDesignatedRoot.setDescription('The bridge identifier of the root of the spanning tree as determined by the Muliple Spanning Tree Protocol as executed by this node. This value is used as the Root Identifier parameter in all Configuration Bridge PDUs originated by this node.')
rldot1sMstpInstanceRootCost = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceRootCost.setReference('IEEE 802.1D-1990: Section 4.5.3.2')
if mibBuilder.loadTexts: rldot1sMstpInstanceRootCost.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceRootCost.setDescription('The cost of the path to the root as seen from this bridge.')
rldot1sMstpInstanceRootPort = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceRootPort.setReference('IEEE 802.1D-1990: Section 4.5.3.3')
if mibBuilder.loadTexts: rldot1sMstpInstanceRootPort.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceRootPort.setDescription('The port number of the port which offers the lowest cost path from this bridge to the root bridge.')
rldot1sMstpInstanceMaxAge = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 8), Timeout()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceMaxAge.setReference('IEEE 802.1D-1990: Section 4.5.3.4')
if mibBuilder.loadTexts: rldot1sMstpInstanceMaxAge.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceMaxAge.setDescription('The maximum age of Spanning Tree Protocol information learned from the network on any port before it is discarded, in units of hundredths of a second. This is the actual value that this bridge is currently using.')
rldot1sMstpInstanceHelloTime = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 9), Timeout()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceHelloTime.setReference('IEEE 802.1D-1990: Section 4.5.3.5')
if mibBuilder.loadTexts: rldot1sMstpInstanceHelloTime.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceHelloTime.setDescription('The amount of time between the transmission of Configuration bridge PDUs by this node on any port when it is the root of the spanning tree or trying to become so, in units of hundredths of a second. This is the actual value that this bridge is currently using.')
rldot1sMstpInstanceHoldTime = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceHoldTime.setReference('IEEE 802.1D-1990: Section 4.5.3.14')
if mibBuilder.loadTexts: rldot1sMstpInstanceHoldTime.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceHoldTime.setDescription('This time value determines the interval length during which no more than two Configuration bridge PDUs shall be transmitted by this node, in units of hundredths of a second.')
rldot1sMstpInstanceForwardDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 11), Timeout()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceForwardDelay.setReference('IEEE 802.1D-1990: Section 4.5.3.6')
if mibBuilder.loadTexts: rldot1sMstpInstanceForwardDelay.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceForwardDelay.setDescription('This time value, measured in units of hundredths of a second, controls how fast a port changes its spanning state when moving towards the Forwarding state. The value determines how long the port stays in each of the Listening and Learning states, which precede the Forwarding state. This value is also used, when a topology change has been detected and is underway, to age all dynamic entries in the Forwarding Database. [Note that this value is the one that this bridge is currently using, in contrast to dot1dStpBridgeForwardDelay which is the value that this bridge and all others would start using if/when this bridge were to become the root.]')
rldot1sMstpInstancePriority = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 61440))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1sMstpInstancePriority.setReference('IEEE 802.1S-2001: Section 13.24.2')
if mibBuilder.loadTexts: rldot1sMstpInstancePriority.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePriority.setDescription('The value of the write-able portion of the Bridge ID, i.e., the first four bits of the first octet of the (8 octet long) Bridge ID.The value is a product of 4096. The next 12 bit are the msti id . The other (last) 6 octets of the Bridge ID are given by the value of dot1dBaseBridgeAddress.')
rldot1sMstpInstanceRemainingHopes = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceRemainingHopes.setReference('IEEE 802.1D-1990: Section 4.5.3.14')
if mibBuilder.loadTexts: rldot1sMstpInstanceRemainingHopes.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceRemainingHopes.setDescription('This count value determines the amount of hopes the information transmited by this bridge on this instance can travel.')
rldot1sMstpInstancePortTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 6, 2), )
if mibBuilder.loadTexts: rldot1sMstpInstancePortTable.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePortTable.setDescription('A table that contains pair <msti, port> specific information for the Spanning Tree Protocol.')
rldot1sMstpInstancePortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1), ).setIndexNames((0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1sMstpInstancePortMstiId"), (0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1sMstpInstancePortPort"))
if mibBuilder.loadTexts: rldot1sMstpInstancePortEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePortEntry.setDescription('A list of information maintained by every pair <msti, port> about the Spanning Tree Protocol state for that pair.')
rldot1sMstpInstancePortMstiId = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstancePortMstiId.setReference('IEEE 802.1s/D11-2001 ')
if mibBuilder.loadTexts: rldot1sMstpInstancePortMstiId.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePortMstiId.setDescription('The Vlan group number that the port belongs to, and for which this entry contains Spanning Tree Protocol management information.')
rldot1sMstpInstancePortPort = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstancePortPort.setReference('IEEE 802.1t/D2-1999: Section 9.2.6')
if mibBuilder.loadTexts: rldot1sMstpInstancePortPort.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePortPort.setDescription('The port number of the port for which this entry contains Spanning Tree Protocol management information.')
rldot1sMstpInstancePortPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 240))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1sMstpInstancePortPriority.setReference('IEEE 802.1t/D2-1999: Section 9.2.6')
if mibBuilder.loadTexts: rldot1sMstpInstancePortPriority.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePortPriority.setDescription('The value of the priority field which is contained in the more significant 4 bits of the most significant octet of the (2 octet long) Port ID. The value is a product of 16. The other octet of the Port ID is given by the value of rldot1dStpVlanGroupPort.')
rldot1sMstpInstancePortState = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("disabled", 1), ("blocking", 2), ("listening", 3), ("learning", 4), ("forwarding", 5), ("broken", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstancePortState.setReference('IEEE 802.1D-1990: Section 4.5.5.2')
if mibBuilder.loadTexts: rldot1sMstpInstancePortState.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePortState.setDescription("The port's current state as defined by application of the Spanning Tree Protocol. This state controls what action a port takes on reception of a frame. If the bridge has detected a port that is malfunctioning it will place that port into the broken(6) state. For ports which are disabled (see dot1dStpVlanPortEnable), this object will have a value of disabled(1).")
rldot1sMstpInstancePortEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstancePortEnable.setReference('IEEE 802.1D-1990: Section 4.5.5.2')
if mibBuilder.loadTexts: rldot1sMstpInstancePortEnable.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePortEnable.setDescription('The enabled/disabled status of the port.')
rldot1sMstpInstancePortPathCost = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 200000000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstancePortPathCost.setReference('IEEE 802.1D-1990: Section 4.5.5.3')
if mibBuilder.loadTexts: rldot1sMstpInstancePortPathCost.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePortPathCost.setDescription('The contribution of this port to the path cost of paths towards the spanning tree root which include this port. 802.1D-1990 recommends that the default value of this parameter be in inverse proportion to the speed of the attached LAN.')
rldot1sMstpInstancePortDesignatedRoot = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 7), BridgeId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedRoot.setReference('IEEE 802.1D-1990: Section 4.5.5.4')
if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedRoot.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedRoot.setDescription('The unique Bridge Identifier of the Bridge recorded as the Root in the Configuration BPDUs transmitted by the Designated Bridge for the segment to which the port is attached.')
rldot1sMstpInstancePortDesignatedCost = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedCost.setReference('IEEE 802.1D-1990: Section 4.5.5.5')
if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedCost.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedCost.setDescription('The path cost of the Designated Port of the segment connected to this port. This value is compared to the Root Path Cost field in received bridge PDUs.')
rldot1sMstpInstancePortDesignatedBridge = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 9), BridgeId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedBridge.setReference('IEEE 802.1D-1990: Section 4.5.5.6')
if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedBridge.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedBridge.setDescription("The Bridge Identifier of the bridge which this port considers to be the Designated Bridge for this port's segment.")
rldot1sMstpInstancePortDesignatedPort = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedPort.setReference('IEEE 802.1D-1990: Section 4.5.5.7')
if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedPort.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedPort.setDescription("The Port Identifier of the port on the Designated Bridge for this port's segment.")
rldot1sMstpInstancePortForwardTransitions = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstancePortForwardTransitions.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstancePortForwardTransitions.setDescription('The number of times this port has transitioned from the Learning state to the Forwarding state.')
rldot1sMStpInstancePortAdminPathCost = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 200000000))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1sMStpInstancePortAdminPathCost.setReference('IEEE 802.1D-1998: Section 8.5.5.3')
if mibBuilder.loadTexts: rldot1sMStpInstancePortAdminPathCost.setStatus('current')
if mibBuilder.loadTexts: rldot1sMStpInstancePortAdminPathCost.setDescription("The administratively assigned value for the contribution of this port to the path cost of paths towards the spanning tree root. Writing a value of '0' assigns the automatically calculated default Path Cost value to the port. If the default Path Cost is being used, this object returns '0' when read. This complements the object dot1dStpPortPathCost, which returns the operational value of the path cost.")
rldot1sMStpInstancePortRole = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("unknown", 0), ("disabled", 1), ("alternate", 2), ("backup", 3), ("root", 4), ("designated", 5), ("master", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMStpInstancePortRole.setReference('')
if mibBuilder.loadTexts: rldot1sMStpInstancePortRole.setStatus('current')
if mibBuilder.loadTexts: rldot1sMStpInstancePortRole.setDescription('Specify the role of this this port.')
rldot1sMstpMaxHopes = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 40)).clone(20)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1sMstpMaxHopes.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpMaxHopes.setDescription('Max number of hopes that an MST BPDU will travel inside a region.')
rldot1sMstpConfigurationName = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 4), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpConfigurationName.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpConfigurationName.setDescription("The active configuration name as will be caried in MST BPDU's.")
rldot1sMstpRevisionLevel = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpRevisionLevel.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpRevisionLevel.setDescription('The active revision level.')
rldot1sMstpVlanTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 6, 6), )
if mibBuilder.loadTexts: rldot1sMstpVlanTable.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpVlanTable.setDescription('A table that contains information about the alocation of vlans to groups.')
rldot1sMstpVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 6, 6, 1), ).setIndexNames((0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1sMstpVlan"))
if mibBuilder.loadTexts: rldot1sMstpVlanEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpVlanEntry.setDescription('A list of information maintained by every vlan about the group it belongs to.')
rldot1sMstpVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpVlan.setReference('IEEE 802.1s/D11-2001: Section 13.7')
if mibBuilder.loadTexts: rldot1sMstpVlan.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpVlan.setDescription('The vlan number of the vlan for which this entry contains Spanning Tree Protocol management information.')
rldot1sMstpGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 6, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpGroup.setReference('')
if mibBuilder.loadTexts: rldot1sMstpGroup.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpGroup.setDescription('Specifid the active group number this vlan belonges to.')
rldot1sMstpPendingGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 6, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1sMstpPendingGroup.setReference('')
if mibBuilder.loadTexts: rldot1sMstpPendingGroup.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpPendingGroup.setDescription('Specifid the pending group number this vlan belonges to.')
rldot1sMstpExtPortTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 6, 7), )
if mibBuilder.loadTexts: rldot1sMstpExtPortTable.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpExtPortTable.setDescription('A table that contains MSTP information about ports of the CIST.')
rldot1sMstpExtPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1), ).setIndexNames((0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1sMstpExtPortPort"))
if mibBuilder.loadTexts: rldot1sMstpExtPortEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpExtPortEntry.setDescription('A list of information maintained by every port of the CIST.')
rldot1sMstpExtPortPort = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpExtPortPort.setReference('IEEE 802.1t/D2-1999: Section 9.2.6')
if mibBuilder.loadTexts: rldot1sMstpExtPortPort.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpExtPortPort.setDescription('The port number of the port for which this entry contains Spanning Tree Protocol management information.')
rldot1sMstpExtPortInternalOperPathCost = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 200000000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpExtPortInternalOperPathCost.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpExtPortInternalOperPathCost.setDescription('The contribution of this port to the path cost of paths towards the spanning tree regional root which include this port. 802.1S-2002 recommends that the default value of this parameter be in inverse proportion to the speed of the attached LAN.')
rldot1sMstpExtPortDesignatedRegionalRoot = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1, 3), BridgeId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpExtPortDesignatedRegionalRoot.setReference('IEEE 802.1D-1990: Section 4.5.5.4')
if mibBuilder.loadTexts: rldot1sMstpExtPortDesignatedRegionalRoot.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpExtPortDesignatedRegionalRoot.setDescription('The unique Bridge Identifier of the Bridge recorded as the Root in the Configuration BPDUs transmitted by the Designated Bridge for the segment to which the port is attached.')
rldot1sMstpExtPortDesignatedRegionalCost = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpExtPortDesignatedRegionalCost.setReference('IEEE 802.1D-1990: Section 4.5.5.5')
if mibBuilder.loadTexts: rldot1sMstpExtPortDesignatedRegionalCost.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpExtPortDesignatedRegionalCost.setDescription('The regional path cost of the Designated Port of the segment connected to this port. This value is compared to the Root Path Cost field in received bridge PDUs.')
rldot1sMstpExtPortBoundary = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1, 5), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpExtPortBoundary.setReference('IEEE 802.1D-1990: Section 4.5.5.5')
if mibBuilder.loadTexts: rldot1sMstpExtPortBoundary.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpExtPortBoundary.setDescription('Indication if the port is conented to to a lan segment outside or inside the region.')
rldot1sMstpExtPortInternalAdminPathCost = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 200000000))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1sMstpExtPortInternalAdminPathCost.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpExtPortInternalAdminPathCost.setDescription("The administratively assigned value for the contribution of this port to the path cost of paths towards the spanning tree root. Writing a value of '0' assigns the automatically calculated default Path Cost value to the port. If the default Path Cost is being used, this object returns '0' when read. This complements the object dot1dStpPortPathCost, which returns the operational value of the path cost.")
rldot1sMstpDesignatedMaxHopes = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 40))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpDesignatedMaxHopes.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpDesignatedMaxHopes.setDescription('Max number of hopes that an MST BPDU will travel inside a region.')
rldot1sMstpRegionalRoot = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 9), BridgeId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpRegionalRoot.setReference('IEEE 802.1S-2002: Section 13.16.4')
if mibBuilder.loadTexts: rldot1sMstpRegionalRoot.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpRegionalRoot.setDescription('CIST Regional Root Identifier (13.16.4). The Bridge Identifier of the current CIST Regional Root.')
rldot1sMstpRegionalRootCost = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpRegionalRootCost.setReference('IEEE 802.1S-2002: Section 12.8.1.1.3')
if mibBuilder.loadTexts: rldot1sMstpRegionalRootCost.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpRegionalRootCost.setDescription('The CIST path cost from the transmitting Bridge to the CIST Regional Root.')
rldot1sMstpPendingConfigurationName = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 11), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1sMstpPendingConfigurationName.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpPendingConfigurationName.setDescription('The pending configuration name.')
rldot1sMstpPendingRevisionLevel = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1sMstpPendingRevisionLevel.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpPendingRevisionLevel.setDescription('The pending revision level.')
rldot1sMstpPendingAction = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("copyPendingActive", 1), ("copyActivePending", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1sMstpPendingAction.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpPendingAction.setDescription('The action to be done with the pending configuration. copyPendingActive - to copy the pending mst configuration to the active one. copyActivePending - to copy the active mst configuration to the pending one. ')
rldot1sMstpRemainingHops = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpRemainingHops.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpRemainingHops.setDescription('This count value determines the amount of hops the information transmitted by this bridge can travel.')
rldot1sMstpInstanceVlanTable = MibTable((1, 3, 6, 1, 4, 1, 89, 57, 6, 15), )
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanTable.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanTable.setDescription('This table contains vlan lists per MSTP instances.')
rldot1sMstpInstanceVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 57, 6, 15, 1), ).setIndexNames((0, "Dell-BRIDGEMIBOBJECTS-MIB", "rldot1sMstpInstanceVlanId"))
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanEntry.setDescription(' The entry contains vlan lists per specific MSTP instance.')
rldot1sMstpInstanceVlanId = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 15, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanId.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanId.setDescription('Specifiy the instance number.')
rldot1sMstpInstanceVlanId1To1024 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 15, 1, 2), VlanList1()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanId1To1024.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanId1To1024.setDescription('first VlanId List of specific MSTP instance.')
rldot1sMstpInstanceVlanId1025To2048 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 15, 1, 3), VlanList2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanId1025To2048.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanId1025To2048.setDescription('second VlanId List of specific MSTP instance.')
rldot1sMstpInstanceVlanId2049To3072 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 15, 1, 4), VlanList3()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanId2049To3072.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanId2049To3072.setDescription('third VlanId List of specific MSTP instance.')
rldot1sMstpInstanceVlanId3073To4094 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 57, 6, 15, 1, 5), VlanList4()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanId3073To4094.setStatus('current')
if mibBuilder.loadTexts: rldot1sMstpInstanceVlanId3073To4094.setDescription('fourth VlanId List of specific MSTP instance.')
rldot1dTpAgingTime = MibIdentifier((1, 3, 6, 1, 4, 1, 89, 57, 7))
rldot1dTpAgingTimeMin = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 7, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dTpAgingTimeMin.setReference('P802.1d/D9, July 14, 1989: Section 6.7.1.1.3')
if mibBuilder.loadTexts: rldot1dTpAgingTimeMin.setStatus('current')
if mibBuilder.loadTexts: rldot1dTpAgingTimeMin.setDescription('The min timeout period in seconds for aging out dynamically learned forwarding information.')
rldot1dTpAgingTimeMax = MibScalar((1, 3, 6, 1, 4, 1, 89, 57, 7, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1dTpAgingTimeMax.setReference('P802.1d/D9, July 14, 1989: Section 6.7.1.1.3')
if mibBuilder.loadTexts: rldot1dTpAgingTimeMax.setStatus('current')
if mibBuilder.loadTexts: rldot1dTpAgingTimeMax.setDescription('The max timeout period in seconds for aging out dynamically learned forwarding information.')
mibBuilder.exportSymbols("Dell-BRIDGEMIBOBJECTS-MIB", rldot1pPriorityMapState=rldot1pPriorityMapState, rldot1dStpVlanPortForwardTransitions=rldot1dStpVlanPortForwardTransitions, rldot1sMstpInstancePriority=rldot1sMstpInstancePriority, rldot1sMstpInstancePortState=rldot1sMstpInstancePortState, rldot1dStpVlanPortDesignatedBridge=rldot1dStpVlanPortDesignatedBridge, PYSNMP_MODULE_ID=rlpBridgeMIBObjects, VlanList4=VlanList4, rldot1sMstpVlanEntry=rldot1sMstpVlanEntry, rldot1sMstpExtPortEntry=rldot1sMstpExtPortEntry, rldot1sMstpInstanceRootPort=rldot1sMstpInstanceRootPort, rldot1dStpEnableByDefault=rldot1dStpEnableByDefault, rldot1dStpVlanPortPort=rldot1dStpVlanPortPort, rldot1dStpMonitorTime=rldot1dStpMonitorTime, rldot1wRStpVlanEdgePortTable=rldot1wRStpVlanEdgePortTable, rldot1dStpTimeSinceTopologyChange=rldot1dStpTimeSinceTopologyChange, rldot1dStpTrapVrblVID=rldot1dStpTrapVrblVID, rldot1dPriority=rldot1dPriority, rldot1dStpDesignatedRoot=rldot1dStpDesignatedRoot, rldot1dStpTaggedFlooding=rldot1dStpTaggedFlooding, rldot1sMstpInstancePortPriority=rldot1sMstpInstancePortPriority, rldot1dStpSeparatedBridgesTable=rldot1dStpSeparatedBridgesTable, rldot1dStpHelloTime=rldot1dStpHelloTime, rldot1dStpTopChanges=rldot1dStpTopChanges, rldot1sMstpInstanceEntry=rldot1sMstpInstanceEntry, rldot1sMstpVlan=rldot1sMstpVlan, rldot1dPriorityPortGroupTable=rldot1dPriorityPortGroupTable, rldot1dStpVlanPortEntry=rldot1dStpVlanPortEntry, rldot1dStpPortBpduGuardEntry=rldot1dStpPortBpduGuardEntry, rldot1dStpSeparatedBridgesPortEnable=rldot1dStpSeparatedBridgesPortEnable, rldot1sMstpInstanceTopChanges=rldot1sMstpInstanceTopChanges, rldot1sMstpExtPortPort=rldot1sMstpExtPortPort, rldot1wRStpForceVersionEntry=rldot1wRStpForceVersionEntry, rldot1dStpPortAutoEdgePort=rldot1dStpPortAutoEdgePort, rldot1wRStpVlanEdgePortEntry=rldot1wRStpVlanEdgePortEntry, rldot1sMstpInstanceId=rldot1sMstpInstanceId, rldot1dStpDisabledPortStateTable=rldot1dStpDisabledPortStateTable, rldot1sMstpInstancePortEntry=rldot1sMstpInstancePortEntry, rldot1sMstpExtPortInternalOperPathCost=rldot1sMstpExtPortInternalOperPathCost, rldot1sMstpDesignatedMaxHopes=rldot1sMstpDesignatedMaxHopes, rldot1sMstpInstanceVlanEntry=rldot1sMstpInstanceVlanEntry, rldot1wRStpVlanEdgePortPort=rldot1wRStpVlanEdgePortPort, rldot1dStpRootPort=rldot1dStpRootPort, rldot1sMstpPendingConfigurationName=rldot1sMstpPendingConfigurationName, rldot1dStpTrapVariable=rldot1dStpTrapVariable, rldot1dStp=rldot1dStp, rldot1dStpPortToDefault=rldot1dStpPortToDefault, rldot1dStpPortTable=rldot1dStpPortTable, VlanList3=VlanList3, rldot1dStpPortDampStable=rldot1dStpPortDampStable, rldot1dStpSupportedType=rldot1dStpSupportedType, rldot1sMstpInstancePortTable=rldot1sMstpInstancePortTable, rldot1sMstpInstancePortDesignatedPort=rldot1sMstpInstancePortDesignatedPort, rldot1dStpSeparatedBridgesEntry=rldot1dStpSeparatedBridgesEntry, rldot1sMstpInstanceMaxAge=rldot1sMstpInstanceMaxAge, rldot1sMstpInstanceRemainingHopes=rldot1sMstpInstanceRemainingHopes, rldot1dStpVlanTable=rldot1dStpVlanTable, rldot1dStpVlanPortDesignatedCost=rldot1dStpVlanPortDesignatedCost, rldot1dStpSeparatedBridgesEnable=rldot1dStpSeparatedBridgesEnable, rldot1dStpPortPort=rldot1dStpPortPort, rldot1sMstpExtPortDesignatedRegionalCost=rldot1sMstpExtPortDesignatedRegionalCost, rldot1dStpVlanPortDesignatedPort=rldot1dStpVlanPortDesignatedPort, rldot1dStpPortsEnable=rldot1dStpPortsEnable, rldot1sMstpInstanceDesignatedRoot=rldot1sMstpInstanceDesignatedRoot, rldot1dStpFloodBpduMethod=rldot1dStpFloodBpduMethod, rldot1dStpPortMustBelongToVlan=rldot1dStpPortMustBelongToVlan, rldot1dStpPortEntry=rldot1dStpPortEntry, rldot1dStpForwardDelay=rldot1dStpForwardDelay, rldot1dPriorityMibVersion=rldot1dPriorityMibVersion, rlpBridgeMIBObjects=rlpBridgeMIBObjects, rldot1sMstpInstanceHoldTime=rldot1sMstpInstanceHoldTime, rldot1dStpPortLoopback=rldot1dStpPortLoopback, rldot1sMstpInstancePortPathCost=rldot1sMstpInstancePortPathCost, rldot1dStpExtendedPortNumberFormat=rldot1dStpExtendedPortNumberFormat, rldot1dStpVlan=rldot1dStpVlan, rldot1sMstpInstancePortEnable=rldot1sMstpInstancePortEnable, rldot1dStpTypeAfterReset=rldot1dStpTypeAfterReset, rldot1wRStpForceVersionState=rldot1wRStpForceVersionState, rldot1pPriorityMapPriority=rldot1pPriorityMapPriority, rldot1sMStpInstancePortAdminPathCost=rldot1sMStpInstancePortAdminPathCost, rldot1sMstpInstanceTimeSinceTopologyChange=rldot1sMstpInstanceTimeSinceTopologyChange, rldot1dStpBpduType=rldot1dStpBpduType, rldot1sMstpPendingRevisionLevel=rldot1sMstpPendingRevisionLevel, rldot1pPriorityMapEntry=rldot1pPriorityMapEntry, rldot1wRStpVlanEdgePortVlan=rldot1wRStpVlanEdgePortVlan, rldot1dStpDisabledPortStateEntry=rldot1dStpDisabledPortStateEntry, rldot1sMstpInstancePortDesignatedCost=rldot1sMstpInstancePortDesignatedCost, rldot1dStpPortFilterBpdu=rldot1dStpPortFilterBpdu, rldot1dStpVlanPortPathCost=rldot1dStpVlanPortPathCost, rldot1pPriorityMap=rldot1pPriorityMap, rldot1pPriorityMapStatus=rldot1pPriorityMapStatus, rldot1sMstpMaxHopes=rldot1sMstpMaxHopes, rldot1dStpPortBpduOperStatus=rldot1dStpPortBpduOperStatus, rldot1dStpVlanPortVlan=rldot1dStpVlanPortVlan, rldot1sMstpInstancePortMstiId=rldot1sMstpInstancePortMstiId, rldot1dExtBase=rldot1dExtBase, rldot1dStpMibVersion=rldot1dStpMibVersion, rldot1dStpSeparatedBridgesAutoConfig=rldot1dStpSeparatedBridgesAutoConfig, rldot1dStpVlanEntry=rldot1dStpVlanEntry, rldot1wRStpEdgePortStatus=rldot1wRStpEdgePortStatus, rldot1sMstpExtPortDesignatedRegionalRoot=rldot1sMstpExtPortDesignatedRegionalRoot, rldot1dStpLoopbackGuardEnable=rldot1dStpLoopbackGuardEnable, rldot1dExtBaseMibVersion=rldot1dExtBaseMibVersion, rldot1sMstpExtPortInternalAdminPathCost=rldot1sMstpExtPortInternalAdminPathCost, rldot1dStpFilterBpdu=rldot1dStpFilterBpdu, rldot1sMstpInstanceVlanId1To1024=rldot1sMstpInstanceVlanId1To1024, rldot1sMstpInstancePortPort=rldot1sMstpInstancePortPort, rldot1dStpEdgeportSupportInStp=rldot1dStpEdgeportSupportInStp, rldot1sMstpRevisionLevel=rldot1sMstpRevisionLevel, rldot1wRStp=rldot1wRStp, rldot1sMstpInstanceForwardDelay=rldot1sMstpInstanceForwardDelay, rldot1sMstpInstanceVlanTable=rldot1sMstpInstanceVlanTable, rldot1dTpAgingTimeMax=rldot1dTpAgingTimeMax, rldot1wRStpForceVersionTable=rldot1wRStpForceVersionTable, rldot1dStpEnable=rldot1dStpEnable, rldot1dStpPortBpduGuardEnable=rldot1dStpPortBpduGuardEnable, rldot1dStpPortBpduReceived=rldot1dStpPortBpduReceived, rldot1pPriorityMapName=rldot1pPriorityMapName, rldot1dStpRootCost=rldot1dStpRootCost, rldot1sMstpInstanceEnable=rldot1sMstpInstanceEnable, rldot1dTpAgingTime=rldot1dTpAgingTime, rldot1dStpLastChanged=rldot1dStpLastChanged, rldot1sMstpExtPortTable=rldot1sMstpExtPortTable, rldot1sMstpConfigurationName=rldot1sMstpConfigurationName, rldot1dStpVlanPortEnable=rldot1dStpVlanPortEnable, rldot1sMstpGroup=rldot1sMstpGroup, rldot1dStpVlanPortPriority=rldot1dStpVlanPortPriority, rldot1dStpPortRole=rldot1dStpPortRole, rldot1pPriorityMapPortList=rldot1pPriorityMapPortList, rldot1dStpVlanPortDesignatedRoot=rldot1dStpVlanPortDesignatedRoot, rldot1sMstpExtPortBoundary=rldot1sMstpExtPortBoundary, rldot1sMstpInstanceVlanId=rldot1sMstpInstanceVlanId, rldot1sMstpInstanceVlanId1025To2048=rldot1sMstpInstanceVlanId1025To2048, rldot1dStpBpduCount=rldot1dStpBpduCount, rldot1dStpPortDampEnable=rldot1dStpPortDampEnable, rldot1dStpVlanPortTable=rldot1dStpVlanPortTable, rldot1dStpVlanPortState=rldot1dStpVlanPortState, rldot1dStpSeparatedBridges=rldot1dStpSeparatedBridges, rldot1sMstpVlanTable=rldot1sMstpVlanTable, rldot1wRStpForceVersionVlan=rldot1wRStpForceVersionVlan, rldot1sMstpInstancePortForwardTransitions=rldot1sMstpInstancePortForwardTransitions, rldot1sMstpRegionalRootCost=rldot1sMstpRegionalRootCost, rldot1sMstpInstanceTable=rldot1sMstpInstanceTable, rldot1dStpHoldTime=rldot1dStpHoldTime, rldot1dStpDisabledPortState=rldot1dStpDisabledPortState, rldot1sMStpInstancePortRole=rldot1sMStpInstancePortRole, rldot1sMstpPendingAction=rldot1sMstpPendingAction, VlanList1=VlanList1, rldot1dStpVlanEnable=rldot1dStpVlanEnable, rldot1dStpPortBpduSent=rldot1dStpPortBpduSent, rldot1dPriorityPortGroupEntry=rldot1dPriorityPortGroupEntry, rldot1sMstpRegionalRoot=rldot1sMstpRegionalRoot, rldot1pPriorityMapPort=rldot1pPriorityMapPort, rldot1sMstpRemainingHops=rldot1sMstpRemainingHops, rldot1dStpPortBpduGuardTable=rldot1dStpPortBpduGuardTable, rldot1sMstpInstanceRootCost=rldot1sMstpInstanceRootCost, rldot1dStpPortBelongToVlanDefault=rldot1dStpPortBelongToVlanDefault, rldot1sMstp=rldot1sMstp, rldot1dTpAgingTimeMin=rldot1dTpAgingTimeMin, VlanList2=VlanList2, rldot1sMstpPendingGroup=rldot1sMstpPendingGroup, rldot1sMstpInstancePortDesignatedRoot=rldot1sMstpInstancePortDesignatedRoot, rldot1dStpMaxAge=rldot1dStpMaxAge, rldot1dStpTrapVrblifIndex=rldot1dStpTrapVrblifIndex, rldot1dDeviceCapabilities=rldot1dDeviceCapabilities, rldot1sMstpInstanceVlanId2049To3072=rldot1sMstpInstanceVlanId2049To3072, rldot1sMstpInstanceHelloTime=rldot1sMstpInstanceHelloTime, rldot1dPriorityPortGroupNumber=rldot1dPriorityPortGroupNumber, rldot1pPriorityMapTable=rldot1pPriorityMapTable, rldot1dStpPortRestrictedRole=rldot1dStpPortRestrictedRole, rldot1sMstpInstanceVlanId3073To4094=rldot1sMstpInstanceVlanId3073To4094, rldot1dStpType=rldot1dStpType, rldot1sMstpInstancePortDesignatedBridge=rldot1sMstpInstancePortDesignatedBridge)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_size_constraint, value_range_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection')
(bridge_id, timeout, dot1d_stp_port, dot1d_base_port) = mibBuilder.importSymbols('BRIDGE-MIB', 'BridgeId', 'Timeout', 'dot1dStpPort', 'dot1dBasePort')
(rnd,) = mibBuilder.importSymbols('Dell-MIB', 'rnd')
(if_index, interface_index) = mibBuilder.importSymbols('IF-MIB', 'ifIndex', 'InterfaceIndex')
(port_list,) = mibBuilder.importSymbols('Q-BRIDGE-MIB', 'PortList')
(snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(unsigned32, time_ticks, gauge32, mib_identifier, module_identity, ip_address, object_identity, counter32, iso, bits, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, notification_type, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'TimeTicks', 'Gauge32', 'MibIdentifier', 'ModuleIdentity', 'IpAddress', 'ObjectIdentity', 'Counter32', 'iso', 'Bits', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'NotificationType', 'Counter64')
(row_status, display_string, textual_convention, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'DisplayString', 'TextualConvention', 'TruthValue')
class Vlanlist1(TextualConvention, OctetString):
description = "Each octet within this value specifies a set of eight vlans, with the first octet specifying vlan 1 through 8, the second octet specifying vlan 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered vlan, and the least significant bit represents the highest numbered vlan. Thus, each vlan of the bridge is represented by a single bit within the value of this object. If that bit has a value of '1' then that vlan is included in the set of vlans; the vlan is not included if its bit has a value of '0'. VlanList1 represent vlans 1-1024"
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 128)
class Vlanlist2(TextualConvention, OctetString):
description = 'As VlanList1 but represent vlans 1025-2048'
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 128)
class Vlanlist3(TextualConvention, OctetString):
description = 'As VlanList1 but represent vlans 2049-3072'
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 128)
class Vlanlist4(TextualConvention, OctetString):
description = 'As VlanList1 but represent vlans 3073-4094'
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 128)
rlp_bridge_mib_objects = module_identity((1, 3, 6, 1, 4, 1, 89, 57))
rlpBridgeMIBObjects.setRevisions(('2007-01-02 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
rlpBridgeMIBObjects.setRevisionsDescriptions(('Initial revision.',))
if mibBuilder.loadTexts:
rlpBridgeMIBObjects.setLastUpdated('200701020000Z')
if mibBuilder.loadTexts:
rlpBridgeMIBObjects.setOrganization('Dell')
if mibBuilder.loadTexts:
rlpBridgeMIBObjects.setContactInfo('www.dell.com')
if mibBuilder.loadTexts:
rlpBridgeMIBObjects.setDescription('This private MIB module defines bridge MIB objects private MIBs.')
rldot1d_priority = mib_identifier((1, 3, 6, 1, 4, 1, 89, 57, 1))
rldot1d_priority_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dPriorityMibVersion.setStatus('current')
if mibBuilder.loadTexts:
rldot1dPriorityMibVersion.setDescription("MIB's version, the current version is 1.")
rldot1d_priority_port_group_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 1, 2))
if mibBuilder.loadTexts:
rldot1dPriorityPortGroupTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dPriorityPortGroupTable.setDescription('A list of PortGroupNumber for each port.')
rldot1d_priority_port_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 1, 2, 1)).setIndexNames((0, 'BRIDGE-MIB', 'dot1dBasePort'))
if mibBuilder.loadTexts:
rldot1dPriorityPortGroupEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1dPriorityPortGroupEntry.setDescription('All ports belonging to a same group have the same User Priority to Traffic Class mapping.')
rldot1d_priority_port_group_number = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 1, 2, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dPriorityPortGroupNumber.setStatus('current')
if mibBuilder.loadTexts:
rldot1dPriorityPortGroupNumber.setDescription('A group, that port belongs to. All ports belonging to a same group have the same User Priority to Traffic Class mapping.')
rldot1d_stp = mib_identifier((1, 3, 6, 1, 4, 1, 89, 57, 2))
rldot1d_stp_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpMibVersion.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpMibVersion.setDescription("MIB's version, the current version is 2.")
rldot1d_stp_type = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 4))).clone(namedValues=named_values(('perDevice', 1), ('mstp', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpType.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpType.setDescription('Specifies whether the device supports Spanning Tree per device, or per group.')
rldot1d_stp_enable = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 3), truth_value().clone('true')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpEnable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpEnable.setDescription('Enable / Disable spanning tree. When working in per vlan mode enable / disable STP per all vlans.')
rldot1d_stp_port_must_belong_to_vlan = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 4), truth_value().clone('true')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpPortMustBelongToVlan.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortMustBelongToVlan.setDescription('Specifies whether a port must belong to a VLAN in order to participate in the STP.')
rldot1d_stp_extended_port_number_format = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 5), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpExtendedPortNumberFormat.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpExtendedPortNumberFormat.setDescription('Specifies whether the STP uses the extended port fnumber format.')
rldot1d_stp_vlan_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 2, 6))
if mibBuilder.loadTexts:
rldot1dStpVlanTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanTable.setDescription('A table that contains vlan-specific information for the Spanning Tree Protocol.')
rldot1d_stp_vlan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1)).setIndexNames((0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1dStpVlan'))
if mibBuilder.loadTexts:
rldot1dStpVlanEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanEntry.setDescription('A list of information maintained by every Vlan about the Spanning Tree Protocol state for that Vlan.')
rldot1d_stp_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpVlan.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlan.setDescription('The Vlan index.')
rldot1d_stp_vlan_enable = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 2), truth_value().clone('true')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpVlanEnable.setReference(' ?? ')
if mibBuilder.loadTexts:
rldot1dStpVlanEnable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanEnable.setDescription('Specifies whether this vlan is STP enable or disable')
rldot1d_stp_time_since_topology_change = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 3), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpTimeSinceTopologyChange.setReference('IEEE 802.1D-1990: Section 6.8.1.1.3')
if mibBuilder.loadTexts:
rldot1dStpTimeSinceTopologyChange.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpTimeSinceTopologyChange.setDescription('The time (in hundredths of a second) since the last time a topology change was detected by the bridge entity.')
rldot1d_stp_top_changes = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpTopChanges.setReference('IEEE 802.1D-1990: Section 6.8.1.1.3')
if mibBuilder.loadTexts:
rldot1dStpTopChanges.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpTopChanges.setDescription('The total number of topology changes detected by this bridge since the management entity was last reset or initialized.')
rldot1d_stp_designated_root = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 5), bridge_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpDesignatedRoot.setReference('IEEE 802.1D-1990: Section 4.5.3.1')
if mibBuilder.loadTexts:
rldot1dStpDesignatedRoot.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpDesignatedRoot.setDescription('The bridge identifier of the root of the spanning tree as determined by the Spanning Tree Protocol as executed by this node. This value is used as the Root Identifier parameter in all Configuration Bridge PDUs originated by this node.')
rldot1d_stp_root_cost = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpRootCost.setReference('IEEE 802.1D-1990: Section 4.5.3.2')
if mibBuilder.loadTexts:
rldot1dStpRootCost.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpRootCost.setDescription('The cost of the path to the root as seen from this bridge.')
rldot1d_stp_root_port = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpRootPort.setReference('IEEE 802.1D-1990: Section 4.5.3.3')
if mibBuilder.loadTexts:
rldot1dStpRootPort.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpRootPort.setDescription('The port number of the port which offers the lowest cost path from this bridge to the root bridge.')
rldot1d_stp_max_age = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 8), timeout()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpMaxAge.setReference('IEEE 802.1D-1990: Section 4.5.3.4')
if mibBuilder.loadTexts:
rldot1dStpMaxAge.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpMaxAge.setDescription('The maximum age of Spanning Tree Protocol information learned from the network on any port before it is discarded, in units of hundredths of a second. This is the actual value that this bridge is currently using.')
rldot1d_stp_hello_time = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 9), timeout()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpHelloTime.setReference('IEEE 802.1D-1990: Section 4.5.3.5')
if mibBuilder.loadTexts:
rldot1dStpHelloTime.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpHelloTime.setDescription('The amount of time between the transmission of Configuration bridge PDUs by this node on any port when it is the root of the spanning tree or trying to become so, in units of hundredths of a second. This is the actual value that this bridge is currently using.')
rldot1d_stp_hold_time = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpHoldTime.setReference('IEEE 802.1D-1990: Section 4.5.3.14')
if mibBuilder.loadTexts:
rldot1dStpHoldTime.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpHoldTime.setDescription('This time value determines the interval length during which no more than two Configuration bridge PDUs shall be transmitted by this node, in units of hundredths of a second.')
rldot1d_stp_forward_delay = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 6, 1, 11), timeout()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpForwardDelay.setReference('IEEE 802.1D-1990: Section 4.5.3.6')
if mibBuilder.loadTexts:
rldot1dStpForwardDelay.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpForwardDelay.setDescription('This time value, measured in units of hundredths of a second, controls how fast a port changes its spanning state when moving towards the Forwarding state. The value determines how long the port stays in each of the Listening and Learning states, which precede the Forwarding state. This value is also used, when a topology change has been detected and is underway, to age all dynamic entries in the Forwarding Database. [Note that this value is the one that this bridge is currently using, in contrast to dot1dStpBridgeForwardDelay which is the value that this bridge and all others would start using if/when this bridge were to become the root.]')
rldot1d_stp_vlan_port_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 2, 7))
if mibBuilder.loadTexts:
rldot1dStpVlanPortTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanPortTable.setDescription('A table that contains pair <vlan, port> specific information for the Spanning Tree Protocol.')
rldot1d_stp_vlan_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1)).setIndexNames((0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1dStpVlanPortVlan'), (0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1dStpVlanPortPort'))
if mibBuilder.loadTexts:
rldot1dStpVlanPortEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanPortEntry.setDescription('A list of information maintained by every pair <vlan, port> about the Spanning Tree Protocol state for that pair.')
rldot1d_stp_vlan_port_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4095))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpVlanPortVlan.setReference('IEEE 802.1s/D2-1999 ')
if mibBuilder.loadTexts:
rldot1dStpVlanPortVlan.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanPortVlan.setDescription('The Vlan number that the port belongs to, and for which this entry contains Spanning Tree Protocol management information.')
rldot1d_stp_vlan_port_port = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 4096))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpVlanPortPort.setReference('IEEE 802.1t/D2-1999: Section 9.2.6')
if mibBuilder.loadTexts:
rldot1dStpVlanPortPort.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanPortPort.setDescription('The port number of the port for which this entry contains Spanning Tree Protocol management information.')
rldot1d_stp_vlan_port_priority = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpVlanPortPriority.setReference('IEEE 802.1t/D2-1999: Section 9.2.6')
if mibBuilder.loadTexts:
rldot1dStpVlanPortPriority.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanPortPriority.setDescription('The value of the priority field which is contained in the more significant 4 bits of the most significant octet of the (2 octet long) Port ID. The other octet of the Port ID is given by the value of rldot1dStpVlanPort.')
rldot1d_stp_vlan_port_state = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('disabled', 1), ('blocking', 2), ('listening', 3), ('learning', 4), ('forwarding', 5), ('broken', 6)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpVlanPortState.setReference('IEEE 802.1D-1990: Section 4.5.5.2')
if mibBuilder.loadTexts:
rldot1dStpVlanPortState.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanPortState.setDescription("The port's current state as defined by application of the Spanning Tree Protocol. This state controls what action a port takes on reception of a frame. If the bridge has detected a port that is malfunctioning it will place that port into the broken(6) state. For ports which are disabled (see dot1dStpVlanPortEnable), this object will have a value of disabled(1).")
rldot1d_stp_vlan_port_enable = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpVlanPortEnable.setReference('IEEE 802.1D-1990: Section 4.5.5.2')
if mibBuilder.loadTexts:
rldot1dStpVlanPortEnable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanPortEnable.setDescription('The enabled/disabled status of the port.')
rldot1d_stp_vlan_port_path_cost = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpVlanPortPathCost.setReference('IEEE 802.1D-1990: Section 4.5.5.3')
if mibBuilder.loadTexts:
rldot1dStpVlanPortPathCost.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanPortPathCost.setDescription('The contribution of this port to the path cost of paths towards the spanning tree root which include this port. 802.1D-1990 recommends that the default value of this parameter be in inverse proportion to the speed of the attached LAN.')
rldot1d_stp_vlan_port_designated_root = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 7), bridge_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpVlanPortDesignatedRoot.setReference('IEEE 802.1D-1990: Section 4.5.5.4')
if mibBuilder.loadTexts:
rldot1dStpVlanPortDesignatedRoot.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanPortDesignatedRoot.setDescription('The unique Bridge Identifier of the Bridge recorded as the Root in the Configuration BPDUs transmitted by the Designated Bridge for the segment to which the port is attached.')
rldot1d_stp_vlan_port_designated_cost = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpVlanPortDesignatedCost.setReference('IEEE 802.1D-1990: Section 4.5.5.5')
if mibBuilder.loadTexts:
rldot1dStpVlanPortDesignatedCost.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanPortDesignatedCost.setDescription('The path cost of the Designated Port of the segment connected to this port. This value is compared to the Root Path Cost field in received bridge PDUs.')
rldot1d_stp_vlan_port_designated_bridge = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 9), bridge_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpVlanPortDesignatedBridge.setReference('IEEE 802.1D-1990: Section 4.5.5.6')
if mibBuilder.loadTexts:
rldot1dStpVlanPortDesignatedBridge.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanPortDesignatedBridge.setDescription("The Bridge Identifier of the bridge which this port considers to be the Designated Bridge for this port's segment.")
rldot1d_stp_vlan_port_designated_port = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 10), octet_string().subtype(subtypeSpec=value_size_constraint(2, 2)).setFixedLength(2)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpVlanPortDesignatedPort.setReference('IEEE 802.1D-1990: Section 4.5.5.7')
if mibBuilder.loadTexts:
rldot1dStpVlanPortDesignatedPort.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanPortDesignatedPort.setDescription("The Port Identifier of the port on the Designated Bridge for this port's segment.")
rldot1d_stp_vlan_port_forward_transitions = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 7, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpVlanPortForwardTransitions.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpVlanPortForwardTransitions.setDescription('The number of times this port has transitioned from the Learning state to the Forwarding state.')
rldot1d_stp_trap_variable = mib_identifier((1, 3, 6, 1, 4, 1, 89, 57, 2, 8))
rldot1d_stp_trap_vrblif_index = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 8, 1), interface_index()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpTrapVrblifIndex.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpTrapVrblifIndex.setDescription('The ifIndex of port which STP status was changed')
rldot1d_stp_trap_vrbl_vid = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 8, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpTrapVrblVID.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpTrapVrblVID.setDescription('The VID of VLAN to which the port belongs which STP status was changed')
rldot1d_stp_type_after_reset = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 4))).clone(namedValues=named_values(('perDevice', 1), ('mstp', 4))).clone('perDevice')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpTypeAfterReset.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpTypeAfterReset.setDescription('New mode of spaning tree supported by the device after the next reset.')
rldot1d_stp_monitor_time = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 10), integer32().subtype(subtypeSpec=value_range_constraint(1, 20)).clone(10)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpMonitorTime.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpMonitorTime.setDescription('Factor of hello-time during which a port is monotored to determine if it is stable.')
rldot1d_stp_bpdu_count = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 11), integer32().subtype(subtypeSpec=value_range_constraint(1, 60)).clone(10)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpBpduCount.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpBpduCount.setDescription('The number of bpdu that need to received for the link to be considered stable.')
rldot1d_stp_last_changed = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 12), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpLastChanged.setReference('')
if mibBuilder.loadTexts:
rldot1dStpLastChanged.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpLastChanged.setDescription('The last time any object in this table was changed by SNMP or other local management means.')
rldot1d_stp_port_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 2, 13))
if mibBuilder.loadTexts:
rldot1dStpPortTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortTable.setDescription('A table that contains extended pair port specific information.')
rldot1d_stp_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1)).setIndexNames((0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1dStpPortPort'))
if mibBuilder.loadTexts:
rldot1dStpPortEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortEntry.setDescription('A list of information maintained by every port about the Spanning Tree Protocol state for that port.')
rldot1d_stp_port_port = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4096))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpPortPort.setReference('IEEE 802.1t/D2-1999: Section 9.2.6')
if mibBuilder.loadTexts:
rldot1dStpPortPort.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortPort.setDescription('The port number of the port for which this entry contains Spanning Tree Protocol management information.')
rldot1d_stp_port_damp_enable = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 2), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpPortDampEnable.setReference('')
if mibBuilder.loadTexts:
rldot1dStpPortDampEnable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortDampEnable.setDescription('Specified if dampening is enabled on this port.')
rldot1d_stp_port_damp_stable = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 3), truth_value().clone('true')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpPortDampStable.setReference('')
if mibBuilder.loadTexts:
rldot1dStpPortDampStable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortDampStable.setDescription('Specified if the port is stable.')
rldot1d_stp_port_filter_bpdu = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('false', 0), ('true', 1), ('none', 2))).clone('none')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpPortFilterBpdu.setReference('')
if mibBuilder.loadTexts:
rldot1dStpPortFilterBpdu.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortFilterBpdu.setDescription('Specified if this port should filter bpdus when stp is disabled.')
rldot1d_stp_port_bpdu_sent = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpPortBpduSent.setReference('')
if mibBuilder.loadTexts:
rldot1dStpPortBpduSent.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortBpduSent.setDescription('Specified the number of bpdu sent from this port.')
rldot1d_stp_port_bpdu_received = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpPortBpduReceived.setReference('')
if mibBuilder.loadTexts:
rldot1dStpPortBpduReceived.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortBpduReceived.setDescription('Specified the number of bpdu received in this port.')
rldot1d_stp_port_role = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 0), ('disabled', 1), ('alternate', 2), ('backup', 3), ('root', 4), ('designated', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpPortRole.setReference('')
if mibBuilder.loadTexts:
rldot1dStpPortRole.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortRole.setDescription('Specified the role of this this port.')
rldot1d_stp_bpdu_type = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('stp', 0), ('rstp', 1)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpBpduType.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpBpduType.setDescription('Specified the type of BPDU transmitted by this port.')
rldot1d_stp_port_restricted_role = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 9), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpPortRestrictedRole.setReference('IEEE 802.1ad-D3-1: Section 13.24.29')
if mibBuilder.loadTexts:
rldot1dStpPortRestrictedRole.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortRestrictedRole.setDescription('If TRUE causes the Port not to be selected as Root Port for the CIST or any MSTI, even if it has the best spanning tree priority vector. Such a Port will be selected as an Alternate Port after the Root Port has been selected.')
rldot1d_stp_port_auto_edge_port = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 10), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpPortAutoEdgePort.setReference('IEEE 802.1D-2004: Section 17.13.3')
if mibBuilder.loadTexts:
rldot1dStpPortAutoEdgePort.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortAutoEdgePort.setDescription("If TRUE causes the Port when become up, to enter the blocking state, and if during 3 seconds it doesn't receive a BPDU, it will enter the forwarding state.")
rldot1d_stp_port_loopback = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 11), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpPortLoopback.setReference('')
if mibBuilder.loadTexts:
rldot1dStpPortLoopback.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortLoopback.setDescription('Specified loopback was detected on port. Usable for only a short period of time if stp loopback guard is enabled (since port enters into shutdown state).')
rldot1d_stp_port_bpdu_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 13, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('filter', 0), ('flood', 1), ('bridge', 2), ('stp', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpPortBpduOperStatus.setReference('')
if mibBuilder.loadTexts:
rldot1dStpPortBpduOperStatus.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortBpduOperStatus.setDescription('Specified BPDU handling operative status for port.')
rldot1d_stp_ports_enable = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 14), truth_value().clone('true')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpPortsEnable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortsEnable.setDescription('Enable / Disable spanning tree on ports by default .')
rldot1d_stp_tagged_flooding = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 15), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpTaggedFlooding.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpTaggedFlooding.setDescription('flooding can be done in tagged bpdu .')
rldot1d_stp_port_belong_to_vlan_default = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 16), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpPortBelongToVlanDefault.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortBelongToVlanDefault.setDescription('The default value of rldot1dStpPortMustBelongToVlan .')
rldot1d_stp_enable_by_default = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 17), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpEnableByDefault.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpEnableByDefault.setDescription('The default value of rldot1dStpEnable .')
rldot1d_stp_port_to_default = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 18), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpPortToDefault.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortToDefault.setDescription('To order port/s to revert to default setings .')
rldot1d_stp_supported_type = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('perDevice', 1), ('perVlan', 2), ('mstp', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpSupportedType.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpSupportedType.setDescription('The type of stp supported by the device.')
rldot1d_stp_edgeport_support_in_stp = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 20), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dStpEdgeportSupportInStp.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpEdgeportSupportInStp.setDescription('If EdgePort is supported in stpCompatible mode .')
rldot1d_stp_filter_bpdu = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 21), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpFilterBpdu.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpFilterBpdu.setDescription('Specified if the device should filter BPDUs when STP is disabled.')
rldot1d_stp_flood_bpdu_method = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('classic', 0), ('bridging', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpFloodBpduMethod.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpFloodBpduMethod.setDescription('Specified flooding method: 1 - classic - untagged to all stp disabled ports 2 - bridging -normal bridging.')
rldot1d_stp_separated_bridges = mib_identifier((1, 3, 6, 1, 4, 1, 89, 57, 2, 23))
rldot1d_stp_port_bpdu_guard_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 2, 24))
if mibBuilder.loadTexts:
rldot1dStpPortBpduGuardTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortBpduGuardTable.setDescription('A table that contains for each port whether it is bpdu guard .')
rldot1d_stp_port_bpdu_guard_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 2, 24, 1)).setIndexNames((0, 'BRIDGE-MIB', 'dot1dBasePort'))
if mibBuilder.loadTexts:
rldot1dStpPortBpduGuardEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortBpduGuardEntry.setDescription('A list of information maintained by every port whether it is bpdu guard.')
rldot1d_stp_port_bpdu_guard_enable = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 24, 1, 1), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpPortBpduGuardEnable.setReference('')
if mibBuilder.loadTexts:
rldot1dStpPortBpduGuardEnable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpPortBpduGuardEnable.setDescription('Specified if bpdu guard is enabled on this port.')
rldot1d_stp_loopback_guard_enable = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 25), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpLoopbackGuardEnable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpLoopbackGuardEnable.setDescription('Define if STP loopback guard feature is globally enabled.')
rldot1d_stp_separated_bridges_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 2, 23, 1))
if mibBuilder.loadTexts:
rldot1dStpSeparatedBridgesTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpSeparatedBridgesTable.setDescription('Define if separated bridges feature is enabled for each interface.')
rldot1d_stp_separated_bridges_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 2, 23, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
rldot1dStpSeparatedBridgesEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpSeparatedBridgesEntry.setDescription('Defines the contents of each line in the rlSeparatedBridgesTable table.')
rldot1d_stp_separated_bridges_port_enable = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 23, 1, 1, 1), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpSeparatedBridgesPortEnable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpSeparatedBridgesPortEnable.setDescription('This variable indicates whether the separated bridge feature is enabled on a specified ifIndex.')
rldot1d_stp_separated_bridges_enable = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 23, 2), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpSeparatedBridgesEnable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpSeparatedBridgesEnable.setDescription('Enable / Disable Separated Bridges Feature.')
rldot1d_stp_separated_bridges_auto_config = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 2, 23, 3), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpSeparatedBridgesAutoConfig.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpSeparatedBridgesAutoConfig.setDescription('Enable / Disable Separated Bridges Automatic Configuration.')
rldot1d_stp_disabled_port_state_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 2, 26))
if mibBuilder.loadTexts:
rldot1dStpDisabledPortStateTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpDisabledPortStateTable.setDescription('Define stp port state for each stp disabled interface. This is auxiliary MIB emulates stp enabled port behaviour in ASIC for stp disabled port. The MIB contains only stp disabled ports entries ')
rldot1d_stp_disabled_port_state_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 2, 26, 1)).setIndexNames((0, 'BRIDGE-MIB', 'dot1dStpPort'))
if mibBuilder.loadTexts:
rldot1dStpDisabledPortStateEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpDisabledPortStateEntry.setDescription('Defines the contents of each line in the rldot1dStpDisabledPortStateTable table.')
rldot1d_stp_disabled_port_state = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 2, 26, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2, 3, 4, 5))).clone(namedValues=named_values(('blocking', 2), ('listening', 3), ('learning', 4), ('forwarding', 5))).clone('forwarding')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1dStpDisabledPortState.setStatus('current')
if mibBuilder.loadTexts:
rldot1dStpDisabledPortState.setDescription("The port's stp state as defined by external application . This state controls what action a port takes on reception of a frame.")
rldot1d_ext_base = mib_identifier((1, 3, 6, 1, 4, 1, 89, 57, 3))
rldot1d_ext_base_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 3, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dExtBaseMibVersion.setStatus('current')
if mibBuilder.loadTexts:
rldot1dExtBaseMibVersion.setDescription("MIB's version, the current version is 1.")
rldot1d_device_capabilities = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 3, 2), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dDeviceCapabilities.setStatus('current')
if mibBuilder.loadTexts:
rldot1dDeviceCapabilities.setDescription('Indicates the optional parts of private extension of IEEE 802.1D and 802.1Q that are implemented by this device and are manageable through this MIB. Capabilities that are allowed on a per-port basis are indicated in dot1dPortCapabilities.')
rldot1w_r_stp = mib_identifier((1, 3, 6, 1, 4, 1, 89, 57, 4))
rldot1w_r_stp_vlan_edge_port_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 4, 1))
if mibBuilder.loadTexts:
rldot1wRStpVlanEdgePortTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1wRStpVlanEdgePortTable.setDescription('A table that contains pair <vlan, port> specific information for the Rapid Spanning Tree Protocol.')
rldot1w_r_stp_vlan_edge_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 4, 1, 1)).setIndexNames((0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1wRStpVlanEdgePortVlan'), (0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1wRStpVlanEdgePortPort'))
if mibBuilder.loadTexts:
rldot1wRStpVlanEdgePortEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1wRStpVlanEdgePortEntry.setDescription('A list of information maintained by every pair <vlan, port> about the RAPID Spanning Tree Protocol state for that pair.')
rldot1w_r_stp_vlan_edge_port_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 4, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4095))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1wRStpVlanEdgePortVlan.setStatus('current')
if mibBuilder.loadTexts:
rldot1wRStpVlanEdgePortVlan.setDescription('The Vlan number that the port belongs to, and for which this entry contains Spanning Tree Protocol management information, If STP per device then only one value of 1 is allowed. If STP per a VLAN then all value of 1..4095 are allowed.')
rldot1w_r_stp_vlan_edge_port_port = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 4, 1, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1wRStpVlanEdgePortPort.setStatus('current')
if mibBuilder.loadTexts:
rldot1wRStpVlanEdgePortPort.setDescription('The port number of the port for which this entry contains Spanning Tree Protocol management information.')
rldot1w_r_stp_edge_port_status = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 4, 1, 1, 3), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1wRStpEdgePortStatus.setReference('IEEE 802.1wd6-2000: Section 17.13.3.1 ')
if mibBuilder.loadTexts:
rldot1wRStpEdgePortStatus.setStatus('current')
if mibBuilder.loadTexts:
rldot1wRStpEdgePortStatus.setDescription('Specifies whether this port is an Edge Port or not')
rldot1w_r_stp_force_version_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 4, 2))
if mibBuilder.loadTexts:
rldot1wRStpForceVersionTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1wRStpForceVersionTable.setDescription('A table that contains <vlan> specific information for the Rapid Spanning Tree Protocol.')
rldot1w_r_stp_force_version_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 4, 2, 1)).setIndexNames((0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1wRStpForceVersionVlan'))
if mibBuilder.loadTexts:
rldot1wRStpForceVersionEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1wRStpForceVersionEntry.setDescription('A list of information maintained by every <vlan> about the RAPID Spanning Tree Protocol state for that pair.')
rldot1w_r_stp_force_version_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 4, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4095))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1wRStpForceVersionVlan.setStatus('current')
if mibBuilder.loadTexts:
rldot1wRStpForceVersionVlan.setDescription('The Vlan number that the port belongs to, and for which this entry contains Spanning Tree Protocol management information, If STP per device then only one value of 1 is allowed. If STP per a VLAN then all value of 1..4095 are allowed.')
rldot1w_r_stp_force_version_state = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 4, 2, 1, 2), integer32().clone(2)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1wRStpForceVersionState.setReference('IEEE 802.1wd9-2000: Section 17.16.1 ')
if mibBuilder.loadTexts:
rldot1wRStpForceVersionState.setStatus('current')
if mibBuilder.loadTexts:
rldot1wRStpForceVersionState.setDescription('Specifies whether this Bridge uses the normal RSTP algorithm, or STP Compatibility algorythm: 0 - STP Compatibility 2 - Normal RSTP')
rldot1p_priority_map = mib_identifier((1, 3, 6, 1, 4, 1, 89, 57, 5))
rldot1p_priority_map_state = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 5, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1pPriorityMapState.setStatus('current')
if mibBuilder.loadTexts:
rldot1pPriorityMapState.setDescription('enable / disable')
rldot1p_priority_map_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 5, 2))
if mibBuilder.loadTexts:
rldot1pPriorityMapTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1pPriorityMapTable.setDescription('This table hold information the priority maps')
rldot1p_priority_map_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 5, 2, 1)).setIndexNames((0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1pPriorityMapName'))
if mibBuilder.loadTexts:
rldot1pPriorityMapEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1pPriorityMapEntry.setDescription('The row definition for this table.')
rldot1p_priority_map_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 5, 2, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 25))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1pPriorityMapName.setStatus('current')
if mibBuilder.loadTexts:
rldot1pPriorityMapName.setDescription('The map name')
rldot1p_priority_map_priority = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 5, 2, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
rldot1pPriorityMapPriority.setStatus('current')
if mibBuilder.loadTexts:
rldot1pPriorityMapPriority.setDescription('The map holding the queue')
rldot1p_priority_map_port = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 5, 2, 1, 3), port_list()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
rldot1pPriorityMapPort.setStatus('current')
if mibBuilder.loadTexts:
rldot1pPriorityMapPort.setDescription('the port that the map, is applied on in config')
rldot1p_priority_map_port_list = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 5, 2, 1, 4), port_list()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1pPriorityMapPortList.setStatus('current')
if mibBuilder.loadTexts:
rldot1pPriorityMapPortList.setDescription('the ports that the map, is applied on in actual')
rldot1p_priority_map_status = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 5, 2, 1, 5), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
rldot1pPriorityMapStatus.setStatus('current')
if mibBuilder.loadTexts:
rldot1pPriorityMapStatus.setDescription("The status of the table entry. It's used to delete an entry")
rldot1s_mstp = mib_identifier((1, 3, 6, 1, 4, 1, 89, 57, 6))
rldot1s_mstp_instance_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 6, 1))
if mibBuilder.loadTexts:
rldot1sMstpInstanceTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceTable.setDescription('A table that contains Mstp instance specific information for the Multiple Spanning Tree Protocol.')
rldot1s_mstp_instance_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1)).setIndexNames((0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1sMstpInstanceId'))
if mibBuilder.loadTexts:
rldot1sMstpInstanceEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceEntry.setDescription('A list of information maintained by every instance about the multiple Spanning Tree Protocol state for that instance.')
rldot1s_mstp_instance_id = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 64))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceId.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceId.setDescription('The Instance index.')
rldot1s_mstp_instance_enable = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 2), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceEnable.setReference(' ?? ')
if mibBuilder.loadTexts:
rldot1sMstpInstanceEnable.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceEnable.setDescription('Specifies whether this Instance is STP enable or disable')
rldot1s_mstp_instance_time_since_topology_change = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 3), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceTimeSinceTopologyChange.setReference('IEEE 802.1D-1990: Section 6.8.1.1.3')
if mibBuilder.loadTexts:
rldot1sMstpInstanceTimeSinceTopologyChange.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceTimeSinceTopologyChange.setDescription('The time (in hundredths of a second) since the last time a topology change was detected by the Mstp Instance .')
rldot1s_mstp_instance_top_changes = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceTopChanges.setReference('IEEE 802.1D-1990: Section 6.8.1.1.3')
if mibBuilder.loadTexts:
rldot1sMstpInstanceTopChanges.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceTopChanges.setDescription('The total number of topology changes detected by this Instance since the management entity was last reset or initialized.')
rldot1s_mstp_instance_designated_root = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 5), bridge_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceDesignatedRoot.setReference('IEEE 802.1D-1990: Section 4.5.3.1')
if mibBuilder.loadTexts:
rldot1sMstpInstanceDesignatedRoot.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceDesignatedRoot.setDescription('The bridge identifier of the root of the spanning tree as determined by the Muliple Spanning Tree Protocol as executed by this node. This value is used as the Root Identifier parameter in all Configuration Bridge PDUs originated by this node.')
rldot1s_mstp_instance_root_cost = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceRootCost.setReference('IEEE 802.1D-1990: Section 4.5.3.2')
if mibBuilder.loadTexts:
rldot1sMstpInstanceRootCost.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceRootCost.setDescription('The cost of the path to the root as seen from this bridge.')
rldot1s_mstp_instance_root_port = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceRootPort.setReference('IEEE 802.1D-1990: Section 4.5.3.3')
if mibBuilder.loadTexts:
rldot1sMstpInstanceRootPort.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceRootPort.setDescription('The port number of the port which offers the lowest cost path from this bridge to the root bridge.')
rldot1s_mstp_instance_max_age = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 8), timeout()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceMaxAge.setReference('IEEE 802.1D-1990: Section 4.5.3.4')
if mibBuilder.loadTexts:
rldot1sMstpInstanceMaxAge.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceMaxAge.setDescription('The maximum age of Spanning Tree Protocol information learned from the network on any port before it is discarded, in units of hundredths of a second. This is the actual value that this bridge is currently using.')
rldot1s_mstp_instance_hello_time = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 9), timeout()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceHelloTime.setReference('IEEE 802.1D-1990: Section 4.5.3.5')
if mibBuilder.loadTexts:
rldot1sMstpInstanceHelloTime.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceHelloTime.setDescription('The amount of time between the transmission of Configuration bridge PDUs by this node on any port when it is the root of the spanning tree or trying to become so, in units of hundredths of a second. This is the actual value that this bridge is currently using.')
rldot1s_mstp_instance_hold_time = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceHoldTime.setReference('IEEE 802.1D-1990: Section 4.5.3.14')
if mibBuilder.loadTexts:
rldot1sMstpInstanceHoldTime.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceHoldTime.setDescription('This time value determines the interval length during which no more than two Configuration bridge PDUs shall be transmitted by this node, in units of hundredths of a second.')
rldot1s_mstp_instance_forward_delay = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 11), timeout()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceForwardDelay.setReference('IEEE 802.1D-1990: Section 4.5.3.6')
if mibBuilder.loadTexts:
rldot1sMstpInstanceForwardDelay.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceForwardDelay.setDescription('This time value, measured in units of hundredths of a second, controls how fast a port changes its spanning state when moving towards the Forwarding state. The value determines how long the port stays in each of the Listening and Learning states, which precede the Forwarding state. This value is also used, when a topology change has been detected and is underway, to age all dynamic entries in the Forwarding Database. [Note that this value is the one that this bridge is currently using, in contrast to dot1dStpBridgeForwardDelay which is the value that this bridge and all others would start using if/when this bridge were to become the root.]')
rldot1s_mstp_instance_priority = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 61440))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1sMstpInstancePriority.setReference('IEEE 802.1S-2001: Section 13.24.2')
if mibBuilder.loadTexts:
rldot1sMstpInstancePriority.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePriority.setDescription('The value of the write-able portion of the Bridge ID, i.e., the first four bits of the first octet of the (8 octet long) Bridge ID.The value is a product of 4096. The next 12 bit are the msti id . The other (last) 6 octets of the Bridge ID are given by the value of dot1dBaseBridgeAddress.')
rldot1s_mstp_instance_remaining_hopes = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 1, 1, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceRemainingHopes.setReference('IEEE 802.1D-1990: Section 4.5.3.14')
if mibBuilder.loadTexts:
rldot1sMstpInstanceRemainingHopes.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceRemainingHopes.setDescription('This count value determines the amount of hopes the information transmited by this bridge on this instance can travel.')
rldot1s_mstp_instance_port_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 6, 2))
if mibBuilder.loadTexts:
rldot1sMstpInstancePortTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortTable.setDescription('A table that contains pair <msti, port> specific information for the Spanning Tree Protocol.')
rldot1s_mstp_instance_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1)).setIndexNames((0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1sMstpInstancePortMstiId'), (0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1sMstpInstancePortPort'))
if mibBuilder.loadTexts:
rldot1sMstpInstancePortEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortEntry.setDescription('A list of information maintained by every pair <msti, port> about the Spanning Tree Protocol state for that pair.')
rldot1s_mstp_instance_port_msti_id = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 64))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortMstiId.setReference('IEEE 802.1s/D11-2001 ')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortMstiId.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortMstiId.setDescription('The Vlan group number that the port belongs to, and for which this entry contains Spanning Tree Protocol management information.')
rldot1s_mstp_instance_port_port = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 4096))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortPort.setReference('IEEE 802.1t/D2-1999: Section 9.2.6')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortPort.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortPort.setDescription('The port number of the port for which this entry contains Spanning Tree Protocol management information.')
rldot1s_mstp_instance_port_priority = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 240))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortPriority.setReference('IEEE 802.1t/D2-1999: Section 9.2.6')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortPriority.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortPriority.setDescription('The value of the priority field which is contained in the more significant 4 bits of the most significant octet of the (2 octet long) Port ID. The value is a product of 16. The other octet of the Port ID is given by the value of rldot1dStpVlanGroupPort.')
rldot1s_mstp_instance_port_state = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('disabled', 1), ('blocking', 2), ('listening', 3), ('learning', 4), ('forwarding', 5), ('broken', 6)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortState.setReference('IEEE 802.1D-1990: Section 4.5.5.2')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortState.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortState.setDescription("The port's current state as defined by application of the Spanning Tree Protocol. This state controls what action a port takes on reception of a frame. If the bridge has detected a port that is malfunctioning it will place that port into the broken(6) state. For ports which are disabled (see dot1dStpVlanPortEnable), this object will have a value of disabled(1).")
rldot1s_mstp_instance_port_enable = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortEnable.setReference('IEEE 802.1D-1990: Section 4.5.5.2')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortEnable.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortEnable.setDescription('The enabled/disabled status of the port.')
rldot1s_mstp_instance_port_path_cost = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 200000000))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortPathCost.setReference('IEEE 802.1D-1990: Section 4.5.5.3')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortPathCost.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortPathCost.setDescription('The contribution of this port to the path cost of paths towards the spanning tree root which include this port. 802.1D-1990 recommends that the default value of this parameter be in inverse proportion to the speed of the attached LAN.')
rldot1s_mstp_instance_port_designated_root = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 7), bridge_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortDesignatedRoot.setReference('IEEE 802.1D-1990: Section 4.5.5.4')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortDesignatedRoot.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortDesignatedRoot.setDescription('The unique Bridge Identifier of the Bridge recorded as the Root in the Configuration BPDUs transmitted by the Designated Bridge for the segment to which the port is attached.')
rldot1s_mstp_instance_port_designated_cost = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortDesignatedCost.setReference('IEEE 802.1D-1990: Section 4.5.5.5')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortDesignatedCost.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortDesignatedCost.setDescription('The path cost of the Designated Port of the segment connected to this port. This value is compared to the Root Path Cost field in received bridge PDUs.')
rldot1s_mstp_instance_port_designated_bridge = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 9), bridge_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortDesignatedBridge.setReference('IEEE 802.1D-1990: Section 4.5.5.6')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortDesignatedBridge.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortDesignatedBridge.setDescription("The Bridge Identifier of the bridge which this port considers to be the Designated Bridge for this port's segment.")
rldot1s_mstp_instance_port_designated_port = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 10), octet_string().subtype(subtypeSpec=value_size_constraint(2, 2)).setFixedLength(2)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortDesignatedPort.setReference('IEEE 802.1D-1990: Section 4.5.5.7')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortDesignatedPort.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortDesignatedPort.setDescription("The Port Identifier of the port on the Designated Bridge for this port's segment.")
rldot1s_mstp_instance_port_forward_transitions = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortForwardTransitions.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstancePortForwardTransitions.setDescription('The number of times this port has transitioned from the Learning state to the Forwarding state.')
rldot1s_m_stp_instance_port_admin_path_cost = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 200000000))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1sMStpInstancePortAdminPathCost.setReference('IEEE 802.1D-1998: Section 8.5.5.3')
if mibBuilder.loadTexts:
rldot1sMStpInstancePortAdminPathCost.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMStpInstancePortAdminPathCost.setDescription("The administratively assigned value for the contribution of this port to the path cost of paths towards the spanning tree root. Writing a value of '0' assigns the automatically calculated default Path Cost value to the port. If the default Path Cost is being used, this object returns '0' when read. This complements the object dot1dStpPortPathCost, which returns the operational value of the path cost.")
rldot1s_m_stp_instance_port_role = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 2, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('unknown', 0), ('disabled', 1), ('alternate', 2), ('backup', 3), ('root', 4), ('designated', 5), ('master', 6)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMStpInstancePortRole.setReference('')
if mibBuilder.loadTexts:
rldot1sMStpInstancePortRole.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMStpInstancePortRole.setDescription('Specify the role of this this port.')
rldot1s_mstp_max_hopes = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 40)).clone(20)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1sMstpMaxHopes.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpMaxHopes.setDescription('Max number of hopes that an MST BPDU will travel inside a region.')
rldot1s_mstp_configuration_name = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 4), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpConfigurationName.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpConfigurationName.setDescription("The active configuration name as will be caried in MST BPDU's.")
rldot1s_mstp_revision_level = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpRevisionLevel.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpRevisionLevel.setDescription('The active revision level.')
rldot1s_mstp_vlan_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 6, 6))
if mibBuilder.loadTexts:
rldot1sMstpVlanTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpVlanTable.setDescription('A table that contains information about the alocation of vlans to groups.')
rldot1s_mstp_vlan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 6, 6, 1)).setIndexNames((0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1sMstpVlan'))
if mibBuilder.loadTexts:
rldot1sMstpVlanEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpVlanEntry.setDescription('A list of information maintained by every vlan about the group it belongs to.')
rldot1s_mstp_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 6, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpVlan.setReference('IEEE 802.1s/D11-2001: Section 13.7')
if mibBuilder.loadTexts:
rldot1sMstpVlan.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpVlan.setDescription('The vlan number of the vlan for which this entry contains Spanning Tree Protocol management information.')
rldot1s_mstp_group = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 6, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpGroup.setReference('')
if mibBuilder.loadTexts:
rldot1sMstpGroup.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpGroup.setDescription('Specifid the active group number this vlan belonges to.')
rldot1s_mstp_pending_group = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 6, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1sMstpPendingGroup.setReference('')
if mibBuilder.loadTexts:
rldot1sMstpPendingGroup.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpPendingGroup.setDescription('Specifid the pending group number this vlan belonges to.')
rldot1s_mstp_ext_port_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 6, 7))
if mibBuilder.loadTexts:
rldot1sMstpExtPortTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpExtPortTable.setDescription('A table that contains MSTP information about ports of the CIST.')
rldot1s_mstp_ext_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1)).setIndexNames((0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1sMstpExtPortPort'))
if mibBuilder.loadTexts:
rldot1sMstpExtPortEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpExtPortEntry.setDescription('A list of information maintained by every port of the CIST.')
rldot1s_mstp_ext_port_port = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4096))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpExtPortPort.setReference('IEEE 802.1t/D2-1999: Section 9.2.6')
if mibBuilder.loadTexts:
rldot1sMstpExtPortPort.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpExtPortPort.setDescription('The port number of the port for which this entry contains Spanning Tree Protocol management information.')
rldot1s_mstp_ext_port_internal_oper_path_cost = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 200000000))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpExtPortInternalOperPathCost.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpExtPortInternalOperPathCost.setDescription('The contribution of this port to the path cost of paths towards the spanning tree regional root which include this port. 802.1S-2002 recommends that the default value of this parameter be in inverse proportion to the speed of the attached LAN.')
rldot1s_mstp_ext_port_designated_regional_root = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1, 3), bridge_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpExtPortDesignatedRegionalRoot.setReference('IEEE 802.1D-1990: Section 4.5.5.4')
if mibBuilder.loadTexts:
rldot1sMstpExtPortDesignatedRegionalRoot.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpExtPortDesignatedRegionalRoot.setDescription('The unique Bridge Identifier of the Bridge recorded as the Root in the Configuration BPDUs transmitted by the Designated Bridge for the segment to which the port is attached.')
rldot1s_mstp_ext_port_designated_regional_cost = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpExtPortDesignatedRegionalCost.setReference('IEEE 802.1D-1990: Section 4.5.5.5')
if mibBuilder.loadTexts:
rldot1sMstpExtPortDesignatedRegionalCost.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpExtPortDesignatedRegionalCost.setDescription('The regional path cost of the Designated Port of the segment connected to this port. This value is compared to the Root Path Cost field in received bridge PDUs.')
rldot1s_mstp_ext_port_boundary = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1, 5), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpExtPortBoundary.setReference('IEEE 802.1D-1990: Section 4.5.5.5')
if mibBuilder.loadTexts:
rldot1sMstpExtPortBoundary.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpExtPortBoundary.setDescription('Indication if the port is conented to to a lan segment outside or inside the region.')
rldot1s_mstp_ext_port_internal_admin_path_cost = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 7, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 200000000))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1sMstpExtPortInternalAdminPathCost.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpExtPortInternalAdminPathCost.setDescription("The administratively assigned value for the contribution of this port to the path cost of paths towards the spanning tree root. Writing a value of '0' assigns the automatically calculated default Path Cost value to the port. If the default Path Cost is being used, this object returns '0' when read. This complements the object dot1dStpPortPathCost, which returns the operational value of the path cost.")
rldot1s_mstp_designated_max_hopes = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 8), integer32().subtype(subtypeSpec=value_range_constraint(1, 40))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpDesignatedMaxHopes.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpDesignatedMaxHopes.setDescription('Max number of hopes that an MST BPDU will travel inside a region.')
rldot1s_mstp_regional_root = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 9), bridge_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpRegionalRoot.setReference('IEEE 802.1S-2002: Section 13.16.4')
if mibBuilder.loadTexts:
rldot1sMstpRegionalRoot.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpRegionalRoot.setDescription('CIST Regional Root Identifier (13.16.4). The Bridge Identifier of the current CIST Regional Root.')
rldot1s_mstp_regional_root_cost = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpRegionalRootCost.setReference('IEEE 802.1S-2002: Section 12.8.1.1.3')
if mibBuilder.loadTexts:
rldot1sMstpRegionalRootCost.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpRegionalRootCost.setDescription('The CIST path cost from the transmitting Bridge to the CIST Regional Root.')
rldot1s_mstp_pending_configuration_name = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 11), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1sMstpPendingConfigurationName.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpPendingConfigurationName.setDescription('The pending configuration name.')
rldot1s_mstp_pending_revision_level = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1sMstpPendingRevisionLevel.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpPendingRevisionLevel.setDescription('The pending revision level.')
rldot1s_mstp_pending_action = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('copyPendingActive', 1), ('copyActivePending', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1sMstpPendingAction.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpPendingAction.setDescription('The action to be done with the pending configuration. copyPendingActive - to copy the pending mst configuration to the active one. copyActivePending - to copy the active mst configuration to the pending one. ')
rldot1s_mstp_remaining_hops = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 6, 14), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpRemainingHops.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpRemainingHops.setDescription('This count value determines the amount of hops the information transmitted by this bridge can travel.')
rldot1s_mstp_instance_vlan_table = mib_table((1, 3, 6, 1, 4, 1, 89, 57, 6, 15))
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanTable.setDescription('This table contains vlan lists per MSTP instances.')
rldot1s_mstp_instance_vlan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 57, 6, 15, 1)).setIndexNames((0, 'Dell-BRIDGEMIBOBJECTS-MIB', 'rldot1sMstpInstanceVlanId'))
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanEntry.setDescription(' The entry contains vlan lists per specific MSTP instance.')
rldot1s_mstp_instance_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 15, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanId.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanId.setDescription('Specifiy the instance number.')
rldot1s_mstp_instance_vlan_id1_to1024 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 15, 1, 2), vlan_list1()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanId1To1024.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanId1To1024.setDescription('first VlanId List of specific MSTP instance.')
rldot1s_mstp_instance_vlan_id1025_to2048 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 15, 1, 3), vlan_list2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanId1025To2048.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanId1025To2048.setDescription('second VlanId List of specific MSTP instance.')
rldot1s_mstp_instance_vlan_id2049_to3072 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 15, 1, 4), vlan_list3()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanId2049To3072.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanId2049To3072.setDescription('third VlanId List of specific MSTP instance.')
rldot1s_mstp_instance_vlan_id3073_to4094 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 57, 6, 15, 1, 5), vlan_list4()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanId3073To4094.setStatus('current')
if mibBuilder.loadTexts:
rldot1sMstpInstanceVlanId3073To4094.setDescription('fourth VlanId List of specific MSTP instance.')
rldot1d_tp_aging_time = mib_identifier((1, 3, 6, 1, 4, 1, 89, 57, 7))
rldot1d_tp_aging_time_min = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 7, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dTpAgingTimeMin.setReference('P802.1d/D9, July 14, 1989: Section 6.7.1.1.3')
if mibBuilder.loadTexts:
rldot1dTpAgingTimeMin.setStatus('current')
if mibBuilder.loadTexts:
rldot1dTpAgingTimeMin.setDescription('The min timeout period in seconds for aging out dynamically learned forwarding information.')
rldot1d_tp_aging_time_max = mib_scalar((1, 3, 6, 1, 4, 1, 89, 57, 7, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1dTpAgingTimeMax.setReference('P802.1d/D9, July 14, 1989: Section 6.7.1.1.3')
if mibBuilder.loadTexts:
rldot1dTpAgingTimeMax.setStatus('current')
if mibBuilder.loadTexts:
rldot1dTpAgingTimeMax.setDescription('The max timeout period in seconds for aging out dynamically learned forwarding information.')
mibBuilder.exportSymbols('Dell-BRIDGEMIBOBJECTS-MIB', rldot1pPriorityMapState=rldot1pPriorityMapState, rldot1dStpVlanPortForwardTransitions=rldot1dStpVlanPortForwardTransitions, rldot1sMstpInstancePriority=rldot1sMstpInstancePriority, rldot1sMstpInstancePortState=rldot1sMstpInstancePortState, rldot1dStpVlanPortDesignatedBridge=rldot1dStpVlanPortDesignatedBridge, PYSNMP_MODULE_ID=rlpBridgeMIBObjects, VlanList4=VlanList4, rldot1sMstpVlanEntry=rldot1sMstpVlanEntry, rldot1sMstpExtPortEntry=rldot1sMstpExtPortEntry, rldot1sMstpInstanceRootPort=rldot1sMstpInstanceRootPort, rldot1dStpEnableByDefault=rldot1dStpEnableByDefault, rldot1dStpVlanPortPort=rldot1dStpVlanPortPort, rldot1dStpMonitorTime=rldot1dStpMonitorTime, rldot1wRStpVlanEdgePortTable=rldot1wRStpVlanEdgePortTable, rldot1dStpTimeSinceTopologyChange=rldot1dStpTimeSinceTopologyChange, rldot1dStpTrapVrblVID=rldot1dStpTrapVrblVID, rldot1dPriority=rldot1dPriority, rldot1dStpDesignatedRoot=rldot1dStpDesignatedRoot, rldot1dStpTaggedFlooding=rldot1dStpTaggedFlooding, rldot1sMstpInstancePortPriority=rldot1sMstpInstancePortPriority, rldot1dStpSeparatedBridgesTable=rldot1dStpSeparatedBridgesTable, rldot1dStpHelloTime=rldot1dStpHelloTime, rldot1dStpTopChanges=rldot1dStpTopChanges, rldot1sMstpInstanceEntry=rldot1sMstpInstanceEntry, rldot1sMstpVlan=rldot1sMstpVlan, rldot1dPriorityPortGroupTable=rldot1dPriorityPortGroupTable, rldot1dStpVlanPortEntry=rldot1dStpVlanPortEntry, rldot1dStpPortBpduGuardEntry=rldot1dStpPortBpduGuardEntry, rldot1dStpSeparatedBridgesPortEnable=rldot1dStpSeparatedBridgesPortEnable, rldot1sMstpInstanceTopChanges=rldot1sMstpInstanceTopChanges, rldot1sMstpExtPortPort=rldot1sMstpExtPortPort, rldot1wRStpForceVersionEntry=rldot1wRStpForceVersionEntry, rldot1dStpPortAutoEdgePort=rldot1dStpPortAutoEdgePort, rldot1wRStpVlanEdgePortEntry=rldot1wRStpVlanEdgePortEntry, rldot1sMstpInstanceId=rldot1sMstpInstanceId, rldot1dStpDisabledPortStateTable=rldot1dStpDisabledPortStateTable, rldot1sMstpInstancePortEntry=rldot1sMstpInstancePortEntry, rldot1sMstpExtPortInternalOperPathCost=rldot1sMstpExtPortInternalOperPathCost, rldot1sMstpDesignatedMaxHopes=rldot1sMstpDesignatedMaxHopes, rldot1sMstpInstanceVlanEntry=rldot1sMstpInstanceVlanEntry, rldot1wRStpVlanEdgePortPort=rldot1wRStpVlanEdgePortPort, rldot1dStpRootPort=rldot1dStpRootPort, rldot1sMstpPendingConfigurationName=rldot1sMstpPendingConfigurationName, rldot1dStpTrapVariable=rldot1dStpTrapVariable, rldot1dStp=rldot1dStp, rldot1dStpPortToDefault=rldot1dStpPortToDefault, rldot1dStpPortTable=rldot1dStpPortTable, VlanList3=VlanList3, rldot1dStpPortDampStable=rldot1dStpPortDampStable, rldot1dStpSupportedType=rldot1dStpSupportedType, rldot1sMstpInstancePortTable=rldot1sMstpInstancePortTable, rldot1sMstpInstancePortDesignatedPort=rldot1sMstpInstancePortDesignatedPort, rldot1dStpSeparatedBridgesEntry=rldot1dStpSeparatedBridgesEntry, rldot1sMstpInstanceMaxAge=rldot1sMstpInstanceMaxAge, rldot1sMstpInstanceRemainingHopes=rldot1sMstpInstanceRemainingHopes, rldot1dStpVlanTable=rldot1dStpVlanTable, rldot1dStpVlanPortDesignatedCost=rldot1dStpVlanPortDesignatedCost, rldot1dStpSeparatedBridgesEnable=rldot1dStpSeparatedBridgesEnable, rldot1dStpPortPort=rldot1dStpPortPort, rldot1sMstpExtPortDesignatedRegionalCost=rldot1sMstpExtPortDesignatedRegionalCost, rldot1dStpVlanPortDesignatedPort=rldot1dStpVlanPortDesignatedPort, rldot1dStpPortsEnable=rldot1dStpPortsEnable, rldot1sMstpInstanceDesignatedRoot=rldot1sMstpInstanceDesignatedRoot, rldot1dStpFloodBpduMethod=rldot1dStpFloodBpduMethod, rldot1dStpPortMustBelongToVlan=rldot1dStpPortMustBelongToVlan, rldot1dStpPortEntry=rldot1dStpPortEntry, rldot1dStpForwardDelay=rldot1dStpForwardDelay, rldot1dPriorityMibVersion=rldot1dPriorityMibVersion, rlpBridgeMIBObjects=rlpBridgeMIBObjects, rldot1sMstpInstanceHoldTime=rldot1sMstpInstanceHoldTime, rldot1dStpPortLoopback=rldot1dStpPortLoopback, rldot1sMstpInstancePortPathCost=rldot1sMstpInstancePortPathCost, rldot1dStpExtendedPortNumberFormat=rldot1dStpExtendedPortNumberFormat, rldot1dStpVlan=rldot1dStpVlan, rldot1sMstpInstancePortEnable=rldot1sMstpInstancePortEnable, rldot1dStpTypeAfterReset=rldot1dStpTypeAfterReset, rldot1wRStpForceVersionState=rldot1wRStpForceVersionState, rldot1pPriorityMapPriority=rldot1pPriorityMapPriority, rldot1sMStpInstancePortAdminPathCost=rldot1sMStpInstancePortAdminPathCost, rldot1sMstpInstanceTimeSinceTopologyChange=rldot1sMstpInstanceTimeSinceTopologyChange, rldot1dStpBpduType=rldot1dStpBpduType, rldot1sMstpPendingRevisionLevel=rldot1sMstpPendingRevisionLevel, rldot1pPriorityMapEntry=rldot1pPriorityMapEntry, rldot1wRStpVlanEdgePortVlan=rldot1wRStpVlanEdgePortVlan, rldot1dStpDisabledPortStateEntry=rldot1dStpDisabledPortStateEntry, rldot1sMstpInstancePortDesignatedCost=rldot1sMstpInstancePortDesignatedCost, rldot1dStpPortFilterBpdu=rldot1dStpPortFilterBpdu, rldot1dStpVlanPortPathCost=rldot1dStpVlanPortPathCost, rldot1pPriorityMap=rldot1pPriorityMap, rldot1pPriorityMapStatus=rldot1pPriorityMapStatus, rldot1sMstpMaxHopes=rldot1sMstpMaxHopes, rldot1dStpPortBpduOperStatus=rldot1dStpPortBpduOperStatus, rldot1dStpVlanPortVlan=rldot1dStpVlanPortVlan, rldot1sMstpInstancePortMstiId=rldot1sMstpInstancePortMstiId, rldot1dExtBase=rldot1dExtBase, rldot1dStpMibVersion=rldot1dStpMibVersion, rldot1dStpSeparatedBridgesAutoConfig=rldot1dStpSeparatedBridgesAutoConfig, rldot1dStpVlanEntry=rldot1dStpVlanEntry, rldot1wRStpEdgePortStatus=rldot1wRStpEdgePortStatus, rldot1sMstpExtPortDesignatedRegionalRoot=rldot1sMstpExtPortDesignatedRegionalRoot, rldot1dStpLoopbackGuardEnable=rldot1dStpLoopbackGuardEnable, rldot1dExtBaseMibVersion=rldot1dExtBaseMibVersion, rldot1sMstpExtPortInternalAdminPathCost=rldot1sMstpExtPortInternalAdminPathCost, rldot1dStpFilterBpdu=rldot1dStpFilterBpdu, rldot1sMstpInstanceVlanId1To1024=rldot1sMstpInstanceVlanId1To1024, rldot1sMstpInstancePortPort=rldot1sMstpInstancePortPort, rldot1dStpEdgeportSupportInStp=rldot1dStpEdgeportSupportInStp, rldot1sMstpRevisionLevel=rldot1sMstpRevisionLevel, rldot1wRStp=rldot1wRStp, rldot1sMstpInstanceForwardDelay=rldot1sMstpInstanceForwardDelay, rldot1sMstpInstanceVlanTable=rldot1sMstpInstanceVlanTable, rldot1dTpAgingTimeMax=rldot1dTpAgingTimeMax, rldot1wRStpForceVersionTable=rldot1wRStpForceVersionTable, rldot1dStpEnable=rldot1dStpEnable, rldot1dStpPortBpduGuardEnable=rldot1dStpPortBpduGuardEnable, rldot1dStpPortBpduReceived=rldot1dStpPortBpduReceived, rldot1pPriorityMapName=rldot1pPriorityMapName, rldot1dStpRootCost=rldot1dStpRootCost, rldot1sMstpInstanceEnable=rldot1sMstpInstanceEnable, rldot1dTpAgingTime=rldot1dTpAgingTime, rldot1dStpLastChanged=rldot1dStpLastChanged, rldot1sMstpExtPortTable=rldot1sMstpExtPortTable, rldot1sMstpConfigurationName=rldot1sMstpConfigurationName, rldot1dStpVlanPortEnable=rldot1dStpVlanPortEnable, rldot1sMstpGroup=rldot1sMstpGroup, rldot1dStpVlanPortPriority=rldot1dStpVlanPortPriority, rldot1dStpPortRole=rldot1dStpPortRole, rldot1pPriorityMapPortList=rldot1pPriorityMapPortList, rldot1dStpVlanPortDesignatedRoot=rldot1dStpVlanPortDesignatedRoot, rldot1sMstpExtPortBoundary=rldot1sMstpExtPortBoundary, rldot1sMstpInstanceVlanId=rldot1sMstpInstanceVlanId, rldot1sMstpInstanceVlanId1025To2048=rldot1sMstpInstanceVlanId1025To2048, rldot1dStpBpduCount=rldot1dStpBpduCount, rldot1dStpPortDampEnable=rldot1dStpPortDampEnable, rldot1dStpVlanPortTable=rldot1dStpVlanPortTable, rldot1dStpVlanPortState=rldot1dStpVlanPortState, rldot1dStpSeparatedBridges=rldot1dStpSeparatedBridges, rldot1sMstpVlanTable=rldot1sMstpVlanTable, rldot1wRStpForceVersionVlan=rldot1wRStpForceVersionVlan, rldot1sMstpInstancePortForwardTransitions=rldot1sMstpInstancePortForwardTransitions, rldot1sMstpRegionalRootCost=rldot1sMstpRegionalRootCost, rldot1sMstpInstanceTable=rldot1sMstpInstanceTable, rldot1dStpHoldTime=rldot1dStpHoldTime, rldot1dStpDisabledPortState=rldot1dStpDisabledPortState, rldot1sMStpInstancePortRole=rldot1sMStpInstancePortRole, rldot1sMstpPendingAction=rldot1sMstpPendingAction, VlanList1=VlanList1, rldot1dStpVlanEnable=rldot1dStpVlanEnable, rldot1dStpPortBpduSent=rldot1dStpPortBpduSent, rldot1dPriorityPortGroupEntry=rldot1dPriorityPortGroupEntry, rldot1sMstpRegionalRoot=rldot1sMstpRegionalRoot, rldot1pPriorityMapPort=rldot1pPriorityMapPort, rldot1sMstpRemainingHops=rldot1sMstpRemainingHops, rldot1dStpPortBpduGuardTable=rldot1dStpPortBpduGuardTable, rldot1sMstpInstanceRootCost=rldot1sMstpInstanceRootCost, rldot1dStpPortBelongToVlanDefault=rldot1dStpPortBelongToVlanDefault, rldot1sMstp=rldot1sMstp, rldot1dTpAgingTimeMin=rldot1dTpAgingTimeMin, VlanList2=VlanList2, rldot1sMstpPendingGroup=rldot1sMstpPendingGroup, rldot1sMstpInstancePortDesignatedRoot=rldot1sMstpInstancePortDesignatedRoot, rldot1dStpMaxAge=rldot1dStpMaxAge, rldot1dStpTrapVrblifIndex=rldot1dStpTrapVrblifIndex, rldot1dDeviceCapabilities=rldot1dDeviceCapabilities, rldot1sMstpInstanceVlanId2049To3072=rldot1sMstpInstanceVlanId2049To3072, rldot1sMstpInstanceHelloTime=rldot1sMstpInstanceHelloTime, rldot1dPriorityPortGroupNumber=rldot1dPriorityPortGroupNumber, rldot1pPriorityMapTable=rldot1pPriorityMapTable, rldot1dStpPortRestrictedRole=rldot1dStpPortRestrictedRole, rldot1sMstpInstanceVlanId3073To4094=rldot1sMstpInstanceVlanId3073To4094, rldot1dStpType=rldot1dStpType, rldot1sMstpInstancePortDesignatedBridge=rldot1sMstpInstancePortDesignatedBridge) |
"""
Hosoya triangle (originally Fibonacci triangle) is a triangular arrangement
of numbers, where if you take any number it is the sum of 2 numbers above.
First line is always 1, and second line is always {1 1}.
This printHosoya function takes argument n which is the height of the triangle
(number of lines).
For example:
printHosoya( 6 ) would return:
1
1 1
2 1 2
3 2 2 3
5 3 4 3 5
8 5 6 6 5 8
The complexity is O(n^3).
"""
def hosoya(n, m):
if ((n == 0 and m == 0) or (n == 1 and m == 0) or
(n == 1 and m == 1) or (n == 2 and m == 1)):
return 1
if n > m:
return hosoya(n - 1, m) + hosoya(n - 2, m)
elif m == n:
return hosoya(n - 1, m - 1) + hosoya(n - 2, m - 2)
else:
return 0
def print_hosoya(n):
for i in range(n):
for j in range(i + 1):
print(hosoya(i, j), end=" ")
print("\n", end="")
def hosoya_testing(n):
x = []
for i in range(n):
for j in range(i + 1):
x.append(hosoya(i, j))
return x
| """
Hosoya triangle (originally Fibonacci triangle) is a triangular arrangement
of numbers, where if you take any number it is the sum of 2 numbers above.
First line is always 1, and second line is always {1 1}.
This printHosoya function takes argument n which is the height of the triangle
(number of lines).
For example:
printHosoya( 6 ) would return:
1
1 1
2 1 2
3 2 2 3
5 3 4 3 5
8 5 6 6 5 8
The complexity is O(n^3).
"""
def hosoya(n, m):
if n == 0 and m == 0 or (n == 1 and m == 0) or (n == 1 and m == 1) or (n == 2 and m == 1):
return 1
if n > m:
return hosoya(n - 1, m) + hosoya(n - 2, m)
elif m == n:
return hosoya(n - 1, m - 1) + hosoya(n - 2, m - 2)
else:
return 0
def print_hosoya(n):
for i in range(n):
for j in range(i + 1):
print(hosoya(i, j), end=' ')
print('\n', end='')
def hosoya_testing(n):
x = []
for i in range(n):
for j in range(i + 1):
x.append(hosoya(i, j))
return x |
def enumerate_states(n_states, state_len, state, results):
if n_states > 0:
for sym in ('x', 'o', '_'):
enumerate_states(n_states - 1, state_len, state + sym, results)
if len(state) == state_len:
results.append(state)
state_len = 9
results = []
enumerate_states(state_len, state_len, '', results)
print('done')
| def enumerate_states(n_states, state_len, state, results):
if n_states > 0:
for sym in ('x', 'o', '_'):
enumerate_states(n_states - 1, state_len, state + sym, results)
if len(state) == state_len:
results.append(state)
state_len = 9
results = []
enumerate_states(state_len, state_len, '', results)
print('done') |
class Token(object):
Name = 'name'
String = 'string'
Number = 'number'
Operator = 'operator'
Boolean = 'boolean'
Undefined = 'undefined'
Null = 'null'
Regex = 'regex'
EOF = '(end)'
LITERALS = [String, Number, Boolean, Regex, Null, Undefined]
def __init__(self, source, type, line=0, char=0):
self.value = source
self.type = type
self.line = line
self.char = char
def __repr__(self):
return '<%s: %s (line %d, char %d)>' % (self.type, self.value.replace('\n', '\\n'), self.line, self.char)
def __str__(self):
return self.value
def tokenize(stream):
operators = ['>>>=', '>>=', '<<=', '%=', '/=', '*=', '+=', '-=', '===', '==', '!==', '!=', '++', '--',
'>=', '<=', '&=', '|=', '^=', '&&', '||', '&', '|', '^', '~', '!', '{', '[', ']', '}', '(',
')', ':', '*', '/', '%', '+', '-', '?', '<', '>', ';', '=', ',', '.']
in_comment = False
in_string = False
building_name = False
escaped = False
length = len(stream)
skip = 0
str = []
numrange = range(ord('0'), ord('9')+1)
octrange = range(ord('0'), ord('7')+1)
hexrange = range(ord('a'), ord('f')+1) + range(ord('A'), ord('F')+1) + numrange
whitespace = [' ', '\n', '\t', '\r', '"', "'"]
get_operators_for = lambda c : filter(lambda x : ord(c) is ord(x[0]), operators)
is_operator = lambda c : c is not None and any(get_operators_for(c))
is_separator = lambda c : c is None or (c in whitespace or is_operator(c))
is_number = lambda c : c is not None and ord(c) in numrange
is_hexnumber = lambda c : c is not None and ord(c) in hexrange
is_octnum = lambda c : c is not None and ord(c) in octrange
tokens = []
line = 1
char = 0
for idx, character in enumerate(stream):
if character == '\n':
line += 1
char = 0
else:
char += 1
if skip:
skip = skip - 1
continue
next = lambda i=1 : idx+i < length and stream[idx+i] or None
if in_comment:
if escaped:
escaped = False
continue
if character == '\\':
escaped = True
elif in_comment == '/*' and character == '*' and next() == '/':
skip = 1
in_comment = False
elif in_comment == '//' and character == '\n':
in_comment = False
elif in_string:
if escaped:
escaped = False
if character == 'x':
hex_0 = next()
hex_1 = next(1)
if hex_0 is None or hex_1 is None:
raise TokenizeError("Unexpected EOF during hex parse")
try:
hex_0 = int(hex_0, 16) << 4
hex_1 = int(hex_1, 16)
str.append(unichr(hex_1 | hex_0))
skip = 2
except ValueError:
str.append(unicode(character))
elif character == 'u':
hex_0 = next()
hex_1 = next(1)
hex_2 = next(2)
hex_3 = next(3)
if not all(reduce(lambda x : x is not None, [hex_0, hex_1, hex_2, hex_3])):
raise TokenizeError("Unexpected EOF during unicode parse")
try:
hex = (int(hex_0, 16) << 12) | (int(hex_1, 16) << 8) | \
(int(hex_2, 16) << 4) | (int(hex_0, 16))
str.append(unichr(hex))
skip = 4
except ValueError:
str.append(unicode(character))
elif character == '\\':
str.append(u'\\')
elif character == in_string:
str.append(unicode(in_string))
else:
str.append(unicode(character))
else:
if character == '\\':
escaped = True
elif character == in_string:
in_string = False
tokens.append(Token(u''.join(str), Token.String, line, char))
str = []
else:
str.append(unicode(character))
else:
is_sep = is_separator(character)
if not building_name and not is_sep:
if is_number(character):
if character == '0':
if next() == 'x':
# build hex
skip = 2
c = next(skip)
while is_hexnum(c):
str.append(c)
skip += 1
c = next(skip)
skip -= 1
tokens.append(Token(u''.join(str), Token.Number, line, char))
str = []
continue
elif is_number(next(1)):
# build octal
skip = 0
c = next(skip)
is_octal = True
while is_number(c):
str.append(c)
is_octal = is_octal and is_octnum(c)
skip += 1
c = next(skip)
skip -= 1
if not is_octal:
str = str[1:]
tokens.append(Token(u''.join(str), Token.Number, line, char))
str = []
continue
# build plain number
seen_e = False
seen_dot = False
skip = 0
okay = lambda : is_number(next(skip)) or (not seen_e and next(skip) == '.') or (not seen_dot and next(skip).lower() == 'e')
while okay():
c = next(skip)
str.append(c)
if c == '.':
seen_dot = True
elif c.lower() == 'e':
seen_e = True
skip += 1
skip -= 1
tokens.append(Token(u''.join(str), Token.Number, line, char))
str = []
else:
building_name = True
str.append(character)
elif is_sep:
ops = get_operators_for(character)
if building_name:
building_name = False
ustr = u''.join(str)
type = Token.Name
if ustr == u'Infinity' or ustr == u'NaN':
type = Token.Number
elif ustr == u'undefined':
type = Token.Undefined
elif ustr == u'null':
type = Token.Null
tokens.append(Token(ustr, type, line, char))
str = []
if character == '/' and tokens[-1].type == Token.Operator:
in_regex = True
regex_escape = False
skip = 1
c = next(skip)
while (c != '/' or regex_escape):
if regex_escape:
str.append('\\')
str.append(c)
regex_escape = False
elif c == '\\':
regex_escape = True
elif c == '\n':
in_regex = False
break
else:
str.append(c)
skip += 1
c = next(skip)
if len(str) < 1:
in_regex = False
str = []
if not in_regex:
skip = 0
else:
skip += 1
flags = []
c = next(skip)
while c in ['g', 'i', 'm', 'y']:
flags.append(c)
skip += 1
c = next(skip)
skip -= 1
str.append('/')
str = ['/'] + str + flags
tokens.append(Token(u''.join(str), Token.Regex, line, char))
str = []
continue
if character == '"' or character == "'":
in_string = character
elif character == '/' and (next(1) == '/' or next(1) == '*'):
in_comment = character + next(1)
else:
if len(ops):
for possibility in ops:
bad = False
for pidx, pchar in enumerate(possibility):
c = next(pidx)
if c != pchar:
bad = True
break
if not bad:
tokens.append(Token(possibility, Token.Operator, line, char))
skip = len(possibility) - 1
str = []
break
elif building_name:
str.append(character)
tokens.append(Token('', Token.EOF, line, char))
return tokens
| class Token(object):
name = 'name'
string = 'string'
number = 'number'
operator = 'operator'
boolean = 'boolean'
undefined = 'undefined'
null = 'null'
regex = 'regex'
eof = '(end)'
literals = [String, Number, Boolean, Regex, Null, Undefined]
def __init__(self, source, type, line=0, char=0):
self.value = source
self.type = type
self.line = line
self.char = char
def __repr__(self):
return '<%s: %s (line %d, char %d)>' % (self.type, self.value.replace('\n', '\\n'), self.line, self.char)
def __str__(self):
return self.value
def tokenize(stream):
operators = ['>>>=', '>>=', '<<=', '%=', '/=', '*=', '+=', '-=', '===', '==', '!==', '!=', '++', '--', '>=', '<=', '&=', '|=', '^=', '&&', '||', '&', '|', '^', '~', '!', '{', '[', ']', '}', '(', ')', ':', '*', '/', '%', '+', '-', '?', '<', '>', ';', '=', ',', '.']
in_comment = False
in_string = False
building_name = False
escaped = False
length = len(stream)
skip = 0
str = []
numrange = range(ord('0'), ord('9') + 1)
octrange = range(ord('0'), ord('7') + 1)
hexrange = range(ord('a'), ord('f') + 1) + range(ord('A'), ord('F') + 1) + numrange
whitespace = [' ', '\n', '\t', '\r', '"', "'"]
get_operators_for = lambda c: filter(lambda x: ord(c) is ord(x[0]), operators)
is_operator = lambda c: c is not None and any(get_operators_for(c))
is_separator = lambda c: c is None or (c in whitespace or is_operator(c))
is_number = lambda c: c is not None and ord(c) in numrange
is_hexnumber = lambda c: c is not None and ord(c) in hexrange
is_octnum = lambda c: c is not None and ord(c) in octrange
tokens = []
line = 1
char = 0
for (idx, character) in enumerate(stream):
if character == '\n':
line += 1
char = 0
else:
char += 1
if skip:
skip = skip - 1
continue
next = lambda i=1: idx + i < length and stream[idx + i] or None
if in_comment:
if escaped:
escaped = False
continue
if character == '\\':
escaped = True
elif in_comment == '/*' and character == '*' and (next() == '/'):
skip = 1
in_comment = False
elif in_comment == '//' and character == '\n':
in_comment = False
elif in_string:
if escaped:
escaped = False
if character == 'x':
hex_0 = next()
hex_1 = next(1)
if hex_0 is None or hex_1 is None:
raise tokenize_error('Unexpected EOF during hex parse')
try:
hex_0 = int(hex_0, 16) << 4
hex_1 = int(hex_1, 16)
str.append(unichr(hex_1 | hex_0))
skip = 2
except ValueError:
str.append(unicode(character))
elif character == 'u':
hex_0 = next()
hex_1 = next(1)
hex_2 = next(2)
hex_3 = next(3)
if not all(reduce(lambda x: x is not None, [hex_0, hex_1, hex_2, hex_3])):
raise tokenize_error('Unexpected EOF during unicode parse')
try:
hex = int(hex_0, 16) << 12 | int(hex_1, 16) << 8 | int(hex_2, 16) << 4 | int(hex_0, 16)
str.append(unichr(hex))
skip = 4
except ValueError:
str.append(unicode(character))
elif character == '\\':
str.append(u'\\')
elif character == in_string:
str.append(unicode(in_string))
else:
str.append(unicode(character))
elif character == '\\':
escaped = True
elif character == in_string:
in_string = False
tokens.append(token(u''.join(str), Token.String, line, char))
str = []
else:
str.append(unicode(character))
else:
is_sep = is_separator(character)
if not building_name and (not is_sep):
if is_number(character):
if character == '0':
if next() == 'x':
skip = 2
c = next(skip)
while is_hexnum(c):
str.append(c)
skip += 1
c = next(skip)
skip -= 1
tokens.append(token(u''.join(str), Token.Number, line, char))
str = []
continue
elif is_number(next(1)):
skip = 0
c = next(skip)
is_octal = True
while is_number(c):
str.append(c)
is_octal = is_octal and is_octnum(c)
skip += 1
c = next(skip)
skip -= 1
if not is_octal:
str = str[1:]
tokens.append(token(u''.join(str), Token.Number, line, char))
str = []
continue
seen_e = False
seen_dot = False
skip = 0
okay = lambda : is_number(next(skip)) or (not seen_e and next(skip) == '.') or (not seen_dot and next(skip).lower() == 'e')
while okay():
c = next(skip)
str.append(c)
if c == '.':
seen_dot = True
elif c.lower() == 'e':
seen_e = True
skip += 1
skip -= 1
tokens.append(token(u''.join(str), Token.Number, line, char))
str = []
else:
building_name = True
str.append(character)
elif is_sep:
ops = get_operators_for(character)
if building_name:
building_name = False
ustr = u''.join(str)
type = Token.Name
if ustr == u'Infinity' or ustr == u'NaN':
type = Token.Number
elif ustr == u'undefined':
type = Token.Undefined
elif ustr == u'null':
type = Token.Null
tokens.append(token(ustr, type, line, char))
str = []
if character == '/' and tokens[-1].type == Token.Operator:
in_regex = True
regex_escape = False
skip = 1
c = next(skip)
while c != '/' or regex_escape:
if regex_escape:
str.append('\\')
str.append(c)
regex_escape = False
elif c == '\\':
regex_escape = True
elif c == '\n':
in_regex = False
break
else:
str.append(c)
skip += 1
c = next(skip)
if len(str) < 1:
in_regex = False
str = []
if not in_regex:
skip = 0
else:
skip += 1
flags = []
c = next(skip)
while c in ['g', 'i', 'm', 'y']:
flags.append(c)
skip += 1
c = next(skip)
skip -= 1
str.append('/')
str = ['/'] + str + flags
tokens.append(token(u''.join(str), Token.Regex, line, char))
str = []
continue
if character == '"' or character == "'":
in_string = character
elif character == '/' and (next(1) == '/' or next(1) == '*'):
in_comment = character + next(1)
elif len(ops):
for possibility in ops:
bad = False
for (pidx, pchar) in enumerate(possibility):
c = next(pidx)
if c != pchar:
bad = True
break
if not bad:
tokens.append(token(possibility, Token.Operator, line, char))
skip = len(possibility) - 1
str = []
break
elif building_name:
str.append(character)
tokens.append(token('', Token.EOF, line, char))
return tokens |
super_value = '<value>'
class Program:
def __init__(self) -> None:
self.ty_list = []
self.types = {}
self.data_list = []
self.data = {}
self.func_list = []
self.functions = {}
def __str__(self) -> str:
result = ".TYPE\n"
for ty in self.ty_list:
result += str(self.types[ty]) + '\n'
result += ".DATA\n"
for data in self.data_list:
result += str(self.data[data]) + '\n'
result += ".FUNCTION\n"
for func in self.func_list:
result += str(self.functions[func]) + '\n'
return result
def try_add_data(self, name, value):
try:
_ = self.data[name]
except KeyError:
self.data[name] = Data(name, value)
def add_data(self, name, value):
index = 0
while f'{name}_{index}' in self.data_list: index += 1
self.data_list.append(f'{name}_{index}')
self.data[self.data_list[-1]] = Data(self.data_list[-1], value)
return self.data_list[-1]
def force_data(self, name, value):
self.data_list.append(name)
self.data[self.data_list[-1]] = Data(self.data_list[-1], value)
return self.data_list[-1]
def add_type(self, type):
self.ty_list.append(type.name)
self.types[type.name] = type
def add_func(self, func):
self.func_list.append(func.name)
self.functions[func.name] = func
class Type:
def __init__(self, name) -> None:
self.name = name
self.attributes = []
self.attr = {}
self.method_list = []
self.methods = {}
def attr_push(self, name, _name):
if not name in self.attributes:
self.attributes.append(name)
self.attr[name] = _name
def method_push(self, name, f):
try:
self.methods[name]
except KeyError:
self.method_list.append(name)
self.methods[name] = f
def __str__(self) -> str:
result = f'type {self.name}: ' + '{\n'
for att in self.attributes:
result += '\tattribute ' + str(att) + ' '*(14 - len(str(att))) + '-> ' + str(self.attr[att]) + '\n'
for func in self.method_list:
result += '\tfunction ' + str(func) + ' '*(15 - len(str(func))) + '-> ' + str(self.methods[func]) + '\n'
return result + '}'
class Data:
def __init__(self, name, value) -> None:
self.name = name
self.value = value
def __str__(self) -> str:
return f'\tdata {self.name}: {self.value}'
class Function:
def __init__(self, name) -> None:
self.name = name
self.var_dir = {}
self.param = []
self.local = []
self.expr = []
def get_name(self, name):
index = 0
while True:
try:
_ = self.var_dir[f'{name}@{index}']
index += 1
except KeyError:
return f'{name}@{index}'
def force_local(self,name, scope):
scope.define_variable(name, name)
self.var_dir[name] = 1
self.local.append(name)
return name
def force_parma(self,name, scope):
self.var_dir[name] = 1
scope.define_variable(name, name)
self.param.append(name)
return name
def param_push(self, name, scope):
new_name = self.get_name(name)
scope.define_variable(name, new_name)
self.var_dir[new_name] = 1
self.param.append(new_name)
return new_name
def local_push(self, name, scope):
new_name = self.get_name(name)
scope.define_variable(name, new_name)
self.var_dir[new_name] = 1
self.local.append(new_name)
return new_name
def expr_push(self, expr):
self.expr.append(expr)
def __str__(self) -> str:
result = f'function {self.name}: ' + '{\n'
for param in self.param:
result += f'\tPARAM {str(param)}\n'
for local in self.local:
result += f'\tLOCAL {str(local)}\n'
for exp in self.expr:
result += '\t' + str(exp) + '\n'
return result + '}'
class Expression:
def __init__(self, x = None, y = None, z = None) -> None:
self.x = x
self.y = y
self.z = z
def try_set_value(self, name):
if self.x == super_value:
self.x = name
return True
return False
def set_value(self, name):
if not self.x == super_value:
raise Exception("The expression is'nt set expression")
self.x = name
@property
def can_fusion(self):
return False
def __str__(self) -> str:
result = self.__class__.__name__ + ' '
if not self.x is None:
result += str(self.x) + " "
if not self.y is None:
result += str(self.y) + " "
if not self.z is None:
result += str(self.z) + " "
return result
class Assign(Expression):
@property
def can_fusion(self):
return True
class GetAttr(Expression):
pass
class SetAttr(Expression):
pass
class Sum(Expression):
pass
class Rest(Expression):
pass
class Div(Expression):
pass
class Mult(Expression):
pass
class Less(Expression):
pass
class LessOrEqual(Expression):
pass
class Equals(Expression):
pass
class CheckType(Expression):
pass
class Return(Expression):
pass
class Arg(Expression):
pass
class VCall(Expression):
pass
class Call(Expression):
pass
class SimpleCall(Expression):
pass
class New(Expression):
pass
class Load(Expression):
pass
class ALLOCATE(Expression):
pass
class IfGoTo(Expression):
pass
class GoTo(Expression):
pass
class Label(Expression):
pass
class TypeOf(Expression):
pass
class Neg(Expression):
pass
class Complemnet(Expression):
pass
class Comment(Expression):
def __str__(self) -> str:
return "" | super_value = '<value>'
class Program:
def __init__(self) -> None:
self.ty_list = []
self.types = {}
self.data_list = []
self.data = {}
self.func_list = []
self.functions = {}
def __str__(self) -> str:
result = '.TYPE\n'
for ty in self.ty_list:
result += str(self.types[ty]) + '\n'
result += '.DATA\n'
for data in self.data_list:
result += str(self.data[data]) + '\n'
result += '.FUNCTION\n'
for func in self.func_list:
result += str(self.functions[func]) + '\n'
return result
def try_add_data(self, name, value):
try:
_ = self.data[name]
except KeyError:
self.data[name] = data(name, value)
def add_data(self, name, value):
index = 0
while f'{name}_{index}' in self.data_list:
index += 1
self.data_list.append(f'{name}_{index}')
self.data[self.data_list[-1]] = data(self.data_list[-1], value)
return self.data_list[-1]
def force_data(self, name, value):
self.data_list.append(name)
self.data[self.data_list[-1]] = data(self.data_list[-1], value)
return self.data_list[-1]
def add_type(self, type):
self.ty_list.append(type.name)
self.types[type.name] = type
def add_func(self, func):
self.func_list.append(func.name)
self.functions[func.name] = func
class Type:
def __init__(self, name) -> None:
self.name = name
self.attributes = []
self.attr = {}
self.method_list = []
self.methods = {}
def attr_push(self, name, _name):
if not name in self.attributes:
self.attributes.append(name)
self.attr[name] = _name
def method_push(self, name, f):
try:
self.methods[name]
except KeyError:
self.method_list.append(name)
self.methods[name] = f
def __str__(self) -> str:
result = f'type {self.name}: ' + '{\n'
for att in self.attributes:
result += '\tattribute ' + str(att) + ' ' * (14 - len(str(att))) + '-> ' + str(self.attr[att]) + '\n'
for func in self.method_list:
result += '\tfunction ' + str(func) + ' ' * (15 - len(str(func))) + '-> ' + str(self.methods[func]) + '\n'
return result + '}'
class Data:
def __init__(self, name, value) -> None:
self.name = name
self.value = value
def __str__(self) -> str:
return f'\tdata {self.name}: {self.value}'
class Function:
def __init__(self, name) -> None:
self.name = name
self.var_dir = {}
self.param = []
self.local = []
self.expr = []
def get_name(self, name):
index = 0
while True:
try:
_ = self.var_dir[f'{name}@{index}']
index += 1
except KeyError:
return f'{name}@{index}'
def force_local(self, name, scope):
scope.define_variable(name, name)
self.var_dir[name] = 1
self.local.append(name)
return name
def force_parma(self, name, scope):
self.var_dir[name] = 1
scope.define_variable(name, name)
self.param.append(name)
return name
def param_push(self, name, scope):
new_name = self.get_name(name)
scope.define_variable(name, new_name)
self.var_dir[new_name] = 1
self.param.append(new_name)
return new_name
def local_push(self, name, scope):
new_name = self.get_name(name)
scope.define_variable(name, new_name)
self.var_dir[new_name] = 1
self.local.append(new_name)
return new_name
def expr_push(self, expr):
self.expr.append(expr)
def __str__(self) -> str:
result = f'function {self.name}: ' + '{\n'
for param in self.param:
result += f'\tPARAM {str(param)}\n'
for local in self.local:
result += f'\tLOCAL {str(local)}\n'
for exp in self.expr:
result += '\t' + str(exp) + '\n'
return result + '}'
class Expression:
def __init__(self, x=None, y=None, z=None) -> None:
self.x = x
self.y = y
self.z = z
def try_set_value(self, name):
if self.x == super_value:
self.x = name
return True
return False
def set_value(self, name):
if not self.x == super_value:
raise exception("The expression is'nt set expression")
self.x = name
@property
def can_fusion(self):
return False
def __str__(self) -> str:
result = self.__class__.__name__ + ' '
if not self.x is None:
result += str(self.x) + ' '
if not self.y is None:
result += str(self.y) + ' '
if not self.z is None:
result += str(self.z) + ' '
return result
class Assign(Expression):
@property
def can_fusion(self):
return True
class Getattr(Expression):
pass
class Setattr(Expression):
pass
class Sum(Expression):
pass
class Rest(Expression):
pass
class Div(Expression):
pass
class Mult(Expression):
pass
class Less(Expression):
pass
class Lessorequal(Expression):
pass
class Equals(Expression):
pass
class Checktype(Expression):
pass
class Return(Expression):
pass
class Arg(Expression):
pass
class Vcall(Expression):
pass
class Call(Expression):
pass
class Simplecall(Expression):
pass
class New(Expression):
pass
class Load(Expression):
pass
class Allocate(Expression):
pass
class Ifgoto(Expression):
pass
class Goto(Expression):
pass
class Label(Expression):
pass
class Typeof(Expression):
pass
class Neg(Expression):
pass
class Complemnet(Expression):
pass
class Comment(Expression):
def __str__(self) -> str:
return '' |
class ExternalID:
def __init__(self, config, connection):
self._config = config
self._connection = connection
def get(self):
return self._connection.get(url='/organisation/external-id')
def create(self, data):
return self._connection.post(url='/organisation/external-id', payload=None) | class Externalid:
def __init__(self, config, connection):
self._config = config
self._connection = connection
def get(self):
return self._connection.get(url='/organisation/external-id')
def create(self, data):
return self._connection.post(url='/organisation/external-id', payload=None) |
result = 0
ROWS = 6
COLUMNS = 50
screen = [[0 for _ in range(COLUMNS)] for __ in range(ROWS)]
with open("input.txt", "r") as input:
for line in input:
line = line.strip()
parsing = line.split()
if parsing[0] == "rect":
[x, y] = [int(n) for n in parsing[1].split("x")]
for i in range(x):
for j in range(y):
screen[j][i] = 1
elif parsing[1] == "row":
(_, row) = parsing[2].split("=")
row = int(row)
shift = int(parsing[4])
screen[row] = screen[row][-shift:] + screen[row][:-shift]
else:
(_, col) = parsing[2].split("=")
col = int(col)
shift = int(parsing[4])
for _ in range(shift):
next = screen[-1][col]
for row in range(ROWS):
temp = screen[row][col]
screen[row][col] = next
next = temp
def printScreen(screen):
return "\n".join(["".join([str(p) for p in r]) for r in screen]).replace("0", " ").replace("1", "*")
result = printScreen(screen)
with open("output2.txt", "w") as output:
output.write(str(result))
print(str(result))
| result = 0
rows = 6
columns = 50
screen = [[0 for _ in range(COLUMNS)] for __ in range(ROWS)]
with open('input.txt', 'r') as input:
for line in input:
line = line.strip()
parsing = line.split()
if parsing[0] == 'rect':
[x, y] = [int(n) for n in parsing[1].split('x')]
for i in range(x):
for j in range(y):
screen[j][i] = 1
elif parsing[1] == 'row':
(_, row) = parsing[2].split('=')
row = int(row)
shift = int(parsing[4])
screen[row] = screen[row][-shift:] + screen[row][:-shift]
else:
(_, col) = parsing[2].split('=')
col = int(col)
shift = int(parsing[4])
for _ in range(shift):
next = screen[-1][col]
for row in range(ROWS):
temp = screen[row][col]
screen[row][col] = next
next = temp
def print_screen(screen):
return '\n'.join([''.join([str(p) for p in r]) for r in screen]).replace('0', ' ').replace('1', '*')
result = print_screen(screen)
with open('output2.txt', 'w') as output:
output.write(str(result))
print(str(result)) |
expected_output = {
'switch': {
"1": {
'fan': {
"1": {
'state': 'ok'
},
"2": {
'state': 'ok'
},
"3": {
'state': 'ok'
}
},
'power_supply': {
"1": {
'state': 'not present'
},
"2": {
'state': 'ok'
}
}
}
}
}
| expected_output = {'switch': {'1': {'fan': {'1': {'state': 'ok'}, '2': {'state': 'ok'}, '3': {'state': 'ok'}}, 'power_supply': {'1': {'state': 'not present'}, '2': {'state': 'ok'}}}}} |
DEBUG=False
SQLALCHEMY_ECHO=False
SQLALCHEMY_DATABASE_URI="sqlite:///:memory:"
SQLALCHEMY_TRACK_MODIFICATIONS=False
# FLASK_ADMIN_SWATCH="cerulean"
MQTT_CLIENT_ID="shelfie_server"
# MQTT_BROKER_URL="mosquitto"
# MQTT_BROKER_PORT=1883
# MQTT_USERNAME="mosquitto_userid"
# MQTT_PASSWORD="mosquitto_password"
MQTT_KEEPALIVE=15
MQTT_TLS_ENABLED=False
SHELF_LABELS=["a","b","c"]
| debug = False
sqlalchemy_echo = False
sqlalchemy_database_uri = 'sqlite:///:memory:'
sqlalchemy_track_modifications = False
mqtt_client_id = 'shelfie_server'
mqtt_keepalive = 15
mqtt_tls_enabled = False
shelf_labels = ['a', 'b', 'c'] |
VERSION = "0.0.1"
# Application
ENVADMIN_DB_NAME = "envadmin.json"
DEFAULT_TABLE = "__default"
| version = '0.0.1'
envadmin_db_name = 'envadmin.json'
default_table = '__default' |
class Solution:
def closestValue(self, root: TreeNode, target: float) -> int:
upper = root.val
lower = root.val
while root :
if target > root.val :
lower = root.val
root = root.right
elif target < root.val :
upper = root.val
root = root.left
else :
return root.val
if abs(target - lower) < abs(upper - target) :
return lower
else :
return upper | class Solution:
def closest_value(self, root: TreeNode, target: float) -> int:
upper = root.val
lower = root.val
while root:
if target > root.val:
lower = root.val
root = root.right
elif target < root.val:
upper = root.val
root = root.left
else:
return root.val
if abs(target - lower) < abs(upper - target):
return lower
else:
return upper |
# Engine
class Engine(object):
def __init__(self, room_map):
self.room_map = room_map
def play(self):
current_room = self.room_map.opening_room()
last_room = self.room_map.next_room('finished')
while current_room != last_room:
next_room_name = current_room.enter()
current_room = self.room_map.next_room(next_room_name)
current_room.enter()
| class Engine(object):
def __init__(self, room_map):
self.room_map = room_map
def play(self):
current_room = self.room_map.opening_room()
last_room = self.room_map.next_room('finished')
while current_room != last_room:
next_room_name = current_room.enter()
current_room = self.room_map.next_room(next_room_name)
current_room.enter() |
#!/usr/bin/env python
# _*_ coding:utf-8 _*_
class Solution(object):
def isValid(self, s):
if not s:
return True
length = len(s)
if length % 2 == 1:
return False
l = [''] * length
last = -1
for c in s:
if c == '(' or c == '{' or c == '[':
last += 1
l[last] = c
continue
elif c == ')':
if l[last] != '(':
return False
l[last] = ''
elif c == '}':
if l[last] != '{':
return False
l[last] = ''
elif c == ']':
if l[last] != '[':
return False
l[last] = ''
else:
return False
last -= 1
return l[0] == ''
if __name__ == '__main__':
so =Solution()
assert(so.isValid("") == True)
assert(so.isValid("()") == True)
assert(so.isValid("(}") == False)
assert(so.isValid("()(){}") == True)
assert(so.isValid("({[]})") == True)
assert(so.isValid("({[}])") == False)
assert(so.isValid("([)]") == False)
assert(so.isValid("([[{((") == False)
assert(so.isValid("[[{((") == False)
assert(so.isValid("}]))]}") == False)
assert(so.isValid("(()(") == False)
| class Solution(object):
def is_valid(self, s):
if not s:
return True
length = len(s)
if length % 2 == 1:
return False
l = [''] * length
last = -1
for c in s:
if c == '(' or c == '{' or c == '[':
last += 1
l[last] = c
continue
elif c == ')':
if l[last] != '(':
return False
l[last] = ''
elif c == '}':
if l[last] != '{':
return False
l[last] = ''
elif c == ']':
if l[last] != '[':
return False
l[last] = ''
else:
return False
last -= 1
return l[0] == ''
if __name__ == '__main__':
so = solution()
assert so.isValid('') == True
assert so.isValid('()') == True
assert so.isValid('(}') == False
assert so.isValid('()(){}') == True
assert so.isValid('({[]})') == True
assert so.isValid('({[}])') == False
assert so.isValid('([)]') == False
assert so.isValid('([[{((') == False
assert so.isValid('[[{((') == False
assert so.isValid('}]))]}') == False
assert so.isValid('(()(') == False |
lr = 0.0001
dropout_rate = 0.5
max_epoch = 3136 #3317
batch_size = 4096
w = 19
u = 9
glimpse_hidden = 128
bp_hidden = 128
glimpse_out = 128
nGlimpse = 7
lstm_cell_size = 128
action_hidden_1 = 256
action_hidden_2 = 256
| lr = 0.0001
dropout_rate = 0.5
max_epoch = 3136
batch_size = 4096
w = 19
u = 9
glimpse_hidden = 128
bp_hidden = 128
glimpse_out = 128
n_glimpse = 7
lstm_cell_size = 128
action_hidden_1 = 256
action_hidden_2 = 256 |
contestsData={}; individualData={}
while True:
data=input()
if data!="no more time":
dataList=data.split(" -> ")
username=dataList[0]; contest=dataList[1]; pts=dataList[2]
contestFound=False; userFound=False
for j in contestsData:
if j==contest:
contestFound=True
for k in range(0,len(contestsData[j])):
if username in contestsData[j][k]:
userFound=True
if int(pts)>contestsData[j][k][1]:
contestsData[j][k][1]=int(pts)
break
if userFound==False:
contestsData[j].append([username,int(pts)])
break
if contestFound==False:
contestsData[contest]=[[username,int(pts)]]
userFound=False
for j in individualData:
if j==username:
userFound=True
break
if userFound==False:
individualData[username]=0
else:
for i in individualData:
for j in contestsData:
for k in range(0,len(contestsData[j])):
if i==contestsData[j][k][0]:
individualData[i]+=contestsData[j][k][1]
break
for j in contestsData:
tempData={}
print(f"{j}: {len(contestsData[j])} participants")
for k in range(0,len(contestsData[j])):
tempData[contestsData[j][k][0]]=contestsData[j][k][1]
participantsSorted=sorted(tempData.items(),key=lambda x: x[1], reverse=True)
participantsSorted=dict(participantsSorted)
n=1
for j in participantsSorted:
print(f"{n}. {j} <::> {participantsSorted[j]}")
n+=1
print("Individual standings: ")
individualDataSort = sorted(individualData.items(), key=lambda x: x[1], reverse=True)
individualDataSort=dict(individualDataSort)
n=1
for j in individualDataSort:
print(f"{n}. {j} -> {individualDataSort[j]}")
n+=1
break
| contests_data = {}
individual_data = {}
while True:
data = input()
if data != 'no more time':
data_list = data.split(' -> ')
username = dataList[0]
contest = dataList[1]
pts = dataList[2]
contest_found = False
user_found = False
for j in contestsData:
if j == contest:
contest_found = True
for k in range(0, len(contestsData[j])):
if username in contestsData[j][k]:
user_found = True
if int(pts) > contestsData[j][k][1]:
contestsData[j][k][1] = int(pts)
break
if userFound == False:
contestsData[j].append([username, int(pts)])
break
if contestFound == False:
contestsData[contest] = [[username, int(pts)]]
user_found = False
for j in individualData:
if j == username:
user_found = True
break
if userFound == False:
individualData[username] = 0
else:
for i in individualData:
for j in contestsData:
for k in range(0, len(contestsData[j])):
if i == contestsData[j][k][0]:
individualData[i] += contestsData[j][k][1]
break
for j in contestsData:
temp_data = {}
print(f'{j}: {len(contestsData[j])} participants')
for k in range(0, len(contestsData[j])):
tempData[contestsData[j][k][0]] = contestsData[j][k][1]
participants_sorted = sorted(tempData.items(), key=lambda x: x[1], reverse=True)
participants_sorted = dict(participantsSorted)
n = 1
for j in participantsSorted:
print(f'{n}. {j} <::> {participantsSorted[j]}')
n += 1
print('Individual standings: ')
individual_data_sort = sorted(individualData.items(), key=lambda x: x[1], reverse=True)
individual_data_sort = dict(individualDataSort)
n = 1
for j in individualDataSort:
print(f'{n}. {j} -> {individualDataSort[j]}')
n += 1
break |
""" Various string parsers. """
def floatArgs(s, cnt=None, failWith=None):
""" Parse a comma-delimited list of floats.
Args:
s - the string to parse
cnt - if set, the required number of floats.
failWith - if set, a string to flesh out error strings.
Returns:
a list of values.
Raises:
RuntimeError
"""
try:
stringList = s.split(',')
floatList = list(map(float(stringList)))
except Exception:
if failWith:
raise RuntimeError('%s: %s' % (failWith, s))
else:
raise
if cnt is not None and len(floatList) != cnt:
raise RuntimeError('%s. wrong number of arguments: %s' % (failWith, s))
return floatList
| """ Various string parsers. """
def float_args(s, cnt=None, failWith=None):
""" Parse a comma-delimited list of floats.
Args:
s - the string to parse
cnt - if set, the required number of floats.
failWith - if set, a string to flesh out error strings.
Returns:
a list of values.
Raises:
RuntimeError
"""
try:
string_list = s.split(',')
float_list = list(map(float(stringList)))
except Exception:
if failWith:
raise runtime_error('%s: %s' % (failWith, s))
else:
raise
if cnt is not None and len(floatList) != cnt:
raise runtime_error('%s. wrong number of arguments: %s' % (failWith, s))
return floatList |
# Copyright 2019 Katteli Inc.
# TestFlows.com Open-Source Software Testing Framework (http://testflows.com)
#
# 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.
def wstrip(s, word, left=True, right=True):
"""Strip word from the beginning or the end of the string.
By default strips from both sides.
"""
step = len(word)
start_pos = None
end_pos = None
if not word:
return s
while True:
found = False
if left and s.startswith(word, start_pos, end_pos):
if start_pos is None:
start_pos = 0
start_pos += step
found = True
if right and s.endswith(word, start_pos, end_pos):
if end_pos is None:
end_pos = 0
end_pos -= step
found = True
if not found:
break
return s[start_pos:end_pos]
def lwstrip(s, word):
"""Strip word only from the left side.
"""
return wstrip(s, word, right=False)
def rwstrip(s, word):
"""Strip word only from the right side.
"""
return wstrip(s, word, left=False) | def wstrip(s, word, left=True, right=True):
"""Strip word from the beginning or the end of the string.
By default strips from both sides.
"""
step = len(word)
start_pos = None
end_pos = None
if not word:
return s
while True:
found = False
if left and s.startswith(word, start_pos, end_pos):
if start_pos is None:
start_pos = 0
start_pos += step
found = True
if right and s.endswith(word, start_pos, end_pos):
if end_pos is None:
end_pos = 0
end_pos -= step
found = True
if not found:
break
return s[start_pos:end_pos]
def lwstrip(s, word):
"""Strip word only from the left side.
"""
return wstrip(s, word, right=False)
def rwstrip(s, word):
"""Strip word only from the right side.
"""
return wstrip(s, word, left=False) |
#
# PySNMP MIB module HPNSASCSI-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPNSASCSI-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:42:18 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Gauge32, Unsigned32, enterprises, Bits, ObjectIdentity, NotificationType, Integer32, TimeTicks, ModuleIdentity, MibIdentifier, Counter32, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "Unsigned32", "enterprises", "Bits", "ObjectIdentity", "NotificationType", "Integer32", "TimeTicks", "ModuleIdentity", "MibIdentifier", "Counter32", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "IpAddress")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
hp = MibIdentifier((1, 3, 6, 1, 4, 1, 11))
nm = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2))
hpnsa = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 23))
hpnsaScsi = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14))
hpnsaScsiMibRev = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 1))
hpnsaScsiAgent = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2))
hpnsaScsiHba = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3))
hpnsaScsiDev = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4))
hpnsaScsiMibRevMajor = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiMibRevMajor.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiMibRevMajor.setDescription('The major revision level of the MIB. A change in the major revision level represents a major change in the architecture or functions of the MIB.')
hpnsaScsiMibRevMinor = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiMibRevMinor.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiMibRevMinor.setDescription('The minor revision level of the MIB. A change in the minor revision level may represent some minor additional support, no changes to any pre-existing information has occurred.')
hpnsaScsiAgentModuleTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1), )
if mibBuilder.loadTexts: hpnsaScsiAgentModuleTable.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiAgentModuleTable.setDescription('A table of SNMP Agents that satisfy request pertaining to this MIB.')
hpnsaScsiAgentModuleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1), ).setIndexNames((0, "HPNSASCSI-MIB", "hpnsaScsiAgentModuleIndex"))
if mibBuilder.loadTexts: hpnsaScsiAgentModuleEntry.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiAgentModuleEntry.setDescription('A description of the Agents that access system information.')
hpnsaScsiAgentModuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiAgentModuleIndex.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiAgentModuleIndex.setDescription('A unique index for this module description.')
hpnsaScsiAgentModuleName = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiAgentModuleName.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiAgentModuleName.setDescription('The module name.')
hpnsaScsiAgentModuleVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 10))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiAgentModuleVersion.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiAgentModuleVersion.setDescription('The module version in XX.YY format. Where XX is the major version number and YY is the minor version number. This field will be a null (size 0) string if the agent cannot provide the module version.')
hpnsaScsiAgentModuleDate = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 7))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiAgentModuleDate.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiAgentModuleDate.setDescription('The module date. field octets contents range _________________________________________________ 1 1-2 year 0..65536 2 3 month 1..12 3 4 day 1..31 4 5 hour 0..23 5 6 minute 0..59 6 7 second 0..60 (use 60 for leap-second) This field will be set to year = 0 if the agent cannot provide the module date. The hour, minute, and second field will be set to zero (0) if they are not relevant. The year field is set with the most significant octet first.')
hpnsaScsiHbaTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1), )
if mibBuilder.loadTexts: hpnsaScsiHbaTable.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiHbaTable.setDescription('A list of SCSI Host Bus Adapter entries.')
hpnsaScsiHbaEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1), ).setIndexNames((0, "HPNSASCSI-MIB", "hpnsaScsiHbaIndex"))
if mibBuilder.loadTexts: hpnsaScsiHbaEntry.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiHbaEntry.setDescription('A description of an SCSI device/function.')
hpnsaScsiHbaIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiHbaIndex.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiHbaIndex.setDescription('The SCSI HBA number that this entry describes.')
hpnsaScsiHbaTargetId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiHbaTargetId.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiHbaTargetId.setDescription('The SCSI target ID or SCSI address for this HBA.')
hpnsaScsiHbaManagerId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiHbaManagerId.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiHbaManagerId.setDescription('String that describes the SCSI Manager.')
hpnsaScsiHbaHostAdapterId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiHbaHostAdapterId.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiHbaHostAdapterId.setDescription('String that describes the SCSI host adapter.')
hpnsaScsiDevTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1), )
if mibBuilder.loadTexts: hpnsaScsiDevTable.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevTable.setDescription('A list of SCSI device entries.')
hpnsaScsiDevEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1), ).setIndexNames((0, "HPNSASCSI-MIB", "hpnsaScsiDevHbaIndex"), (0, "HPNSASCSI-MIB", "hpnsaScsiDevTargIdIndex"), (0, "HPNSASCSI-MIB", "hpnsaScsiDevLunIndex"))
if mibBuilder.loadTexts: hpnsaScsiDevEntry.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevEntry.setDescription('A description of a SCSI device.')
hpnsaScsiDevHbaIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevHbaIndex.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevHbaIndex.setDescription('The SCSI HBA number that this entry describes.')
hpnsaScsiDevTargIdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevTargIdIndex.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevTargIdIndex.setDescription('The SCSI target ID or SCSI address for this HBA.')
hpnsaScsiDevLunIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevLunIndex.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevLunIndex.setDescription('The SCSI LUN for this HBA.')
hpnsaScsiDevType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevType.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevType.setDescription('Identifies the type of SCSI device: Code Description ---- ----------- 00h Direct-access device (e.g. magnetic disk) 01h Sequential-access device (e.g. magnetic tape) 02h Printer device 03h Processor device 04h Write-once read-multiple device (e.g. some optical disks) 05h CD-ROM device 06h Scanner device 07h Optical Memory device (e.g. some optical disks) 08h Medium Changer device (e.g. jukeboxes) 09h Communications device 0A-1Eh Reserved 1Fh Unknown or no device type')
hpnsaScsiDevRmb = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevRmb.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevRmb.setDescription('Identifies whether the medium is removable or not. 0 = medium is not removable 1 = medium is removable')
hpnsaScsiDevAnsiVer = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevAnsiVer.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevAnsiVer.setDescription('Indicates the implemented ANSI version of this device. 0 = might or might not comply to an ANSI standard 1 = complies to ANSI X3.131-1986 (SCSI-1) 2 = comples to ANSI ?????? (SCSI-II) 3-7 = reserved')
hpnsaScsiDevEcmaVer = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevEcmaVer.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevEcmaVer.setDescription('Indicates the implemented ECMA version of this device. Zero code indicates that this device does not comply with this standard.')
hpnsaScsiDevIsoVer = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevIsoVer.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevIsoVer.setDescription('Indicates the implemented ISO version of this device. Zero code indicates that this device does not comply with this standard.')
hpnsaScsiDevVendorId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 8))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevVendorId.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevVendorId.setDescription('Identifies the vendor of the product.')
hpnsaScsiDevProductId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevProductId.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevProductId.setDescription('Identifies the product as defined by the vendor.')
hpnsaScsiDevProductRev = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 7))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevProductRev.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevProductRev.setDescription('Identifies the product revision level.')
hpnsaScsiDevLogicalBlocks = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevLogicalBlocks.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevLogicalBlocks.setDescription('A 32-bit value that represents the total number of logical blocks for this device. Octet 1 is the LSB, and octet 4 is the MSB.')
hpnsaScsiDevBlockLength = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevBlockLength.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevBlockLength.setDescription('A 32-bit value that represents the size of a logical block for this device. Octet 1 is the LSB, and octet 4 is the MSB.')
hpnsaScsiDevCapacity = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnsaScsiDevCapacity.setStatus('mandatory')
if mibBuilder.loadTexts: hpnsaScsiDevCapacity.setDescription('A value that represents the capacity of the device in megabytes. One megabyte equals to 1,048,576 when calculating this value.')
mibBuilder.exportSymbols("HPNSASCSI-MIB", hpnsaScsiDevLunIndex=hpnsaScsiDevLunIndex, hpnsaScsiDevBlockLength=hpnsaScsiDevBlockLength, hpnsaScsiHbaHostAdapterId=hpnsaScsiHbaHostAdapterId, hpnsaScsiAgentModuleEntry=hpnsaScsiAgentModuleEntry, hpnsaScsi=hpnsaScsi, hpnsaScsiHbaManagerId=hpnsaScsiHbaManagerId, hpnsaScsiAgentModuleTable=hpnsaScsiAgentModuleTable, hpnsaScsiDev=hpnsaScsiDev, hpnsaScsiDevVendorId=hpnsaScsiDevVendorId, hpnsaScsiHbaIndex=hpnsaScsiHbaIndex, hpnsaScsiAgent=hpnsaScsiAgent, hpnsaScsiAgentModuleIndex=hpnsaScsiAgentModuleIndex, hpnsaScsiDevProductRev=hpnsaScsiDevProductRev, hpnsaScsiDevTargIdIndex=hpnsaScsiDevTargIdIndex, hpnsa=hpnsa, hpnsaScsiDevLogicalBlocks=hpnsaScsiDevLogicalBlocks, hpnsaScsiMibRevMinor=hpnsaScsiMibRevMinor, hpnsaScsiDevHbaIndex=hpnsaScsiDevHbaIndex, hp=hp, hpnsaScsiHba=hpnsaScsiHba, hpnsaScsiAgentModuleName=hpnsaScsiAgentModuleName, hpnsaScsiDevRmb=hpnsaScsiDevRmb, hpnsaScsiMibRev=hpnsaScsiMibRev, hpnsaScsiAgentModuleDate=hpnsaScsiAgentModuleDate, hpnsaScsiHbaTargetId=hpnsaScsiHbaTargetId, hpnsaScsiDevCapacity=hpnsaScsiDevCapacity, hpnsaScsiDevTable=hpnsaScsiDevTable, hpnsaScsiDevEcmaVer=hpnsaScsiDevEcmaVer, hpnsaScsiDevProductId=hpnsaScsiDevProductId, hpnsaScsiMibRevMajor=hpnsaScsiMibRevMajor, hpnsaScsiDevType=hpnsaScsiDevType, nm=nm, hpnsaScsiHbaTable=hpnsaScsiHbaTable, hpnsaScsiDevIsoVer=hpnsaScsiDevIsoVer, hpnsaScsiDevAnsiVer=hpnsaScsiDevAnsiVer, hpnsaScsiDevEntry=hpnsaScsiDevEntry, hpnsaScsiHbaEntry=hpnsaScsiHbaEntry, hpnsaScsiAgentModuleVersion=hpnsaScsiAgentModuleVersion)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, single_value_constraint, value_range_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(gauge32, unsigned32, enterprises, bits, object_identity, notification_type, integer32, time_ticks, module_identity, mib_identifier, counter32, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'Unsigned32', 'enterprises', 'Bits', 'ObjectIdentity', 'NotificationType', 'Integer32', 'TimeTicks', 'ModuleIdentity', 'MibIdentifier', 'Counter32', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'IpAddress')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
hp = mib_identifier((1, 3, 6, 1, 4, 1, 11))
nm = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2))
hpnsa = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 23))
hpnsa_scsi = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14))
hpnsa_scsi_mib_rev = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 1))
hpnsa_scsi_agent = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2))
hpnsa_scsi_hba = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3))
hpnsa_scsi_dev = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4))
hpnsa_scsi_mib_rev_major = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiMibRevMajor.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiMibRevMajor.setDescription('The major revision level of the MIB. A change in the major revision level represents a major change in the architecture or functions of the MIB.')
hpnsa_scsi_mib_rev_minor = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiMibRevMinor.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiMibRevMinor.setDescription('The minor revision level of the MIB. A change in the minor revision level may represent some minor additional support, no changes to any pre-existing information has occurred.')
hpnsa_scsi_agent_module_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1))
if mibBuilder.loadTexts:
hpnsaScsiAgentModuleTable.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiAgentModuleTable.setDescription('A table of SNMP Agents that satisfy request pertaining to this MIB.')
hpnsa_scsi_agent_module_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1)).setIndexNames((0, 'HPNSASCSI-MIB', 'hpnsaScsiAgentModuleIndex'))
if mibBuilder.loadTexts:
hpnsaScsiAgentModuleEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiAgentModuleEntry.setDescription('A description of the Agents that access system information.')
hpnsa_scsi_agent_module_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiAgentModuleIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiAgentModuleIndex.setDescription('A unique index for this module description.')
hpnsa_scsi_agent_module_name = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiAgentModuleName.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiAgentModuleName.setDescription('The module name.')
hpnsa_scsi_agent_module_version = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 10))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiAgentModuleVersion.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiAgentModuleVersion.setDescription('The module version in XX.YY format. Where XX is the major version number and YY is the minor version number. This field will be a null (size 0) string if the agent cannot provide the module version.')
hpnsa_scsi_agent_module_date = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(0, 7))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiAgentModuleDate.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiAgentModuleDate.setDescription('The module date. field octets contents range _________________________________________________ 1 1-2 year 0..65536 2 3 month 1..12 3 4 day 1..31 4 5 hour 0..23 5 6 minute 0..59 6 7 second 0..60 (use 60 for leap-second) This field will be set to year = 0 if the agent cannot provide the module date. The hour, minute, and second field will be set to zero (0) if they are not relevant. The year field is set with the most significant octet first.')
hpnsa_scsi_hba_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1))
if mibBuilder.loadTexts:
hpnsaScsiHbaTable.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiHbaTable.setDescription('A list of SCSI Host Bus Adapter entries.')
hpnsa_scsi_hba_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1)).setIndexNames((0, 'HPNSASCSI-MIB', 'hpnsaScsiHbaIndex'))
if mibBuilder.loadTexts:
hpnsaScsiHbaEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiHbaEntry.setDescription('A description of an SCSI device/function.')
hpnsa_scsi_hba_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiHbaIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiHbaIndex.setDescription('The SCSI HBA number that this entry describes.')
hpnsa_scsi_hba_target_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiHbaTargetId.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiHbaTargetId.setDescription('The SCSI target ID or SCSI address for this HBA.')
hpnsa_scsi_hba_manager_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 15))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiHbaManagerId.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiHbaManagerId.setDescription('String that describes the SCSI Manager.')
hpnsa_scsi_hba_host_adapter_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 15))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiHbaHostAdapterId.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiHbaHostAdapterId.setDescription('String that describes the SCSI host adapter.')
hpnsa_scsi_dev_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1))
if mibBuilder.loadTexts:
hpnsaScsiDevTable.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevTable.setDescription('A list of SCSI device entries.')
hpnsa_scsi_dev_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1)).setIndexNames((0, 'HPNSASCSI-MIB', 'hpnsaScsiDevHbaIndex'), (0, 'HPNSASCSI-MIB', 'hpnsaScsiDevTargIdIndex'), (0, 'HPNSASCSI-MIB', 'hpnsaScsiDevLunIndex'))
if mibBuilder.loadTexts:
hpnsaScsiDevEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevEntry.setDescription('A description of a SCSI device.')
hpnsa_scsi_dev_hba_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevHbaIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevHbaIndex.setDescription('The SCSI HBA number that this entry describes.')
hpnsa_scsi_dev_targ_id_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevTargIdIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevTargIdIndex.setDescription('The SCSI target ID or SCSI address for this HBA.')
hpnsa_scsi_dev_lun_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevLunIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevLunIndex.setDescription('The SCSI LUN for this HBA.')
hpnsa_scsi_dev_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 31))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevType.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevType.setDescription('Identifies the type of SCSI device: Code Description ---- ----------- 00h Direct-access device (e.g. magnetic disk) 01h Sequential-access device (e.g. magnetic tape) 02h Printer device 03h Processor device 04h Write-once read-multiple device (e.g. some optical disks) 05h CD-ROM device 06h Scanner device 07h Optical Memory device (e.g. some optical disks) 08h Medium Changer device (e.g. jukeboxes) 09h Communications device 0A-1Eh Reserved 1Fh Unknown or no device type')
hpnsa_scsi_dev_rmb = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 1))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevRmb.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevRmb.setDescription('Identifies whether the medium is removable or not. 0 = medium is not removable 1 = medium is removable')
hpnsa_scsi_dev_ansi_ver = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevAnsiVer.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevAnsiVer.setDescription('Indicates the implemented ANSI version of this device. 0 = might or might not comply to an ANSI standard 1 = complies to ANSI X3.131-1986 (SCSI-1) 2 = comples to ANSI ?????? (SCSI-II) 3-7 = reserved')
hpnsa_scsi_dev_ecma_ver = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevEcmaVer.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevEcmaVer.setDescription('Indicates the implemented ECMA version of this device. Zero code indicates that this device does not comply with this standard.')
hpnsa_scsi_dev_iso_ver = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 3))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevIsoVer.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevIsoVer.setDescription('Indicates the implemented ISO version of this device. Zero code indicates that this device does not comply with this standard.')
hpnsa_scsi_dev_vendor_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 8))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevVendorId.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevVendorId.setDescription('Identifies the vendor of the product.')
hpnsa_scsi_dev_product_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 10), display_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevProductId.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevProductId.setDescription('Identifies the product as defined by the vendor.')
hpnsa_scsi_dev_product_rev = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 11), display_string().subtype(subtypeSpec=value_size_constraint(0, 7))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevProductRev.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevProductRev.setDescription('Identifies the product revision level.')
hpnsa_scsi_dev_logical_blocks = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevLogicalBlocks.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevLogicalBlocks.setDescription('A 32-bit value that represents the total number of logical blocks for this device. Octet 1 is the LSB, and octet 4 is the MSB.')
hpnsa_scsi_dev_block_length = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevBlockLength.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevBlockLength.setDescription('A 32-bit value that represents the size of a logical block for this device. Octet 1 is the LSB, and octet 4 is the MSB.')
hpnsa_scsi_dev_capacity = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnsaScsiDevCapacity.setStatus('mandatory')
if mibBuilder.loadTexts:
hpnsaScsiDevCapacity.setDescription('A value that represents the capacity of the device in megabytes. One megabyte equals to 1,048,576 when calculating this value.')
mibBuilder.exportSymbols('HPNSASCSI-MIB', hpnsaScsiDevLunIndex=hpnsaScsiDevLunIndex, hpnsaScsiDevBlockLength=hpnsaScsiDevBlockLength, hpnsaScsiHbaHostAdapterId=hpnsaScsiHbaHostAdapterId, hpnsaScsiAgentModuleEntry=hpnsaScsiAgentModuleEntry, hpnsaScsi=hpnsaScsi, hpnsaScsiHbaManagerId=hpnsaScsiHbaManagerId, hpnsaScsiAgentModuleTable=hpnsaScsiAgentModuleTable, hpnsaScsiDev=hpnsaScsiDev, hpnsaScsiDevVendorId=hpnsaScsiDevVendorId, hpnsaScsiHbaIndex=hpnsaScsiHbaIndex, hpnsaScsiAgent=hpnsaScsiAgent, hpnsaScsiAgentModuleIndex=hpnsaScsiAgentModuleIndex, hpnsaScsiDevProductRev=hpnsaScsiDevProductRev, hpnsaScsiDevTargIdIndex=hpnsaScsiDevTargIdIndex, hpnsa=hpnsa, hpnsaScsiDevLogicalBlocks=hpnsaScsiDevLogicalBlocks, hpnsaScsiMibRevMinor=hpnsaScsiMibRevMinor, hpnsaScsiDevHbaIndex=hpnsaScsiDevHbaIndex, hp=hp, hpnsaScsiHba=hpnsaScsiHba, hpnsaScsiAgentModuleName=hpnsaScsiAgentModuleName, hpnsaScsiDevRmb=hpnsaScsiDevRmb, hpnsaScsiMibRev=hpnsaScsiMibRev, hpnsaScsiAgentModuleDate=hpnsaScsiAgentModuleDate, hpnsaScsiHbaTargetId=hpnsaScsiHbaTargetId, hpnsaScsiDevCapacity=hpnsaScsiDevCapacity, hpnsaScsiDevTable=hpnsaScsiDevTable, hpnsaScsiDevEcmaVer=hpnsaScsiDevEcmaVer, hpnsaScsiDevProductId=hpnsaScsiDevProductId, hpnsaScsiMibRevMajor=hpnsaScsiMibRevMajor, hpnsaScsiDevType=hpnsaScsiDevType, nm=nm, hpnsaScsiHbaTable=hpnsaScsiHbaTable, hpnsaScsiDevIsoVer=hpnsaScsiDevIsoVer, hpnsaScsiDevAnsiVer=hpnsaScsiDevAnsiVer, hpnsaScsiDevEntry=hpnsaScsiDevEntry, hpnsaScsiHbaEntry=hpnsaScsiHbaEntry, hpnsaScsiAgentModuleVersion=hpnsaScsiAgentModuleVersion) |
"""
Q104
Max Depth of Binary Tree
Easy
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest
path from the root node down to the farthest leaf node.
Note: A leaf is a node with no children.
"""
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def maxDepth(self, root: TreeNode) -> int:
def find_depth(root) -> int:
if root is None:
return 0
left = find_depth(root.left)
right = find_depth(root.right)
return max(left, right) + 1
return find_depth(root)
a = TreeNode(1)
b = TreeNode(2)
c = TreeNode(3)
d = TreeNode(4)
a.left = b
a.right = c
b.left = d
sol = Solution()
print(sol.maxDepth(d))
| """
Q104
Max Depth of Binary Tree
Easy
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest
path from the root node down to the farthest leaf node.
Note: A leaf is a node with no children.
"""
class Treenode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def max_depth(self, root: TreeNode) -> int:
def find_depth(root) -> int:
if root is None:
return 0
left = find_depth(root.left)
right = find_depth(root.right)
return max(left, right) + 1
return find_depth(root)
a = tree_node(1)
b = tree_node(2)
c = tree_node(3)
d = tree_node(4)
a.left = b
a.right = c
b.left = d
sol = solution()
print(sol.maxDepth(d)) |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/3/13 20:49
# @Author : Steve Wu
# @Site :
# @File : util.py
# @Software: PyCharm
# @Github : https://github.com/stevehamwu
# find word
def find_word(keyword, sentence, start=0, end=-1, strict=False):
"""
word: str 'abc'
sentence: list ['a', 'b', 'cd']
return: start_index, end_index: 0, 2
"""
if not sentence:
return -1, -1
if end == -1 or end > len(sentence):
end = len(sentence)
if keyword in sentence[start:end]:
return sentence.index(keyword, start, end), sentence.index(keyword, start, end)
elif strict:
return -1, -1
else:
s, e = -1, -1
sentence = sentence[start: end]
idx = ''.join(sentence).find(keyword)
if idx >= 0:
l = -1
for i, word in enumerate(sentence):
word = sentence[i]
l += len(word)
if l >= idx and s < 0:
s = i + start
if l >= idx+len(keyword)-1:
e = i + start
break
return s, e
# rfind word
def rfind_word(keyword, sentence, start=0, end=-1, strict=False):
"""
word: str 'word'
sentence: list ['a', 'b', 'cd']
"""
if not sentence:
return -1, -1
if end == -1 or end > len(sentence):
end = len(sentence)
s, e = find_word(keyword[::-1], [word[::-1] for word in sentence[::-1]], len(sentence)-end, len(sentence)-start, strict)
if s == -1 or e == -1:
return s, e
return len(sentence)-e-1, len(sentence)-s-1 | def find_word(keyword, sentence, start=0, end=-1, strict=False):
"""
word: str 'abc'
sentence: list ['a', 'b', 'cd']
return: start_index, end_index: 0, 2
"""
if not sentence:
return (-1, -1)
if end == -1 or end > len(sentence):
end = len(sentence)
if keyword in sentence[start:end]:
return (sentence.index(keyword, start, end), sentence.index(keyword, start, end))
elif strict:
return (-1, -1)
else:
(s, e) = (-1, -1)
sentence = sentence[start:end]
idx = ''.join(sentence).find(keyword)
if idx >= 0:
l = -1
for (i, word) in enumerate(sentence):
word = sentence[i]
l += len(word)
if l >= idx and s < 0:
s = i + start
if l >= idx + len(keyword) - 1:
e = i + start
break
return (s, e)
def rfind_word(keyword, sentence, start=0, end=-1, strict=False):
"""
word: str 'word'
sentence: list ['a', 'b', 'cd']
"""
if not sentence:
return (-1, -1)
if end == -1 or end > len(sentence):
end = len(sentence)
(s, e) = find_word(keyword[::-1], [word[::-1] for word in sentence[::-1]], len(sentence) - end, len(sentence) - start, strict)
if s == -1 or e == -1:
return (s, e)
return (len(sentence) - e - 1, len(sentence) - s - 1) |
''' Merge sort of singly linked list
Merge sort is often prefered for sorting a linked list. The slow random access performance
of linked list make other algorithms such as quicksort perform poorly and others such as
heapsort completely impossible.
'''
#Code
class Node:
def __init__(self,data):
self.data = data
self.next = None
class LinkedList:
def __init__(self):
self.head = None
def Push(self,new_data):
if(self.head==None):
self.head = Node(new_data)
else:
new_node = Node(new_data)
new_node.next = None
temp = self.head
while(temp.next):
temp = temp.next
temp.next = new_node
def PrintList(self): # function for printing linked list.
temp = self.head
while(temp):
print(temp.data,end=" ")
temp = temp.next
print('')
def MergeSort(self,h): # main Merge Sort function
if h is None or h.next is None :
return h
self.PrintList()
middle = self.GetMiddle(h)
nexttomiddle = middle.next
middle.next = None
left = self.MergeSort(h)
right = self.MergeSort(nexttomiddle)
sortedlist = self.SortedMerge(left,right)
return sortedlist
def GetMiddle(self,head): # function to get middle of linked list
if (head == None):
return head
slow = fast = head
while(fast.next != None and fast.next.next != None):
slow = slow.next
fast = fast.next.next
return slow
def SortedMerge(self,a,b):
result = None
if a == None:
return b
if b == None:
return a
if (a.data <= b.data):
result = a
result.next = self.SortedMerge(a.next,b)
else:
result = b
result.next = self.SortedMerge(a,b.next)
return result
# Driver
if(__name__=="__main__"):
list1 = LinkedList()
values = [8,2,3,1,7] # 8 2 3 1 7
for i in values:
list1.Push(i)
list1.PrintList()
list1.head = list1.MergeSort(list1.head)
list1.PrintList()
| """ Merge sort of singly linked list
Merge sort is often prefered for sorting a linked list. The slow random access performance
of linked list make other algorithms such as quicksort perform poorly and others such as
heapsort completely impossible.
"""
class Node:
def __init__(self, data):
self.data = data
self.next = None
class Linkedlist:
def __init__(self):
self.head = None
def push(self, new_data):
if self.head == None:
self.head = node(new_data)
else:
new_node = node(new_data)
new_node.next = None
temp = self.head
while temp.next:
temp = temp.next
temp.next = new_node
def print_list(self):
temp = self.head
while temp:
print(temp.data, end=' ')
temp = temp.next
print('')
def merge_sort(self, h):
if h is None or h.next is None:
return h
self.PrintList()
middle = self.GetMiddle(h)
nexttomiddle = middle.next
middle.next = None
left = self.MergeSort(h)
right = self.MergeSort(nexttomiddle)
sortedlist = self.SortedMerge(left, right)
return sortedlist
def get_middle(self, head):
if head == None:
return head
slow = fast = head
while fast.next != None and fast.next.next != None:
slow = slow.next
fast = fast.next.next
return slow
def sorted_merge(self, a, b):
result = None
if a == None:
return b
if b == None:
return a
if a.data <= b.data:
result = a
result.next = self.SortedMerge(a.next, b)
else:
result = b
result.next = self.SortedMerge(a, b.next)
return result
if __name__ == '__main__':
list1 = linked_list()
values = [8, 2, 3, 1, 7]
for i in values:
list1.Push(i)
list1.PrintList()
list1.head = list1.MergeSort(list1.head)
list1.PrintList() |
# regular if/else statement
a = 10
if a > 5:
print('a > 5')
else:
print('a <= 5')
# if/elif/else
a = 3
if a > 5:
print('a > 5')
elif a > 0:
print('a > 0')
else:
print('a <= 0')
# assignment with if/else - ternary statement
b = 'a is positive' if a >= 0 else 'a is negative'
print(b)
| a = 10
if a > 5:
print('a > 5')
else:
print('a <= 5')
a = 3
if a > 5:
print('a > 5')
elif a > 0:
print('a > 0')
else:
print('a <= 0')
b = 'a is positive' if a >= 0 else 'a is negative'
print(b) |
# Definition for singly-linked list.
class ListNode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
class Solution:
def insertionSortList(self, head: ListNode) -> ListNode:
node = head
shead = None
dummy = ListNode(0, head)
while node:
nodeNext = node.next
if not shead:
shead = node
shead.next = None
else:
dummy = ListNode(0, shead)
pnode = dummy
snode = shead
while snode:
if node.val < snode.val:
pnode.next = node
node.next = snode
break
pnode = snode
snode = snode.next
if not snode and node.val >= pnode.val:
pnode.next = node
node.next = None
shead = dummy.next
node = nodeNext
return dummy.next
| class Listnode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
class Solution:
def insertion_sort_list(self, head: ListNode) -> ListNode:
node = head
shead = None
dummy = list_node(0, head)
while node:
node_next = node.next
if not shead:
shead = node
shead.next = None
else:
dummy = list_node(0, shead)
pnode = dummy
snode = shead
while snode:
if node.val < snode.val:
pnode.next = node
node.next = snode
break
pnode = snode
snode = snode.next
if not snode and node.val >= pnode.val:
pnode.next = node
node.next = None
shead = dummy.next
node = nodeNext
return dummy.next |
#import wx
Q3_IMPL_QT="ui.pyqt5"
Q3_IMPL_WX="ui.wx"
#Q3_IMPL="wx"
#default impl
#global Q3_IMPL
Q3_IMPL=Q3_IMPL_QT
Q3_IMPL_SIM='sim.default'
#from wx import ID_EXIT
#from wx import ID_ABOUT
ID_EXIT = 1
ID_ABOUT = 2
MAX_PINS = 256
MAX_INPUTS = 256
MAX_OUTPUTS = 256
MAX_DYNAMICS = 256
MAX_SIGNAL_SIZE = 64
| q3_impl_qt = 'ui.pyqt5'
q3_impl_wx = 'ui.wx'
q3_impl = Q3_IMPL_QT
q3_impl_sim = 'sim.default'
id_exit = 1
id_about = 2
max_pins = 256
max_inputs = 256
max_outputs = 256
max_dynamics = 256
max_signal_size = 64 |
# lec11prob5.py
#
# Lecture 11 - Classes
# Problem 5
#
# edX MITx 6.00.1x
# Introduction to Computer Science and Programming Using Python
'''
Consider the following code from the last lecture video.
Your task is to define the following two methods for the intSet class:
1. Define an intersect method that returns a new intSet containing elements
that appear in both sets. In other words,
s1.intersect(s2)
would return a new intSet of integers that appear in both s1 and s2. Think
carefully - what should happen if s1 and s2 have no elements in common?
2. Add the appropriate method(s) so that len(s) returns the number of
elements in s.
Hint: look through the Python docs to figure out what you'll need to solve
this problem.
http://docs.python.org/release/2.7.3/reference/datamodel.html
'''
class intSet(object):
"""An intSet is a set of integers
The value is represented by a list of ints, self.vals.
Each int in the set occurs in self.vals exactly once."""
def __init__(self):
"""Create an empty set of integers"""
self.vals = []
def insert(self, e):
"""Assumes e is an integer and inserts e into self"""
if not e in self.vals:
self.vals.append(e)
def member(self, e):
"""Assumes e is an integer
Returns True if e is in self, and False otherwise"""
return e in self.vals
def remove(self, e):
"""Assumes e is an integer and removes e from self
Raises ValueError if e is not in self"""
try:
self.vals.remove(e)
except:
raise ValueError(str(e) + ' not found')
def __str__(self):
"""Returns a string representation of self"""
self.vals.sort()
return '{' + ','.join([str(e) for e in self.vals]) + '}'
def intersect(self, other):
""" Returns a new IntSet that contains of integers in both s1 & s2 """
# create a new intSet
commonVals = intSet()
for x in self.vals:
if other.member(x):
commonVals.insert(x)
return commonVals
def __len__(self):
return len(self)
# return len(self.vals)
# s = intSet()
# print s
# s.insert(3)
# s.insert(4)
# s.insert(3)
# print s
# s.member(3)
# s.member(5)
# s.insert(6)
# print s
# s.remove(3)
# print s
# s.remove(3)
| """
Consider the following code from the last lecture video.
Your task is to define the following two methods for the intSet class:
1. Define an intersect method that returns a new intSet containing elements
that appear in both sets. In other words,
s1.intersect(s2)
would return a new intSet of integers that appear in both s1 and s2. Think
carefully - what should happen if s1 and s2 have no elements in common?
2. Add the appropriate method(s) so that len(s) returns the number of
elements in s.
Hint: look through the Python docs to figure out what you'll need to solve
this problem.
http://docs.python.org/release/2.7.3/reference/datamodel.html
"""
class Intset(object):
"""An intSet is a set of integers
The value is represented by a list of ints, self.vals.
Each int in the set occurs in self.vals exactly once."""
def __init__(self):
"""Create an empty set of integers"""
self.vals = []
def insert(self, e):
"""Assumes e is an integer and inserts e into self"""
if not e in self.vals:
self.vals.append(e)
def member(self, e):
"""Assumes e is an integer
Returns True if e is in self, and False otherwise"""
return e in self.vals
def remove(self, e):
"""Assumes e is an integer and removes e from self
Raises ValueError if e is not in self"""
try:
self.vals.remove(e)
except:
raise value_error(str(e) + ' not found')
def __str__(self):
"""Returns a string representation of self"""
self.vals.sort()
return '{' + ','.join([str(e) for e in self.vals]) + '}'
def intersect(self, other):
""" Returns a new IntSet that contains of integers in both s1 & s2 """
common_vals = int_set()
for x in self.vals:
if other.member(x):
commonVals.insert(x)
return commonVals
def __len__(self):
return len(self) |
# This test is here so we don't get a non-zero code from Pytest in Travis CI build.
def test_dummy():
assert 5 == 5
| def test_dummy():
assert 5 == 5 |
__metaclass__ = type
#classes inherting from _UIBase are expected to also inherit UIBase separately.
class _UIBase(object):
id_gen = 0
def __init__(self):
#protocol
self._content_id = _UIBase.id_gen
_UIBase.id_gen += 1
def _copy_values_deep(self, other):
pass
def _clone(self):
result = self.__class__()
result._copy_values_deep(self)
return result | __metaclass__ = type
class _Uibase(object):
id_gen = 0
def __init__(self):
self._content_id = _UIBase.id_gen
_UIBase.id_gen += 1
def _copy_values_deep(self, other):
pass
def _clone(self):
result = self.__class__()
result._copy_values_deep(self)
return result |
#https://www.codewars.com/kata/the-office-ii-boredom-score
"""Every now and then people in the office moves teams or departments.
Depending what people are doing with their time they can become more or less boring. Time to assess the current team.
You will be provided with an object(staff) containing the staff names as keys, and the department they work in as values.
Each department has a different boredom assessment score, as follows:
accounts = 1
finance = 2
canteen = 10
regulation = 3
trading = 6
change = 6
IS = 8
retail = 5
cleaning = 4
pissing about = 25
Depending on the cumulative score of the team, return the appropriate sentiment:
<=80: 'kill me now'
< 100 & > 80: 'i can handle this'
100 or over: 'party time!!'"""
score_values = { 'accounts' : 1,
'finance' : 2,
'canteen' : 10,
'regulation' : 3,
'trading' : 6,
'change' : 6,
'IS' : 8,
'retail' : 5,
'cleaning' : 4,
'pissing about' : 25}
def boredom(staff):
resultado = 0
for x in staff:
resultado += score_values[staff[x]]
if resultado <= 80 :
return "Kill me now"
elif resultado < 100 and resultado > 80:
return "i can handle this"
else:
return "party time!!"
boredom({"tim": "change", "jim": "accounts",
"randy": "canteen", "sandy": "change", "andy": "change", "katie": "IS",
"laura": "change", "saajid": "IS", "alex": "trading", "john": "accounts",
"mr": "finance"})
#rw 22/06/2021
#Other Solutions
"""
n = sum(lookup[s] for s in staff.values())
if n <= 80:
return "kill me now"
if n < 100:
return "i can handle this"
return "party time!!
""" | """Every now and then people in the office moves teams or departments.
Depending what people are doing with their time they can become more or less boring. Time to assess the current team.
You will be provided with an object(staff) containing the staff names as keys, and the department they work in as values.
Each department has a different boredom assessment score, as follows:
accounts = 1
finance = 2
canteen = 10
regulation = 3
trading = 6
change = 6
IS = 8
retail = 5
cleaning = 4
pissing about = 25
Depending on the cumulative score of the team, return the appropriate sentiment:
<=80: 'kill me now'
< 100 & > 80: 'i can handle this'
100 or over: 'party time!!'"""
score_values = {'accounts': 1, 'finance': 2, 'canteen': 10, 'regulation': 3, 'trading': 6, 'change': 6, 'IS': 8, 'retail': 5, 'cleaning': 4, 'pissing about': 25}
def boredom(staff):
resultado = 0
for x in staff:
resultado += score_values[staff[x]]
if resultado <= 80:
return 'Kill me now'
elif resultado < 100 and resultado > 80:
return 'i can handle this'
else:
return 'party time!!'
boredom({'tim': 'change', 'jim': 'accounts', 'randy': 'canteen', 'sandy': 'change', 'andy': 'change', 'katie': 'IS', 'laura': 'change', 'saajid': 'IS', 'alex': 'trading', 'john': 'accounts', 'mr': 'finance'})
' \n n = sum(lookup[s] for s in staff.values())\n if n <= 80:\n return "kill me now"\n if n < 100:\n return "i can handle this"\n return "party time!!\n \n' |
"""Docstring.
Details
"""
__all__ = ('InvalidParameterError')
class InvalidParameterError(Exception):
"""A specific exception for invalid parameter."""
def __init__(self, message): # pylint:disable=W0235
"""Init function."""
super().__init__(message)
| """Docstring.
Details
"""
__all__ = 'InvalidParameterError'
class Invalidparametererror(Exception):
"""A specific exception for invalid parameter."""
def __init__(self, message):
"""Init function."""
super().__init__(message) |
#!/usr/bin/env python3
class Node(object):
def __init__(self, ip, port):
self.ip = ip
self.port=port
self.name="Node: %s:%d" % (ip, port)
def __name__(self):
return self.name
def start(self):
return
def stop(self):
return
| class Node(object):
def __init__(self, ip, port):
self.ip = ip
self.port = port
self.name = 'Node: %s:%d' % (ip, port)
def __name__(self):
return self.name
def start(self):
return
def stop(self):
return |
description = 'PANDA Heusler-analyzer'
group = 'lowlevel'
includes = ['monofoci', 'monoturm', 'panda_mtt']
extended = dict(dynamic_loaded = True)
devices = dict(
ana_heusler = device('nicos.devices.tas.Monochromator',
description = 'PANDA\'s Heusler ana',
unit = 'A-1',
theta = 'ath',
twotheta = 'att',
focush = 'afh_heusler',
focusv = None,
abslimits = (1, 10),
# hfocuspars = [44.8615, 4.64632, 2.22023], # 2009
# hfocuspars = [-66.481, 36.867, -2.8148], # 2013-11
hfocuspars = [-478, 483.74, -154.68, 16.644], # 2013-11 2nd
dvalue = 3.45,
scatteringsense = -1,
crystalside = -1,
),
afh_heusler_step = device('nicos.devices.generic.VirtualMotor',
description = 'stepper for horizontal focus of heusler ana',
unit = 'deg',
abslimits = (-179, 179),
speed = 1,
lowlevel = True,
),
afh_heusler = device('nicos_mlz.panda.devices.rot_axis.RotAxis',
description = 'horizontal focus of heusler ana',
motor = 'afh_heusler_step',
dragerror = 5,
abslimits = (-179, 179),
precision = 1,
fmtstr = '%.1f',
autoref = None, # disable autoref since there is no refswitch
lowlevel = True,
),
)
startupcode = '''
try:
_ = (ana, mono, mfv, mfh, focibox)
except NameError as e:
printerror("The requested setup 'panda' is not fully loaded!")
raise NameError('One of the required devices is not loaded : %s, please check!' % e)
from nicos import session
ana.alias = session.getDevice('ana_heusler')
afh.alias = session.getDevice('afh_heusler')
del session
'''
| description = 'PANDA Heusler-analyzer'
group = 'lowlevel'
includes = ['monofoci', 'monoturm', 'panda_mtt']
extended = dict(dynamic_loaded=True)
devices = dict(ana_heusler=device('nicos.devices.tas.Monochromator', description="PANDA's Heusler ana", unit='A-1', theta='ath', twotheta='att', focush='afh_heusler', focusv=None, abslimits=(1, 10), hfocuspars=[-478, 483.74, -154.68, 16.644], dvalue=3.45, scatteringsense=-1, crystalside=-1), afh_heusler_step=device('nicos.devices.generic.VirtualMotor', description='stepper for horizontal focus of heusler ana', unit='deg', abslimits=(-179, 179), speed=1, lowlevel=True), afh_heusler=device('nicos_mlz.panda.devices.rot_axis.RotAxis', description='horizontal focus of heusler ana', motor='afh_heusler_step', dragerror=5, abslimits=(-179, 179), precision=1, fmtstr='%.1f', autoref=None, lowlevel=True))
startupcode = '\ntry:\n _ = (ana, mono, mfv, mfh, focibox)\nexcept NameError as e:\n printerror("The requested setup \'panda\' is not fully loaded!")\n raise NameError(\'One of the required devices is not loaded : %s, please check!\' % e)\n\nfrom nicos import session\nana.alias = session.getDevice(\'ana_heusler\')\nafh.alias = session.getDevice(\'afh_heusler\')\ndel session\n' |
#!/usr/bin/env python
#############################################################################
##
# This file is part of Taurus
##
# http://taurus-scada.org
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Taurus is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
##
# Taurus is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
##
# You should have received a copy of the GNU Lesser General Public License
# along with Taurus. If not, see <http://www.gnu.org/licenses/>.
##
#############################################################################
"""
This module contains some Taurus-wide default configurations.
The idea is that the final user may edit the values here to customize certain
aspects of Taurus.
"""
#: A map for using custom widgets for certain devices in TaurusForms. It is a
#: dictionary with the following structure:
#: device_class_name:(classname_with_full_module_path, args, kwargs)
#: where the args and kwargs will be passed to the constructor of the class
T_FORM_CUSTOM_WIDGET_MAP = \
{'SimuMotor': ('sardana.taurus.qt.qtgui.extra_pool.PoolMotorTV', (), {}),
'Motor': ('sardana.taurus.qt.qtgui.extra_pool.PoolMotorTV', (), {}),
'PseudoMotor': ('sardana.taurus.qt.qtgui.extra_pool.PoolMotorTV', (), {}),
'PseudoCounter': ('sardana.taurus.qt.qtgui.extra_pool.PoolChannelTV', (), {}),
'CTExpChannel': ('sardana.taurus.qt.qtgui.extra_pool.PoolChannelTV', (), {}),
'ZeroDExpChannel': ('sardana.taurus.qt.qtgui.extra_pool.PoolChannelTV', (), {}),
'OneDExpChannel': ('sardana.taurus.qt.qtgui.extra_pool.PoolChannelTV', (), {}),
'TwoDExpChannel': ('sardana.taurus.qt.qtgui.extra_pool.PoolChannelTV', (), {}),
'IORegister': ('sardana.taurus.qt.qtgui.extra_pool.PoolIORegisterTV', (), {})
}
#: Compact mode for widgets
#: True sets the preferred mode of TaurusForms to use "compact" widgets
T_FORM_COMPACT = False
#: Strict RFC3986 URI names in models.
#: True makes Taurus only use the strict URI names
#: False enables a backwards-compatibility mode for pre-sep3 model names
STRICT_MODEL_NAMES = False
#: Lightweight imports:
#: True enables delayed imports (may break older code).
#: False (or commented out) for backwards compatibility
LIGHTWEIGHT_IMPORTS = False
#: Default scheme (if not defined, "tango" is assumed)
DEFAULT_SCHEME = "tango"
#: Filter old tango events:
#: Sometimes TangoAttribute can receive an event with an older timestamp
#: than its current one. See https://github.com/taurus-org/taurus/issues/216
#: True discards (Tango) events whose timestamp is older than the cached one.
#: False (or commented out) for backwards (pre 4.1) compatibility
FILTER_OLD_TANGO_EVENTS = True
#: Extra Taurus schemes. You can add a list of modules to be loaded for
#: providing support to new schemes
#: (e.g. EXTRA_SCHEME_MODULES = ['myownschememodule']
EXTRA_SCHEME_MODULES = []
#: Custom formatter. Taurus widgets use a default formatter based on the
#: attribute type, but sometimes a custom formatter is needed.
#: IMPORTANT: setting this option in this file will affect ALL widgets
#: of ALL applications (which is probably **not** what you want, since it
#: may have unexpected effects in some applications).
#: Consider using the API for modifying this on a per-widget or per-class
#: basis at runtime, or using the related `--default-formatter` parameter
#: from TaurusApplication, e.g.:
#: $ taurus form MODEL --default-formatter='{:2.3f}'
#: The formatter can be a python format string or the name of a formatter
#: callable, e.g.
#: DEFAULT_FORMATTER = '{0}'
#: DEFAULT_FORMATTER = 'taurus.core.tango.util.tangoFormatter'
#: If not defined, taurus.qt.qtgui.base.defaultFormatter will be used
#: Default serialization mode **for the tango scheme**. Possible values are:
#: 'Serial', 'Concurrent', or 'TangoSerial' (default)
TANGO_SERIALIZATION_MODE = 'TangoSerial'
#: PLY (lex/yacc) optimization: 1=Active (default) , 0=disabled.
#: Set PLY_OPTIMIZE = 0 if you are getting yacc exceptions while loading
#: synoptics
PLY_OPTIMIZE = 1
# Taurus namespace # TODO: NAMESPACE setting seems to be unused. remove?
NAMESPACE = 'taurus'
# ----------------------------------------------------------------------------
# Qt configuration
# ----------------------------------------------------------------------------
#: Set preferred API (if one is not already loaded)
DEFAULT_QT_API = 'pyqt'
#: Auto initialize Qt logging to python logging
QT_AUTO_INIT_LOG = True
#: Remove input hook (only valid for PyQt4)
QT_AUTO_REMOVE_INPUTHOOK = True
#: Avoid application abort on unhandled python exceptions
#: (which happens since PyQt 5.5).
#: http://pyqt.sf.net/Docs/PyQt5/incompatibilities.html#unhandled-python-exceptions
#: If True (or commented out) an except hook is added to force the old
# behaviour (exception is just printed) on pyqt5
QT_AVOID_ABORT_ON_EXCEPTION = True
#: Select the theme to be used: set the theme dir and the theme name.
#: The path can be absolute or relative to the dir of taurus.qt.qtgui.icon
#: If not set, the dir of taurus.qt.qtgui.icon will be used
QT_THEME_DIR = ''
#: The name of the icon theme (e.g. 'Tango', 'Oxygen', etc). Default='Tango'
QT_THEME_NAME = 'Tango'
#: In Linux the QT_THEME_NAME is not applied (to respect the system theme)
#: setting QT_THEME_FORCE_ON_LINUX=True overrides this.
QT_THEME_FORCE_ON_LINUX = False
#: Full Qt designer path (including filename. Default is None, meaning:
#: - linux: look for the system designer following Qt.QLibraryInfo.BinariesPath
#: - windows: look for the system designer following
#: Qt.QLibraryInfo.BinariesPath. If this fails, taurus tries to locate binary
#: manually
QT_DESIGNER_PATH = None
#: Custom organization logo. Set the absolute path to an image file to be used as your
#: organization logo. Qt registered paths can also be used.
#: If not set, it defaults to 'logos:taurus.png"
#: (note that "logos:" is a Qt a registered path for "<taurus>/qt/qtgui/icon/logos/")
ORGANIZATION_LOGO = "logos:taurus.png"
# ----------------------------------------------------------------------------
# Deprecation handling:
# Note: this API is still experimental and may be subject to change
# (hence the "_" in the options)
# ----------------------------------------------------------------------------
#: set the maximum number of same-message deprecations to be logged.
#: None (or not set) indicates no limit. -1 indicates that an exception should
#: be raised instead of logging the message (useful for finding obsolete code)
_MAX_DEPRECATIONS_LOGGED = 1
| """
This module contains some Taurus-wide default configurations.
The idea is that the final user may edit the values here to customize certain
aspects of Taurus.
"""
t_form_custom_widget_map = {'SimuMotor': ('sardana.taurus.qt.qtgui.extra_pool.PoolMotorTV', (), {}), 'Motor': ('sardana.taurus.qt.qtgui.extra_pool.PoolMotorTV', (), {}), 'PseudoMotor': ('sardana.taurus.qt.qtgui.extra_pool.PoolMotorTV', (), {}), 'PseudoCounter': ('sardana.taurus.qt.qtgui.extra_pool.PoolChannelTV', (), {}), 'CTExpChannel': ('sardana.taurus.qt.qtgui.extra_pool.PoolChannelTV', (), {}), 'ZeroDExpChannel': ('sardana.taurus.qt.qtgui.extra_pool.PoolChannelTV', (), {}), 'OneDExpChannel': ('sardana.taurus.qt.qtgui.extra_pool.PoolChannelTV', (), {}), 'TwoDExpChannel': ('sardana.taurus.qt.qtgui.extra_pool.PoolChannelTV', (), {}), 'IORegister': ('sardana.taurus.qt.qtgui.extra_pool.PoolIORegisterTV', (), {})}
t_form_compact = False
strict_model_names = False
lightweight_imports = False
default_scheme = 'tango'
filter_old_tango_events = True
extra_scheme_modules = []
tango_serialization_mode = 'TangoSerial'
ply_optimize = 1
namespace = 'taurus'
default_qt_api = 'pyqt'
qt_auto_init_log = True
qt_auto_remove_inputhook = True
qt_avoid_abort_on_exception = True
qt_theme_dir = ''
qt_theme_name = 'Tango'
qt_theme_force_on_linux = False
qt_designer_path = None
organization_logo = 'logos:taurus.png'
_max_deprecations_logged = 1 |
# -*- coding: utf-8 -*-
def test_cookies_group(testdir):
result = testdir.runpytest(
'--help',
)
# fnmatch_lines does an assertion internally
result.stdout.fnmatch_lines([
'cookies:',
'*--template=TEMPLATE*',
])
| def test_cookies_group(testdir):
result = testdir.runpytest('--help')
result.stdout.fnmatch_lines(['cookies:', '*--template=TEMPLATE*']) |
class TestFixupsToPywb:
# Test random fixups we've made to improve `pywb` behavior
def test_we_do_not_try_and_rewrite_rel_manifest(self, proxied_content):
# The '_id' here means a transparent rewrite, and no insertion of
# wombat stuff
assert (
'<link rel="manifest" href="/proxy/id_/http://localhost:8080/manifest.json"'
in proxied_content
)
def test_we_do_rewrite_other_rels(self, proxied_content):
assert (
'<link rel="other" href="/proxy/oe_/http://localhost:8080/other.json"'
in proxied_content
)
| class Testfixupstopywb:
def test_we_do_not_try_and_rewrite_rel_manifest(self, proxied_content):
assert '<link rel="manifest" href="/proxy/id_/http://localhost:8080/manifest.json"' in proxied_content
def test_we_do_rewrite_other_rels(self, proxied_content):
assert '<link rel="other" href="/proxy/oe_/http://localhost:8080/other.json"' in proxied_content |
def transpose(the_array):
ret = map(list, zip(*the_array))
ret = list(ret)
return ret
def get_unique_list(dict_list, key="id"):
# https://stackoverflow.com/questions/10024646/how-to-get-list-of-objects-with-unique-attribute
seen = set()
return [seen.add(d[key]) or d for d in dict_list if d and d[key] not in seen]
def color_variants(hex_colors, brightness_offset=1):
return [color_variant(c, brightness_offset) for c in hex_colors]
def color_variant(hex_color, brightness_offset=1):
""" takes a color like #87c95f and produces a lighter or darker variant """
# https://chase-seibert.github.io/blog/2011/07/29/python-calculate-lighterdarker-rgb-colors.html
if len(hex_color) != 7:
raise Exception("Passed %s into color_variant(), needs to be in #87c95f format." % hex_color)
rgb_hex = [hex_color[x:x+2] for x in [1, 3, 5]]
new_rgb_int = [int(hex_value, 16) + brightness_offset for hex_value in rgb_hex]
new_rgb_int = [min([255, max([0, i])]) for i in new_rgb_int] # make sure new values are between 0 and 255
# hex() produces "0x88", we want just "88"
return "#" + "".join([hex(i)[2:] for i in new_rgb_int])
| def transpose(the_array):
ret = map(list, zip(*the_array))
ret = list(ret)
return ret
def get_unique_list(dict_list, key='id'):
seen = set()
return [seen.add(d[key]) or d for d in dict_list if d and d[key] not in seen]
def color_variants(hex_colors, brightness_offset=1):
return [color_variant(c, brightness_offset) for c in hex_colors]
def color_variant(hex_color, brightness_offset=1):
""" takes a color like #87c95f and produces a lighter or darker variant """
if len(hex_color) != 7:
raise exception('Passed %s into color_variant(), needs to be in #87c95f format.' % hex_color)
rgb_hex = [hex_color[x:x + 2] for x in [1, 3, 5]]
new_rgb_int = [int(hex_value, 16) + brightness_offset for hex_value in rgb_hex]
new_rgb_int = [min([255, max([0, i])]) for i in new_rgb_int]
return '#' + ''.join([hex(i)[2:] for i in new_rgb_int]) |
####################################################
# package version -- named "pkgdir.testapi"
# this function is loaded and run by testapi.c;
# change this file between calls: auto-reload mode
# gets the new version each time 'func' is called;
# for the test, the last line was changed to:
# return x + y
# return x * y
# return x \ y - syntax error
# return x / 0 - zero-divide error
# return pow(x, y)
####################################################
def func(x, y): # called by C
return x + y # change me
| def func(x, y):
return x + y |
"""Author @Sowjanya"""
"""Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target."""
class Solution:
def twoSum(self, nums: List[int], target: int) -> List[int]:
hashMap = {}
for i,n in enumerate(nums):
if (target-n) in hashMap:
return [i,hashMap[target-n]]
else:
hashMap[n]=i
| """Author @Sowjanya"""
'Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.'
class Solution:
def two_sum(self, nums: List[int], target: int) -> List[int]:
hash_map = {}
for (i, n) in enumerate(nums):
if target - n in hashMap:
return [i, hashMap[target - n]]
else:
hashMap[n] = i |
def part1(input) -> int:
count1 = count3 = 0
for i in range(len(input) - 1):
if input[i+1] - input[i] == 1:
count1 += 1
elif input[i+1] - input[i] == 3:
count3 += 1
return count1 * count3
def part2(input) -> int:
valid = {}
def possibleArrangements(input) -> int:
if len(input) <= 1:
return 1
if input[0] in valid:
return valid[input[0]]
i = 1
res = 0
while i < len(input) and input[i] - input[0] <= 3:
res += possibleArrangements(input[i:])
i += 1
valid[input[0]] = res
return res
return possibleArrangements(input)
f = open("input.txt", "r")
input = f.read().splitlines()
for i in range(len(input)):
input[i] = int(input[i])
input.append(0)
input.sort()
input.append(input[-1] + 3)
print(part1(input)) #2310
print(part2(input)) #64793042714624 | def part1(input) -> int:
count1 = count3 = 0
for i in range(len(input) - 1):
if input[i + 1] - input[i] == 1:
count1 += 1
elif input[i + 1] - input[i] == 3:
count3 += 1
return count1 * count3
def part2(input) -> int:
valid = {}
def possible_arrangements(input) -> int:
if len(input) <= 1:
return 1
if input[0] in valid:
return valid[input[0]]
i = 1
res = 0
while i < len(input) and input[i] - input[0] <= 3:
res += possible_arrangements(input[i:])
i += 1
valid[input[0]] = res
return res
return possible_arrangements(input)
f = open('input.txt', 'r')
input = f.read().splitlines()
for i in range(len(input)):
input[i] = int(input[i])
input.append(0)
input.sort()
input.append(input[-1] + 3)
print(part1(input))
print(part2(input)) |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# Function: formatted text document by adding newline
# Author: king
def main():
print('This python script help you formatted text document.')
fin = input('Input the file location : ')
fout = input('Input the new file location: ')
print('begin...')
MAX_SIZE = 78
newlines = ''
with open(fin, encoding='utf-8') as fp:
lines = fp.readlines()
for line in lines:
content = line.encode('gbk')
while len(content) > MAX_SIZE + 1:
newcontent = content[:MAX_SIZE]
content = content[MAX_SIZE:]
try:
newline = newcontent.decode('gbk')
newlines += newline + '\n'
except:
newcontent += content[:1]
content = content[1:]
newline = newcontent.decode('gbk')
newlines += content.decode('gbk')
with open(fout, 'w', encoding='utf-8') as fo:
fo.write(newlines)
print('Finish Done!')
pass
if __name__ == '__main__':
main()
| def main():
print('This python script help you formatted text document.')
fin = input('Input the file location : ')
fout = input('Input the new file location: ')
print('begin...')
max_size = 78
newlines = ''
with open(fin, encoding='utf-8') as fp:
lines = fp.readlines()
for line in lines:
content = line.encode('gbk')
while len(content) > MAX_SIZE + 1:
newcontent = content[:MAX_SIZE]
content = content[MAX_SIZE:]
try:
newline = newcontent.decode('gbk')
newlines += newline + '\n'
except:
newcontent += content[:1]
content = content[1:]
newline = newcontent.decode('gbk')
newlines += content.decode('gbk')
with open(fout, 'w', encoding='utf-8') as fo:
fo.write(newlines)
print('Finish Done!')
pass
if __name__ == '__main__':
main() |
s=0
i=0
v=0
while v>=0:
v = float(input("digite o valor da idade: "))
if v>=0:
s = s+v
print(s)
i = i+1
print(i)
r = s/(i)
print(r)
print(r)
| s = 0
i = 0
v = 0
while v >= 0:
v = float(input('digite o valor da idade: '))
if v >= 0:
s = s + v
print(s)
i = i + 1
print(i)
r = s / i
print(r)
print(r) |
__author__ = 'zz'
class BaseVerifier:
def verify(self, value):
raise NotImplementedError
class IntVerifier(BaseVerifier):
def __index__(self, upper, bot):
self.upper = upper
self.bot = bot
def verify(self, value):
if isinstance(value, int):
return False
if not (self.bot <= value <= self.upper):
return False
return True
class StringNotEmptyVerifier(BaseVerifier):
def verify(self, value):
if str(value).strip():
return True
return False
| __author__ = 'zz'
class Baseverifier:
def verify(self, value):
raise NotImplementedError
class Intverifier(BaseVerifier):
def __index__(self, upper, bot):
self.upper = upper
self.bot = bot
def verify(self, value):
if isinstance(value, int):
return False
if not self.bot <= value <= self.upper:
return False
return True
class Stringnotemptyverifier(BaseVerifier):
def verify(self, value):
if str(value).strip():
return True
return False |
#
# LeetCode
# Algorithm 141 Linked List Cycle
#
# Rick Lan, May 6, 2017.
# See LICENSE
#
# Your runtime beats 69.76 % of python submissions.
#
#
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def hasCycle(self, head):
"""
:type head: ListNode
:rtype: bool
"""
if head == None:
return False
crash = ListNode(0)
p = head
p = p.next
while p != None:
if p == crash:
return True
next = p.next
p.next = crash
p = next
return False
| class Solution(object):
def has_cycle(self, head):
"""
:type head: ListNode
:rtype: bool
"""
if head == None:
return False
crash = list_node(0)
p = head
p = p.next
while p != None:
if p == crash:
return True
next = p.next
p.next = crash
p = next
return False |
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
# @param {ListNode} head
# @param {integer} m
# @param {integer} n
# @return {ListNode}
def reverseBetween(self, head, m, n):
dumpy = ListNode(0)
dumpy.next = head
pre = dumpy
diff = n - m
while m > 1:
pre = pre.next
m -= 1
p = pre.next
while diff > 0 and p and p.next:
# print p.val
diff -= 1
tmp = p.next
p.next = tmp.next
q = pre.next
pre.next = tmp
tmp.next = q
return dumpy.next
| class Listnode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def reverse_between(self, head, m, n):
dumpy = list_node(0)
dumpy.next = head
pre = dumpy
diff = n - m
while m > 1:
pre = pre.next
m -= 1
p = pre.next
while diff > 0 and p and p.next:
diff -= 1
tmp = p.next
p.next = tmp.next
q = pre.next
pre.next = tmp
tmp.next = q
return dumpy.next |
class Solution:
def twoSum(self, nums, target: int):
d = {}
for i in range(len(nums)):
j = target - nums[i]
if j in d:
return [d[j], i]
else:
d[nums[i]] = i
s = Solution()
print(s.twoSum(
[3, 2, 4], 6))
| class Solution:
def two_sum(self, nums, target: int):
d = {}
for i in range(len(nums)):
j = target - nums[i]
if j in d:
return [d[j], i]
else:
d[nums[i]] = i
s = solution()
print(s.twoSum([3, 2, 4], 6)) |
""" Addoperation class """
class AddOperation:
""" Class for add operation """
def __init__(self, num1, num2):
""" Init function """
self.num1 = num1
self.num2 = num2
self.result = 0
def process(self):
""" Process function to perform operation"""
self.result = self.num1 + self.num2
def get_output_json(self):
""" Function to create output json """
self.process()
output_json = {
"input": {
"num1": self.num1,
"num2": self.num2,
},
"result":
{
"operation": "add",
"value": self.result
}
}
return output_json
| """ Addoperation class """
class Addoperation:
""" Class for add operation """
def __init__(self, num1, num2):
""" Init function """
self.num1 = num1
self.num2 = num2
self.result = 0
def process(self):
""" Process function to perform operation"""
self.result = self.num1 + self.num2
def get_output_json(self):
""" Function to create output json """
self.process()
output_json = {'input': {'num1': self.num1, 'num2': self.num2}, 'result': {'operation': 'add', 'value': self.result}}
return output_json |
def tri_bulle(L):
pointer = 0
while pointer < len(L):
left = 0
right = 1
while right < len(L) - pointer:
if L[right] < L[left]:
L[left], L[right] = L[right], L[left]
left += 1
right += 1
pointer += 1
return L
print(tri_bulle([8, -1, 2, 5, 3, -2])) | def tri_bulle(L):
pointer = 0
while pointer < len(L):
left = 0
right = 1
while right < len(L) - pointer:
if L[right] < L[left]:
(L[left], L[right]) = (L[right], L[left])
left += 1
right += 1
pointer += 1
return L
print(tri_bulle([8, -1, 2, 5, 3, -2])) |
"""
Brightness
"""
class Brightness(object):
"""
Brightness facade
"""
def current_level(self):
return self._current_level()
def set_level(self, level):
return self._set_level(level)
# private
def _current_level(self):
raise NotImplementedError()
def _set_level(self, level):
raise NotImplementedError()
| """
Brightness
"""
class Brightness(object):
"""
Brightness facade
"""
def current_level(self):
return self._current_level()
def set_level(self, level):
return self._set_level(level)
def _current_level(self):
raise not_implemented_error()
def _set_level(self, level):
raise not_implemented_error() |
t = int(input())
for case in range(t):
s = input()
numbers = '0123456789'
if (s[0] == 'R' and (s[1] in numbers) and ('C' in s)):
iC = 0
for i in range(len(s)):
if (s[i] == 'C'):
iC = i
break
row = s[1:iC]
col = int(s[iC + 1:])
cols = ''
rem = 0
while (col > 0):
rem = col % 26
col //= 26
if rem == 0:
col -= 1
cols = (chr(rem + 64) if rem != 0 else 'Z') + cols
print(cols + row)
else:
iN = 0
for i in range(len(s)):
if (s[i] in numbers):
iN = i
break
pow = 0
cols = s[:iN]
row = s[iN:]
col = 0
for i in range(len(cols) - 1, -1, -1):
col += (26 ** pow) * (ord(cols[i]) - 64)
pow += 1
print('R' + row + 'C' + str(col))
| t = int(input())
for case in range(t):
s = input()
numbers = '0123456789'
if s[0] == 'R' and s[1] in numbers and ('C' in s):
i_c = 0
for i in range(len(s)):
if s[i] == 'C':
i_c = i
break
row = s[1:iC]
col = int(s[iC + 1:])
cols = ''
rem = 0
while col > 0:
rem = col % 26
col //= 26
if rem == 0:
col -= 1
cols = (chr(rem + 64) if rem != 0 else 'Z') + cols
print(cols + row)
else:
i_n = 0
for i in range(len(s)):
if s[i] in numbers:
i_n = i
break
pow = 0
cols = s[:iN]
row = s[iN:]
col = 0
for i in range(len(cols) - 1, -1, -1):
col += 26 ** pow * (ord(cols[i]) - 64)
pow += 1
print('R' + row + 'C' + str(col)) |
#
# PySNMP MIB module STACK-TOP (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/STACK-TOP
# Produced by pysmi-0.3.4 at Wed May 1 15:10:55 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection")
NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance")
Counter64, ModuleIdentity, ObjectIdentity, Counter32, NotificationType, iso, Bits, IpAddress, enterprises, Gauge32, Unsigned32, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "ModuleIdentity", "ObjectIdentity", "Counter32", "NotificationType", "iso", "Bits", "IpAddress", "enterprises", "Gauge32", "Unsigned32", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "MibIdentifier")
DisplayString, MacAddress, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "MacAddress", "TextualConvention")
zte = MibIdentifier((1, 3, 6, 1, 4, 1, 3902))
zxr10 = MibIdentifier((1, 3, 6, 1, 4, 1, 3902, 3))
stacktop = ModuleIdentity((1, 3, 6, 1, 4, 1, 3902, 3, 301))
stacktop.setRevisions(('2004-05-14 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: stacktop.setRevisionsDescriptions(('',))
if mibBuilder.loadTexts: stacktop.setLastUpdated('200705280000Z')
if mibBuilder.loadTexts: stacktop.setOrganization('ZTE Corp.')
if mibBuilder.loadTexts: stacktop.setContactInfo('')
if mibBuilder.loadTexts: stacktop.setDescription('')
class VendorIdType(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(3, 3)
fixedLength = 3
sysMasterVoteTimes = MibScalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysMasterVoteTimes.setStatus('current')
if mibBuilder.loadTexts: sysMasterVoteTimes.setDescription("How many times stack system's master device be voted.")
sysMasterLastVoteTime = MibScalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 2), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysMasterLastVoteTime.setStatus('current')
if mibBuilder.loadTexts: sysMasterLastVoteTime.setDescription("The ending time when stack system's master device be voted.")
sysLastDetecTopEndTime = MibScalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 3), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysLastDetecTopEndTime.setStatus('current')
if mibBuilder.loadTexts: sysLastDetecTopEndTime.setDescription('The ending time when the system detected top at the last time.')
sysTopChagTimes = MibScalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysTopChagTimes.setStatus('current')
if mibBuilder.loadTexts: sysTopChagTimes.setDescription('How many times the system top changed.')
sysTopDetecMsgCount = MibScalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysTopDetecMsgCount.setStatus('current')
if mibBuilder.loadTexts: sysTopDetecMsgCount.setDescription('System topo detected topo protocol message count.')
sysTopInfoTable = MibTable((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6), )
if mibBuilder.loadTexts: sysTopInfoTable.setStatus('current')
if mibBuilder.loadTexts: sysTopInfoTable.setDescription('A list of the topo information.')
sysTopInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1), ).setIndexNames((0, "STACK-TOP", "sysDeviceMacAddr"), (0, "STACK-TOP", "sysDeviceStkPortIndex"))
if mibBuilder.loadTexts: sysTopInfoEntry.setStatus('current')
if mibBuilder.loadTexts: sysTopInfoEntry.setDescription('An entry to the topo info table.')
sysDeviceMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 1), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysDeviceMacAddr.setStatus('current')
if mibBuilder.loadTexts: sysDeviceMacAddr.setDescription('System Device mac address.')
sysDeviceStkPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysDeviceStkPortIndex.setStatus('current')
if mibBuilder.loadTexts: sysDeviceStkPortIndex.setDescription('System device stack interface port index.')
sysDeviceType = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysDeviceType.setStatus('current')
if mibBuilder.loadTexts: sysDeviceType.setDescription('System device type.')
sysDeviceStkPortNum = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysDeviceStkPortNum.setStatus('current')
if mibBuilder.loadTexts: sysDeviceStkPortNum.setDescription('System device stack interface port number.')
sysDeviceID = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysDeviceID.setStatus('current')
if mibBuilder.loadTexts: sysDeviceID.setDescription('System device ID.')
sysDeviceMasterPri = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysDeviceMasterPri.setStatus('current')
if mibBuilder.loadTexts: sysDeviceMasterPri.setDescription("System device's priority in voting master device.")
sysDeviceStkIfStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysDeviceStkIfStatus.setStatus('current')
if mibBuilder.loadTexts: sysDeviceStkIfStatus.setDescription('System device stack interface status 1: up 2: down.')
sysDeviceStkIfPanel = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysDeviceStkIfPanel.setStatus('current')
if mibBuilder.loadTexts: sysDeviceStkIfPanel.setDescription('System device stack interface panel num.')
sysDeviceStkIfPortID = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysDeviceStkIfPortID.setStatus('current')
if mibBuilder.loadTexts: sysDeviceStkIfPortID.setDescription('System device stack interface port num.')
sysDeviceStkPortNeibMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 10), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysDeviceStkPortNeibMacAddr.setStatus('current')
if mibBuilder.loadTexts: sysDeviceStkPortNeibMacAddr.setDescription('System device stack interface neighbor device mac address.')
sysDeviceStkPortNeibPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysDeviceStkPortNeibPortIndex.setStatus('current')
if mibBuilder.loadTexts: sysDeviceStkPortNeibPortIndex.setDescription('System device stack interface neighbor device port index.')
sysStkPortMsgStacTable = MibTable((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7), )
if mibBuilder.loadTexts: sysStkPortMsgStacTable.setStatus('current')
if mibBuilder.loadTexts: sysStkPortMsgStacTable.setDescription('A list of the stack interface receive and send message statistic information.')
sysStkPortMsgStacEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1), ).setIndexNames((0, "STACK-TOP", "sysStkDeviceID"), (0, "STACK-TOP", "sysStkDeviceStkIfIndex"))
if mibBuilder.loadTexts: sysStkPortMsgStacEntry.setStatus('current')
if mibBuilder.loadTexts: sysStkPortMsgStacEntry.setDescription('An entry to the stack interface receive and send message statistic information table.')
sysStkDeviceID = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysStkDeviceID.setStatus('current')
if mibBuilder.loadTexts: sysStkDeviceID.setDescription('System device ID.')
sysStkDeviceStkIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysStkDeviceStkIfIndex.setStatus('current')
if mibBuilder.loadTexts: sysStkDeviceStkIfIndex.setDescription('System device stack interface index.')
sysStkPortRecMsgCount = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysStkPortRecMsgCount.setStatus('current')
if mibBuilder.loadTexts: sysStkPortRecMsgCount.setDescription('System stack interface received message count.')
sysStkPortSendMsgCount = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sysStkPortSendMsgCount.setStatus('current')
if mibBuilder.loadTexts: sysStkPortSendMsgCount.setDescription('System stack interface send message count.')
mibBuilder.exportSymbols("STACK-TOP", sysTopChagTimes=sysTopChagTimes, zxr10=zxr10, PYSNMP_MODULE_ID=stacktop, stacktop=stacktop, VendorIdType=VendorIdType, sysLastDetecTopEndTime=sysLastDetecTopEndTime, sysStkPortMsgStacTable=sysStkPortMsgStacTable, sysStkPortSendMsgCount=sysStkPortSendMsgCount, sysTopDetecMsgCount=sysTopDetecMsgCount, sysDeviceMacAddr=sysDeviceMacAddr, sysDeviceType=sysDeviceType, sysDeviceID=sysDeviceID, sysMasterLastVoteTime=sysMasterLastVoteTime, zte=zte, sysDeviceStkIfStatus=sysDeviceStkIfStatus, sysTopInfoTable=sysTopInfoTable, sysStkPortRecMsgCount=sysStkPortRecMsgCount, sysStkPortMsgStacEntry=sysStkPortMsgStacEntry, sysStkDeviceStkIfIndex=sysStkDeviceStkIfIndex, sysDeviceMasterPri=sysDeviceMasterPri, sysMasterVoteTimes=sysMasterVoteTimes, sysDeviceStkIfPanel=sysDeviceStkIfPanel, sysTopInfoEntry=sysTopInfoEntry, sysDeviceStkPortNum=sysDeviceStkPortNum, sysDeviceStkPortNeibPortIndex=sysDeviceStkPortNeibPortIndex, sysDeviceStkIfPortID=sysDeviceStkIfPortID, sysDeviceStkPortNeibMacAddr=sysDeviceStkPortNeibMacAddr, sysStkDeviceID=sysStkDeviceID, sysDeviceStkPortIndex=sysDeviceStkPortIndex)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, value_size_constraint, value_range_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection')
(notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance')
(counter64, module_identity, object_identity, counter32, notification_type, iso, bits, ip_address, enterprises, gauge32, unsigned32, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'ModuleIdentity', 'ObjectIdentity', 'Counter32', 'NotificationType', 'iso', 'Bits', 'IpAddress', 'enterprises', 'Gauge32', 'Unsigned32', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'MibIdentifier')
(display_string, mac_address, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'MacAddress', 'TextualConvention')
zte = mib_identifier((1, 3, 6, 1, 4, 1, 3902))
zxr10 = mib_identifier((1, 3, 6, 1, 4, 1, 3902, 3))
stacktop = module_identity((1, 3, 6, 1, 4, 1, 3902, 3, 301))
stacktop.setRevisions(('2004-05-14 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
stacktop.setRevisionsDescriptions(('',))
if mibBuilder.loadTexts:
stacktop.setLastUpdated('200705280000Z')
if mibBuilder.loadTexts:
stacktop.setOrganization('ZTE Corp.')
if mibBuilder.loadTexts:
stacktop.setContactInfo('')
if mibBuilder.loadTexts:
stacktop.setDescription('')
class Vendoridtype(OctetString):
subtype_spec = OctetString.subtypeSpec + value_size_constraint(3, 3)
fixed_length = 3
sys_master_vote_times = mib_scalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysMasterVoteTimes.setStatus('current')
if mibBuilder.loadTexts:
sysMasterVoteTimes.setDescription("How many times stack system's master device be voted.")
sys_master_last_vote_time = mib_scalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 2), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysMasterLastVoteTime.setStatus('current')
if mibBuilder.loadTexts:
sysMasterLastVoteTime.setDescription("The ending time when stack system's master device be voted.")
sys_last_detec_top_end_time = mib_scalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 3), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysLastDetecTopEndTime.setStatus('current')
if mibBuilder.loadTexts:
sysLastDetecTopEndTime.setDescription('The ending time when the system detected top at the last time.')
sys_top_chag_times = mib_scalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysTopChagTimes.setStatus('current')
if mibBuilder.loadTexts:
sysTopChagTimes.setDescription('How many times the system top changed.')
sys_top_detec_msg_count = mib_scalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysTopDetecMsgCount.setStatus('current')
if mibBuilder.loadTexts:
sysTopDetecMsgCount.setDescription('System topo detected topo protocol message count.')
sys_top_info_table = mib_table((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6))
if mibBuilder.loadTexts:
sysTopInfoTable.setStatus('current')
if mibBuilder.loadTexts:
sysTopInfoTable.setDescription('A list of the topo information.')
sys_top_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1)).setIndexNames((0, 'STACK-TOP', 'sysDeviceMacAddr'), (0, 'STACK-TOP', 'sysDeviceStkPortIndex'))
if mibBuilder.loadTexts:
sysTopInfoEntry.setStatus('current')
if mibBuilder.loadTexts:
sysTopInfoEntry.setDescription('An entry to the topo info table.')
sys_device_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 1), mac_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysDeviceMacAddr.setStatus('current')
if mibBuilder.loadTexts:
sysDeviceMacAddr.setDescription('System Device mac address.')
sys_device_stk_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysDeviceStkPortIndex.setStatus('current')
if mibBuilder.loadTexts:
sysDeviceStkPortIndex.setDescription('System device stack interface port index.')
sys_device_type = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysDeviceType.setStatus('current')
if mibBuilder.loadTexts:
sysDeviceType.setDescription('System device type.')
sys_device_stk_port_num = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysDeviceStkPortNum.setStatus('current')
if mibBuilder.loadTexts:
sysDeviceStkPortNum.setDescription('System device stack interface port number.')
sys_device_id = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysDeviceID.setStatus('current')
if mibBuilder.loadTexts:
sysDeviceID.setDescription('System device ID.')
sys_device_master_pri = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysDeviceMasterPri.setStatus('current')
if mibBuilder.loadTexts:
sysDeviceMasterPri.setDescription("System device's priority in voting master device.")
sys_device_stk_if_status = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('up', 1), ('down', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysDeviceStkIfStatus.setStatus('current')
if mibBuilder.loadTexts:
sysDeviceStkIfStatus.setDescription('System device stack interface status 1: up 2: down.')
sys_device_stk_if_panel = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysDeviceStkIfPanel.setStatus('current')
if mibBuilder.loadTexts:
sysDeviceStkIfPanel.setDescription('System device stack interface panel num.')
sys_device_stk_if_port_id = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysDeviceStkIfPortID.setStatus('current')
if mibBuilder.loadTexts:
sysDeviceStkIfPortID.setDescription('System device stack interface port num.')
sys_device_stk_port_neib_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 10), mac_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysDeviceStkPortNeibMacAddr.setStatus('current')
if mibBuilder.loadTexts:
sysDeviceStkPortNeibMacAddr.setDescription('System device stack interface neighbor device mac address.')
sys_device_stk_port_neib_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 11), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysDeviceStkPortNeibPortIndex.setStatus('current')
if mibBuilder.loadTexts:
sysDeviceStkPortNeibPortIndex.setDescription('System device stack interface neighbor device port index.')
sys_stk_port_msg_stac_table = mib_table((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7))
if mibBuilder.loadTexts:
sysStkPortMsgStacTable.setStatus('current')
if mibBuilder.loadTexts:
sysStkPortMsgStacTable.setDescription('A list of the stack interface receive and send message statistic information.')
sys_stk_port_msg_stac_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1)).setIndexNames((0, 'STACK-TOP', 'sysStkDeviceID'), (0, 'STACK-TOP', 'sysStkDeviceStkIfIndex'))
if mibBuilder.loadTexts:
sysStkPortMsgStacEntry.setStatus('current')
if mibBuilder.loadTexts:
sysStkPortMsgStacEntry.setDescription('An entry to the stack interface receive and send message statistic information table.')
sys_stk_device_id = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysStkDeviceID.setStatus('current')
if mibBuilder.loadTexts:
sysStkDeviceID.setDescription('System device ID.')
sys_stk_device_stk_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysStkDeviceStkIfIndex.setStatus('current')
if mibBuilder.loadTexts:
sysStkDeviceStkIfIndex.setDescription('System device stack interface index.')
sys_stk_port_rec_msg_count = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysStkPortRecMsgCount.setStatus('current')
if mibBuilder.loadTexts:
sysStkPortRecMsgCount.setDescription('System stack interface received message count.')
sys_stk_port_send_msg_count = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sysStkPortSendMsgCount.setStatus('current')
if mibBuilder.loadTexts:
sysStkPortSendMsgCount.setDescription('System stack interface send message count.')
mibBuilder.exportSymbols('STACK-TOP', sysTopChagTimes=sysTopChagTimes, zxr10=zxr10, PYSNMP_MODULE_ID=stacktop, stacktop=stacktop, VendorIdType=VendorIdType, sysLastDetecTopEndTime=sysLastDetecTopEndTime, sysStkPortMsgStacTable=sysStkPortMsgStacTable, sysStkPortSendMsgCount=sysStkPortSendMsgCount, sysTopDetecMsgCount=sysTopDetecMsgCount, sysDeviceMacAddr=sysDeviceMacAddr, sysDeviceType=sysDeviceType, sysDeviceID=sysDeviceID, sysMasterLastVoteTime=sysMasterLastVoteTime, zte=zte, sysDeviceStkIfStatus=sysDeviceStkIfStatus, sysTopInfoTable=sysTopInfoTable, sysStkPortRecMsgCount=sysStkPortRecMsgCount, sysStkPortMsgStacEntry=sysStkPortMsgStacEntry, sysStkDeviceStkIfIndex=sysStkDeviceStkIfIndex, sysDeviceMasterPri=sysDeviceMasterPri, sysMasterVoteTimes=sysMasterVoteTimes, sysDeviceStkIfPanel=sysDeviceStkIfPanel, sysTopInfoEntry=sysTopInfoEntry, sysDeviceStkPortNum=sysDeviceStkPortNum, sysDeviceStkPortNeibPortIndex=sysDeviceStkPortNeibPortIndex, sysDeviceStkIfPortID=sysDeviceStkIfPortID, sysDeviceStkPortNeibMacAddr=sysDeviceStkPortNeibMacAddr, sysStkDeviceID=sysStkDeviceID, sysDeviceStkPortIndex=sysDeviceStkPortIndex) |
class Solution:
def distributeCandies(self, candies):
"""
:type candies: List[int]
:rtype: int
"""
if len(candies) == 0 or len(candies)%2 !=0:
return 0
h = set()
for i in candies:
h.add(i)
l=len(candies)/2
if(len(h)>l):
return int(l)
return len(h)
| class Solution:
def distribute_candies(self, candies):
"""
:type candies: List[int]
:rtype: int
"""
if len(candies) == 0 or len(candies) % 2 != 0:
return 0
h = set()
for i in candies:
h.add(i)
l = len(candies) / 2
if len(h) > l:
return int(l)
return len(h) |
all_bps = """BFBBBBBLLR
BBFFBBFRRL
FBFBFFFRRL
BBFFFBFRRL
BFFBFBFRLL
FFBBBFBLRL
BFFFBFFLLR
FBFFFFBLRR
FBFFBBBRRR
BFFBFFFLLR
BFFFFFBLLL
FFBBFFBLRR
BFFFFFBRLR
FBFBFBFLLL
FFBFBFFLLL
BBFFFFFLLL
FFFBBBFLLL
BBFFBFBLLR
FFBFBFBRRR
BFFBFFFRRR
BBFFBFBRLR
FFFBFBFLRL
BBFFBBBLRR
FBBFFFFLLR
BBBFBBFLLL
BFFFFBBRLL
FBBFBFBRRL
FFBBBFFRRR
BBFFFFBRRR
FBBBBFFLLR
BFFFFFBLRR
FFBBFBFLLR
BFFBFBBLLL
BBFBBBBLLL
FBFBBBFRLL
FFBFFFBLRL
FFFFBBBLRL
BBBBFBFRRR
FFBBFBBRLL
FFFBBBBRRL
FFBFFFBRLR
BFBFBFBLLL
FFFBFFBLLL
BBFBFBBLRL
BBBBBFFLLL
FBBBBFFRRR
FBFFFFBLLL
FFFFBBBRRL
FBFBBBFRRR
FBBFFBFLRL
BFBFFBFLLR
FFBBBFBLLL
BFBFFFFLLL
BBBFFFFLLL
BFBBFBFRLR
BFBBBBFLRL
BBBFBFBLRL
BFFFBFBLRL
BFBBBBBRLL
FBBBFFBRLL
BFBFFBBRRL
BFFBBBFLLR
BFFBFFBRRR
FBFBFBFRRL
FBFBFBFLRL
BBBFFFBRRR
FBFFBBFRRR
FFBBFFFRLL
BFBFBBBLLR
BFFFFBFLLR
FFBBBBFRLR
FFFBFFFRRR
BFBBFFFRLL
BBBFBFFLRL
BFBBFBFLRR
BBBBFBBLRL
FBFBFBFLRR
BBFBFBBLLL
BFBBBFBLRL
BFBBFBFLRL
FFFBBFBLLL
BBBFBFBLLR
FBBBBBFLLR
FFBBBFBRLL
BBBBFBBRRL
FBFFFBBRLL
BBFBBFFRRL
FBFFBFBLLL
BFFBFBBRRL
BFFFBFFRLR
BBFBFBFRRR
FBBFBFFRRR
BBBFBFBLRR
FFBFFBFRLR
FFBFBBBLRL
FFFFBBFRRL
FFBBBFBRLR
FBFBFBBLLL
FBBBFBFRLL
BBBBFBBLLR
BFBFBBFRLR
FBBFBBFLRR
BBBBFBFLRL
FBFBFBFRLL
FFBFBFBLLR
FBFFBBFRRL
BFFFFFFRLR
FFFFBFFRRL
BBFFFBFLRR
FBBFFBFRRL
FFFFBFBLLL
FFBBFFFRRL
BBFBFFFRLL
BFFFFBFRLR
FBFBFBBRRL
FBBFBBFRLR
BFBFFFBRRL
FFFBFFBRLR
BFBFFBFLRL
FBBFBFFRRL
FFBFFFBLLL
FBFFFBFRRR
FBFFFBBRRL
FBFFBFBRLL
BFBFFFFRLL
FFFBBBFLRR
BBFFFFFLRR
BFBBFBBLLR
BFBFFBFLLL
FBBBBFBLLR
BFBBFFFLLR
BFBBFFFRRL
BFFBBFFLLR
BBBFFFFRRL
BBBFBBBLLR
FFFBFBBRLL
FFBFFBBLRR
FFBFBBFLLL
BBBFFBFRLL
BBBFBFFLRR
FBFBFFBRLR
FBBFFBBLRL
BBFBBFFLLR
BBFBBFBRLR
BFBFFBBRLR
BBBBFFBRLL
FFFBBBFRLL
FBBFFFFRLR
BFBBBBFRRR
BBBBFFBLRR
FBBBBBFLRR
FBBBFFBLRL
BFFBBBFRRR
BBBBFBFRLL
BFBBBFBLRR
FFBFFFFLLL
FBFFFFBRLL
FFBFFBBRLR
BFFBBFFLLL
FFBFBFBLRL
FFBFBFFRRR
BBBFBBFLRR
BBBFBBBLLL
BFFFFFFLRL
FBBBBBBRLR
FFFBFBFLRR
FFBBFFBRRL
FBBFBBBRLR
BBBFBBFLLR
FFBFFBFLRR
BFBBFBBRRL
FBFFFBBLRL
BFFBBFBLRL
BBFFBFFLLL
FBBBFBFRLR
BBBBFFFRLL
FFBFBFBLRR
FBBFFFBRRL
FFBBBFFLLL
BBFFFBBLLR
BFFFFBFRRL
FBFFFFBRRL
BFBBFFFRLR
FFFBBBBLLL
FBFBFBBRLR
FFFBFBBRLR
FBFBFFFLRR
BFFFFFFRRR
FFFFBBBRRR
BBFBFFFRRL
FFFBFBBLLL
BFBBFBFLLR
BBFBBBBRRL
BBFFBBFRRR
BBBFFBBLRL
FBFBFFFLLR
BFFFBBBRRR
FFBFFFFLLR
FBBBFBFLLL
FBBBFBBLRR
BBBFBFBRRR
FBBBFBFRRL
BBBBFFBRLR
FBFBBBBLLR
FFFFBBFRLR
BBFBBBFLLL
BBFBBBBLRR
FFFFBFBRRR
FBFFFBFLRR
BFFFBBFLRR
BBBFBFFLLR
BFFBBBBRLR
FBFBBFBLLR
BFBBBFFLRR
BFFBBFFRRR
FFFBFFFRLL
FFBFBBBRRR
BBBFFFBLLR
BBFFFFFLLR
FBBBBFBLRR
FBFBBFFRRL
BFBFBFFRRL
BFFFFBFRRR
FFBFFBBLLL
BFBFBFBRRR
BFFFFFFLLR
FFFBBFBRRL
BFBBBFBRRL
BBFFFBFRLL
BFBBBBBLRL
FBFBBFFLRR
FFBBBFFRLR
FBBBFBBRRR
FFBBBFFRRL
FFBBBBFLLR
BBFBBFBRRL
BBFBBBFRLL
BBFFFFFLRL
BBBFFFBLLL
BBFFFFFRRR
FFBFBBBLRR
FFBBBFFLRR
BFFBFBFRLR
FFBBBFBRRR
FBBBBFBLRL
BBBFBBBRLL
FBFBFFBRRL
BFFFFBBRRL
BBFFBBFRLR
FFBFBFFRLR
BFFFBFBRRR
BBBFBBFRRL
FFFBFFFLRL
FBBFFBFRRR
FFBBBBBLLL
FFBFFBFLRL
FBFBFBBLRR
FFFBFFBRLL
BBBFFFBRRL
BFBFBBBRLL
BBBFFFFLRR
BBFFBFFLLR
FBBFFBFLRR
FBBBFFBLRR
BFBFFBBLLL
FBFFFBBRLR
FBBFBBBLLR
BFBBBBBRLR
FBBBFFFLLL
BFFFBBFLLL
BFFFFBBRLR
FBBFBFBRLL
FBFFBFBLRL
BBBFFFFRLL
FBFFFFFRLL
FBBBFBFLRL
FBFBBFBRRL
FFBFBFFLLR
BBBFFBBLLL
FFBFBBFLLR
BBBFBBFRLL
BFFBFBBLRR
FBBFBBFRRL
FBFFBFFLLL
BFBBFBFLLL
FFBBFFBRLL
BFFFFFFLLL
BFFFFFFRLL
BFBFFFFLRR
FFBBFFFLRR
BBFFBBBRLR
BFFFFBFLRR
FFBFBFFLRR
BBBBBFFLRL
BBFBBBBRLR
BFFBFFBRLL
BFBFBBFLRL
FBFBBFBLLL
BFFBBFFRLR
FFFFBFBRLR
BFBFBFBRLL
BFBBFFBLRR
BBBBBFFRLL
BBFFFBBRLL
BFBFBBBLLL
FBBBFFFLRR
FBBBBBFRRL
BFFBBFBRRL
FFBBFFBLLL
FBFFFBFRLL
BBBFFFBRLL
FFFBBFFLLL
BBFBFBBLLR
FFFBFFBLRL
BFFBBBBLLL
BBFFBFFLRR
FFBBFBFLRR
BBBBFBFRRL
BBFBFBBRRR
BBFFFFBLLR
BBBBFFBLLR
BBBFFBFLRR
FFBFFBBLRL
BBFBBBFRLR
FBFFBFFLRL
FFFFBFBLRL
BFBFFFBLRL
FBBBFBFLRR
BFFFBBBLLL
FBBBFFFRRR
BFBFBFFLLR
BFFBFBFLLR
FFFBBBFRRL
BBBFFBFLLR
FFBFBFBLLL
BFBBBFFRLR
BBBFFBFRRL
FBFBFFFRLR
BFBFBBFRRL
FBFFFFFLRR
BFBFFBBLLR
BBFBFBBRLR
FBBBFFFLRL
BBBBFBBRRR
FFBBBBFLLL
FBFFFBBLLR
FFBBBBBRRR
BFFFBBBLRR
BBFBBBBRLL
BBFBFBFLRR
BFBBFFBLLR
FBBFFBBRLL
FBBBBFFRLL
FBFBFFBLLR
FFBFBBBRRL
FFFBBFBRLL
BFFBBFBLLR
BBBBBFFRRL
BFBBFFBRRL
BFFBFFBRLR
FFBFBBFRRL
FFFFBBFLRL
BBFFFFBLRL
BFBFFFBRLL
BFBFFFFRRR
BBBFFBBRRL
FFFFBBFLLL
BBBFFFFLRL
BBBFBFFLLL
FBFBFFBRLL
FBBFFFBLRL
BFBFBFFLLL
BBBFFFBLRR
FBFBFBFRLR
BFBFBFFLRL
BFFFBBBRRL
BFBFFBBRLL
FFBFFFBRLL
FFBFFBFLLR
FFFBFFBRRL
FFBBFFFLRL
BFBFFFFRRL
FBFFFFFRRR
BBFBBFBLLR
FFBFBFBRLR
BFFFBFFRRR
FBBBBFBLLL
BBFFBBBRRR
BBFBBBBRRR
BBBFBBBLRR
BBFBBFBRLL
BFBFBFFLRR
FBFFFBFLRL
FFFFBFFRRR
BFFBFFFLRR
FBFFBBBRLL
BFFFBFBLLL
FBBFBFBLLR
FFBFFBBRRR
BFBFBBFLRR
BBFFFFBLLL
FBBFFFFRRR
FBFBBBFRRL
FBBFFFBLLR
FBFBBFBRLR
BBFFBBBLLR
FFFBBFFLRL
BBFFBFBRRR
BFBFFFFLRL
FFFFBFBRLL
FBFFFBFRRL
BBBFBBBLRL
FFBBBFFRLL
BBFBFFBRRL
BFFBFFBLLL
BBFBBFBRRR
FBBFBBFLLR
BFFFFFFLRR
FBBBBBBRRR
BBFBBBFRRL
FFFBBBFLLR
FBBBBFFLRL
FBFFBFFRLL
BFBFBFBRLR
FBBBFFFRLL
BBFFFBBRRR
BBFBFBBLRR
BFFFFFBRLL
FBFBFFFLLL
FBFFBFBLLR
BFFBFFBRRL
BFBBFFFLRR
BFBBBFBLLR
FFFBBBBRLR
FFBFFBFRRL
FFBBBFBLLR
BBFBFFBRRR
FFBBBBBRLR
BBFFBBBLLL
BFBBFFBLLL
BFBFBBFRRR
BBBBFFFLLL
FBBFFBBRRL
FFBBBFBRRL
BFBFBBBRRR
FBFBBFFLLL
FFBBFFFLLR
FBBBBBFLLL
FFBFBFFLRL
FFBFFBFRRR
FBBBFBBRLR
BFFFFBFLRL
FFFBFFFLLR
BBFBFFBLLR
FFBBFFBLRL
FFFBFBBLRL
BFFFBBBRLR
BBFFFFBRRL
FBBFFBBLRR
FBFFFFFLRL
BBFFBFFRLR
BBFBFFFRLR
FFFBFBFRLR
BFFFBBFRRL
BBBFFBFLLL
BBFBBBBLRL
BFFFFFBLLR
BFFFFBBLLR
BBBFFBFRRR
BBFFFFFRRL
BBFFFFBRLR
FFBBBFFLRL
BFFFBBBRLL
BFFFBBFRLL
FBFBBBFRLR
BBFBFBFRRL
FBFFBFBRLR
FBFFBFFRRR
FBFFFBBLRR
BFFFBBFLRL
FBFBFFBLRL
FBBBBBBRRL
BFFFBFBRLR
FBBBBFBRLL
BBFFBBFLLR
BBFBBFFLRR
FBFFFBFLLR
FBBBFBBLLL
FFBFFFBLRR
BBFBFFBLRR
FFBFFBBRLL
BFFBBFFRLL
FBFFFFBRRR
FFFBFBBRRL
BBBBFBFLLR
BBFBFFFLRL
BFBFFFFRLR
BBFBFFFRRR
BBBFBBBRRL
BFFBBBBLRR
BFFFBBBLRL
BBFFFBBRLR
FBBBFFBRLR
FBBBFFBLLL
FBBBBBBLRL
BBBFFFBLRL
FBFBFFFLRL
BFBFFBFRLL
BBFFFFBRLL
BBFFFFFRLL
FFFBFFFRRL
BBFFBBFLRR
BBBBFFFRRL
BFFBBBBLLR
BBBBFFFRLR
BBBFFFBRLR
FBBFFBBRLR
BFFBBFBLLL
BBBFBBFLRL
BFBFBBFLLR
BBFBBFFLRL
BFFBBBFRRL
FFFFBBFLRR
FBFFBBBLLR
BFBFBFBLLR
FBBBFFBRRR
FBBBBBFRLR
BBFBFFBRLR
BBFFBFFRLL
FFFBFFBLLR
BBFFBFBLRR
FBFFFBBRRR
BFFBBBBRRR
FBFFBBBRRL
BBFBFBFLLR
FBFBBFFLRL
BBBBFFFRRR
BBFBFFFLLL
BFFFBFBLLR
FBBBBFFLRR
FBFFBBFLLL
FFFFBFBRRL
BBFBFBFLLL
BFBBFFBLRL
BFFFBFBLRR
BBBBFFBRRR
FBFBBFBRRR
FBBFBFBRLR
FBBFBFFLRR
FBFBBBBLRR
FBBFBFFRLR
FBBBBBFLRL
FBBFBFFRLL
FFBBFFBRRR
BFBFBFBLRR
FBBFBBBLRL
FBBBFBFRRR
BFFBFBFRRL
FBBFFFFLRL
BFBBBBFRLR
FFBFBBBRLL
BFFBBBBRRL
BFBBFBBLLL
FBFBFFFRRR
BFBFBFBLRL
FBBFFBFLLR
FFFBFBBRRR
FBBBBFFLLL
FBFBBBBLRL
FBBFBFBLRL
FFBBFBBRRR
FBFBFFBLRR
FBFBFBBLLR
FFFBFBFRLL
FFFFBBFRRR
BFBBBBBLLL
BBFBBBBLLR
FBBFFFFRRL
FBBFBFBLLL
BFFFBBFLLR
FBBBFFBLLR
FFBFFBFLLL
BBBFFBBLLR
BFBFFFFLLR
FBFBBBFLRR
FFBBBBFRRL
FFFFBBBLRR
FFBFFFFRRL
BFBBFFFLRL
BBBFBFBLLL
FBFBBFBLRR
BBFBBFBLLL
BFFBFBBRLR
BFBBFBBRRR
FFBBFBFRLL
BFFBFBFLLL
BFFBBFBLRR
FBBBBFBRRL
BFBFBBBLRR
FBBBBBBLLL
BFFFBBBLLR
BBFBFFFLLR
BBBFFBBRLL
BFFBBBFLRR
BFFBFBFRRR
BBBBBFFRLR
BFFBFFFRLR
FBFFFFFLLL
BFFFBFBRLL
FBBFBBFLLL
FBBFBFBRRR
FBFFBBFLLR
FBBBFBFLLR
FFFBFFFLRR
FFBBBBFRRR
BBBBFBFLRR
FBFBFFBRRR
BFFBFFBLLR
FFBBFBBRLR
FBFBFBBRRR
FFBBBBBLRL
FBBBBBFRRR
FFFBFBFRRL
FFBFBFBRRL
BFBBBFBRLR
BBBFBFFRRR
BFFBBFBRLR
BFFBBBBRLL
FBBBBFFRRL
BBBFBBBRLR
BFFFFFFRRL
FFFBBFFLRR
BBFBFFBLRL
BFFBFBFLRR
BBBFFBBLRR
BFBFFBFRRR
BBBBFFBLLL
FBFFBBBLRR
BBFFBBFLLL
FBFBBBBRRR
BBFFBFBLLL
BBBBFFFLRR
FBFFBBBRLR
BFBFFFBLRR
BBFBBFFLLL
BFFBBFFRRL
BFFFBFFRRL
BBFFFBBLRR
FFBFFFFLRL
FFBFBBFRLL
FBFBFFFRLL
BBFFFBFRLR
FFFBBFBLRR
BFBBBFBLLL
BBFBFBFRLL
BFBFBBFRLL
BFFFFFBRRL
FFBFBBBRLR
BFBBFFBRLR
BFBFBFFRLR
FBBBBBBLRR
FFBBBBFLRL
FFFFBFBLRR
FFBFFFBRRR
FFBFBBFRLR
BBBFFBFLRL
FBBBBFFRLR
BFFBBFBRLL
BFFBBBFRLR
FFFBFFBRRR
BBBFBBBRRR
FBFFBFFRRL
FBFFFBFLLL
BFBBBFFRRL
BBFBFBBRLL
BBFBFBBRRL
FFFBFBFRRR
BFBBFBBLRR
FFFBBBFRRR
BFFBFBBLRL
BFFBFFBLRR
BFBBBFFRRR
FFFBBBFLRL
FFBBFBFRRR
FFBFBFBRLL
FFBFFFBLLR
FBBBBBBRLL
FFFFBFBLLR
FFBBFFFRRR
FFFBFFFLLL
FFBBFBBLLR
FFBBBBFLRR
FBBFFBBLLL
BFBBFBBRLR
FFFBFBBLLR
BBFFBFBLRL
FFBFBBFRRR
BBBBFBBRLR
BBBFBBFRLR
BBFFBFFRRR
FFBBBBBLLR
FBFFBFBLRR
FBBBBFBRLR
FFFFBBFLLR
BFBFBBFLLL
FBBFBFBLRR
FBBFFBFRLL
BBFFFFFRLR
FFBBFBFLRL
BFBFBBBRLR
FBBFBBFRRR
FBFBFBBLRL
BBBFFBBRRR
FBBFFBBRRR
FBFFFFBRLR
FBBFBBFLRL
FFFBBFBRRR
FBFBBBBRLR
FBBFFBBLLR
FFFBBBBRRR
BBBBBFFLLR
FFFFBBBLLL
BFFBBBFRLL
FBFBBFBLRL
BBBBFBFRLR
BBFBFFBLLL
BFBFFBFLRR
BFFFFFBLRL
BBBFBBFRRR
FFBBBBBLRR
FBFFFFFLLR
FBFBBFFRLL
BFBBBBBRRL
FBFBFBBRLL
FBBFBBBRRL
FBFFBBBLRL
BFFFBFFLLL
BFBBBBBRRR
FFFBBFFRRR
BBFBBBFLRL
FFFFBBFRLL
FBFFFFFRLR
FFFFBBBRLR
FBFFBBFRLR
FFFFBBBRLL
BBFFBBBLRL
FFBFBBFLRR
BFBBBBBLRR
BFFFFBBLLL
FBFBBBBRRL
BBBFBFFRRL
BFBBFBBLRL
BFBBBBFRRL
FBFFFBBLLL
FFBBFBBLRL
BBFBFFBRLL
BBBFFFFRRR
FFFBBBBLRR
FFFBBFBLRL
FFFBBBBLLR
BFBFBBBRRL
BBBBBFFLRR
BBBBFBBLLL
BBBBFBBLRR
FFFBBBFRLR
FBBBFFFLLR
BFFFBFBRRL
BBFFFBFLLR
BFBBFBFRLL
BFBBBFFLRL
FFBFFBBRRL
FBFBBFFRLR
BFFFFFBRRR
FBFFFFBLLR
FBBFBFFLLR
FBBBFFFRLR
FBFBFBFLLR
FFFBBFBLLR
BFBFFBFRRL
FFFBBFBRLR
FFBBFBBLRR
FBBBFBBLLR
BBBFFFFLLR
BBBBFBFLLL
BBFFFBFLLL
BFFFBFFLRL
BBFBBFFRLR
BBFFBBFLRL
FBBBBFBRRR
FBBFFBFLLL
FFFBFFBLRR
FFBBFFFRLR
FBBFFFBRLR
BBBFBFBRLL
BFBBFFFLLL
FFFBBFFRLL
BBFFBFBRLL
FFBBBBBRRL
FBFFBBBLLL
FBBFFFBRRR
BFFFBFFRLL
FFBBBFFLLR
FBBFBBFRLL
FBBFFFFLRR
FBBBBBFRLL
BBBFFBBRLR
FBFFBBFLRL
FBBFFFBLLL
BFBBBFFRLL
FFFBBFFRLR
BFBFFFBLLL
FFFFBBBLLR
BFFBFFFLLL
BFBBFFBRRR
BFFBFBBLLR
FFBFFBFRLL
FFFBBFFLLR
FBFFFFFRRL
BFFBBFFLRR
FFBBFFBLLR
FBBBFFBRRL
FBBBFBBLRL
BBFFBFFLRL
BBBBFFBRRL
BFBFFBBLRL
BFBBFBFRRR
FFFBBBBRLL
FBBFBBBRRR
BBBBFFFLRL
FBFFBFBRRR
BBBBFFFLLR
FBBFFBFRLR
FFFBBBBLRL
BBFBBFBLRL
BFBBBBFLLR
BBBFBFBRRL
BFBBBBFLLL
BFBFFFBRRR
FFBBFFBRLR
FBBBFFFRRL
BFFFFBBRRR
FBFBBFBRLL
BFBBFFBRLL
FBBFBFFLRL
BFFBBBBLRL
BFFBFBFLRL
FBBBFBBRRL
BFBBBBFLRR
BFBFFBBRRR
BFFFBBFRLR
BFFBFFBLRL
BFFBBFBRRR
BBFFBBBRRL
BBBBFBBRLL
FBBFBBBLRR
FFBFBFFRLL
FFBFFFFRRR
BFFBBFFLRL
BFBBFBBRLL
BFBFFBBLRR
FBFBFBFRRR
BBFFFBFRRR
BBFBBFFRRR
FFBFBBBLLR
FFFBFBFLLL
BBFFFBBLLL
FFBBFBBLLL
BFBBFFFRRR
BFBFBBBLRL
FBFBBBFLRL
BFBFBFBRRL
FFFBFBFLLR
BBFFFFBLRR
BBFBFBFRLR
FFBBFBFLLL
BFBBBFBRLL
BBBFFBFRLR
BFFFFBFLLL
FFBBBBFRLL
BBFBBFFRLL
BFFFBFFLRR
BBFBBBFLLR
FFBFBBFLRL
BBBBFFBLRL
BFBBBFBRRR
FBBFBFFLLL
FBFFBFFRLR
BFFBFFFLRL
FBFFBFFLLR
FBFBBBBRLL
BBFFFBFLRL
BBFBBFBLRR
BFFFFBBLRL
BBFBFBFLRL
FBBFBBBRLL
FBBFFFFRLL
FFBFBBBLLL
FFBFFBBLLR
BFBBBFFLLR
BBBFBFFRLR
BFFBFFFRRL
BBFFBBBRLL
BBFFBBFRLL
FBBBBBBLLR
BFFBFBBRRR
BBFFFBBRRL
FFBFFFFRLL
FFFBFBBLRR
BBFFBFBRRL
BBFFFBBLRL
FBFFFFBLRL
BFFFFBFRLL
BFFBBBFLLL
BFBBFBFRRL
FBBFFFBLRR
FFBFFFFRLR
FBBFFFFLLL
FBFBBFFRRR
FBFBBFFLLR
FFBFFFBRRL
BFBBBBFRLL
BFFBBBFLRL
FBFFBFBRRL
FFBFFFFLRR
FBBBFBBRLL
BBFBBBFRRR
BFFBFFFRLL
FFFBBFFRRL
BFBFFFBLLR
FBFFFBFRLR
FBFBBBFLLL
FFBBFBFRRL
BBBFBFFRLL
FBFFBFFLRR
BBFBBBFLRR
FFBBBFBLRR
FFFBFFFRLR
FBFBFFBLLL
BFBBBFFLLL
BFFFFBBLRR
FBFBBBFLLR
FBFFBBFLRR
FFBBFBBRRL
BBFBFFFLRR
BBFFBFFRRL
FFBBFFFLLL
FFBFBFFRRL
BBBFBFBRLR
BFBFFFBRLR
FBFBBBBLLL
FFBBBBBRLL
FBBFBBBLLL
BFFFBBFRRR
BFBFFBFRLR
BBBFFFFRLR
FBFFBBFRLL
FFBBFBFRLR
BFFBFBBRLL
BFBFBFFRRR
FBBFFFBRLL"""
| all_bps = 'BFBBBBBLLR\nBBFFBBFRRL\nFBFBFFFRRL\nBBFFFBFRRL\nBFFBFBFRLL\nFFBBBFBLRL\nBFFFBFFLLR\nFBFFFFBLRR\nFBFFBBBRRR\nBFFBFFFLLR\nBFFFFFBLLL\nFFBBFFBLRR\nBFFFFFBRLR\nFBFBFBFLLL\nFFBFBFFLLL\nBBFFFFFLLL\nFFFBBBFLLL\nBBFFBFBLLR\nFFBFBFBRRR\nBFFBFFFRRR\nBBFFBFBRLR\nFFFBFBFLRL\nBBFFBBBLRR\nFBBFFFFLLR\nBBBFBBFLLL\nBFFFFBBRLL\nFBBFBFBRRL\nFFBBBFFRRR\nBBFFFFBRRR\nFBBBBFFLLR\nBFFFFFBLRR\nFFBBFBFLLR\nBFFBFBBLLL\nBBFBBBBLLL\nFBFBBBFRLL\nFFBFFFBLRL\nFFFFBBBLRL\nBBBBFBFRRR\nFFBBFBBRLL\nFFFBBBBRRL\nFFBFFFBRLR\nBFBFBFBLLL\nFFFBFFBLLL\nBBFBFBBLRL\nBBBBBFFLLL\nFBBBBFFRRR\nFBFFFFBLLL\nFFFFBBBRRL\nFBFBBBFRRR\nFBBFFBFLRL\nBFBFFBFLLR\nFFBBBFBLLL\nBFBFFFFLLL\nBBBFFFFLLL\nBFBBFBFRLR\nBFBBBBFLRL\nBBBFBFBLRL\nBFFFBFBLRL\nBFBBBBBRLL\nFBBBFFBRLL\nBFBFFBBRRL\nBFFBBBFLLR\nBFFBFFBRRR\nFBFBFBFRRL\nFBFBFBFLRL\nBBBFFFBRRR\nFBFFBBFRRR\nFFBBFFFRLL\nBFBFBBBLLR\nBFFFFBFLLR\nFFBBBBFRLR\nFFFBFFFRRR\nBFBBFFFRLL\nBBBFBFFLRL\nBFBBFBFLRR\nBBBBFBBLRL\nFBFBFBFLRR\nBBFBFBBLLL\nBFBBBFBLRL\nBFBBFBFLRL\nFFFBBFBLLL\nBBBFBFBLLR\nFBBBBBFLLR\nFFBBBFBRLL\nBBBBFBBRRL\nFBFFFBBRLL\nBBFBBFFRRL\nFBFFBFBLLL\nBFFBFBBRRL\nBFFFBFFRLR\nBBFBFBFRRR\nFBBFBFFRRR\nBBBFBFBLRR\nFFBFFBFRLR\nFFBFBBBLRL\nFFFFBBFRRL\nFFBBBFBRLR\nFBFBFBBLLL\nFBBBFBFRLL\nBBBBFBBLLR\nBFBFBBFRLR\nFBBFBBFLRR\nBBBBFBFLRL\nFBFBFBFRLL\nFFBFBFBLLR\nFBFFBBFRRL\nBFFFFFFRLR\nFFFFBFFRRL\nBBFFFBFLRR\nFBBFFBFRRL\nFFFFBFBLLL\nFFBBFFFRRL\nBBFBFFFRLL\nBFFFFBFRLR\nFBFBFBBRRL\nFBBFBBFRLR\nBFBFFFBRRL\nFFFBFFBRLR\nBFBFFBFLRL\nFBBFBFFRRL\nFFBFFFBLLL\nFBFFFBFRRR\nFBFFFBBRRL\nFBFFBFBRLL\nBFBFFFFRLL\nFFFBBBFLRR\nBBFFFFFLRR\nBFBBFBBLLR\nBFBFFBFLLL\nFBBBBFBLLR\nBFBBFFFLLR\nBFBBFFFRRL\nBFFBBFFLLR\nBBBFFFFRRL\nBBBFBBBLLR\nFFFBFBBRLL\nFFBFFBBLRR\nFFBFBBFLLL\nBBBFFBFRLL\nBBBFBFFLRR\nFBFBFFBRLR\nFBBFFBBLRL\nBBFBBFFLLR\nBBFBBFBRLR\nBFBFFBBRLR\nBBBBFFBRLL\nFFFBBBFRLL\nFBBFFFFRLR\nBFBBBBFRRR\nBBBBFFBLRR\nFBBBBBFLRR\nFBBBFFBLRL\nBFFBBBFRRR\nBBBBFBFRLL\nBFBBBFBLRR\nFFBFFFFLLL\nFBFFFFBRLL\nFFBFFBBRLR\nBFFBBFFLLL\nFFBFBFBLRL\nFFBFBFFRRR\nBBBFBBFLRR\nBBBFBBBLLL\nBFFFFFFLRL\nFBBBBBBRLR\nFFFBFBFLRR\nFFBBFFBRRL\nFBBFBBBRLR\nBBBFBBFLLR\nFFBFFBFLRR\nBFBBFBBRRL\nFBFFFBBLRL\nBFFBBFBLRL\nBBFFBFFLLL\nFBBBFBFRLR\nBBBBFFFRLL\nFFBFBFBLRR\nFBBFFFBRRL\nFFBBBFFLLL\nBBFFFBBLLR\nBFFFFBFRRL\nFBFFFFBRRL\nBFBBFFFRLR\nFFFBBBBLLL\nFBFBFBBRLR\nFFFBFBBRLR\nFBFBFFFLRR\nBFFFFFFRRR\nFFFFBBBRRR\nBBFBFFFRRL\nFFFBFBBLLL\nBFBBFBFLLR\nBBFBBBBRRL\nBBFFBBFRRR\nBBBFFBBLRL\nFBFBFFFLLR\nBFFFBBBRRR\nFFBFFFFLLR\nFBBBFBFLLL\nFBBBFBBLRR\nBBBFBFBRRR\nFBBBFBFRRL\nBBBBFFBRLR\nFBFBBBBLLR\nFFFFBBFRLR\nBBFBBBFLLL\nBBFBBBBLRR\nFFFFBFBRRR\nFBFFFBFLRR\nBFFFBBFLRR\nBBBFBFFLLR\nBFFBBBBRLR\nFBFBBFBLLR\nBFBBBFFLRR\nBFFBBFFRRR\nFFFBFFFRLL\nFFBFBBBRRR\nBBBFFFBLLR\nBBFFFFFLLR\nFBBBBFBLRR\nFBFBBFFRRL\nBFBFBFFRRL\nBFFFFBFRRR\nFFBFFBBLLL\nBFBFBFBRRR\nBFFFFFFLLR\nFFFBBFBRRL\nBFBBBFBRRL\nBBFFFBFRLL\nBFBBBBBLRL\nFBFBBFFLRR\nFFBBBFFRLR\nFBBBFBBRRR\nFFBBBFFRRL\nFFBBBBFLLR\nBBFBBFBRRL\nBBFBBBFRLL\nBBFFFFFLRL\nBBBFFFBLLL\nBBFFFFFRRR\nFFBFBBBLRR\nFFBBBFFLRR\nBFFBFBFRLR\nFFBBBFBRRR\nFBBBBFBLRL\nBBBFBBBRLL\nFBFBFFBRRL\nBFFFFBBRRL\nBBFFBBFRLR\nFFBFBFFRLR\nBFFFBFBRRR\nBBBFBBFRRL\nFFFBFFFLRL\nFBBFFBFRRR\nFFBBBBBLLL\nFFBFFBFLRL\nFBFBFBBLRR\nFFFBFFBRLL\nBBBFFFBRRL\nBFBFBBBRLL\nBBBFFFFLRR\nBBFFBFFLLR\nFBBFFBFLRR\nFBBBFFBLRR\nBFBFFBBLLL\nFBFFFBBRLR\nFBBFBBBLLR\nBFBBBBBRLR\nFBBBFFFLLL\nBFFFBBFLLL\nBFFFFBBRLR\nFBBFBFBRLL\nFBFFBFBLRL\nBBBFFFFRLL\nFBFFFFFRLL\nFBBBFBFLRL\nFBFBBFBRRL\nFFBFBFFLLR\nBBBFFBBLLL\nFFBFBBFLLR\nBBBFBBFRLL\nBFFBFBBLRR\nFBBFBBFRRL\nFBFFBFFLLL\nBFBBFBFLLL\nFFBBFFBRLL\nBFFFFFFLLL\nBFFFFFFRLL\nBFBFFFFLRR\nFFBBFFFLRR\nBBFFBBBRLR\nBFFFFBFLRR\nFFBFBFFLRR\nBBBBBFFLRL\nBBFBBBBRLR\nBFFBFFBRLL\nBFBFBBFLRL\nFBFBBFBLLL\nBFFBBFFRLR\nFFFFBFBRLR\nBFBFBFBRLL\nBFBBFFBLRR\nBBBBBFFRLL\nBBFFFBBRLL\nBFBFBBBLLL\nFBBBFFFLRR\nFBBBBBFRRL\nBFFBBFBRRL\nFFBBFFBLLL\nFBFFFBFRLL\nBBBFFFBRLL\nFFFBBFFLLL\nBBFBFBBLLR\nFFFBFFBLRL\nBFFBBBBLLL\nBBFFBFFLRR\nFFBBFBFLRR\nBBBBFBFRRL\nBBFBFBBRRR\nBBFFFFBLLR\nBBBBFFBLLR\nBBBFFBFLRR\nFFBFFBBLRL\nBBFBBBFRLR\nFBFFBFFLRL\nFFFFBFBLRL\nBFBFFFBLRL\nFBBBFBFLRR\nBFFFBBBLLL\nFBBBFFFRRR\nBFBFBFFLLR\nBFFBFBFLLR\nFFFBBBFRRL\nBBBFFBFLLR\nFFBFBFBLLL\nBFBBBFFRLR\nBBBFFBFRRL\nFBFBFFFRLR\nBFBFBBFRRL\nFBFFFFFLRR\nBFBFFBBLLR\nBBFBFBBRLR\nFBBBFFFLRL\nBBBBFBBRRR\nFFBBBBFLLL\nFBFFFBBLLR\nFFBBBBBRRR\nBFFFBBBLRR\nBBFBBBBRLL\nBBFBFBFLRR\nBFBBFFBLLR\nFBBFFBBRLL\nFBBBBFFRLL\nFBFBFFBLLR\nFFBFBBBRRL\nFFFBBFBRLL\nBFFBBFBLLR\nBBBBBFFRRL\nBFBBFFBRRL\nBFFBFFBRLR\nFFBFBBFRRL\nFFFFBBFLRL\nBBFFFFBLRL\nBFBFFFBRLL\nBFBFFFFRRR\nBBBFFBBRRL\nFFFFBBFLLL\nBBBFFFFLRL\nBBBFBFFLLL\nFBFBFFBRLL\nFBBFFFBLRL\nBFBFBFFLLL\nBBBFFFBLRR\nFBFBFBFRLR\nBFBFBFFLRL\nBFFFBBBRRL\nBFBFFBBRLL\nFFBFFFBRLL\nFFBFFBFLLR\nFFFBFFBRRL\nFFBBFFFLRL\nBFBFFFFRRL\nFBFFFFFRRR\nBBFBBFBLLR\nFFBFBFBRLR\nBFFFBFFRRR\nFBBBBFBLLL\nBBFFBBBRRR\nBBFBBBBRRR\nBBBFBBBLRR\nBBFBBFBRLL\nBFBFBFFLRR\nFBFFFBFLRL\nFFFFBFFRRR\nBFFBFFFLRR\nFBFFBBBRLL\nBFFFBFBLLL\nFBBFBFBLLR\nFFBFFBBRRR\nBFBFBBFLRR\nBBFFFFBLLL\nFBBFFFFRRR\nFBFBBBFRRL\nFBBFFFBLLR\nFBFBBFBRLR\nBBFFBBBLLR\nFFFBBFFLRL\nBBFFBFBRRR\nBFBFFFFLRL\nFFFFBFBRLL\nFBFFFBFRRL\nBBBFBBBLRL\nFFBBBFFRLL\nBBFBFFBRRL\nBFFBFFBLLL\nBBFBBFBRRR\nFBBFBBFLLR\nBFFFFFFLRR\nFBBBBBBRRR\nBBFBBBFRRL\nFFFBBBFLLR\nFBBBBFFLRL\nFBFFBFFRLL\nBFBFBFBRLR\nFBBBFFFRLL\nBBFFFBBRRR\nBBFBFBBLRR\nBFFFFFBRLL\nFBFBFFFLLL\nFBFFBFBLLR\nBFFBFFBRRL\nBFBBFFFLRR\nBFBBBFBLLR\nFFFBBBBRLR\nFFBFFBFRRL\nFFBBBFBLLR\nBBFBFFBRRR\nFFBBBBBRLR\nBBFFBBBLLL\nBFBBFFBLLL\nBFBFBBFRRR\nBBBBFFFLLL\nFBBFFBBRRL\nFFBBBFBRRL\nBFBFBBBRRR\nFBFBBFFLLL\nFFBBFFFLLR\nFBBBBBFLLL\nFFBFBFFLRL\nFFBFFBFRRR\nFBBBFBBRLR\nBFFFFBFLRL\nFFFBFFFLLR\nBBFBFFBLLR\nFFBBFFBLRL\nFFFBFBBLRL\nBFFFBBBRLR\nBBFFFFBRRL\nFBBFFBBLRR\nFBFFFFFLRL\nBBFFBFFRLR\nBBFBFFFRLR\nFFFBFBFRLR\nBFFFBBFRRL\nBBBFFBFLLL\nBBFBBBBLRL\nBFFFFFBLLR\nBFFFFBBLLR\nBBBFFBFRRR\nBBFFFFFRRL\nBBFFFFBRLR\nFFBBBFFLRL\nBFFFBBBRLL\nBFFFBBFRLL\nFBFBBBFRLR\nBBFBFBFRRL\nFBFFBFBRLR\nFBFFBFFRRR\nFBFFFBBLRR\nBFFFBBFLRL\nFBFBFFBLRL\nFBBBBBBRRL\nBFFFBFBRLR\nFBBBBFBRLL\nBBFFBBFLLR\nBBFBBFFLRR\nFBFFFBFLLR\nFBBBFBBLLL\nFFBFFFBLRR\nBBFBFFBLRR\nFFBFFBBRLL\nBFFBBFFRLL\nFBFFFFBRRR\nFFFBFBBRRL\nBBBBFBFLLR\nBBFBFFFLRL\nBFBFFFFRLR\nBBFBFFFRRR\nBBBFBBBRRL\nBFFBBBBLRR\nBFFFBBBLRL\nBBFFFBBRLR\nFBBBFFBRLR\nFBBBFFBLLL\nFBBBBBBLRL\nBBBFFFBLRL\nFBFBFFFLRL\nBFBFFBFRLL\nBBFFFFBRLL\nBBFFFFFRLL\nFFFBFFFRRL\nBBFFBBFLRR\nBBBBFFFRRL\nBFFBBBBLLR\nBBBBFFFRLR\nBBBFFFBRLR\nFBBFFBBRLR\nBFFBBFBLLL\nBBBFBBFLRL\nBFBFBBFLLR\nBBFBBFFLRL\nBFFBBBFRRL\nFFFFBBFLRR\nFBFFBBBLLR\nBFBFBFBLLR\nFBBBFFBRRR\nFBBBBBFRLR\nBBFBFFBRLR\nBBFFBFFRLL\nFFFBFFBLLR\nBBFFBFBLRR\nFBFFFBBRRR\nBFFBBBBRRR\nFBFFBBBRRL\nBBFBFBFLLR\nFBFBBFFLRL\nBBBBFFFRRR\nBBFBFFFLLL\nBFFFBFBLLR\nFBBBBFFLRR\nFBFFBBFLLL\nFFFFBFBRRL\nBBFBFBFLLL\nBFBBFFBLRL\nBFFFBFBLRR\nBBBBFFBRRR\nFBFBBFBRRR\nFBBFBFBRLR\nFBBFBFFLRR\nFBFBBBBLRR\nFBBFBFFRLR\nFBBBBBFLRL\nFBBFBFFRLL\nFFBBFFBRRR\nBFBFBFBLRR\nFBBFBBBLRL\nFBBBFBFRRR\nBFFBFBFRRL\nFBBFFFFLRL\nBFBBBBFRLR\nFFBFBBBRLL\nBFFBBBBRRL\nBFBBFBBLLL\nFBFBFFFRRR\nBFBFBFBLRL\nFBBFFBFLLR\nFFFBFBBRRR\nFBBBBFFLLL\nFBFBBBBLRL\nFBBFBFBLRL\nFFBBFBBRRR\nFBFBFFBLRR\nFBFBFBBLLR\nFFFBFBFRLL\nFFFFBBFRRR\nBFBBBBBLLL\nBBFBBBBLLR\nFBBFFFFRRL\nFBBFBFBLLL\nBFFFBBFLLR\nFBBBFFBLLR\nFFBFFBFLLL\nBBBFFBBLLR\nBFBFFFFLLR\nFBFBBBFLRR\nFFBBBBFRRL\nFFFFBBBLRR\nFFBFFFFRRL\nBFBBFFFLRL\nBBBFBFBLLL\nFBFBBFBLRR\nBBFBBFBLLL\nBFFBFBBRLR\nBFBBFBBRRR\nFFBBFBFRLL\nBFFBFBFLLL\nBFFBBFBLRR\nFBBBBFBRRL\nBFBFBBBLRR\nFBBBBBBLLL\nBFFFBBBLLR\nBBFBFFFLLR\nBBBFFBBRLL\nBFFBBBFLRR\nBFFBFBFRRR\nBBBBBFFRLR\nBFFBFFFRLR\nFBFFFFFLLL\nBFFFBFBRLL\nFBBFBBFLLL\nFBBFBFBRRR\nFBFFBBFLLR\nFBBBFBFLLR\nFFFBFFFLRR\nFFBBBBFRRR\nBBBBFBFLRR\nFBFBFFBRRR\nBFFBFFBLLR\nFFBBFBBRLR\nFBFBFBBRRR\nFFBBBBBLRL\nFBBBBBFRRR\nFFFBFBFRRL\nFFBFBFBRRL\nBFBBBFBRLR\nBBBFBFFRRR\nBFFBBFBRLR\nBFFBBBBRLL\nFBBBBFFRRL\nBBBFBBBRLR\nBFFFFFFRRL\nFFFBBFFLRR\nBBFBFFBLRL\nBFFBFBFLRR\nBBBFFBBLRR\nBFBFFBFRRR\nBBBBFFBLLL\nFBFFBBBLRR\nBBFFBBFLLL\nFBFBBBBRRR\nBBFFBFBLLL\nBBBBFFFLRR\nFBFFBBBRLR\nBFBFFFBLRR\nBBFBBFFLLL\nBFFBBFFRRL\nBFFFBFFRRL\nBBFFFBBLRR\nFFBFFFFLRL\nFFBFBBFRLL\nFBFBFFFRLL\nBBFFFBFRLR\nFFFBBFBLRR\nBFBBBFBLLL\nBBFBFBFRLL\nBFBFBBFRLL\nBFFFFFBRRL\nFFBFBBBRLR\nBFBBFFBRLR\nBFBFBFFRLR\nFBBBBBBLRR\nFFBBBBFLRL\nFFFFBFBLRR\nFFBFFFBRRR\nFFBFBBFRLR\nBBBFFBFLRL\nFBBBBFFRLR\nBFFBBFBRLL\nBFFBBBFRLR\nFFFBFFBRRR\nBBBFBBBRRR\nFBFFBFFRRL\nFBFFFBFLLL\nBFBBBFFRRL\nBBFBFBBRLL\nBBFBFBBRRL\nFFFBFBFRRR\nBFBBFBBLRR\nFFFBBBFRRR\nBFFBFBBLRL\nBFFBFFBLRR\nBFBBBFFRRR\nFFFBBBFLRL\nFFBBFBFRRR\nFFBFBFBRLL\nFFBFFFBLLR\nFBBBBBBRLL\nFFFFBFBLLR\nFFBBFFFRRR\nFFFBFFFLLL\nFFBBFBBLLR\nFFBBBBFLRR\nFBBFFBBLLL\nBFBBFBBRLR\nFFFBFBBLLR\nBBFFBFBLRL\nFFBFBBFRRR\nBBBBFBBRLR\nBBBFBBFRLR\nBBFFBFFRRR\nFFBBBBBLLR\nFBFFBFBLRR\nFBBBBFBRLR\nFFFFBBFLLR\nBFBFBBFLLL\nFBBFBFBLRR\nFBBFFBFRLL\nBBFFFFFRLR\nFFBBFBFLRL\nBFBFBBBRLR\nFBBFBBFRRR\nFBFBFBBLRL\nBBBFFBBRRR\nFBBFFBBRRR\nFBFFFFBRLR\nFBBFBBFLRL\nFFFBBFBRRR\nFBFBBBBRLR\nFBBFFBBLLR\nFFFBBBBRRR\nBBBBBFFLLR\nFFFFBBBLLL\nBFFBBBFRLL\nFBFBBFBLRL\nBBBBFBFRLR\nBBFBFFBLLL\nBFBFFBFLRR\nBFFFFFBLRL\nBBBFBBFRRR\nFFBBBBBLRR\nFBFFFFFLLR\nFBFBBFFRLL\nBFBBBBBRRL\nFBFBFBBRLL\nFBBFBBBRRL\nFBFFBBBLRL\nBFFFBFFLLL\nBFBBBBBRRR\nFFFBBFFRRR\nBBFBBBFLRL\nFFFFBBFRLL\nFBFFFFFRLR\nFFFFBBBRLR\nFBFFBBFRLR\nFFFFBBBRLL\nBBFFBBBLRL\nFFBFBBFLRR\nBFBBBBBLRR\nBFFFFBBLLL\nFBFBBBBRRL\nBBBFBFFRRL\nBFBBFBBLRL\nBFBBBBFRRL\nFBFFFBBLLL\nFFBBFBBLRL\nBBFBFFBRLL\nBBBFFFFRRR\nFFFBBBBLRR\nFFFBBFBLRL\nFFFBBBBLLR\nBFBFBBBRRL\nBBBBBFFLRR\nBBBBFBBLLL\nBBBBFBBLRR\nFFFBBBFRLR\nFBBBFFFLLR\nBFFFBFBRRL\nBBFFFBFLLR\nBFBBFBFRLL\nBFBBBFFLRL\nFFBFFBBRRL\nFBFBBFFRLR\nBFFFFFBRRR\nFBFFFFBLLR\nFBBFBFFLLR\nFBBBFFFRLR\nFBFBFBFLLR\nFFFBBFBLLR\nBFBFFBFRRL\nFFFBBFBRLR\nFFBBFBBLRR\nFBBBFBBLLR\nBBBFFFFLLR\nBBBBFBFLLL\nBBFFFBFLLL\nBFFFBFFLRL\nBBFBBFFRLR\nBBFFBBFLRL\nFBBBBFBRRR\nFBBFFBFLLL\nFFFBFFBLRR\nFFBBFFFRLR\nFBBFFFBRLR\nBBBFBFBRLL\nBFBBFFFLLL\nFFFBBFFRLL\nBBFFBFBRLL\nFFBBBBBRRL\nFBFFBBBLLL\nFBBFFFBRRR\nBFFFBFFRLL\nFFBBBFFLLR\nFBBFBBFRLL\nFBBFFFFLRR\nFBBBBBFRLL\nBBBFFBBRLR\nFBFFBBFLRL\nFBBFFFBLLL\nBFBBBFFRLL\nFFFBBFFRLR\nBFBFFFBLLL\nFFFFBBBLLR\nBFFBFFFLLL\nBFBBFFBRRR\nBFFBFBBLLR\nFFBFFBFRLL\nFFFBBFFLLR\nFBFFFFFRRL\nBFFBBFFLRR\nFFBBFFBLLR\nFBBBFFBRRL\nFBBBFBBLRL\nBBFFBFFLRL\nBBBBFFBRRL\nBFBFFBBLRL\nBFBBFBFRRR\nFFFBBBBRLL\nFBBFBBBRRR\nBBBBFFFLRL\nFBFFBFBRRR\nBBBBFFFLLR\nFBBFFBFRLR\nFFFBBBBLRL\nBBFBBFBLRL\nBFBBBBFLLR\nBBBFBFBRRL\nBFBBBBFLLL\nBFBFFFBRRR\nFFBBFFBRLR\nFBBBFFFRRL\nBFFFFBBRRR\nFBFBBFBRLL\nBFBBFFBRLL\nFBBFBFFLRL\nBFFBBBBLRL\nBFFBFBFLRL\nFBBBFBBRRL\nBFBBBBFLRR\nBFBFFBBRRR\nBFFFBBFRLR\nBFFBFFBLRL\nBFFBBFBRRR\nBBFFBBBRRL\nBBBBFBBRLL\nFBBFBBBLRR\nFFBFBFFRLL\nFFBFFFFRRR\nBFFBBFFLRL\nBFBBFBBRLL\nBFBFFBBLRR\nFBFBFBFRRR\nBBFFFBFRRR\nBBFBBFFRRR\nFFBFBBBLLR\nFFFBFBFLLL\nBBFFFBBLLL\nFFBBFBBLLL\nBFBBFFFRRR\nBFBFBBBLRL\nFBFBBBFLRL\nBFBFBFBRRL\nFFFBFBFLLR\nBBFFFFBLRR\nBBFBFBFRLR\nFFBBFBFLLL\nBFBBBFBRLL\nBBBFFBFRLR\nBFFFFBFLLL\nFFBBBBFRLL\nBBFBBFFRLL\nBFFFBFFLRR\nBBFBBBFLLR\nFFBFBBFLRL\nBBBBFFBLRL\nBFBBBFBRRR\nFBBFBFFLLL\nFBFFBFFRLR\nBFFBFFFLRL\nFBFFBFFLLR\nFBFBBBBRLL\nBBFFFBFLRL\nBBFBBFBLRR\nBFFFFBBLRL\nBBFBFBFLRL\nFBBFBBBRLL\nFBBFFFFRLL\nFFBFBBBLLL\nFFBFFBBLLR\nBFBBBFFLLR\nBBBFBFFRLR\nBFFBFFFRRL\nBBFFBBBRLL\nBBFFBBFRLL\nFBBBBBBLLR\nBFFBFBBRRR\nBBFFFBBRRL\nFFBFFFFRLL\nFFFBFBBLRR\nBBFFBFBRRL\nBBFFFBBLRL\nFBFFFFBLRL\nBFFFFBFRLL\nBFFBBBFLLL\nBFBBFBFRRL\nFBBFFFBLRR\nFFBFFFFRLR\nFBBFFFFLLL\nFBFBBFFRRR\nFBFBBFFLLR\nFFBFFFBRRL\nBFBBBBFRLL\nBFFBBBFLRL\nFBFFBFBRRL\nFFBFFFFLRR\nFBBBFBBRLL\nBBFBBBFRRR\nBFFBFFFRLL\nFFFBBFFRRL\nBFBFFFBLLR\nFBFFFBFRLR\nFBFBBBFLLL\nFFBBFBFRRL\nBBBFBFFRLL\nFBFFBFFLRR\nBBFBBBFLRR\nFFBBBFBLRR\nFFFBFFFRLR\nFBFBFFBLLL\nBFBBBFFLLL\nBFFFFBBLRR\nFBFBBBFLLR\nFBFFBBFLRR\nFFBBFBBRRL\nBBFBFFFLRR\nBBFFBFFRRL\nFFBBFFFLLL\nFFBFBFFRRL\nBBBFBFBRLR\nBFBFFFBRLR\nFBFBBBBLLL\nFFBBBBBRLL\nFBBFBBBLLL\nBFFFBBFRRR\nBFBFFBFRLR\nBBBFFFFRLR\nFBFFBBFRLL\nFFBBFBFRLR\nBFFBFBBRLL\nBFBFBFFRRR\nFBBFFFBRLL' |
def Setup(Settings,DefaultModel):
# set1-test_of_models_against_datasets/models_30m_640px.py
Settings["experiment_name"] = "set1c_Models_Test_30m_640px"
Settings["graph_histories"] = ['together', [0,1], [1,2], [0,2]]
n=0
# 5556x_minlen30_640px 5556x_minlen20_640px 5556x_reslen20_299px 5556x_reslen30_299px
Settings["models"][n]["dataset_name"] = "5556x_minlen30_640px"
Settings["models"][n]["dump_file_override"] = 'SegmentsData_marked_R100_4Tables.dump'
Settings["models"][n]["pixels"] = 640
Settings["models"][n]["model_type"] = 'img_osm_mix'
Settings["models"][n]["unique_id"] = 'mix'
Settings["models"][n]["top_repeat_FC_block"] = 2
Settings["models"][n]["epochs"] = 800
# c
Settings["models"][n]["loss_func"] = 'mean_absolute_error'
Settings["models"][n]["metrics"] = ['mean_squared_error']
Settings["models"].append(DefaultModel.copy())
n=1
Settings["models"][n]["dataset_pointer"] = -1 # 0 - reuse the first dataset
Settings["models"][n]["dataset_name"] = "5556x_minlen30_640px"
Settings["models"][n]["dump_file_override"] = 'SegmentsData_marked_R100_4Tables.dump'
Settings["models"][n]["pixels"] = 640
Settings["models"][n]["model_type"] = 'osm_only'
Settings["models"][n]["unique_id"] = 'osm_only'
Settings["models"][n]["top_repeat_FC_block"] = 2
Settings["models"][n]["epochs"] = 800
# c
Settings["models"][n]["loss_func"] = 'mean_absolute_error'
Settings["models"][n]["metrics"] = ['mean_squared_error']
Settings["models"].append(DefaultModel.copy())
n=2
Settings["models"][n]["dataset_pointer"] = -1 # 0 - reuse the first dataset
Settings["models"][n]["dataset_name"] = "5556x_minlen30_640px"
Settings["models"][n]["dump_file_override"] = 'SegmentsData_marked_R100_4Tables.dump'
Settings["models"][n]["pixels"] = 640
Settings["models"][n]["model_type"] = 'simple_cnn_with_top'
Settings["models"][n]["unique_id"] = 'img_only'
Settings["models"][n]["top_repeat_FC_block"] = 2
Settings["models"][n]["epochs"] = 800
# c
Settings["models"][n]["loss_func"] = 'mean_absolute_error'
Settings["models"][n]["metrics"] = ['mean_squared_error']
return Settings
| def setup(Settings, DefaultModel):
Settings['experiment_name'] = 'set1c_Models_Test_30m_640px'
Settings['graph_histories'] = ['together', [0, 1], [1, 2], [0, 2]]
n = 0
Settings['models'][n]['dataset_name'] = '5556x_minlen30_640px'
Settings['models'][n]['dump_file_override'] = 'SegmentsData_marked_R100_4Tables.dump'
Settings['models'][n]['pixels'] = 640
Settings['models'][n]['model_type'] = 'img_osm_mix'
Settings['models'][n]['unique_id'] = 'mix'
Settings['models'][n]['top_repeat_FC_block'] = 2
Settings['models'][n]['epochs'] = 800
Settings['models'][n]['loss_func'] = 'mean_absolute_error'
Settings['models'][n]['metrics'] = ['mean_squared_error']
Settings['models'].append(DefaultModel.copy())
n = 1
Settings['models'][n]['dataset_pointer'] = -1
Settings['models'][n]['dataset_name'] = '5556x_minlen30_640px'
Settings['models'][n]['dump_file_override'] = 'SegmentsData_marked_R100_4Tables.dump'
Settings['models'][n]['pixels'] = 640
Settings['models'][n]['model_type'] = 'osm_only'
Settings['models'][n]['unique_id'] = 'osm_only'
Settings['models'][n]['top_repeat_FC_block'] = 2
Settings['models'][n]['epochs'] = 800
Settings['models'][n]['loss_func'] = 'mean_absolute_error'
Settings['models'][n]['metrics'] = ['mean_squared_error']
Settings['models'].append(DefaultModel.copy())
n = 2
Settings['models'][n]['dataset_pointer'] = -1
Settings['models'][n]['dataset_name'] = '5556x_minlen30_640px'
Settings['models'][n]['dump_file_override'] = 'SegmentsData_marked_R100_4Tables.dump'
Settings['models'][n]['pixels'] = 640
Settings['models'][n]['model_type'] = 'simple_cnn_with_top'
Settings['models'][n]['unique_id'] = 'img_only'
Settings['models'][n]['top_repeat_FC_block'] = 2
Settings['models'][n]['epochs'] = 800
Settings['models'][n]['loss_func'] = 'mean_absolute_error'
Settings['models'][n]['metrics'] = ['mean_squared_error']
return Settings |
#!/usr/bin/env python3
DEV = "/dev/input/event19"
CONTROLS = {
144: [
"SELECT",
"START",
"CROSS",
"CIRCLE",
"SQUARE",
"TRIANGLE",
"UP",
"RIGHT",
"DOWN",
"LEFT",
],
96: [
"CENTER",
]
}
def trial(n: int) -> None:
for size in CONTROLS.keys():
for control in CONTROLS[size]:
print(f"PRESS {control}")
with open(DEV, "rb") as f:
sequence = f.read(size)
print(f"READ {size} BYTES")
with open(f"./samples/{control}_t{n}.hex", "wb") as f:
f.write(sequence)
print(f"WRITTEN TO ./samples/{control}_t{n}.hex")
print()
def main():
for i in range(10):
trial(i)
if __name__ == "__main__":
main()
| dev = '/dev/input/event19'
controls = {144: ['SELECT', 'START', 'CROSS', 'CIRCLE', 'SQUARE', 'TRIANGLE', 'UP', 'RIGHT', 'DOWN', 'LEFT'], 96: ['CENTER']}
def trial(n: int) -> None:
for size in CONTROLS.keys():
for control in CONTROLS[size]:
print(f'PRESS {control}')
with open(DEV, 'rb') as f:
sequence = f.read(size)
print(f'READ {size} BYTES')
with open(f'./samples/{control}_t{n}.hex', 'wb') as f:
f.write(sequence)
print(f'WRITTEN TO ./samples/{control}_t{n}.hex')
print()
def main():
for i in range(10):
trial(i)
if __name__ == '__main__':
main() |
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
# class Solution(object):
# def swapPairs(self, head):
# """
# :type head: ListNode
# :rtype: ListNode
# """
class Solution(object):
# def swapPairs(self, head):
# current = last = last2 = head
# while current is not None:
# nex = current.next
# if current == last.next:
# last.next = nex
# current.next = last
# if last == head:
# head = current
# else:
# last2.next = current
# last2 = last
# last = nex
# current = nex
# return head
def swapPairs(self, head):
dummyHead = ListNode(-1)
dummyHead.next = head
prev, p = dummyHead, head
while p != None and p.next != None:
q, r = p.next, p.next.next
prev.next = q
q.next = p
p.next = r
prev = p
p = r
return dummyHead.next
| class Solution(object):
def swap_pairs(self, head):
dummy_head = list_node(-1)
dummyHead.next = head
(prev, p) = (dummyHead, head)
while p != None and p.next != None:
(q, r) = (p.next, p.next.next)
prev.next = q
q.next = p
p.next = r
prev = p
p = r
return dummyHead.next |
# Demo Python Functions - Keyword Arguments
'''
Keyword Arguments
You can also send arguments with the key = value syntax.
This way the order of the arguments does not matter.
'''
# Example:
def my_function(child3, child2, child1):
print("The youngest child is " + child3)
my_function(child1 = "Emil", child2 = "Tobias", child3 = "Linus")
# The phrase Keyword Arguments are often shortened to kwargs in Python documentations.
| """
Keyword Arguments
You can also send arguments with the key = value syntax.
This way the order of the arguments does not matter.
"""
def my_function(child3, child2, child1):
print('The youngest child is ' + child3)
my_function(child1='Emil', child2='Tobias', child3='Linus') |
N, L = input().split()
N = int(N)
L = int(L)
#print(N, L)
s_list = input().split()
citations = [ int(s) for s in s_list]
def findHIndex(citations):
citations.sort(reverse=True)
N = len(citations)
res = N
for i in range(N):
if citations[i]<i+1:
res = i
break
return res
k = findHIndex(citations)
while L > 0 and k>=0:
citations[k] += 1
L -= 1
k -= 1
k = findHIndex(citations)
print(k)
| (n, l) = input().split()
n = int(N)
l = int(L)
s_list = input().split()
citations = [int(s) for s in s_list]
def find_h_index(citations):
citations.sort(reverse=True)
n = len(citations)
res = N
for i in range(N):
if citations[i] < i + 1:
res = i
break
return res
k = find_h_index(citations)
while L > 0 and k >= 0:
citations[k] += 1
l -= 1
k -= 1
k = find_h_index(citations)
print(k) |
#######################################
## ADD SOME COLOR
# pinched and tweaked from https://github.com/impshum/Multi-Quote/blob/master/run.py
class color:
white, cyan, blue, red, green, yellow, magenta, black, gray, bold = '\033[0m', '\033[96m','\033[94m', '\033[91m','\033[92m','\033[93m','\033[95m', '\033[30m', '\033[30m', "\033[1m" | class Color:
(white, cyan, blue, red, green, yellow, magenta, black, gray, bold) = ('\x1b[0m', '\x1b[96m', '\x1b[94m', '\x1b[91m', '\x1b[92m', '\x1b[93m', '\x1b[95m', '\x1b[30m', '\x1b[30m', '\x1b[1m') |
def lex_lambda_handler(event, context):
intent_name = event['currentIntent']['name']
parameters = event['currentIntent']['slots']
attributes = event['sessionAttributes'] if event['sessionAttributes'] is not None else {}
response = init_contact(intent_name, parameters, attributes)
return response
def init_contact(intent_name, parameters, attributes):
first_name = parameters.get('FirstName')
last_name = parameters.get('LastName')
prev_first_name = attributes.get('FirstName')
prev_last_name = attributes.get('LastName')
if first_name is None and prev_first_name is not None:
parameters['FirstName'] = prev_first_name
if last_name is None and prev_last_name is not None:
parameters['LastName'] = prev_last_name
if parameters['FirstName'] is not None and parameters['LastName'] is not None:
response = intent_delegation(intent_name, parameters, attributes)
elif parameters['FirstName'] is None:
response = intent_elicitation(intent_name, parameters, attributes, 'FirstName')
elif parameters['LastName'] is None:
response = intent_elicitation(intent_name, parameters, attributes, 'LastName')
return response
#####
# lex response helper functions
#####
def intent_success(intent_name, parameters, attributes):
return {
'sessionAttributes': attributes,
'dialogAction': {
'type': 'Close',
'fulfillmentState': 'Fulfilled'
}
}
def intent_failure(intent_name, parameters, attributes, message):
return {
'dialogAction': {
'type': 'Close',
'fulfillmentState': 'Failed',
'message': {
'contentType': 'PlainText',
'content': message
}
}
}
def intent_delegation(intent_name, parameters, attributes):
return {
'sessionAttributes': attributes,
'dialogAction': {
'type': 'Delegate',
'slots': parameters,
}
}
def intent_elicitation(intent_name, parameters, attributes, parameter_name):
return {
'sessionAttributes': attributes,
'dialogAction': {
'type': 'ElicitSlot',
'intentName': intent_name,
'slots': parameters,
'slotToElicit': parameter_name
}
}
| def lex_lambda_handler(event, context):
intent_name = event['currentIntent']['name']
parameters = event['currentIntent']['slots']
attributes = event['sessionAttributes'] if event['sessionAttributes'] is not None else {}
response = init_contact(intent_name, parameters, attributes)
return response
def init_contact(intent_name, parameters, attributes):
first_name = parameters.get('FirstName')
last_name = parameters.get('LastName')
prev_first_name = attributes.get('FirstName')
prev_last_name = attributes.get('LastName')
if first_name is None and prev_first_name is not None:
parameters['FirstName'] = prev_first_name
if last_name is None and prev_last_name is not None:
parameters['LastName'] = prev_last_name
if parameters['FirstName'] is not None and parameters['LastName'] is not None:
response = intent_delegation(intent_name, parameters, attributes)
elif parameters['FirstName'] is None:
response = intent_elicitation(intent_name, parameters, attributes, 'FirstName')
elif parameters['LastName'] is None:
response = intent_elicitation(intent_name, parameters, attributes, 'LastName')
return response
def intent_success(intent_name, parameters, attributes):
return {'sessionAttributes': attributes, 'dialogAction': {'type': 'Close', 'fulfillmentState': 'Fulfilled'}}
def intent_failure(intent_name, parameters, attributes, message):
return {'dialogAction': {'type': 'Close', 'fulfillmentState': 'Failed', 'message': {'contentType': 'PlainText', 'content': message}}}
def intent_delegation(intent_name, parameters, attributes):
return {'sessionAttributes': attributes, 'dialogAction': {'type': 'Delegate', 'slots': parameters}}
def intent_elicitation(intent_name, parameters, attributes, parameter_name):
return {'sessionAttributes': attributes, 'dialogAction': {'type': 'ElicitSlot', 'intentName': intent_name, 'slots': parameters, 'slotToElicit': parameter_name}} |
# Copyright (C) 2018 Henrique Pereira Coutada Miranda
# All rights reserved.
#
# This file is part of yambopy
#
#
"""
submodule with classes to read BSE optical absorption spectra claculations
and information about the excitonic states
"""
| """
submodule with classes to read BSE optical absorption spectra claculations
and information about the excitonic states
""" |
BLACK = (0, 0, 0)
GREY = (142, 142, 142)
RED = (200, 72, 72)
ORANGE = (198, 108, 58)
BROWN = (180, 122, 48)
YELLOW = (162, 162, 42)
GREEN = (72, 160, 72)
BLUE = (66, 72, 200)
| black = (0, 0, 0)
grey = (142, 142, 142)
red = (200, 72, 72)
orange = (198, 108, 58)
brown = (180, 122, 48)
yellow = (162, 162, 42)
green = (72, 160, 72)
blue = (66, 72, 200) |
#!/usr/bin/env python
def square_gen(is_true):
i = 0
while True:
yield i**2
i += 1
g = square_gen(False)
print(next(g))
print(next(g))
print(next(g))
| def square_gen(is_true):
i = 0
while True:
yield (i ** 2)
i += 1
g = square_gen(False)
print(next(g))
print(next(g))
print(next(g)) |
class A:
def __bool__(self):
print('__bool__')
return True
def __len__(self):
print('__len__')
return 1
class B:
def __len__(self):
print('__len__')
return 0
print(bool(A()))
print(len(A()))
print(bool(B()))
print(len(B()))
| class A:
def __bool__(self):
print('__bool__')
return True
def __len__(self):
print('__len__')
return 1
class B:
def __len__(self):
print('__len__')
return 0
print(bool(a()))
print(len(a()))
print(bool(b()))
print(len(b())) |
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
c = 0
class Solution:
def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode:
global c
return_head = head
prev = ListNode(0)
prev.next = return_head
c = 0
print(n)
while(head):
temp = head
while(c != n):
print("UP TOP")
temp = temp.next
if temp:
c += 1
print(temp.val,c)
# input()
else:
c += 1
print("NONE DA")
break
# if temp == None:
# if n == 1:
# print("INGA DA baade")
# prev = head
# prev = prev.next
# return prev
# else:
# prev.next = prev.next.next
# return return_head
if temp == None:
# fake_head = return_head
# c = 0
# while(c !=n):
# if fake_head == None:
# break
# else:
# c += 1
# fake_head = fake_head.next
# if c == n:
# if return_head.next == None:
# prev = head
# prev = prev.next
# return prev
# else:
# prev.next = prev.next.next
# head1 = prev.next
# return head1
prev.next = prev.next.next
head1 = prev.next
return head1
else:
print("Down here")
c = 0
prev = head
head = head.next
print(prev.val)
print(head.val)
t1 = ListNode(1)
t2 = ListNode(2)
# t3 = ListNode(9)
t1.next = t2
# t2.next = t3
l1 = t1
s = Solution()
ans = s.removeNthFromEnd(l1,2)
while(ans):
print(ans.val)
ans = ans.next | class Listnode:
def __init__(self, x):
self.val = x
self.next = None
c = 0
class Solution:
def remove_nth_from_end(self, head: ListNode, n: int) -> ListNode:
global c
return_head = head
prev = list_node(0)
prev.next = return_head
c = 0
print(n)
while head:
temp = head
while c != n:
print('UP TOP')
temp = temp.next
if temp:
c += 1
print(temp.val, c)
else:
c += 1
print('NONE DA')
break
if temp == None:
prev.next = prev.next.next
head1 = prev.next
return head1
else:
print('Down here')
c = 0
prev = head
head = head.next
print(prev.val)
print(head.val)
t1 = list_node(1)
t2 = list_node(2)
t1.next = t2
l1 = t1
s = solution()
ans = s.removeNthFromEnd(l1, 2)
while ans:
print(ans.val)
ans = ans.next |
d1 = {1:'Sugandh', 2:'Divya', 3:'Mintoo'}
print("deleting a key from the dictionary...")
del d1[3]
print(d1)
print("deleting the same key again...")
del d1[3]
print(d1)
| d1 = {1: 'Sugandh', 2: 'Divya', 3: 'Mintoo'}
print('deleting a key from the dictionary...')
del d1[3]
print(d1)
print('deleting the same key again...')
del d1[3]
print(d1) |
class ObtenedorDeEntrada:
def getEntrada(self):
f = open ('Entrada.txt','r')
entrada = f.read()
print(entrada)
f.close()
return entrada
#input("Introduce el texto\n") | class Obtenedordeentrada:
def get_entrada(self):
f = open('Entrada.txt', 'r')
entrada = f.read()
print(entrada)
f.close()
return entrada |
{
"name": "train-nn",
"s3_path": "s3://tht-spark/executables/SDG_Data_Technologies_Model.py",
"executors": 2,
}
| {'name': 'train-nn', 's3_path': 's3://tht-spark/executables/SDG_Data_Technologies_Model.py', 'executors': 2} |
# parameters of the system
# data files
temp = np.load('./data/temp_norm.npy')
y = np.load('./data/total_load_norm.npy')
load_meters = np.load('./data/load_meters_norm.npy')
# system parameters
T, num_meters = load_meters.shape
num_samples = T
# training parameters
hist_samples = 24
train_samples = int(0.8 * num_samples)
test_samples_a = int(0.1 * num_samples)
use_mse = False
if use_mse:
loss_f = 'mean_squared_error'
loss = 'mse'
else:
loss_f = 'mean_absolute_error'
loss = 'mae'
early_stopping = EarlyStopping(monitor='val_loss', patience=10, mode='min', restore_best_weights=False, min_delta=0.001)
| temp = np.load('./data/temp_norm.npy')
y = np.load('./data/total_load_norm.npy')
load_meters = np.load('./data/load_meters_norm.npy')
(t, num_meters) = load_meters.shape
num_samples = T
hist_samples = 24
train_samples = int(0.8 * num_samples)
test_samples_a = int(0.1 * num_samples)
use_mse = False
if use_mse:
loss_f = 'mean_squared_error'
loss = 'mse'
else:
loss_f = 'mean_absolute_error'
loss = 'mae'
early_stopping = early_stopping(monitor='val_loss', patience=10, mode='min', restore_best_weights=False, min_delta=0.001) |
datas = {
'style' : 'sys',
'parent' :'boost',
'prefix' :['boost','simd'],
}
| datas = {'style': 'sys', 'parent': 'boost', 'prefix': ['boost', 'simd']} |
class Solution:
def maxProfit(self, prices: List[int]) -> int:
profit = 0
buy = math.inf
for price in prices:
if price < buy:
buy = price
elif (p := price - buy) > profit:
profit = p
return profit
| class Solution:
def max_profit(self, prices: List[int]) -> int:
profit = 0
buy = math.inf
for price in prices:
if price < buy:
buy = price
elif (p := (price - buy)) > profit:
profit = p
return profit |
def maior_elemento(lista):
elemento_ref = lista[0]
maior_elemento = 0
for i in lista:
if i >= elemento_ref:
maior_elemento = i
return maior_elemento | def maior_elemento(lista):
elemento_ref = lista[0]
maior_elemento = 0
for i in lista:
if i >= elemento_ref:
maior_elemento = i
return maior_elemento |
#!/usr/bin/env python
# Copyright JS Foundation and other contributors, http://js.foundation
#
# 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.
class _constants:
default_test_count = 100 # The default value of --test-count option
default_seed = 10000 # The default value of random seed
test_case_in_a_file = 700 # Maximum number of test for each file
operand_count_max = 11 # The --operand-count option's maximum value
operand_count_min = 2 # The --operand-count option's minimum value
max = (1 << 53) - 1 # The max value of random number (See also Number.MAX_SAFE_INTEGER)
min = - 1 * max # The min value of random number (See also Number.MIN_SAFE_INTEGER)
bitmax = (1 << 31) - 1 # The max value of random number for bitwise operations
bitmin = - bitmax - 1 # The min value of random number for bitwise operations
uint32max = (1 << 32) - 1 # The max value of random number for unsigned right shift (See also unsigned int 32)
uint32min = 0 # The min value of random number for unsigned right shift (See also unsigned int 32)
bitmax_exposant = 31 # Maximum number for safely shifting an integer in python to
# be precise for JS 32 bit numbers
| class _Constants:
default_test_count = 100
default_seed = 10000
test_case_in_a_file = 700
operand_count_max = 11
operand_count_min = 2
max = (1 << 53) - 1
min = -1 * max
bitmax = (1 << 31) - 1
bitmin = -bitmax - 1
uint32max = (1 << 32) - 1
uint32min = 0
bitmax_exposant = 31 |
pjs_setting = {"hyperopt" :{"AGENT_TYPE":'"randomwalk"', "CIRCLE_TYPE":'"line"', "min_n_circle":1000, "max_n_circle":4000},
"gaopt" :{"AGENT_TYPE":'"ga"', "CIRCLE_TYPE":'"normal_sw"', "min_n_circle":500, "max_n_circle":3000},
"bayesopt" :{"AGENT_TYPE":'"randomwalk"', "CIRCLE_TYPE":'"quad"', "min_n_circle":1000, "max_n_circle":3000},
"randomopt" :{"AGENT_TYPE":'"random"', "CIRCLE_TYPE":'"normal"', "min_n_circle":50, "max_n_circle":500},
}
n_iter_setting = {"min":0, "max":256}
additional_head = """
<style>
.bk-root {width:1000px; margin-left:auto; margin-right:auto;}
#bg { position:fixed; top:0; left:0; width:100%; height:100%; }
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/processing.js/1.6.6/processing.js"></script>
"""
pjs = """
<script type="application/processing">
class Circle{
float x, y;
float radius;
color linecolor;
//color fillcolor;
float alpha;
String type;
Circle(float init_x, float init_y, float init_radius,
float init_alpha, color init_linecolor, String init_type) {
x = init_x;
y = init_y;
radius = init_radius;
alpha = init_alpha;
linecolor = init_linecolor;
//fillcolor = init_fillcolor;
type = init_type;
}
void show() {
stroke(linecolor, alpha);
if (type == "normal"){
noFill();
ellipse(x, y, radius*2, radius*2);
}
if (type == "normal_sw"){
noFill();
strokeWeight(random(0.5,5));
ellipse(x, y, radius*2, radius*2);
}
else if (type == "line"){
float angle_step = 25;
for (float angle=0; angle <= 360*2; angle+=angle_step) {
float rad = radians(angle);
float rad_next = radians(angle+angle_step*random(0.8,1.2));
strokeWeight(random(1,2));
line(x+radius*cos(rad), y+radius*sin(rad),
x+radius*cos(rad_next)+rad*random(1),
y+radius*sin(rad_next)+rad*random(1));
if (angle > random(360, 720)){
break;
}
}
}
else if (type == "quad"){
float angle_step = 17;
beginShape(QUAD_STRIP);
for (float angle=0; angle <= 360; angle+=angle_step) {
if (0.8 > random(1)){
fill(#ffffff, random(0,50));
stroke(linecolor, alpha);
}
else{
noFill();
noStroke();
}
float rad = radians(angle);
vertex(x+radius*cos(rad)+rad*random(1), y+radius*sin(rad)+rad*random(1));
}
endShape();
}
}
}
class Agent{
int time;
PVector cr_pos;
PVector[] poss = {};
String type;
float x, y;
float rd_max, rw_seed, rw_step, rad;
Agent(float init_x, float init_y, String init_type){
cr_pos = new PVector(init_x, init_y);
poss = (PVector[])append(poss, cr_pos);
time = 0;
type = init_type;
rd_max = 100;
rw_seed = 1;
rw_step = (disp_width+disp_height)/50;
}
void step(){
// algorism
if (type == "random"){
x = random(rd_max);
x = map(x, 0, rd_max, 0, disp_width);
y = random(rd_max);
y = map(y, 0, rd_max, 0, disp_height);
}
else if (type == "randomwalk"){
rad = random(rd_max);
rad = map(rad, 0, 1, 0, 2*PI);
x = poss[time].x + rw_step*cos(rad);
y = poss[time].y + rw_step*sin(rad);
}
else if (type == "ga"){
float r = random(1);
if ((time < 10) || r < 0.05){
x = random(rd_max);
x = map(x, 0, rd_max, 0, disp_width);
y = random(rd_max);
y = map(y, 0, rd_max, 0, disp_height);
}
else{
int p_0 = int(random(0, time));
int p_1 = int(random(0, time));
//float w = random(1);
//x = w*poss[p_0].x + (1-w)*poss[p_1].x;
//y = w*poss[p_0].y + (1-w)*poss[p_1].y;
x = poss[p_0].x + poss[p_1].x;
y = poss[p_0].y + poss[p_1].y;
}
}
// for out of screen
if (abs(x) > disp_width*1.5){
x = x * 0.5;
}
if (abs(y) > disp_width*1.5){
y = y * 0.5;
}
cr_pos = new PVector(x, y);
poss = (PVector[])append(poss, cr_pos);
time ++;
}
}
int N_CIRCLE = REP_N_CIRCLE;
String AGENT_TYPE = REP_AGENT_TYPE;
String CIRCLE_TYPE = REP_CIRCLE_TYPE;
Circle[] circles = {};
Agent agent;
float disp_width, disp_height;
void setup() {
size(innerWidth, innerHeight);
colorMode(RGB, 255, 255, 255, 100);
background(#f2f2f2);
smooth();
noLoop();
disp_width = innerWidth;
disp_height = innerHeight;
agent = new Agent(disp_width/2, disp_height/2, AGENT_TYPE);
}
void draw() {
for (int i = 0; i < N_CIRCLE; i++) {
agent.step();
float radius = random(1, 150);
//float radius = 300;
float alpha = 100;
color linecolor = #b7b7b7;
Circle circle = new Circle(agent.cr_pos.x, agent.cr_pos.y,
radius, alpha, linecolor, CIRCLE_TYPE);
circles = (Circle[])append(circles, circle);
}
for (int i = 0; i < N_CIRCLE; i++) {
Circle circle = circles[i];
circle.show();
}
}
</script>
<canvas id="bg"></canvas>
""" | pjs_setting = {'hyperopt': {'AGENT_TYPE': '"randomwalk"', 'CIRCLE_TYPE': '"line"', 'min_n_circle': 1000, 'max_n_circle': 4000}, 'gaopt': {'AGENT_TYPE': '"ga"', 'CIRCLE_TYPE': '"normal_sw"', 'min_n_circle': 500, 'max_n_circle': 3000}, 'bayesopt': {'AGENT_TYPE': '"randomwalk"', 'CIRCLE_TYPE': '"quad"', 'min_n_circle': 1000, 'max_n_circle': 3000}, 'randomopt': {'AGENT_TYPE': '"random"', 'CIRCLE_TYPE': '"normal"', 'min_n_circle': 50, 'max_n_circle': 500}}
n_iter_setting = {'min': 0, 'max': 256}
additional_head = '\n<style>\n .bk-root {width:1000px; margin-left:auto; margin-right:auto;}\n #bg { position:fixed; top:0; left:0; width:100%; height:100%; }\n</style>\n<script src="https://cdnjs.cloudflare.com/ajax/libs/processing.js/1.6.6/processing.js"></script>\n'
pjs = '\n<script type="application/processing">\n \n\n\nclass Circle{\n float x, y;\n float radius;\n color linecolor;\n //color fillcolor;\n float alpha;\n String type;\n \n Circle(float init_x, float init_y, float init_radius, \n float init_alpha, color init_linecolor, String init_type) { \n x = init_x;\n y = init_y;\n radius = init_radius;\n alpha = init_alpha;\n linecolor = init_linecolor;\n //fillcolor = init_fillcolor;\n type = init_type;\n }\n void show() {\n stroke(linecolor, alpha);\n if (type == "normal"){\n noFill();\n ellipse(x, y, radius*2, radius*2);\n }\n if (type == "normal_sw"){\n noFill();\n strokeWeight(random(0.5,5));\n ellipse(x, y, radius*2, radius*2);\n }\n else if (type == "line"){\n float angle_step = 25;\n for (float angle=0; angle <= 360*2; angle+=angle_step) {\n float rad = radians(angle);\n float rad_next = radians(angle+angle_step*random(0.8,1.2));\n strokeWeight(random(1,2));\n line(x+radius*cos(rad), y+radius*sin(rad), \n x+radius*cos(rad_next)+rad*random(1), \n y+radius*sin(rad_next)+rad*random(1));\n \n if (angle > random(360, 720)){\n break;\n }\n }\n }\n else if (type == "quad"){\n float angle_step = 17;\n beginShape(QUAD_STRIP);\n for (float angle=0; angle <= 360; angle+=angle_step) {\n if (0.8 > random(1)){\n fill(#ffffff, random(0,50));\n stroke(linecolor, alpha);\n }\n else{\n noFill();\n noStroke();\n }\n \n float rad = radians(angle);\n vertex(x+radius*cos(rad)+rad*random(1), y+radius*sin(rad)+rad*random(1));\n\n }\n endShape();\n }\n }\n}\n\n\nclass Agent{\n int time;\n PVector cr_pos;\n PVector[] poss = {};\n String type;\n float x, y;\n \n float rd_max, rw_seed, rw_step, rad;\n\n Agent(float init_x, float init_y, String init_type){\n cr_pos = new PVector(init_x, init_y); \n poss = (PVector[])append(poss, cr_pos);\n time = 0;\n type = init_type;\n \n rd_max = 100;\n rw_seed = 1;\n rw_step = (disp_width+disp_height)/50;\n }\n void step(){\n // algorism\n if (type == "random"){\n x = random(rd_max);\n x = map(x, 0, rd_max, 0, disp_width);\n y = random(rd_max);\n y = map(y, 0, rd_max, 0, disp_height);\n }\n else if (type == "randomwalk"){\n rad = random(rd_max);\n rad = map(rad, 0, 1, 0, 2*PI);\n x = poss[time].x + rw_step*cos(rad);\n y = poss[time].y + rw_step*sin(rad);\n }\n else if (type == "ga"){\n float r = random(1);\n if ((time < 10) || r < 0.05){\n x = random(rd_max);\n x = map(x, 0, rd_max, 0, disp_width);\n y = random(rd_max);\n y = map(y, 0, rd_max, 0, disp_height);\n }\n else{\n int p_0 = int(random(0, time));\n int p_1 = int(random(0, time));\n \n //float w = random(1);\n //x = w*poss[p_0].x + (1-w)*poss[p_1].x;\n //y = w*poss[p_0].y + (1-w)*poss[p_1].y;\n x = poss[p_0].x + poss[p_1].x;\n y = poss[p_0].y + poss[p_1].y; \n }\n \n }\n // for out of screen\n if (abs(x) > disp_width*1.5){\n x = x * 0.5;\n }\n if (abs(y) > disp_width*1.5){\n y = y * 0.5;\n }\n \n cr_pos = new PVector(x, y);\n poss = (PVector[])append(poss, cr_pos);\n time ++;\n }\n}\n\n\n\nint N_CIRCLE = REP_N_CIRCLE;\nString AGENT_TYPE = REP_AGENT_TYPE;\nString CIRCLE_TYPE = REP_CIRCLE_TYPE;\n\nCircle[] circles = {};\nAgent agent;\nfloat disp_width, disp_height;\n\nvoid setup() { \n size(innerWidth, innerHeight); \n colorMode(RGB, 255, 255, 255, 100);\n background(#f2f2f2);\n smooth();\n noLoop();\n disp_width = innerWidth;\n disp_height = innerHeight;\n \n agent = new Agent(disp_width/2, disp_height/2, AGENT_TYPE);\n}\n\nvoid draw() {\n for (int i = 0; i < N_CIRCLE; i++) {\n agent.step();\n float radius = random(1, 150);\n //float radius = 300;\n float alpha = 100;\n color linecolor = #b7b7b7;\n Circle circle = new Circle(agent.cr_pos.x, agent.cr_pos.y, \n radius, alpha, linecolor, CIRCLE_TYPE);\n circles = (Circle[])append(circles, circle);\n }\n \n for (int i = 0; i < N_CIRCLE; i++) {\n Circle circle = circles[i];\n circle.show();\n }\n \n}\n\n\n \n</script>\n<canvas id="bg"></canvas>\n' |
# 28. Implement strStr()
class Solution:
def strStr(self, haystack: str, needle: str) -> int:
"""
Return the index of the first occurrence of needle in haystack,
or -1 if needle is not part of haystack.
"""
if not len(needle):
return 0
s = needle + '$' + haystack
n = len(s)
z = [0 for _ in range(n)]
left = right = 0
for index in range(1, n):
x = min(z[index - left], right - index + 1) if index <= right else 0
while x + index < n and s[x] == s[x + index]:
x += 1
z[index] = x
if x == len(needle):
return index - len(needle) - 1
if x + index - 1 > right:
left, right = index, x + index - 1
return -1
| class Solution:
def str_str(self, haystack: str, needle: str) -> int:
"""
Return the index of the first occurrence of needle in haystack,
or -1 if needle is not part of haystack.
"""
if not len(needle):
return 0
s = needle + '$' + haystack
n = len(s)
z = [0 for _ in range(n)]
left = right = 0
for index in range(1, n):
x = min(z[index - left], right - index + 1) if index <= right else 0
while x + index < n and s[x] == s[x + index]:
x += 1
z[index] = x
if x == len(needle):
return index - len(needle) - 1
if x + index - 1 > right:
(left, right) = (index, x + index - 1)
return -1 |
__version__ = "11.0.2-2022.02.08"
if __name__ == "__main__":
print(__version__)
| __version__ = '11.0.2-2022.02.08'
if __name__ == '__main__':
print(__version__) |
array = [3,5,-4,8,11,1,-1,6]
targetSum = 10
# def twoNumberSum(array, targetSum):
# # Write your code here.
# arrayOut = []
# for num1 in array:
# for num2 in array:
# if (num1+num2==targetSum) and (num1 != num2):
# arrayOut.append(num1)
# arrayOut.append(num2)
# finalList =sorted(list(set(arrayOut)))
# return finalList
# def twoNumberSum(array, targetSum):
# # Write your code here.
# arrayOut =[]
# newDict = dict.fromkeys(array)
# for num1 in newDict:
# num2 = targetSum- num1
# if (num2 in newDict) and (num1 != num2):
# arrayOut.append(num1)
# arrayOut.append(num2)
# finalList =sorted(arrayOut)
# return finalList
# return arrayOut
def twoNumberSum(array, targetSum):
# Write your code here.
arrayOut =[]
newDict = {}
for num1 in array:
num2 = targetSum- num1
if (num2 in newDict):
arrayOut.append(num1)
arrayOut.append(num2)
finalList =sorted(arrayOut)
return finalList
else:
newDict[num1]=True
return arrayOut
# def twoNumberSum(array, targetSum):
# # Write your code here.
# array.sort()
# left =0
# right = len(array) -1
# while (left < right):
# currSum = array[left] + array[right]
# if currSum == targetSum:
# return [array[left],array[right]]
# elif currSum < targetSum:
# left += 1
# else:
# right -= 1
# return []
print(twoNumberSum(array, targetSum)) | array = [3, 5, -4, 8, 11, 1, -1, 6]
target_sum = 10
def two_number_sum(array, targetSum):
array_out = []
new_dict = {}
for num1 in array:
num2 = targetSum - num1
if num2 in newDict:
arrayOut.append(num1)
arrayOut.append(num2)
final_list = sorted(arrayOut)
return finalList
else:
newDict[num1] = True
return arrayOut
print(two_number_sum(array, targetSum)) |
# Print multiplication tables
# 1 2 3 4 .. 10
# 2 4 6 8 20
# 3 6 9 12 30
# .. .. .. .. ..
for i in range(1, 11):
for j in range(1, 11):
print(str(j * i) + '\t', end='')
print('')
| for i in range(1, 11):
for j in range(1, 11):
print(str(j * i) + '\t', end='')
print('') |
# --------------
##File path for the file
file_path
#Code starts here
def read_file(path):
file=open(file_path,'r')
sentence=file.readline()
file.close()
return sentence
sample_message=read_file(file_path)
# --------------
#Code starts here
file_path_1,file_path_2
message_1=read_file(file_path_1)
message_2=read_file(file_path_2)
print(message_1)
print(message_2)
def fuse_msg(message_a,message_b):
int_message_a = int(message_a)
int_message_b = int(message_b)
quotient=int_message_b//int_message_a
return str(quotient)
secret_msg_1=fuse_msg(message_1,message_2)
print(secret_msg_1)
# --------------
#Code starts here
file_path_3
message_3=read_file(file_path_3)
print(message_3)
def substitute_msg(message_c):
sub =' '
if message_c=='Red':
sub = 'Army General'
return sub
elif message_c=='Green':
sub = 'Data Scientist'
return sub
elif message_c=='Blue':
sub = 'Marine Biologist'
return sub
secret_msg_2=substitute_msg(message_3)
print(secret_msg_2)
# --------------
# File path for message 4 and message 5
file_path_4
file_path_5
#Code starts here
message_4=read_file(file_path_4)
message_5=read_file(file_path_5)
print(message_4)
print(message_5)
def compare_msg(message_d,message_e):
a_list=message_d.split()
print(a_list)
b_list=message_e.split()
print(b_list)
c_list= [i for i in a_list if i not in b_list]
print(c_list)
final_msg=" ".join(c_list)
return final_msg
secret_msg_3=compare_msg(message_4,message_5)
print(secret_msg_3)
# --------------
#Code starts here
file_path_6
message_6=read_file(file_path_6)
print(message_6)
def extract_msg(message_f):
a_list=message_f.split()
print(a_list)
# lambda function for even words
even_word=lambda x:((len(x)%2)==0)
# filter() to filter out even words
b_list=list(filter(even_word,a_list))
print(b_list)
final_msg=" ".join(b_list)
return final_msg
secret_msg_4=extract_msg(message_6)
print(secret_msg_4)
# --------------
#Secret message parts in the correct order
message_parts=[secret_msg_3, secret_msg_1, secret_msg_4, secret_msg_2]
final_path= user_data_dir + '/secret_message.txt'
#Code starts here
secret_msg=" ".join(message_parts)
def write_file(secret_msg,path):
file= open(path,'a+')
file.write(secret_msg)
file.close()
write_file(secret_msg,final_path)
print(secret_msg)
| file_path
def read_file(path):
file = open(file_path, 'r')
sentence = file.readline()
file.close()
return sentence
sample_message = read_file(file_path)
(file_path_1, file_path_2)
message_1 = read_file(file_path_1)
message_2 = read_file(file_path_2)
print(message_1)
print(message_2)
def fuse_msg(message_a, message_b):
int_message_a = int(message_a)
int_message_b = int(message_b)
quotient = int_message_b // int_message_a
return str(quotient)
secret_msg_1 = fuse_msg(message_1, message_2)
print(secret_msg_1)
file_path_3
message_3 = read_file(file_path_3)
print(message_3)
def substitute_msg(message_c):
sub = ' '
if message_c == 'Red':
sub = 'Army General'
return sub
elif message_c == 'Green':
sub = 'Data Scientist'
return sub
elif message_c == 'Blue':
sub = 'Marine Biologist'
return sub
secret_msg_2 = substitute_msg(message_3)
print(secret_msg_2)
file_path_4
file_path_5
message_4 = read_file(file_path_4)
message_5 = read_file(file_path_5)
print(message_4)
print(message_5)
def compare_msg(message_d, message_e):
a_list = message_d.split()
print(a_list)
b_list = message_e.split()
print(b_list)
c_list = [i for i in a_list if i not in b_list]
print(c_list)
final_msg = ' '.join(c_list)
return final_msg
secret_msg_3 = compare_msg(message_4, message_5)
print(secret_msg_3)
file_path_6
message_6 = read_file(file_path_6)
print(message_6)
def extract_msg(message_f):
a_list = message_f.split()
print(a_list)
even_word = lambda x: len(x) % 2 == 0
b_list = list(filter(even_word, a_list))
print(b_list)
final_msg = ' '.join(b_list)
return final_msg
secret_msg_4 = extract_msg(message_6)
print(secret_msg_4)
message_parts = [secret_msg_3, secret_msg_1, secret_msg_4, secret_msg_2]
final_path = user_data_dir + '/secret_message.txt'
secret_msg = ' '.join(message_parts)
def write_file(secret_msg, path):
file = open(path, 'a+')
file.write(secret_msg)
file.close()
write_file(secret_msg, final_path)
print(secret_msg) |
# Python > Sets > The Captain's Room
# Out of a list of room numbers, determine the number of the captain's room.
#
# https://www.hackerrank.com/challenges/py-the-captains-room/problem
#
k = int(input())
rooms = list(map(int, input().split()))
a = set()
room_group = set()
for room in rooms:
if room in a:
room_group.add(room)
else:
a.add(room)
a = a - room_group
print(a.pop())
| k = int(input())
rooms = list(map(int, input().split()))
a = set()
room_group = set()
for room in rooms:
if room in a:
room_group.add(room)
else:
a.add(room)
a = a - room_group
print(a.pop()) |
class Config:
device = 'cpu'
RBF_url = "https://github.com/Practical-AI/deep_utils/releases/download/0.2.0/version-RFB-320.pth"
RBF_cache = 'weights/vision/face_detection/ultra-light/torch/RBF/version-RFB-320.pth'
RBF = None
slim_url = "https://github.com/Practical-AI/deep_utils/releases/download/0.2.0/version-slim-320.pth"
slim_cache = 'weights/vision/face_detection/ultra-light/torch/slim/version-slim-320.pth'
slim = None
| class Config:
device = 'cpu'
rbf_url = 'https://github.com/Practical-AI/deep_utils/releases/download/0.2.0/version-RFB-320.pth'
rbf_cache = 'weights/vision/face_detection/ultra-light/torch/RBF/version-RFB-320.pth'
rbf = None
slim_url = 'https://github.com/Practical-AI/deep_utils/releases/download/0.2.0/version-slim-320.pth'
slim_cache = 'weights/vision/face_detection/ultra-light/torch/slim/version-slim-320.pth'
slim = None |
alphabet = """1
2
3
4
5
6
7
8
9
10
11
12
"""
| alphabet = '1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n' |
'''https://leetcode.com/problems/unique-paths/'''
class Solution:
def uniquePaths(self, m: int, n: int) -> int:
dp = [1 for i in range(m)]
for i in range(1,n):
for j in range(1,m):
dp[j] += dp[j-1]
return dp[-1]
| """https://leetcode.com/problems/unique-paths/"""
class Solution:
def unique_paths(self, m: int, n: int) -> int:
dp = [1 for i in range(m)]
for i in range(1, n):
for j in range(1, m):
dp[j] += dp[j - 1]
return dp[-1] |
# Time: O(n)
# Space: O(1)
class Solution(object):
def optimalDivision(self, nums):
"""
:type nums: List[int]
:rtype: str
"""
if len(nums) == 1:
return str(nums[0])
if len(nums) == 2:
return str(nums[0]) + "/" + str(nums[1])
result = [str(nums[0]) + "/(" + str(nums[1])]
for i in range(2, len(nums)):
result += "/" + str(nums[i])
result += ")"
return "".join(result)
| class Solution(object):
def optimal_division(self, nums):
"""
:type nums: List[int]
:rtype: str
"""
if len(nums) == 1:
return str(nums[0])
if len(nums) == 2:
return str(nums[0]) + '/' + str(nums[1])
result = [str(nums[0]) + '/(' + str(nums[1])]
for i in range(2, len(nums)):
result += '/' + str(nums[i])
result += ')'
return ''.join(result) |
experiments_20 = {
'data':
{'n_experiments': 20,
'max_set_size': 500,
'network_filename': 'H_sapiens.net', #'S_cerevisiae.net'
'directed_interactions_filename': 'KPI_dataset',
'sources_filename': 'drug_targets.txt',
'terminals_filename': 'drug_expressions.txt',
'load_prop_scores': False,
'save_prop_scores': False,
'balance_dataset': True,
'prop_scores_filename': 'balanced_kpi_prop_scores',
'random_seed': 0,
'normalization_method': 'power', # Standard, Power
'split_type': 'normal'}, # 'regular'/harsh
'propagation':
{'alpha': 0.8,
'eps': 1e-6,
'n_iterations': 200},
'model':
{'feature_extractor_layers': [64, 32],
'classifier_layers': [64, 32],
'pulling_func': 'mean',
'exp_emb_size': 4,
'feature_extractor_dropout': 0,
'classifier_dropout': 0,
'pair_degree_feature': 0
},
'train':
{'intermediate_loss_weight': 0,
'intermediate_loss_type': 'BCE',
'focal_gamma': 1,
'train_val_test_split': [0.66, 0.14, 0.2], # sum([train, val, test])=1
'train_batch_size': 32,
'test_batch_size': 32,
'n_epochs': 1000,
'eval_interval': 3,
'learning_rate': 1e-3,
'max_evals_no_imp': 3,
'optimizer' : 'ADAMW' # ADAM/WADAM
}}
experiments_50 = {
'data':
{'n_experiments': 50,
'max_set_size': 500,
'network_filename': 'H_sapiens.net',
'directed_interactions_filename': 'KPI_dataset',
'sources_filename': 'drug_targets.txt',
'terminals_filename': 'drug_expressions.txt',
'load_prop_scores': True,
'save_prop_scores': False,
'prop_scores_filename': 'balanced_kpi_prop_scores',
'random_seed': 0,
'normalization_method': 'standard'
},
'propagation':
{'alpha': 0.8,
'eps': 1e-6,
'n_iterations': 200},
'model':
{'feature_extractor_layers': [128, 64],
'classifier_layers': [128, 64],
'pulling_func': 'mean',
'exp_emb_size': 12,
'feature_extractor_dropout': 0,
'classifier_dropout': 0,
'pair_degree_feature': 0
},
'train':
{'intermediate_loss_weight': 0.5,
'intermediate_loss_type': 'BCE',
'focal_gamma': 1,
'train_val_test_split': [0.66, 0.14, 0.2], # sum([train, val, test])=1
'train_batch_size': 32,
'test_batch_size': 32,
'n_epochs': 4,
'eval_interval': 2,
'learning_rate': 5e-4,
'max_evals_no_imp': 3,
'optimizer' : 'ADAMW' # ADAM/WADAM
}}
experiments_0 = {
'data':
{'n_experiments': 0,
'max_set_size': 500,
'network_filename': 'H_sapiens.net',
'directed_interactions_filename': ['KPI'],
'sources_filename': 'drug_targets.txt',
'terminals_filename': 'drug_expressions.txt',
'load_prop_scores': True,
'save_prop_scores': False,
'balance_dataset': True,
'prop_scores_filename': 'drug_KPI_0',
'random_seed': 0,
'normalization_method': 'power', # Standard, Power
'split_type': 'normal'}, # 'regular'/harsh
'propagation':
{'alpha': 0.8,
'eps': 1e-6,
'n_iterations': 200},
'model':
{'feature_extractor_layers': [128, 64],
'classifier_layers': [64],
'pulling_func': 'mean',
'exp_emb_size': 16,
'feature_extractor_dropout': 0,
'classifier_dropout': 0,
'pair_degree_feature': 0,
},
'train':
{'intermediate_loss_weight': 0.5,
'intermediate_loss_type': 'BCE',
'focal_gamma': 1,
'train_val_test_split': [0.66, 0.14, 0.2], # sum([train, val, test])=1
'train_batch_size': 4,
'test_batch_size': 32,
'n_epochs': 4,
'eval_interval': 2,
'learning_rate': 1e-3,
'max_evals_no_imp': 3,
'optimizer': 'ADAMW' # ADAM/WADAM
}}
experiments_all_datasets = {
'data':
{'n_experiments': 0,
'max_set_size': 500,
'network_filename': 'H_sapiens.net',
'directed_interactions_filename': ['KPI', 'STKE', 'EGFR', 'E3','PDI'],
'sources_filename': 'drug_targets.txt',
'terminals_filename': 'drug_expressions.txt',
'load_prop_scores': True,
'save_prop_scores': False,
'balance_dataset': True,
'prop_scores_filename': 'balanced_KPI_STKE_EGFR_E3',
'random_seed': 0,
'normalization_method': 'power', # Standard, Power
'split_type': 'normal'}, # 'regular'/harsh
'propagation':
{'alpha': 0.8,
'eps': 1e-6,
'n_iterations': 200},
'model':
{'feature_extractor_layers': [64, 32, 16],
'classifier_layers': [32, 16],
'pulling_func': 'mean',
'exp_emb_size': 12,
'feature_extractor_dropout': 0,
'classifier_dropout': 0,
'pair_degree_feature': 0,
},
'train':
{'intermediate_loss_weight': 0.95,
'intermediate_loss_type': 'BCE',
'focal_gamma': 1,
'train_val_test_split': [0.66, 0.14, 0.2], # sum([train, val, test])=1
'train_batch_size': 8,
'test_batch_size': 8,
'n_epochs': 2000,
'eval_interval': 2,
'learning_rate': 1e-3,
'max_evals_no_imp': 15,
}}
| experiments_20 = {'data': {'n_experiments': 20, 'max_set_size': 500, 'network_filename': 'H_sapiens.net', 'directed_interactions_filename': 'KPI_dataset', 'sources_filename': 'drug_targets.txt', 'terminals_filename': 'drug_expressions.txt', 'load_prop_scores': False, 'save_prop_scores': False, 'balance_dataset': True, 'prop_scores_filename': 'balanced_kpi_prop_scores', 'random_seed': 0, 'normalization_method': 'power', 'split_type': 'normal'}, 'propagation': {'alpha': 0.8, 'eps': 1e-06, 'n_iterations': 200}, 'model': {'feature_extractor_layers': [64, 32], 'classifier_layers': [64, 32], 'pulling_func': 'mean', 'exp_emb_size': 4, 'feature_extractor_dropout': 0, 'classifier_dropout': 0, 'pair_degree_feature': 0}, 'train': {'intermediate_loss_weight': 0, 'intermediate_loss_type': 'BCE', 'focal_gamma': 1, 'train_val_test_split': [0.66, 0.14, 0.2], 'train_batch_size': 32, 'test_batch_size': 32, 'n_epochs': 1000, 'eval_interval': 3, 'learning_rate': 0.001, 'max_evals_no_imp': 3, 'optimizer': 'ADAMW'}}
experiments_50 = {'data': {'n_experiments': 50, 'max_set_size': 500, 'network_filename': 'H_sapiens.net', 'directed_interactions_filename': 'KPI_dataset', 'sources_filename': 'drug_targets.txt', 'terminals_filename': 'drug_expressions.txt', 'load_prop_scores': True, 'save_prop_scores': False, 'prop_scores_filename': 'balanced_kpi_prop_scores', 'random_seed': 0, 'normalization_method': 'standard'}, 'propagation': {'alpha': 0.8, 'eps': 1e-06, 'n_iterations': 200}, 'model': {'feature_extractor_layers': [128, 64], 'classifier_layers': [128, 64], 'pulling_func': 'mean', 'exp_emb_size': 12, 'feature_extractor_dropout': 0, 'classifier_dropout': 0, 'pair_degree_feature': 0}, 'train': {'intermediate_loss_weight': 0.5, 'intermediate_loss_type': 'BCE', 'focal_gamma': 1, 'train_val_test_split': [0.66, 0.14, 0.2], 'train_batch_size': 32, 'test_batch_size': 32, 'n_epochs': 4, 'eval_interval': 2, 'learning_rate': 0.0005, 'max_evals_no_imp': 3, 'optimizer': 'ADAMW'}}
experiments_0 = {'data': {'n_experiments': 0, 'max_set_size': 500, 'network_filename': 'H_sapiens.net', 'directed_interactions_filename': ['KPI'], 'sources_filename': 'drug_targets.txt', 'terminals_filename': 'drug_expressions.txt', 'load_prop_scores': True, 'save_prop_scores': False, 'balance_dataset': True, 'prop_scores_filename': 'drug_KPI_0', 'random_seed': 0, 'normalization_method': 'power', 'split_type': 'normal'}, 'propagation': {'alpha': 0.8, 'eps': 1e-06, 'n_iterations': 200}, 'model': {'feature_extractor_layers': [128, 64], 'classifier_layers': [64], 'pulling_func': 'mean', 'exp_emb_size': 16, 'feature_extractor_dropout': 0, 'classifier_dropout': 0, 'pair_degree_feature': 0}, 'train': {'intermediate_loss_weight': 0.5, 'intermediate_loss_type': 'BCE', 'focal_gamma': 1, 'train_val_test_split': [0.66, 0.14, 0.2], 'train_batch_size': 4, 'test_batch_size': 32, 'n_epochs': 4, 'eval_interval': 2, 'learning_rate': 0.001, 'max_evals_no_imp': 3, 'optimizer': 'ADAMW'}}
experiments_all_datasets = {'data': {'n_experiments': 0, 'max_set_size': 500, 'network_filename': 'H_sapiens.net', 'directed_interactions_filename': ['KPI', 'STKE', 'EGFR', 'E3', 'PDI'], 'sources_filename': 'drug_targets.txt', 'terminals_filename': 'drug_expressions.txt', 'load_prop_scores': True, 'save_prop_scores': False, 'balance_dataset': True, 'prop_scores_filename': 'balanced_KPI_STKE_EGFR_E3', 'random_seed': 0, 'normalization_method': 'power', 'split_type': 'normal'}, 'propagation': {'alpha': 0.8, 'eps': 1e-06, 'n_iterations': 200}, 'model': {'feature_extractor_layers': [64, 32, 16], 'classifier_layers': [32, 16], 'pulling_func': 'mean', 'exp_emb_size': 12, 'feature_extractor_dropout': 0, 'classifier_dropout': 0, 'pair_degree_feature': 0}, 'train': {'intermediate_loss_weight': 0.95, 'intermediate_loss_type': 'BCE', 'focal_gamma': 1, 'train_val_test_split': [0.66, 0.14, 0.2], 'train_batch_size': 8, 'test_batch_size': 8, 'n_epochs': 2000, 'eval_interval': 2, 'learning_rate': 0.001, 'max_evals_no_imp': 15}} |
"""
Rotate an array of n elements to the right by k steps.
For example, with n = 7 and k = 3,
the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].
Note:
Try to come up as many solutions as you can,
there are at least 3 different ways to solve this problem.
"""
org = [1,2,3,4,5,6,7]
steps = 3
lis1 = org[steps+1:]
lis2 = org[0:steps+1]
print(lis1+lis2)
| """
Rotate an array of n elements to the right by k steps.
For example, with n = 7 and k = 3,
the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].
Note:
Try to come up as many solutions as you can,
there are at least 3 different ways to solve this problem.
"""
org = [1, 2, 3, 4, 5, 6, 7]
steps = 3
lis1 = org[steps + 1:]
lis2 = org[0:steps + 1]
print(lis1 + lis2) |
# pylint: disable=missing-docstring
TEST = map(str, (1, 2, 3)) # [bad-builtin]
TEST1 = filter(str, (1, 2, 3)) # [bad-builtin]
| test = map(str, (1, 2, 3))
test1 = filter(str, (1, 2, 3)) |
expected = [
{
"xlink_href": "elife00013inf001",
"type": "inline-graphic",
"position": 1,
"ordinal": 1,
}
]
| expected = [{'xlink_href': 'elife00013inf001', 'type': 'inline-graphic', 'position': 1, 'ordinal': 1}] |
APIYNFLAG_YES = "Y"
APIYNFLAG_NO = "N"
APILOGLEVEL_NONE = "N"
APILOGLEVEL_ERROR = "E"
APILOGLEVEL_WARNING = "W"
APILOGLEVEL_DEBUG = "D"
TAPI_COMMODITY_TYPE_NONE = "N"
TAPI_COMMODITY_TYPE_SPOT = "P"
TAPI_COMMODITY_TYPE_FUTURES = "F"
TAPI_COMMODITY_TYPE_OPTION = "O"
TAPI_COMMODITY_TYPE_SPREAD_MONTH = "S"
TAPI_COMMODITY_TYPE_SPREAD_COMMODITY = "M"
TAPI_COMMODITY_TYPE_BUL = "U"
TAPI_COMMODITY_TYPE_BER = "E"
TAPI_COMMODITY_TYPE_STD = "D"
TAPI_COMMODITY_TYPE_STG = "G"
TAPI_COMMODITY_TYPE_PRT = "R"
TAPI_COMMODITY_TYPE_BLT = "L"
TAPI_COMMODITY_TYPE_BRT = "Q"
TAPI_COMMODITY_TYPE_DIRECTFOREX = "X"
TAPI_COMMODITY_TYPE_INDIRECTFOREX = "I"
TAPI_COMMODITY_TYPE_CROSSFOREX = "C"
TAPI_COMMODITY_TYPE_INDEX = "Z"
TAPI_COMMODITY_TYPE_STOCK = "T"
TAPI_COMMODITY_TYPE_SPOT_TRADINGDEFER = "Y"
TAPI_COMMODITY_TYPE_FUTURE_LOCK = "J"
TAPI_COMMODITY_TYPE_EFP = "A"
TAPI_COMMODITY_TYPE_TAS = "B"
TAPI_CALLPUT_FLAG_CALL = "C"
TAPI_CALLPUT_FLAG_PUT = "P"
TAPI_CALLPUT_FLAG_NONE = "N"
TAPI_AUTHTYPE_DIRECT = "1"
TAPI_AUTHTYPE_RELAY = "2"
| apiynflag_yes = 'Y'
apiynflag_no = 'N'
apiloglevel_none = 'N'
apiloglevel_error = 'E'
apiloglevel_warning = 'W'
apiloglevel_debug = 'D'
tapi_commodity_type_none = 'N'
tapi_commodity_type_spot = 'P'
tapi_commodity_type_futures = 'F'
tapi_commodity_type_option = 'O'
tapi_commodity_type_spread_month = 'S'
tapi_commodity_type_spread_commodity = 'M'
tapi_commodity_type_bul = 'U'
tapi_commodity_type_ber = 'E'
tapi_commodity_type_std = 'D'
tapi_commodity_type_stg = 'G'
tapi_commodity_type_prt = 'R'
tapi_commodity_type_blt = 'L'
tapi_commodity_type_brt = 'Q'
tapi_commodity_type_directforex = 'X'
tapi_commodity_type_indirectforex = 'I'
tapi_commodity_type_crossforex = 'C'
tapi_commodity_type_index = 'Z'
tapi_commodity_type_stock = 'T'
tapi_commodity_type_spot_tradingdefer = 'Y'
tapi_commodity_type_future_lock = 'J'
tapi_commodity_type_efp = 'A'
tapi_commodity_type_tas = 'B'
tapi_callput_flag_call = 'C'
tapi_callput_flag_put = 'P'
tapi_callput_flag_none = 'N'
tapi_authtype_direct = '1'
tapi_authtype_relay = '2' |
#
# PySNMP MIB module ASCEND-MIBSCRTY-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ASCEND-MIBSCRTY-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:28:15 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)
#
configuration, = mibBuilder.importSymbols("ASCEND-MIB", "configuration")
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
ObjectIdentity, IpAddress, TimeTicks, iso, Gauge32, MibIdentifier, Integer32, ModuleIdentity, Unsigned32, Bits, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "IpAddress", "TimeTicks", "iso", "Gauge32", "MibIdentifier", "Integer32", "ModuleIdentity", "Unsigned32", "Bits", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "NotificationType")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
class DisplayString(OctetString):
pass
mibsecurityProfile = MibIdentifier((1, 3, 6, 1, 4, 1, 529, 23, 107))
mibsecurityProfileTable = MibTable((1, 3, 6, 1, 4, 1, 529, 23, 107, 1), )
if mibBuilder.loadTexts: mibsecurityProfileTable.setStatus('mandatory')
if mibBuilder.loadTexts: mibsecurityProfileTable.setDescription('A list of mibsecurityProfile profile entries.')
mibsecurityProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1), ).setIndexNames((0, "ASCEND-MIBSCRTY-MIB", "securityProfile-Name"))
if mibBuilder.loadTexts: mibsecurityProfileEntry.setStatus('mandatory')
if mibBuilder.loadTexts: mibsecurityProfileEntry.setDescription('A mibsecurityProfile entry containing objects that maps to the parameters of mibsecurityProfile profile.')
securityProfile_Name = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 1), DisplayString()).setLabel("securityProfile-Name").setMaxAccess("readonly")
if mibBuilder.loadTexts: securityProfile_Name.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_Name.setDescription('Profile name.')
securityProfile_Password = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 2), DisplayString()).setLabel("securityProfile-Password").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_Password.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_Password.setDescription('Password to access the security levels defined by this profile.')
securityProfile_Operations = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-Operations").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_Operations.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_Operations.setDescription('TRUE = able to do things other than look.')
securityProfile_EditSecurity = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditSecurity").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_EditSecurity.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_EditSecurity.setDescription('TRUE = able to edit the security profiles.')
securityProfile_EditSystem = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditSystem").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_EditSystem.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_EditSystem.setDescription('TRUE = able to edit the system profiles.')
securityProfile_EditLine = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditLine").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_EditLine.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_EditLine.setDescription('TRUE = able to edit the line profile.')
securityProfile_EditOwnPort = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditOwnPort").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_EditOwnPort.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_EditOwnPort.setDescription('TRUE = able to edit port associated port profile (for remote terminal).')
securityProfile_EditAllPort = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditAllPort").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_EditAllPort.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_EditAllPort.setDescription('TRUE = able to edit all port profiles.')
securityProfile_EditCurCall = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditCurCall").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_EditCurCall.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_EditCurCall.setDescription('TRUE = able to edit the current call profile.')
securityProfile_EditOwnCall = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditOwnCall").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_EditOwnCall.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_EditOwnCall.setDescription('TRUE = able to edit port associated call profiles (for remote terminal).')
securityProfile_EditComCall = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditComCall").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_EditComCall.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_EditComCall.setDescription('TRUE = able to edit the common call profiles (for remote terminal).')
securityProfile_EditAllCall = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditAllCall").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_EditAllCall.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_EditAllCall.setDescription('TRUE = able to edit all call profiles.')
securityProfile_SysDiag = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-SysDiag").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_SysDiag.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_SysDiag.setDescription('TRUE = able to perform system diagnostics.')
securityProfile_OwnPortDiag = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-OwnPortDiag").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_OwnPortDiag.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_OwnPortDiag.setDescription('TRUE = able to perform port associated port diagnostics (for remote terminal).')
securityProfile_AllPortDiag = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-AllPortDiag").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_AllPortDiag.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_AllPortDiag.setDescription('TRUE = able to perform port diagnostics for all ports.')
securityProfile_Download = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-Download").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_Download.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_Download.setDescription('TRUE = able to download configuration.')
securityProfile_Upload = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-Upload").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_Upload.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_Upload.setDescription('TRUE = able to upload configuration.')
securityProfile_FieldService = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-FieldService").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_FieldService.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_FieldService.setDescription('TRUE = able to perform field service.')
securityProfile_UseTacacsPlus = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-UseTacacsPlus").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_UseTacacsPlus.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_UseTacacsPlus.setDescription('Use TACACS+ to authenticate security level changes')
securityProfile_Action_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noAction", 1), ("createProfile", 2), ("deleteProfile", 3)))).setLabel("securityProfile-Action-o").setMaxAccess("readwrite")
if mibBuilder.loadTexts: securityProfile_Action_o.setStatus('mandatory')
if mibBuilder.loadTexts: securityProfile_Action_o.setDescription('')
mibBuilder.exportSymbols("ASCEND-MIBSCRTY-MIB", securityProfile_Action_o=securityProfile_Action_o, mibsecurityProfileEntry=mibsecurityProfileEntry, securityProfile_EditComCall=securityProfile_EditComCall, securityProfile_EditLine=securityProfile_EditLine, securityProfile_FieldService=securityProfile_FieldService, securityProfile_EditOwnCall=securityProfile_EditOwnCall, securityProfile_Upload=securityProfile_Upload, DisplayString=DisplayString, mibsecurityProfile=mibsecurityProfile, securityProfile_EditCurCall=securityProfile_EditCurCall, securityProfile_Name=securityProfile_Name, securityProfile_Download=securityProfile_Download, securityProfile_UseTacacsPlus=securityProfile_UseTacacsPlus, securityProfile_OwnPortDiag=securityProfile_OwnPortDiag, securityProfile_Operations=securityProfile_Operations, securityProfile_EditSecurity=securityProfile_EditSecurity, securityProfile_AllPortDiag=securityProfile_AllPortDiag, securityProfile_Password=securityProfile_Password, securityProfile_EditSystem=securityProfile_EditSystem, securityProfile_SysDiag=securityProfile_SysDiag, securityProfile_EditAllPort=securityProfile_EditAllPort, mibsecurityProfileTable=mibsecurityProfileTable, securityProfile_EditAllCall=securityProfile_EditAllCall, securityProfile_EditOwnPort=securityProfile_EditOwnPort)
| (configuration,) = mibBuilder.importSymbols('ASCEND-MIB', 'configuration')
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_size_constraint, value_range_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsUnion')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(object_identity, ip_address, time_ticks, iso, gauge32, mib_identifier, integer32, module_identity, unsigned32, bits, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'IpAddress', 'TimeTicks', 'iso', 'Gauge32', 'MibIdentifier', 'Integer32', 'ModuleIdentity', 'Unsigned32', 'Bits', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'NotificationType')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
class Displaystring(OctetString):
pass
mibsecurity_profile = mib_identifier((1, 3, 6, 1, 4, 1, 529, 23, 107))
mibsecurity_profile_table = mib_table((1, 3, 6, 1, 4, 1, 529, 23, 107, 1))
if mibBuilder.loadTexts:
mibsecurityProfileTable.setStatus('mandatory')
if mibBuilder.loadTexts:
mibsecurityProfileTable.setDescription('A list of mibsecurityProfile profile entries.')
mibsecurity_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1)).setIndexNames((0, 'ASCEND-MIBSCRTY-MIB', 'securityProfile-Name'))
if mibBuilder.loadTexts:
mibsecurityProfileEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
mibsecurityProfileEntry.setDescription('A mibsecurityProfile entry containing objects that maps to the parameters of mibsecurityProfile profile.')
security_profile__name = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 1), display_string()).setLabel('securityProfile-Name').setMaxAccess('readonly')
if mibBuilder.loadTexts:
securityProfile_Name.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_Name.setDescription('Profile name.')
security_profile__password = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 2), display_string()).setLabel('securityProfile-Password').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_Password.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_Password.setDescription('Password to access the security levels defined by this profile.')
security_profile__operations = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-Operations').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_Operations.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_Operations.setDescription('TRUE = able to do things other than look.')
security_profile__edit_security = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditSecurity').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_EditSecurity.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_EditSecurity.setDescription('TRUE = able to edit the security profiles.')
security_profile__edit_system = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditSystem').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_EditSystem.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_EditSystem.setDescription('TRUE = able to edit the system profiles.')
security_profile__edit_line = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditLine').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_EditLine.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_EditLine.setDescription('TRUE = able to edit the line profile.')
security_profile__edit_own_port = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditOwnPort').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_EditOwnPort.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_EditOwnPort.setDescription('TRUE = able to edit port associated port profile (for remote terminal).')
security_profile__edit_all_port = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditAllPort').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_EditAllPort.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_EditAllPort.setDescription('TRUE = able to edit all port profiles.')
security_profile__edit_cur_call = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditCurCall').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_EditCurCall.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_EditCurCall.setDescription('TRUE = able to edit the current call profile.')
security_profile__edit_own_call = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditOwnCall').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_EditOwnCall.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_EditOwnCall.setDescription('TRUE = able to edit port associated call profiles (for remote terminal).')
security_profile__edit_com_call = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditComCall').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_EditComCall.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_EditComCall.setDescription('TRUE = able to edit the common call profiles (for remote terminal).')
security_profile__edit_all_call = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditAllCall').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_EditAllCall.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_EditAllCall.setDescription('TRUE = able to edit all call profiles.')
security_profile__sys_diag = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-SysDiag').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_SysDiag.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_SysDiag.setDescription('TRUE = able to perform system diagnostics.')
security_profile__own_port_diag = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-OwnPortDiag').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_OwnPortDiag.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_OwnPortDiag.setDescription('TRUE = able to perform port associated port diagnostics (for remote terminal).')
security_profile__all_port_diag = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-AllPortDiag').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_AllPortDiag.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_AllPortDiag.setDescription('TRUE = able to perform port diagnostics for all ports.')
security_profile__download = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-Download').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_Download.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_Download.setDescription('TRUE = able to download configuration.')
security_profile__upload = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-Upload').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_Upload.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_Upload.setDescription('TRUE = able to upload configuration.')
security_profile__field_service = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-FieldService').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_FieldService.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_FieldService.setDescription('TRUE = able to perform field service.')
security_profile__use_tacacs_plus = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-UseTacacsPlus').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_UseTacacsPlus.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_UseTacacsPlus.setDescription('Use TACACS+ to authenticate security level changes')
security_profile__action_o = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('noAction', 1), ('createProfile', 2), ('deleteProfile', 3)))).setLabel('securityProfile-Action-o').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
securityProfile_Action_o.setStatus('mandatory')
if mibBuilder.loadTexts:
securityProfile_Action_o.setDescription('')
mibBuilder.exportSymbols('ASCEND-MIBSCRTY-MIB', securityProfile_Action_o=securityProfile_Action_o, mibsecurityProfileEntry=mibsecurityProfileEntry, securityProfile_EditComCall=securityProfile_EditComCall, securityProfile_EditLine=securityProfile_EditLine, securityProfile_FieldService=securityProfile_FieldService, securityProfile_EditOwnCall=securityProfile_EditOwnCall, securityProfile_Upload=securityProfile_Upload, DisplayString=DisplayString, mibsecurityProfile=mibsecurityProfile, securityProfile_EditCurCall=securityProfile_EditCurCall, securityProfile_Name=securityProfile_Name, securityProfile_Download=securityProfile_Download, securityProfile_UseTacacsPlus=securityProfile_UseTacacsPlus, securityProfile_OwnPortDiag=securityProfile_OwnPortDiag, securityProfile_Operations=securityProfile_Operations, securityProfile_EditSecurity=securityProfile_EditSecurity, securityProfile_AllPortDiag=securityProfile_AllPortDiag, securityProfile_Password=securityProfile_Password, securityProfile_EditSystem=securityProfile_EditSystem, securityProfile_SysDiag=securityProfile_SysDiag, securityProfile_EditAllPort=securityProfile_EditAllPort, mibsecurityProfileTable=mibsecurityProfileTable, securityProfile_EditAllCall=securityProfile_EditAllCall, securityProfile_EditOwnPort=securityProfile_EditOwnPort) |
while True:
s = input("Ukucaj nesto: ")
if s == "izlaz":
break
if len(s) < 3:
print("Previse je kratko.")
continue
print("Input je zadovoljavajuce duzine.")
#mozete zadavati druge komande za neki rad ovdej
| while True:
s = input('Ukucaj nesto: ')
if s == 'izlaz':
break
if len(s) < 3:
print('Previse je kratko.')
continue
print('Input je zadovoljavajuce duzine.') |
pancakes = int(input())
if pancakes > 3:
print("Yum!")
else: #if pancakes < 3:
print("Still hungry!")
| pancakes = int(input())
if pancakes > 3:
print('Yum!')
else:
print('Still hungry!') |
users_calculation = {}
def request_addition(user, num1, num2):
users_calcs = users_calculation.get(user)
if (users_calcs is None):
users_calcs = list()
users_calcs.append(num1+num2)
users_calculation[user] = users_calcs
def get_last_calculation(user):
users_calcs = users_calculation.get(user)
results = None
if (users_calcs is not None and len(users_calcs) > 0):
results = users_calcs.pop()
return results
| users_calculation = {}
def request_addition(user, num1, num2):
users_calcs = users_calculation.get(user)
if users_calcs is None:
users_calcs = list()
users_calcs.append(num1 + num2)
users_calculation[user] = users_calcs
def get_last_calculation(user):
users_calcs = users_calculation.get(user)
results = None
if users_calcs is not None and len(users_calcs) > 0:
results = users_calcs.pop()
return results |
def x(a, b, c):
p = 5
b = int(x)
print(b) | def x(a, b, c):
p = 5
b = int(x)
print(b) |
# from https://en.wikipedia.org/wiki/Test_functions_for_optimization
#
# takes input parameters x,y
# returns value in "ans"
# optimal minimum at f(3,0.5) = 0
# parameter range is -4.5 <= x,y <= 4.5
def evaluate(x,y):
return (1.5 - x + x*y)**2 + (2.25 - x + x*y*y)**2 + (2.625 - x + x*y*y*y)**2
def run(self,Inputs):
if abs(self.y - 0.24392555296) <= 0.00001 and abs(self.x - 0.247797586626) <= 0.00001 :
print("Expected failure for testing ... x:"+str(self.x)+" | y:"+str(self.y))
raise Exception("expected failure for testing")
self.ans = evaluate(self.x,self.y)
| def evaluate(x, y):
return (1.5 - x + x * y) ** 2 + (2.25 - x + x * y * y) ** 2 + (2.625 - x + x * y * y * y) ** 2
def run(self, Inputs):
if abs(self.y - 0.24392555296) <= 1e-05 and abs(self.x - 0.247797586626) <= 1e-05:
print('Expected failure for testing ... x:' + str(self.x) + ' | y:' + str(self.y))
raise exception('expected failure for testing')
self.ans = evaluate(self.x, self.y) |
# -*- coding: utf-8 -*-
def create():
resourceDict = dict()
return resourceDict
def addOne(resourceDict, key, value):
if (len(key)<=2):
return 'err'
if (key[0:2]!="##"):
print("key must be like '##xx' : %s " % key)
return 'err'
resourceDict[key] = value
return 'ok'
| def create():
resource_dict = dict()
return resourceDict
def add_one(resourceDict, key, value):
if len(key) <= 2:
return 'err'
if key[0:2] != '##':
print("key must be like '##xx' : %s " % key)
return 'err'
resourceDict[key] = value
return 'ok' |
class DuplicateTagsWarning(UserWarning):
def get_warning_message(self, duplicate_tags, name):
return f"Semantic tag(s) '{', '.join(duplicate_tags)}' already present on column '{name}'"
class StandardTagsChangedWarning(UserWarning):
def get_warning_message(self, use_standard_tags, col_name=None):
changed = "added to" if use_standard_tags else "removed from"
name = ('"' + col_name + '"') if col_name is not None else "your column"
return f"Standard tags have been {changed} {name}"
class UpgradeSchemaWarning(UserWarning):
def get_warning_message(self, saved_version_str, current_schema_version):
return (
"The schema version of the saved Woodwork table "
"%s is greater than the latest supported %s. "
"You may need to upgrade woodwork. Attempting to load Woodwork table ..."
% (saved_version_str, current_schema_version)
)
class OutdatedSchemaWarning(UserWarning):
def get_warning_message(self, saved_version_str):
return (
"The schema version of the saved Woodwork table "
"%s is no longer supported by this version "
"of woodwork. Attempting to load Woodwork table ..." % (saved_version_str)
)
class IndexTagRemovedWarning(UserWarning):
pass
class TypingInfoMismatchWarning(UserWarning):
def get_warning_message(self, attr, invalid_reason, object_type):
return (
f"Operation performed by {attr} has invalidated the Woodwork typing information:\n "
f"{invalid_reason}.\n "
f"Please initialize Woodwork with {object_type}.ww.init"
)
class TypeConversionError(Exception):
def __init__(self, series, new_dtype, logical_type):
message = f"Error converting datatype for {series.name} from type {str(series.dtype)} "
message += f"to type {new_dtype}. Please confirm the underlying data is consistent with "
message += f"logical type {logical_type}."
super().__init__(message)
class TypeConversionWarning(UserWarning):
pass
class ParametersIgnoredWarning(UserWarning):
pass
class ColumnNotPresentError(KeyError):
def __init__(self, column):
if isinstance(column, str):
return super().__init__(
f"Column with name '{column}' not found in DataFrame"
)
elif isinstance(column, list):
return super().__init__(f"Column(s) '{column}' not found in DataFrame")
class WoodworkNotInitError(AttributeError):
pass
class WoodworkNotInitWarning(UserWarning):
pass
| class Duplicatetagswarning(UserWarning):
def get_warning_message(self, duplicate_tags, name):
return f"Semantic tag(s) '{', '.join(duplicate_tags)}' already present on column '{name}'"
class Standardtagschangedwarning(UserWarning):
def get_warning_message(self, use_standard_tags, col_name=None):
changed = 'added to' if use_standard_tags else 'removed from'
name = '"' + col_name + '"' if col_name is not None else 'your column'
return f'Standard tags have been {changed} {name}'
class Upgradeschemawarning(UserWarning):
def get_warning_message(self, saved_version_str, current_schema_version):
return 'The schema version of the saved Woodwork table %s is greater than the latest supported %s. You may need to upgrade woodwork. Attempting to load Woodwork table ...' % (saved_version_str, current_schema_version)
class Outdatedschemawarning(UserWarning):
def get_warning_message(self, saved_version_str):
return 'The schema version of the saved Woodwork table %s is no longer supported by this version of woodwork. Attempting to load Woodwork table ...' % saved_version_str
class Indextagremovedwarning(UserWarning):
pass
class Typinginfomismatchwarning(UserWarning):
def get_warning_message(self, attr, invalid_reason, object_type):
return f'Operation performed by {attr} has invalidated the Woodwork typing information:\n {invalid_reason}.\n Please initialize Woodwork with {object_type}.ww.init'
class Typeconversionerror(Exception):
def __init__(self, series, new_dtype, logical_type):
message = f'Error converting datatype for {series.name} from type {str(series.dtype)} '
message += f'to type {new_dtype}. Please confirm the underlying data is consistent with '
message += f'logical type {logical_type}.'
super().__init__(message)
class Typeconversionwarning(UserWarning):
pass
class Parametersignoredwarning(UserWarning):
pass
class Columnnotpresenterror(KeyError):
def __init__(self, column):
if isinstance(column, str):
return super().__init__(f"Column with name '{column}' not found in DataFrame")
elif isinstance(column, list):
return super().__init__(f"Column(s) '{column}' not found in DataFrame")
class Woodworknotiniterror(AttributeError):
pass
class Woodworknotinitwarning(UserWarning):
pass |
"""
write your first program in python
"""
print("helloworld in python !!")
| """
write your first program in python
"""
print('helloworld in python !!') |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.