content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# # PySNMP MIB module DOT3-OAM-MIB (http://pysnmp.sf.net) # ASN.1 source http://mibs.snmplabs.com:80/asn1/DOT3-OAM-MIB # Produced by pysmi-0.0.7 at Sun Feb 14 00:10:39 2016 # On host bldfarm platform Linux version 4.1.13-100.fc21.x86_64 by user goose # Using Python version 3.5.0 (default, Jan 5 2016, 17:11:52) # ( Integer, OctetString, ObjectIdentifier, ) = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint") ( CounterBasedGauge64, ) = mibBuilder.importSymbols("HCNUM-TC", "CounterBasedGauge64") ( ifIndex, ) = mibBuilder.importSymbols("IF-MIB", "ifIndex") ( ObjectGroup, ModuleCompliance, NotificationGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup") ( Bits, Gauge32, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, TimeTicks, ModuleIdentity, Unsigned32, IpAddress, NotificationType, iso, mib_2, ObjectIdentity, Integer32, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Gauge32", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "TimeTicks", "ModuleIdentity", "Unsigned32", "IpAddress", "NotificationType", "iso", "mib-2", "ObjectIdentity", "Integer32", "Counter32") ( TruthValue, TextualConvention, MacAddress, TimeStamp, DisplayString, ) = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TextualConvention", "MacAddress", "TimeStamp", "DisplayString") dot3OamMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 158)).setRevisions(("2007-06-14 00:00",)) if mibBuilder.loadTexts: dot3OamMIB.setLastUpdated('200706140000Z') if mibBuilder.loadTexts: dot3OamMIB.setOrganization('IETF Ethernet Interfaces and Hub MIB Working Group') if mibBuilder.loadTexts: dot3OamMIB.setContactInfo('WG Charter:\n http://www.ietf.org/html.charters/hubmib-charter.html\n Mailing lists:\n General Discussion: [email protected]\n To Subscribe: [email protected]\n In Body: subscribe your_email_address\n Chair: Bert Wijnen\n Alcatel-Lucent\n Email: bwijnen at alcatel-lucent dot com\n Editor: Matt Squire\n Hatteras Networks\n E-mail: msquire at hatterasnetworks dot com\n ') if mibBuilder.loadTexts: dot3OamMIB.setDescription("The MIB module for managing the new Ethernet OAM features\n introduced by the Ethernet in the First Mile taskforce (IEEE\n 802.3ah). The functionality presented here is based on IEEE\n 802.3ah [802.3ah], released in October, 2004. [802.3ah] was\n prepared as an addendum to the standing version of IEEE 802.3\n [802.3-2002]. Since then, [802.3ah] has been\n merged into the base IEEE 802.3 specification in [802.3-2005].\n\n In particular, this MIB focuses on the new OAM functions\n introduced in Clause 57 of [802.3ah]. The OAM functionality\n of Clause 57 is controlled by new management attributes\n introduced in Clause 30 of [802.3ah]. The OAM functions are\n not specific to any particular Ethernet physical layer, and\n can be generically applied to any Ethernet interface of\n [802.3-2002].\n\n An Ethernet OAM protocol data unit is a valid Ethernet frame\n with a destination MAC address equal to the reserved MAC\n address for Slow Protocols (See 43B of [802.3ah]), a\n lengthOrType field equal to the reserved type for Slow\n Protocols, and a Slow Protocols subtype equal to that of the\n subtype reserved for Ethernet OAM. OAMPDU is used throughout\n this document as an abbreviation for Ethernet OAM protocol\n data unit.\n\n The following reference is used throughout this MIB module:\n\n [802.3ah] refers to:\n IEEE Std 802.3ah-2004: 'Draft amendment to -\n Information technology - Telecommunications and\n information exchange between systems - Local and\n metropolitan area networks - Specific requirements - Part\n 3: Carrier sense multiple access with collision detection\n (CSMA/CD) access method and physical layer specifications\n - Media Access Control Parameters, Physical Layers and\n Management Parameters for subscriber access networks',\n October 2004.\n\n [802.3-2002] refers to:\n IEEE Std 802.3-2002:\n 'Information technology - Telecommunications and\n information exchange between systems - Local and\n metropolitan area networks - Specific requirements - Part\n 3: Carrier sense multiple access with collision detection\n (CSMA/CD) access method and physical layer specifications\n - Media Access Control Parameters, Physical Layers and\n Management Parameters for subscriber access networks',\n March 2002.\n\n [802.3-2005] refers to:\n IEEE Std 802.3-2005:\n 'Information technology - Telecommunications and\n information exchange between systems - Local and\n metropolitan area networks - Specific requirements - Part\n 3: Carrier sense multiple access with collision detection\n (CSMA/CD) access method and physical layer specifications\n - Media Access Control Parameters, Physical Layers and\n Management Parameters for subscriber access networks',\n December 2005.\n\n [802-2001] refers to:\n 'IEEE Standard for LAN/MAN (Local Area\n Network/Metropolitan Area Network): Overview and\n Architecture', IEEE 802, June 2001.\n\n Copyright (c) The IETF Trust (2007). This version of\n this MIB module is part of RFC 4878; See the RFC itself for\n full legal notices. ") dot3OamNotifications = MibIdentifier((1, 3, 6, 1, 2, 1, 158, 0)) dot3OamObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 158, 1)) dot3OamConformance = MibIdentifier((1, 3, 6, 1, 2, 1, 158, 2)) class EightOTwoOui(OctetString, TextualConvention): subtypeSpec = OctetString.subtypeSpec+ValueSizeConstraint(3,3) fixedLength = 3 dot3OamTable = MibTable((1, 3, 6, 1, 2, 1, 158, 1, 1), ) if mibBuilder.loadTexts: dot3OamTable.setDescription('This table contains the primary controls and status for the\n OAM capabilities of an Ethernet-like interface. There will be\n one row in this table for each Ethernet-like interface in the\n system that supports the OAM functions defined in [802.3ah].\n ') dot3OamEntry = MibTableRow((1, 3, 6, 1, 2, 1, 158, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: dot3OamEntry.setDescription('An entry in the table that contains information on the\n Ethernet OAM function for a single Ethernet like interface.\n Entries in the table are created automatically for each\n interface supporting Ethernet OAM. The status of the row\n entry can be determined from dot3OamOperStatus.\n\n A dot3OamEntry is indexed in the dot3OamTable by the ifIndex\n object of the Interfaces MIB.\n ') dot3OamAdminState = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamAdminState.setDescription('This object is used to provision the default administrative\n OAM mode for this interface. This object represents the\n desired state of OAM for this interface.\n\n The dot3OamAdminState always starts in the disabled(2) state\n until an explicit management action or configuration\n information retained by the system causes a transition to the\n enabled(1) state. When enabled(1), Ethernet OAM will attempt\n to operate over this interface.\n ') dot3OamOperStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10,))).clone(namedValues=NamedValues(("disabled", 1), ("linkFault", 2), ("passiveWait", 3), ("activeSendLocal", 4), ("sendLocalAndRemote", 5), ("sendLocalAndRemoteOk", 6), ("oamPeeringLocallyRejected", 7), ("oamPeeringRemotelyRejected", 8), ("operational", 9), ("nonOperHalfDuplex", 10),))).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamOperStatus.setDescription('At initialization and failure conditions, two OAM entities on\n\n the same full-duplex Ethernet link begin a discovery phase to\n determine what OAM capabilities may be used on that link. The\n progress of this initialization is controlled by the OA\n sublayer.\n\n This value is always disabled(1) if OAM is disabled on this\n interface via the dot3OamAdminState.\n\n If the link has detected a fault and is transmitting OAMPDUs\n with a link fault indication, the value is linkFault(2).\n Also, if the interface is not operational (ifOperStatus is\n not up(1)), linkFault(2) is returned. Note that the object\n ifOperStatus may not be up(1) as a result of link failure or\n administrative action (ifAdminState being down(2) or\n testing(3)).\n\n The passiveWait(3) state is returned only by OAM entities in\n passive mode (dot3OamMode) and reflects the state in which the\n OAM entity is waiting to see if the peer device is OA\n capable. The activeSendLocal(4) value is used by active mode\n devices (dot3OamMode) and reflects the OAM entity actively\n trying to discover whether the peer has OAM capability but has\n not yet made that determination.\n\n The state sendLocalAndRemote(5) reflects that the local OA\n entity has discovered the peer but has not yet accepted or\n rejected the configuration of the peer. The local device can,\n for whatever reason, decide that the peer device is\n unacceptable and decline OAM peering. If the local OAM entity\n rejects the peer OAM entity, the state becomes\n oamPeeringLocallyRejected(7). If the OAM peering is allowed\n by the local device, the state moves to\n sendLocalAndRemoteOk(6). Note that both the\n sendLocalAndRemote(5) and oamPeeringLocallyRejected(7) states\n fall within the state SEND_LOCAL_REMOTE of the Discovery state\n diagram [802.3ah, Figure 57-5], with the difference being\n whether the local OAM client has actively rejected the peering\n or has just not indicated any decision yet. Whether a peering\n decision has been made is indicated via the local flags field\n in the OAMPDU (reflected in the aOAMLocalFlagsField of\n 30.3.6.1.10).\n\n If the remote OAM entity rejects the peering, the state\n becomes oamPeeringRemotelyRejected(8). Note that both the\n sendLocalAndRemoteOk(6) and oamPeeringRemotelyRejected(8)\n states fall within the state SEND_LOCAL_REMOTE_OK of the\n Discovery state diagram [802.3ah, Figure 57-5], with the\n difference being whether the remote OAM client has rejected\n\n the peering or has just not yet decided. This is indicated\n via the remote flags field in the OAMPDU (reflected in the\n aOAMRemoteFlagsField of 30.3.6.1.11).\n\n When the local OAM entity learns that both it and the remote\n OAM entity have accepted the peering, the state moves to\n operational(9) corresponding to the SEND_ANY state of the\n Discovery state diagram [802.3ah, Figure 57-5].\n\n Since Ethernet OAM functions are not designed to work\n completely over half-duplex interfaces, the value\n nonOperHalfDuplex(10) is returned whenever Ethernet OAM is\n enabled (dot3OamAdminState is enabled(1)), but the interface\n is in half-duplex operation.\n ') dot3OamMode = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("passive", 1), ("active", 2),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamMode.setDescription("This object configures the mode of OAM operation for this\n Ethernet-like interface. OAM on Ethernet interfaces may be in\n 'active' mode or 'passive' mode. These two modes differ in\n that active mode provides additional capabilities to initiate\n monitoring activities with the remote OAM peer entity, while\n passive mode generally waits for the peer to initiate OA\n actions with it. As an example, an active OAM entity can put\n the remote OAM entity in a loopback state, where a passive OA\n entity cannot.\n\n The default value of dot3OamMode is dependent on the type of\n system on which this Ethernet-like interface resides. The\n default value should be 'active(2)' unless it is known that\n this system should take on a subservient role to the other\n device connected over this interface.\n\n Changing this value results in incrementing the configuration\n revision field of locally generated OAMPDUs (30.3.6.1.12) and\n potentially re-doing the OAM discovery process if the\n dot3OamOperStatus was already operational(9).\n ") dot3OamMaxOamPduSize = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(64,1518))).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamMaxOamPduSize.setDescription('The largest OAMPDU that the OAM entity supports. OA\n entities exchange maximum OAMPDU sizes and negotiate to use\n the smaller of the two maximum OAMPDU sizes between the peers.\n This value is determined by the local implementation.\n ') dot3OamConfigRevision = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 1, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamConfigRevision.setDescription('The configuration revision of the OAM entity as reflected in\n the latest OAMPDU sent by the OAM entity. The config revision\n is used by OAM entities to indicate that configuration changes\n have occurred, which might require the peer OAM entity to\n re-evaluate whether OAM peering is allowed.\n ') dot3OamFunctionsSupported = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 1, 1, 6), Bits().clone(namedValues=NamedValues(("unidirectionalSupport", 0), ("loopbackSupport", 1), ("eventSupport", 2), ("variableSupport", 3),))).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamFunctionsSupported.setDescription("The OAM functions supported on this Ethernet-like interface.\n OAM consists of separate functional sets beyond the basic\n discovery process that is always required. These functional\n groups can be supported independently by any implementation.\n These values are communicated to the peer via the local\n configuration field of Information OAMPDUs.\n\n Setting 'unidirectionalSupport(0)' indicates that the OA\n\n entity supports the transmission of OAMPDUs on links that are\n operating in unidirectional mode (traffic flowing in one\n direction only). Setting 'loopbackSupport(1)' indicates that\n the OAM entity can initiate and respond to loopback commands.\n Setting 'eventSupport(2)' indicates that the OAM entity can\n send and receive Event Notification OAMPDUs. Setting\n 'variableSupport(3)' indicates that the OAM entity can send\n and receive Variable Request and Response OAMPDUs.\n ") dot3OamPeerTable = MibTable((1, 3, 6, 1, 2, 1, 158, 1, 2), ) if mibBuilder.loadTexts: dot3OamPeerTable.setDescription('This table contains information about the OAM peer for a\n particular Ethernet-like interface. OAM entities communicate\n with a single OAM peer entity on Ethernet links on which OA\n is enabled and operating properly. There is one entry in this\n table for each entry in the dot3OamTable for which information\n on the peer OAM entity is available.\n ') dot3OamPeerEntry = MibTableRow((1, 3, 6, 1, 2, 1, 158, 1, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: dot3OamPeerEntry.setDescription('An entry in the table containing information on the peer OA\n entity for a single Ethernet-like interface.\n\n Note that there is at most one OAM peer for each Ethernet-like\n interface. Entries are automatically created when information\n about the OAM peer entity becomes available, and automatically\n deleted when the OAM peer entity is no longer in\n communication. Peer information is not available when\n dot3OamOperStatus is disabled(1), linkFault(2),\n passiveWait(3), activeSendLocal(4), or nonOperHalfDuplex(10).\n ') dot3OamPeerMacAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 1), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamPeerMacAddress.setDescription('The MAC address of the peer OAM entity. The MAC address is\n derived from the most recently received OAMPDU.\n ') dot3OamPeerVendorOui = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 2), EightOTwoOui()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamPeerVendorOui.setDescription('The OUI of the OAM peer as reflected in the latest\n Information OAMPDU received with a Local Information TLV. The\n OUI can be used to identify the vendor of the remote OA\n entity. This value is initialized to three octets of zero\n before any Local Information TLV is received.\n ') dot3OamPeerVendorInfo = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamPeerVendorInfo.setDescription('The Vendor Info of the OAM peer as reflected in the latest\n Information OAMPDU received with a Local Information TLV.\n The semantics of the Vendor Information field is proprietary\n and specific to the vendor (identified by the\n dot3OamPeerVendorOui). This information could, for example,\n\n be used to identify a specific product or product family.\n This value is initialized to zero before any Local\n Information TLV is received.\n ') dot3OamPeerMode = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("passive", 1), ("active", 2), ("unknown", 3),))).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamPeerMode.setDescription('The mode of the OAM peer as reflected in the latest\n Information OAMPDU received with a Local Information TLV. The\n mode of the peer can be determined from the Configuration\n field in the Local Information TLV of the last Information\n OAMPDU received from the peer. The value is unknown(3)\n whenever no Local Information TLV has been received. The\n values of active(2) and passive(1) are returned when a Local\n Information TLV has been received indicating that the peer is\n in active or passive mode, respectively.\n ') dot3OamPeerMaxOamPduSize = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 5), Unsigned32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0,0),ValueRangeConstraint(64,1518),))).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamPeerMaxOamPduSize.setDescription("The maximum size of OAMPDU supported by the peer as reflected\n in the latest Information OAMPDU received with a Local\n Information TLV. Ethernet OAM on this interface must not use\n OAMPDUs that exceed this size. The maximum OAMPDU size can be\n determined from the PDU Configuration field of the Local\n Information TLV of the last Information OAMPDU received from\n the peer. A value of zero is returned if no Local Information\n TLV has been received. Otherwise, the value of the OAM peer's\n maximum OAMPDU size is returned in this value.\n ") dot3OamPeerConfigRevision = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamPeerConfigRevision.setDescription('The configuration revision of the OAM peer as reflected in\n the latest OAMPDU. This attribute is changed by the peer\n whenever it has a local configuration change for Ethernet OA\n on this interface. The configuration revision can be\n determined from the Revision field of the Local Information\n TLV of the most recently received Information OAMPDU with\n a Local Information TLV. A value of zero is returned if\n no Local Information TLV has been received.\n ') dot3OamPeerFunctionsSupported = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 7), Bits().clone(namedValues=NamedValues(("unidirectionalSupport", 0), ("loopbackSupport", 1), ("eventSupport", 2), ("variableSupport", 3),))).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamPeerFunctionsSupported.setDescription('The OAM functions supported on this Ethernet-like interface.\n OAM consists of separate functionality sets above the basic\n discovery process. This value indicates the capabilities of\n the peer OAM entity with respect to these functions. This\n value is initialized so all bits are clear.\n\n If unidirectionalSupport(0) is set, then the peer OAM entity\n supports sending OAM frames on Ethernet interfaces when the\n receive path is known to be inoperable. If\n loopbackSupport(1) is set, then the peer OAM entity can send\n and receive OAM loopback commands. If eventSupport(2) is set,\n then the peer OAM entity can send and receive event OAMPDUs to\n signal various error conditions. If variableSupport(3) is\n set, then the peer OAM entity can send and receive variable\n requests to monitor the attribute value as described in Clause\n 57 of [802.3ah].\n\n The capabilities of the OAM peer can be determined from the\n configuration field of the Local Information TLV of the most\n recently received Information OAMPDU with a Local Information\n TLV. All zeros are returned if no Local Information TLV has\n\n yet been received.\n ') dot3OamLoopbackTable = MibTable((1, 3, 6, 1, 2, 1, 158, 1, 3), ) if mibBuilder.loadTexts: dot3OamLoopbackTable.setDescription("This table contains controls for the loopback state of the\n local link as well as indicates the status of the loopback\n function. There is one entry in this table for each entry in\n dot3OamTable that supports loopback functionality (where\n dot3OamFunctionsSupported includes the loopbackSupport bit\n set).\n\n Loopback can be used to place the remote OAM entity in a state\n where every received frame (except OAMPDUs) is echoed back\n over the same interface on which they were received. In this\n state, at the remote entity, 'normal' traffic is disabled as\n only the looped back frames are transmitted on the interface.\n Loopback is thus an intrusive operation that prohibits normal\n data flow and should be used accordingly.\n ") dot3OamLoopbackEntry = MibTableRow((1, 3, 6, 1, 2, 1, 158, 1, 3, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: dot3OamLoopbackEntry.setDescription('An entry in the table, containing information on the loopback\n status for a single Ethernet-like interface. Entries in the\n table are automatically created whenever the local OAM entity\n supports loopback capabilities. The loopback status on the\n interface can be determined from the dot3OamLoopbackStatus\n object.\n ') dot3OamLoopbackStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6,))).clone(namedValues=NamedValues(("noLoopback", 1), ("initiatingLoopback", 2), ("remoteLoopback", 3), ("terminatingLoopback", 4), ("localLoopback", 5), ("unknown", 6),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamLoopbackStatus.setDescription("The loopback status of the OAM entity. This status is\n determined by a combination of the local parser and\n multiplexer states, the remote parser and multiplexer states,\n as well as by the actions of the local OAM client. When\n operating in normal mode with no loopback in progress, the\n status reads noLoopback(1).\n\n The values initiatingLoopback(2) and terminatingLoopback(4)\n can be read or written. The other values can only be read -\n they can never be written. Writing initiatingLoopback causes\n the local OAM entity to start the loopback process with its\n peer. This value can only be written when the status is\n noLoopback(1). Writing the value initiatingLoopback(2) in any\n other state has no effect. When in remoteLoopback(3), writing\n terminatingLoopback(4) causes the local OAM entity to initiate\n the termination of the loopback state. Writing\n terminatingLoopack(4) in any other state has no effect.\n\n If the OAM client initiates a loopback and has sent a\n Loopback OAMPDU and is waiting for a response, where the local\n parser and multiplexer states are DISCARD (see [802.3ah,\n 57.2.11.1]), the status is 'initiatingLoopback'. In this\n case, the local OAM entity has yet to receive any\n acknowledgment that the remote OAM entity has received its\n loopback command request.\n\n If the local OAM client knows that the remote OAM entity is in\n loopback mode (via the remote state information as described\n in [802.3ah, 57.2.11.1, 30.3.6.1.15]), the status is\n remoteLoopback(3). If the local OAM client is in the process\n of terminating the remote loopback [802.3ah, 57.2.11.3,\n 30.3.6.1.14] with its local multiplexer and parser states in\n DISCARD, the status is terminatingLoopback(4). If the remote\n OAM client has put the local OAM entity in loopback mode as\n indicated by its local parser state, the status is\n localLoopback(5).\n\n The unknown(6) status indicates that the parser and\n multiplexer combination is unexpected. This status may be\n returned if the OAM loopback is in a transition state but\n should not persist.\n\n The values of this attribute correspond to the following\n values of the local and remote parser and multiplexer states.\n\n value LclPrsr LclMux RmtPrsr RmtMux\n noLoopback FWD FWD FWD FWD\n initLoopback DISCARD DISCARD FWD FWD\n rmtLoopback DISCARD FWD LPBK DISCARD\n tmtngLoopback DISCARD DISCARD LPBK DISCARD\n lclLoopback LPBK DISCARD DISCARD FWD\n unknown *** any other combination ***\n ") dot3OamLoopbackIgnoreRx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("ignore", 1), ("process", 2),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamLoopbackIgnoreRx.setDescription('Since OAM loopback is a disruptive operation (user traffic\n does not pass), this attribute provides a mechanism to provide\n controls over whether received OAM loopback commands are\n processed or ignored. When the value is ignore(1), received\n loopback commands are ignored. When the value is process(2),\n OAM loopback commands are processed. The default value is to\n ignore loopback commands (ignore(1)).\n ') dot3OamStatsTable = MibTable((1, 3, 6, 1, 2, 1, 158, 1, 4), ) if mibBuilder.loadTexts: dot3OamStatsTable.setDescription('This table contains statistics for the OAM function on a\n particular Ethernet-like interface. There is an entry in the\n table for every entry in the dot3OamTable.\n\n The counters in this table are defined as 32-bit entries to\n match the counter size as defined in [802.3ah]. Given that\n the OA protocol is a slow protocol, the counters increment at\n a slow rate.\n ') dot3OamStatsEntry = MibTableRow((1, 3, 6, 1, 2, 1, 158, 1, 4, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: dot3OamStatsEntry.setDescription('An entry in the table containing statistics information on\n the Ethernet OAM function for a single Ethernet-like\n interface. Entries are automatically created for every entry\n in the dot3OamTable. Counters are maintained across\n transitions in dot3OamOperStatus.\n ') dot3OamInformationTx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 1), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamInformationTx.setDescription('A count of the number of Information OAMPDUs transmitted on\n this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime. ') dot3OamInformationRx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 2), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamInformationRx.setDescription('A count of the number of Information OAMPDUs received on this\n interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamUniqueEventNotificationTx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 3), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamUniqueEventNotificationTx.setDescription('A count of the number of unique Event OAMPDUs transmitted on\n this interface. Event Notifications may be sent in duplicate\n to increase the probability of successfully being received,\n\n given the possibility that a frame may be lost in transit.\n Duplicate Event Notification transmissions are counted by\n dot3OamDuplicateEventNotificationTx.\n\n A unique Event Notification OAMPDU is indicated as an Event\n Notification OAMPDU with a Sequence Number field that is\n distinct from the previously transmitted Event Notification\n OAMPDU Sequence Number.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamUniqueEventNotificationRx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 4), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamUniqueEventNotificationRx.setDescription('A count of the number of unique Event OAMPDUs received on\n this interface. Event Notification OAMPDUs may be sent in\n duplicate to increase the probability of successfully being\n received, given the possibility that a frame may be lost in\n transit. Duplicate Event Notification receptions are counted\n by dot3OamDuplicateEventNotificationRx.\n\n A unique Event Notification OAMPDU is indicated as an Event\n Notification OAMPDU with a Sequence Number field that is\n distinct from the previously received Event Notification\n OAMPDU Sequence Number.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamDuplicateEventNotificationTx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 5), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamDuplicateEventNotificationTx.setDescription('A count of the number of duplicate Event OAMPDUs transmitted\n\n on this interface. Event Notification OAMPDUs may be sent in\n duplicate to increase the probability of successfully being\n received, given the possibility that a frame may be lost in\n transit.\n\n A duplicate Event Notification OAMPDU is indicated as an Event\n Notification OAMPDU with a Sequence Number field that is\n identical to the previously transmitted Event Notification\n OAMPDU Sequence Number.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamDuplicateEventNotificationRx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 6), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamDuplicateEventNotificationRx.setDescription('A count of the number of duplicate Event OAMPDUs received on\n this interface. Event Notification OAMPDUs may be sent in\n duplicate to increase the probability of successfully being\n received, given the possibility that a frame may be lost in\n transit.\n\n A duplicate Event Notification OAMPDU is indicated as an Event\n Notification OAMPDU with a Sequence Number field that is\n identical to the previously received Event Notification OAMPDU\n Sequence Number.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamLoopbackControlTx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 7), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamLoopbackControlTx.setDescription('A count of the number of Loopback Control OAMPDUs transmitted\n\n on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamLoopbackControlRx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 8), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamLoopbackControlRx.setDescription('A count of the number of Loopback Control OAMPDUs received\n on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamVariableRequestTx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 9), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamVariableRequestTx.setDescription('A count of the number of Variable Request OAMPDUs transmitted\n on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamVariableRequestRx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 10), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamVariableRequestRx.setDescription('A count of the number of Variable Request OAMPDUs received on\n\n this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamVariableResponseTx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 11), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamVariableResponseTx.setDescription('A count of the number of Variable Response OAMPDUs\n transmitted on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamVariableResponseRx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 12), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamVariableResponseRx.setDescription('A count of the number of Variable Response OAMPDUs received\n on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamOrgSpecificTx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 13), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamOrgSpecificTx.setDescription('A count of the number of Organization Specific OAMPDUs\n\n transmitted on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamOrgSpecificRx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 14), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamOrgSpecificRx.setDescription('A count of the number of Organization Specific OAMPDUs\n received on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamUnsupportedCodesTx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 15), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamUnsupportedCodesTx.setDescription('A count of the number of OAMPDUs transmitted on this\n interface with an unsupported op-code.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamUnsupportedCodesRx = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 16), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamUnsupportedCodesRx.setDescription('A count of the number of OAMPDUs received on this interface\n\n with an unsupported op-code.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3OamFramesLostDueToOam = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 17), Counter32()).setUnits('frames').setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamFramesLostDueToOam.setDescription("A count of the number of frames that were dropped by the OA\n multiplexer. Since the OAM multiplexer has multiple inputs\n and a single output, there may be cases where frames are\n dropped due to transmit resource contention. This counter is\n incremented whenever a frame is dropped by the OAM layer.\n Note that any Ethernet frame, not just OAMPDUs, may be dropped\n by the OAM layer. This can occur when an OAMPDU takes\n precedence over a 'normal' frame resulting in the 'normal'\n frame being dropped.\n\n When this counter is incremented, no other counters in this\n MIB are incremented.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ") dot3OamEventConfigTable = MibTable((1, 3, 6, 1, 2, 1, 158, 1, 5), ) if mibBuilder.loadTexts: dot3OamEventConfigTable.setDescription('Ethernet OAM includes the ability to generate and receive\n Event Notification OAMPDUs to indicate various link problems.\n This table contains the mechanisms to enable Event\n\n Notifications and configure the thresholds to generate the\n standard Ethernet OAM events. There is one entry in the table\n for every entry in dot3OamTable that supports OAM events\n (where dot3OamFunctionsSupported includes the eventSupport\n bit set). The values in the table are maintained across\n changes to dot3OamOperStatus.\n\n The standard threshold crossing events are:\n - Errored Symbol Period Event. Generated when the number of\n symbol errors exceeds a threshold within a given window\n defined by a number of symbols (for example, 1,000 symbols\n out of 1,000,000 had errors).\n - Errored Frame Period Event. Generated when the number of\n frame errors exceeds a threshold within a given window\n defined by a number of frames (for example, 10 frames out\n of 1000 had errors).\n - Errored Frame Event. Generated when the number of frame\n errors exceeds a threshold within a given window defined\n by a period of time (for example, 10 frames in 1 second\n had errors).\n - Errored Frame Seconds Summary Event. Generated when the\n number of errored frame seconds exceeds a threshold within\n a given time period (for example, 10 errored frame seconds\n within the last 100 seconds). An errored frame second is\n defined as a 1 second interval which had >0 frame errors.\n There are other events (dying gasp, critical events) that are\n not threshold crossing events but which can be\n enabled/disabled via this table.\n ') dot3OamEventConfigEntry = MibTableRow((1, 3, 6, 1, 2, 1, 158, 1, 5, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: dot3OamEventConfigEntry.setDescription('Entries are automatically created and deleted from this\n table, and exist whenever the OAM entity supports Ethernet OA\n events (as indicated by the eventSupport bit in\n dot3OamFunctionsSuppported). Values in the table are\n maintained across changes to the value of dot3OamOperStatus.\n\n Event configuration controls when the local management entity\n sends Event Notification OAMPDUs to its OAM peer, and when\n certain event flags are set or cleared in OAMPDUs.\n ') dot3OamErrSymPeriodWindowHi = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 1), Unsigned32()).setUnits('2^32 symbols').setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrSymPeriodWindowHi.setDescription('The two objects dot3OamErrSymPeriodWindowHi and\n dot3OamErrSymPeriodLo together form an unsigned 64-bit\n integer representing the number of symbols over which this\n threshold event is defined. This is defined as\n dot3OamErrSymPeriodWindow = ((2^32)*dot3OamErrSymPeriodWindowHi)\n + dot3OamErrSymPeriodWindowLo\n\n If dot3OamErrSymPeriodThreshold symbol errors occur within a\n window of dot3OamErrSymPeriodWindow symbols, an Event\n Notification OAMPDU should be generated with an Errored Symbol\n Period Event TLV indicating that the threshold has been\n crossed in this window.\n\n The default value for dot3OamErrSymPeriodWindow is the number\n of symbols in one second for the underlying physical layer.\n ') dot3OamErrSymPeriodWindowLo = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 2), Unsigned32()).setUnits('symbols').setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrSymPeriodWindowLo.setDescription('The two objects dot3OamErrSymPeriodWindowHi and\n dot3OamErrSymPeriodWindowLo together form an unsigned 64-bit\n integer representing the number of symbols over which this\n threshold event is defined. This is defined as\n\n dot3OamErrSymPeriodWindow = ((2^32)*dot3OamErrSymPeriodWindowHi)\n + dot3OamErrSymPeriodWindowLo\n\n If dot3OamErrSymPeriodThreshold symbol errors occur within a\n window of dot3OamErrSymPeriodWindow symbols, an Event\n Notification OAMPDU should be generated with an Errored Symbol\n Period Event TLV indicating that the threshold has been\n crossed in this window.\n\n The default value for dot3OamErrSymPeriodWindow is the number\n of symbols in one second for the underlying physical layer.\n ') dot3OamErrSymPeriodThresholdHi = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 3), Unsigned32()).setUnits('2^32 symbols').setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrSymPeriodThresholdHi.setDescription('The two objects dot3OamErrSymPeriodThresholdHi and\n dot3OamErrSymPeriodThresholdLo together form an unsigned\n 64-bit integer representing the number of symbol errors that\n must occur within a given window to cause this event.\n\n This is defined as\n\n dot3OamErrSymPeriodThreshold =\n ((2^32) * dot3OamErrSymPeriodThresholdHi)\n + dot3OamErrSymPeriodThresholdLo\n\n If dot3OamErrSymPeriodThreshold symbol errors occur within a\n window of dot3OamErrSymPeriodWindow symbols, an Event\n Notification OAMPDU should be generated with an Errored Symbol\n Period Event TLV indicating that the threshold has been\n crossed in this window.\n\n The default value for dot3OamErrSymPeriodThreshold is one\n symbol errors. If the threshold value is zero, then an Event\n\n Notification OAMPDU is sent periodically (at the end of every\n window). This can be used as an asynchronous notification to\n the peer OAM entity of the statistics related to this\n threshold crossing alarm.\n ') dot3OamErrSymPeriodThresholdLo = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 4), Unsigned32()).setUnits('symbols').setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrSymPeriodThresholdLo.setDescription('The two objects dot3OamErrSymPeriodThresholdHi and\n dot3OamErrSymPeriodThresholdLo together form an unsigned\n 64-bit integer representing the number of symbol errors that\n must occur within a given window to cause this event.\n\n This is defined as\n\n dot3OamErrSymPeriodThreshold =\n ((2^32) * dot3OamErrSymPeriodThresholdHi)\n + dot3OamErrSymPeriodThresholdLo\n\n If dot3OamErrSymPeriodThreshold symbol errors occur within a\n window of dot3OamErrSymPeriodWindow symbols, an Event\n Notification OAMPDU should be generated with an Errored Symbol\n Period Event TLV indicating that the threshold has been\n crossed in this window.\n\n The default value for dot3OamErrSymPeriodThreshold is one\n symbol error. If the threshold value is zero, then an Event\n Notification OAMPDU is sent periodically (at the end of every\n window). This can be used as an asynchronous notification to\n the peer OAM entity of the statistics related to this\n threshold crossing alarm.\n ') dot3OamErrSymPeriodEvNotifEnable = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 5), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrSymPeriodEvNotifEnable.setDescription('If true, the OAM entity should send an Event Notification\n OAMPDU when an Errored Symbol Period Event occurs.\n\n By default, this object should have the value true for\n Ethernet-like interfaces that support OAM. If the OAM layer\n does not support Event Notifications (as indicated via the\n dot3OamFunctionsSupported attribute), this value is ignored.\n ') dot3OamErrFramePeriodWindow = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 6), Unsigned32()).setUnits('frames').setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrFramePeriodWindow.setDescription('The number of frames over which the threshold is defined.\n The default value of the window is the number of minimum size\n Ethernet frames that can be received over the physical layer\n in one second.\n\n If dot3OamErrFramePeriodThreshold frame errors occur within a\n window of dot3OamErrFramePeriodWindow frames, an Event\n Notification OAMPDU should be generated with an Errored Frame\n Period Event TLV indicating that the threshold has been\n crossed in this window.\n ') dot3OamErrFramePeriodThreshold = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 7), Unsigned32()).setUnits('frames').setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrFramePeriodThreshold.setDescription('The number of frame errors that must occur for this event to\n be triggered. The default value is one frame error. If the\n threshold value is zero, then an Event Notification OAMPDU is\n sent periodically (at the end of every window). This can be\n used as an asynchronous notification to the peer OAM entity of\n the statistics related to this threshold crossing alarm.\n\n If dot3OamErrFramePeriodThreshold frame errors occur within a\n window of dot3OamErrFramePeriodWindow frames, an Event\n Notification OAMPDU should be generated with an Errored Frame\n Period Event TLV indicating that the threshold has been\n crossed in this window.\n ') dot3OamErrFramePeriodEvNotifEnable = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 8), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrFramePeriodEvNotifEnable.setDescription('If true, the OAM entity should send an Event Notification\n OAMPDU when an Errored Frame Period Event occurs.\n\n By default, this object should have the value true for\n Ethernet-like interfaces that support OAM. If the OAM layer\n does not support Event Notifications (as indicated via the\n dot3OamFunctionsSupported attribute), this value is ignored.\n ') dot3OamErrFrameWindow = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 9), Unsigned32().clone(10)).setUnits('tenths of a second').setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrFrameWindow.setDescription('The amount of time (in 100ms increments) over which the\n threshold is defined. The default value is 10 (1 second).\n\n If dot3OamErrFrameThreshold frame errors occur within a window\n of dot3OamErrFrameWindow seconds (measured in tenths of\n seconds), an Event Notification OAMPDU should be generated\n with an Errored Frame Event TLV indicating that the threshold\n has been crossed in this window.\n ') dot3OamErrFrameThreshold = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 10), Unsigned32().clone(1)).setUnits('frames').setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrFrameThreshold.setDescription('The number of frame errors that must occur for this event to\n be triggered. The default value is one frame error. If the\n threshold value is zero, then an Event Notification OAMPDU is\n sent periodically (at the end of every window). This can be\n used as an asynchronous notification to the peer OAM entity of\n the statistics related to this threshold crossing alarm.\n\n If dot3OamErrFrameThreshold frame errors occur within a window\n of dot3OamErrFrameWindow (in tenths of seconds), an Event\n Notification OAMPDU should be generated with an Errored Frame\n Event TLV indicating the threshold has been crossed in this\n window.\n ') dot3OamErrFrameEvNotifEnable = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 11), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrFrameEvNotifEnable.setDescription('If true, the OAM entity should send an Event Notification\n OAMPDU when an Errored Frame Event occurs.\n\n By default, this object should have the value true for\n Ethernet-like interfaces that support OAM. If the OAM layer\n does not support Event Notifications (as indicated via the\n dot3OamFunctionsSupported attribute), this value is ignored.\n ') dot3OamErrFrameSecsSummaryWindow = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(100,9000)).clone(100)).setUnits('tenths of a second').setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrFrameSecsSummaryWindow.setDescription('The amount of time (in 100 ms intervals) over which the\n threshold is defined. The default value is 100 (10 seconds).\n\n If dot3OamErrFrameSecsSummaryThreshold frame errors occur\n within a window of dot3OamErrFrameSecsSummaryWindow (in tenths\n of seconds), an Event Notification OAMPDU should be generated\n with an Errored Frame Seconds Summary Event TLV indicating\n that the threshold has been crossed in this window.\n ') dot3OamErrFrameSecsSummaryThreshold = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1,900)).clone(1)).setUnits('errored frame seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrFrameSecsSummaryThreshold.setDescription('The number of errored frame seconds that must occur for this\n event to be triggered. The default value is one errored frame\n second. If the threshold value is zero, then an Event\n Notification OAMPDU is sent periodically (at the end of every\n window). This can be used as an asynchronous notification to\n the peer OAM entity of the statistics related to this\n threshold crossing alarm.\n\n If dot3OamErrFrameSecsSummaryThreshold frame errors occur\n within a window of dot3OamErrFrameSecsSummaryWindow (in tenths\n of seconds), an Event Notification OAMPDU should be generated\n with an Errored Frame Seconds Summary Event TLV indicating\n that the threshold has been crossed in this window.\n ') dot3OamErrFrameSecsEvNotifEnable = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 14), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamErrFrameSecsEvNotifEnable.setDescription('If true, the local OAM entity should send an Event\n Notification OAMPDU when an Errored Frame Seconds Event\n occurs.\n\n By default, this object should have the value true for\n Ethernet-like interfaces that support OAM. If the OAM layer\n does not support Event Notifications (as indicated via the\n dot3OamFunctionsSupported attribute), this value is ignored.\n ') dot3OamDyingGaspEnable = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 15), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamDyingGaspEnable.setDescription("If true, the local OAM entity should attempt to indicate a\n dying gasp via the OAMPDU flags field to its peer OAM entity\n when a dying gasp event occurs. The exact definition of a\n dying gasp event is implementation dependent. If the system\n\n does not support dying gasp capability, setting this object\n has no effect, and reading the object should always result in\n 'false'.\n\n By default, this object should have the value true for\n Ethernet-like interfaces that support OAM. If the OAM layer\n does not support Event Notifications (as indicated via the\n dot3OamFunctionsSupported attribute), this value is ignored.\n ") dot3OamCriticalEventEnable = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 16), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot3OamCriticalEventEnable.setDescription("If true, the local OAM entity should attempt to indicate a\n critical event via the OAMPDU flags to its peer OAM entity\n when a critical event occurs. The exact definition of a\n critical event is implementation dependent. If the system\n does not support critical event capability, setting this\n object has no effect, and reading the object should always\n result in 'false'.\n\n By default, this object should have the value true for\n Ethernet-like interfaces that support OAM. If the OAM layer\n does not support Event Notifications (as indicated via the\n dot3OamFunctionsSupported attribute), this value is ignored.\n ") dot3OamEventLogTable = MibTable((1, 3, 6, 1, 2, 1, 158, 1, 6), ) if mibBuilder.loadTexts: dot3OamEventLogTable.setDescription("This table records a history of the events that have occurred\n at the Ethernet OAM level. These events can include locally\n detected events, which may result in locally generated\n OAMPDUs, and remotely detected events, which are detected by\n the OAM peer entity and signaled to the local entity via\n\n Ethernet OAM. Ethernet OAM events can be signaled by Event\n Notification OAMPDUs or by the flags field in any OAMPDU.\n\n This table contains both threshold crossing events and\n non-threshold crossing events. The parameters for the\n threshold window, threshold value, and actual value\n (dot3OamEventLogWindowXX, dot3OamEventLogThresholdXX,\n dot3OamEventLogValue) are only applicable to threshold\n crossing events, and are returned as all F's (2^32 - 1) for\n non-threshold crossing events.\n\n Entries in the table are automatically created when such\n events are detected. The size of the table is implementation\n dependent. When the table reaches its maximum size, older\n entries are automatically deleted to make room for newer\n entries.\n ") dot3OamEventLogEntry = MibTableRow((1, 3, 6, 1, 2, 1, 158, 1, 6, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOT3-OAM-MIB", "dot3OamEventLogIndex")) if mibBuilder.loadTexts: dot3OamEventLogEntry.setDescription('An entry in the dot3OamEventLogTable. Entries are\n automatically created whenever Ethernet OAM events occur at\n the local OAM entity, and when Event Notification OAMPDUs are\n received at the local OAM entity (indicating that events have\n occurred at the peer OAM entity). The size of the table is\n implementation dependent, but when the table becomes full,\n older events are automatically deleted to make room for newer\n events. The table index dot3OamEventLogIndex increments for\n each new entry, and when the maximum value is reached, the\n value restarts at zero.\n ') dot3OamEventLogIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1,4294967295))) if mibBuilder.loadTexts: dot3OamEventLogIndex.setDescription('An arbitrary integer for identifying individual events\n within the event log. ') dot3OamEventLogTimestamp = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 2), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamEventLogTimestamp.setDescription('The value of sysUpTime at the time of the logged event. For\n locally generated events, the time of the event can be\n accurately retrieved from sysUpTime. For remotely generated\n events, the time of the event is indicated by the reception of\n the Event Notification OAMPDU indicating that the event\n occurred on the peer. A system may attempt to adjust the\n timestamp value to more accurately reflect the time of the\n event at the peer OAM entity by using other information, such\n as that found in the timestamp found of the Event Notification\n TLVs, which provides an indication of the relative time\n between events at the peer entity. ') dot3OamEventLogOui = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 3), EightOTwoOui()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamEventLogOui.setDescription('The OUI of the entity defining the object type. All IEEE\n 802.3 defined events (as appearing in [802.3ah] except for the\n Organizationally Unique Event TLVs) use the IEEE 802.3 OUI of\n 0x0180C2. Organizations defining their own Event Notification\n TLVs include their OUI in the Event Notification TLV that\n gets reflected here. ') dot3OamEventLogType = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamEventLogType.setDescription("The type of event that generated this entry in the event log.\n When the OUI is the IEEE 802.3 OUI of 0x0180C2, the following\n event types are defined:\n erroredSymbolEvent(1),\n erroredFramePeriodEvent(2),\n erroredFrameEvent(3),\n erroredFrameSecondsEvent(4),\n linkFault(256),\n dyingGaspEvent(257),\n criticalLinkEvent(258)\n The first four are considered threshold crossing events, as\n they are generated when a metric exceeds a given value within\n a specified window. The other three are not threshold\n crossing events.\n\n When the OUI is not 71874 (0x0180C2 in hex), then some other\n organization has defined the event space. If event subtyping\n is known to the implementation, it may be reflected here.\n Otherwise, this value should return all F's (2^32 - 1).\n ") dot3OamEventLogLocation = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("local", 1), ("remote", 2),))).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamEventLogLocation.setDescription('Whether this event occurred locally (local(1)), or was\n received from the OAM peer via Ethernet OAM (remote(2)).\n ') dot3OamEventLogWindowHi = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 6), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamEventLogWindowHi.setDescription("If the event represents a threshold crossing event, the two\n objects dot3OamEventWindowHi and dot3OamEventWindowLo, form\n an unsigned 64-bit integer yielding the window over which the\n value was measured for the threshold crossing event (for\n example, 5, when 11 occurrences happened in 5 seconds while\n the threshold was 10). The two objects are combined as:\n\n dot3OamEventLogWindow = ((2^32) * dot3OamEventLogWindowHi)\n + dot3OamEventLogWindowLo\n\n Otherwise, this value is returned as all F's (2^32 - 1) and\n adds no useful information.\n ") dot3OamEventLogWindowLo = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 7), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamEventLogWindowLo.setDescription("If the event represents a threshold crossing event, the two\n objects dot3OamEventWindowHi and dot3OamEventWindowLo form an\n unsigned 64-bit integer yielding the window over which the\n value was measured for the threshold crossing event (for\n example, 5, when 11 occurrences happened in 5 seconds while\n the threshold was 10). The two objects are combined as:\n\n dot3OamEventLogWindow = ((2^32) * dot3OamEventLogWindowHi)\n + dot3OamEventLogWindowLo\n\n Otherwise, this value is returned as all F's (2^32 - 1) and\n adds no useful information.\n ") dot3OamEventLogThresholdHi = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 8), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamEventLogThresholdHi.setDescription("If the event represents a threshold crossing event, the two\n objects dot3OamEventThresholdHi and dot3OamEventThresholdLo\n form an unsigned 64-bit integer yielding the value that was\n crossed for the threshold crossing event (for example, 10,\n when 11 occurrences happened in 5 seconds while the threshold\n was 10). The two objects are combined as:\n\n dot3OamEventLogThreshold = ((2^32) * dot3OamEventLogThresholdHi)\n + dot3OamEventLogThresholdLo\n\n Otherwise, this value is returned as all F's (2^32 -1) and\n adds no useful information.\n ") dot3OamEventLogThresholdLo = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 9), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamEventLogThresholdLo.setDescription("If the event represents a threshold crossing event, the two\n objects dot3OamEventThresholdHi and dot3OamEventThresholdLo\n form an unsigned 64-bit integer yielding the value that was\n crossed for the threshold crossing event (for example, 10,\n when 11 occurrences happened in 5 seconds while the threshold\n was 10). The two objects are combined as:\n\n dot3OamEventLogThreshold = ((2^32) * dot3OamEventLogThresholdHi)\n + dot3OamEventLogThresholdLo\n\n Otherwise, this value is returned as all F's (2^32 - 1) and\n adds no useful information.\n ") dot3OamEventLogValue = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 10), CounterBasedGauge64()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamEventLogValue.setDescription("If the event represents a threshold crossing event, this\n value indicates the value of the parameter within the given\n window that generated this event (for example, 11, when 11\n occurrences happened in 5 seconds while the threshold was 10).\n\n Otherwise, this value is returned as all F's\n (2^64 - 1) and adds no useful information.\n ") dot3OamEventLogRunningTotal = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 11), CounterBasedGauge64()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamEventLogRunningTotal.setDescription('Each Event Notification TLV contains a running total of the\n number of times an event has occurred, as well as the number\n of times an Event Notification for the event has been\n\n transmitted. For non-threshold crossing events, the number of\n events (dot3OamLogRunningTotal) and the number of resultant\n Event Notifications (dot3OamLogEventTotal) should be\n identical.\n\n For threshold crossing events, since multiple occurrences may\n be required to cross the threshold, these values are likely\n different. This value represents the total number of times\n this event has happened since the last reset (for example,\n 3253, when 3253 symbol errors have occurred since the last\n reset, which has resulted in 51 symbol error threshold\n crossing events since the last reset).\n ') dot3OamEventLogEventTotal = MibTableColumn((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 12), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot3OamEventLogEventTotal.setDescription('Each Event Notification TLV contains a running total of the\n number of times an event has occurred, as well as the number\n of times an Event Notification for the event has been\n transmitted. For non-threshold crossing events, the number of\n events (dot3OamLogRunningTotal) and the number of resultant\n Event Notifications (dot3OamLogEventTotal) should be\n identical.\n\n For threshold crossing events, since multiple occurrences may\n be required to cross the threshold, these values are likely\n different. This value represents the total number of times\n one or more of these occurrences have resulted in an Event\n Notification (for example, 51 when 3253 symbol errors have\n occurred since the last reset, which has resulted in 51 symbol\n error threshold crossing events since the last reset).\n ') dot3OamThresholdEvent = NotificationType((1, 3, 6, 1, 2, 1, 158, 0, 1)).setObjects(*(("DOT3-OAM-MIB", "dot3OamEventLogTimestamp"), ("DOT3-OAM-MIB", "dot3OamEventLogOui"), ("DOT3-OAM-MIB", "dot3OamEventLogType"), ("DOT3-OAM-MIB", "dot3OamEventLogLocation"), ("DOT3-OAM-MIB", "dot3OamEventLogWindowHi"), ("DOT3-OAM-MIB", "dot3OamEventLogWindowLo"), ("DOT3-OAM-MIB", "dot3OamEventLogThresholdHi"), ("DOT3-OAM-MIB", "dot3OamEventLogThresholdLo"), ("DOT3-OAM-MIB", "dot3OamEventLogValue"), ("DOT3-OAM-MIB", "dot3OamEventLogRunningTotal"), ("DOT3-OAM-MIB", "dot3OamEventLogEventTotal"),)) if mibBuilder.loadTexts: dot3OamThresholdEvent.setDescription('A dot3OamThresholdEvent notification is sent when a local or\n remote threshold crossing event is detected. A local\n threshold crossing event is detected by the local entity,\n while a remote threshold crossing event is detected by the\n reception of an Ethernet OAM Event Notification OAMPDU\n that indicates a threshold event.\n\n This notification should not be sent more than once per\n second.\n\n The OAM entity can be derived from extracting the ifIndex from\n the variable bindings. The objects in the notification\n correspond to the values in a row instance in the\n dot3OamEventLogTable.\n\n The management entity should periodically check\n dot3OamEventLogTable to detect any missed events.') dot3OamNonThresholdEvent = NotificationType((1, 3, 6, 1, 2, 1, 158, 0, 2)).setObjects(*(("DOT3-OAM-MIB", "dot3OamEventLogTimestamp"), ("DOT3-OAM-MIB", "dot3OamEventLogOui"), ("DOT3-OAM-MIB", "dot3OamEventLogType"), ("DOT3-OAM-MIB", "dot3OamEventLogLocation"), ("DOT3-OAM-MIB", "dot3OamEventLogEventTotal"),)) if mibBuilder.loadTexts: dot3OamNonThresholdEvent.setDescription('A dot3OamNonThresholdEvent notification is sent when a local\n or remote non-threshold crossing event is detected. A local\n event is detected by the local entity, while a remote event is\n detected by the reception of an Ethernet OAM Event\n Notification OAMPDU that indicates a non-threshold crossing\n event.\n\n This notification should not be sent more than once per\n\n second.\n\n The OAM entity can be derived from extracting the ifIndex from\n the variable bindings. The objects in the notification\n correspond to the values in a row instance of the\n dot3OamEventLogTable.\n\n The management entity should periodically check\n dot3OamEventLogTable to detect any missed events.') dot3OamGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 158, 2, 1)) dot3OamCompliances = MibIdentifier((1, 3, 6, 1, 2, 1, 158, 2, 2)) dot3OamCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 158, 2, 2, 1)).setObjects(*(("DOT3-OAM-MIB", "dot3OamControlGroup"), ("DOT3-OAM-MIB", "dot3OamPeerGroup"), ("DOT3-OAM-MIB", "dot3OamStatsBaseGroup"), ("DOT3-OAM-MIB", "dot3OamLoopbackGroup"), ("DOT3-OAM-MIB", "dot3OamErrSymbolPeriodEventGroup"), ("DOT3-OAM-MIB", "dot3OamErrFramePeriodEventGroup"), ("DOT3-OAM-MIB", "dot3OamErrFrameEventGroup"), ("DOT3-OAM-MIB", "dot3OamErrFrameSecsSummaryEventGroup"), ("DOT3-OAM-MIB", "dot3OamFlagEventGroup"), ("DOT3-OAM-MIB", "dot3OamEventLogGroup"), ("DOT3-OAM-MIB", "dot3OamNotificationGroup"),)) if mibBuilder.loadTexts: dot3OamCompliance.setDescription('The compliance statement for managed entities\n supporting OAM on Ethernet-like interfaces.\n ') dot3OamControlGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 158, 2, 1, 1)).setObjects(*(("DOT3-OAM-MIB", "dot3OamAdminState"), ("DOT3-OAM-MIB", "dot3OamOperStatus"), ("DOT3-OAM-MIB", "dot3OamMode"), ("DOT3-OAM-MIB", "dot3OamMaxOamPduSize"), ("DOT3-OAM-MIB", "dot3OamConfigRevision"), ("DOT3-OAM-MIB", "dot3OamFunctionsSupported"),)) if mibBuilder.loadTexts: dot3OamControlGroup.setDescription('A collection of objects providing the abilities,\n configuration, and status of an Ethernet OAM entity. ') dot3OamPeerGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 158, 2, 1, 2)).setObjects(*(("DOT3-OAM-MIB", "dot3OamPeerMacAddress"), ("DOT3-OAM-MIB", "dot3OamPeerVendorOui"), ("DOT3-OAM-MIB", "dot3OamPeerVendorInfo"), ("DOT3-OAM-MIB", "dot3OamPeerMode"), ("DOT3-OAM-MIB", "dot3OamPeerFunctionsSupported"), ("DOT3-OAM-MIB", "dot3OamPeerMaxOamPduSize"), ("DOT3-OAM-MIB", "dot3OamPeerConfigRevision"),)) if mibBuilder.loadTexts: dot3OamPeerGroup.setDescription('A collection of objects providing the abilities,\n configuration, and status of a peer Ethernet OAM entity. ') dot3OamStatsBaseGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 158, 2, 1, 3)).setObjects(*(("DOT3-OAM-MIB", "dot3OamInformationTx"), ("DOT3-OAM-MIB", "dot3OamInformationRx"), ("DOT3-OAM-MIB", "dot3OamUniqueEventNotificationTx"), ("DOT3-OAM-MIB", "dot3OamUniqueEventNotificationRx"), ("DOT3-OAM-MIB", "dot3OamDuplicateEventNotificationTx"), ("DOT3-OAM-MIB", "dot3OamDuplicateEventNotificationRx"), ("DOT3-OAM-MIB", "dot3OamLoopbackControlTx"), ("DOT3-OAM-MIB", "dot3OamLoopbackControlRx"), ("DOT3-OAM-MIB", "dot3OamVariableRequestTx"), ("DOT3-OAM-MIB", "dot3OamVariableRequestRx"), ("DOT3-OAM-MIB", "dot3OamVariableResponseTx"), ("DOT3-OAM-MIB", "dot3OamVariableResponseRx"), ("DOT3-OAM-MIB", "dot3OamOrgSpecificTx"), ("DOT3-OAM-MIB", "dot3OamOrgSpecificRx"), ("DOT3-OAM-MIB", "dot3OamUnsupportedCodesTx"), ("DOT3-OAM-MIB", "dot3OamUnsupportedCodesRx"), ("DOT3-OAM-MIB", "dot3OamFramesLostDueToOam"),)) if mibBuilder.loadTexts: dot3OamStatsBaseGroup.setDescription('A collection of objects providing the statistics for the\n number of various transmit and receive events for OAM on an\n Ethernet-like interface. Note that all of these counters must\n be supported even if the related function (as described in\n dot3OamFunctionsSupported) is not supported. ') dot3OamLoopbackGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 158, 2, 1, 4)).setObjects(*(("DOT3-OAM-MIB", "dot3OamLoopbackStatus"), ("DOT3-OAM-MIB", "dot3OamLoopbackIgnoreRx"),)) if mibBuilder.loadTexts: dot3OamLoopbackGroup.setDescription('A collection of objects for controlling the OAM remote\n\n loopback function. ') dot3OamErrSymbolPeriodEventGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 158, 2, 1, 5)).setObjects(*(("DOT3-OAM-MIB", "dot3OamErrSymPeriodWindowHi"), ("DOT3-OAM-MIB", "dot3OamErrSymPeriodWindowLo"), ("DOT3-OAM-MIB", "dot3OamErrSymPeriodThresholdHi"), ("DOT3-OAM-MIB", "dot3OamErrSymPeriodThresholdLo"), ("DOT3-OAM-MIB", "dot3OamErrSymPeriodEvNotifEnable"),)) if mibBuilder.loadTexts: dot3OamErrSymbolPeriodEventGroup.setDescription('A collection of objects for configuring the thresholds for an\n Errored Symbol Period Event.\n\n Each [802.3ah] defined Event Notification TLV has its own\n conformance group because each event can be implemented\n independently of any other. ') dot3OamErrFramePeriodEventGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 158, 2, 1, 6)).setObjects(*(("DOT3-OAM-MIB", "dot3OamErrFramePeriodWindow"), ("DOT3-OAM-MIB", "dot3OamErrFramePeriodThreshold"), ("DOT3-OAM-MIB", "dot3OamErrFramePeriodEvNotifEnable"),)) if mibBuilder.loadTexts: dot3OamErrFramePeriodEventGroup.setDescription('A collection of objects for configuring the thresholds for an\n Errored Frame Period Event.\n\n Each [802.3ah] defined Event Notification TLV has its own\n conformance group because each event can be implemented\n independently of any other. ') dot3OamErrFrameEventGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 158, 2, 1, 7)).setObjects(*(("DOT3-OAM-MIB", "dot3OamErrFrameWindow"), ("DOT3-OAM-MIB", "dot3OamErrFrameThreshold"), ("DOT3-OAM-MIB", "dot3OamErrFrameEvNotifEnable"),)) if mibBuilder.loadTexts: dot3OamErrFrameEventGroup.setDescription('A collection of objects for configuring the thresholds for an\n Errored Frame Event.\n\n Each [802.3ah] defined Event Notification TLV has its own\n conformance group because each event can be implemented\n independently of any other. ') dot3OamErrFrameSecsSummaryEventGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 158, 2, 1, 8)).setObjects(*(("DOT3-OAM-MIB", "dot3OamErrFrameSecsSummaryWindow"), ("DOT3-OAM-MIB", "dot3OamErrFrameSecsSummaryThreshold"), ("DOT3-OAM-MIB", "dot3OamErrFrameSecsEvNotifEnable"),)) if mibBuilder.loadTexts: dot3OamErrFrameSecsSummaryEventGroup.setDescription('A collection of objects for configuring the thresholds for an\n Errored Frame Seconds Summary Event.\n\n Each [802.3ah] defined Event Notification TLV has its own\n conformance group because each event can be implemented\n independently of any other. ') dot3OamFlagEventGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 158, 2, 1, 9)).setObjects(*(("DOT3-OAM-MIB", "dot3OamDyingGaspEnable"), ("DOT3-OAM-MIB", "dot3OamCriticalEventEnable"),)) if mibBuilder.loadTexts: dot3OamFlagEventGroup.setDescription('A collection of objects for configuring the sending OAMPDUs\n with the critical event flag or dying gasp flag enabled. ') dot3OamEventLogGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 158, 2, 1, 10)).setObjects(*(("DOT3-OAM-MIB", "dot3OamEventLogTimestamp"), ("DOT3-OAM-MIB", "dot3OamEventLogOui"), ("DOT3-OAM-MIB", "dot3OamEventLogType"), ("DOT3-OAM-MIB", "dot3OamEventLogLocation"), ("DOT3-OAM-MIB", "dot3OamEventLogWindowHi"), ("DOT3-OAM-MIB", "dot3OamEventLogWindowLo"), ("DOT3-OAM-MIB", "dot3OamEventLogThresholdHi"), ("DOT3-OAM-MIB", "dot3OamEventLogThresholdLo"), ("DOT3-OAM-MIB", "dot3OamEventLogValue"), ("DOT3-OAM-MIB", "dot3OamEventLogRunningTotal"), ("DOT3-OAM-MIB", "dot3OamEventLogEventTotal"),)) if mibBuilder.loadTexts: dot3OamEventLogGroup.setDescription('A collection of objects for configuring the thresholds for an\n Errored Frame Seconds Summary Event and maintaining the event\n information. ') dot3OamNotificationGroup = NotificationGroup((1, 3, 6, 1, 2, 1, 158, 2, 1, 11)).setObjects(*(("DOT3-OAM-MIB", "dot3OamThresholdEvent"), ("DOT3-OAM-MIB", "dot3OamNonThresholdEvent"),)) if mibBuilder.loadTexts: dot3OamNotificationGroup.setDescription('A collection of notifications used by Ethernet OAM to signal\n to a management entity that local or remote events have\n occurred on a specified Ethernet link. ') mibBuilder.exportSymbols("DOT3-OAM-MIB", dot3OamLoopbackControlTx=dot3OamLoopbackControlTx, dot3OamEventLogEventTotal=dot3OamEventLogEventTotal, dot3OamEventLogLocation=dot3OamEventLogLocation, dot3OamEventLogEntry=dot3OamEventLogEntry, dot3OamEventLogWindowHi=dot3OamEventLogWindowHi, dot3OamPeerVendorOui=dot3OamPeerVendorOui, dot3OamNonThresholdEvent=dot3OamNonThresholdEvent, dot3OamEventLogRunningTotal=dot3OamEventLogRunningTotal, dot3OamMaxOamPduSize=dot3OamMaxOamPduSize, dot3OamErrSymbolPeriodEventGroup=dot3OamErrSymbolPeriodEventGroup, dot3OamPeerGroup=dot3OamPeerGroup, dot3OamFlagEventGroup=dot3OamFlagEventGroup, dot3OamErrSymPeriodWindowLo=dot3OamErrSymPeriodWindowLo, dot3OamLoopbackEntry=dot3OamLoopbackEntry, dot3OamUniqueEventNotificationTx=dot3OamUniqueEventNotificationTx, dot3OamLoopbackTable=dot3OamLoopbackTable, dot3OamLoopbackGroup=dot3OamLoopbackGroup, dot3OamCompliances=dot3OamCompliances, dot3OamErrSymPeriodWindowHi=dot3OamErrSymPeriodWindowHi, dot3OamErrFramePeriodEventGroup=dot3OamErrFramePeriodEventGroup, dot3OamInformationTx=dot3OamInformationTx, dot3OamPeerMode=dot3OamPeerMode, dot3OamErrSymPeriodThresholdHi=dot3OamErrSymPeriodThresholdHi, dot3OamInformationRx=dot3OamInformationRx, dot3OamFramesLostDueToOam=dot3OamFramesLostDueToOam, dot3OamOrgSpecificRx=dot3OamOrgSpecificRx, dot3OamUniqueEventNotificationRx=dot3OamUniqueEventNotificationRx, dot3OamMode=dot3OamMode, dot3OamUnsupportedCodesRx=dot3OamUnsupportedCodesRx, dot3OamNotificationGroup=dot3OamNotificationGroup, dot3OamPeerVendorInfo=dot3OamPeerVendorInfo, dot3OamEventLogGroup=dot3OamEventLogGroup, dot3OamDuplicateEventNotificationRx=dot3OamDuplicateEventNotificationRx, dot3OamUnsupportedCodesTx=dot3OamUnsupportedCodesTx, dot3OamErrFrameEventGroup=dot3OamErrFrameEventGroup, dot3OamStatsEntry=dot3OamStatsEntry, dot3OamErrFrameSecsSummaryWindow=dot3OamErrFrameSecsSummaryWindow, dot3OamPeerTable=dot3OamPeerTable, dot3OamObjects=dot3OamObjects, dot3OamErrFramePeriodWindow=dot3OamErrFramePeriodWindow, dot3OamErrFrameWindow=dot3OamErrFrameWindow, dot3OamVariableResponseRx=dot3OamVariableResponseRx, dot3OamPeerMacAddress=dot3OamPeerMacAddress, dot3OamVariableRequestTx=dot3OamVariableRequestTx, dot3OamErrFrameThreshold=dot3OamErrFrameThreshold, dot3OamEventLogOui=dot3OamEventLogOui, dot3OamConformance=dot3OamConformance, dot3OamOperStatus=dot3OamOperStatus, dot3OamEventConfigEntry=dot3OamEventConfigEntry, dot3OamErrFrameEvNotifEnable=dot3OamErrFrameEvNotifEnable, dot3OamEventLogWindowLo=dot3OamEventLogWindowLo, dot3OamVariableResponseTx=dot3OamVariableResponseTx, dot3OamTable=dot3OamTable, dot3OamErrFramePeriodEvNotifEnable=dot3OamErrFramePeriodEvNotifEnable, dot3OamEventLogThresholdHi=dot3OamEventLogThresholdHi, dot3OamCompliance=dot3OamCompliance, dot3OamOrgSpecificTx=dot3OamOrgSpecificTx, EightOTwoOui=EightOTwoOui, dot3OamEventLogTimestamp=dot3OamEventLogTimestamp, dot3OamErrSymPeriodEvNotifEnable=dot3OamErrSymPeriodEvNotifEnable, dot3OamErrFrameSecsSummaryEventGroup=dot3OamErrFrameSecsSummaryEventGroup, dot3OamPeerMaxOamPduSize=dot3OamPeerMaxOamPduSize, dot3OamPeerFunctionsSupported=dot3OamPeerFunctionsSupported, dot3OamEventLogType=dot3OamEventLogType, dot3OamStatsBaseGroup=dot3OamStatsBaseGroup, dot3OamLoopbackControlRx=dot3OamLoopbackControlRx, dot3OamPeerEntry=dot3OamPeerEntry, dot3OamCriticalEventEnable=dot3OamCriticalEventEnable, dot3OamErrFrameSecsSummaryThreshold=dot3OamErrFrameSecsSummaryThreshold, dot3OamLoopbackIgnoreRx=dot3OamLoopbackIgnoreRx, dot3OamGroups=dot3OamGroups, dot3OamLoopbackStatus=dot3OamLoopbackStatus, dot3OamConfigRevision=dot3OamConfigRevision, dot3OamEventLogThresholdLo=dot3OamEventLogThresholdLo, dot3OamErrFrameSecsEvNotifEnable=dot3OamErrFrameSecsEvNotifEnable, PYSNMP_MODULE_ID=dot3OamMIB, dot3OamDyingGaspEnable=dot3OamDyingGaspEnable, dot3OamNotifications=dot3OamNotifications, dot3OamPeerConfigRevision=dot3OamPeerConfigRevision, dot3OamEventLogValue=dot3OamEventLogValue, dot3OamEventLogTable=dot3OamEventLogTable, dot3OamThresholdEvent=dot3OamThresholdEvent, dot3OamFunctionsSupported=dot3OamFunctionsSupported, dot3OamVariableRequestRx=dot3OamVariableRequestRx, dot3OamEventConfigTable=dot3OamEventConfigTable, dot3OamDuplicateEventNotificationTx=dot3OamDuplicateEventNotificationTx, dot3OamErrSymPeriodThresholdLo=dot3OamErrSymPeriodThresholdLo, dot3OamControlGroup=dot3OamControlGroup, dot3OamEntry=dot3OamEntry, dot3OamStatsTable=dot3OamStatsTable, dot3OamMIB=dot3OamMIB, dot3OamAdminState=dot3OamAdminState, dot3OamEventLogIndex=dot3OamEventLogIndex, dot3OamErrFramePeriodThreshold=dot3OamErrFramePeriodThreshold)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_range_constraint, constraints_intersection, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueSizeConstraint') (counter_based_gauge64,) = mibBuilder.importSymbols('HCNUM-TC', 'CounterBasedGauge64') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (object_group, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'ModuleCompliance', 'NotificationGroup') (bits, gauge32, counter64, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, time_ticks, module_identity, unsigned32, ip_address, notification_type, iso, mib_2, object_identity, integer32, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'Gauge32', 'Counter64', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'TimeTicks', 'ModuleIdentity', 'Unsigned32', 'IpAddress', 'NotificationType', 'iso', 'mib-2', 'ObjectIdentity', 'Integer32', 'Counter32') (truth_value, textual_convention, mac_address, time_stamp, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'TextualConvention', 'MacAddress', 'TimeStamp', 'DisplayString') dot3_oam_mib = module_identity((1, 3, 6, 1, 2, 1, 158)).setRevisions(('2007-06-14 00:00',)) if mibBuilder.loadTexts: dot3OamMIB.setLastUpdated('200706140000Z') if mibBuilder.loadTexts: dot3OamMIB.setOrganization('IETF Ethernet Interfaces and Hub MIB Working Group') if mibBuilder.loadTexts: dot3OamMIB.setContactInfo('WG Charter:\n http://www.ietf.org/html.charters/hubmib-charter.html\n Mailing lists:\n General Discussion: [email protected]\n To Subscribe: [email protected]\n In Body: subscribe your_email_address\n Chair: Bert Wijnen\n Alcatel-Lucent\n Email: bwijnen at alcatel-lucent dot com\n Editor: Matt Squire\n Hatteras Networks\n E-mail: msquire at hatterasnetworks dot com\n ') if mibBuilder.loadTexts: dot3OamMIB.setDescription("The MIB module for managing the new Ethernet OAM features\n introduced by the Ethernet in the First Mile taskforce (IEEE\n 802.3ah). The functionality presented here is based on IEEE\n 802.3ah [802.3ah], released in October, 2004. [802.3ah] was\n prepared as an addendum to the standing version of IEEE 802.3\n [802.3-2002]. Since then, [802.3ah] has been\n merged into the base IEEE 802.3 specification in [802.3-2005].\n\n In particular, this MIB focuses on the new OAM functions\n introduced in Clause 57 of [802.3ah]. The OAM functionality\n of Clause 57 is controlled by new management attributes\n introduced in Clause 30 of [802.3ah]. The OAM functions are\n not specific to any particular Ethernet physical layer, and\n can be generically applied to any Ethernet interface of\n [802.3-2002].\n\n An Ethernet OAM protocol data unit is a valid Ethernet frame\n with a destination MAC address equal to the reserved MAC\n address for Slow Protocols (See 43B of [802.3ah]), a\n lengthOrType field equal to the reserved type for Slow\n Protocols, and a Slow Protocols subtype equal to that of the\n subtype reserved for Ethernet OAM. OAMPDU is used throughout\n this document as an abbreviation for Ethernet OAM protocol\n data unit.\n\n The following reference is used throughout this MIB module:\n\n [802.3ah] refers to:\n IEEE Std 802.3ah-2004: 'Draft amendment to -\n Information technology - Telecommunications and\n information exchange between systems - Local and\n metropolitan area networks - Specific requirements - Part\n 3: Carrier sense multiple access with collision detection\n (CSMA/CD) access method and physical layer specifications\n - Media Access Control Parameters, Physical Layers and\n Management Parameters for subscriber access networks',\n October 2004.\n\n [802.3-2002] refers to:\n IEEE Std 802.3-2002:\n 'Information technology - Telecommunications and\n information exchange between systems - Local and\n metropolitan area networks - Specific requirements - Part\n 3: Carrier sense multiple access with collision detection\n (CSMA/CD) access method and physical layer specifications\n - Media Access Control Parameters, Physical Layers and\n Management Parameters for subscriber access networks',\n March 2002.\n\n [802.3-2005] refers to:\n IEEE Std 802.3-2005:\n 'Information technology - Telecommunications and\n information exchange between systems - Local and\n metropolitan area networks - Specific requirements - Part\n 3: Carrier sense multiple access with collision detection\n (CSMA/CD) access method and physical layer specifications\n - Media Access Control Parameters, Physical Layers and\n Management Parameters for subscriber access networks',\n December 2005.\n\n [802-2001] refers to:\n 'IEEE Standard for LAN/MAN (Local Area\n Network/Metropolitan Area Network): Overview and\n Architecture', IEEE 802, June 2001.\n\n Copyright (c) The IETF Trust (2007). This version of\n this MIB module is part of RFC 4878; See the RFC itself for\n full legal notices. ") dot3_oam_notifications = mib_identifier((1, 3, 6, 1, 2, 1, 158, 0)) dot3_oam_objects = mib_identifier((1, 3, 6, 1, 2, 1, 158, 1)) dot3_oam_conformance = mib_identifier((1, 3, 6, 1, 2, 1, 158, 2)) class Eightotwooui(OctetString, TextualConvention): subtype_spec = OctetString.subtypeSpec + value_size_constraint(3, 3) fixed_length = 3 dot3_oam_table = mib_table((1, 3, 6, 1, 2, 1, 158, 1, 1)) if mibBuilder.loadTexts: dot3OamTable.setDescription('This table contains the primary controls and status for the\n OAM capabilities of an Ethernet-like interface. There will be\n one row in this table for each Ethernet-like interface in the\n system that supports the OAM functions defined in [802.3ah].\n ') dot3_oam_entry = mib_table_row((1, 3, 6, 1, 2, 1, 158, 1, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: dot3OamEntry.setDescription('An entry in the table that contains information on the\n Ethernet OAM function for a single Ethernet like interface.\n Entries in the table are created automatically for each\n interface supporting Ethernet OAM. The status of the row\n entry can be determined from dot3OamOperStatus.\n\n A dot3OamEntry is indexed in the dot3OamTable by the ifIndex\n object of the Interfaces MIB.\n ') dot3_oam_admin_state = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamAdminState.setDescription('This object is used to provision the default administrative\n OAM mode for this interface. This object represents the\n desired state of OAM for this interface.\n\n The dot3OamAdminState always starts in the disabled(2) state\n until an explicit management action or configuration\n information retained by the system causes a transition to the\n enabled(1) state. When enabled(1), Ethernet OAM will attempt\n to operate over this interface.\n ') dot3_oam_oper_status = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=named_values(('disabled', 1), ('linkFault', 2), ('passiveWait', 3), ('activeSendLocal', 4), ('sendLocalAndRemote', 5), ('sendLocalAndRemoteOk', 6), ('oamPeeringLocallyRejected', 7), ('oamPeeringRemotelyRejected', 8), ('operational', 9), ('nonOperHalfDuplex', 10)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamOperStatus.setDescription('At initialization and failure conditions, two OAM entities on\n\n the same full-duplex Ethernet link begin a discovery phase to\n determine what OAM capabilities may be used on that link. The\n progress of this initialization is controlled by the OA\n sublayer.\n\n This value is always disabled(1) if OAM is disabled on this\n interface via the dot3OamAdminState.\n\n If the link has detected a fault and is transmitting OAMPDUs\n with a link fault indication, the value is linkFault(2).\n Also, if the interface is not operational (ifOperStatus is\n not up(1)), linkFault(2) is returned. Note that the object\n ifOperStatus may not be up(1) as a result of link failure or\n administrative action (ifAdminState being down(2) or\n testing(3)).\n\n The passiveWait(3) state is returned only by OAM entities in\n passive mode (dot3OamMode) and reflects the state in which the\n OAM entity is waiting to see if the peer device is OA\n capable. The activeSendLocal(4) value is used by active mode\n devices (dot3OamMode) and reflects the OAM entity actively\n trying to discover whether the peer has OAM capability but has\n not yet made that determination.\n\n The state sendLocalAndRemote(5) reflects that the local OA\n entity has discovered the peer but has not yet accepted or\n rejected the configuration of the peer. The local device can,\n for whatever reason, decide that the peer device is\n unacceptable and decline OAM peering. If the local OAM entity\n rejects the peer OAM entity, the state becomes\n oamPeeringLocallyRejected(7). If the OAM peering is allowed\n by the local device, the state moves to\n sendLocalAndRemoteOk(6). Note that both the\n sendLocalAndRemote(5) and oamPeeringLocallyRejected(7) states\n fall within the state SEND_LOCAL_REMOTE of the Discovery state\n diagram [802.3ah, Figure 57-5], with the difference being\n whether the local OAM client has actively rejected the peering\n or has just not indicated any decision yet. Whether a peering\n decision has been made is indicated via the local flags field\n in the OAMPDU (reflected in the aOAMLocalFlagsField of\n 30.3.6.1.10).\n\n If the remote OAM entity rejects the peering, the state\n becomes oamPeeringRemotelyRejected(8). Note that both the\n sendLocalAndRemoteOk(6) and oamPeeringRemotelyRejected(8)\n states fall within the state SEND_LOCAL_REMOTE_OK of the\n Discovery state diagram [802.3ah, Figure 57-5], with the\n difference being whether the remote OAM client has rejected\n\n the peering or has just not yet decided. This is indicated\n via the remote flags field in the OAMPDU (reflected in the\n aOAMRemoteFlagsField of 30.3.6.1.11).\n\n When the local OAM entity learns that both it and the remote\n OAM entity have accepted the peering, the state moves to\n operational(9) corresponding to the SEND_ANY state of the\n Discovery state diagram [802.3ah, Figure 57-5].\n\n Since Ethernet OAM functions are not designed to work\n completely over half-duplex interfaces, the value\n nonOperHalfDuplex(10) is returned whenever Ethernet OAM is\n enabled (dot3OamAdminState is enabled(1)), but the interface\n is in half-duplex operation.\n ') dot3_oam_mode = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('passive', 1), ('active', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamMode.setDescription("This object configures the mode of OAM operation for this\n Ethernet-like interface. OAM on Ethernet interfaces may be in\n 'active' mode or 'passive' mode. These two modes differ in\n that active mode provides additional capabilities to initiate\n monitoring activities with the remote OAM peer entity, while\n passive mode generally waits for the peer to initiate OA\n actions with it. As an example, an active OAM entity can put\n the remote OAM entity in a loopback state, where a passive OA\n entity cannot.\n\n The default value of dot3OamMode is dependent on the type of\n system on which this Ethernet-like interface resides. The\n default value should be 'active(2)' unless it is known that\n this system should take on a subservient role to the other\n device connected over this interface.\n\n Changing this value results in incrementing the configuration\n revision field of locally generated OAMPDUs (30.3.6.1.12) and\n potentially re-doing the OAM discovery process if the\n dot3OamOperStatus was already operational(9).\n ") dot3_oam_max_oam_pdu_size = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(64, 1518))).setUnits('octets').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamMaxOamPduSize.setDescription('The largest OAMPDU that the OAM entity supports. OA\n entities exchange maximum OAMPDU sizes and negotiate to use\n the smaller of the two maximum OAMPDU sizes between the peers.\n This value is determined by the local implementation.\n ') dot3_oam_config_revision = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 1, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamConfigRevision.setDescription('The configuration revision of the OAM entity as reflected in\n the latest OAMPDU sent by the OAM entity. The config revision\n is used by OAM entities to indicate that configuration changes\n have occurred, which might require the peer OAM entity to\n re-evaluate whether OAM peering is allowed.\n ') dot3_oam_functions_supported = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 1, 1, 6), bits().clone(namedValues=named_values(('unidirectionalSupport', 0), ('loopbackSupport', 1), ('eventSupport', 2), ('variableSupport', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamFunctionsSupported.setDescription("The OAM functions supported on this Ethernet-like interface.\n OAM consists of separate functional sets beyond the basic\n discovery process that is always required. These functional\n groups can be supported independently by any implementation.\n These values are communicated to the peer via the local\n configuration field of Information OAMPDUs.\n\n Setting 'unidirectionalSupport(0)' indicates that the OA\n\n entity supports the transmission of OAMPDUs on links that are\n operating in unidirectional mode (traffic flowing in one\n direction only). Setting 'loopbackSupport(1)' indicates that\n the OAM entity can initiate and respond to loopback commands.\n Setting 'eventSupport(2)' indicates that the OAM entity can\n send and receive Event Notification OAMPDUs. Setting\n 'variableSupport(3)' indicates that the OAM entity can send\n and receive Variable Request and Response OAMPDUs.\n ") dot3_oam_peer_table = mib_table((1, 3, 6, 1, 2, 1, 158, 1, 2)) if mibBuilder.loadTexts: dot3OamPeerTable.setDescription('This table contains information about the OAM peer for a\n particular Ethernet-like interface. OAM entities communicate\n with a single OAM peer entity on Ethernet links on which OA\n is enabled and operating properly. There is one entry in this\n table for each entry in the dot3OamTable for which information\n on the peer OAM entity is available.\n ') dot3_oam_peer_entry = mib_table_row((1, 3, 6, 1, 2, 1, 158, 1, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: dot3OamPeerEntry.setDescription('An entry in the table containing information on the peer OA\n entity for a single Ethernet-like interface.\n\n Note that there is at most one OAM peer for each Ethernet-like\n interface. Entries are automatically created when information\n about the OAM peer entity becomes available, and automatically\n deleted when the OAM peer entity is no longer in\n communication. Peer information is not available when\n dot3OamOperStatus is disabled(1), linkFault(2),\n passiveWait(3), activeSendLocal(4), or nonOperHalfDuplex(10).\n ') dot3_oam_peer_mac_address = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 1), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamPeerMacAddress.setDescription('The MAC address of the peer OAM entity. The MAC address is\n derived from the most recently received OAMPDU.\n ') dot3_oam_peer_vendor_oui = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 2), eight_o_two_oui()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamPeerVendorOui.setDescription('The OUI of the OAM peer as reflected in the latest\n Information OAMPDU received with a Local Information TLV. The\n OUI can be used to identify the vendor of the remote OA\n entity. This value is initialized to three octets of zero\n before any Local Information TLV is received.\n ') dot3_oam_peer_vendor_info = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 3), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamPeerVendorInfo.setDescription('The Vendor Info of the OAM peer as reflected in the latest\n Information OAMPDU received with a Local Information TLV.\n The semantics of the Vendor Information field is proprietary\n and specific to the vendor (identified by the\n dot3OamPeerVendorOui). This information could, for example,\n\n be used to identify a specific product or product family.\n This value is initialized to zero before any Local\n Information TLV is received.\n ') dot3_oam_peer_mode = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('passive', 1), ('active', 2), ('unknown', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamPeerMode.setDescription('The mode of the OAM peer as reflected in the latest\n Information OAMPDU received with a Local Information TLV. The\n mode of the peer can be determined from the Configuration\n field in the Local Information TLV of the last Information\n OAMPDU received from the peer. The value is unknown(3)\n whenever no Local Information TLV has been received. The\n values of active(2) and passive(1) are returned when a Local\n Information TLV has been received indicating that the peer is\n in active or passive mode, respectively.\n ') dot3_oam_peer_max_oam_pdu_size = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 5), unsigned32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(64, 1518)))).setUnits('octets').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamPeerMaxOamPduSize.setDescription("The maximum size of OAMPDU supported by the peer as reflected\n in the latest Information OAMPDU received with a Local\n Information TLV. Ethernet OAM on this interface must not use\n OAMPDUs that exceed this size. The maximum OAMPDU size can be\n determined from the PDU Configuration field of the Local\n Information TLV of the last Information OAMPDU received from\n the peer. A value of zero is returned if no Local Information\n TLV has been received. Otherwise, the value of the OAM peer's\n maximum OAMPDU size is returned in this value.\n ") dot3_oam_peer_config_revision = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamPeerConfigRevision.setDescription('The configuration revision of the OAM peer as reflected in\n the latest OAMPDU. This attribute is changed by the peer\n whenever it has a local configuration change for Ethernet OA\n on this interface. The configuration revision can be\n determined from the Revision field of the Local Information\n TLV of the most recently received Information OAMPDU with\n a Local Information TLV. A value of zero is returned if\n no Local Information TLV has been received.\n ') dot3_oam_peer_functions_supported = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 2, 1, 7), bits().clone(namedValues=named_values(('unidirectionalSupport', 0), ('loopbackSupport', 1), ('eventSupport', 2), ('variableSupport', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamPeerFunctionsSupported.setDescription('The OAM functions supported on this Ethernet-like interface.\n OAM consists of separate functionality sets above the basic\n discovery process. This value indicates the capabilities of\n the peer OAM entity with respect to these functions. This\n value is initialized so all bits are clear.\n\n If unidirectionalSupport(0) is set, then the peer OAM entity\n supports sending OAM frames on Ethernet interfaces when the\n receive path is known to be inoperable. If\n loopbackSupport(1) is set, then the peer OAM entity can send\n and receive OAM loopback commands. If eventSupport(2) is set,\n then the peer OAM entity can send and receive event OAMPDUs to\n signal various error conditions. If variableSupport(3) is\n set, then the peer OAM entity can send and receive variable\n requests to monitor the attribute value as described in Clause\n 57 of [802.3ah].\n\n The capabilities of the OAM peer can be determined from the\n configuration field of the Local Information TLV of the most\n recently received Information OAMPDU with a Local Information\n TLV. All zeros are returned if no Local Information TLV has\n\n yet been received.\n ') dot3_oam_loopback_table = mib_table((1, 3, 6, 1, 2, 1, 158, 1, 3)) if mibBuilder.loadTexts: dot3OamLoopbackTable.setDescription("This table contains controls for the loopback state of the\n local link as well as indicates the status of the loopback\n function. There is one entry in this table for each entry in\n dot3OamTable that supports loopback functionality (where\n dot3OamFunctionsSupported includes the loopbackSupport bit\n set).\n\n Loopback can be used to place the remote OAM entity in a state\n where every received frame (except OAMPDUs) is echoed back\n over the same interface on which they were received. In this\n state, at the remote entity, 'normal' traffic is disabled as\n only the looped back frames are transmitted on the interface.\n Loopback is thus an intrusive operation that prohibits normal\n data flow and should be used accordingly.\n ") dot3_oam_loopback_entry = mib_table_row((1, 3, 6, 1, 2, 1, 158, 1, 3, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: dot3OamLoopbackEntry.setDescription('An entry in the table, containing information on the loopback\n status for a single Ethernet-like interface. Entries in the\n table are automatically created whenever the local OAM entity\n supports loopback capabilities. The loopback status on the\n interface can be determined from the dot3OamLoopbackStatus\n object.\n ') dot3_oam_loopback_status = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('noLoopback', 1), ('initiatingLoopback', 2), ('remoteLoopback', 3), ('terminatingLoopback', 4), ('localLoopback', 5), ('unknown', 6)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamLoopbackStatus.setDescription("The loopback status of the OAM entity. This status is\n determined by a combination of the local parser and\n multiplexer states, the remote parser and multiplexer states,\n as well as by the actions of the local OAM client. When\n operating in normal mode with no loopback in progress, the\n status reads noLoopback(1).\n\n The values initiatingLoopback(2) and terminatingLoopback(4)\n can be read or written. The other values can only be read -\n they can never be written. Writing initiatingLoopback causes\n the local OAM entity to start the loopback process with its\n peer. This value can only be written when the status is\n noLoopback(1). Writing the value initiatingLoopback(2) in any\n other state has no effect. When in remoteLoopback(3), writing\n terminatingLoopback(4) causes the local OAM entity to initiate\n the termination of the loopback state. Writing\n terminatingLoopack(4) in any other state has no effect.\n\n If the OAM client initiates a loopback and has sent a\n Loopback OAMPDU and is waiting for a response, where the local\n parser and multiplexer states are DISCARD (see [802.3ah,\n 57.2.11.1]), the status is 'initiatingLoopback'. In this\n case, the local OAM entity has yet to receive any\n acknowledgment that the remote OAM entity has received its\n loopback command request.\n\n If the local OAM client knows that the remote OAM entity is in\n loopback mode (via the remote state information as described\n in [802.3ah, 57.2.11.1, 30.3.6.1.15]), the status is\n remoteLoopback(3). If the local OAM client is in the process\n of terminating the remote loopback [802.3ah, 57.2.11.3,\n 30.3.6.1.14] with its local multiplexer and parser states in\n DISCARD, the status is terminatingLoopback(4). If the remote\n OAM client has put the local OAM entity in loopback mode as\n indicated by its local parser state, the status is\n localLoopback(5).\n\n The unknown(6) status indicates that the parser and\n multiplexer combination is unexpected. This status may be\n returned if the OAM loopback is in a transition state but\n should not persist.\n\n The values of this attribute correspond to the following\n values of the local and remote parser and multiplexer states.\n\n value LclPrsr LclMux RmtPrsr RmtMux\n noLoopback FWD FWD FWD FWD\n initLoopback DISCARD DISCARD FWD FWD\n rmtLoopback DISCARD FWD LPBK DISCARD\n tmtngLoopback DISCARD DISCARD LPBK DISCARD\n lclLoopback LPBK DISCARD DISCARD FWD\n unknown *** any other combination ***\n ") dot3_oam_loopback_ignore_rx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('ignore', 1), ('process', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamLoopbackIgnoreRx.setDescription('Since OAM loopback is a disruptive operation (user traffic\n does not pass), this attribute provides a mechanism to provide\n controls over whether received OAM loopback commands are\n processed or ignored. When the value is ignore(1), received\n loopback commands are ignored. When the value is process(2),\n OAM loopback commands are processed. The default value is to\n ignore loopback commands (ignore(1)).\n ') dot3_oam_stats_table = mib_table((1, 3, 6, 1, 2, 1, 158, 1, 4)) if mibBuilder.loadTexts: dot3OamStatsTable.setDescription('This table contains statistics for the OAM function on a\n particular Ethernet-like interface. There is an entry in the\n table for every entry in the dot3OamTable.\n\n The counters in this table are defined as 32-bit entries to\n match the counter size as defined in [802.3ah]. Given that\n the OA protocol is a slow protocol, the counters increment at\n a slow rate.\n ') dot3_oam_stats_entry = mib_table_row((1, 3, 6, 1, 2, 1, 158, 1, 4, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: dot3OamStatsEntry.setDescription('An entry in the table containing statistics information on\n the Ethernet OAM function for a single Ethernet-like\n interface. Entries are automatically created for every entry\n in the dot3OamTable. Counters are maintained across\n transitions in dot3OamOperStatus.\n ') dot3_oam_information_tx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 1), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamInformationTx.setDescription('A count of the number of Information OAMPDUs transmitted on\n this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime. ') dot3_oam_information_rx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 2), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamInformationRx.setDescription('A count of the number of Information OAMPDUs received on this\n interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_unique_event_notification_tx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 3), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamUniqueEventNotificationTx.setDescription('A count of the number of unique Event OAMPDUs transmitted on\n this interface. Event Notifications may be sent in duplicate\n to increase the probability of successfully being received,\n\n given the possibility that a frame may be lost in transit.\n Duplicate Event Notification transmissions are counted by\n dot3OamDuplicateEventNotificationTx.\n\n A unique Event Notification OAMPDU is indicated as an Event\n Notification OAMPDU with a Sequence Number field that is\n distinct from the previously transmitted Event Notification\n OAMPDU Sequence Number.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_unique_event_notification_rx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 4), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamUniqueEventNotificationRx.setDescription('A count of the number of unique Event OAMPDUs received on\n this interface. Event Notification OAMPDUs may be sent in\n duplicate to increase the probability of successfully being\n received, given the possibility that a frame may be lost in\n transit. Duplicate Event Notification receptions are counted\n by dot3OamDuplicateEventNotificationRx.\n\n A unique Event Notification OAMPDU is indicated as an Event\n Notification OAMPDU with a Sequence Number field that is\n distinct from the previously received Event Notification\n OAMPDU Sequence Number.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_duplicate_event_notification_tx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 5), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamDuplicateEventNotificationTx.setDescription('A count of the number of duplicate Event OAMPDUs transmitted\n\n on this interface. Event Notification OAMPDUs may be sent in\n duplicate to increase the probability of successfully being\n received, given the possibility that a frame may be lost in\n transit.\n\n A duplicate Event Notification OAMPDU is indicated as an Event\n Notification OAMPDU with a Sequence Number field that is\n identical to the previously transmitted Event Notification\n OAMPDU Sequence Number.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_duplicate_event_notification_rx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 6), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamDuplicateEventNotificationRx.setDescription('A count of the number of duplicate Event OAMPDUs received on\n this interface. Event Notification OAMPDUs may be sent in\n duplicate to increase the probability of successfully being\n received, given the possibility that a frame may be lost in\n transit.\n\n A duplicate Event Notification OAMPDU is indicated as an Event\n Notification OAMPDU with a Sequence Number field that is\n identical to the previously received Event Notification OAMPDU\n Sequence Number.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_loopback_control_tx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 7), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamLoopbackControlTx.setDescription('A count of the number of Loopback Control OAMPDUs transmitted\n\n on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_loopback_control_rx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 8), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamLoopbackControlRx.setDescription('A count of the number of Loopback Control OAMPDUs received\n on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_variable_request_tx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 9), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamVariableRequestTx.setDescription('A count of the number of Variable Request OAMPDUs transmitted\n on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_variable_request_rx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 10), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamVariableRequestRx.setDescription('A count of the number of Variable Request OAMPDUs received on\n\n this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_variable_response_tx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 11), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamVariableResponseTx.setDescription('A count of the number of Variable Response OAMPDUs\n transmitted on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_variable_response_rx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 12), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamVariableResponseRx.setDescription('A count of the number of Variable Response OAMPDUs received\n on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_org_specific_tx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 13), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamOrgSpecificTx.setDescription('A count of the number of Organization Specific OAMPDUs\n\n transmitted on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_org_specific_rx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 14), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamOrgSpecificRx.setDescription('A count of the number of Organization Specific OAMPDUs\n received on this interface.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_unsupported_codes_tx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 15), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamUnsupportedCodesTx.setDescription('A count of the number of OAMPDUs transmitted on this\n interface with an unsupported op-code.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_unsupported_codes_rx = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 16), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamUnsupportedCodesRx.setDescription('A count of the number of OAMPDUs received on this interface\n\n with an unsupported op-code.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ') dot3_oam_frames_lost_due_to_oam = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 4, 1, 17), counter32()).setUnits('frames').setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamFramesLostDueToOam.setDescription("A count of the number of frames that were dropped by the OA\n multiplexer. Since the OAM multiplexer has multiple inputs\n and a single output, there may be cases where frames are\n dropped due to transmit resource contention. This counter is\n incremented whenever a frame is dropped by the OAM layer.\n Note that any Ethernet frame, not just OAMPDUs, may be dropped\n by the OAM layer. This can occur when an OAMPDU takes\n precedence over a 'normal' frame resulting in the 'normal'\n frame being dropped.\n\n When this counter is incremented, no other counters in this\n MIB are incremented.\n\n Discontinuities of this counter can occur at re-initialization\n of the management system, and at other times as indicated by\n the value of the ifCounterDiscontinuityTime.\n ") dot3_oam_event_config_table = mib_table((1, 3, 6, 1, 2, 1, 158, 1, 5)) if mibBuilder.loadTexts: dot3OamEventConfigTable.setDescription('Ethernet OAM includes the ability to generate and receive\n Event Notification OAMPDUs to indicate various link problems.\n This table contains the mechanisms to enable Event\n\n Notifications and configure the thresholds to generate the\n standard Ethernet OAM events. There is one entry in the table\n for every entry in dot3OamTable that supports OAM events\n (where dot3OamFunctionsSupported includes the eventSupport\n bit set). The values in the table are maintained across\n changes to dot3OamOperStatus.\n\n The standard threshold crossing events are:\n - Errored Symbol Period Event. Generated when the number of\n symbol errors exceeds a threshold within a given window\n defined by a number of symbols (for example, 1,000 symbols\n out of 1,000,000 had errors).\n - Errored Frame Period Event. Generated when the number of\n frame errors exceeds a threshold within a given window\n defined by a number of frames (for example, 10 frames out\n of 1000 had errors).\n - Errored Frame Event. Generated when the number of frame\n errors exceeds a threshold within a given window defined\n by a period of time (for example, 10 frames in 1 second\n had errors).\n - Errored Frame Seconds Summary Event. Generated when the\n number of errored frame seconds exceeds a threshold within\n a given time period (for example, 10 errored frame seconds\n within the last 100 seconds). An errored frame second is\n defined as a 1 second interval which had >0 frame errors.\n There are other events (dying gasp, critical events) that are\n not threshold crossing events but which can be\n enabled/disabled via this table.\n ') dot3_oam_event_config_entry = mib_table_row((1, 3, 6, 1, 2, 1, 158, 1, 5, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: dot3OamEventConfigEntry.setDescription('Entries are automatically created and deleted from this\n table, and exist whenever the OAM entity supports Ethernet OA\n events (as indicated by the eventSupport bit in\n dot3OamFunctionsSuppported). Values in the table are\n maintained across changes to the value of dot3OamOperStatus.\n\n Event configuration controls when the local management entity\n sends Event Notification OAMPDUs to its OAM peer, and when\n certain event flags are set or cleared in OAMPDUs.\n ') dot3_oam_err_sym_period_window_hi = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 1), unsigned32()).setUnits('2^32 symbols').setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrSymPeriodWindowHi.setDescription('The two objects dot3OamErrSymPeriodWindowHi and\n dot3OamErrSymPeriodLo together form an unsigned 64-bit\n integer representing the number of symbols over which this\n threshold event is defined. This is defined as\n dot3OamErrSymPeriodWindow = ((2^32)*dot3OamErrSymPeriodWindowHi)\n + dot3OamErrSymPeriodWindowLo\n\n If dot3OamErrSymPeriodThreshold symbol errors occur within a\n window of dot3OamErrSymPeriodWindow symbols, an Event\n Notification OAMPDU should be generated with an Errored Symbol\n Period Event TLV indicating that the threshold has been\n crossed in this window.\n\n The default value for dot3OamErrSymPeriodWindow is the number\n of symbols in one second for the underlying physical layer.\n ') dot3_oam_err_sym_period_window_lo = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 2), unsigned32()).setUnits('symbols').setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrSymPeriodWindowLo.setDescription('The two objects dot3OamErrSymPeriodWindowHi and\n dot3OamErrSymPeriodWindowLo together form an unsigned 64-bit\n integer representing the number of symbols over which this\n threshold event is defined. This is defined as\n\n dot3OamErrSymPeriodWindow = ((2^32)*dot3OamErrSymPeriodWindowHi)\n + dot3OamErrSymPeriodWindowLo\n\n If dot3OamErrSymPeriodThreshold symbol errors occur within a\n window of dot3OamErrSymPeriodWindow symbols, an Event\n Notification OAMPDU should be generated with an Errored Symbol\n Period Event TLV indicating that the threshold has been\n crossed in this window.\n\n The default value for dot3OamErrSymPeriodWindow is the number\n of symbols in one second for the underlying physical layer.\n ') dot3_oam_err_sym_period_threshold_hi = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 3), unsigned32()).setUnits('2^32 symbols').setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrSymPeriodThresholdHi.setDescription('The two objects dot3OamErrSymPeriodThresholdHi and\n dot3OamErrSymPeriodThresholdLo together form an unsigned\n 64-bit integer representing the number of symbol errors that\n must occur within a given window to cause this event.\n\n This is defined as\n\n dot3OamErrSymPeriodThreshold =\n ((2^32) * dot3OamErrSymPeriodThresholdHi)\n + dot3OamErrSymPeriodThresholdLo\n\n If dot3OamErrSymPeriodThreshold symbol errors occur within a\n window of dot3OamErrSymPeriodWindow symbols, an Event\n Notification OAMPDU should be generated with an Errored Symbol\n Period Event TLV indicating that the threshold has been\n crossed in this window.\n\n The default value for dot3OamErrSymPeriodThreshold is one\n symbol errors. If the threshold value is zero, then an Event\n\n Notification OAMPDU is sent periodically (at the end of every\n window). This can be used as an asynchronous notification to\n the peer OAM entity of the statistics related to this\n threshold crossing alarm.\n ') dot3_oam_err_sym_period_threshold_lo = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 4), unsigned32()).setUnits('symbols').setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrSymPeriodThresholdLo.setDescription('The two objects dot3OamErrSymPeriodThresholdHi and\n dot3OamErrSymPeriodThresholdLo together form an unsigned\n 64-bit integer representing the number of symbol errors that\n must occur within a given window to cause this event.\n\n This is defined as\n\n dot3OamErrSymPeriodThreshold =\n ((2^32) * dot3OamErrSymPeriodThresholdHi)\n + dot3OamErrSymPeriodThresholdLo\n\n If dot3OamErrSymPeriodThreshold symbol errors occur within a\n window of dot3OamErrSymPeriodWindow symbols, an Event\n Notification OAMPDU should be generated with an Errored Symbol\n Period Event TLV indicating that the threshold has been\n crossed in this window.\n\n The default value for dot3OamErrSymPeriodThreshold is one\n symbol error. If the threshold value is zero, then an Event\n Notification OAMPDU is sent periodically (at the end of every\n window). This can be used as an asynchronous notification to\n the peer OAM entity of the statistics related to this\n threshold crossing alarm.\n ') dot3_oam_err_sym_period_ev_notif_enable = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 5), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrSymPeriodEvNotifEnable.setDescription('If true, the OAM entity should send an Event Notification\n OAMPDU when an Errored Symbol Period Event occurs.\n\n By default, this object should have the value true for\n Ethernet-like interfaces that support OAM. If the OAM layer\n does not support Event Notifications (as indicated via the\n dot3OamFunctionsSupported attribute), this value is ignored.\n ') dot3_oam_err_frame_period_window = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 6), unsigned32()).setUnits('frames').setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrFramePeriodWindow.setDescription('The number of frames over which the threshold is defined.\n The default value of the window is the number of minimum size\n Ethernet frames that can be received over the physical layer\n in one second.\n\n If dot3OamErrFramePeriodThreshold frame errors occur within a\n window of dot3OamErrFramePeriodWindow frames, an Event\n Notification OAMPDU should be generated with an Errored Frame\n Period Event TLV indicating that the threshold has been\n crossed in this window.\n ') dot3_oam_err_frame_period_threshold = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 7), unsigned32()).setUnits('frames').setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrFramePeriodThreshold.setDescription('The number of frame errors that must occur for this event to\n be triggered. The default value is one frame error. If the\n threshold value is zero, then an Event Notification OAMPDU is\n sent periodically (at the end of every window). This can be\n used as an asynchronous notification to the peer OAM entity of\n the statistics related to this threshold crossing alarm.\n\n If dot3OamErrFramePeriodThreshold frame errors occur within a\n window of dot3OamErrFramePeriodWindow frames, an Event\n Notification OAMPDU should be generated with an Errored Frame\n Period Event TLV indicating that the threshold has been\n crossed in this window.\n ') dot3_oam_err_frame_period_ev_notif_enable = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 8), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrFramePeriodEvNotifEnable.setDescription('If true, the OAM entity should send an Event Notification\n OAMPDU when an Errored Frame Period Event occurs.\n\n By default, this object should have the value true for\n Ethernet-like interfaces that support OAM. If the OAM layer\n does not support Event Notifications (as indicated via the\n dot3OamFunctionsSupported attribute), this value is ignored.\n ') dot3_oam_err_frame_window = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 9), unsigned32().clone(10)).setUnits('tenths of a second').setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrFrameWindow.setDescription('The amount of time (in 100ms increments) over which the\n threshold is defined. The default value is 10 (1 second).\n\n If dot3OamErrFrameThreshold frame errors occur within a window\n of dot3OamErrFrameWindow seconds (measured in tenths of\n seconds), an Event Notification OAMPDU should be generated\n with an Errored Frame Event TLV indicating that the threshold\n has been crossed in this window.\n ') dot3_oam_err_frame_threshold = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 10), unsigned32().clone(1)).setUnits('frames').setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrFrameThreshold.setDescription('The number of frame errors that must occur for this event to\n be triggered. The default value is one frame error. If the\n threshold value is zero, then an Event Notification OAMPDU is\n sent periodically (at the end of every window). This can be\n used as an asynchronous notification to the peer OAM entity of\n the statistics related to this threshold crossing alarm.\n\n If dot3OamErrFrameThreshold frame errors occur within a window\n of dot3OamErrFrameWindow (in tenths of seconds), an Event\n Notification OAMPDU should be generated with an Errored Frame\n Event TLV indicating the threshold has been crossed in this\n window.\n ') dot3_oam_err_frame_ev_notif_enable = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 11), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrFrameEvNotifEnable.setDescription('If true, the OAM entity should send an Event Notification\n OAMPDU when an Errored Frame Event occurs.\n\n By default, this object should have the value true for\n Ethernet-like interfaces that support OAM. If the OAM layer\n does not support Event Notifications (as indicated via the\n dot3OamFunctionsSupported attribute), this value is ignored.\n ') dot3_oam_err_frame_secs_summary_window = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(100, 9000)).clone(100)).setUnits('tenths of a second').setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrFrameSecsSummaryWindow.setDescription('The amount of time (in 100 ms intervals) over which the\n threshold is defined. The default value is 100 (10 seconds).\n\n If dot3OamErrFrameSecsSummaryThreshold frame errors occur\n within a window of dot3OamErrFrameSecsSummaryWindow (in tenths\n of seconds), an Event Notification OAMPDU should be generated\n with an Errored Frame Seconds Summary Event TLV indicating\n that the threshold has been crossed in this window.\n ') dot3_oam_err_frame_secs_summary_threshold = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(1, 900)).clone(1)).setUnits('errored frame seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrFrameSecsSummaryThreshold.setDescription('The number of errored frame seconds that must occur for this\n event to be triggered. The default value is one errored frame\n second. If the threshold value is zero, then an Event\n Notification OAMPDU is sent periodically (at the end of every\n window). This can be used as an asynchronous notification to\n the peer OAM entity of the statistics related to this\n threshold crossing alarm.\n\n If dot3OamErrFrameSecsSummaryThreshold frame errors occur\n within a window of dot3OamErrFrameSecsSummaryWindow (in tenths\n of seconds), an Event Notification OAMPDU should be generated\n with an Errored Frame Seconds Summary Event TLV indicating\n that the threshold has been crossed in this window.\n ') dot3_oam_err_frame_secs_ev_notif_enable = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 14), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamErrFrameSecsEvNotifEnable.setDescription('If true, the local OAM entity should send an Event\n Notification OAMPDU when an Errored Frame Seconds Event\n occurs.\n\n By default, this object should have the value true for\n Ethernet-like interfaces that support OAM. If the OAM layer\n does not support Event Notifications (as indicated via the\n dot3OamFunctionsSupported attribute), this value is ignored.\n ') dot3_oam_dying_gasp_enable = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 15), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamDyingGaspEnable.setDescription("If true, the local OAM entity should attempt to indicate a\n dying gasp via the OAMPDU flags field to its peer OAM entity\n when a dying gasp event occurs. The exact definition of a\n dying gasp event is implementation dependent. If the system\n\n does not support dying gasp capability, setting this object\n has no effect, and reading the object should always result in\n 'false'.\n\n By default, this object should have the value true for\n Ethernet-like interfaces that support OAM. If the OAM layer\n does not support Event Notifications (as indicated via the\n dot3OamFunctionsSupported attribute), this value is ignored.\n ") dot3_oam_critical_event_enable = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 5, 1, 16), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot3OamCriticalEventEnable.setDescription("If true, the local OAM entity should attempt to indicate a\n critical event via the OAMPDU flags to its peer OAM entity\n when a critical event occurs. The exact definition of a\n critical event is implementation dependent. If the system\n does not support critical event capability, setting this\n object has no effect, and reading the object should always\n result in 'false'.\n\n By default, this object should have the value true for\n Ethernet-like interfaces that support OAM. If the OAM layer\n does not support Event Notifications (as indicated via the\n dot3OamFunctionsSupported attribute), this value is ignored.\n ") dot3_oam_event_log_table = mib_table((1, 3, 6, 1, 2, 1, 158, 1, 6)) if mibBuilder.loadTexts: dot3OamEventLogTable.setDescription("This table records a history of the events that have occurred\n at the Ethernet OAM level. These events can include locally\n detected events, which may result in locally generated\n OAMPDUs, and remotely detected events, which are detected by\n the OAM peer entity and signaled to the local entity via\n\n Ethernet OAM. Ethernet OAM events can be signaled by Event\n Notification OAMPDUs or by the flags field in any OAMPDU.\n\n This table contains both threshold crossing events and\n non-threshold crossing events. The parameters for the\n threshold window, threshold value, and actual value\n (dot3OamEventLogWindowXX, dot3OamEventLogThresholdXX,\n dot3OamEventLogValue) are only applicable to threshold\n crossing events, and are returned as all F's (2^32 - 1) for\n non-threshold crossing events.\n\n Entries in the table are automatically created when such\n events are detected. The size of the table is implementation\n dependent. When the table reaches its maximum size, older\n entries are automatically deleted to make room for newer\n entries.\n ") dot3_oam_event_log_entry = mib_table_row((1, 3, 6, 1, 2, 1, 158, 1, 6, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'DOT3-OAM-MIB', 'dot3OamEventLogIndex')) if mibBuilder.loadTexts: dot3OamEventLogEntry.setDescription('An entry in the dot3OamEventLogTable. Entries are\n automatically created whenever Ethernet OAM events occur at\n the local OAM entity, and when Event Notification OAMPDUs are\n received at the local OAM entity (indicating that events have\n occurred at the peer OAM entity). The size of the table is\n implementation dependent, but when the table becomes full,\n older events are automatically deleted to make room for newer\n events. The table index dot3OamEventLogIndex increments for\n each new entry, and when the maximum value is reached, the\n value restarts at zero.\n ') dot3_oam_event_log_index = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: dot3OamEventLogIndex.setDescription('An arbitrary integer for identifying individual events\n within the event log. ') dot3_oam_event_log_timestamp = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 2), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamEventLogTimestamp.setDescription('The value of sysUpTime at the time of the logged event. For\n locally generated events, the time of the event can be\n accurately retrieved from sysUpTime. For remotely generated\n events, the time of the event is indicated by the reception of\n the Event Notification OAMPDU indicating that the event\n occurred on the peer. A system may attempt to adjust the\n timestamp value to more accurately reflect the time of the\n event at the peer OAM entity by using other information, such\n as that found in the timestamp found of the Event Notification\n TLVs, which provides an indication of the relative time\n between events at the peer entity. ') dot3_oam_event_log_oui = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 3), eight_o_two_oui()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamEventLogOui.setDescription('The OUI of the entity defining the object type. All IEEE\n 802.3 defined events (as appearing in [802.3ah] except for the\n Organizationally Unique Event TLVs) use the IEEE 802.3 OUI of\n 0x0180C2. Organizations defining their own Event Notification\n TLVs include their OUI in the Event Notification TLV that\n gets reflected here. ') dot3_oam_event_log_type = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamEventLogType.setDescription("The type of event that generated this entry in the event log.\n When the OUI is the IEEE 802.3 OUI of 0x0180C2, the following\n event types are defined:\n erroredSymbolEvent(1),\n erroredFramePeriodEvent(2),\n erroredFrameEvent(3),\n erroredFrameSecondsEvent(4),\n linkFault(256),\n dyingGaspEvent(257),\n criticalLinkEvent(258)\n The first four are considered threshold crossing events, as\n they are generated when a metric exceeds a given value within\n a specified window. The other three are not threshold\n crossing events.\n\n When the OUI is not 71874 (0x0180C2 in hex), then some other\n organization has defined the event space. If event subtyping\n is known to the implementation, it may be reflected here.\n Otherwise, this value should return all F's (2^32 - 1).\n ") dot3_oam_event_log_location = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('local', 1), ('remote', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamEventLogLocation.setDescription('Whether this event occurred locally (local(1)), or was\n received from the OAM peer via Ethernet OAM (remote(2)).\n ') dot3_oam_event_log_window_hi = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 6), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamEventLogWindowHi.setDescription("If the event represents a threshold crossing event, the two\n objects dot3OamEventWindowHi and dot3OamEventWindowLo, form\n an unsigned 64-bit integer yielding the window over which the\n value was measured for the threshold crossing event (for\n example, 5, when 11 occurrences happened in 5 seconds while\n the threshold was 10). The two objects are combined as:\n\n dot3OamEventLogWindow = ((2^32) * dot3OamEventLogWindowHi)\n + dot3OamEventLogWindowLo\n\n Otherwise, this value is returned as all F's (2^32 - 1) and\n adds no useful information.\n ") dot3_oam_event_log_window_lo = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 7), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamEventLogWindowLo.setDescription("If the event represents a threshold crossing event, the two\n objects dot3OamEventWindowHi and dot3OamEventWindowLo form an\n unsigned 64-bit integer yielding the window over which the\n value was measured for the threshold crossing event (for\n example, 5, when 11 occurrences happened in 5 seconds while\n the threshold was 10). The two objects are combined as:\n\n dot3OamEventLogWindow = ((2^32) * dot3OamEventLogWindowHi)\n + dot3OamEventLogWindowLo\n\n Otherwise, this value is returned as all F's (2^32 - 1) and\n adds no useful information.\n ") dot3_oam_event_log_threshold_hi = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 8), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamEventLogThresholdHi.setDescription("If the event represents a threshold crossing event, the two\n objects dot3OamEventThresholdHi and dot3OamEventThresholdLo\n form an unsigned 64-bit integer yielding the value that was\n crossed for the threshold crossing event (for example, 10,\n when 11 occurrences happened in 5 seconds while the threshold\n was 10). The two objects are combined as:\n\n dot3OamEventLogThreshold = ((2^32) * dot3OamEventLogThresholdHi)\n + dot3OamEventLogThresholdLo\n\n Otherwise, this value is returned as all F's (2^32 -1) and\n adds no useful information.\n ") dot3_oam_event_log_threshold_lo = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 9), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamEventLogThresholdLo.setDescription("If the event represents a threshold crossing event, the two\n objects dot3OamEventThresholdHi and dot3OamEventThresholdLo\n form an unsigned 64-bit integer yielding the value that was\n crossed for the threshold crossing event (for example, 10,\n when 11 occurrences happened in 5 seconds while the threshold\n was 10). The two objects are combined as:\n\n dot3OamEventLogThreshold = ((2^32) * dot3OamEventLogThresholdHi)\n + dot3OamEventLogThresholdLo\n\n Otherwise, this value is returned as all F's (2^32 - 1) and\n adds no useful information.\n ") dot3_oam_event_log_value = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 10), counter_based_gauge64()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamEventLogValue.setDescription("If the event represents a threshold crossing event, this\n value indicates the value of the parameter within the given\n window that generated this event (for example, 11, when 11\n occurrences happened in 5 seconds while the threshold was 10).\n\n Otherwise, this value is returned as all F's\n (2^64 - 1) and adds no useful information.\n ") dot3_oam_event_log_running_total = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 11), counter_based_gauge64()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamEventLogRunningTotal.setDescription('Each Event Notification TLV contains a running total of the\n number of times an event has occurred, as well as the number\n of times an Event Notification for the event has been\n\n transmitted. For non-threshold crossing events, the number of\n events (dot3OamLogRunningTotal) and the number of resultant\n Event Notifications (dot3OamLogEventTotal) should be\n identical.\n\n For threshold crossing events, since multiple occurrences may\n be required to cross the threshold, these values are likely\n different. This value represents the total number of times\n this event has happened since the last reset (for example,\n 3253, when 3253 symbol errors have occurred since the last\n reset, which has resulted in 51 symbol error threshold\n crossing events since the last reset).\n ') dot3_oam_event_log_event_total = mib_table_column((1, 3, 6, 1, 2, 1, 158, 1, 6, 1, 12), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot3OamEventLogEventTotal.setDescription('Each Event Notification TLV contains a running total of the\n number of times an event has occurred, as well as the number\n of times an Event Notification for the event has been\n transmitted. For non-threshold crossing events, the number of\n events (dot3OamLogRunningTotal) and the number of resultant\n Event Notifications (dot3OamLogEventTotal) should be\n identical.\n\n For threshold crossing events, since multiple occurrences may\n be required to cross the threshold, these values are likely\n different. This value represents the total number of times\n one or more of these occurrences have resulted in an Event\n Notification (for example, 51 when 3253 symbol errors have\n occurred since the last reset, which has resulted in 51 symbol\n error threshold crossing events since the last reset).\n ') dot3_oam_threshold_event = notification_type((1, 3, 6, 1, 2, 1, 158, 0, 1)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamEventLogTimestamp'), ('DOT3-OAM-MIB', 'dot3OamEventLogOui'), ('DOT3-OAM-MIB', 'dot3OamEventLogType'), ('DOT3-OAM-MIB', 'dot3OamEventLogLocation'), ('DOT3-OAM-MIB', 'dot3OamEventLogWindowHi'), ('DOT3-OAM-MIB', 'dot3OamEventLogWindowLo'), ('DOT3-OAM-MIB', 'dot3OamEventLogThresholdHi'), ('DOT3-OAM-MIB', 'dot3OamEventLogThresholdLo'), ('DOT3-OAM-MIB', 'dot3OamEventLogValue'), ('DOT3-OAM-MIB', 'dot3OamEventLogRunningTotal'), ('DOT3-OAM-MIB', 'dot3OamEventLogEventTotal'))) if mibBuilder.loadTexts: dot3OamThresholdEvent.setDescription('A dot3OamThresholdEvent notification is sent when a local or\n remote threshold crossing event is detected. A local\n threshold crossing event is detected by the local entity,\n while a remote threshold crossing event is detected by the\n reception of an Ethernet OAM Event Notification OAMPDU\n that indicates a threshold event.\n\n This notification should not be sent more than once per\n second.\n\n The OAM entity can be derived from extracting the ifIndex from\n the variable bindings. The objects in the notification\n correspond to the values in a row instance in the\n dot3OamEventLogTable.\n\n The management entity should periodically check\n dot3OamEventLogTable to detect any missed events.') dot3_oam_non_threshold_event = notification_type((1, 3, 6, 1, 2, 1, 158, 0, 2)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamEventLogTimestamp'), ('DOT3-OAM-MIB', 'dot3OamEventLogOui'), ('DOT3-OAM-MIB', 'dot3OamEventLogType'), ('DOT3-OAM-MIB', 'dot3OamEventLogLocation'), ('DOT3-OAM-MIB', 'dot3OamEventLogEventTotal'))) if mibBuilder.loadTexts: dot3OamNonThresholdEvent.setDescription('A dot3OamNonThresholdEvent notification is sent when a local\n or remote non-threshold crossing event is detected. A local\n event is detected by the local entity, while a remote event is\n detected by the reception of an Ethernet OAM Event\n Notification OAMPDU that indicates a non-threshold crossing\n event.\n\n This notification should not be sent more than once per\n\n second.\n\n The OAM entity can be derived from extracting the ifIndex from\n the variable bindings. The objects in the notification\n correspond to the values in a row instance of the\n dot3OamEventLogTable.\n\n The management entity should periodically check\n dot3OamEventLogTable to detect any missed events.') dot3_oam_groups = mib_identifier((1, 3, 6, 1, 2, 1, 158, 2, 1)) dot3_oam_compliances = mib_identifier((1, 3, 6, 1, 2, 1, 158, 2, 2)) dot3_oam_compliance = module_compliance((1, 3, 6, 1, 2, 1, 158, 2, 2, 1)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamControlGroup'), ('DOT3-OAM-MIB', 'dot3OamPeerGroup'), ('DOT3-OAM-MIB', 'dot3OamStatsBaseGroup'), ('DOT3-OAM-MIB', 'dot3OamLoopbackGroup'), ('DOT3-OAM-MIB', 'dot3OamErrSymbolPeriodEventGroup'), ('DOT3-OAM-MIB', 'dot3OamErrFramePeriodEventGroup'), ('DOT3-OAM-MIB', 'dot3OamErrFrameEventGroup'), ('DOT3-OAM-MIB', 'dot3OamErrFrameSecsSummaryEventGroup'), ('DOT3-OAM-MIB', 'dot3OamFlagEventGroup'), ('DOT3-OAM-MIB', 'dot3OamEventLogGroup'), ('DOT3-OAM-MIB', 'dot3OamNotificationGroup'))) if mibBuilder.loadTexts: dot3OamCompliance.setDescription('The compliance statement for managed entities\n supporting OAM on Ethernet-like interfaces.\n ') dot3_oam_control_group = object_group((1, 3, 6, 1, 2, 1, 158, 2, 1, 1)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamAdminState'), ('DOT3-OAM-MIB', 'dot3OamOperStatus'), ('DOT3-OAM-MIB', 'dot3OamMode'), ('DOT3-OAM-MIB', 'dot3OamMaxOamPduSize'), ('DOT3-OAM-MIB', 'dot3OamConfigRevision'), ('DOT3-OAM-MIB', 'dot3OamFunctionsSupported'))) if mibBuilder.loadTexts: dot3OamControlGroup.setDescription('A collection of objects providing the abilities,\n configuration, and status of an Ethernet OAM entity. ') dot3_oam_peer_group = object_group((1, 3, 6, 1, 2, 1, 158, 2, 1, 2)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamPeerMacAddress'), ('DOT3-OAM-MIB', 'dot3OamPeerVendorOui'), ('DOT3-OAM-MIB', 'dot3OamPeerVendorInfo'), ('DOT3-OAM-MIB', 'dot3OamPeerMode'), ('DOT3-OAM-MIB', 'dot3OamPeerFunctionsSupported'), ('DOT3-OAM-MIB', 'dot3OamPeerMaxOamPduSize'), ('DOT3-OAM-MIB', 'dot3OamPeerConfigRevision'))) if mibBuilder.loadTexts: dot3OamPeerGroup.setDescription('A collection of objects providing the abilities,\n configuration, and status of a peer Ethernet OAM entity. ') dot3_oam_stats_base_group = object_group((1, 3, 6, 1, 2, 1, 158, 2, 1, 3)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamInformationTx'), ('DOT3-OAM-MIB', 'dot3OamInformationRx'), ('DOT3-OAM-MIB', 'dot3OamUniqueEventNotificationTx'), ('DOT3-OAM-MIB', 'dot3OamUniqueEventNotificationRx'), ('DOT3-OAM-MIB', 'dot3OamDuplicateEventNotificationTx'), ('DOT3-OAM-MIB', 'dot3OamDuplicateEventNotificationRx'), ('DOT3-OAM-MIB', 'dot3OamLoopbackControlTx'), ('DOT3-OAM-MIB', 'dot3OamLoopbackControlRx'), ('DOT3-OAM-MIB', 'dot3OamVariableRequestTx'), ('DOT3-OAM-MIB', 'dot3OamVariableRequestRx'), ('DOT3-OAM-MIB', 'dot3OamVariableResponseTx'), ('DOT3-OAM-MIB', 'dot3OamVariableResponseRx'), ('DOT3-OAM-MIB', 'dot3OamOrgSpecificTx'), ('DOT3-OAM-MIB', 'dot3OamOrgSpecificRx'), ('DOT3-OAM-MIB', 'dot3OamUnsupportedCodesTx'), ('DOT3-OAM-MIB', 'dot3OamUnsupportedCodesRx'), ('DOT3-OAM-MIB', 'dot3OamFramesLostDueToOam'))) if mibBuilder.loadTexts: dot3OamStatsBaseGroup.setDescription('A collection of objects providing the statistics for the\n number of various transmit and receive events for OAM on an\n Ethernet-like interface. Note that all of these counters must\n be supported even if the related function (as described in\n dot3OamFunctionsSupported) is not supported. ') dot3_oam_loopback_group = object_group((1, 3, 6, 1, 2, 1, 158, 2, 1, 4)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamLoopbackStatus'), ('DOT3-OAM-MIB', 'dot3OamLoopbackIgnoreRx'))) if mibBuilder.loadTexts: dot3OamLoopbackGroup.setDescription('A collection of objects for controlling the OAM remote\n\n loopback function. ') dot3_oam_err_symbol_period_event_group = object_group((1, 3, 6, 1, 2, 1, 158, 2, 1, 5)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamErrSymPeriodWindowHi'), ('DOT3-OAM-MIB', 'dot3OamErrSymPeriodWindowLo'), ('DOT3-OAM-MIB', 'dot3OamErrSymPeriodThresholdHi'), ('DOT3-OAM-MIB', 'dot3OamErrSymPeriodThresholdLo'), ('DOT3-OAM-MIB', 'dot3OamErrSymPeriodEvNotifEnable'))) if mibBuilder.loadTexts: dot3OamErrSymbolPeriodEventGroup.setDescription('A collection of objects for configuring the thresholds for an\n Errored Symbol Period Event.\n\n Each [802.3ah] defined Event Notification TLV has its own\n conformance group because each event can be implemented\n independently of any other. ') dot3_oam_err_frame_period_event_group = object_group((1, 3, 6, 1, 2, 1, 158, 2, 1, 6)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamErrFramePeriodWindow'), ('DOT3-OAM-MIB', 'dot3OamErrFramePeriodThreshold'), ('DOT3-OAM-MIB', 'dot3OamErrFramePeriodEvNotifEnable'))) if mibBuilder.loadTexts: dot3OamErrFramePeriodEventGroup.setDescription('A collection of objects for configuring the thresholds for an\n Errored Frame Period Event.\n\n Each [802.3ah] defined Event Notification TLV has its own\n conformance group because each event can be implemented\n independently of any other. ') dot3_oam_err_frame_event_group = object_group((1, 3, 6, 1, 2, 1, 158, 2, 1, 7)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamErrFrameWindow'), ('DOT3-OAM-MIB', 'dot3OamErrFrameThreshold'), ('DOT3-OAM-MIB', 'dot3OamErrFrameEvNotifEnable'))) if mibBuilder.loadTexts: dot3OamErrFrameEventGroup.setDescription('A collection of objects for configuring the thresholds for an\n Errored Frame Event.\n\n Each [802.3ah] defined Event Notification TLV has its own\n conformance group because each event can be implemented\n independently of any other. ') dot3_oam_err_frame_secs_summary_event_group = object_group((1, 3, 6, 1, 2, 1, 158, 2, 1, 8)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamErrFrameSecsSummaryWindow'), ('DOT3-OAM-MIB', 'dot3OamErrFrameSecsSummaryThreshold'), ('DOT3-OAM-MIB', 'dot3OamErrFrameSecsEvNotifEnable'))) if mibBuilder.loadTexts: dot3OamErrFrameSecsSummaryEventGroup.setDescription('A collection of objects for configuring the thresholds for an\n Errored Frame Seconds Summary Event.\n\n Each [802.3ah] defined Event Notification TLV has its own\n conformance group because each event can be implemented\n independently of any other. ') dot3_oam_flag_event_group = object_group((1, 3, 6, 1, 2, 1, 158, 2, 1, 9)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamDyingGaspEnable'), ('DOT3-OAM-MIB', 'dot3OamCriticalEventEnable'))) if mibBuilder.loadTexts: dot3OamFlagEventGroup.setDescription('A collection of objects for configuring the sending OAMPDUs\n with the critical event flag or dying gasp flag enabled. ') dot3_oam_event_log_group = object_group((1, 3, 6, 1, 2, 1, 158, 2, 1, 10)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamEventLogTimestamp'), ('DOT3-OAM-MIB', 'dot3OamEventLogOui'), ('DOT3-OAM-MIB', 'dot3OamEventLogType'), ('DOT3-OAM-MIB', 'dot3OamEventLogLocation'), ('DOT3-OAM-MIB', 'dot3OamEventLogWindowHi'), ('DOT3-OAM-MIB', 'dot3OamEventLogWindowLo'), ('DOT3-OAM-MIB', 'dot3OamEventLogThresholdHi'), ('DOT3-OAM-MIB', 'dot3OamEventLogThresholdLo'), ('DOT3-OAM-MIB', 'dot3OamEventLogValue'), ('DOT3-OAM-MIB', 'dot3OamEventLogRunningTotal'), ('DOT3-OAM-MIB', 'dot3OamEventLogEventTotal'))) if mibBuilder.loadTexts: dot3OamEventLogGroup.setDescription('A collection of objects for configuring the thresholds for an\n Errored Frame Seconds Summary Event and maintaining the event\n information. ') dot3_oam_notification_group = notification_group((1, 3, 6, 1, 2, 1, 158, 2, 1, 11)).setObjects(*(('DOT3-OAM-MIB', 'dot3OamThresholdEvent'), ('DOT3-OAM-MIB', 'dot3OamNonThresholdEvent'))) if mibBuilder.loadTexts: dot3OamNotificationGroup.setDescription('A collection of notifications used by Ethernet OAM to signal\n to a management entity that local or remote events have\n occurred on a specified Ethernet link. ') mibBuilder.exportSymbols('DOT3-OAM-MIB', dot3OamLoopbackControlTx=dot3OamLoopbackControlTx, dot3OamEventLogEventTotal=dot3OamEventLogEventTotal, dot3OamEventLogLocation=dot3OamEventLogLocation, dot3OamEventLogEntry=dot3OamEventLogEntry, dot3OamEventLogWindowHi=dot3OamEventLogWindowHi, dot3OamPeerVendorOui=dot3OamPeerVendorOui, dot3OamNonThresholdEvent=dot3OamNonThresholdEvent, dot3OamEventLogRunningTotal=dot3OamEventLogRunningTotal, dot3OamMaxOamPduSize=dot3OamMaxOamPduSize, dot3OamErrSymbolPeriodEventGroup=dot3OamErrSymbolPeriodEventGroup, dot3OamPeerGroup=dot3OamPeerGroup, dot3OamFlagEventGroup=dot3OamFlagEventGroup, dot3OamErrSymPeriodWindowLo=dot3OamErrSymPeriodWindowLo, dot3OamLoopbackEntry=dot3OamLoopbackEntry, dot3OamUniqueEventNotificationTx=dot3OamUniqueEventNotificationTx, dot3OamLoopbackTable=dot3OamLoopbackTable, dot3OamLoopbackGroup=dot3OamLoopbackGroup, dot3OamCompliances=dot3OamCompliances, dot3OamErrSymPeriodWindowHi=dot3OamErrSymPeriodWindowHi, dot3OamErrFramePeriodEventGroup=dot3OamErrFramePeriodEventGroup, dot3OamInformationTx=dot3OamInformationTx, dot3OamPeerMode=dot3OamPeerMode, dot3OamErrSymPeriodThresholdHi=dot3OamErrSymPeriodThresholdHi, dot3OamInformationRx=dot3OamInformationRx, dot3OamFramesLostDueToOam=dot3OamFramesLostDueToOam, dot3OamOrgSpecificRx=dot3OamOrgSpecificRx, dot3OamUniqueEventNotificationRx=dot3OamUniqueEventNotificationRx, dot3OamMode=dot3OamMode, dot3OamUnsupportedCodesRx=dot3OamUnsupportedCodesRx, dot3OamNotificationGroup=dot3OamNotificationGroup, dot3OamPeerVendorInfo=dot3OamPeerVendorInfo, dot3OamEventLogGroup=dot3OamEventLogGroup, dot3OamDuplicateEventNotificationRx=dot3OamDuplicateEventNotificationRx, dot3OamUnsupportedCodesTx=dot3OamUnsupportedCodesTx, dot3OamErrFrameEventGroup=dot3OamErrFrameEventGroup, dot3OamStatsEntry=dot3OamStatsEntry, dot3OamErrFrameSecsSummaryWindow=dot3OamErrFrameSecsSummaryWindow, dot3OamPeerTable=dot3OamPeerTable, dot3OamObjects=dot3OamObjects, dot3OamErrFramePeriodWindow=dot3OamErrFramePeriodWindow, dot3OamErrFrameWindow=dot3OamErrFrameWindow, dot3OamVariableResponseRx=dot3OamVariableResponseRx, dot3OamPeerMacAddress=dot3OamPeerMacAddress, dot3OamVariableRequestTx=dot3OamVariableRequestTx, dot3OamErrFrameThreshold=dot3OamErrFrameThreshold, dot3OamEventLogOui=dot3OamEventLogOui, dot3OamConformance=dot3OamConformance, dot3OamOperStatus=dot3OamOperStatus, dot3OamEventConfigEntry=dot3OamEventConfigEntry, dot3OamErrFrameEvNotifEnable=dot3OamErrFrameEvNotifEnable, dot3OamEventLogWindowLo=dot3OamEventLogWindowLo, dot3OamVariableResponseTx=dot3OamVariableResponseTx, dot3OamTable=dot3OamTable, dot3OamErrFramePeriodEvNotifEnable=dot3OamErrFramePeriodEvNotifEnable, dot3OamEventLogThresholdHi=dot3OamEventLogThresholdHi, dot3OamCompliance=dot3OamCompliance, dot3OamOrgSpecificTx=dot3OamOrgSpecificTx, EightOTwoOui=EightOTwoOui, dot3OamEventLogTimestamp=dot3OamEventLogTimestamp, dot3OamErrSymPeriodEvNotifEnable=dot3OamErrSymPeriodEvNotifEnable, dot3OamErrFrameSecsSummaryEventGroup=dot3OamErrFrameSecsSummaryEventGroup, dot3OamPeerMaxOamPduSize=dot3OamPeerMaxOamPduSize, dot3OamPeerFunctionsSupported=dot3OamPeerFunctionsSupported, dot3OamEventLogType=dot3OamEventLogType, dot3OamStatsBaseGroup=dot3OamStatsBaseGroup, dot3OamLoopbackControlRx=dot3OamLoopbackControlRx, dot3OamPeerEntry=dot3OamPeerEntry, dot3OamCriticalEventEnable=dot3OamCriticalEventEnable, dot3OamErrFrameSecsSummaryThreshold=dot3OamErrFrameSecsSummaryThreshold, dot3OamLoopbackIgnoreRx=dot3OamLoopbackIgnoreRx, dot3OamGroups=dot3OamGroups, dot3OamLoopbackStatus=dot3OamLoopbackStatus, dot3OamConfigRevision=dot3OamConfigRevision, dot3OamEventLogThresholdLo=dot3OamEventLogThresholdLo, dot3OamErrFrameSecsEvNotifEnable=dot3OamErrFrameSecsEvNotifEnable, PYSNMP_MODULE_ID=dot3OamMIB, dot3OamDyingGaspEnable=dot3OamDyingGaspEnable, dot3OamNotifications=dot3OamNotifications, dot3OamPeerConfigRevision=dot3OamPeerConfigRevision, dot3OamEventLogValue=dot3OamEventLogValue, dot3OamEventLogTable=dot3OamEventLogTable, dot3OamThresholdEvent=dot3OamThresholdEvent, dot3OamFunctionsSupported=dot3OamFunctionsSupported, dot3OamVariableRequestRx=dot3OamVariableRequestRx, dot3OamEventConfigTable=dot3OamEventConfigTable, dot3OamDuplicateEventNotificationTx=dot3OamDuplicateEventNotificationTx, dot3OamErrSymPeriodThresholdLo=dot3OamErrSymPeriodThresholdLo, dot3OamControlGroup=dot3OamControlGroup, dot3OamEntry=dot3OamEntry, dot3OamStatsTable=dot3OamStatsTable, dot3OamMIB=dot3OamMIB, dot3OamAdminState=dot3OamAdminState, dot3OamEventLogIndex=dot3OamEventLogIndex, dot3OamErrFramePeriodThreshold=dot3OamErrFramePeriodThreshold)
# base class FyException(Exception): def __init__(s, message): s.message = '\n;;;;;\n' s.message += s.__class__.__name__.replace('_', ' ') s.message += '\n' s.message += str(message) def __str__(s): return s.message # exception class a_function_cannot_be_dotted(FyException): pass class cannot_indent_on_first_line(FyException): pass class cannot_find_attribute_in_class(FyException): pass class cannot_find_attribute_setter_in_class(FyException): pass class cannot_find_targetted_ast(FyException): pass class cannot_mix_args_and_kwargs(FyException): pass class cannot_overwrite_spec(FyException): pass class cannot_resolve_modifier(FyException): pass class cannot_set_reference_with_a_property_setter(FyException): pass class cannot_find_class_definition_in_module(FyException): pass class compilation_error(FyException): pass class else_without_if_elif_where_or_elwhere(FyException): pass class error_in_interpolant(FyException): pass class fortran_file_not_found(FyException): pass class guid_override_error(FyException): pass class indentation_increased_by_more_than_one_level(FyException): pass class indentation_without_colon(FyException): pass class inconsistent_mro(FyException): pass class intrinsic_type_cannot_be_dotted(FyException): pass class invalid_url(FyException): pass class left_element_in_aliased_import_is_not_an_url(FyException): pass class interpretation_error(FyException): pass class lexical_interpolation_is_only_on_routine_or_class(FyException): pass class linking_error(FyException): pass class mark_newlinex_lexing_error(FyException): pass class mixed_indentation(FyException): pass class nb_of_arguments_mismatch(FyException): pass class no_element_specified_in_slice_import(FyException): pass class no_fortran_compiler_found(FyException): pass class only_aliased_namespace_star_or_slice_import_are_allowed(FyException): pass class only_attribute_or_method_can_be_inherited(FyException): pass class only_star_import_allowed_for_shared_library(FyException): pass class only_star_or_slice_import_allowed_for_fortran(FyException): pass class python_import_error(FyException): pass class space_tab_mixed(FyException): pass class syntax_error(FyException): pass class unbalanced_parenthesis(FyException): pass class fml_error(FyException): pass class module_not_found(FyException): pass class name_not_found_in_fython_module(FyException): pass class package_not_found(FyException): pass class resolution_error(FyException): pass class string_format_error(FyException): pass class unknown_identifier(FyException): pass class unknown_print_mode(FyException): pass
class Fyexception(Exception): def __init__(s, message): s.message = '\n;;;;;\n' s.message += s.__class__.__name__.replace('_', ' ') s.message += '\n' s.message += str(message) def __str__(s): return s.message class A_Function_Cannot_Be_Dotted(FyException): pass class Cannot_Indent_On_First_Line(FyException): pass class Cannot_Find_Attribute_In_Class(FyException): pass class Cannot_Find_Attribute_Setter_In_Class(FyException): pass class Cannot_Find_Targetted_Ast(FyException): pass class Cannot_Mix_Args_And_Kwargs(FyException): pass class Cannot_Overwrite_Spec(FyException): pass class Cannot_Resolve_Modifier(FyException): pass class Cannot_Set_Reference_With_A_Property_Setter(FyException): pass class Cannot_Find_Class_Definition_In_Module(FyException): pass class Compilation_Error(FyException): pass class Else_Without_If_Elif_Where_Or_Elwhere(FyException): pass class Error_In_Interpolant(FyException): pass class Fortran_File_Not_Found(FyException): pass class Guid_Override_Error(FyException): pass class Indentation_Increased_By_More_Than_One_Level(FyException): pass class Indentation_Without_Colon(FyException): pass class Inconsistent_Mro(FyException): pass class Intrinsic_Type_Cannot_Be_Dotted(FyException): pass class Invalid_Url(FyException): pass class Left_Element_In_Aliased_Import_Is_Not_An_Url(FyException): pass class Interpretation_Error(FyException): pass class Lexical_Interpolation_Is_Only_On_Routine_Or_Class(FyException): pass class Linking_Error(FyException): pass class Mark_Newlinex_Lexing_Error(FyException): pass class Mixed_Indentation(FyException): pass class Nb_Of_Arguments_Mismatch(FyException): pass class No_Element_Specified_In_Slice_Import(FyException): pass class No_Fortran_Compiler_Found(FyException): pass class Only_Aliased_Namespace_Star_Or_Slice_Import_Are_Allowed(FyException): pass class Only_Attribute_Or_Method_Can_Be_Inherited(FyException): pass class Only_Star_Import_Allowed_For_Shared_Library(FyException): pass class Only_Star_Or_Slice_Import_Allowed_For_Fortran(FyException): pass class Python_Import_Error(FyException): pass class Space_Tab_Mixed(FyException): pass class Syntax_Error(FyException): pass class Unbalanced_Parenthesis(FyException): pass class Fml_Error(FyException): pass class Module_Not_Found(FyException): pass class Name_Not_Found_In_Fython_Module(FyException): pass class Package_Not_Found(FyException): pass class Resolution_Error(FyException): pass class String_Format_Error(FyException): pass class Unknown_Identifier(FyException): pass class Unknown_Print_Mode(FyException): pass
# Palanquin (9110107) | Outside Ninja Castle (800040000) mushroomShrine = 800000000 response = sm.sendAskYesNo("Would you like to go to #m" + str(mushroomShrine) + "m#?") if response: sm.warp(mushroomShrine)
mushroom_shrine = 800000000 response = sm.sendAskYesNo('Would you like to go to #m' + str(mushroomShrine) + 'm#?') if response: sm.warp(mushroomShrine)
f = open("./three.txt", "r") lines = [x.strip() for x in f.readlines()] gamma = "" for index in range(len(lines[0])): bits = [line[index] for line in lines] zeros = list(bits).count('0') ones = list(bits).count('1') if zeros > ones: gamma += "0" else: gamma += "1" epsilon = "" for index in range(len(lines[0])): bits = [line[index] for line in lines] zeros = list(bits).count('0') ones = list(bits).count('1') if zeros < ones: epsilon += "0" else: epsilon += "1" print("Star 1", int(epsilon, 2) * int(gamma, 2)) oxygen_valid = list(lines) index = 0 while len(oxygen_valid) > 1: bits = [line[index] for line in oxygen_valid] zeros = list(bits).count('0') ones = list(bits).count('1') if zeros > ones: oxygen_valid = [line for line in oxygen_valid if line[index] == "0"] else: oxygen_valid = [line for line in oxygen_valid if line[index] == "1"] index += 1 co = list(lines) index = 0 while len(co) > 1: bits = [line[index] for line in co] zeros = list(bits).count('0') ones = list(bits).count('1') if zeros <= ones: co = [line for line in co if line[index] == "0"] else: co = [line for line in co if line[index] == "1"] index += 1 print("Star 2", int(oxygen_valid[0], 2) * int(co[0], 2))
f = open('./three.txt', 'r') lines = [x.strip() for x in f.readlines()] gamma = '' for index in range(len(lines[0])): bits = [line[index] for line in lines] zeros = list(bits).count('0') ones = list(bits).count('1') if zeros > ones: gamma += '0' else: gamma += '1' epsilon = '' for index in range(len(lines[0])): bits = [line[index] for line in lines] zeros = list(bits).count('0') ones = list(bits).count('1') if zeros < ones: epsilon += '0' else: epsilon += '1' print('Star 1', int(epsilon, 2) * int(gamma, 2)) oxygen_valid = list(lines) index = 0 while len(oxygen_valid) > 1: bits = [line[index] for line in oxygen_valid] zeros = list(bits).count('0') ones = list(bits).count('1') if zeros > ones: oxygen_valid = [line for line in oxygen_valid if line[index] == '0'] else: oxygen_valid = [line for line in oxygen_valid if line[index] == '1'] index += 1 co = list(lines) index = 0 while len(co) > 1: bits = [line[index] for line in co] zeros = list(bits).count('0') ones = list(bits).count('1') if zeros <= ones: co = [line for line in co if line[index] == '0'] else: co = [line for line in co if line[index] == '1'] index += 1 print('Star 2', int(oxygen_valid[0], 2) * int(co[0], 2))
#!/usr/bin/python # # Copyright 2002-2019 Barcelona Supercomputing Center (www.bsc.es) # # 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. # IN = None INOUT = None FILE_IN = None FILE_OUT = None FILE_INOUT = None COLLECTION_IN = None COLLECTION_INOUT = None COLLECTION_OUT = None # Aliases for parameter definition as dictionary Type = 'type' # parameter type Direction = 'direction' # parameter type StdIOStream = 'stream' # parameter stream Prefix = 'prefix' # parameter prefix Depth = 'depth' # collection recursive depth block_count = 'block_count' block_length = 'block_length' stride = 'stride'
in = None inout = None file_in = None file_out = None file_inout = None collection_in = None collection_inout = None collection_out = None type = 'type' direction = 'direction' std_io_stream = 'stream' prefix = 'prefix' depth = 'depth' block_count = 'block_count' block_length = 'block_length' stride = 'stride'
def bin_search_lower(a, x): l, r = -1, len(a) while l + 1 < r: m = (l + r) // 2 if a[m] <= x: l = m else: r = m return l n, k = map(int, input().split()) array = list(map(int, input().split())) for x in map(int, input().split()): print(bin_search_lower(array, x) + 1)
def bin_search_lower(a, x): (l, r) = (-1, len(a)) while l + 1 < r: m = (l + r) // 2 if a[m] <= x: l = m else: r = m return l (n, k) = map(int, input().split()) array = list(map(int, input().split())) for x in map(int, input().split()): print(bin_search_lower(array, x) + 1)
class State: def __init__(self, client) -> None: self.client = client def get_input_command(self): return input(f"JogoDaVelha> ").strip().split() or [""] def handle_input_command(self, *input_command): pass def handle_opponent_command(self, *command): pass def handle_new_connection_command(self, *command): pass def _handle_skip(self): pass def _handle_default(self, *args): print("Invalid command!") def _handle_exit(self): self.client.stop()
class State: def __init__(self, client) -> None: self.client = client def get_input_command(self): return input(f'JogoDaVelha> ').strip().split() or [''] def handle_input_command(self, *input_command): pass def handle_opponent_command(self, *command): pass def handle_new_connection_command(self, *command): pass def _handle_skip(self): pass def _handle_default(self, *args): print('Invalid command!') def _handle_exit(self): self.client.stop()
#!/usr/bin/env python # -*- coding: utf-8 -*- spinMultiplicity = 2 energy = { 'CCSD(T)-F12/cc-pVTZ-F12': MolproLog('TSN09_f12.out'), } frequencies = GaussianLog('ts3-freq.log') rotors = [HinderedRotor(scanLog=ScanLog('scan_0.log'), pivots=[4,10], top=[10,11,12,13,14], symmetry=1, fit='best'), HinderedRotor(scanLog=ScanLog('scan_1.log'), pivots=[10,13], top=[13,14], symmetry=1, fit='best'), HinderedRotor(scanLog=ScanLog('scan_2.log'), pivots=[4,6], top=[6,7,8,9], symmetry=3, fit='best'),]
spin_multiplicity = 2 energy = {'CCSD(T)-F12/cc-pVTZ-F12': molpro_log('TSN09_f12.out')} frequencies = gaussian_log('ts3-freq.log') rotors = [hindered_rotor(scanLog=scan_log('scan_0.log'), pivots=[4, 10], top=[10, 11, 12, 13, 14], symmetry=1, fit='best'), hindered_rotor(scanLog=scan_log('scan_1.log'), pivots=[10, 13], top=[13, 14], symmetry=1, fit='best'), hindered_rotor(scanLog=scan_log('scan_2.log'), pivots=[4, 6], top=[6, 7, 8, 9], symmetry=3, fit='best')]
a, b = map(int, input().split()) a = str(a) b = str(b) count = 0 c = int(a) d = int(b) for i in range(c, d + 1): i = str(i) if i[0] == i[4] and i[1] == i[3]: count += 1 print(count)
(a, b) = map(int, input().split()) a = str(a) b = str(b) count = 0 c = int(a) d = int(b) for i in range(c, d + 1): i = str(i) if i[0] == i[4] and i[1] == i[3]: count += 1 print(count)
#!/usr/local/bin/python # coding: utf-8 VERSION = '2.1.1' # 0: CRITICAL, 1: INFO, 2: DEBUG VERBOSE_LEVEL = 1 # 0: CONSOLE, 1: FILE, 2: CONSOLE & FILE LOG_TYPE = 0 LOG_DIR = 'output' HTML = False DEBUG = True
version = '2.1.1' verbose_level = 1 log_type = 0 log_dir = 'output' html = False debug = True
class Human: def __init__(self, name, age): self.name = name self.age = age def greeting(self): print(f"Hello {self.name}!") def get_name(self): return self.name def get_age(self): return self.age def set_age(self, age): self.age = age h = Human("Andrei", 31) h.greeting() print(h.get_name()) h.set_age(48) print(h.get_age())
class Human: def __init__(self, name, age): self.name = name self.age = age def greeting(self): print(f'Hello {self.name}!') def get_name(self): return self.name def get_age(self): return self.age def set_age(self, age): self.age = age h = human('Andrei', 31) h.greeting() print(h.get_name()) h.set_age(48) print(h.get_age())
class Solution: def productExceptSelf(self, nums: List[int]) -> List[int]: num_len = len(nums) prefix_products, postfix_products = [1] * (num_len + 1), [1] * (num_len + 1) prefix_product, postfix_product = 1, 1 for prefix_index in range(num_len): prefix_product *= nums[prefix_index] prefix_products[prefix_index+1] = prefix_product postfix_index = num_len - 1 - prefix_index postfix_product *= nums[postfix_index] postfix_products[postfix_index] = postfix_product infix_products = [] for index in range(num_len): infix_products.append(prefix_products[index] * postfix_products[index+1]) return infix_products
class Solution: def product_except_self(self, nums: List[int]) -> List[int]: num_len = len(nums) (prefix_products, postfix_products) = ([1] * (num_len + 1), [1] * (num_len + 1)) (prefix_product, postfix_product) = (1, 1) for prefix_index in range(num_len): prefix_product *= nums[prefix_index] prefix_products[prefix_index + 1] = prefix_product postfix_index = num_len - 1 - prefix_index postfix_product *= nums[postfix_index] postfix_products[postfix_index] = postfix_product infix_products = [] for index in range(num_len): infix_products.append(prefix_products[index] * postfix_products[index + 1]) return infix_products
CREATE_GAME = 'game_create' JOIN_GAME = 'game_join' LEAVE_GAME = 'game_abort' SET_NICK = 'nickname_set' INIT_BOARD = 'board_init' FIRE = 'attack' NUKE = 'special_attack' MOVE = 'move' SURRENDER = 'surrender' CHAT_SEND = 'chat_send'
create_game = 'game_create' join_game = 'game_join' leave_game = 'game_abort' set_nick = 'nickname_set' init_board = 'board_init' fire = 'attack' nuke = 'special_attack' move = 'move' surrender = 'surrender' chat_send = 'chat_send'
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def mergeTwoLists(self, l1: ListNode, l2: ListNode) -> ListNode: if not l1: return l2 if not l2: return l1 res = ListNode(-1) if l1.val<l2.val: res.val = l1.val res.next = self.mergeTwoLists(l1.next,l2) else: res.val = l2.val res.next = self.mergeTwoLists(l1,l2.next) return res
class Solution: def merge_two_lists(self, l1: ListNode, l2: ListNode) -> ListNode: if not l1: return l2 if not l2: return l1 res = list_node(-1) if l1.val < l2.val: res.val = l1.val res.next = self.mergeTwoLists(l1.next, l2) else: res.val = l2.val res.next = self.mergeTwoLists(l1, l2.next) return res
odds = {1, 3, 5, 7} evens = set([0, 2, 4, 6, 8]) print(odds.union(evens)) odds.intersection() odds.difference()
odds = {1, 3, 5, 7} evens = set([0, 2, 4, 6, 8]) print(odds.union(evens)) odds.intersection() odds.difference()
def f1(): print(11) yield print(22) yield print(33) def f2(): print(55) yield print(66) yield print(77) v1 = f1() v2 = f2() next(v1) # v1.send(None) next(v2) # v1.send(None) next(v1) # v1.send(None) next(v2) # v1.send(None) next(v1) # v1.send(None) next(v2) # v1.send(None)
def f1(): print(11) yield print(22) yield print(33) def f2(): print(55) yield print(66) yield print(77) v1 = f1() v2 = f2() next(v1) next(v2) next(v1) next(v2) next(v1) next(v2)
## Gerenators def mygenerator(x): for i in range(x): yield i values = mygenerator(100) for i in values: print(i) print(next(mygenerator))
def mygenerator(x): for i in range(x): yield i values = mygenerator(100) for i in values: print(i) print(next(mygenerator))
class Node: def __init__(self, key): self.key = key self.child = [] def newNode(key): temp = Node(key) return temp def LevelOrderTraversal(root): if (root == None): return; # Standard level order traversal code # using queue q = [] # Create a queue q.append(root); # Enqueue root while (len(q) != 0): n = len(q); # If this node has children while (n > 0): # Dequeue an item from queue and print it p = q[0] q.pop(0); print(p.key, end='->') if len(p.child) > 0: for e in p.child: print(e.key.get("name"), end=",") print() # Enqueue all children of the dequeued item for i in range(len(p.child)): q.append(p.child[i]); n -= 1 print() # Print new line between two levels def add_node(root, index, value): if (root == None): return; # Standard level order traversal code # using queue q = [] # Create a queue q.append(root); # Enqueue root while (len(q) != 0): n = len(q); # If this node has children while (n > 0): p = q[0] q.pop(0); tmp_key = {'id': p.key['id'], 'name': p.key['name']} if tmp_key == index: tmp_value = {'id': value['id'], 'name': value['name']} if len(list(filter(lambda e: {'id': e.key['id'], 'name': e.key['name']} == tmp_value, p.child))) == 0: p.child.append(newNode(value)) # Enqueue all children of the dequeued item for i in range(len(p.child)): q.append(p.child[i]); n -= 1 def get_direct_sub_node(root, index): if root is None: return # Standard level order traversal code # using queue q = [] # Create a queue q.append(root) # Enqueue root while len(q) != 0: n = len(q) # If this node has children while n > 0: p = q[0] q.pop(0) if index['id']: # if id != None if index['id'] == p.key['id']: return p.key, p.child else: tmp_key = {"id": p.key["id"], "name": p.key["name"]} if tmp_key == index: return p.key, p.child # Enqueue all children of the dequeued item for i in range(len(p.child)): q.append(p.child[i]) n -= 1 return None def find_node_by_canonicalPath(root, path): if root is None: return q = [] # Create a queue q.append(root) # Enqueue root while len(q) != 0: n = len(q) # If this node has children while n > 0: p = q[0] q.pop(0) if p.key.get("canonicalPath") == path: return p # Enqueue all children of the dequeued item for i in range(len(p.child)): q.append(p.child[i]) n -= 1 return None
class Node: def __init__(self, key): self.key = key self.child = [] def new_node(key): temp = node(key) return temp def level_order_traversal(root): if root == None: return q = [] q.append(root) while len(q) != 0: n = len(q) while n > 0: p = q[0] q.pop(0) print(p.key, end='->') if len(p.child) > 0: for e in p.child: print(e.key.get('name'), end=',') print() for i in range(len(p.child)): q.append(p.child[i]) n -= 1 print() def add_node(root, index, value): if root == None: return q = [] q.append(root) while len(q) != 0: n = len(q) while n > 0: p = q[0] q.pop(0) tmp_key = {'id': p.key['id'], 'name': p.key['name']} if tmp_key == index: tmp_value = {'id': value['id'], 'name': value['name']} if len(list(filter(lambda e: {'id': e.key['id'], 'name': e.key['name']} == tmp_value, p.child))) == 0: p.child.append(new_node(value)) for i in range(len(p.child)): q.append(p.child[i]) n -= 1 def get_direct_sub_node(root, index): if root is None: return q = [] q.append(root) while len(q) != 0: n = len(q) while n > 0: p = q[0] q.pop(0) if index['id']: if index['id'] == p.key['id']: return (p.key, p.child) else: tmp_key = {'id': p.key['id'], 'name': p.key['name']} if tmp_key == index: return (p.key, p.child) for i in range(len(p.child)): q.append(p.child[i]) n -= 1 return None def find_node_by_canonical_path(root, path): if root is None: return q = [] q.append(root) while len(q) != 0: n = len(q) while n > 0: p = q[0] q.pop(0) if p.key.get('canonicalPath') == path: return p for i in range(len(p.child)): q.append(p.child[i]) n -= 1 return None
def add_up(nums): return sum(nums) def test_answer(): assert add_up([1,2,2]) == 5
def add_up(nums): return sum(nums) def test_answer(): assert add_up([1, 2, 2]) == 5
#!/usr/bin/python3 def read_file(filename=""): '''open a given file''' with open(filename, 'r') as f: print("{}".format(f.read()), end="")
def read_file(filename=''): """open a given file""" with open(filename, 'r') as f: print('{}'.format(f.read()), end='')
class Node: def __init__(self, x, y): self.g = 0 self.h = 0 self.f = 0 self.parent = None self.cost = 1 self.x = x self.y = y self.left_child = None self.right_child = None self.top_child = None self.down_child = None def update_h(self, goal): self.h = abs(self.x - goal.x) + abs(self.y - goal.y) self.f = self.h + self.g def update_hnew(self, goalC): self.h = goalC - self.g self.f = self.h + self.g def update_g(self, new_g): self.g = new_g self.f = new_g + self.h def update_f(self, new_f): self.f = new_f def print(self): print("(", self.x, ", ", self.y, ")") def traverse_children(self, i): if i == 0: return self.right_child if i == 1: return self.left_child if i == 2: return self.top_child return self.down_child
class Node: def __init__(self, x, y): self.g = 0 self.h = 0 self.f = 0 self.parent = None self.cost = 1 self.x = x self.y = y self.left_child = None self.right_child = None self.top_child = None self.down_child = None def update_h(self, goal): self.h = abs(self.x - goal.x) + abs(self.y - goal.y) self.f = self.h + self.g def update_hnew(self, goalC): self.h = goalC - self.g self.f = self.h + self.g def update_g(self, new_g): self.g = new_g self.f = new_g + self.h def update_f(self, new_f): self.f = new_f def print(self): print('(', self.x, ', ', self.y, ')') def traverse_children(self, i): if i == 0: return self.right_child if i == 1: return self.left_child if i == 2: return self.top_child return self.down_child
def clever_format(num, format="%.2f"): if num > 1e12: return format % (num / 1e12) + "T" if num > 1e9: return format % (num / 1e9) + "G" if num > 1e6: return format % (num / 1e6) + "M" if num > 1e3: return format % (num / 1e3) + "K"
def clever_format(num, format='%.2f'): if num > 1000000000000.0: return format % (num / 1000000000000.0) + 'T' if num > 1000000000.0: return format % (num / 1000000000.0) + 'G' if num > 1000000.0: return format % (num / 1000000.0) + 'M' if num > 1000.0: return format % (num / 1000.0) + 'K'
n,k=map(int,input().split()) x=sorted(list(map(int,input().split()))) a=[] for i in range(n-k+1): l=x[i] r=x[i+k-1] a.append(min(abs(l)+abs(r-l),abs(r)+abs(l-r))) print(min(a))
(n, k) = map(int, input().split()) x = sorted(list(map(int, input().split()))) a = [] for i in range(n - k + 1): l = x[i] r = x[i + k - 1] a.append(min(abs(l) + abs(r - l), abs(r) + abs(l - r))) print(min(a))
class Cell: def __init__(self, alive = False): self.currentState = alive self.futureState = alive def updateState(self, state): self.futureState = state def refresh(self): self.currentState = self.futureState def isAlive(self): return self.currentState def __str__(self): return "O" if self.currentState else "."
class Cell: def __init__(self, alive=False): self.currentState = alive self.futureState = alive def update_state(self, state): self.futureState = state def refresh(self): self.currentState = self.futureState def is_alive(self): return self.currentState def __str__(self): return 'O' if self.currentState else '.'
str1 = input() str2 = input() a = [0 for i in range(0,27)] for i in str1: a[ord(i)-ord('a')] += 1 for i in str2: a[ord(i)-ord('a')] -= 1 ans = 0 for i in a: if ( i < 0 ): ans += -i else: ans += i print(ans)
str1 = input() str2 = input() a = [0 for i in range(0, 27)] for i in str1: a[ord(i) - ord('a')] += 1 for i in str2: a[ord(i) - ord('a')] -= 1 ans = 0 for i in a: if i < 0: ans += -i else: ans += i print(ans)
def serializeCgiToServer(coors): #coors is a n by 2 2D array of doubles string = "" for i in range(0, len(coors)): string += str(coors[i][0]) + "," + str(coors[i][1]) # add comma between x and y coor string += ";" # add semicolon to seperate coors string += "\n" #ending character return string.encode('utf-8') def deserializeCgiToServer(string): string = string.decode('utf-8') splitted = string.split(";") coors = [None]*(len(splitted)-1) # create list: [None, None, None,...] with length len(splitted)-1 for i in range(0,len(splitted)-1): coors[i] = splitted[i].split(",") coors[i] = [float(x) for x in coors[i]] # convert to float return coors def serializeServerToCgi(distanceMatrix): # distanceMatrix is matrix of doubles string = "" for i in range(0, len(distanceMatrix)): for j in range(0, len(distanceMatrix[i])): string += str(distanceMatrix[i][j]) + "," # seperate distances with comma string += ";" # seperate rows with semicolon string += "\n" # ending character return string.encode('utf-8') def deserializeServerToCgi(string): string = string.decode('utf-8') splitted = string.split(";") distanceMatrix = [None]*(len(splitted)-1) for i in range(0,len(splitted)-1): row = splitted[i].split(",") distanceMatrix[i] = row[0:len(row)-1] distanceMatrix[i] = [float(x) for x in distanceMatrix[i]] # convert to float return distanceMatrix def testFunctions(): string = serializeCgiToServer([[1,2]]) coors = deserializeCgiToServer(string) print(coors) string = serializeServerToCgi([[10,6,5]]) distanceMatrix = deserializeServerToCgi(string) print(distanceMatrix) #if __name__ == '__main__': # testFunctions()
def serialize_cgi_to_server(coors): string = '' for i in range(0, len(coors)): string += str(coors[i][0]) + ',' + str(coors[i][1]) string += ';' string += '\n' return string.encode('utf-8') def deserialize_cgi_to_server(string): string = string.decode('utf-8') splitted = string.split(';') coors = [None] * (len(splitted) - 1) for i in range(0, len(splitted) - 1): coors[i] = splitted[i].split(',') coors[i] = [float(x) for x in coors[i]] return coors def serialize_server_to_cgi(distanceMatrix): string = '' for i in range(0, len(distanceMatrix)): for j in range(0, len(distanceMatrix[i])): string += str(distanceMatrix[i][j]) + ',' string += ';' string += '\n' return string.encode('utf-8') def deserialize_server_to_cgi(string): string = string.decode('utf-8') splitted = string.split(';') distance_matrix = [None] * (len(splitted) - 1) for i in range(0, len(splitted) - 1): row = splitted[i].split(',') distanceMatrix[i] = row[0:len(row) - 1] distanceMatrix[i] = [float(x) for x in distanceMatrix[i]] return distanceMatrix def test_functions(): string = serialize_cgi_to_server([[1, 2]]) coors = deserialize_cgi_to_server(string) print(coors) string = serialize_server_to_cgi([[10, 6, 5]]) distance_matrix = deserialize_server_to_cgi(string) print(distanceMatrix)
# # PySNMP MIB module CISCOSB-SENSORENTMIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCOSB-SENSORENTMIB # Produced by pysmi-0.3.4 at Wed May 1 12:23:27 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") ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint") rlEnv, = mibBuilder.importSymbols("CISCOSB-HWENVIROMENT", "rlEnv") entityPhysicalGroup, entPhysicalIndex = mibBuilder.importSymbols("ENTITY-MIB", "entityPhysicalGroup", "entPhysicalIndex") EntitySensorValue, entPhySensorEntry = mibBuilder.importSymbols("ENTITY-SENSOR-MIB", "EntitySensorValue", "entPhySensorEntry") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") TimeTicks, ModuleIdentity, Unsigned32, Gauge32, mib_2, NotificationType, ObjectIdentity, IpAddress, Counter64, Bits, Integer32, Counter32, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "ModuleIdentity", "Unsigned32", "Gauge32", "mib-2", "NotificationType", "ObjectIdentity", "IpAddress", "Counter64", "Bits", "Integer32", "Counter32", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier") DisplayString, TimeStamp, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TimeStamp", "TextualConvention") rlSensor = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 83, 4)) rlSensor.setRevisions(('2003-09-21 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rlSensor.setRevisionsDescriptions(('ADDED this MODULE-IDENTITY clause.',)) if mibBuilder.loadTexts: rlSensor.setLastUpdated('200309210000Z') if mibBuilder.loadTexts: rlSensor.setOrganization('Cisco Small Business') if mibBuilder.loadTexts: rlSensor.setContactInfo('Postal: 170 West Tasman Drive San Jose , CA 95134-1706 USA Website: Cisco Small Business Home http://www.cisco.com/smb>;, Cisco Small Business Support Community <http://www.cisco.com/go/smallbizsupport>') if mibBuilder.loadTexts: rlSensor.setDescription('The private MIB module definition for sensors in Cisco devices.') rlEntPhySensorTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 83, 3), ) if mibBuilder.loadTexts: rlEntPhySensorTable.setStatus('current') if mibBuilder.loadTexts: rlEntPhySensorTable.setDescription('The addition to the table of sensors maintained by the environmental monitor.') rlEntPhySensorEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 83, 3, 1), ) entPhySensorEntry.registerAugmentions(("CISCOSB-SENSORENTMIB", "rlEntPhySensorEntry")) rlEntPhySensorEntry.setIndexNames(*entPhySensorEntry.getIndexNames()) if mibBuilder.loadTexts: rlEntPhySensorEntry.setStatus('current') if mibBuilder.loadTexts: rlEntPhySensorEntry.setDescription('An additon to the entry in the sensor table, representing the maximum/minimum values for the sensor associated.') rlEnvPhySensorMinValue = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 83, 3, 1, 1), EntitySensorValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlEnvPhySensorMinValue.setStatus('current') if mibBuilder.loadTexts: rlEnvPhySensorMinValue.setDescription('Minimum value for the Sensor being instrumented.') rlEnvPhySensorMaxValue = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 83, 3, 1, 2), EntitySensorValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlEnvPhySensorMaxValue.setStatus('current') if mibBuilder.loadTexts: rlEnvPhySensorMaxValue.setDescription('Maximum value for the Sensor being instrumented.') rlEnvPhySensorTestValue = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 83, 3, 1, 3), EntitySensorValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlEnvPhySensorTestValue.setStatus('current') if mibBuilder.loadTexts: rlEnvPhySensorTestValue.setDescription('Test/reference value for the Sensor being instrumented.') mibBuilder.exportSymbols("CISCOSB-SENSORENTMIB", rlEntPhySensorEntry=rlEntPhySensorEntry, rlSensor=rlSensor, rlEnvPhySensorMaxValue=rlEnvPhySensorMaxValue, rlEnvPhySensorTestValue=rlEnvPhySensorTestValue, PYSNMP_MODULE_ID=rlSensor, rlEntPhySensorTable=rlEntPhySensorTable, rlEnvPhySensorMinValue=rlEnvPhySensorMinValue)
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, constraints_union, single_value_constraint, value_size_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueSizeConstraint', 'ValueRangeConstraint') (rl_env,) = mibBuilder.importSymbols('CISCOSB-HWENVIROMENT', 'rlEnv') (entity_physical_group, ent_physical_index) = mibBuilder.importSymbols('ENTITY-MIB', 'entityPhysicalGroup', 'entPhysicalIndex') (entity_sensor_value, ent_phy_sensor_entry) = mibBuilder.importSymbols('ENTITY-SENSOR-MIB', 'EntitySensorValue', 'entPhySensorEntry') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup') (time_ticks, module_identity, unsigned32, gauge32, mib_2, notification_type, object_identity, ip_address, counter64, bits, integer32, counter32, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'ModuleIdentity', 'Unsigned32', 'Gauge32', 'mib-2', 'NotificationType', 'ObjectIdentity', 'IpAddress', 'Counter64', 'Bits', 'Integer32', 'Counter32', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier') (display_string, time_stamp, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TimeStamp', 'TextualConvention') rl_sensor = module_identity((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 83, 4)) rlSensor.setRevisions(('2003-09-21 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rlSensor.setRevisionsDescriptions(('ADDED this MODULE-IDENTITY clause.',)) if mibBuilder.loadTexts: rlSensor.setLastUpdated('200309210000Z') if mibBuilder.loadTexts: rlSensor.setOrganization('Cisco Small Business') if mibBuilder.loadTexts: rlSensor.setContactInfo('Postal: 170 West Tasman Drive San Jose , CA 95134-1706 USA Website: Cisco Small Business Home http://www.cisco.com/smb>;, Cisco Small Business Support Community <http://www.cisco.com/go/smallbizsupport>') if mibBuilder.loadTexts: rlSensor.setDescription('The private MIB module definition for sensors in Cisco devices.') rl_ent_phy_sensor_table = mib_table((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 83, 3)) if mibBuilder.loadTexts: rlEntPhySensorTable.setStatus('current') if mibBuilder.loadTexts: rlEntPhySensorTable.setDescription('The addition to the table of sensors maintained by the environmental monitor.') rl_ent_phy_sensor_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 83, 3, 1)) entPhySensorEntry.registerAugmentions(('CISCOSB-SENSORENTMIB', 'rlEntPhySensorEntry')) rlEntPhySensorEntry.setIndexNames(*entPhySensorEntry.getIndexNames()) if mibBuilder.loadTexts: rlEntPhySensorEntry.setStatus('current') if mibBuilder.loadTexts: rlEntPhySensorEntry.setDescription('An additon to the entry in the sensor table, representing the maximum/minimum values for the sensor associated.') rl_env_phy_sensor_min_value = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 83, 3, 1, 1), entity_sensor_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlEnvPhySensorMinValue.setStatus('current') if mibBuilder.loadTexts: rlEnvPhySensorMinValue.setDescription('Minimum value for the Sensor being instrumented.') rl_env_phy_sensor_max_value = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 83, 3, 1, 2), entity_sensor_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlEnvPhySensorMaxValue.setStatus('current') if mibBuilder.loadTexts: rlEnvPhySensorMaxValue.setDescription('Maximum value for the Sensor being instrumented.') rl_env_phy_sensor_test_value = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 83, 3, 1, 3), entity_sensor_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlEnvPhySensorTestValue.setStatus('current') if mibBuilder.loadTexts: rlEnvPhySensorTestValue.setDescription('Test/reference value for the Sensor being instrumented.') mibBuilder.exportSymbols('CISCOSB-SENSORENTMIB', rlEntPhySensorEntry=rlEntPhySensorEntry, rlSensor=rlSensor, rlEnvPhySensorMaxValue=rlEnvPhySensorMaxValue, rlEnvPhySensorTestValue=rlEnvPhySensorTestValue, PYSNMP_MODULE_ID=rlSensor, rlEntPhySensorTable=rlEntPhySensorTable, rlEnvPhySensorMinValue=rlEnvPhySensorMinValue)
count = 0 fields = ["byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"] hex_not = "1234567890abcdef" ecls = ["amb", "blu", "brn", "gry", "grn", "hzl", "oth"] def check_pprt(pprt): global count flag = True i = 0 while flag and i < len(fields): flag = flag and fields[i] in pprt i = i + 1 if flag: try: byr = int(pprt["byr"]) flag = flag and (byr >= 1920 and byr <= 2002) iyr = int(pprt["iyr"]) flag = flag and (iyr >= 2010 and iyr <= 2020) eyr = int(pprt["eyr"]) flag = flag and (eyr >= 2020 and eyr <= 2030) hgt = int(pprt["hgt"][:-2]) is_cm = pprt["hgt"][-2:] == "cm" lwr = 150 if is_cm else 59 upr = 193 if is_cm else 76 flag = flag and (hgt >= lwr and hgt <= upr) flag = flag and pprt["hcl"][0] == "#" for ch in pprt["hcl"][1:]: flag = flag and ch in hex_not flag = flag and pprt["ecl"] in ecls flag = flag and len(pprt["pid"]) == 9 except: flag = False count = count + flag pprt = dict() while True: try: ln = input() if not ln.strip(): check_pprt(pprt) pprt = dict() continue data = ln.split(" ") for d in data: d_spl = d.split(":") pprt[d_spl[0]] = d_spl[1] except EOFError: check_pprt(pprt) break print(count)
count = 0 fields = ['byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid'] hex_not = '1234567890abcdef' ecls = ['amb', 'blu', 'brn', 'gry', 'grn', 'hzl', 'oth'] def check_pprt(pprt): global count flag = True i = 0 while flag and i < len(fields): flag = flag and fields[i] in pprt i = i + 1 if flag: try: byr = int(pprt['byr']) flag = flag and (byr >= 1920 and byr <= 2002) iyr = int(pprt['iyr']) flag = flag and (iyr >= 2010 and iyr <= 2020) eyr = int(pprt['eyr']) flag = flag and (eyr >= 2020 and eyr <= 2030) hgt = int(pprt['hgt'][:-2]) is_cm = pprt['hgt'][-2:] == 'cm' lwr = 150 if is_cm else 59 upr = 193 if is_cm else 76 flag = flag and (hgt >= lwr and hgt <= upr) flag = flag and pprt['hcl'][0] == '#' for ch in pprt['hcl'][1:]: flag = flag and ch in hex_not flag = flag and pprt['ecl'] in ecls flag = flag and len(pprt['pid']) == 9 except: flag = False count = count + flag pprt = dict() while True: try: ln = input() if not ln.strip(): check_pprt(pprt) pprt = dict() continue data = ln.split(' ') for d in data: d_spl = d.split(':') pprt[d_spl[0]] = d_spl[1] except EOFError: check_pprt(pprt) break print(count)
#OPERATOR PENUGASAN #input mengisi nilai nilai_x=int(input("masukan nilai x: ")) #operator penjumlahan nilai_x +=20 print("hasil jumlah: ", nilai_x) nilai_x=int(input("masukan nilai x: ")) #operator pengurangan nilai_x -=10 print("hasil kurang:",nilai_x) nilai_x=int(input("masukan nilai x: ")) #operator perkalian nilai_x *=10 print("hasil kali:",nilai_x) nilai_x=int(input("masukan nilai x: ")) #operator pembagian nilai_x /=30 print("hasil bagi:",nilai_x) nilai_x=int(input("masukan nilai x: ")) #operator perpangkatan nilai_x **=5 print("hasil pangkat:",nilai_x) nilai_x=int(input("masukan nilai x: ")) #operator sisa bagi nilai_x %=35 print("hasil sisa bagi:",nilai_x)
nilai_x = int(input('masukan nilai x: ')) nilai_x += 20 print('hasil jumlah: ', nilai_x) nilai_x = int(input('masukan nilai x: ')) nilai_x -= 10 print('hasil kurang:', nilai_x) nilai_x = int(input('masukan nilai x: ')) nilai_x *= 10 print('hasil kali:', nilai_x) nilai_x = int(input('masukan nilai x: ')) nilai_x /= 30 print('hasil bagi:', nilai_x) nilai_x = int(input('masukan nilai x: ')) nilai_x **= 5 print('hasil pangkat:', nilai_x) nilai_x = int(input('masukan nilai x: ')) nilai_x %= 35 print('hasil sisa bagi:', nilai_x)
#author SANKALP SAXENA # Enter your code here. Read input from STDIN. Print output to STDOUT n = int(input()) s = set() for i in range(0, n) : s.add(input()) print(len(s))
n = int(input()) s = set() for i in range(0, n): s.add(input()) print(len(s))
def swap_case(s): swapped = s.swapcase() return swapped
def swap_case(s): swapped = s.swapcase() return swapped
#----------------------------------------------------------------------------- # Runtime: 84ms # Memory Usage: # Link: #----------------------------------------------------------------------------- class Solution: def multiply(self, num1: str, num2: str) -> str: if num1 == '0' or num2 == '0': return '0' len_num1 = len(num1) len_num2 = len(num2) num1 = num1[::-1] num2 = num2[::-1] result_list = [0] * 220 dic = {'0':0,'1':1,'2':2,'3':3,'4':4,'5':5,'6':6,'7':7,'8':8,'9':9} for i in range(len_num1): for j in range(len_num2): result_list[i + j] += dic[num1[i]] * dic[num2[j]] carry = 0 result = "" for i in range(len_num1 + len_num2): carry, rest = divmod(result_list[i] + carry, 10) result = str(rest) + result for i, ch in enumerate(result): if ch != '0': break return result[i:]
class Solution: def multiply(self, num1: str, num2: str) -> str: if num1 == '0' or num2 == '0': return '0' len_num1 = len(num1) len_num2 = len(num2) num1 = num1[::-1] num2 = num2[::-1] result_list = [0] * 220 dic = {'0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9} for i in range(len_num1): for j in range(len_num2): result_list[i + j] += dic[num1[i]] * dic[num2[j]] carry = 0 result = '' for i in range(len_num1 + len_num2): (carry, rest) = divmod(result_list[i] + carry, 10) result = str(rest) + result for (i, ch) in enumerate(result): if ch != '0': break return result[i:]
# program that takes a text file as input and returns the number of words of a given text file. def count_words(filepath): with open(filepath) as f: data = f.read() data.replace(",", " ") return len(data.split(" ")) print(count_words("words.txt"))
def count_words(filepath): with open(filepath) as f: data = f.read() data.replace(',', ' ') return len(data.split(' ')) print(count_words('words.txt'))
#get the user input for Position position = input("Position : ") while position != "M" and position != "m" and position != "S" and position != "s": print("Invalid Input") position = input("Position : ") #get the user input for sales amount sales = input("Sales amount : ") sales = float(sales) #get the basic salary by the user input if position == "M" or position == "m": basic = 50000 else: basic = 75000 #check the sales amount for commission if sales >= 30000: commission = sales * 10 / 100 else: commission = 0 #calculate the salary salary = basic + commission #display the commission and the salary print("Commission : " + str(commission)) print("Salary : " + str(salary))
position = input('Position : ') while position != 'M' and position != 'm' and (position != 'S') and (position != 's'): print('Invalid Input') position = input('Position : ') sales = input('Sales amount : ') sales = float(sales) if position == 'M' or position == 'm': basic = 50000 else: basic = 75000 if sales >= 30000: commission = sales * 10 / 100 else: commission = 0 salary = basic + commission print('Commission : ' + str(commission)) print('Salary : ' + str(salary))
# Created by MechAviv # Quest ID :: 23600 # Not coded yet OBJECT_6 = sm.getIntroNpcObjectID(2159377) sm.curNodeEventEnd(True) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(True, True, False, False) sm.sendDelay(900) sm.moveCamera(False, 100, -307, -41) sm.sendDelay(2604) sm.setSpeakerID(2159377) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendNext("Good, very good! I am very satisfied with these results. Just a few more fine adjustments and...") sm.startQuest(23724) sm.completeQuest(23600) sm.changeBGM("Bgm30.img/fromUnderToUpper", 0, 0) sm.showEffect("Effect/Direction12.img/effect/tuto/BalloonMsg1/0", 1200, 0, -120, 0, OBJECT_6, False, 0) sm.moveNpcByObjectId(OBJECT_6, True, 1, 100) sm.sendDelay(90) sm.setSpeakerID(2159377) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendNext("An intruder?! It could be Orchid. Turn on the monitor!") sm.startQuest(23725) sm.sendDelay(2100) sm.completeQuest(23725) sm.sendDelay(1200) sm.setSpeakerID(2159377) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendNext("Is it the Resistance? I suppose that would be better than Orchid, but... this is the worst possible time!") sm.setSpeakerID(2159377) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendSay("Wait, wait, wait. Maybe this will work. One more test, yes... they will be perfect... Hahaha... MWAHAHAHA!") sm.warp(931050940, 0)
object_6 = sm.getIntroNpcObjectID(2159377) sm.curNodeEventEnd(True) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(True, True, False, False) sm.sendDelay(900) sm.moveCamera(False, 100, -307, -41) sm.sendDelay(2604) sm.setSpeakerID(2159377) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendNext('Good, very good! I am very satisfied with these results. Just a few more fine adjustments and...') sm.startQuest(23724) sm.completeQuest(23600) sm.changeBGM('Bgm30.img/fromUnderToUpper', 0, 0) sm.showEffect('Effect/Direction12.img/effect/tuto/BalloonMsg1/0', 1200, 0, -120, 0, OBJECT_6, False, 0) sm.moveNpcByObjectId(OBJECT_6, True, 1, 100) sm.sendDelay(90) sm.setSpeakerID(2159377) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendNext('An intruder?! It could be Orchid. Turn on the monitor!') sm.startQuest(23725) sm.sendDelay(2100) sm.completeQuest(23725) sm.sendDelay(1200) sm.setSpeakerID(2159377) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendNext('Is it the Resistance? I suppose that would be better than Orchid, but... this is the worst possible time!') sm.setSpeakerID(2159377) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendSay('Wait, wait, wait. Maybe this will work. One more test, yes... they will be perfect... Hahaha... MWAHAHAHA!') sm.warp(931050940, 0)
rgb = input() rgb = rgb.replace(" ", "") if int(rgb) % 4 == 0: print("YES") else: print("NO")
rgb = input() rgb = rgb.replace(' ', '') if int(rgb) % 4 == 0: print('YES') else: print('NO')
def main() -> None: n = int(input()) def f(a: int, b: int) -> int: return a**3 + (a + b) * a * b + b**3 def binary_search(a: int) -> int: lo = -1 hi = 1 << 20 while hi - lo > 1: # print(lo, hi) b = (lo + hi) // 2 if f(a, b) >= n: hi = b else: lo = b return hi mn = 1 << 64 for a in range(1 << 20): b = binary_search(a) x = f(a, b) mn = min(mn, x) print(mn) if __name__ == "__main__": main()
def main() -> None: n = int(input()) def f(a: int, b: int) -> int: return a ** 3 + (a + b) * a * b + b ** 3 def binary_search(a: int) -> int: lo = -1 hi = 1 << 20 while hi - lo > 1: b = (lo + hi) // 2 if f(a, b) >= n: hi = b else: lo = b return hi mn = 1 << 64 for a in range(1 << 20): b = binary_search(a) x = f(a, b) mn = min(mn, x) print(mn) if __name__ == '__main__': main()
def raw_response(function=None): def decorator(function): function.raw_response = True return function if function: return decorator(function) return decorator
def raw_response(function=None): def decorator(function): function.raw_response = True return function if function: return decorator(function) return decorator
class StringBuilder(object): def __init__(self, strr=''): self.str_list = [s for s in strr] def __getitem__(self, item): return ''.join(self.str_list[item]) def __setitem__(self, key, value): self.str_list[key] = value def __repr__(self): return ''.join(self.str_list) def __len__(self): return len(self.str_list) def __iter__(self): for s in self.str_list: yield s def __add__(self, other): for s in other: self.str_list.append(s) return self def append(self, other): return self.__add__(other) def __str__(self): return self.__repr__() def __delitem__(self, key): self.str_list.pop(key) def remove(self, key): self.__delitem__(key) def to_string(self): return self.__str__()
class Stringbuilder(object): def __init__(self, strr=''): self.str_list = [s for s in strr] def __getitem__(self, item): return ''.join(self.str_list[item]) def __setitem__(self, key, value): self.str_list[key] = value def __repr__(self): return ''.join(self.str_list) def __len__(self): return len(self.str_list) def __iter__(self): for s in self.str_list: yield s def __add__(self, other): for s in other: self.str_list.append(s) return self def append(self, other): return self.__add__(other) def __str__(self): return self.__repr__() def __delitem__(self, key): self.str_list.pop(key) def remove(self, key): self.__delitem__(key) def to_string(self): return self.__str__()
#from math import hypot co = float(input('Quanto mede o cateto oposto? ')) ca = float(input('Quanto mede o cateto adjacente? ')) hi = hypot(co, ca) print(f'A hipotenusa vai medir {hi:.2f}') ''' import math co = float(input('Quanto mede o cateto oposto? ')) ca = float(input('Quanto mede o cateto adjacente? ')) hi = math.hypot(co, ca) print(f'A hipotenusa vai medir {hi:.2f}') '''
co = float(input('Quanto mede o cateto oposto? ')) ca = float(input('Quanto mede o cateto adjacente? ')) hi = hypot(co, ca) print(f'A hipotenusa vai medir {hi:.2f}') "\nimport math\nco = float(input('Quanto mede o cateto oposto? '))\nca = float(input('Quanto mede o cateto adjacente? '))\nhi = math.hypot(co, ca)\nprint(f'A hipotenusa vai medir {hi:.2f}')\n\n"
class Person: IS = None def __init__(self, name, hours, rate): self.name = name self.hours = hours self.rate = rate def __new__(cls, *args, **kwargs): if cls.IS == None: cls.IS = object.__new__(Person) return cls.IS def pay(self): return self.hours * self.rate z = Person('Bob', 14, 4) x = Person('Jack', 44, 4) print(z, x) print(z.hours, x.hours)
class Person: is = None def __init__(self, name, hours, rate): self.name = name self.hours = hours self.rate = rate def __new__(cls, *args, **kwargs): if cls.IS == None: cls.IS = object.__new__(Person) return cls.IS def pay(self): return self.hours * self.rate z = person('Bob', 14, 4) x = person('Jack', 44, 4) print(z, x) print(z.hours, x.hours)
data_matrix = [ [2, 3, 1, 1], [1, 2, 3, 1], [1, 1, 2, 3], [3, 1, 1, 2] ] def fill_zeros(data_val): return bin(int(data_val, 16))[2:].zfill(8) input_hex = [0xd4, 0xbf, 0x5d, 0x30] input_bin = [] for i, bin_num in enumerate(input_hex): bin_num = bin(input_hex[i])[2:].zfill(8) print(bin_num) bin_num = int(bin_num, 2) input_bin.append(bin_num) print(input_bin) for col in data_matrix: print("+++++++++++++++++++++++\nThe {} round\n\n".format(col)) result_row_1 = [] for i, row in enumerate(col): if row == 2: print("2") a = input_bin[i] a = bin(input_bin[i])[2:].zfill(8) print("AAAAAAAAAAAAAAAAA\n") print("a = {}".format(a)) print(type(a)) print("\nAAAAAAAAAAAAAAAA") if int(a[0]) == 1: a = input_bin[i] << 1 a = bin(a)[3:].zfill(8) print("I am a leftshifted a: {}".format(a)) a = int(a, 2) xor_row_1 = a ^ 0x1b xor_row_1 = bin(xor_row_1)[2:].zfill(8) print("I am == 1: {}".format(xor_row_1)) else: a = input_bin[i] << 1 a = bin(a)[3:].zfill(8) a = int(a, 2) xor_row_1 = a xor_row_1 = bin(xor_row_1)[2:].zfill(8) print("I am == 0: {}".format(xor_row_1)) xor_row_1 = a elif row == 3: print("3") b = input_bin[i] b = bin(input_bin[i])[2:].zfill(8) print("BBBBBBBBBBBBBBBBBB\n") print("b = {}".format(b)) print(type(b)) print("\nBBBBBBBBBBBBBBBBBBB") if int(b[0]) == 1: b = input_bin[i] << 1 b = bin(b)[3:].zfill(8) print("I am a leftshifted b: {}".format(b)) b = int(b, 2) xor_row_2 = b ^ 0x1b ^ input_bin[i] xor_row_2 = bin(xor_row_2)[2:].zfill(8) print("I am == 1: {}".format(xor_row_2)) else: b = input_bin[i] << 1 b = bin(b)[2:].zfill(8) print("I am a leftshifted b: {}".format(b)) b = int(b, 2) xor_row_2 = b ^ input_bin[i] xor_row_2 = bin(xor_row_2)[2:].zfill(8) print("I am == 0: {}".format(xor_row_2)) print(xor_row_2) else: print("1") print("\n\n\n\n\n\n")
data_matrix = [[2, 3, 1, 1], [1, 2, 3, 1], [1, 1, 2, 3], [3, 1, 1, 2]] def fill_zeros(data_val): return bin(int(data_val, 16))[2:].zfill(8) input_hex = [212, 191, 93, 48] input_bin = [] for (i, bin_num) in enumerate(input_hex): bin_num = bin(input_hex[i])[2:].zfill(8) print(bin_num) bin_num = int(bin_num, 2) input_bin.append(bin_num) print(input_bin) for col in data_matrix: print('+++++++++++++++++++++++\nThe {} round\n\n'.format(col)) result_row_1 = [] for (i, row) in enumerate(col): if row == 2: print('2') a = input_bin[i] a = bin(input_bin[i])[2:].zfill(8) print('AAAAAAAAAAAAAAAAA\n') print('a = {}'.format(a)) print(type(a)) print('\nAAAAAAAAAAAAAAAA') if int(a[0]) == 1: a = input_bin[i] << 1 a = bin(a)[3:].zfill(8) print('I am a leftshifted a: {}'.format(a)) a = int(a, 2) xor_row_1 = a ^ 27 xor_row_1 = bin(xor_row_1)[2:].zfill(8) print('I am == 1: {}'.format(xor_row_1)) else: a = input_bin[i] << 1 a = bin(a)[3:].zfill(8) a = int(a, 2) xor_row_1 = a xor_row_1 = bin(xor_row_1)[2:].zfill(8) print('I am == 0: {}'.format(xor_row_1)) xor_row_1 = a elif row == 3: print('3') b = input_bin[i] b = bin(input_bin[i])[2:].zfill(8) print('BBBBBBBBBBBBBBBBBB\n') print('b = {}'.format(b)) print(type(b)) print('\nBBBBBBBBBBBBBBBBBBB') if int(b[0]) == 1: b = input_bin[i] << 1 b = bin(b)[3:].zfill(8) print('I am a leftshifted b: {}'.format(b)) b = int(b, 2) xor_row_2 = b ^ 27 ^ input_bin[i] xor_row_2 = bin(xor_row_2)[2:].zfill(8) print('I am == 1: {}'.format(xor_row_2)) else: b = input_bin[i] << 1 b = bin(b)[2:].zfill(8) print('I am a leftshifted b: {}'.format(b)) b = int(b, 2) xor_row_2 = b ^ input_bin[i] xor_row_2 = bin(xor_row_2)[2:].zfill(8) print('I am == 0: {}'.format(xor_row_2)) print(xor_row_2) else: print('1') print('\n\n\n\n\n\n')
Root.default = -3 Scale.default = 'minor' Clock.bpm=100 acordes = [(2,4,6),(-1,1,3),(0,2,4)] escalera = P[5,4,3,2] p1 >> space([0,0,4,2,0,0,5,2],dur=1,amp=[0,1,1,1]) d1 >> play("X ",amp=1) pt >> play('#', dur=16,sus=4, rate=-1/2, amp=var([1,0],[16,inf],start=now)) p1 >> space([4,4,2,0,3,3,2,1],dur=1,amp=[0,1,1,1]) p1 >> space([0,0,4,2,0,0,5,2],dur=1,amp=[0,1,1,1]) b1 >> ambi([0,-2,4,3],dur=4,sus=3,oct=3,chop=3,amp=3) v1 >> loop("verso",P[0:8],formant=0,amp=2,room=0.0,mix=0.0,glide=0,chop=0) p1 >> space([4,4,2,0,3,3,2,1],dur=1,amp=[0,1,1,1]) v1 >> loop("verso",P[8:16],formant=0,amp=2,room=0.0,mix=0.0,glide=0,chop=0) d3 >> play("-") p1 >> space([0,0,4,2,0,0,5,2],dur=1,amp=[0,1,1,1]) v1 >> loop("verso",P[0:8],formant=2,amp=2,room=0.0,mix=0.0,glide=0,chop=0) p1 >> space([4,4,2,0,3,3,2,1],dur=1,amp=[0,1,1,1]) v1 >> loop("verso",P[8:16],formant=2,amp=2,room=0.0,mix=0.0,glide=0,chop=0) pt >> play('#', dur=16,sus=4, rate=-1/2, amp=var([1,0],[16,inf],start=now)) b1 >> ambi([0],dur=4,sus=2,oct=3,chop=3) p1 >> space([(0,2,4)]*4,dur=2,amp=1) p2 >> prophet([(0,2,4)]*4,dur=2,amp=0.5) d1 >> play("X ",amp=1) d3 >> play("-",dur=PSum(6,4)) b1 >> bass([2,-1,0,-2],dur=4,chop=2,sus=3,amp=0.7,oct=5) n = 5 p2 >> prophet([(2,4,6)]*n+[(-1,1,3)]*n+[(0,2,4)]*n+[5,4,3,2],dur=list(PSum(n,4)[:n*3])+[1]*4,amp=[1,1,1,1]*3 + [1,1,1,1]) v1 >> loop("estribillo1_pablito_rack",P[0:8],formant=[0],amp=1) v1 >> loop("estribillo1_pablito_rack",P[8:16],formant=[0],amp=1) v1 >> loop("estribillo2_mathi_rack",P[0:8],formant=[0],amp=0.7) v1 >> loop("estribillo2_mathi_rack",P[8:16],formant=[0],amp=0.7) v1 >> loop("estribillo3_pablito_rack",P[0:8],formant=[0],amp=1) v1 >> loop("estribillo3_pablito_rack",P[8:16],formant=[0],amp=1) v1 >> loop("estribillo4_pablito_rack",P[0:8],formant=[0],amp=1) v1 >> loop("estribillo4_pablito_rack",P[8:16],formant=[0],amp=1) b1 >> bass([2],dur=4,chop=3,sus=2) p1 >> space([(2,4,6)]*4,dur=2,amp=1) p2 >> prophet([(2,4,6)]*4,dur=2,amp=1) v1 >> loop('estribillo4_pablito_rack',P[0:8], formant=0,amp=1) v2 >> loop('estribillo4_mathi_rack', P[8:16],formant=0, amp=0.5) Group(v1,v2).solo()
Root.default = -3 Scale.default = 'minor' Clock.bpm = 100 acordes = [(2, 4, 6), (-1, 1, 3), (0, 2, 4)] escalera = P[5, 4, 3, 2] p1 >> space([0, 0, 4, 2, 0, 0, 5, 2], dur=1, amp=[0, 1, 1, 1]) d1 >> play('X ', amp=1) pt >> play('#', dur=16, sus=4, rate=-1 / 2, amp=var([1, 0], [16, inf], start=now)) p1 >> space([4, 4, 2, 0, 3, 3, 2, 1], dur=1, amp=[0, 1, 1, 1]) p1 >> space([0, 0, 4, 2, 0, 0, 5, 2], dur=1, amp=[0, 1, 1, 1]) b1 >> ambi([0, -2, 4, 3], dur=4, sus=3, oct=3, chop=3, amp=3) v1 >> loop('verso', P[0:8], formant=0, amp=2, room=0.0, mix=0.0, glide=0, chop=0) p1 >> space([4, 4, 2, 0, 3, 3, 2, 1], dur=1, amp=[0, 1, 1, 1]) v1 >> loop('verso', P[8:16], formant=0, amp=2, room=0.0, mix=0.0, glide=0, chop=0) d3 >> play('-') p1 >> space([0, 0, 4, 2, 0, 0, 5, 2], dur=1, amp=[0, 1, 1, 1]) v1 >> loop('verso', P[0:8], formant=2, amp=2, room=0.0, mix=0.0, glide=0, chop=0) p1 >> space([4, 4, 2, 0, 3, 3, 2, 1], dur=1, amp=[0, 1, 1, 1]) v1 >> loop('verso', P[8:16], formant=2, amp=2, room=0.0, mix=0.0, glide=0, chop=0) pt >> play('#', dur=16, sus=4, rate=-1 / 2, amp=var([1, 0], [16, inf], start=now)) b1 >> ambi([0], dur=4, sus=2, oct=3, chop=3) p1 >> space([(0, 2, 4)] * 4, dur=2, amp=1) p2 >> prophet([(0, 2, 4)] * 4, dur=2, amp=0.5) d1 >> play('X ', amp=1) d3 >> play('-', dur=p_sum(6, 4)) b1 >> bass([2, -1, 0, -2], dur=4, chop=2, sus=3, amp=0.7, oct=5) n = 5 p2 >> prophet([(2, 4, 6)] * n + [(-1, 1, 3)] * n + [(0, 2, 4)] * n + [5, 4, 3, 2], dur=list(p_sum(n, 4)[:n * 3]) + [1] * 4, amp=[1, 1, 1, 1] * 3 + [1, 1, 1, 1]) v1 >> loop('estribillo1_pablito_rack', P[0:8], formant=[0], amp=1) v1 >> loop('estribillo1_pablito_rack', P[8:16], formant=[0], amp=1) v1 >> loop('estribillo2_mathi_rack', P[0:8], formant=[0], amp=0.7) v1 >> loop('estribillo2_mathi_rack', P[8:16], formant=[0], amp=0.7) v1 >> loop('estribillo3_pablito_rack', P[0:8], formant=[0], amp=1) v1 >> loop('estribillo3_pablito_rack', P[8:16], formant=[0], amp=1) v1 >> loop('estribillo4_pablito_rack', P[0:8], formant=[0], amp=1) v1 >> loop('estribillo4_pablito_rack', P[8:16], formant=[0], amp=1) b1 >> bass([2], dur=4, chop=3, sus=2) p1 >> space([(2, 4, 6)] * 4, dur=2, amp=1) p2 >> prophet([(2, 4, 6)] * 4, dur=2, amp=1) v1 >> loop('estribillo4_pablito_rack', P[0:8], formant=0, amp=1) v2 >> loop('estribillo4_mathi_rack', P[8:16], formant=0, amp=0.5) group(v1, v2).solo()
def main(): totalNum = 0 totalValues = {} filename = 'day1_1_input.txt' found = False while not found: userInput = open(filename, 'r') print ("Starting from the top") for i in userInput: print (i) if i[0] == '-': totalNum -= int(i[1:]) else: totalNum += int(i[1:]) print (totalNum) if totalNum in totalValues: found = True break else: totalValues[totalNum] = 1 userInput.close() print(totalNum) main()
def main(): total_num = 0 total_values = {} filename = 'day1_1_input.txt' found = False while not found: user_input = open(filename, 'r') print('Starting from the top') for i in userInput: print(i) if i[0] == '-': total_num -= int(i[1:]) else: total_num += int(i[1:]) print(totalNum) if totalNum in totalValues: found = True break else: totalValues[totalNum] = 1 userInput.close() print(totalNum) main()
def response(hey_bob): hey_bob = hey_bob.strip() if _is_silence(hey_bob): return 'Fine. Be that way!' if _is_shouting(hey_bob): if _is_question(hey_bob): return "Calm down, I know what I'm doing!" else: return 'Whoa, chill out!' elif _is_question(hey_bob): return 'Sure.' else: return 'Whatever.' def _is_silence(hey_bob): return hey_bob == '' def _is_shouting(hey_bob): return hey_bob.isupper() def _is_question(hey_bob): return hey_bob.endswith('?')
def response(hey_bob): hey_bob = hey_bob.strip() if _is_silence(hey_bob): return 'Fine. Be that way!' if _is_shouting(hey_bob): if _is_question(hey_bob): return "Calm down, I know what I'm doing!" else: return 'Whoa, chill out!' elif _is_question(hey_bob): return 'Sure.' else: return 'Whatever.' def _is_silence(hey_bob): return hey_bob == '' def _is_shouting(hey_bob): return hey_bob.isupper() def _is_question(hey_bob): return hey_bob.endswith('?')
word = input("Enter a number: ") word = int(word) count =10 while True: temp = word % 10 word = word//10 if temp % 2==0: print(temp,end="") if word == 0: break
word = input('Enter a number: ') word = int(word) count = 10 while True: temp = word % 10 word = word // 10 if temp % 2 == 0: print(temp, end='') if word == 0: break
data = input() products = {} while not data == "statistics": product, quantity = data.split(": ") quantity = int(quantity) if product in products: products[product] += quantity else: products[product] = quantity data = input() print("Products in stock:") for product in products: print(f"- {product}: {products[product]}") print(f"Total Products: {len(products)}") print(f"Total Quantity: {sum(products.values())}")
data = input() products = {} while not data == 'statistics': (product, quantity) = data.split(': ') quantity = int(quantity) if product in products: products[product] += quantity else: products[product] = quantity data = input() print('Products in stock:') for product in products: print(f'- {product}: {products[product]}') print(f'Total Products: {len(products)}') print(f'Total Quantity: {sum(products.values())}')
# static methods # use the staticmethod decorator class Human: @staticmethod def speak(): print("I can speak") Human().speak() me = Human() me.speak() # this line will give error # expected an error.. but there isn't any # static methods can be called on an instance of a class # i didn't pass self or any argument to the static method # there are other cracked gette and setters.. shitty as it may seem # i don't like it
class Human: @staticmethod def speak(): print('I can speak') human().speak() me = human() me.speak()
# Sem passar valores pelo init class Calculadora: # def __init__(self): # pass def soma(self, valor_a, valor_b): return valor_a + valor_b def subtracao(self, valor_a, valor_b): return valor_a - valor_b def multiplicacao(self, valor_a, valor_b): return valor_a * valor_b def divisao(self, valor_a, valor_b): return valor_a / valor_b if __name__ == '__main__': # Instanciando uma classe calculadora = Calculadora() print(calculadora.soma(10, 2)) print(calculadora.subtracao(10, 2)) print(calculadora.multiplicacao(10, 2)) print(calculadora.divisao(10, 2))
class Calculadora: def soma(self, valor_a, valor_b): return valor_a + valor_b def subtracao(self, valor_a, valor_b): return valor_a - valor_b def multiplicacao(self, valor_a, valor_b): return valor_a * valor_b def divisao(self, valor_a, valor_b): return valor_a / valor_b if __name__ == '__main__': calculadora = calculadora() print(calculadora.soma(10, 2)) print(calculadora.subtracao(10, 2)) print(calculadora.multiplicacao(10, 2)) print(calculadora.divisao(10, 2))
def get_level(cell): i = 0 while cell > (2*i+1)**2: i += 1 return i def find_coord(cell): level = get_level(cell) x = level y = -level current = (2*level+1)**2 while x != -level: if current == cell: return (x, y) x-=1 current -= 1 while y != level: if current == cell: return (x, y) y+=1 current -= 1 while x != level: if current == cell: return (x, y) x+=1 current -= 1 while y != -level: if current == cell: return (x, y) y-=1 current -= 1 return None print(find_coord(347991))
def get_level(cell): i = 0 while cell > (2 * i + 1) ** 2: i += 1 return i def find_coord(cell): level = get_level(cell) x = level y = -level current = (2 * level + 1) ** 2 while x != -level: if current == cell: return (x, y) x -= 1 current -= 1 while y != level: if current == cell: return (x, y) y += 1 current -= 1 while x != level: if current == cell: return (x, y) x += 1 current -= 1 while y != -level: if current == cell: return (x, y) y -= 1 current -= 1 return None print(find_coord(347991))
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Filename: for.py edibles = ['ham', 'spam', 'eggs', 'nuts'] for food in edibles: if food == 'spam': print('No more spam please!') break print('Great, delicious ' + food) else: print('I am so glad: No spam!') print('Finally, I finished stuffing myself')
edibles = ['ham', 'spam', 'eggs', 'nuts'] for food in edibles: if food == 'spam': print('No more spam please!') break print('Great, delicious ' + food) else: print('I am so glad: No spam!') print('Finally, I finished stuffing myself')
class QuoteLine: def __init__(self, lineText, lineNumber, origin): self.lineText = lineText self.lineNumber = lineNumber self.origin = origin self.renderedLine = None def renderLine(self, font, color): ''' Renders the line using the given font and color. ''' self.renderedLine = font.render(self.lineText, False, color) def discardRenderedLine(self): ''' Discards the rendered line (self.renderedLine = None) ''' self.renderedLine = None
class Quoteline: def __init__(self, lineText, lineNumber, origin): self.lineText = lineText self.lineNumber = lineNumber self.origin = origin self.renderedLine = None def render_line(self, font, color): """ Renders the line using the given font and color. """ self.renderedLine = font.render(self.lineText, False, color) def discard_rendered_line(self): """ Discards the rendered line (self.renderedLine = None) """ self.renderedLine = None
first_str = input() second_str = input() while first_str in second_str: second_str = second_str.replace(first_str, '') print(second_str)
first_str = input() second_str = input() while first_str in second_str: second_str = second_str.replace(first_str, '') print(second_str)
# # PySNMP MIB module CHIPFDDINET-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CHIPFDDINET-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:48:56 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection") DisplayString, = mibBuilder.importSymbols("RFC1155-SMI", "DisplayString") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") IpAddress, Gauge32, enterprises, TimeTicks, iso, Counter64, NotificationType, ObjectIdentity, MibIdentifier, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, Integer32, ModuleIdentity, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "Gauge32", "enterprises", "TimeTicks", "iso", "Counter64", "NotificationType", "ObjectIdentity", "MibIdentifier", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "Integer32", "ModuleIdentity", "Unsigned32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") chipcom = MibIdentifier((1, 3, 6, 1, 4, 1, 49)) chipmib02 = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2)) chipGen = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 1)) chipEcho = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 2)) chipProducts = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3)) chipExperiment = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 4)) chipTTY = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 5)) chipTFTP = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 6)) chipDownload = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 7)) online = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1)) oebm = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 2)) midnight = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 3)) workGroupHub = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4)) emm = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 5)) chipBridge = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 6)) trmm = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 7)) fmm = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 8)) focus1 = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 9)) oeim = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 10)) chipExpTokenRing = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 4, 1)) dot1dBridge = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 4, 14)) dot5 = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 4, 1, 1)) olAgents = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 1)) olConc = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 2)) olEnv = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 3)) olModules = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4)) olNets = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5)) olGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 6)) olAlarm = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 7)) olSpecMods = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4)) ol50nnMCTL = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 3)) ol51nnMMGT = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 4)) ol51nnMFIB = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 5)) ol51nnMUTP = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 6)) ol51nnMTP = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 7)) ol51nnMBNC = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 8)) ol51nnBEE = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 9)) ol51nnRES = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 10)) ol51nnREE = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 11)) ol51nnMAUIF = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 12)) ol51nnMAUIM = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 13)) ol5208MTP = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 14)) ol51nnMFP = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 15)) ol51nnMFBP = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 16)) ol51nnMTPL = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 17)) ol51nnMTPPL = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 18)) ol52nnMTP = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 19)) ol52nnMFR = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 20)) ol51nnMTS = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 21)) ol51nnMFL = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 22)) ol50nnMRCTL = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 23)) ol51nnMFB = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 24)) ol53nnMMGT = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 25)) ol53nnMFBMIC = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 26)) ol53nnMFIBST = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 27)) ol53nnMSTP = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 28)) ol51nnMTPCL = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 29)) ol52nnBTT = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 30)) ol51nnIx = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 31)) ol52nnMMGT = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 32)) ol50nnMHCTL = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 33)) olNet = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 1)) olEnet = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 2)) olTRnet = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 3)) olFDDInet = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4)) hubSysGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 1)) hardwareGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 2)) softwareGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 3)) hubGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 4)) boardGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 5)) portGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 6)) alarmGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 7)) olThresh = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 7, 1)) olThreshControl = MibIdentifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 7, 1, 1)) olFDDIStatsModTable = MibTable((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2), ) if mibBuilder.loadTexts: olFDDIStatsModTable.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModTable.setDescription('A table of statistical information counted for each module in each FDDI network.') olFDDIStatsModEntry = MibTableRow((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2, 1), ).setIndexNames((0, "CHIPFDDINET-MIB", "olFDDIStatsModSlotIndex")) if mibBuilder.loadTexts: olFDDIStatsModEntry.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModEntry.setDescription('A list of statistical information for each module on each FDDI network in the concentrator.') olFDDIStatsModSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDIStatsModSlotIndex.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModSlotIndex.setDescription('The slot number that contains this module.') olFDDIStatsModMgtRcvErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDIStatsModMgtRcvErrs.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModMgtRcvErrs.setDescription('The number of errors encountered while receiving data on the Management Channel.') olFDDIStatsModMgtXmitErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDIStatsModMgtXmitErrs.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModMgtXmitErrs.setDescription('The number of errors encountered while transmitting data on the Management Channel.') olFDDIStatsModBackplaneErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDIStatsModBackplaneErrs.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModBackplaneErrs.setDescription('The number of errors while receiving and transmitting network data on the backplane.') olFDDIStatsModPllUnlockErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDIStatsModPllUnlockErrs.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModPllUnlockErrs.setDescription('The number of times the phased lock loop on the backplane network data channel was lost.') olFDDIStatsPortTable = MibTable((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3), ) if mibBuilder.loadTexts: olFDDIStatsPortTable.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortTable.setDescription('A table of statistical information counted for each Port in each FDDI network.') olFDDIStatsPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1), ).setIndexNames((0, "CHIPFDDINET-MIB", "olFDDIStatsPortSlotIndex"), (0, "CHIPFDDINET-MIB", "olFDDIStatsPortIndex")) if mibBuilder.loadTexts: olFDDIStatsPortEntry.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortEntry.setDescription('A list of statistical information for each Port on each FDDI network in the concentrator.') olFDDIStatsPortSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDIStatsPortSlotIndex.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortSlotIndex.setDescription('The slot number that contains this Port.') olFDDIStatsPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDIStatsPortIndex.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortIndex.setDescription('The Port number of this port') olFDDIStatsPortLCTFailCts = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDIStatsPortLCTFailCts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortLCTFailCts.setDescription('The count of the consecutive times the link confidence test (LCT) has failed during connection management. Once the connection has been established, the count is zeroed. (refer to ANSI 9.4.1).') olFDDIStatsPortLerEstimate = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDIStatsPortLerEstimate.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortLerEstimate.setDescription('A long term average link error rate. It ranges from 10**-4 to 10**-15 and is reported as the absolute value of the exponent of the estimate (the larger the number, the smaller the value).') olFDDIStatsPortLemRejectCts = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDIStatsPortLemRejectCts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortLemRejectCts.setDescription('A link error monitoring count of the times that a link has been removed from the ring due to the LerCutOff threshold being exceeded.') olFDDIStatsPortLemCts = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDIStatsPortLemCts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortLemCts.setDescription("The aggregate link error monitor error count, set to zero only on station power up. This variable's long term rate average is lerEstimate.") olFDDInetStatsTable = MibTable((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4), ) if mibBuilder.loadTexts: olFDDInetStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsTable.setDescription('A table of statistical information counted for each FDDI network in the concentrator') olFDDInetStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1), ).setIndexNames((0, "CHIPFDDINET-MIB", "olFDDInetStatsNetID")) if mibBuilder.loadTexts: olFDDInetStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsEntry.setDescription('A list of statistical information for each FDDI network in the concentrator.') olFDDInetStatsNetID = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 16, 17, 18, 19))).clone(namedValues=NamedValues(("isolated", 2), ("fddi-1", 16), ("fddi-2", 17), ("fddi-3", 18), ("fddi-4", 19)))).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDInetStatsNetID.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsNetID.setDescription('The network index that uniquely identifies this network. One of isolated, fddi-1, fddi-2, fddi-3, or fddi-4.') olFDDInetStatsRingOpCounts = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDInetStatsRingOpCounts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsRingOpCounts.setDescription('The number times the ring transitioned to operational.') olFDDInetStatsFrameCounts = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDInetStatsFrameCounts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsFrameCounts.setDescription('Frame_Ct (refer to ANSI MAC 2.2.1).') olFDDInetStatsErrorCounts = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDInetStatsErrorCounts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsErrorCounts.setDescription('Error_Ct (refer to ANSI MAC 2.2.1).') olFDDInetStatsLostCounts = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDInetStatsLostCounts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsLostCounts.setDescription('Lost_Ct (refer to ANSI MAC 2.2.1).') olFDDInetStatsFrameErrorRatio = MibTableColumn((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: olFDDInetStatsFrameErrorRatio.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsFrameErrorRatio.setDescription('This attribute is the actual ratio, ((delta snmpFddiMACLostCt + delta snmpFddiMACErrorCt) / (delta snmpFddiMACFrameCt + delta snmpFddiMACLostCt)) x 2**16.') mibBuilder.exportSymbols("CHIPFDDINET-MIB", olFDDIStatsModSlotIndex=olFDDIStatsModSlotIndex, olNets=olNets, ol50nnMRCTL=ol50nnMRCTL, softwareGroup=softwareGroup, hubSysGroup=hubSysGroup, olFDDInetStatsRingOpCounts=olFDDInetStatsRingOpCounts, olThresh=olThresh, olFDDInetStatsLostCounts=olFDDInetStatsLostCounts, dot1dBridge=dot1dBridge, oeim=oeim, olFDDIStatsModMgtRcvErrs=olFDDIStatsModMgtRcvErrs, olThreshControl=olThreshControl, chipTTY=chipTTY, ol53nnMMGT=ol53nnMMGT, ol52nnMFR=ol52nnMFR, ol51nnMAUIF=ol51nnMAUIF, olFDDIStatsModPllUnlockErrs=olFDDIStatsModPllUnlockErrs, online=online, chipExpTokenRing=chipExpTokenRing, olConc=olConc, ol51nnREE=ol51nnREE, ol53nnMFIBST=ol53nnMFIBST, ol51nnMTPL=ol51nnMTPL, olFDDIStatsModEntry=olFDDIStatsModEntry, ol51nnMBNC=ol51nnMBNC, ol51nnMTPPL=ol51nnMTPPL, trmm=trmm, ol51nnBEE=ol51nnBEE, ol51nnMAUIM=ol51nnMAUIM, chipEcho=chipEcho, olEnv=olEnv, chipProducts=chipProducts, olFDDIStatsPortTable=olFDDIStatsPortTable, ol51nnMFP=ol51nnMFP, olFDDIStatsPortLemRejectCts=olFDDIStatsPortLemRejectCts, chipDownload=chipDownload, olFDDInet=olFDDInet, olSpecMods=olSpecMods, dot5=dot5, ol51nnMTPCL=ol51nnMTPCL, olFDDInetStatsFrameErrorRatio=olFDDInetStatsFrameErrorRatio, fmm=fmm, chipmib02=chipmib02, olFDDIStatsModMgtXmitErrs=olFDDIStatsModMgtXmitErrs, olFDDInetStatsErrorCounts=olFDDInetStatsErrorCounts, ol51nnMFL=ol51nnMFL, chipGen=chipGen, olFDDIStatsPortEntry=olFDDIStatsPortEntry, midnight=midnight, olGroups=olGroups, ol51nnRES=ol51nnRES, olFDDIStatsPortSlotIndex=olFDDIStatsPortSlotIndex, ol53nnMFBMIC=ol53nnMFBMIC, olFDDInetStatsFrameCounts=olFDDInetStatsFrameCounts, olFDDIStatsPortLemCts=olFDDIStatsPortLemCts, emm=emm, olFDDInetStatsEntry=olFDDInetStatsEntry, olEnet=olEnet, ol52nnMMGT=ol52nnMMGT, olFDDIStatsPortLCTFailCts=olFDDIStatsPortLCTFailCts, olNet=olNet, chipcom=chipcom, ol51nnMFBP=ol51nnMFBP, ol51nnIx=ol51nnIx, olFDDIStatsModBackplaneErrs=olFDDIStatsModBackplaneErrs, olModules=olModules, olFDDInetStatsTable=olFDDInetStatsTable, alarmGroup=alarmGroup, ol51nnMTP=ol51nnMTP, olFDDIStatsModTable=olFDDIStatsModTable, ol51nnMFIB=ol51nnMFIB, ol51nnMTS=ol51nnMTS, focus1=focus1, chipTFTP=chipTFTP, olTRnet=olTRnet, workGroupHub=workGroupHub, hardwareGroup=hardwareGroup, ol51nnMUTP=ol51nnMUTP, ol53nnMSTP=ol53nnMSTP, olFDDInetStatsNetID=olFDDInetStatsNetID, ol51nnMMGT=ol51nnMMGT, chipExperiment=chipExperiment, chipBridge=chipBridge, boardGroup=boardGroup, ol52nnBTT=ol52nnBTT, olAlarm=olAlarm, olFDDIStatsPortIndex=olFDDIStatsPortIndex, ol5208MTP=ol5208MTP, ol50nnMHCTL=ol50nnMHCTL, portGroup=portGroup, oebm=oebm, ol51nnMFB=ol51nnMFB, hubGroup=hubGroup, olFDDIStatsPortLerEstimate=olFDDIStatsPortLerEstimate, ol50nnMCTL=ol50nnMCTL, ol52nnMTP=ol52nnMTP, olAgents=olAgents)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (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') (display_string,) = mibBuilder.importSymbols('RFC1155-SMI', 'DisplayString') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (ip_address, gauge32, enterprises, time_ticks, iso, counter64, notification_type, object_identity, mib_identifier, bits, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, integer32, module_identity, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'Gauge32', 'enterprises', 'TimeTicks', 'iso', 'Counter64', 'NotificationType', 'ObjectIdentity', 'MibIdentifier', 'Bits', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'Integer32', 'ModuleIdentity', 'Unsigned32') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') chipcom = mib_identifier((1, 3, 6, 1, 4, 1, 49)) chipmib02 = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2)) chip_gen = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 1)) chip_echo = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 2)) chip_products = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3)) chip_experiment = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 4)) chip_tty = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 5)) chip_tftp = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 6)) chip_download = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 7)) online = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1)) oebm = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 2)) midnight = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 3)) work_group_hub = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4)) emm = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 5)) chip_bridge = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 6)) trmm = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 7)) fmm = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 8)) focus1 = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 9)) oeim = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 10)) chip_exp_token_ring = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 4, 1)) dot1d_bridge = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 4, 14)) dot5 = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 4, 1, 1)) ol_agents = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 1)) ol_conc = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 2)) ol_env = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 3)) ol_modules = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4)) ol_nets = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5)) ol_groups = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 6)) ol_alarm = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 7)) ol_spec_mods = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4)) ol50nn_mctl = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 3)) ol51nn_mmgt = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 4)) ol51nn_mfib = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 5)) ol51nn_mutp = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 6)) ol51nn_mtp = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 7)) ol51nn_mbnc = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 8)) ol51nn_bee = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 9)) ol51nn_res = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 10)) ol51nn_ree = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 11)) ol51nn_mauif = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 12)) ol51nn_mauim = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 13)) ol5208_mtp = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 14)) ol51nn_mfp = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 15)) ol51nn_mfbp = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 16)) ol51nn_mtpl = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 17)) ol51nn_mtppl = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 18)) ol52nn_mtp = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 19)) ol52nn_mfr = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 20)) ol51nn_mts = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 21)) ol51nn_mfl = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 22)) ol50nn_mrctl = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 23)) ol51nn_mfb = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 24)) ol53nn_mmgt = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 25)) ol53nn_mfbmic = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 26)) ol53nn_mfibst = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 27)) ol53nn_mstp = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 28)) ol51nn_mtpcl = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 29)) ol52nn_btt = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 30)) ol51nn_ix = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 31)) ol52nn_mmgt = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 32)) ol50nn_mhctl = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 4, 4, 33)) ol_net = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 1)) ol_enet = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 2)) ol_t_rnet = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 3)) ol_fdd_inet = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4)) hub_sys_group = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 1)) hardware_group = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 2)) software_group = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 3)) hub_group = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 4)) board_group = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 5)) port_group = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 6)) alarm_group = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 4, 7)) ol_thresh = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 7, 1)) ol_thresh_control = mib_identifier((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 7, 1, 1)) ol_fddi_stats_mod_table = mib_table((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2)) if mibBuilder.loadTexts: olFDDIStatsModTable.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModTable.setDescription('A table of statistical information counted for each module in each FDDI network.') ol_fddi_stats_mod_entry = mib_table_row((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2, 1)).setIndexNames((0, 'CHIPFDDINET-MIB', 'olFDDIStatsModSlotIndex')) if mibBuilder.loadTexts: olFDDIStatsModEntry.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModEntry.setDescription('A list of statistical information for each module on each FDDI network in the concentrator.') ol_fddi_stats_mod_slot_index = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDIStatsModSlotIndex.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModSlotIndex.setDescription('The slot number that contains this module.') ol_fddi_stats_mod_mgt_rcv_errs = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDIStatsModMgtRcvErrs.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModMgtRcvErrs.setDescription('The number of errors encountered while receiving data on the Management Channel.') ol_fddi_stats_mod_mgt_xmit_errs = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDIStatsModMgtXmitErrs.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModMgtXmitErrs.setDescription('The number of errors encountered while transmitting data on the Management Channel.') ol_fddi_stats_mod_backplane_errs = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDIStatsModBackplaneErrs.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModBackplaneErrs.setDescription('The number of errors while receiving and transmitting network data on the backplane.') ol_fddi_stats_mod_pll_unlock_errs = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 2, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDIStatsModPllUnlockErrs.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsModPllUnlockErrs.setDescription('The number of times the phased lock loop on the backplane network data channel was lost.') ol_fddi_stats_port_table = mib_table((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3)) if mibBuilder.loadTexts: olFDDIStatsPortTable.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortTable.setDescription('A table of statistical information counted for each Port in each FDDI network.') ol_fddi_stats_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1)).setIndexNames((0, 'CHIPFDDINET-MIB', 'olFDDIStatsPortSlotIndex'), (0, 'CHIPFDDINET-MIB', 'olFDDIStatsPortIndex')) if mibBuilder.loadTexts: olFDDIStatsPortEntry.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortEntry.setDescription('A list of statistical information for each Port on each FDDI network in the concentrator.') ol_fddi_stats_port_slot_index = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDIStatsPortSlotIndex.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortSlotIndex.setDescription('The slot number that contains this Port.') ol_fddi_stats_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDIStatsPortIndex.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortIndex.setDescription('The Port number of this port') ol_fddi_stats_port_lct_fail_cts = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDIStatsPortLCTFailCts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortLCTFailCts.setDescription('The count of the consecutive times the link confidence test (LCT) has failed during connection management. Once the connection has been established, the count is zeroed. (refer to ANSI 9.4.1).') ol_fddi_stats_port_ler_estimate = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1, 4), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDIStatsPortLerEstimate.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortLerEstimate.setDescription('A long term average link error rate. It ranges from 10**-4 to 10**-15 and is reported as the absolute value of the exponent of the estimate (the larger the number, the smaller the value).') ol_fddi_stats_port_lem_reject_cts = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDIStatsPortLemRejectCts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortLemRejectCts.setDescription('A link error monitoring count of the times that a link has been removed from the ring due to the LerCutOff threshold being exceeded.') ol_fddi_stats_port_lem_cts = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 3, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDIStatsPortLemCts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDIStatsPortLemCts.setDescription("The aggregate link error monitor error count, set to zero only on station power up. This variable's long term rate average is lerEstimate.") ol_fdd_inet_stats_table = mib_table((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4)) if mibBuilder.loadTexts: olFDDInetStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsTable.setDescription('A table of statistical information counted for each FDDI network in the concentrator') ol_fdd_inet_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1)).setIndexNames((0, 'CHIPFDDINET-MIB', 'olFDDInetStatsNetID')) if mibBuilder.loadTexts: olFDDInetStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsEntry.setDescription('A list of statistical information for each FDDI network in the concentrator.') ol_fdd_inet_stats_net_id = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2, 16, 17, 18, 19))).clone(namedValues=named_values(('isolated', 2), ('fddi-1', 16), ('fddi-2', 17), ('fddi-3', 18), ('fddi-4', 19)))).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDInetStatsNetID.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsNetID.setDescription('The network index that uniquely identifies this network. One of isolated, fddi-1, fddi-2, fddi-3, or fddi-4.') ol_fdd_inet_stats_ring_op_counts = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDInetStatsRingOpCounts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsRingOpCounts.setDescription('The number times the ring transitioned to operational.') ol_fdd_inet_stats_frame_counts = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDInetStatsFrameCounts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsFrameCounts.setDescription('Frame_Ct (refer to ANSI MAC 2.2.1).') ol_fdd_inet_stats_error_counts = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDInetStatsErrorCounts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsErrorCounts.setDescription('Error_Ct (refer to ANSI MAC 2.2.1).') ol_fdd_inet_stats_lost_counts = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDInetStatsLostCounts.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsLostCounts.setDescription('Lost_Ct (refer to ANSI MAC 2.2.1).') ol_fdd_inet_stats_frame_error_ratio = mib_table_column((1, 3, 6, 1, 4, 1, 49, 2, 3, 1, 5, 4, 4, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: olFDDInetStatsFrameErrorRatio.setStatus('mandatory') if mibBuilder.loadTexts: olFDDInetStatsFrameErrorRatio.setDescription('This attribute is the actual ratio, ((delta snmpFddiMACLostCt + delta snmpFddiMACErrorCt) / (delta snmpFddiMACFrameCt + delta snmpFddiMACLostCt)) x 2**16.') mibBuilder.exportSymbols('CHIPFDDINET-MIB', olFDDIStatsModSlotIndex=olFDDIStatsModSlotIndex, olNets=olNets, ol50nnMRCTL=ol50nnMRCTL, softwareGroup=softwareGroup, hubSysGroup=hubSysGroup, olFDDInetStatsRingOpCounts=olFDDInetStatsRingOpCounts, olThresh=olThresh, olFDDInetStatsLostCounts=olFDDInetStatsLostCounts, dot1dBridge=dot1dBridge, oeim=oeim, olFDDIStatsModMgtRcvErrs=olFDDIStatsModMgtRcvErrs, olThreshControl=olThreshControl, chipTTY=chipTTY, ol53nnMMGT=ol53nnMMGT, ol52nnMFR=ol52nnMFR, ol51nnMAUIF=ol51nnMAUIF, olFDDIStatsModPllUnlockErrs=olFDDIStatsModPllUnlockErrs, online=online, chipExpTokenRing=chipExpTokenRing, olConc=olConc, ol51nnREE=ol51nnREE, ol53nnMFIBST=ol53nnMFIBST, ol51nnMTPL=ol51nnMTPL, olFDDIStatsModEntry=olFDDIStatsModEntry, ol51nnMBNC=ol51nnMBNC, ol51nnMTPPL=ol51nnMTPPL, trmm=trmm, ol51nnBEE=ol51nnBEE, ol51nnMAUIM=ol51nnMAUIM, chipEcho=chipEcho, olEnv=olEnv, chipProducts=chipProducts, olFDDIStatsPortTable=olFDDIStatsPortTable, ol51nnMFP=ol51nnMFP, olFDDIStatsPortLemRejectCts=olFDDIStatsPortLemRejectCts, chipDownload=chipDownload, olFDDInet=olFDDInet, olSpecMods=olSpecMods, dot5=dot5, ol51nnMTPCL=ol51nnMTPCL, olFDDInetStatsFrameErrorRatio=olFDDInetStatsFrameErrorRatio, fmm=fmm, chipmib02=chipmib02, olFDDIStatsModMgtXmitErrs=olFDDIStatsModMgtXmitErrs, olFDDInetStatsErrorCounts=olFDDInetStatsErrorCounts, ol51nnMFL=ol51nnMFL, chipGen=chipGen, olFDDIStatsPortEntry=olFDDIStatsPortEntry, midnight=midnight, olGroups=olGroups, ol51nnRES=ol51nnRES, olFDDIStatsPortSlotIndex=olFDDIStatsPortSlotIndex, ol53nnMFBMIC=ol53nnMFBMIC, olFDDInetStatsFrameCounts=olFDDInetStatsFrameCounts, olFDDIStatsPortLemCts=olFDDIStatsPortLemCts, emm=emm, olFDDInetStatsEntry=olFDDInetStatsEntry, olEnet=olEnet, ol52nnMMGT=ol52nnMMGT, olFDDIStatsPortLCTFailCts=olFDDIStatsPortLCTFailCts, olNet=olNet, chipcom=chipcom, ol51nnMFBP=ol51nnMFBP, ol51nnIx=ol51nnIx, olFDDIStatsModBackplaneErrs=olFDDIStatsModBackplaneErrs, olModules=olModules, olFDDInetStatsTable=olFDDInetStatsTable, alarmGroup=alarmGroup, ol51nnMTP=ol51nnMTP, olFDDIStatsModTable=olFDDIStatsModTable, ol51nnMFIB=ol51nnMFIB, ol51nnMTS=ol51nnMTS, focus1=focus1, chipTFTP=chipTFTP, olTRnet=olTRnet, workGroupHub=workGroupHub, hardwareGroup=hardwareGroup, ol51nnMUTP=ol51nnMUTP, ol53nnMSTP=ol53nnMSTP, olFDDInetStatsNetID=olFDDInetStatsNetID, ol51nnMMGT=ol51nnMMGT, chipExperiment=chipExperiment, chipBridge=chipBridge, boardGroup=boardGroup, ol52nnBTT=ol52nnBTT, olAlarm=olAlarm, olFDDIStatsPortIndex=olFDDIStatsPortIndex, ol5208MTP=ol5208MTP, ol50nnMHCTL=ol50nnMHCTL, portGroup=portGroup, oebm=oebm, ol51nnMFB=ol51nnMFB, hubGroup=hubGroup, olFDDIStatsPortLerEstimate=olFDDIStatsPortLerEstimate, ol50nnMCTL=ol50nnMCTL, ol52nnMTP=ol52nnMTP, olAgents=olAgents)
print(10/3) print(10//3) print() kue = 16 anak = 4 kuePerAnak = kue // anak print ("Setiap anak akan mendapatkan kue sebanyak ", kuePerAnak)
print(10 / 3) print(10 // 3) print() kue = 16 anak = 4 kue_per_anak = kue // anak print('Setiap anak akan mendapatkan kue sebanyak ', kuePerAnak)
while True: X, M = map(int, input().split()) if X == 0 and M == 0: break Y = X * M print(Y)
while True: (x, m) = map(int, input().split()) if X == 0 and M == 0: break y = X * M print(Y)
age = 5+(8%3)-3+(3*10)/2 greetings = "Welcome to IEEE Python Workshop 2018 edition. It's my pleasure to conduct today's workshop for you." name = "Saurabh Mudgal" major = "mechanical engineering" print(greetings) print("My name is " + name + ".") print("I am " + str(age) + " years old and am majoring in " + major + ".")
age = 5 + 8 % 3 - 3 + 3 * 10 / 2 greetings = "Welcome to IEEE Python Workshop 2018 edition. It's my pleasure to conduct today's workshop for you." name = 'Saurabh Mudgal' major = 'mechanical engineering' print(greetings) print('My name is ' + name + '.') print('I am ' + str(age) + ' years old and am majoring in ' + major + '.')
# -*- coding: utf-8 -*- __title__ = 'exp_mixture_model' __version__ = '1.0.0' __description__ = 'Maximum likelihood estimation and model selection of EMMs' __copyright__ = 'Copyright (C) 2019 Makoto Okada and Naoki Masuda' __license__ = 'MIT License' __author__ = 'Makoto Okada, Kenji Yamanishi and Naoki Masuda' __author_email__ = '[email protected]' __url__ = 'https://github.com/naokimas/exp_mixture_model'
__title__ = 'exp_mixture_model' __version__ = '1.0.0' __description__ = 'Maximum likelihood estimation and model selection of EMMs' __copyright__ = 'Copyright (C) 2019 Makoto Okada and Naoki Masuda' __license__ = 'MIT License' __author__ = 'Makoto Okada, Kenji Yamanishi and Naoki Masuda' __author_email__ = '[email protected]' __url__ = 'https://github.com/naokimas/exp_mixture_model'
class Product: def __init__(self, name, category_name, unit_price): self.name = name self.category_name = category_name self.unit_price = unit_price def __str__(self): return f"Nazwa: {self.name} | Kategoria: {self.category_name} | Cena: {self.unit_price} PLN/szt"
class Product: def __init__(self, name, category_name, unit_price): self.name = name self.category_name = category_name self.unit_price = unit_price def __str__(self): return f'Nazwa: {self.name} | Kategoria: {self.category_name} | Cena: {self.unit_price} PLN/szt'
class Shape: def __init__(self): self.data = ['_' for _ in range(10)] def print_out(self): print(''.join(self.data)) class Even(Shape): def draw_func(self, x): if x % 2 == 0: return True else: return False class ThirdBiggerFive(Shape): def draw_func(self, x): if x % 3 == 0 or x > 5: return True else: return False def draw(Obj): o = Obj() for x in range(0, 10): if o.draw_func(x): o.data[x] = 'X' return o even = draw(Even) even.print_out() third = draw(ThirdBiggerFive) third.print_out()
class Shape: def __init__(self): self.data = ['_' for _ in range(10)] def print_out(self): print(''.join(self.data)) class Even(Shape): def draw_func(self, x): if x % 2 == 0: return True else: return False class Thirdbiggerfive(Shape): def draw_func(self, x): if x % 3 == 0 or x > 5: return True else: return False def draw(Obj): o = obj() for x in range(0, 10): if o.draw_func(x): o.data[x] = 'X' return o even = draw(Even) even.print_out() third = draw(ThirdBiggerFive) third.print_out()
#!/usr/bin/python3 # steinkirch at gmail.com # astro.sunysb.edu/steinkirch class Node(object): def __init__(self, value=None): self.value = value self.next = None class Stack(object): def __init__(self): self.top = None def push(self, item): node = Node(item) node.next = self.top self.top = node def pop(self): if self.top: node = self.top self.top = node.next return node.value raise Exception('Stack is empty.') def isEmpty(self): return bool(self.top) def seeTop(self): if self.top: return self.top.value raise Exception('Stack is empty.') def size(self): node = self.top count = 0 while node: count +=1 node = node.next return count class StackList(list): def __init__(self): self.items = [] def push(self, item): self.items.append(item) def pop(self): if self.items: return self.items.pop() raise Exception('Stack is empty.') def seeTop(self): if self.items: return self.items[-1] raise Exception('Stack is empty.') def size(self): return len(self.items) def isEmpty(self): return bool(self.items) def main(): s1 = StackList() print(s1.isEmpty()) for i in range(1, 10): s1.push(i) print(s1.isEmpty()) print(s1.size()) print(s1.seeTop()) s1.pop() print(s1.size()) print(s1.seeTop()) s2 = Stack() print(s2.isEmpty()) for i in range(1, 10): s2.push(i) print(s2.isEmpty()) print(s2.size()) print(s2.seeTop()) s2.pop() print(s2.size()) print(s2.seeTop()) if __name__ == '__main__': main()
class Node(object): def __init__(self, value=None): self.value = value self.next = None class Stack(object): def __init__(self): self.top = None def push(self, item): node = node(item) node.next = self.top self.top = node def pop(self): if self.top: node = self.top self.top = node.next return node.value raise exception('Stack is empty.') def is_empty(self): return bool(self.top) def see_top(self): if self.top: return self.top.value raise exception('Stack is empty.') def size(self): node = self.top count = 0 while node: count += 1 node = node.next return count class Stacklist(list): def __init__(self): self.items = [] def push(self, item): self.items.append(item) def pop(self): if self.items: return self.items.pop() raise exception('Stack is empty.') def see_top(self): if self.items: return self.items[-1] raise exception('Stack is empty.') def size(self): return len(self.items) def is_empty(self): return bool(self.items) def main(): s1 = stack_list() print(s1.isEmpty()) for i in range(1, 10): s1.push(i) print(s1.isEmpty()) print(s1.size()) print(s1.seeTop()) s1.pop() print(s1.size()) print(s1.seeTop()) s2 = stack() print(s2.isEmpty()) for i in range(1, 10): s2.push(i) print(s2.isEmpty()) print(s2.size()) print(s2.seeTop()) s2.pop() print(s2.size()) print(s2.seeTop()) if __name__ == '__main__': main()
def lmap(f, it): return list(map(f, it)) def ints(it): return lmap(int, it) def solve(input): l = len(input.split()[0]) xs = lmap(lambda x: int(x, 2), input.split()) a = 0 for i in range(l): cnt = [0, 0] for x in xs: cnt[(x >> i) & 1] += 1 if cnt[1] > cnt[0]: a |= 1 << i return a * (~a & ((1 << l) - 1))
def lmap(f, it): return list(map(f, it)) def ints(it): return lmap(int, it) def solve(input): l = len(input.split()[0]) xs = lmap(lambda x: int(x, 2), input.split()) a = 0 for i in range(l): cnt = [0, 0] for x in xs: cnt[x >> i & 1] += 1 if cnt[1] > cnt[0]: a |= 1 << i return a * (~a & (1 << l) - 1)
#!/usr/bin/env python3 # # Author: # Tamas Jos (@skelsec) # PROCESS_QUERY_INFORMATION = 0x0400 PROCESS_VM_READ = 0x0010 PROCESS_VM_WRITE = 0x0020 PROCESS_VM_OPERATION = 0x0008 PROCESS_CREATE_THREAD = 0x0002 # Standard access rights DELETE = 0x00010000 READ_CONTROL = 0x00020000 WRITE_DAC = 0x00040000 WRITE_OWNER = 0x00080000 SYNCHRONIZE = 0x00100000 STANDARD_RIGHTS_REQUIRED = 0x000F0000 STANDARD_RIGHTS_READ = READ_CONTROL STANDARD_RIGHTS_WRITE = READ_CONTROL STANDARD_RIGHTS_EXECUTE = READ_CONTROL STANDARD_RIGHTS_ALL = 0x001F0000 SPECIFIC_RIGHTS_ALL = 0x0000FFFF #--- Constants ---------------------------------------------------------------- privnames = { "SE_ASSIGNPRIMARYTOKEN_NAME" : "SeAssignPrimaryTokenPrivilege", "SE_AUDIT_NAME" : "SeAuditPrivilege", "SE_BACKUP_NAME" : "SeBackupPrivilege", "SE_CHANGE_NOTIFY_NAME" : "SeChangeNotifyPrivilege", "SE_CREATE_GLOBAL_NAME" : "SeCreateGlobalPrivilege", "SE_CREATE_PAGEFILE_NAME" : "SeCreatePagefilePrivilege", "SE_CREATE_PERMANENT_NAME" : "SeCreatePermanentPrivilege", "SE_CREATE_SYMBOLIC_LINK_NAME" : "SeCreateSymbolicLinkPrivilege", "SE_CREATE_TOKEN_NAME" : "SeCreateTokenPrivilege", "SE_DEBUG_NAME" : "SeDebugPrivilege", "SE_ENABLE_DELEGATION_NAME" : "SeEnableDelegationPrivilege", "SE_IMPERSONATE_NAME" : "SeImpersonatePrivilege", "SE_INC_BASE_PRIORITY_NAME" : "SeIncreaseBasePriorityPrivilege", "SE_INCREASE_QUOTA_NAME" : "SeIncreaseQuotaPrivilege", "SE_INC_WORKING_SET_NAME" : "SeIncreaseWorkingSetPrivilege", "SE_LOAD_DRIVER_NAME" : "SeLoadDriverPrivilege", "SE_LOCK_MEMORY_NAME" : "SeLockMemoryPrivilege", "SE_MACHINE_ACCOUNT_NAME" : "SeMachineAccountPrivilege", "SE_MANAGE_VOLUME_NAME" : "SeManageVolumePrivilege", "SE_PROF_SINGLE_PROCESS_NAME" : "SeProfileSingleProcessPrivilege", "SE_RELABEL_NAME" : "SeRelabelPrivilege", "SE_REMOTE_SHUTDOWN_NAME" : "SeRemoteShutdownPrivilege", "SE_RESTORE_NAME" : "SeRestorePrivilege", "SE_SECURITY_NAME" : "SeSecurityPrivilege", "SE_SHUTDOWN_NAME" : "SeShutdownPrivilege", "SE_SYNC_AGENT_NAME" : "SeSyncAgentPrivilege", "SE_SYSTEM_ENVIRONMENT_NAME" : "SeSystemEnvironmentPrivilege", "SE_SYSTEM_PROFILE_NAME" : "SeSystemProfilePrivilege", "SE_SYSTEMTIME_NAME" : "SeSystemtimePrivilege", "SE_TAKE_OWNERSHIP_NAME" : "SeTakeOwnershipPrivilege", "SE_TCB_NAME" : "SeTcbPrivilege", "SE_TIME_ZONE_NAME" : "SeTimeZonePrivilege", "SE_TRUSTED_CREDMAN_ACCESS_NAME" : "SeTrustedCredManAccessPrivilege", "SE_UNDOCK_NAME" : "SeUndockPrivilege", "SE_UNSOLICITED_INPUT_NAME" : "SeUnsolicitedInputPrivilege" } # Privilege constants SE_ASSIGNPRIMARYTOKEN_NAME = "SeAssignPrimaryTokenPrivilege" SE_AUDIT_NAME = "SeAuditPrivilege" SE_BACKUP_NAME = "SeBackupPrivilege" SE_CHANGE_NOTIFY_NAME = "SeChangeNotifyPrivilege" SE_CREATE_GLOBAL_NAME = "SeCreateGlobalPrivilege" SE_CREATE_PAGEFILE_NAME = "SeCreatePagefilePrivilege" SE_CREATE_PERMANENT_NAME = "SeCreatePermanentPrivilege" SE_CREATE_SYMBOLIC_LINK_NAME = "SeCreateSymbolicLinkPrivilege" SE_CREATE_TOKEN_NAME = "SeCreateTokenPrivilege" SE_DEBUG_NAME = "SeDebugPrivilege" SE_ENABLE_DELEGATION_NAME = "SeEnableDelegationPrivilege" SE_IMPERSONATE_NAME = "SeImpersonatePrivilege" SE_INC_BASE_PRIORITY_NAME = "SeIncreaseBasePriorityPrivilege" SE_INCREASE_QUOTA_NAME = "SeIncreaseQuotaPrivilege" SE_INC_WORKING_SET_NAME = "SeIncreaseWorkingSetPrivilege" SE_LOAD_DRIVER_NAME = "SeLoadDriverPrivilege" SE_LOCK_MEMORY_NAME = "SeLockMemoryPrivilege" SE_MACHINE_ACCOUNT_NAME = "SeMachineAccountPrivilege" SE_MANAGE_VOLUME_NAME = "SeManageVolumePrivilege" SE_PROF_SINGLE_PROCESS_NAME = "SeProfileSingleProcessPrivilege" SE_RELABEL_NAME = "SeRelabelPrivilege" SE_REMOTE_SHUTDOWN_NAME = "SeRemoteShutdownPrivilege" SE_RESTORE_NAME = "SeRestorePrivilege" SE_SECURITY_NAME = "SeSecurityPrivilege" SE_SHUTDOWN_NAME = "SeShutdownPrivilege" SE_SYNC_AGENT_NAME = "SeSyncAgentPrivilege" SE_SYSTEM_ENVIRONMENT_NAME = "SeSystemEnvironmentPrivilege" SE_SYSTEM_PROFILE_NAME = "SeSystemProfilePrivilege" SE_SYSTEMTIME_NAME = "SeSystemtimePrivilege" SE_TAKE_OWNERSHIP_NAME = "SeTakeOwnershipPrivilege" SE_TCB_NAME = "SeTcbPrivilege" SE_TIME_ZONE_NAME = "SeTimeZonePrivilege" SE_TRUSTED_CREDMAN_ACCESS_NAME = "SeTrustedCredManAccessPrivilege" SE_UNDOCK_NAME = "SeUndockPrivilege" SE_UNSOLICITED_INPUT_NAME = "SeUnsolicitedInputPrivilege" SE_CREATE_TOKEN = 2 SE_ASSIGNPRIMARYTOKEN = 3 SE_LOCK_MEMORY=4 SE_INCREASE_QUOTA=5 SE_UNSOLICITED_INPUT=6 SE_TCB=7 SE_SECURITY=8 SE_TAKE_OWNERSHIP=9 SE_LOAD_DRIVER=10 SE_SYSTEM_PROFILE=11 SE_SYSTEMTIME=12 SE_PROF_SINGLE_PROCESS=13 SE_INC_BASE_PRIORITY=14 SE_CREATE_PAGEFILE=15 SE_CREATE_PERMANENT=16 SE_BACKUP=17 SE_RESTORE=18 SE_SHUTDOWN=19 SE_DEBUG=20 SE_AUDIT=21 SE_SYSTEM_ENVIRONMENT=22 SE_CHANGE_NOTIFY=23 SE_REMOTE_SHUTDOWN=24 SE_UNDOCK=25 SE_SYNC_AGENT=26 SE_ENABLE_DELEGATION=27 SE_MANAGE_VOLUME=28 SE_IMPERSONATE=29 SE_CREATE_GLOBAL=30 SE_TRUSTED_CREDMAN_ACCESS=31 SE_RELABEL=32 SE_INC_WORKING_SET=33 SE_TIME_ZONE=34 SE_CREATE_SYMBOLIC_LINK=35 SE_PRIVILEGE_ENABLED_BY_DEFAULT = 0x00000001 SE_PRIVILEGE_ENABLED = 0x00000002 SE_PRIVILEGE_REMOVED = 0x00000004 SE_PRIVILEGE_USED_FOR_ACCESS = 0x80000000 TOKEN_ADJUST_PRIVILEGES = 0x00000020 LOGON_WITH_PROFILE = 0x00000001 LOGON_NETCREDENTIALS_ONLY = 0x00000002 # Token access rights TOKEN_ASSIGN_PRIMARY = 0x0001 TOKEN_DUPLICATE = 0x0002 TOKEN_IMPERSONATE = 0x0004 TOKEN_QUERY = 0x0008 TOKEN_QUERY_SOURCE = 0x0010 TOKEN_ADJUST_PRIVILEGES = 0x0020 TOKEN_ADJUST_GROUPS = 0x0040 TOKEN_ADJUST_DEFAULT = 0x0080 TOKEN_ADJUST_SESSIONID = 0x0100 TOKEN_READ = (STANDARD_RIGHTS_READ | TOKEN_QUERY) TOKEN_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE | TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_QUERY_SOURCE | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT | TOKEN_ADJUST_SESSIONID) #dont ask me... TOKEN_MANIP_ACCESS = (TOKEN_QUERY | TOKEN_READ | TOKEN_IMPERSONATE | TOKEN_QUERY_SOURCE | TOKEN_DUPLICATE | TOKEN_ASSIGN_PRIMARY | (131072 | 4)) # typedef enum _SECURITY_IMPERSONATION_LEVEL { # SecurityAnonymous, # SecurityIdentification, # SecurityImpersonation, # SecurityDelegation # } SECURITY_IMPERSONATION_LEVEL, *PSECURITY_IMPERSONATION_LEVEL; SecurityAnonymous = 0 SecurityIdentification = 1 SecurityImpersonation = 2 SecurityDelegation = 3 TokenPrimary = 1 TokenImpersonation = 2 # Predefined HKEY values HKEY_CLASSES_ROOT = 0x80000000 HKEY_CURRENT_USER = 0x80000001 HKEY_LOCAL_MACHINE = 0x80000002 HKEY_USERS = 0x80000003 HKEY_PERFORMANCE_DATA = 0x80000004 HKEY_CURRENT_CONFIG = 0x80000005 # Registry access rights KEY_ALL_ACCESS = 0xF003F KEY_CREATE_LINK = 0x0020 KEY_CREATE_SUB_KEY = 0x0004 KEY_ENUMERATE_SUB_KEYS = 0x0008 KEY_EXECUTE = 0x20019 KEY_NOTIFY = 0x0010 KEY_QUERY_VALUE = 0x0001 KEY_READ = 0x20019 KEY_SET_VALUE = 0x0002 KEY_WOW64_32KEY = 0x0200 KEY_WOW64_64KEY = 0x0100 KEY_WRITE = 0x20006 # Registry value types REG_NONE = 0 REG_SZ = 1 REG_EXPAND_SZ = 2 REG_BINARY = 3 REG_DWORD = 4 REG_DWORD_LITTLE_ENDIAN = REG_DWORD REG_DWORD_BIG_ENDIAN = 5 REG_LINK = 6 REG_MULTI_SZ = 7 REG_RESOURCE_LIST = 8 REG_FULL_RESOURCE_DESCRIPTOR = 9 REG_RESOURCE_REQUIREMENTS_LIST = 10 REG_QWORD = 11 REG_QWORD_LITTLE_ENDIAN = REG_QWORD
process_query_information = 1024 process_vm_read = 16 process_vm_write = 32 process_vm_operation = 8 process_create_thread = 2 delete = 65536 read_control = 131072 write_dac = 262144 write_owner = 524288 synchronize = 1048576 standard_rights_required = 983040 standard_rights_read = READ_CONTROL standard_rights_write = READ_CONTROL standard_rights_execute = READ_CONTROL standard_rights_all = 2031616 specific_rights_all = 65535 privnames = {'SE_ASSIGNPRIMARYTOKEN_NAME': 'SeAssignPrimaryTokenPrivilege', 'SE_AUDIT_NAME': 'SeAuditPrivilege', 'SE_BACKUP_NAME': 'SeBackupPrivilege', 'SE_CHANGE_NOTIFY_NAME': 'SeChangeNotifyPrivilege', 'SE_CREATE_GLOBAL_NAME': 'SeCreateGlobalPrivilege', 'SE_CREATE_PAGEFILE_NAME': 'SeCreatePagefilePrivilege', 'SE_CREATE_PERMANENT_NAME': 'SeCreatePermanentPrivilege', 'SE_CREATE_SYMBOLIC_LINK_NAME': 'SeCreateSymbolicLinkPrivilege', 'SE_CREATE_TOKEN_NAME': 'SeCreateTokenPrivilege', 'SE_DEBUG_NAME': 'SeDebugPrivilege', 'SE_ENABLE_DELEGATION_NAME': 'SeEnableDelegationPrivilege', 'SE_IMPERSONATE_NAME': 'SeImpersonatePrivilege', 'SE_INC_BASE_PRIORITY_NAME': 'SeIncreaseBasePriorityPrivilege', 'SE_INCREASE_QUOTA_NAME': 'SeIncreaseQuotaPrivilege', 'SE_INC_WORKING_SET_NAME': 'SeIncreaseWorkingSetPrivilege', 'SE_LOAD_DRIVER_NAME': 'SeLoadDriverPrivilege', 'SE_LOCK_MEMORY_NAME': 'SeLockMemoryPrivilege', 'SE_MACHINE_ACCOUNT_NAME': 'SeMachineAccountPrivilege', 'SE_MANAGE_VOLUME_NAME': 'SeManageVolumePrivilege', 'SE_PROF_SINGLE_PROCESS_NAME': 'SeProfileSingleProcessPrivilege', 'SE_RELABEL_NAME': 'SeRelabelPrivilege', 'SE_REMOTE_SHUTDOWN_NAME': 'SeRemoteShutdownPrivilege', 'SE_RESTORE_NAME': 'SeRestorePrivilege', 'SE_SECURITY_NAME': 'SeSecurityPrivilege', 'SE_SHUTDOWN_NAME': 'SeShutdownPrivilege', 'SE_SYNC_AGENT_NAME': 'SeSyncAgentPrivilege', 'SE_SYSTEM_ENVIRONMENT_NAME': 'SeSystemEnvironmentPrivilege', 'SE_SYSTEM_PROFILE_NAME': 'SeSystemProfilePrivilege', 'SE_SYSTEMTIME_NAME': 'SeSystemtimePrivilege', 'SE_TAKE_OWNERSHIP_NAME': 'SeTakeOwnershipPrivilege', 'SE_TCB_NAME': 'SeTcbPrivilege', 'SE_TIME_ZONE_NAME': 'SeTimeZonePrivilege', 'SE_TRUSTED_CREDMAN_ACCESS_NAME': 'SeTrustedCredManAccessPrivilege', 'SE_UNDOCK_NAME': 'SeUndockPrivilege', 'SE_UNSOLICITED_INPUT_NAME': 'SeUnsolicitedInputPrivilege'} se_assignprimarytoken_name = 'SeAssignPrimaryTokenPrivilege' se_audit_name = 'SeAuditPrivilege' se_backup_name = 'SeBackupPrivilege' se_change_notify_name = 'SeChangeNotifyPrivilege' se_create_global_name = 'SeCreateGlobalPrivilege' se_create_pagefile_name = 'SeCreatePagefilePrivilege' se_create_permanent_name = 'SeCreatePermanentPrivilege' se_create_symbolic_link_name = 'SeCreateSymbolicLinkPrivilege' se_create_token_name = 'SeCreateTokenPrivilege' se_debug_name = 'SeDebugPrivilege' se_enable_delegation_name = 'SeEnableDelegationPrivilege' se_impersonate_name = 'SeImpersonatePrivilege' se_inc_base_priority_name = 'SeIncreaseBasePriorityPrivilege' se_increase_quota_name = 'SeIncreaseQuotaPrivilege' se_inc_working_set_name = 'SeIncreaseWorkingSetPrivilege' se_load_driver_name = 'SeLoadDriverPrivilege' se_lock_memory_name = 'SeLockMemoryPrivilege' se_machine_account_name = 'SeMachineAccountPrivilege' se_manage_volume_name = 'SeManageVolumePrivilege' se_prof_single_process_name = 'SeProfileSingleProcessPrivilege' se_relabel_name = 'SeRelabelPrivilege' se_remote_shutdown_name = 'SeRemoteShutdownPrivilege' se_restore_name = 'SeRestorePrivilege' se_security_name = 'SeSecurityPrivilege' se_shutdown_name = 'SeShutdownPrivilege' se_sync_agent_name = 'SeSyncAgentPrivilege' se_system_environment_name = 'SeSystemEnvironmentPrivilege' se_system_profile_name = 'SeSystemProfilePrivilege' se_systemtime_name = 'SeSystemtimePrivilege' se_take_ownership_name = 'SeTakeOwnershipPrivilege' se_tcb_name = 'SeTcbPrivilege' se_time_zone_name = 'SeTimeZonePrivilege' se_trusted_credman_access_name = 'SeTrustedCredManAccessPrivilege' se_undock_name = 'SeUndockPrivilege' se_unsolicited_input_name = 'SeUnsolicitedInputPrivilege' se_create_token = 2 se_assignprimarytoken = 3 se_lock_memory = 4 se_increase_quota = 5 se_unsolicited_input = 6 se_tcb = 7 se_security = 8 se_take_ownership = 9 se_load_driver = 10 se_system_profile = 11 se_systemtime = 12 se_prof_single_process = 13 se_inc_base_priority = 14 se_create_pagefile = 15 se_create_permanent = 16 se_backup = 17 se_restore = 18 se_shutdown = 19 se_debug = 20 se_audit = 21 se_system_environment = 22 se_change_notify = 23 se_remote_shutdown = 24 se_undock = 25 se_sync_agent = 26 se_enable_delegation = 27 se_manage_volume = 28 se_impersonate = 29 se_create_global = 30 se_trusted_credman_access = 31 se_relabel = 32 se_inc_working_set = 33 se_time_zone = 34 se_create_symbolic_link = 35 se_privilege_enabled_by_default = 1 se_privilege_enabled = 2 se_privilege_removed = 4 se_privilege_used_for_access = 2147483648 token_adjust_privileges = 32 logon_with_profile = 1 logon_netcredentials_only = 2 token_assign_primary = 1 token_duplicate = 2 token_impersonate = 4 token_query = 8 token_query_source = 16 token_adjust_privileges = 32 token_adjust_groups = 64 token_adjust_default = 128 token_adjust_sessionid = 256 token_read = STANDARD_RIGHTS_READ | TOKEN_QUERY token_all_access = STANDARD_RIGHTS_REQUIRED | TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE | TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_QUERY_SOURCE | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT | TOKEN_ADJUST_SESSIONID token_manip_access = TOKEN_QUERY | TOKEN_READ | TOKEN_IMPERSONATE | TOKEN_QUERY_SOURCE | TOKEN_DUPLICATE | TOKEN_ASSIGN_PRIMARY | (131072 | 4) security_anonymous = 0 security_identification = 1 security_impersonation = 2 security_delegation = 3 token_primary = 1 token_impersonation = 2 hkey_classes_root = 2147483648 hkey_current_user = 2147483649 hkey_local_machine = 2147483650 hkey_users = 2147483651 hkey_performance_data = 2147483652 hkey_current_config = 2147483653 key_all_access = 983103 key_create_link = 32 key_create_sub_key = 4 key_enumerate_sub_keys = 8 key_execute = 131097 key_notify = 16 key_query_value = 1 key_read = 131097 key_set_value = 2 key_wow64_32_key = 512 key_wow64_64_key = 256 key_write = 131078 reg_none = 0 reg_sz = 1 reg_expand_sz = 2 reg_binary = 3 reg_dword = 4 reg_dword_little_endian = REG_DWORD reg_dword_big_endian = 5 reg_link = 6 reg_multi_sz = 7 reg_resource_list = 8 reg_full_resource_descriptor = 9 reg_resource_requirements_list = 10 reg_qword = 11 reg_qword_little_endian = REG_QWORD
class Helper: @staticmethod def is_Empty(obj): flag = False if obj is None: flag = True elif not obj.strip(): flag = True else: flag = False return flag if __name__ == '__main__': print(Helper.is_Empty(None))
class Helper: @staticmethod def is__empty(obj): flag = False if obj is None: flag = True elif not obj.strip(): flag = True else: flag = False return flag if __name__ == '__main__': print(Helper.is_Empty(None))
''' Lambda expressions are quick way of creating the anonymous functions: ''' #function without lamda expression: def square(num): return num ** 2 print(square(5)) #converting it into lambda expression: lambda num : num ** 2 #if we want we can assign this to variable like square2 = lambda num : num ** 2. # we are not going to use this very often, cause lamda function are anonymous print(square2(5)) print(list(map(lambda num : num **2, [1,2,3,4]))) ''' Map: map() --> map(func, *iterables) --> map object ''' def square(num): return num ** 2 my_nums = [1,2,3,4,5] #if I wanna get sqaure for all the list items, we can use map function, instead of for loop, for loop is costly #Method 1: for item in map(square, my_nums): print(item) #method 2: list(map(square, my_nums)) def splicer(mystring): if len(mystring) % 2 == 0: return 'EVEN' else: return mystring[0] names = ['andy', 'sally', 'eve'] print(list(map(splicer, names))) ''' Filter: iterate function that returns either true or false ''' def check_even(num): return num % 2 == 0 my_numbers = [1,2,3,4,5,6] print(list(filter(check_even, my_numbers)))
""" Lambda expressions are quick way of creating the anonymous functions: """ def square(num): return num ** 2 print(square(5)) lambda num: num ** 2 square2 = lambda num: num ** 2.0 print(square2(5)) print(list(map(lambda num: num ** 2, [1, 2, 3, 4]))) '\nMap: map() --> map(func, *iterables) --> map object\n' def square(num): return num ** 2 my_nums = [1, 2, 3, 4, 5] for item in map(square, my_nums): print(item) list(map(square, my_nums)) def splicer(mystring): if len(mystring) % 2 == 0: return 'EVEN' else: return mystring[0] names = ['andy', 'sally', 'eve'] print(list(map(splicer, names))) '\nFilter: iterate function that returns either true or false\n' def check_even(num): return num % 2 == 0 my_numbers = [1, 2, 3, 4, 5, 6] print(list(filter(check_even, my_numbers)))
# Builds the Netty fork of Tomcat Native. See http://netty.io/wiki/forked-tomcat-native.html { 'targets': [ { 'target_name': 'netty-tcnative-so', 'product_name': 'netty-tcnative', 'type': 'shared_library', 'sources': [ 'src/c/address.c', 'src/c/bb.c', 'src/c/dir.c', 'src/c/error.c', 'src/c/file.c', 'src/c/info.c', 'src/c/jnilib.c', 'src/c/lock.c', 'src/c/misc.c', 'src/c/mmap.c', 'src/c/multicast.c', 'src/c/network.c', 'src/c/os.c', 'src/c/os_unix_system.c', 'src/c/os_unix_uxpipe.c', 'src/c/poll.c', 'src/c/pool.c', 'src/c/proc.c', 'src/c/shm.c', 'src/c/ssl.c', 'src/c/sslcontext.c', 'src/c/sslinfo.c', 'src/c/sslnetwork.c', 'src/c/ssl_private.h', 'src/c/sslutils.c', 'src/c/stdlib.c', 'src/c/tcn_api.h', 'src/c/tcn.h', 'src/c/tcn_version.h', 'src/c/thread.c', 'src/c/user.c', ], 'include_dirs': [ '../apache-portable-runtime/src/include', ], 'defines': [ 'HAVE_OPENSSL', ], 'cflags': [ '-w', ], 'dependencies': [ '../apache-portable-runtime/apr.gyp:apr', '../boringssl/boringssl.gyp:boringssl', ], 'variables': { 'use_native_jni_exports': 1, }, }, { 'target_name': 'netty-tcnative', 'type': 'none', 'variables': { 'java_in_dir': 'src/java', 'javac_includes': [ '**/org/apache/tomcat/jni/*.java' ], 'run_findbugs': 0, }, 'includes': [ '../../build/java.gypi' ], 'dependencies': [ 'netty-tcnative-so', 'rename_netty_tcnative_so_file', ], 'export_dependent_settings': [ 'rename_netty_tcnative_so_file', ], }, { # libnetty-tcnative shared library should have a specific name when # it is copied to the test APK. This target renames (actually makes # a copy of) the 'so' file if it has a different name. 'target_name': 'rename_netty_tcnative_so_file', 'type': 'none', 'conditions': [ ['component=="shared_library"', { 'actions': [ { 'action_name': 'copy', 'inputs': ['<(PRODUCT_DIR)/lib/libnetty-tcnative.cr.so'], 'outputs': ['<(PRODUCT_DIR)/lib/libnetty-tcnative.so'], 'action': [ 'cp', '<@(_inputs)', '<@(_outputs)', ], }], }], ], 'dependencies': [ 'netty-tcnative-so', ], 'direct_dependent_settings': { 'variables': { 'netty_tcnative_so_file_location': '<(PRODUCT_DIR)/lib/libnetty-tcnative.so', }, }, }, ], }
{'targets': [{'target_name': 'netty-tcnative-so', 'product_name': 'netty-tcnative', 'type': 'shared_library', 'sources': ['src/c/address.c', 'src/c/bb.c', 'src/c/dir.c', 'src/c/error.c', 'src/c/file.c', 'src/c/info.c', 'src/c/jnilib.c', 'src/c/lock.c', 'src/c/misc.c', 'src/c/mmap.c', 'src/c/multicast.c', 'src/c/network.c', 'src/c/os.c', 'src/c/os_unix_system.c', 'src/c/os_unix_uxpipe.c', 'src/c/poll.c', 'src/c/pool.c', 'src/c/proc.c', 'src/c/shm.c', 'src/c/ssl.c', 'src/c/sslcontext.c', 'src/c/sslinfo.c', 'src/c/sslnetwork.c', 'src/c/ssl_private.h', 'src/c/sslutils.c', 'src/c/stdlib.c', 'src/c/tcn_api.h', 'src/c/tcn.h', 'src/c/tcn_version.h', 'src/c/thread.c', 'src/c/user.c'], 'include_dirs': ['../apache-portable-runtime/src/include'], 'defines': ['HAVE_OPENSSL'], 'cflags': ['-w'], 'dependencies': ['../apache-portable-runtime/apr.gyp:apr', '../boringssl/boringssl.gyp:boringssl'], 'variables': {'use_native_jni_exports': 1}}, {'target_name': 'netty-tcnative', 'type': 'none', 'variables': {'java_in_dir': 'src/java', 'javac_includes': ['**/org/apache/tomcat/jni/*.java'], 'run_findbugs': 0}, 'includes': ['../../build/java.gypi'], 'dependencies': ['netty-tcnative-so', 'rename_netty_tcnative_so_file'], 'export_dependent_settings': ['rename_netty_tcnative_so_file']}, {'target_name': 'rename_netty_tcnative_so_file', 'type': 'none', 'conditions': [['component=="shared_library"', {'actions': [{'action_name': 'copy', 'inputs': ['<(PRODUCT_DIR)/lib/libnetty-tcnative.cr.so'], 'outputs': ['<(PRODUCT_DIR)/lib/libnetty-tcnative.so'], 'action': ['cp', '<@(_inputs)', '<@(_outputs)']}]}]], 'dependencies': ['netty-tcnative-so'], 'direct_dependent_settings': {'variables': {'netty_tcnative_so_file_location': '<(PRODUCT_DIR)/lib/libnetty-tcnative.so'}}}]}
# https://www.acmicpc.net/problem/9020 if __name__ == '__main__': input = __import__('sys').stdin.readline N = 10_001 T = int(input()) is_prime = [True for _ in range(N)] sqrt = int(N ** (1 / 2)) is_prime[0] = is_prime[1] = False for idx in range(2, sqrt + 1): if not is_prime[idx]: continue for num in range(idx + idx, N, idx): is_prime[num] = False for _ in range(T): N = int(input()) for num in range(N // 2, -1, -1): if is_prime[num] and is_prime[N - num]: print(num, N - num) break
if __name__ == '__main__': input = __import__('sys').stdin.readline n = 10001 t = int(input()) is_prime = [True for _ in range(N)] sqrt = int(N ** (1 / 2)) is_prime[0] = is_prime[1] = False for idx in range(2, sqrt + 1): if not is_prime[idx]: continue for num in range(idx + idx, N, idx): is_prime[num] = False for _ in range(T): n = int(input()) for num in range(N // 2, -1, -1): if is_prime[num] and is_prime[N - num]: print(num, N - num) break
def bin_value(num): return bin(num) [2:] def remove0b(num): return num [2:] numberA = int(input("")) numberB = int(input("")) binaryA = bin_value(numberA) binaryB = bin_value(numberB) sum = bin(int(binaryA,2) + int(binaryB,2)) cleaned = remove0b(sum) binaryA = str(binaryA) binaryB = str(binaryB) sum = str(cleaned) answer = binaryA + " + " + binaryB + " = " + sum print(answer)
def bin_value(num): return bin(num)[2:] def remove0b(num): return num[2:] number_a = int(input('')) number_b = int(input('')) binary_a = bin_value(numberA) binary_b = bin_value(numberB) sum = bin(int(binaryA, 2) + int(binaryB, 2)) cleaned = remove0b(sum) binary_a = str(binaryA) binary_b = str(binaryB) sum = str(cleaned) answer = binaryA + ' + ' + binaryB + ' = ' + sum print(answer)
#!/usr/bin/env python # encoding: utf-8 ''' @author: Jason Lee @license: (C) Copyright @ Jason Lee @contact: [email protected] @file: jianzhi_offer_31.py @time: 2019/4/23 16:09 @desc: ''' class Solution: def FindGreatestSumOfSubArray(self, array): if not array: return 0 f = array for i in range(1, len(array)): if f[i-1] <= 0: f[i] = array[i] else: f[i] = f[i-1] + array[i] return max(f) if __name__ == '__main__': res = Solution() array = [6,-3,-2,7,-15,1,2,2] b = res.FindGreatestSumOfSubArray(array) print(b)
""" @author: Jason Lee @license: (C) Copyright @ Jason Lee @contact: [email protected] @file: jianzhi_offer_31.py @time: 2019/4/23 16:09 @desc: """ class Solution: def find_greatest_sum_of_sub_array(self, array): if not array: return 0 f = array for i in range(1, len(array)): if f[i - 1] <= 0: f[i] = array[i] else: f[i] = f[i - 1] + array[i] return max(f) if __name__ == '__main__': res = solution() array = [6, -3, -2, 7, -15, 1, 2, 2] b = res.FindGreatestSumOfSubArray(array) print(b)
k, n, w = map(int, input().split()) x = 1 money = 0 while x <= w and money != -1: money += k * x x += 1 money_toborrow = money - n if money_toborrow >= 0: print(money_toborrow) else: print(0)
(k, n, w) = map(int, input().split()) x = 1 money = 0 while x <= w and money != -1: money += k * x x += 1 money_toborrow = money - n if money_toborrow >= 0: print(money_toborrow) else: print(0)
def fatorial (n): r = 1 for num in range (n, 1, -1): r *= num return r def dobro (n): num = n * 2 return num def triplo (n): num = n * 3 return num
def fatorial(n): r = 1 for num in range(n, 1, -1): r *= num return r def dobro(n): num = n * 2 return num def triplo(n): num = n * 3 return num
#####################################Data class class RealNews(object): def __init__(self, date, headline, description,distype, url="", imageurl="",location=""): self.date = date self.headline = headline self.description = description self.url = url self.distype = distype self.imageurl = imageurl self.location = location @staticmethod def from_dict(source): self.date = source['date'] self.headline = source['headline'] self.description = source['description'] self.url = source['url'] self.distype = source['distype'] self.imageurl = source['imageurl'] self.location = source['location'] def to_dict(self): return { 'date': self.date, 'headline' : self.headline, 'description' : self.description, 'url' : self.url, 'distype' : self.distype, 'imageurl' : self.imageurl, 'location' : self.location, } def __repr__(self): return(f"News( date: {self.date}, headline : {self.headline}, description : {self.description}, url : {self.url}, distype : {self.distype}, imageurl : {self.imageurl}, location : {self.location})") #####################################write Data # date = input('Enter date: ') # headline = input('Enter headlines: ') # description = input('Enter description: ') # distype = input('Enter disaster type: ') # url = input('Enter url: ') # imageurl = input('Enter image url: ') # location = input('Enter location: ')
class Realnews(object): def __init__(self, date, headline, description, distype, url='', imageurl='', location=''): self.date = date self.headline = headline self.description = description self.url = url self.distype = distype self.imageurl = imageurl self.location = location @staticmethod def from_dict(source): self.date = source['date'] self.headline = source['headline'] self.description = source['description'] self.url = source['url'] self.distype = source['distype'] self.imageurl = source['imageurl'] self.location = source['location'] def to_dict(self): return {'date': self.date, 'headline': self.headline, 'description': self.description, 'url': self.url, 'distype': self.distype, 'imageurl': self.imageurl, 'location': self.location} def __repr__(self): return f'News( date: {self.date}, headline : {self.headline}, description : {self.description}, url : {self.url}, distype : {self.distype}, imageurl : {self.imageurl}, location : {self.location})'
bicicleta=["bike","cannon","cargo", "CALOI"] #Armazenamento de farias mensagens/lista em uma string print(bicicleta[0].title()) print(bicicleta[1]) print(bicicleta[2]) print(bicicleta[3]) print(bicicleta[-1]) print(bicicleta[-2]) print(bicicleta[-3]) print(bicicleta[-4].title()) #como imprimir uma mensagem especifica de uma strings que contem varias mensagens/listas mensagem="Minha Primeira Bicicleta foi uma " + bicicleta[3].title() + "!" print(mensagem)
bicicleta = ['bike', 'cannon', 'cargo', 'CALOI'] print(bicicleta[0].title()) print(bicicleta[1]) print(bicicleta[2]) print(bicicleta[3]) print(bicicleta[-1]) print(bicicleta[-2]) print(bicicleta[-3]) print(bicicleta[-4].title()) mensagem = 'Minha Primeira Bicicleta foi uma ' + bicicleta[3].title() + '!' print(mensagem)
class Subtract: def __init__(self,fnum,snum): self.fnum=fnum self.snum=snum def allSub(self): self.sub=self.fnum-self.snum return self.sub
class Subtract: def __init__(self, fnum, snum): self.fnum = fnum self.snum = snum def all_sub(self): self.sub = self.fnum - self.snum return self.sub
model = Sequential() model.add(LSTM(50, return_sequences = True, input_shape = (x_train.shape[1], 1))) model.add(LSTM(50, return_sequences = False)) model.add(Dense(25)) model.add(Dense(1)) #Compiling the model model.compile(optimizer = 'adam', loss = 'mean_squared_error') #using rmse
model = sequential() model.add(lstm(50, return_sequences=True, input_shape=(x_train.shape[1], 1))) model.add(lstm(50, return_sequences=False)) model.add(dense(25)) model.add(dense(1)) model.compile(optimizer='adam', loss='mean_squared_error')
DEFAULT_REDIS_PORT = 6379 # Number of seconds to sleep upon successful end to allow graceful termination of subprocesses. TERMINATION_TIME = 3 # Max caps on parameters MAX_NUM_STEPS = 10000 MAX_OBSERVATION_DELTA = 5000 MAX_VIDEO_FPS = 60
default_redis_port = 6379 termination_time = 3 max_num_steps = 10000 max_observation_delta = 5000 max_video_fps = 60
key = input().strip() value = input().strip() count = int(input()) result = '' for entry in range(count): keys, values = input().split(' => ') if key in keys: result += f'{keys}:\n' if value in values: all_values = '\n'.join([f'-{v}' for v in values.split(';') if value in v]) result += f'{all_values}\n' print(result)
key = input().strip() value = input().strip() count = int(input()) result = '' for entry in range(count): (keys, values) = input().split(' => ') if key in keys: result += f'{keys}:\n' if value in values: all_values = '\n'.join([f'-{v}' for v in values.split(';') if value in v]) result += f'{all_values}\n' print(result)
''' Author : MiKueen Level : Medium Problem Statement : Product of Array Except Self Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i]. Example: Input: [1,2,3,4] Output: [24,12,8,6] Constraint: It's guaranteed that the product of the elements of any prefix or suffix of the array (including the whole array) fits in a 32 bit integer. Note: Please solve it without division and in O(n). Follow up: Could you solve it with constant space complexity? (The output array does not count as extra space for the purpose of space complexity analysis.) ''' class Solution: def productExceptSelf(self, nums: List[int]) -> List[int]: # Time Complexity - O(n) # Space Complexity - O(1) res = [1] * len(nums) left = right = 1 for i in range(len(nums)): j = -(i+1) res[i] *= left res[j] *= right left *= nums[i] right *= nums[j] return res
""" Author : MiKueen Level : Medium Problem Statement : Product of Array Except Self Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i]. Example: Input: [1,2,3,4] Output: [24,12,8,6] Constraint: It's guaranteed that the product of the elements of any prefix or suffix of the array (including the whole array) fits in a 32 bit integer. Note: Please solve it without division and in O(n). Follow up: Could you solve it with constant space complexity? (The output array does not count as extra space for the purpose of space complexity analysis.) """ class Solution: def product_except_self(self, nums: List[int]) -> List[int]: res = [1] * len(nums) left = right = 1 for i in range(len(nums)): j = -(i + 1) res[i] *= left res[j] *= right left *= nums[i] right *= nums[j] return res
name = str(input()) salary = float(input()) sales = float(input()) total = salary + (sales * 0.15) print(f'TOTAL = R$ {total:.2f}')
name = str(input()) salary = float(input()) sales = float(input()) total = salary + sales * 0.15 print(f'TOTAL = R$ {total:.2f}')
class Parameters: WINDOW_WIDTH = 500 WINDOW_HEIGHT = 600 BASE_HEIGHT = 100 BASE_IMAGE = "base.png" BACKGROUND_IMAGE = "bg.png" BIRD_IMAGES = ["bird1.png", "bird2.png", "bird3.png"] PIPE_IMAGES = ["pipe.png"]
class Parameters: window_width = 500 window_height = 600 base_height = 100 base_image = 'base.png' background_image = 'bg.png' bird_images = ['bird1.png', 'bird2.png', 'bird3.png'] pipe_images = ['pipe.png']
d=dict() for _ in range(int(input())): s=input().split(' ',1) d[s[0]]=list(map(int,s[1].split())) d=dict(sorted(d.items(), key=lambda x: x[0])) d=dict(sorted(d.items(), key=lambda x: x[1][2],reverse=True)) d=dict(sorted(d.items(), key=lambda x: x[1][1],reverse=True)) d=dict(sorted(d.items(), key=lambda x: x[1][0],reverse=True)) for i,j in d.items():print(i,*j,sep=" ")
d = dict() for _ in range(int(input())): s = input().split(' ', 1) d[s[0]] = list(map(int, s[1].split())) d = dict(sorted(d.items(), key=lambda x: x[0])) d = dict(sorted(d.items(), key=lambda x: x[1][2], reverse=True)) d = dict(sorted(d.items(), key=lambda x: x[1][1], reverse=True)) d = dict(sorted(d.items(), key=lambda x: x[1][0], reverse=True)) for (i, j) in d.items(): print(i, *j, sep=' ')
def my_func(count=4): for i in range (1, 5): print("count", count) if count == 2: print("count", count) count = count - 1 my_func()
def my_func(count=4): for i in range(1, 5): print('count', count) if count == 2: print('count', count) count = count - 1 my_func()
s = str(input()) ss = ''.join(list(reversed(s))) sss = ss[:2] ssss = ''.join(list(reversed(sss))) print(ssss)
s = str(input()) ss = ''.join(list(reversed(s))) sss = ss[:2] ssss = ''.join(list(reversed(sss))) print(ssss)
num=5 for i in range(1,num+1): toPrint="" end=int(i*(i+1)/2) a=list(j for j in range(end+1-i,end+1)) for x in a: toPrint+=" "+str(x) print(toPrint) toPrint="" #output ''' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 '''
num = 5 for i in range(1, num + 1): to_print = '' end = int(i * (i + 1) / 2) a = list((j for j in range(end + 1 - i, end + 1))) for x in a: to_print += ' ' + str(x) print(toPrint) to_print = '' '\n1\n2 3\n4 5 6\n7 8 9 10\n11 12 13 14 15\n'
expected_output = { 'mstp': { 'mst_instances': { 0: { 'mst_id': 0, 'bridge_priority': 32768, 'bridge_sysid': 0, 'bridge_address': '00e3.04ff.ad03', 'topology_change_flag': False, 'topology_detected_flag': False, 'topology_changes': 0, 'time_since_topology_change': '142:22:13', 'times': { 'hold': 1, 'topology_change': 70, 'notification': 10, 'max_age': 40, 'hello': 10, 'forwarding_delay': 30, }, 'timers' : { 'hello': 0, 'topology_change': 0, 'notification': 0, }, 'root_of_the_spanning_tree': True, 'interfaces': { 'Port-channel30': { 'name': 'Port-channel30', 'bridge_assurance_inconsistent': True, 'vpc_peer_link_inconsistent': True, 'port_num': 4125, 'status': 'broken', 'cost': 500, 'port_priority': 128, 'port_identifier': '128.4125', 'designated_root_priority': 32768, 'designated_root_address': '0023.04ff.ad03', 'designated_bridge_priority': 61440, 'designated_bridge_address': '4055.39ff.fee7', 'designated_port_id': '128.4125', 'designated_path_cost': 0, 'timers': { 'message_age': 0, 'forward_delay': 0, 'hold': 0, }, 'port_type' : 'network', 'number_of_forward_transitions': 0, 'link_type': 'point-to-point', 'internal': True, 'peer_type': 'STP', 'pvst_simulation': True, 'counters': { 'bpdu_sent': 110, 'bpdu_received': 0 } } } } }, 'hello_time': 10, 'max_age': 40, 'forwarding_delay': 30 } }
expected_output = {'mstp': {'mst_instances': {0: {'mst_id': 0, 'bridge_priority': 32768, 'bridge_sysid': 0, 'bridge_address': '00e3.04ff.ad03', 'topology_change_flag': False, 'topology_detected_flag': False, 'topology_changes': 0, 'time_since_topology_change': '142:22:13', 'times': {'hold': 1, 'topology_change': 70, 'notification': 10, 'max_age': 40, 'hello': 10, 'forwarding_delay': 30}, 'timers': {'hello': 0, 'topology_change': 0, 'notification': 0}, 'root_of_the_spanning_tree': True, 'interfaces': {'Port-channel30': {'name': 'Port-channel30', 'bridge_assurance_inconsistent': True, 'vpc_peer_link_inconsistent': True, 'port_num': 4125, 'status': 'broken', 'cost': 500, 'port_priority': 128, 'port_identifier': '128.4125', 'designated_root_priority': 32768, 'designated_root_address': '0023.04ff.ad03', 'designated_bridge_priority': 61440, 'designated_bridge_address': '4055.39ff.fee7', 'designated_port_id': '128.4125', 'designated_path_cost': 0, 'timers': {'message_age': 0, 'forward_delay': 0, 'hold': 0}, 'port_type': 'network', 'number_of_forward_transitions': 0, 'link_type': 'point-to-point', 'internal': True, 'peer_type': 'STP', 'pvst_simulation': True, 'counters': {'bpdu_sent': 110, 'bpdu_received': 0}}}}}, 'hello_time': 10, 'max_age': 40, 'forwarding_delay': 30}}
#THIS IS HANGMAN print('"Hangman"\nA game where you will try to guess which the hidden word is!') print('\n') word = input('Input the word to guess:\n') while True: if word.isalpha(): break else: word = input('Wrong input, type a valid word:\n') number_of_letters = len(word) word_listed_letters = list(word) print('\n'*15 + 'This space is given for hiding the word\n') print('_ '*(number_of_letters - 1) + '_') letters = [letter for letter in bytearray(range(97, 123)).decode("utf-8")] letters_left = letters #Function to check if the letter to use is valid def isletter(): letter = input('') while True: if letter in letters_left: break else: letter = input('Wrong input, type a valid letter:\n') return letter #Function to display the hangman according to the chances remaining def hangman_display(c): if c == 1: print('-'*10) elif c == 2: print('|\n'*10) hangman_display(1) elif c == 3: print('_'*6) hangman_display(2) elif c == 4: print('_'*6) print('| |\n'*3 + '|\n'*7) elif c == 5: print('_'*6) print('| |\n'*3 + '| O\n' + '|\n'*6) elif c == 6: print('_' * 6) print('| |\n' * 3 + '| O\n' + '| |' + '|\n' * 5) elif c == 7: print('_' * 6) print('| |\n' * 3 + '| O\n' + '| |\n' + '| /|\n' + '|\n' * 5) elif c == 8: print('_' * 6) print('| |\n' * 3 + '| O\n' + '| |\n' + '| /|\\\n' + '|\n' * 5) elif c == 9: print('_' * 6) print('| |\n' * 3 + '| O\n' + '| |\n' + '| /|\\\n' + '/\n' + '|\n' * 4) elif c == 10: print('_' * 6) print('| |\n' * 3 + '| O\n' + '| |\n' + '| /|\\\n' + '/\\\n' + '|\n' * 4) '''count = 0 if try in word: ind = [i for i in range(number_of_letters) if word[i] == try] else: letters_left.remove(try) count += 1 hangman_display(count) ''' while True: #To check if the input is a valid letter while True: letter = input('\nInput letter to guess:\n') if letter in letters_left: break else: letter = input('Wrong input, type a valid letter:\n') if letter in word: position = [p for p in range(number_of_letters) if word[p] == letter] for times in range(len(position)): blanks = position[0] print('_ ' * blanks + word[position[0]] + ' ', end='') if len(position) > 1: blanks = position[1] - position[0] - 1 position = position[1:]
print('"Hangman"\nA game where you will try to guess which the hidden word is!') print('\n') word = input('Input the word to guess:\n') while True: if word.isalpha(): break else: word = input('Wrong input, type a valid word:\n') number_of_letters = len(word) word_listed_letters = list(word) print('\n' * 15 + 'This space is given for hiding the word\n') print('_ ' * (number_of_letters - 1) + '_') letters = [letter for letter in bytearray(range(97, 123)).decode('utf-8')] letters_left = letters def isletter(): letter = input('') while True: if letter in letters_left: break else: letter = input('Wrong input, type a valid letter:\n') return letter def hangman_display(c): if c == 1: print('-' * 10) elif c == 2: print('|\n' * 10) hangman_display(1) elif c == 3: print('_' * 6) hangman_display(2) elif c == 4: print('_' * 6) print('| |\n' * 3 + '|\n' * 7) elif c == 5: print('_' * 6) print('| |\n' * 3 + '| O\n' + '|\n' * 6) elif c == 6: print('_' * 6) print('| |\n' * 3 + '| O\n' + '| |' + '|\n' * 5) elif c == 7: print('_' * 6) print('| |\n' * 3 + '| O\n' + '| |\n' + '| /|\n' + '|\n' * 5) elif c == 8: print('_' * 6) print('| |\n' * 3 + '| O\n' + '| |\n' + '| /|\\\n' + '|\n' * 5) elif c == 9: print('_' * 6) print('| |\n' * 3 + '| O\n' + '| |\n' + '| /|\\\n' + '/\n' + '|\n' * 4) elif c == 10: print('_' * 6) print('| |\n' * 3 + '| O\n' + '| |\n' + '| /|\\\n' + '/\\\n' + '|\n' * 4) 'count = 0 \nif try in word:\n ind = [i for i in range(number_of_letters) if word[i] == try]\n else:\n letters_left.remove(try)\n count += 1\n hangman_display(count)\n' while True: while True: letter = input('\nInput letter to guess:\n') if letter in letters_left: break else: letter = input('Wrong input, type a valid letter:\n') if letter in word: position = [p for p in range(number_of_letters) if word[p] == letter] for times in range(len(position)): blanks = position[0] print('_ ' * blanks + word[position[0]] + ' ', end='') if len(position) > 1: blanks = position[1] - position[0] - 1 position = position[1:]
dataset_type = "SuperviselyDataset" data_root = '/data/slyproject' class_names = ['Car', 'Pedestrian', 'Cyclist', 'DontCare'] point_cloud_range = [0, -40, -3, 70.4, 40, 1] input_modality = dict(use_lidar=True, use_camera=False) file_client_args = dict(backend='disk') # db_sampler = dict( # data_root=data_root, # info_path=data_root + 'train/dataset.npy', # rate=1.0, # prepare=dict( # filter_by_difficulty=[-1], # filter_by_min_points=dict(Car=5, Pedestrian=10, Cyclist=10)), # classes=class_names, # sample_groups=dict(Car=1, Pedestrian=1, Cyclist=1), # points_loader=dict( # type='LoadPointsFromSlyFile', # coord_type='LIDAR', # load_dim=4, # use_dim=[0, 1, 2, 3], # file_client_args=file_client_args)) train_pipeline = [ dict( type='LoadPointsFromSlyFile'), dict( type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), #dict(type='ObjectSample', db_sampler=db_sampler), dict(type='RandomFlip3D', flip_ratio_bev_horizontal=0.5), dict( type='GlobalRotScaleTrans', rot_range=[-0.78539816, 0.78539816], scale_ratio_range=[0.95, 1.05]), dict(type='PointsRangeFilter', point_cloud_range=point_cloud_range), dict(type='ObjectRangeFilter', point_cloud_range=point_cloud_range), dict(type='PointShuffle'), dict(type='DefaultFormatBundle3D', class_names=class_names), dict(type='Collect3D', keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) ] test_pipeline = [ dict(type='LoadPointsFromSlyFile')] # construct a pipeline for data and gt loading in show function # please keep its loading function consistent with test_pipeline (e.g. client) eval_pipeline = [ dict( type='LoadPointsFromSlyFile'), dict( type='DefaultFormatBundle3D', class_names=class_names, with_label=False), dict(type='Collect3D', keys=['points']) ] data = dict( samples_per_gpu=1, workers_per_gpu=1, train=dict( type='RepeatDataset', times=2, dataset=dict( type=dataset_type, data_root=data_root)), val=dict( type=dataset_type, data_root=data_root), test=dict( type=dataset_type, data_root=data_root)) evaluation = dict(interval=1, pipeline=eval_pipeline)
dataset_type = 'SuperviselyDataset' data_root = '/data/slyproject' class_names = ['Car', 'Pedestrian', 'Cyclist', 'DontCare'] point_cloud_range = [0, -40, -3, 70.4, 40, 1] input_modality = dict(use_lidar=True, use_camera=False) file_client_args = dict(backend='disk') train_pipeline = [dict(type='LoadPointsFromSlyFile'), dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), dict(type='RandomFlip3D', flip_ratio_bev_horizontal=0.5), dict(type='GlobalRotScaleTrans', rot_range=[-0.78539816, 0.78539816], scale_ratio_range=[0.95, 1.05]), dict(type='PointsRangeFilter', point_cloud_range=point_cloud_range), dict(type='ObjectRangeFilter', point_cloud_range=point_cloud_range), dict(type='PointShuffle'), dict(type='DefaultFormatBundle3D', class_names=class_names), dict(type='Collect3D', keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])] test_pipeline = [dict(type='LoadPointsFromSlyFile')] eval_pipeline = [dict(type='LoadPointsFromSlyFile'), dict(type='DefaultFormatBundle3D', class_names=class_names, with_label=False), dict(type='Collect3D', keys=['points'])] data = dict(samples_per_gpu=1, workers_per_gpu=1, train=dict(type='RepeatDataset', times=2, dataset=dict(type=dataset_type, data_root=data_root)), val=dict(type=dataset_type, data_root=data_root), test=dict(type=dataset_type, data_root=data_root)) evaluation = dict(interval=1, pipeline=eval_pipeline)
while True: num = int(input("Enter a number: ")) if num % 2 == 0: print(num, "is an even number") else: print(f"{num} is a odd number")
while True: num = int(input('Enter a number: ')) if num % 2 == 0: print(num, 'is an even number') else: print(f'{num} is a odd number')
__package_name__ = 'python-utils' __version__ = '2.5.0' __author__ = 'Rick van Hattem' __author_email__ = '[email protected]' __description__ = ( 'Python Utils is a module with some convenient utilities not included ' 'with the standard Python install') __url__ = 'https://github.com/WoLpH/python-utils'
__package_name__ = 'python-utils' __version__ = '2.5.0' __author__ = 'Rick van Hattem' __author_email__ = '[email protected]' __description__ = 'Python Utils is a module with some convenient utilities not included with the standard Python install' __url__ = 'https://github.com/WoLpH/python-utils'
class BBUtil(object): def __init__(self,width,height): super(BBUtil, self).__init__() self.width=width self.height=height def xywh_to_tlwh(self, bbox_xywh): x,y,w,h = bbox_xywh xmin = max(int(round(x - (w / 2))),0) ymin = max(int(round(y - (h / 2))),0) return [xmin,ymin,int(w),int(h)] def tlwh_to_xyxy(self, bbox_tlwh): x,y,w,h = bbox_tlwh x1 = max(int(x),0) x2 = min(int(x+w),self.width-1) y1 = max(int(y),0) y2 = min(int(y+h),self.height-1) return [x1,y1,x2,y2] def xywh_to_xyxy(self, bbox_xywh): x,y,w,h = bbox_xywh x1 = max(int(x-w/2),0) x2 = min(int(x+w/2),self.width-1) y1 = max(int(y-h/2),0) y2 = min(int(y+h/2),self.height-1) return [x1,y1,x2,y2] def xyxy_to_tlwh(self, bbox_xyxy): x1,y1,x2,y2 = bbox_xyxy t = x1 l = y1 w = int(x2-x1) h = int(y2-y1) return [t,l,w,h] def float_to_int(self,bbox_xyxy): x1,y1,x2,y2 = bbox_xyxy return [int(x1*self.width), int(y1*self.height), int(x2*self.width), int(y2*self.height)] def int_to_float(self,bbox_xyxy): x1,y1,x2,y2 = [float(item) for item in bbox_xyxy] return [x1/self.width, y1/self.height, x2/self.width, y2/self.height]
class Bbutil(object): def __init__(self, width, height): super(BBUtil, self).__init__() self.width = width self.height = height def xywh_to_tlwh(self, bbox_xywh): (x, y, w, h) = bbox_xywh xmin = max(int(round(x - w / 2)), 0) ymin = max(int(round(y - h / 2)), 0) return [xmin, ymin, int(w), int(h)] def tlwh_to_xyxy(self, bbox_tlwh): (x, y, w, h) = bbox_tlwh x1 = max(int(x), 0) x2 = min(int(x + w), self.width - 1) y1 = max(int(y), 0) y2 = min(int(y + h), self.height - 1) return [x1, y1, x2, y2] def xywh_to_xyxy(self, bbox_xywh): (x, y, w, h) = bbox_xywh x1 = max(int(x - w / 2), 0) x2 = min(int(x + w / 2), self.width - 1) y1 = max(int(y - h / 2), 0) y2 = min(int(y + h / 2), self.height - 1) return [x1, y1, x2, y2] def xyxy_to_tlwh(self, bbox_xyxy): (x1, y1, x2, y2) = bbox_xyxy t = x1 l = y1 w = int(x2 - x1) h = int(y2 - y1) return [t, l, w, h] def float_to_int(self, bbox_xyxy): (x1, y1, x2, y2) = bbox_xyxy return [int(x1 * self.width), int(y1 * self.height), int(x2 * self.width), int(y2 * self.height)] def int_to_float(self, bbox_xyxy): (x1, y1, x2, y2) = [float(item) for item in bbox_xyxy] return [x1 / self.width, y1 / self.height, x2 / self.width, y2 / self.height]
class Storage: __storage = 0 def __init__(self, capacity): self.capacity = capacity self.storage = [] def add_product(self, product): if not Storage.__storage == self.capacity: self.storage.append(product) Storage.__storage += 1 def get_products(self): return self.storage
class Storage: __storage = 0 def __init__(self, capacity): self.capacity = capacity self.storage = [] def add_product(self, product): if not Storage.__storage == self.capacity: self.storage.append(product) Storage.__storage += 1 def get_products(self): return self.storage
def signFinder (s): plus = s.count("-") minus = s.count("+") total = plus+minus if total == 1: return True else: return False
def sign_finder(s): plus = s.count('-') minus = s.count('+') total = plus + minus if total == 1: return True else: return False
def binary_search(arr, target): low, high = 0, len(arr)-1 while low < high: mid = (low + high)/2 if arr[mid] == target: return mid elif arr[mid] > target: high = mid - 1 else: low = mid + 1 return high if __name__ == "__main__": lst = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] print(binary_search(lst,15))
def binary_search(arr, target): (low, high) = (0, len(arr) - 1) while low < high: mid = (low + high) / 2 if arr[mid] == target: return mid elif arr[mid] > target: high = mid - 1 else: low = mid + 1 return high if __name__ == '__main__': lst = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] print(binary_search(lst, 15))
#EP1 ''' def getPentagonalNumber(n): i = 1 for i in range(1,n+1): s = (i*(3*i-1)*1.0)/2 print (str(s)+' ',end='') if i%10==0: print() getPentagonalNumber(100) ''' #EP2 ''' def sum(n): s= 0 while(n%10!=0): a=n%10 b=n//10 s=s+a n=b print(s) a= eval(raw_input("enter a int:")) sum(a) ''' #EP3 ''' def display(n1,n2,n3): b=[n1,n2,n3] b.sort() print(b) a1,a2,a3=eval(raw_input("enter three numbers:")) display(a1,a2,a3) ''' #EP4 ''' inves = eval(input("the amount inversted:")) monthly = eval(input("annual interest rate:")) print("annual\tfuture value") def funtureinver(inves,monthly,years): return inves*pow((1+monthly/100/12),years*12) for i in range(1,31): c=funtureinver(inves,monthly,i) print("%d\t%.2f"%(i,c),end=" ") print() ''' #EP5 ''' def printchars(c1,c2,number): m=0 a=ord(c1) b=ord(c2)+1 for i in range(a,b): print(chr(i),end='') m=m+1 if(m%number==0): print("") a,b=input("enter start to end ascii:").split(',') c = eval(input("enter number:")) printchars('1','Z',10) ''' #EP6 ''' def number(year): if((year%4==0)&(year%100!=0))|(year%400==0): print("%d:366"%(i)) else: print("%d:365"%(i)) for i in range(2010,2021): number(i) ''' #EP7 ''' def distance(a1,b1,a2,b2): print(((a1-a2)*(a1-a2)+(b1-b2)*(b1-b2))**0.5) a1,b1=eval(raw_input("enter a1 and a2 for point1: ")) a2,b2=eval(raw_input("enter a1 and a2 for point2: ")) distance(a1,b1,a2,b2) ''' #EP8 ''' import math print ("p\t2^p-1") def n(a): f=0 for j in range(2,int(math.sqrt(a)+1)): if a%j==0 : f = 0 else : f = 1 return f print("2\t3") for i in range(1,32): c=pow(2,i)-1 if(n(c)): print("%d\t%d"%(i,c)) ''' #EP9 ''' from time import * print(ctime(time())) ''' #EP10 ''' import random n = random.randint(1,6) m = random.randint(1,6) s = n+m if (s==2)|(s==3)|(s==12): print("you rolled {} + {} = {}\nyou lose".format(n,m,s)) elif (s==7)|(s==11): print("you rolled {} + {} = {}\nyou win".format(n,m,s)) else : print("you rolled {} + {} = {}\nyou is {}".format(n,m,s,s)) n1 = random.randint(1,6) m1 = random.randint(1,6) s1 = n1+m1 if(s1!=s): print("you rolled {} + {} = {}\nyou lose".format(n1,m1,s1)) else : print("you rolled {} + {} = {}\nyou win".format(n1,m1,s1)) ''' #EP11
""" def getPentagonalNumber(n): i = 1 for i in range(1,n+1): s = (i*(3*i-1)*1.0)/2 print (str(s)+' ',end='') if i%10==0: print() getPentagonalNumber(100) """ '\ndef sum(n):\n s= 0\n while(n%10!=0):\n a=n%10\n b=n//10\n s=s+a\n n=b\n print(s)\na= eval(raw_input("enter a int:"))\nsum(a)\n\n' '\ndef display(n1,n2,n3):\n b=[n1,n2,n3]\n b.sort()\n print(b)\na1,a2,a3=eval(raw_input("enter three numbers:"))\ndisplay(a1,a2,a3)\n' '\ninves = eval(input("the amount inversted:"))\nmonthly = eval(input("annual interest rate:"))\nprint("annual\tfuture value")\ndef funtureinver(inves,monthly,years):\n return inves*pow((1+monthly/100/12),years*12)\nfor i in range(1,31):\n c=funtureinver(inves,monthly,i)\n print("%d\t%.2f"%(i,c),end=" ")\n print()\n' '\ndef printchars(c1,c2,number):\n m=0\n a=ord(c1)\n b=ord(c2)+1\n for i in range(a,b):\n print(chr(i),end=\'\')\n m=m+1\n if(m%number==0):\n print("")\na,b=input("enter start to end ascii:").split(\',\')\nc = eval(input("enter number:"))\nprintchars(\'1\',\'Z\',10)\n' '\ndef number(year):\n if((year%4==0)&(year%100!=0))|(year%400==0):\n print("%d:366"%(i))\n else:\n print("%d:365"%(i))\nfor i in range(2010,2021):\n number(i)\n' '\ndef distance(a1,b1,a2,b2):\n print(((a1-a2)*(a1-a2)+(b1-b2)*(b1-b2))**0.5)\na1,b1=eval(raw_input("enter a1 and a2 for point1: "))\na2,b2=eval(raw_input("enter a1 and a2 for point2: "))\ndistance(a1,b1,a2,b2)\n' '\nimport math\nprint ("p\t2^p-1")\ndef n(a):\n f=0\n for j in range(2,int(math.sqrt(a)+1)):\n if a%j==0 :\n f = 0\n else :\n f = 1\n return f\nprint("2\t3")\nfor i in range(1,32):\n c=pow(2,i)-1\n if(n(c)):\n print("%d\t%d"%(i,c))\n' '\nfrom time import *\nprint(ctime(time()))\n' '\nimport random\n\nn = random.randint(1,6)\nm = random.randint(1,6)\ns = n+m\n\nif (s==2)|(s==3)|(s==12):\n print("you rolled {} + {} = {}\nyou lose".format(n,m,s))\nelif (s==7)|(s==11):\n print("you rolled {} + {} = {}\nyou win".format(n,m,s))\nelse :\n print("you rolled {} + {} = {}\nyou is {}".format(n,m,s,s))\n n1 = random.randint(1,6)\n m1 = random.randint(1,6)\n s1 = n1+m1\n if(s1!=s):\n print("you rolled {} + {} = {}\nyou lose".format(n1,m1,s1))\n else :\n print("you rolled {} + {} = {}\nyou win".format(n1,m1,s1))\n'
# coding=utf-8 __author__ = 'co2y' __email__ = '[email protected]' __version__ = '0.0.1'
__author__ = 'co2y' __email__ = '[email protected]' __version__ = '0.0.1'
def main(): full_name = get_full_name() print() password = get_password() print() first_name = get_first_name(full_name) print("Hi " + first_name + ", thanks for creating an account.") def get_full_name(): while True: name = input("Enter full name: ").strip() if " " in name: return name else: print("You must enter your full name.") def get_first_name(full_name): index1 = full_name.find(" ") first_name = full_name[:index1] return first_name def get_password(): while True: digit = False cap_letter = False password = input("Enter password: ").strip() for char in password: if char.isdigit(): digit = True elif char.isupper(): cap_letter = True if digit == False or cap_letter == False or len(password) < 8: print("Password must be 8 characters or more \n" + "with at least one digit and one uppercase letter.") else: return password if __name__ == "__main__": main()
def main(): full_name = get_full_name() print() password = get_password() print() first_name = get_first_name(full_name) print('Hi ' + first_name + ', thanks for creating an account.') def get_full_name(): while True: name = input('Enter full name: ').strip() if ' ' in name: return name else: print('You must enter your full name.') def get_first_name(full_name): index1 = full_name.find(' ') first_name = full_name[:index1] return first_name def get_password(): while True: digit = False cap_letter = False password = input('Enter password: ').strip() for char in password: if char.isdigit(): digit = True elif char.isupper(): cap_letter = True if digit == False or cap_letter == False or len(password) < 8: print('Password must be 8 characters or more \n' + 'with at least one digit and one uppercase letter.') else: return password if __name__ == '__main__': main()
#EVALUATION OF THE MODEL def evaluate_model(model, X_test, y_test): _, score = model.evaluate(X_test, y_test, verbose = 0) print(score) def predict_model(model, X): y = model.predict(X) print(y) def predict_class_model(model, X): y = model.predict_classes(X) print(y)
def evaluate_model(model, X_test, y_test): (_, score) = model.evaluate(X_test, y_test, verbose=0) print(score) def predict_model(model, X): y = model.predict(X) print(y) def predict_class_model(model, X): y = model.predict_classes(X) print(y)
class Solution: def removeKdigits(self, num: str, k: int) -> str: if len(num) == 0 and len(num) <= k : return "0" st = [num[0]] i = 1 while i < len(num): while len(st) > 0 and int(st[-1]) > int(num[i]) and k > 0: st.pop() k-=1 st.append(num[i]) i+=1 while k > 0 : st.pop() k-=1 while len(st) > 0 and st[0] == "0" : st.pop(0) if len(st) == 0 : return "0" else : return "".join(st) #python special class Solution: def removeKdigits(self, num: str, k: int) -> str: stack = [] for n in num: while k > 0 and stack and stack[-1] > n: stack.pop() k -= 1 stack.append(n) ans = stack[:-k] if k else stack return "".join(ans).lstrip('0') or "0"
class Solution: def remove_kdigits(self, num: str, k: int) -> str: if len(num) == 0 and len(num) <= k: return '0' st = [num[0]] i = 1 while i < len(num): while len(st) > 0 and int(st[-1]) > int(num[i]) and (k > 0): st.pop() k -= 1 st.append(num[i]) i += 1 while k > 0: st.pop() k -= 1 while len(st) > 0 and st[0] == '0': st.pop(0) if len(st) == 0: return '0' else: return ''.join(st) class Solution: def remove_kdigits(self, num: str, k: int) -> str: stack = [] for n in num: while k > 0 and stack and (stack[-1] > n): stack.pop() k -= 1 stack.append(n) ans = stack[:-k] if k else stack return ''.join(ans).lstrip('0') or '0'
file_input = open("motivation.txt",'w') file_input.write("Never give up") file_input.write("\nRise above hate") file_input.write("\nNo body remember second place") file_input.close()
file_input = open('motivation.txt', 'w') file_input.write('Never give up') file_input.write('\nRise above hate') file_input.write('\nNo body remember second place') file_input.close()
__title__ = "django-kindeditor" __description__ = "Django admin KindEditor integration." __url__ = "https://github.com/waketzheng/django-kindeditor" __version__ = "0.3.0" __author__ = "Waket Zheng" __author_email__ = "[email protected]" __license__ = "MIT" __copyright__ = "Copyright 2019 Waket Zheng"
__title__ = 'django-kindeditor' __description__ = 'Django admin KindEditor integration.' __url__ = 'https://github.com/waketzheng/django-kindeditor' __version__ = '0.3.0' __author__ = 'Waket Zheng' __author_email__ = '[email protected]' __license__ = 'MIT' __copyright__ = 'Copyright 2019 Waket Zheng'