content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
def run_rc4(text,key):
resultado = []
for char in text:
resultado.append(rc4(char,key))
return bytearray(resultado)
def rc4(value,key):
SJ = KSA(key)
generatedByte = GenFluxo(SJ[0])
return value ^ next(generatedByte)
def KSA(key):
S = []
T = []
for i in range(256):
S.append(i)
T.append(i % key)
j = 0
for i in range(256):
j = (j + S[i] + T[i]) % 256
swap(S,i,j)
return (S,T)
def GenFluxo(S):
i = 0
j = 0
while(True):
i = (i+1) % 256
j = (j + S[i]) % 256
swap(S,i,j)
K = S[(S[i] + S[j]) % 256]
yield K
def swap(lista,index1,index2):
tmp = lista[index1]
lista[index1] = lista[index2]
lista[index1] = tmp
if __name__ == "__main__":
input_val = bytearray("encrypted text","utf-8")
print(run_rc4(input_val,4))
print(run_rc4(run_rc4(input_val,4),4).decode("utf-8"))
| def run_rc4(text, key):
resultado = []
for char in text:
resultado.append(rc4(char, key))
return bytearray(resultado)
def rc4(value, key):
sj = ksa(key)
generated_byte = gen_fluxo(SJ[0])
return value ^ next(generatedByte)
def ksa(key):
s = []
t = []
for i in range(256):
S.append(i)
T.append(i % key)
j = 0
for i in range(256):
j = (j + S[i] + T[i]) % 256
swap(S, i, j)
return (S, T)
def gen_fluxo(S):
i = 0
j = 0
while True:
i = (i + 1) % 256
j = (j + S[i]) % 256
swap(S, i, j)
k = S[(S[i] + S[j]) % 256]
yield K
def swap(lista, index1, index2):
tmp = lista[index1]
lista[index1] = lista[index2]
lista[index1] = tmp
if __name__ == '__main__':
input_val = bytearray('encrypted text', 'utf-8')
print(run_rc4(input_val, 4))
print(run_rc4(run_rc4(input_val, 4), 4).decode('utf-8')) |
expected_output = {
'session_db': {
0: {
'session_id': 48380,
'state': 'open',
'src_ip': '10.225.32.228',
'dst_ip': '10.196.32.228',
'src_port': 1024,
'dst_port': 1024,
'protocol': 'PROTO_L4_UDP',
'src_vrf': 3,
'dst_vrf': 3,
'src_vpn_id': 20,
'dst_vpn_id': 20,
'zp_name': 'ZP_LAN_ZONE_vpn20_LAN__968352866',
'classmap_name': 'ZBFW-seq-1-cm_',
'nat_flags': '-',
'internal_flags': 0,
'total_initiator_bytes': 2429226758,
'total_responder_bytes': 2429224221,
'application_type': '/unknown'
},
1: {
'session_id': 48089,
'state': 'open',
'src_ip': '10.225.31.116',
'dst_ip': '10.196.31.116',
'src_port': 1024,
'dst_port': 1024,
'protocol': 'PROTO_L4_UDP',
'src_vrf': 3,
'dst_vrf': 3,
'src_vpn_id': 20,
'dst_vpn_id': 20,
'zp_name': 'ZP_LAN_ZONE_vpn20_LAN__968352866',
'classmap_name': 'ZBFW-seq-1-cm_',
'nat_flags': '-',
'internal_flags': 0,
'total_initiator_bytes': 2431679243,
'total_responder_bytes': 2431677173,
'application_type': '/statistical-p2p'
},
2: {
'session_id': 49645,
'state': 'open',
'src_ip': '10.225.37.186',
'dst_ip': '10.196.37.186',
'src_port': 1024,
'dst_port': 1024,
'protocol': 'PROTO_L4_UDP',
'src_vrf': 3,
'dst_vrf': 3,
'src_vpn_id': 20,
'dst_vpn_id': 20,
'zp_name': 'ZP_LAN_ZONE_vpn20_LAN__968352866',
'classmap_name': 'ZBFW-seq-1-cm_',
'nat_flags': '-',
'internal_flags': 0,
'total_initiator_bytes': 2430723994,
'total_responder_bytes': 2430722132,
'application_type': '/unknown'
},
3: {
'session_id': 46845,
'state': 'open',
'src_ip': '10.225.26.42',
'dst_ip': '10.196.26.42',
'src_port': 1024,
'dst_port': 1024,
'protocol': 'PROTO_L4_UDP',
'src_vrf': 3,
'dst_vrf': 3,
'src_vpn_id': 20,
'dst_vpn_id': 20,
'zp_name': 'ZP_LAN_ZONE_vpn20_LAN__968352866',
'classmap_name': 'ZBFW-seq-1-cm_',
'nat_flags': '-',
'internal_flags': 0,
'total_initiator_bytes': 2430311067,
'total_responder_bytes': 2430308180,
'application_type': '/unknown'
},
4: {
'session_id': 44583,
'state': 'open',
'src_ip': '10.225.18.63',
'dst_ip': '10.196.18.63',
'src_port': 1024,
'dst_port': 1024,
'protocol': 'PROTO_L4_UDP',
'src_vrf': 3,
'dst_vrf': 3,
'src_vpn_id': 20,
'dst_vpn_id': 20,
'zp_name': 'ZP_LAN_ZONE_vpn20_LAN__968352866',
'classmap_name': 'ZBFW-seq-1-cm_',
'nat_flags': '-',
'internal_flags': 0,
'total_initiator_bytes': 2435061651,
'total_responder_bytes': 2435062756,
'application_type': '/statistical-p2p'
}
}
} | expected_output = {'session_db': {0: {'session_id': 48380, 'state': 'open', 'src_ip': '10.225.32.228', 'dst_ip': '10.196.32.228', 'src_port': 1024, 'dst_port': 1024, 'protocol': 'PROTO_L4_UDP', 'src_vrf': 3, 'dst_vrf': 3, 'src_vpn_id': 20, 'dst_vpn_id': 20, 'zp_name': 'ZP_LAN_ZONE_vpn20_LAN__968352866', 'classmap_name': 'ZBFW-seq-1-cm_', 'nat_flags': '-', 'internal_flags': 0, 'total_initiator_bytes': 2429226758, 'total_responder_bytes': 2429224221, 'application_type': '/unknown'}, 1: {'session_id': 48089, 'state': 'open', 'src_ip': '10.225.31.116', 'dst_ip': '10.196.31.116', 'src_port': 1024, 'dst_port': 1024, 'protocol': 'PROTO_L4_UDP', 'src_vrf': 3, 'dst_vrf': 3, 'src_vpn_id': 20, 'dst_vpn_id': 20, 'zp_name': 'ZP_LAN_ZONE_vpn20_LAN__968352866', 'classmap_name': 'ZBFW-seq-1-cm_', 'nat_flags': '-', 'internal_flags': 0, 'total_initiator_bytes': 2431679243, 'total_responder_bytes': 2431677173, 'application_type': '/statistical-p2p'}, 2: {'session_id': 49645, 'state': 'open', 'src_ip': '10.225.37.186', 'dst_ip': '10.196.37.186', 'src_port': 1024, 'dst_port': 1024, 'protocol': 'PROTO_L4_UDP', 'src_vrf': 3, 'dst_vrf': 3, 'src_vpn_id': 20, 'dst_vpn_id': 20, 'zp_name': 'ZP_LAN_ZONE_vpn20_LAN__968352866', 'classmap_name': 'ZBFW-seq-1-cm_', 'nat_flags': '-', 'internal_flags': 0, 'total_initiator_bytes': 2430723994, 'total_responder_bytes': 2430722132, 'application_type': '/unknown'}, 3: {'session_id': 46845, 'state': 'open', 'src_ip': '10.225.26.42', 'dst_ip': '10.196.26.42', 'src_port': 1024, 'dst_port': 1024, 'protocol': 'PROTO_L4_UDP', 'src_vrf': 3, 'dst_vrf': 3, 'src_vpn_id': 20, 'dst_vpn_id': 20, 'zp_name': 'ZP_LAN_ZONE_vpn20_LAN__968352866', 'classmap_name': 'ZBFW-seq-1-cm_', 'nat_flags': '-', 'internal_flags': 0, 'total_initiator_bytes': 2430311067, 'total_responder_bytes': 2430308180, 'application_type': '/unknown'}, 4: {'session_id': 44583, 'state': 'open', 'src_ip': '10.225.18.63', 'dst_ip': '10.196.18.63', 'src_port': 1024, 'dst_port': 1024, 'protocol': 'PROTO_L4_UDP', 'src_vrf': 3, 'dst_vrf': 3, 'src_vpn_id': 20, 'dst_vpn_id': 20, 'zp_name': 'ZP_LAN_ZONE_vpn20_LAN__968352866', 'classmap_name': 'ZBFW-seq-1-cm_', 'nat_flags': '-', 'internal_flags': 0, 'total_initiator_bytes': 2435061651, 'total_responder_bytes': 2435062756, 'application_type': '/statistical-p2p'}}} |
# family.py
def init(engine):
def son_of(son, father, mother):
engine.add_universal_fact('family', 'son_of', (son, father, mother))
son_of('art', 'art2', 'nana')
son_of('artie', 'art', 'kathleen')
son_of('ed', 'art', 'kathleen')
son_of('david', 'art', 'kathleen')
son_of('justin', 'artie', 'julie')
son_of('arthur', 'artie', 'lisa')
son_of('keith', 'ed', 'ann')
son_of('ramon', 'ed', 'ann')
son_of('cody', 'david', 'colleen')
| def init(engine):
def son_of(son, father, mother):
engine.add_universal_fact('family', 'son_of', (son, father, mother))
son_of('art', 'art2', 'nana')
son_of('artie', 'art', 'kathleen')
son_of('ed', 'art', 'kathleen')
son_of('david', 'art', 'kathleen')
son_of('justin', 'artie', 'julie')
son_of('arthur', 'artie', 'lisa')
son_of('keith', 'ed', 'ann')
son_of('ramon', 'ed', 'ann')
son_of('cody', 'david', 'colleen') |
# -*- coding: utf-8 -*-
V = int(input())
for i in range(10):
print("N[%d] = %d" % (i, V))
V *= 2
| v = int(input())
for i in range(10):
print('N[%d] = %d' % (i, V))
v *= 2 |
class Something:
def do_something(
self, x: int = 1984, y: int = 2021, z: Optional[int] = None
) -> None:
pass
__book_url__ = "dummy"
__book_version__ = "dummy"
| class Something:
def do_something(self, x: int=1984, y: int=2021, z: Optional[int]=None) -> None:
pass
__book_url__ = 'dummy'
__book_version__ = 'dummy' |
# Allow definitions for where we should pick up our assets from.
# By default if no repository is specified in say WORKSPACE then it defaults to maven_central definition.
# This behaviour is found / specified and loaded from
# "@com_googlesource_gerrit_bazlets//tools:maven_jar.bzl", "maven_jar",
# To prevent us having to create our own version of this asset, we are just adding custom maven repository definitions to a central location.
WANDISCO_ASSETS = "WANDISCO:"
| wandisco_assets = 'WANDISCO:' |
class Config:
HOST = '192.168.0.23' # use 127.0.0.1 if running both client and server on the Raspberry Pi.
PORT = 2018
RELAY_LABELS = ['Exterior Stairs Light', 'Deck Pot Lights', 'Soffit Receptacle', 'Driveway Light']
| class Config:
host = '192.168.0.23'
port = 2018
relay_labels = ['Exterior Stairs Light', 'Deck Pot Lights', 'Soffit Receptacle', 'Driveway Light'] |
### model hyperparameters
state_size = [100, 128, 4] # 4 stacked frames
action_size = 7 # 7 possible actions
learning_rate = 0.00025 # alpha (aka learning rate)
### training hyperparameters
total_episodes = 50 # total episodes for training
max_steps = 5000 # max possible steps in an episode
batch_size = 64
# exploration parameters
explore_start = 1.0 # exploration probability at start
explore_stop = 0.01 # minimum exploration probability
decay_rate = 0.00001 # exponential decay rate for exploration prob
# Q learning hyperparameters
gamma = 0.9 # discounting rate
### memory
pretrain_length = batch_size # number of experiences stored in the memory when initialized
memory_size = 1000000 # number of experiences the memory can keep
### preprocessing hyperparameters
stack_size = 4
## turn this to true if you want to render the environment during training
episode_render = True | state_size = [100, 128, 4]
action_size = 7
learning_rate = 0.00025
total_episodes = 50
max_steps = 5000
batch_size = 64
explore_start = 1.0
explore_stop = 0.01
decay_rate = 1e-05
gamma = 0.9
pretrain_length = batch_size
memory_size = 1000000
stack_size = 4
episode_render = True |
#
# PySNMP MIB module DLINK-3100-DOT1X-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DLINK-3100-DOT1X-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:48:19 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint")
MacAddress, = mibBuilder.importSymbols("BRIDGE-MIB", "MacAddress")
rnd, = mibBuilder.importSymbols("DLINK-3100-MIB", "rnd")
dot1xPaePortNumber, dot1xAuthSessionStatsEntry, PaeControlledPortStatus = mibBuilder.importSymbols("IEEE8021-PAE-MIB", "dot1xPaePortNumber", "dot1xAuthSessionStatsEntry", "PaeControlledPortStatus")
VlanIndex, dot1qFdbId, PortList = mibBuilder.importSymbols("Q-BRIDGE-MIB", "VlanIndex", "dot1qFdbId", "PortList")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Gauge32, ObjectIdentity, ModuleIdentity, Bits, Counter64, NotificationType, Counter32, TimeTicks, Integer32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Unsigned32, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "ObjectIdentity", "ModuleIdentity", "Bits", "Counter64", "NotificationType", "Counter32", "TimeTicks", "Integer32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Unsigned32", "iso")
TextualConvention, TruthValue, DisplayString, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "TruthValue", "DisplayString", "RowStatus")
rldot1x = ModuleIdentity((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95))
rldot1x.setRevisions(('2007-01-02 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: rldot1x.setRevisionsDescriptions(('Initial revision.',))
if mibBuilder.loadTexts: rldot1x.setLastUpdated('200701020000Z')
if mibBuilder.loadTexts: rldot1x.setOrganization('Dlink, Inc. Dlink Semiconductor, Inc.')
if mibBuilder.loadTexts: rldot1x.setContactInfo('www.dlink.com')
if mibBuilder.loadTexts: rldot1x.setDescription('This private MIB module defines dot1x private MIBs.')
rldot1xMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xMibVersion.setStatus('current')
if mibBuilder.loadTexts: rldot1xMibVersion.setDescription("MIB's version, the current version is 1.")
rldot1xExtAuthSessionStatsTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 2), )
if mibBuilder.loadTexts: rldot1xExtAuthSessionStatsTable.setStatus('current')
if mibBuilder.loadTexts: rldot1xExtAuthSessionStatsTable.setDescription('A table that contains the session statistics objects for the Authenticator PAE associated with each Port. An entry appears in this table for each port that may authenticate access to itself.')
rldot1xExtAuthSessionStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 2, 1), )
dot1xAuthSessionStatsEntry.registerAugmentions(("DLINK-3100-DOT1X-MIB", "rldot1xExtAuthSessionStatsEntry"))
rldot1xExtAuthSessionStatsEntry.setIndexNames(*dot1xAuthSessionStatsEntry.getIndexNames())
if mibBuilder.loadTexts: rldot1xExtAuthSessionStatsEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1xExtAuthSessionStatsEntry.setDescription('The session statistics information for an Authenticator PAE. This shows the current values being collected for each session that is still in progress, or the final values for the last valid session on each port where there is no session currently active.')
rlDot1xAuthSessionAuthenticMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("remoteAuthServer", 1), ("localAuthServer", 2), ("none", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlDot1xAuthSessionAuthenticMethod.setStatus('current')
if mibBuilder.loadTexts: rlDot1xAuthSessionAuthenticMethod.setDescription('The authentication method used to establish the session.')
rldot1xGuestVlanSupported = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 3), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xGuestVlanSupported.setStatus('current')
if mibBuilder.loadTexts: rldot1xGuestVlanSupported.setDescription('indicate if guest vlan is supported.')
rldot1xGuestVlanVID = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 4), VlanIndex()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1xGuestVlanVID.setStatus('current')
if mibBuilder.loadTexts: rldot1xGuestVlanVID.setDescription('specify the guest vlan tag , 0 for non exiting.')
rldot1xGuestVlanPorts = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 5), PortList()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1xGuestVlanPorts.setStatus('current')
if mibBuilder.loadTexts: rldot1xGuestVlanPorts.setDescription('the ports that can be members in the guest vlan')
rldot1xUnAuthenticatedVlanSupported = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 6), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xUnAuthenticatedVlanSupported.setStatus('current')
if mibBuilder.loadTexts: rldot1xUnAuthenticatedVlanSupported.setDescription('indicate if unauthenticated Vlan is supported.')
rldot1xUnAuthenticatedVlanTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 7), )
if mibBuilder.loadTexts: rldot1xUnAuthenticatedVlanTable.setStatus('current')
if mibBuilder.loadTexts: rldot1xUnAuthenticatedVlanTable.setDescription('port belong to vlan in all port authenticated state except force unauthenticated table')
rldot1xUnAuthenticatedVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 7, 1), ).setIndexNames((0, "Q-BRIDGE-MIB", "dot1qFdbId"))
if mibBuilder.loadTexts: rldot1xUnAuthenticatedVlanEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1xUnAuthenticatedVlanEntry.setDescription(' port belong to vlan in all port authenticated state except force unauthenticated entry')
rldot1xUnAuthenticatedVlanStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 7, 1, 1), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: rldot1xUnAuthenticatedVlanStatus.setStatus('current')
if mibBuilder.loadTexts: rldot1xUnAuthenticatedVlanStatus.setDescription('The row status variable, used according to row installation and removal conventions.')
rldot1xUserBasedVlanSupported = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 8), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xUserBasedVlanSupported.setStatus('current')
if mibBuilder.loadTexts: rldot1xUserBasedVlanSupported.setDescription('indicate if user based Vlan is supported.')
rldot1xUserBasedVlanPorts = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 9), PortList()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1xUserBasedVlanPorts.setStatus('current')
if mibBuilder.loadTexts: rldot1xUserBasedVlanPorts.setDescription('the ports that can be members in the user based vlan')
rldot1xAuthenticationPortTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 10), )
if mibBuilder.loadTexts: rldot1xAuthenticationPortTable.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthenticationPortTable.setDescription('A table of system level information for each port supported by the Port Access Entity. An entry appears in this table for each port of this system.')
rldot1xAuthenticationPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 10, 1), ).setIndexNames((0, "IEEE8021-PAE-MIB", "dot1xPaePortNumber"))
if mibBuilder.loadTexts: rldot1xAuthenticationPortEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthenticationPortEntry.setDescription('The Port number and mac method')
rldot1xAuthenticationPortMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 10, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("eapolOnly", 1), ("macAndEapol", 2), ("macOnly", 3))).clone('eapolOnly')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1xAuthenticationPortMethod.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthenticationPortMethod.setDescription('The value of the mac based authenication.')
rldot1xRadiusAttrVlanIdEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 10, 1, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1xRadiusAttrVlanIdEnabled.setStatus('current')
if mibBuilder.loadTexts: rldot1xRadiusAttrVlanIdEnabled.setDescription('Defines if treat VLAN ID that received from Radius attributes in Radius-Accept message.')
rldot1xRadiusAttAclNameEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 10, 1, 3), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1xRadiusAttAclNameEnabled.setStatus('current')
if mibBuilder.loadTexts: rldot1xRadiusAttAclNameEnabled.setDescription('Defines if treat ACL Name that received from Radius attributes in Radius-Accept message.')
rldot1xAuthMultiStatsTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11), )
if mibBuilder.loadTexts: rldot1xAuthMultiStatsTable.setReference('9.4.2 Authenticator Statistics')
if mibBuilder.loadTexts: rldot1xAuthMultiStatsTable.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiStatsTable.setDescription('A table that contains the statistics objects for the Authenticator PAE associated with each Port and MAC for multisession 802.1x mode of operation. An entry appears in this table for each port and MAC that have an authentication session currently running under way for them.')
rldot1xAuthMultiStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1), ).setIndexNames((0, "DLINK-3100-DOT1X-MIB", "rldot1xAuthMultiStatsPortNumber"), (0, "DLINK-3100-DOT1X-MIB", "rldot1xAuthMultiStatsSourceMac"))
if mibBuilder.loadTexts: rldot1xAuthMultiStatsEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiStatsEntry.setDescription('The statistics information for an Authenticator PAE.')
rldot1xAuthMultiStatsPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiStatsPortNumber.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiStatsPortNumber.setDescription('Port Number.')
rldot1xAuthMultiStatsSourceMac = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 2), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiStatsSourceMac.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiStatsSourceMac.setDescription('Mac of the authentication session.')
rldot1xAuthMultiEapolFramesRx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiEapolFramesRx.setReference('9.4.2, EAPOL frames received')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolFramesRx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolFramesRx.setDescription('The number of valid EAPOL frames of any type that have been received by this Authenticator.')
rldot1xAuthMultiEapolFramesTx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiEapolFramesTx.setReference('9.4.2, EAPOL frames transmitted')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolFramesTx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolFramesTx.setDescription('The number of EAPOL frames of any type that have been transmitted by this Authenticator.')
rldot1xAuthMultiEapolStartFramesRx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiEapolStartFramesRx.setReference('9.4.2, EAPOL Start frames received')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolStartFramesRx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolStartFramesRx.setDescription('The number of EAPOL Start frames that have been received by this Authenticator.')
rldot1xAuthMultiEapolLogoffFramesRx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiEapolLogoffFramesRx.setReference('9.4.2, EAPOL Logoff frames received')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolLogoffFramesRx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolLogoffFramesRx.setDescription('The number of EAPOL Logoff frames that have been received by this Authenticator.')
rldot1xAuthMultiEapolRespIdFramesRx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiEapolRespIdFramesRx.setReference('9.4.2, EAPOL Resp/Id frames received')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolRespIdFramesRx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolRespIdFramesRx.setDescription('The number of EAP Resp/Id frames that have been received by this Authenticator.')
rldot1xAuthMultiEapolRespFramesRx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiEapolRespFramesRx.setReference('9.4.2, EAPOL Response frames received')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolRespFramesRx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolRespFramesRx.setDescription('The number of valid EAP Response frames (other than Resp/Id frames) that have been received by this Authenticator.')
rldot1xAuthMultiEapolReqIdFramesTx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiEapolReqIdFramesTx.setReference('9.4.2, EAPOL Req/Id frames transmitted')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolReqIdFramesTx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolReqIdFramesTx.setDescription('The number of EAP Req/Id frames that have been transmitted by this Authenticator.')
rldot1xAuthMultiEapolReqFramesTx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiEapolReqFramesTx.setReference('9.4.2, EAPOL Request frames transmitted')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolReqFramesTx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiEapolReqFramesTx.setDescription('The number of EAP Request frames (other than Rq/Id frames) that have been transmitted by this Authenticator.')
rldot1xAuthMultiInvalidEapolFramesRx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiInvalidEapolFramesRx.setReference('9.4.2, Invalid EAPOL frames received')
if mibBuilder.loadTexts: rldot1xAuthMultiInvalidEapolFramesRx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiInvalidEapolFramesRx.setDescription('The number of EAPOL frames that have been received by this Authenticator in which the frame type is not recognized.')
rldot1xAuthMultiEapLengthErrorFramesRx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiEapLengthErrorFramesRx.setReference('9.4.2, EAP length error frames received')
if mibBuilder.loadTexts: rldot1xAuthMultiEapLengthErrorFramesRx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiEapLengthErrorFramesRx.setDescription('The number of EAPOL frames that have been received by this Authenticator in which the Packet Body Length field is invalid.')
rldot1xAuthMultiDiagTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12), )
if mibBuilder.loadTexts: rldot1xAuthMultiDiagTable.setReference('9.4.3 Authenticator Diagnostics')
if mibBuilder.loadTexts: rldot1xAuthMultiDiagTable.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiDiagTable.setDescription('A table that contains the diagnostics objects for the Authenticator PAE associated with each Port and MAC. An entry appears in this table for each port and MAC that have an authentication session currently running under way for them.')
rldot1xAuthMultiDiagEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1), ).setIndexNames((0, "DLINK-3100-DOT1X-MIB", "rldot1xAuthMultiDiagPortNumber"), (0, "DLINK-3100-DOT1X-MIB", "rldot1xAuthMultiDiagSourceMac"))
if mibBuilder.loadTexts: rldot1xAuthMultiDiagEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiDiagEntry.setDescription('The diagnostics information for an Authenticator PAE.')
rldot1xAuthMultiDiagPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiDiagPortNumber.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiDiagPortNumber.setDescription('Port Number.')
rldot1xAuthMultiDiagSourceMac = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 2), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiDiagSourceMac.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiDiagSourceMac.setDescription('Mac of the authentication session.')
rldot1xAuthMultiEntersConnecting = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiEntersConnecting.setReference('9.4.2, 8.5.4.2.1')
if mibBuilder.loadTexts: rldot1xAuthMultiEntersConnecting.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiEntersConnecting.setDescription('Counts the number of times that the state machine transitions to the CONNECTING state from any other state.')
rldot1xAuthMultiEntersAuthenticating = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiEntersAuthenticating.setReference('9.4.2, 8.5.4.2.3')
if mibBuilder.loadTexts: rldot1xAuthMultiEntersAuthenticating.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiEntersAuthenticating.setDescription('Counts the number of times that the state machine transitions from CONNECTING to AUTHENTICATING, as a result of an EAP-Response/Identity message being received from the Supplicant.')
rldot1xAuthMultiAuthSuccessWhileAuthenticating = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiAuthSuccessWhileAuthenticating.setReference('9.4.2, 8.5.4.2.4')
if mibBuilder.loadTexts: rldot1xAuthMultiAuthSuccessWhileAuthenticating.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiAuthSuccessWhileAuthenticating.setDescription('Counts the number of times that the state machine transitions from AUTHENTICATING to AUTHENTICATED, as a result of the Backend Authentication state machine indicating successful authentication of the Supplicant (authSuccess = TRUE).')
rldot1xAuthMultiAuthFailWhileAuthenticating = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiAuthFailWhileAuthenticating.setReference('9.4.2, 8.5.4.2.6')
if mibBuilder.loadTexts: rldot1xAuthMultiAuthFailWhileAuthenticating.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiAuthFailWhileAuthenticating.setDescription('Counts the number of times that the state machine transitions from AUTHENTICATING to HELD, as a result of the Backend Authentication state machine indicating authentication failure (authFail = TRUE).')
rldot1xAuthMultiAuthReauthsWhileAuthenticating = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiAuthReauthsWhileAuthenticating.setReference('9.4.2, 8.5.4.2.7')
if mibBuilder.loadTexts: rldot1xAuthMultiAuthReauthsWhileAuthenticating.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiAuthReauthsWhileAuthenticating.setDescription('Counts the number of times that the state machine transitions from AUTHENTICATING to ABORTING, as a result of a reauthentication request (reAuthenticate = TRUE).')
rldot1xAuthMultiAuthEapStartsWhileAuthenticating = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiAuthEapStartsWhileAuthenticating.setReference('9.4.2, 8.5.4.2.8')
if mibBuilder.loadTexts: rldot1xAuthMultiAuthEapStartsWhileAuthenticating.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiAuthEapStartsWhileAuthenticating.setDescription('Counts the number of times that the state machine transitions from AUTHENTICATING to ABORTING, as a result of an EAPOL-Start message being received from the Supplicant.')
rldot1xAuthMultiAuthReauthsWhileAuthenticated = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiAuthReauthsWhileAuthenticated.setReference('9.4.2, 8.5.4.2.10')
if mibBuilder.loadTexts: rldot1xAuthMultiAuthReauthsWhileAuthenticated.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiAuthReauthsWhileAuthenticated.setDescription('Counts the number of times that the state machine transitions from AUTHENTICATED to CONNECTING, as a result of a reauthentication request (reAuthenticate = TRUE).')
rldot1xAuthMultiAuthEapStartsWhileAuthenticated = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiAuthEapStartsWhileAuthenticated.setReference('9.4.2, 8.5.4.2.11')
if mibBuilder.loadTexts: rldot1xAuthMultiAuthEapStartsWhileAuthenticated.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiAuthEapStartsWhileAuthenticated.setDescription('Counts the number of times that the state machine transitions from AUTHENTICATED to CONNECTING, as a result of an EAPOL-Start message being received from the Supplicant.')
rldot1xAuthMultiBackendResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiBackendResponses.setReference('9.4.2, 8.5.6.2.1')
if mibBuilder.loadTexts: rldot1xAuthMultiBackendResponses.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiBackendResponses.setDescription('Counts the number of times that the state machine sends an initial Access-Request packet to the Authentication server (i.e., executes sendRespToServer on entry to the RESPONSE state). Indicates that the Authenticator attempted communication with the Authentication Server.')
rldot1xAuthMultiBackendAccessChallenges = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiBackendAccessChallenges.setReference('9.4.2, 8.5.6.2.2')
if mibBuilder.loadTexts: rldot1xAuthMultiBackendAccessChallenges.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiBackendAccessChallenges.setDescription('Counts the number of times that the state machine receives an initial Access-Challenge packet from the Authentication server (i.e., aReq becomes TRUE, causing exit from the RESPONSE state). Indicates that the Authentication Server has communication with the Authenticator.')
rldot1xAuthMultiBackendOtherRequestsToSupplicant = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiBackendOtherRequestsToSupplicant.setReference('9.4.2, 8.5.6.2.3')
if mibBuilder.loadTexts: rldot1xAuthMultiBackendOtherRequestsToSupplicant.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiBackendOtherRequestsToSupplicant.setDescription('Counts the number of times that the state machine sends an EAP-Request packet (other than an Identity, Notification, Failure or Success message) to the Supplicant (i.e., executes txReq on entry to the REQUEST state). Indicates that the Authenticator chose an EAP-method.')
rldot1xAuthMultiBackendNonNakResponsesFromSupplicant = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiBackendNonNakResponsesFromSupplicant.setReference('9.4.2, 8.5.6.2.4')
if mibBuilder.loadTexts: rldot1xAuthMultiBackendNonNakResponsesFromSupplicant.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiBackendNonNakResponsesFromSupplicant.setDescription('Counts the number of times that the state machine receives a response from the Supplicant to an initial EAP-Request, and the response is something other than EAP-NAK (i.e., rxResp becomes TRUE, causing the state machine to transition from REQUEST to RESPONSE, and the response is not an EAP-NAK). Indicates that the Supplicant can respond to the Authenticators chosen EAP-method.')
rldot1xAuthMultiBackendAuthSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiBackendAuthSuccesses.setReference('9.4.2, 8.5.6.2.5')
if mibBuilder.loadTexts: rldot1xAuthMultiBackendAuthSuccesses.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiBackendAuthSuccesses.setDescription('Counts the number of times that the state machine receives an EAP-Success message from the Authentication Server (i.e., aSuccess becomes TRUE, causing a transition from RESPONSE to SUCCESS). Indicates that the Supplicant has successfully authenticated to the Authentication Server.')
rldot1xAuthMultiSessionStatsTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13), )
if mibBuilder.loadTexts: rldot1xAuthMultiSessionStatsTable.setReference('9.4.4')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionStatsTable.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionStatsTable.setDescription('A table that contains the session statistics objects for the Authenticator PAE associated with each Port. An entry appears in this table for each port that may authenticate access to itself.')
rldot1xAuthMultiSessionStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1), ).setIndexNames((0, "DLINK-3100-DOT1X-MIB", "rldot1xAuthMultiSessionStatsPortNumber"), (0, "DLINK-3100-DOT1X-MIB", "rldot1xAuthMultiSessionStatsSourceMac"))
if mibBuilder.loadTexts: rldot1xAuthMultiSessionStatsEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionStatsEntry.setDescription('The session statistics information for an Authenticator PAE. This shows the current values being collected for each session that is still in progress, or the final values for the last valid session on each port where there is no session currently active.')
rldot1xAuthMultiSessionStatsPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiSessionStatsPortNumber.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionStatsPortNumber.setDescription('Port Number.')
rldot1xAuthMultiSessionStatsSourceMac = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 2), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiSessionStatsSourceMac.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionStatsSourceMac.setDescription('Mac of the authentication session.')
rldot1xAuthMultiSessionOctetsRx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiSessionOctetsRx.setReference('9.4.4, Session Octets Received')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionOctetsRx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionOctetsRx.setDescription('The number of octets received in user data frames on this Port during the session.')
rldot1xAuthMultiSessionOctetsTx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiSessionOctetsTx.setReference('9.4.4, Session Octets Transmitted')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionOctetsTx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionOctetsTx.setDescription('The number of octets transmitted in user data frames on this Port during the session.')
rldot1xAuthMultiSessionFramesRx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiSessionFramesRx.setReference('9.4.4, Session Frames Received')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionFramesRx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionFramesRx.setDescription('The number of user data frames received on this Port during the session.')
rldot1xAuthMultiSessionFramesTx = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiSessionFramesTx.setReference('9.4.4, Session Frames Transmitted')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionFramesTx.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionFramesTx.setDescription('The number of user data frames transmitted on this Port during the session.')
rldot1xAuthMultiSessionId = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 7), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiSessionId.setReference('9.4.4, Session Identifier')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionId.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionId.setDescription('A unique identifier for the session, in the form of a printable ASCII string of at least three characters.')
rldot1xAuthMultiSessionTime = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 8), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiSessionTime.setReference('9.4.4, Session Time')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionTime.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionTime.setDescription('The duration of the session in seconds.')
rldot1xAuthMultiSessionUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 9), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiSessionUserName.setReference('9.4.4, Session User Name')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionUserName.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionUserName.setDescription('The User-Name representing the identity of the Supplicant PAE.')
rldot1xAuthMultiSessionRadiusAttrVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiSessionRadiusAttrVlan.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionRadiusAttrVlan.setDescription('VLAN ID that received from Radius attributes.')
rldot1xAuthMultiSessionRadiusAttrFilterId = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 11), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiSessionRadiusAttrFilterId.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSessionRadiusAttrFilterId.setDescription('Filter ID that received from Radius attributes.')
rldot1xAuthMultiConfigTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14), )
if mibBuilder.loadTexts: rldot1xAuthMultiConfigTable.setReference('9.4.1 Authenticator Configuration')
if mibBuilder.loadTexts: rldot1xAuthMultiConfigTable.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiConfigTable.setDescription('A table that contains the configuration objects for the Authenticator PAE associated with each port and MAC. An entry appears in this table for each port and MAC that may authenticate access to itself.')
rldot1xAuthMultiConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14, 1), ).setIndexNames((0, "DLINK-3100-DOT1X-MIB", "rldot1xAuthMultiPortNumber"), (0, "DLINK-3100-DOT1X-MIB", "rldot1xAuthMultiSourceMac"))
if mibBuilder.loadTexts: rldot1xAuthMultiConfigEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiConfigEntry.setDescription('The configuration information for an Authenticator PAE.')
rldot1xAuthMultiPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiPortNumber.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiPortNumber.setDescription('Port Number.')
rldot1xAuthMultiSourceMac = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14, 1, 2), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiSourceMac.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiSourceMac.setDescription('Mac of the authentication session.')
rldot1xAuthMultiPaeState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("initialize", 1), ("disconnected", 2), ("connecting", 3), ("authenticating", 4), ("authenticated", 5), ("aborting", 6), ("held", 7), ("forceAuth", 8), ("forceUnauth", 9)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiPaeState.setReference('9.4.1, Authenticator PAE state')
if mibBuilder.loadTexts: rldot1xAuthMultiPaeState.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiPaeState.setDescription('The current value of the Authenticator PAE state machine.')
rldot1xAuthMultiBackendAuthState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("request", 1), ("response", 2), ("success", 3), ("fail", 4), ("timeout", 5), ("idle", 6), ("initialize", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiBackendAuthState.setReference('9.4.1, Backend Authentication state')
if mibBuilder.loadTexts: rldot1xAuthMultiBackendAuthState.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiBackendAuthState.setDescription('The current state of the Backend Authentication state machine.')
rldot1xAuthMultiControlledPortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14, 1, 5), PaeControlledPortStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rldot1xAuthMultiControlledPortStatus.setReference('9.4.1, AuthControlledPortStatus')
if mibBuilder.loadTexts: rldot1xAuthMultiControlledPortStatus.setStatus('current')
if mibBuilder.loadTexts: rldot1xAuthMultiControlledPortStatus.setDescription('The current value of the controlled Port status parameter for the Port.')
rldot1xBpduFilteringEnabled = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 15), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1xBpduFilteringEnabled.setStatus('current')
if mibBuilder.loadTexts: rldot1xBpduFilteringEnabled.setDescription('Specify that when 802.1x is globally disabled, 802.1x BPDU packets would be filtered or bridged.')
rldot1xRadiusAttributesErrorsAclReject = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 18), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1xRadiusAttributesErrorsAclReject.setStatus('current')
if mibBuilder.loadTexts: rldot1xRadiusAttributesErrorsAclReject.setDescription('Specify ACL error handling for the Radius attributes feature.')
rldot1xGuestVlanTimeInterval = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 180))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1xGuestVlanTimeInterval.setStatus('current')
if mibBuilder.loadTexts: rldot1xGuestVlanTimeInterval.setDescription('indicate the guest vlan timeout interval.')
rldot1xMacAuthSuccessTrapEnabled = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 20), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1xMacAuthSuccessTrapEnabled.setStatus('current')
if mibBuilder.loadTexts: rldot1xMacAuthSuccessTrapEnabled.setDescription('Specify if sending traps when a MAC address is successfully authenticated by the 802.1X mac-authentication access control.')
rldot1xMacAuthFailureTrapEnabled = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 21), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1xMacAuthFailureTrapEnabled.setStatus('current')
if mibBuilder.loadTexts: rldot1xMacAuthFailureTrapEnabled.setDescription('Specify if sending traps when MAC address was failed in authentication of the 802.1X MAC authentication access control.')
rldot1xLegacyPortTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 22), )
if mibBuilder.loadTexts: rldot1xLegacyPortTable.setStatus('current')
if mibBuilder.loadTexts: rldot1xLegacyPortTable.setDescription('A table of system level information for each port supported by the Port Access Entity. An entry appears in this table for each port of this system.')
rldot1xLegacyPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 22, 1), ).setIndexNames((0, "IEEE8021-PAE-MIB", "dot1xPaePortNumber"))
if mibBuilder.loadTexts: rldot1xLegacyPortEntry.setStatus('current')
if mibBuilder.loadTexts: rldot1xLegacyPortEntry.setDescription('The Port number and leagcy mode')
rldot1xLegacyPortModeEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 22, 1, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rldot1xLegacyPortModeEnabled.setStatus('current')
if mibBuilder.loadTexts: rldot1xLegacyPortModeEnabled.setDescription('Indicates whether in multiple sessions mode work according to legacy devices mode or not.')
mibBuilder.exportSymbols("DLINK-3100-DOT1X-MIB", rldot1xAuthMultiEapolReqFramesTx=rldot1xAuthMultiEapolReqFramesTx, rldot1xAuthMultiAuthSuccessWhileAuthenticating=rldot1xAuthMultiAuthSuccessWhileAuthenticating, rldot1xAuthMultiSessionStatsEntry=rldot1xAuthMultiSessionStatsEntry, rldot1xUserBasedVlanPorts=rldot1xUserBasedVlanPorts, rldot1xAuthMultiSessionTime=rldot1xAuthMultiSessionTime, rldot1xAuthMultiEntersAuthenticating=rldot1xAuthMultiEntersAuthenticating, rldot1xMibVersion=rldot1xMibVersion, rldot1xAuthMultiEapLengthErrorFramesRx=rldot1xAuthMultiEapLengthErrorFramesRx, rldot1xAuthMultiStatsSourceMac=rldot1xAuthMultiStatsSourceMac, rldot1xLegacyPortTable=rldot1xLegacyPortTable, rldot1xAuthMultiControlledPortStatus=rldot1xAuthMultiControlledPortStatus, rldot1xAuthMultiBackendAuthSuccesses=rldot1xAuthMultiBackendAuthSuccesses, rldot1xAuthMultiSessionStatsPortNumber=rldot1xAuthMultiSessionStatsPortNumber, rldot1xAuthMultiEapolFramesTx=rldot1xAuthMultiEapolFramesTx, rldot1xRadiusAttributesErrorsAclReject=rldot1xRadiusAttributesErrorsAclReject, rldot1xAuthMultiStatsPortNumber=rldot1xAuthMultiStatsPortNumber, rldot1xAuthMultiEapolRespFramesRx=rldot1xAuthMultiEapolRespFramesRx, rldot1xMacAuthFailureTrapEnabled=rldot1xMacAuthFailureTrapEnabled, rldot1xGuestVlanTimeInterval=rldot1xGuestVlanTimeInterval, rldot1xUserBasedVlanSupported=rldot1xUserBasedVlanSupported, rldot1xLegacyPortModeEnabled=rldot1xLegacyPortModeEnabled, rldot1xRadiusAttrVlanIdEnabled=rldot1xRadiusAttrVlanIdEnabled, rldot1xAuthMultiSessionOctetsTx=rldot1xAuthMultiSessionOctetsTx, rldot1xGuestVlanSupported=rldot1xGuestVlanSupported, rldot1xAuthenticationPortTable=rldot1xAuthenticationPortTable, rldot1xAuthMultiSessionFramesTx=rldot1xAuthMultiSessionFramesTx, rldot1xExtAuthSessionStatsTable=rldot1xExtAuthSessionStatsTable, rldot1xAuthMultiSessionUserName=rldot1xAuthMultiSessionUserName, rldot1xAuthMultiSessionRadiusAttrFilterId=rldot1xAuthMultiSessionRadiusAttrFilterId, rldot1xAuthMultiPaeState=rldot1xAuthMultiPaeState, rldot1xAuthMultiBackendOtherRequestsToSupplicant=rldot1xAuthMultiBackendOtherRequestsToSupplicant, rldot1xAuthMultiPortNumber=rldot1xAuthMultiPortNumber, rldot1xAuthMultiInvalidEapolFramesRx=rldot1xAuthMultiInvalidEapolFramesRx, rldot1xAuthMultiAuthReauthsWhileAuthenticating=rldot1xAuthMultiAuthReauthsWhileAuthenticating, rldot1xUnAuthenticatedVlanSupported=rldot1xUnAuthenticatedVlanSupported, rldot1xAuthMultiBackendAccessChallenges=rldot1xAuthMultiBackendAccessChallenges, rldot1xAuthMultiBackendAuthState=rldot1xAuthMultiBackendAuthState, rldot1xAuthMultiDiagSourceMac=rldot1xAuthMultiDiagSourceMac, rldot1xAuthMultiEapolRespIdFramesRx=rldot1xAuthMultiEapolRespIdFramesRx, rldot1xAuthMultiSessionFramesRx=rldot1xAuthMultiSessionFramesRx, rldot1xMacAuthSuccessTrapEnabled=rldot1xMacAuthSuccessTrapEnabled, rldot1xAuthMultiEapolStartFramesRx=rldot1xAuthMultiEapolStartFramesRx, PYSNMP_MODULE_ID=rldot1x, rldot1xAuthMultiSourceMac=rldot1xAuthMultiSourceMac, rldot1xBpduFilteringEnabled=rldot1xBpduFilteringEnabled, rldot1xLegacyPortEntry=rldot1xLegacyPortEntry, rldot1xAuthMultiSessionId=rldot1xAuthMultiSessionId, rldot1xExtAuthSessionStatsEntry=rldot1xExtAuthSessionStatsEntry, rldot1xUnAuthenticatedVlanEntry=rldot1xUnAuthenticatedVlanEntry, rldot1xAuthMultiSessionOctetsRx=rldot1xAuthMultiSessionOctetsRx, rldot1xAuthMultiAuthReauthsWhileAuthenticated=rldot1xAuthMultiAuthReauthsWhileAuthenticated, rldot1xAuthMultiDiagPortNumber=rldot1xAuthMultiDiagPortNumber, rldot1xAuthMultiStatsEntry=rldot1xAuthMultiStatsEntry, rldot1xAuthMultiEapolFramesRx=rldot1xAuthMultiEapolFramesRx, rldot1xAuthMultiSessionStatsTable=rldot1xAuthMultiSessionStatsTable, rlDot1xAuthSessionAuthenticMethod=rlDot1xAuthSessionAuthenticMethod, rldot1xAuthenticationPortEntry=rldot1xAuthenticationPortEntry, rldot1xAuthMultiEapolLogoffFramesRx=rldot1xAuthMultiEapolLogoffFramesRx, rldot1xGuestVlanVID=rldot1xGuestVlanVID, rldot1xRadiusAttAclNameEnabled=rldot1xRadiusAttAclNameEnabled, rldot1xAuthMultiDiagEntry=rldot1xAuthMultiDiagEntry, rldot1xAuthMultiEntersConnecting=rldot1xAuthMultiEntersConnecting, rldot1x=rldot1x, rldot1xGuestVlanPorts=rldot1xGuestVlanPorts, rldot1xAuthMultiEapolReqIdFramesTx=rldot1xAuthMultiEapolReqIdFramesTx, rldot1xAuthMultiAuthEapStartsWhileAuthenticating=rldot1xAuthMultiAuthEapStartsWhileAuthenticating, rldot1xAuthMultiBackendNonNakResponsesFromSupplicant=rldot1xAuthMultiBackendNonNakResponsesFromSupplicant, rldot1xUnAuthenticatedVlanTable=rldot1xUnAuthenticatedVlanTable, rldot1xAuthMultiSessionRadiusAttrVlan=rldot1xAuthMultiSessionRadiusAttrVlan, rldot1xUnAuthenticatedVlanStatus=rldot1xUnAuthenticatedVlanStatus, rldot1xAuthMultiConfigEntry=rldot1xAuthMultiConfigEntry, rldot1xAuthMultiStatsTable=rldot1xAuthMultiStatsTable, rldot1xAuthMultiDiagTable=rldot1xAuthMultiDiagTable, rldot1xAuthenticationPortMethod=rldot1xAuthenticationPortMethod, rldot1xAuthMultiAuthFailWhileAuthenticating=rldot1xAuthMultiAuthFailWhileAuthenticating, rldot1xAuthMultiSessionStatsSourceMac=rldot1xAuthMultiSessionStatsSourceMac, rldot1xAuthMultiConfigTable=rldot1xAuthMultiConfigTable, rldot1xAuthMultiAuthEapStartsWhileAuthenticated=rldot1xAuthMultiAuthEapStartsWhileAuthenticated, rldot1xAuthMultiBackendResponses=rldot1xAuthMultiBackendResponses)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_union, constraints_intersection, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueSizeConstraint')
(mac_address,) = mibBuilder.importSymbols('BRIDGE-MIB', 'MacAddress')
(rnd,) = mibBuilder.importSymbols('DLINK-3100-MIB', 'rnd')
(dot1x_pae_port_number, dot1x_auth_session_stats_entry, pae_controlled_port_status) = mibBuilder.importSymbols('IEEE8021-PAE-MIB', 'dot1xPaePortNumber', 'dot1xAuthSessionStatsEntry', 'PaeControlledPortStatus')
(vlan_index, dot1q_fdb_id, port_list) = mibBuilder.importSymbols('Q-BRIDGE-MIB', 'VlanIndex', 'dot1qFdbId', 'PortList')
(snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(gauge32, object_identity, module_identity, bits, counter64, notification_type, counter32, time_ticks, integer32, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, unsigned32, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'ObjectIdentity', 'ModuleIdentity', 'Bits', 'Counter64', 'NotificationType', 'Counter32', 'TimeTicks', 'Integer32', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'Unsigned32', 'iso')
(textual_convention, truth_value, display_string, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'TruthValue', 'DisplayString', 'RowStatus')
rldot1x = module_identity((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95))
rldot1x.setRevisions(('2007-01-02 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
rldot1x.setRevisionsDescriptions(('Initial revision.',))
if mibBuilder.loadTexts:
rldot1x.setLastUpdated('200701020000Z')
if mibBuilder.loadTexts:
rldot1x.setOrganization('Dlink, Inc. Dlink Semiconductor, Inc.')
if mibBuilder.loadTexts:
rldot1x.setContactInfo('www.dlink.com')
if mibBuilder.loadTexts:
rldot1x.setDescription('This private MIB module defines dot1x private MIBs.')
rldot1x_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xMibVersion.setStatus('current')
if mibBuilder.loadTexts:
rldot1xMibVersion.setDescription("MIB's version, the current version is 1.")
rldot1x_ext_auth_session_stats_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 2))
if mibBuilder.loadTexts:
rldot1xExtAuthSessionStatsTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1xExtAuthSessionStatsTable.setDescription('A table that contains the session statistics objects for the Authenticator PAE associated with each Port. An entry appears in this table for each port that may authenticate access to itself.')
rldot1x_ext_auth_session_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 2, 1))
dot1xAuthSessionStatsEntry.registerAugmentions(('DLINK-3100-DOT1X-MIB', 'rldot1xExtAuthSessionStatsEntry'))
rldot1xExtAuthSessionStatsEntry.setIndexNames(*dot1xAuthSessionStatsEntry.getIndexNames())
if mibBuilder.loadTexts:
rldot1xExtAuthSessionStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1xExtAuthSessionStatsEntry.setDescription('The session statistics information for an Authenticator PAE. This shows the current values being collected for each session that is still in progress, or the final values for the last valid session on each port where there is no session currently active.')
rl_dot1x_auth_session_authentic_method = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('remoteAuthServer', 1), ('localAuthServer', 2), ('none', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rlDot1xAuthSessionAuthenticMethod.setStatus('current')
if mibBuilder.loadTexts:
rlDot1xAuthSessionAuthenticMethod.setDescription('The authentication method used to establish the session.')
rldot1x_guest_vlan_supported = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 3), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xGuestVlanSupported.setStatus('current')
if mibBuilder.loadTexts:
rldot1xGuestVlanSupported.setDescription('indicate if guest vlan is supported.')
rldot1x_guest_vlan_vid = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 4), vlan_index()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1xGuestVlanVID.setStatus('current')
if mibBuilder.loadTexts:
rldot1xGuestVlanVID.setDescription('specify the guest vlan tag , 0 for non exiting.')
rldot1x_guest_vlan_ports = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 5), port_list()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1xGuestVlanPorts.setStatus('current')
if mibBuilder.loadTexts:
rldot1xGuestVlanPorts.setDescription('the ports that can be members in the guest vlan')
rldot1x_un_authenticated_vlan_supported = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 6), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xUnAuthenticatedVlanSupported.setStatus('current')
if mibBuilder.loadTexts:
rldot1xUnAuthenticatedVlanSupported.setDescription('indicate if unauthenticated Vlan is supported.')
rldot1x_un_authenticated_vlan_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 7))
if mibBuilder.loadTexts:
rldot1xUnAuthenticatedVlanTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1xUnAuthenticatedVlanTable.setDescription('port belong to vlan in all port authenticated state except force unauthenticated table')
rldot1x_un_authenticated_vlan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 7, 1)).setIndexNames((0, 'Q-BRIDGE-MIB', 'dot1qFdbId'))
if mibBuilder.loadTexts:
rldot1xUnAuthenticatedVlanEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1xUnAuthenticatedVlanEntry.setDescription(' port belong to vlan in all port authenticated state except force unauthenticated entry')
rldot1x_un_authenticated_vlan_status = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 7, 1, 1), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
rldot1xUnAuthenticatedVlanStatus.setStatus('current')
if mibBuilder.loadTexts:
rldot1xUnAuthenticatedVlanStatus.setDescription('The row status variable, used according to row installation and removal conventions.')
rldot1x_user_based_vlan_supported = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 8), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xUserBasedVlanSupported.setStatus('current')
if mibBuilder.loadTexts:
rldot1xUserBasedVlanSupported.setDescription('indicate if user based Vlan is supported.')
rldot1x_user_based_vlan_ports = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 9), port_list()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1xUserBasedVlanPorts.setStatus('current')
if mibBuilder.loadTexts:
rldot1xUserBasedVlanPorts.setDescription('the ports that can be members in the user based vlan')
rldot1x_authentication_port_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 10))
if mibBuilder.loadTexts:
rldot1xAuthenticationPortTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthenticationPortTable.setDescription('A table of system level information for each port supported by the Port Access Entity. An entry appears in this table for each port of this system.')
rldot1x_authentication_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 10, 1)).setIndexNames((0, 'IEEE8021-PAE-MIB', 'dot1xPaePortNumber'))
if mibBuilder.loadTexts:
rldot1xAuthenticationPortEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthenticationPortEntry.setDescription('The Port number and mac method')
rldot1x_authentication_port_method = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 10, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('eapolOnly', 1), ('macAndEapol', 2), ('macOnly', 3))).clone('eapolOnly')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1xAuthenticationPortMethod.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthenticationPortMethod.setDescription('The value of the mac based authenication.')
rldot1x_radius_attr_vlan_id_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 10, 1, 2), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1xRadiusAttrVlanIdEnabled.setStatus('current')
if mibBuilder.loadTexts:
rldot1xRadiusAttrVlanIdEnabled.setDescription('Defines if treat VLAN ID that received from Radius attributes in Radius-Accept message.')
rldot1x_radius_att_acl_name_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 10, 1, 3), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1xRadiusAttAclNameEnabled.setStatus('current')
if mibBuilder.loadTexts:
rldot1xRadiusAttAclNameEnabled.setDescription('Defines if treat ACL Name that received from Radius attributes in Radius-Accept message.')
rldot1x_auth_multi_stats_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11))
if mibBuilder.loadTexts:
rldot1xAuthMultiStatsTable.setReference('9.4.2 Authenticator Statistics')
if mibBuilder.loadTexts:
rldot1xAuthMultiStatsTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiStatsTable.setDescription('A table that contains the statistics objects for the Authenticator PAE associated with each Port and MAC for multisession 802.1x mode of operation. An entry appears in this table for each port and MAC that have an authentication session currently running under way for them.')
rldot1x_auth_multi_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1)).setIndexNames((0, 'DLINK-3100-DOT1X-MIB', 'rldot1xAuthMultiStatsPortNumber'), (0, 'DLINK-3100-DOT1X-MIB', 'rldot1xAuthMultiStatsSourceMac'))
if mibBuilder.loadTexts:
rldot1xAuthMultiStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiStatsEntry.setDescription('The statistics information for an Authenticator PAE.')
rldot1x_auth_multi_stats_port_number = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiStatsPortNumber.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiStatsPortNumber.setDescription('Port Number.')
rldot1x_auth_multi_stats_source_mac = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 2), mac_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiStatsSourceMac.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiStatsSourceMac.setDescription('Mac of the authentication session.')
rldot1x_auth_multi_eapol_frames_rx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolFramesRx.setReference('9.4.2, EAPOL frames received')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolFramesRx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolFramesRx.setDescription('The number of valid EAPOL frames of any type that have been received by this Authenticator.')
rldot1x_auth_multi_eapol_frames_tx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolFramesTx.setReference('9.4.2, EAPOL frames transmitted')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolFramesTx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolFramesTx.setDescription('The number of EAPOL frames of any type that have been transmitted by this Authenticator.')
rldot1x_auth_multi_eapol_start_frames_rx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolStartFramesRx.setReference('9.4.2, EAPOL Start frames received')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolStartFramesRx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolStartFramesRx.setDescription('The number of EAPOL Start frames that have been received by this Authenticator.')
rldot1x_auth_multi_eapol_logoff_frames_rx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolLogoffFramesRx.setReference('9.4.2, EAPOL Logoff frames received')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolLogoffFramesRx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolLogoffFramesRx.setDescription('The number of EAPOL Logoff frames that have been received by this Authenticator.')
rldot1x_auth_multi_eapol_resp_id_frames_rx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolRespIdFramesRx.setReference('9.4.2, EAPOL Resp/Id frames received')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolRespIdFramesRx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolRespIdFramesRx.setDescription('The number of EAP Resp/Id frames that have been received by this Authenticator.')
rldot1x_auth_multi_eapol_resp_frames_rx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolRespFramesRx.setReference('9.4.2, EAPOL Response frames received')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolRespFramesRx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolRespFramesRx.setDescription('The number of valid EAP Response frames (other than Resp/Id frames) that have been received by this Authenticator.')
rldot1x_auth_multi_eapol_req_id_frames_tx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolReqIdFramesTx.setReference('9.4.2, EAPOL Req/Id frames transmitted')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolReqIdFramesTx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolReqIdFramesTx.setDescription('The number of EAP Req/Id frames that have been transmitted by this Authenticator.')
rldot1x_auth_multi_eapol_req_frames_tx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolReqFramesTx.setReference('9.4.2, EAPOL Request frames transmitted')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolReqFramesTx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapolReqFramesTx.setDescription('The number of EAP Request frames (other than Rq/Id frames) that have been transmitted by this Authenticator.')
rldot1x_auth_multi_invalid_eapol_frames_rx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiInvalidEapolFramesRx.setReference('9.4.2, Invalid EAPOL frames received')
if mibBuilder.loadTexts:
rldot1xAuthMultiInvalidEapolFramesRx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiInvalidEapolFramesRx.setDescription('The number of EAPOL frames that have been received by this Authenticator in which the frame type is not recognized.')
rldot1x_auth_multi_eap_length_error_frames_rx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 11, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapLengthErrorFramesRx.setReference('9.4.2, EAP length error frames received')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapLengthErrorFramesRx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiEapLengthErrorFramesRx.setDescription('The number of EAPOL frames that have been received by this Authenticator in which the Packet Body Length field is invalid.')
rldot1x_auth_multi_diag_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12))
if mibBuilder.loadTexts:
rldot1xAuthMultiDiagTable.setReference('9.4.3 Authenticator Diagnostics')
if mibBuilder.loadTexts:
rldot1xAuthMultiDiagTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiDiagTable.setDescription('A table that contains the diagnostics objects for the Authenticator PAE associated with each Port and MAC. An entry appears in this table for each port and MAC that have an authentication session currently running under way for them.')
rldot1x_auth_multi_diag_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1)).setIndexNames((0, 'DLINK-3100-DOT1X-MIB', 'rldot1xAuthMultiDiagPortNumber'), (0, 'DLINK-3100-DOT1X-MIB', 'rldot1xAuthMultiDiagSourceMac'))
if mibBuilder.loadTexts:
rldot1xAuthMultiDiagEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiDiagEntry.setDescription('The diagnostics information for an Authenticator PAE.')
rldot1x_auth_multi_diag_port_number = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiDiagPortNumber.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiDiagPortNumber.setDescription('Port Number.')
rldot1x_auth_multi_diag_source_mac = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 2), mac_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiDiagSourceMac.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiDiagSourceMac.setDescription('Mac of the authentication session.')
rldot1x_auth_multi_enters_connecting = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiEntersConnecting.setReference('9.4.2, 8.5.4.2.1')
if mibBuilder.loadTexts:
rldot1xAuthMultiEntersConnecting.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiEntersConnecting.setDescription('Counts the number of times that the state machine transitions to the CONNECTING state from any other state.')
rldot1x_auth_multi_enters_authenticating = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiEntersAuthenticating.setReference('9.4.2, 8.5.4.2.3')
if mibBuilder.loadTexts:
rldot1xAuthMultiEntersAuthenticating.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiEntersAuthenticating.setDescription('Counts the number of times that the state machine transitions from CONNECTING to AUTHENTICATING, as a result of an EAP-Response/Identity message being received from the Supplicant.')
rldot1x_auth_multi_auth_success_while_authenticating = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthSuccessWhileAuthenticating.setReference('9.4.2, 8.5.4.2.4')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthSuccessWhileAuthenticating.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthSuccessWhileAuthenticating.setDescription('Counts the number of times that the state machine transitions from AUTHENTICATING to AUTHENTICATED, as a result of the Backend Authentication state machine indicating successful authentication of the Supplicant (authSuccess = TRUE).')
rldot1x_auth_multi_auth_fail_while_authenticating = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthFailWhileAuthenticating.setReference('9.4.2, 8.5.4.2.6')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthFailWhileAuthenticating.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthFailWhileAuthenticating.setDescription('Counts the number of times that the state machine transitions from AUTHENTICATING to HELD, as a result of the Backend Authentication state machine indicating authentication failure (authFail = TRUE).')
rldot1x_auth_multi_auth_reauths_while_authenticating = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthReauthsWhileAuthenticating.setReference('9.4.2, 8.5.4.2.7')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthReauthsWhileAuthenticating.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthReauthsWhileAuthenticating.setDescription('Counts the number of times that the state machine transitions from AUTHENTICATING to ABORTING, as a result of a reauthentication request (reAuthenticate = TRUE).')
rldot1x_auth_multi_auth_eap_starts_while_authenticating = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthEapStartsWhileAuthenticating.setReference('9.4.2, 8.5.4.2.8')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthEapStartsWhileAuthenticating.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthEapStartsWhileAuthenticating.setDescription('Counts the number of times that the state machine transitions from AUTHENTICATING to ABORTING, as a result of an EAPOL-Start message being received from the Supplicant.')
rldot1x_auth_multi_auth_reauths_while_authenticated = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthReauthsWhileAuthenticated.setReference('9.4.2, 8.5.4.2.10')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthReauthsWhileAuthenticated.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthReauthsWhileAuthenticated.setDescription('Counts the number of times that the state machine transitions from AUTHENTICATED to CONNECTING, as a result of a reauthentication request (reAuthenticate = TRUE).')
rldot1x_auth_multi_auth_eap_starts_while_authenticated = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthEapStartsWhileAuthenticated.setReference('9.4.2, 8.5.4.2.11')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthEapStartsWhileAuthenticated.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiAuthEapStartsWhileAuthenticated.setDescription('Counts the number of times that the state machine transitions from AUTHENTICATED to CONNECTING, as a result of an EAPOL-Start message being received from the Supplicant.')
rldot1x_auth_multi_backend_responses = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendResponses.setReference('9.4.2, 8.5.6.2.1')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendResponses.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendResponses.setDescription('Counts the number of times that the state machine sends an initial Access-Request packet to the Authentication server (i.e., executes sendRespToServer on entry to the RESPONSE state). Indicates that the Authenticator attempted communication with the Authentication Server.')
rldot1x_auth_multi_backend_access_challenges = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendAccessChallenges.setReference('9.4.2, 8.5.6.2.2')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendAccessChallenges.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendAccessChallenges.setDescription('Counts the number of times that the state machine receives an initial Access-Challenge packet from the Authentication server (i.e., aReq becomes TRUE, causing exit from the RESPONSE state). Indicates that the Authentication Server has communication with the Authenticator.')
rldot1x_auth_multi_backend_other_requests_to_supplicant = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendOtherRequestsToSupplicant.setReference('9.4.2, 8.5.6.2.3')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendOtherRequestsToSupplicant.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendOtherRequestsToSupplicant.setDescription('Counts the number of times that the state machine sends an EAP-Request packet (other than an Identity, Notification, Failure or Success message) to the Supplicant (i.e., executes txReq on entry to the REQUEST state). Indicates that the Authenticator chose an EAP-method.')
rldot1x_auth_multi_backend_non_nak_responses_from_supplicant = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendNonNakResponsesFromSupplicant.setReference('9.4.2, 8.5.6.2.4')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendNonNakResponsesFromSupplicant.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendNonNakResponsesFromSupplicant.setDescription('Counts the number of times that the state machine receives a response from the Supplicant to an initial EAP-Request, and the response is something other than EAP-NAK (i.e., rxResp becomes TRUE, causing the state machine to transition from REQUEST to RESPONSE, and the response is not an EAP-NAK). Indicates that the Supplicant can respond to the Authenticators chosen EAP-method.')
rldot1x_auth_multi_backend_auth_successes = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 12, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendAuthSuccesses.setReference('9.4.2, 8.5.6.2.5')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendAuthSuccesses.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendAuthSuccesses.setDescription('Counts the number of times that the state machine receives an EAP-Success message from the Authentication Server (i.e., aSuccess becomes TRUE, causing a transition from RESPONSE to SUCCESS). Indicates that the Supplicant has successfully authenticated to the Authentication Server.')
rldot1x_auth_multi_session_stats_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13))
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionStatsTable.setReference('9.4.4')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionStatsTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionStatsTable.setDescription('A table that contains the session statistics objects for the Authenticator PAE associated with each Port. An entry appears in this table for each port that may authenticate access to itself.')
rldot1x_auth_multi_session_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1)).setIndexNames((0, 'DLINK-3100-DOT1X-MIB', 'rldot1xAuthMultiSessionStatsPortNumber'), (0, 'DLINK-3100-DOT1X-MIB', 'rldot1xAuthMultiSessionStatsSourceMac'))
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionStatsEntry.setDescription('The session statistics information for an Authenticator PAE. This shows the current values being collected for each session that is still in progress, or the final values for the last valid session on each port where there is no session currently active.')
rldot1x_auth_multi_session_stats_port_number = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionStatsPortNumber.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionStatsPortNumber.setDescription('Port Number.')
rldot1x_auth_multi_session_stats_source_mac = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 2), mac_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionStatsSourceMac.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionStatsSourceMac.setDescription('Mac of the authentication session.')
rldot1x_auth_multi_session_octets_rx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionOctetsRx.setReference('9.4.4, Session Octets Received')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionOctetsRx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionOctetsRx.setDescription('The number of octets received in user data frames on this Port during the session.')
rldot1x_auth_multi_session_octets_tx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionOctetsTx.setReference('9.4.4, Session Octets Transmitted')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionOctetsTx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionOctetsTx.setDescription('The number of octets transmitted in user data frames on this Port during the session.')
rldot1x_auth_multi_session_frames_rx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionFramesRx.setReference('9.4.4, Session Frames Received')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionFramesRx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionFramesRx.setDescription('The number of user data frames received on this Port during the session.')
rldot1x_auth_multi_session_frames_tx = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionFramesTx.setReference('9.4.4, Session Frames Transmitted')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionFramesTx.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionFramesTx.setDescription('The number of user data frames transmitted on this Port during the session.')
rldot1x_auth_multi_session_id = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 7), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionId.setReference('9.4.4, Session Identifier')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionId.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionId.setDescription('A unique identifier for the session, in the form of a printable ASCII string of at least three characters.')
rldot1x_auth_multi_session_time = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 8), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionTime.setReference('9.4.4, Session Time')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionTime.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionTime.setDescription('The duration of the session in seconds.')
rldot1x_auth_multi_session_user_name = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 9), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionUserName.setReference('9.4.4, Session User Name')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionUserName.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionUserName.setDescription('The User-Name representing the identity of the Supplicant PAE.')
rldot1x_auth_multi_session_radius_attr_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionRadiusAttrVlan.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionRadiusAttrVlan.setDescription('VLAN ID that received from Radius attributes.')
rldot1x_auth_multi_session_radius_attr_filter_id = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 13, 1, 11), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionRadiusAttrFilterId.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSessionRadiusAttrFilterId.setDescription('Filter ID that received from Radius attributes.')
rldot1x_auth_multi_config_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14))
if mibBuilder.loadTexts:
rldot1xAuthMultiConfigTable.setReference('9.4.1 Authenticator Configuration')
if mibBuilder.loadTexts:
rldot1xAuthMultiConfigTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiConfigTable.setDescription('A table that contains the configuration objects for the Authenticator PAE associated with each port and MAC. An entry appears in this table for each port and MAC that may authenticate access to itself.')
rldot1x_auth_multi_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14, 1)).setIndexNames((0, 'DLINK-3100-DOT1X-MIB', 'rldot1xAuthMultiPortNumber'), (0, 'DLINK-3100-DOT1X-MIB', 'rldot1xAuthMultiSourceMac'))
if mibBuilder.loadTexts:
rldot1xAuthMultiConfigEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiConfigEntry.setDescription('The configuration information for an Authenticator PAE.')
rldot1x_auth_multi_port_number = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiPortNumber.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiPortNumber.setDescription('Port Number.')
rldot1x_auth_multi_source_mac = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14, 1, 2), mac_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiSourceMac.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiSourceMac.setDescription('Mac of the authentication session.')
rldot1x_auth_multi_pae_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('initialize', 1), ('disconnected', 2), ('connecting', 3), ('authenticating', 4), ('authenticated', 5), ('aborting', 6), ('held', 7), ('forceAuth', 8), ('forceUnauth', 9)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiPaeState.setReference('9.4.1, Authenticator PAE state')
if mibBuilder.loadTexts:
rldot1xAuthMultiPaeState.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiPaeState.setDescription('The current value of the Authenticator PAE state machine.')
rldot1x_auth_multi_backend_auth_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('request', 1), ('response', 2), ('success', 3), ('fail', 4), ('timeout', 5), ('idle', 6), ('initialize', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendAuthState.setReference('9.4.1, Backend Authentication state')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendAuthState.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiBackendAuthState.setDescription('The current state of the Backend Authentication state machine.')
rldot1x_auth_multi_controlled_port_status = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 14, 1, 5), pae_controlled_port_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rldot1xAuthMultiControlledPortStatus.setReference('9.4.1, AuthControlledPortStatus')
if mibBuilder.loadTexts:
rldot1xAuthMultiControlledPortStatus.setStatus('current')
if mibBuilder.loadTexts:
rldot1xAuthMultiControlledPortStatus.setDescription('The current value of the controlled Port status parameter for the Port.')
rldot1x_bpdu_filtering_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 15), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1xBpduFilteringEnabled.setStatus('current')
if mibBuilder.loadTexts:
rldot1xBpduFilteringEnabled.setDescription('Specify that when 802.1x is globally disabled, 802.1x BPDU packets would be filtered or bridged.')
rldot1x_radius_attributes_errors_acl_reject = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 18), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1xRadiusAttributesErrorsAclReject.setStatus('current')
if mibBuilder.loadTexts:
rldot1xRadiusAttributesErrorsAclReject.setDescription('Specify ACL error handling for the Radius attributes feature.')
rldot1x_guest_vlan_time_interval = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 19), integer32().subtype(subtypeSpec=value_range_constraint(0, 180))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1xGuestVlanTimeInterval.setStatus('current')
if mibBuilder.loadTexts:
rldot1xGuestVlanTimeInterval.setDescription('indicate the guest vlan timeout interval.')
rldot1x_mac_auth_success_trap_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 20), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1xMacAuthSuccessTrapEnabled.setStatus('current')
if mibBuilder.loadTexts:
rldot1xMacAuthSuccessTrapEnabled.setDescription('Specify if sending traps when a MAC address is successfully authenticated by the 802.1X mac-authentication access control.')
rldot1x_mac_auth_failure_trap_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 21), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1xMacAuthFailureTrapEnabled.setStatus('current')
if mibBuilder.loadTexts:
rldot1xMacAuthFailureTrapEnabled.setDescription('Specify if sending traps when MAC address was failed in authentication of the 802.1X MAC authentication access control.')
rldot1x_legacy_port_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 22))
if mibBuilder.loadTexts:
rldot1xLegacyPortTable.setStatus('current')
if mibBuilder.loadTexts:
rldot1xLegacyPortTable.setDescription('A table of system level information for each port supported by the Port Access Entity. An entry appears in this table for each port of this system.')
rldot1x_legacy_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 22, 1)).setIndexNames((0, 'IEEE8021-PAE-MIB', 'dot1xPaePortNumber'))
if mibBuilder.loadTexts:
rldot1xLegacyPortEntry.setStatus('current')
if mibBuilder.loadTexts:
rldot1xLegacyPortEntry.setDescription('The Port number and leagcy mode')
rldot1x_legacy_port_mode_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 95, 22, 1, 1), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rldot1xLegacyPortModeEnabled.setStatus('current')
if mibBuilder.loadTexts:
rldot1xLegacyPortModeEnabled.setDescription('Indicates whether in multiple sessions mode work according to legacy devices mode or not.')
mibBuilder.exportSymbols('DLINK-3100-DOT1X-MIB', rldot1xAuthMultiEapolReqFramesTx=rldot1xAuthMultiEapolReqFramesTx, rldot1xAuthMultiAuthSuccessWhileAuthenticating=rldot1xAuthMultiAuthSuccessWhileAuthenticating, rldot1xAuthMultiSessionStatsEntry=rldot1xAuthMultiSessionStatsEntry, rldot1xUserBasedVlanPorts=rldot1xUserBasedVlanPorts, rldot1xAuthMultiSessionTime=rldot1xAuthMultiSessionTime, rldot1xAuthMultiEntersAuthenticating=rldot1xAuthMultiEntersAuthenticating, rldot1xMibVersion=rldot1xMibVersion, rldot1xAuthMultiEapLengthErrorFramesRx=rldot1xAuthMultiEapLengthErrorFramesRx, rldot1xAuthMultiStatsSourceMac=rldot1xAuthMultiStatsSourceMac, rldot1xLegacyPortTable=rldot1xLegacyPortTable, rldot1xAuthMultiControlledPortStatus=rldot1xAuthMultiControlledPortStatus, rldot1xAuthMultiBackendAuthSuccesses=rldot1xAuthMultiBackendAuthSuccesses, rldot1xAuthMultiSessionStatsPortNumber=rldot1xAuthMultiSessionStatsPortNumber, rldot1xAuthMultiEapolFramesTx=rldot1xAuthMultiEapolFramesTx, rldot1xRadiusAttributesErrorsAclReject=rldot1xRadiusAttributesErrorsAclReject, rldot1xAuthMultiStatsPortNumber=rldot1xAuthMultiStatsPortNumber, rldot1xAuthMultiEapolRespFramesRx=rldot1xAuthMultiEapolRespFramesRx, rldot1xMacAuthFailureTrapEnabled=rldot1xMacAuthFailureTrapEnabled, rldot1xGuestVlanTimeInterval=rldot1xGuestVlanTimeInterval, rldot1xUserBasedVlanSupported=rldot1xUserBasedVlanSupported, rldot1xLegacyPortModeEnabled=rldot1xLegacyPortModeEnabled, rldot1xRadiusAttrVlanIdEnabled=rldot1xRadiusAttrVlanIdEnabled, rldot1xAuthMultiSessionOctetsTx=rldot1xAuthMultiSessionOctetsTx, rldot1xGuestVlanSupported=rldot1xGuestVlanSupported, rldot1xAuthenticationPortTable=rldot1xAuthenticationPortTable, rldot1xAuthMultiSessionFramesTx=rldot1xAuthMultiSessionFramesTx, rldot1xExtAuthSessionStatsTable=rldot1xExtAuthSessionStatsTable, rldot1xAuthMultiSessionUserName=rldot1xAuthMultiSessionUserName, rldot1xAuthMultiSessionRadiusAttrFilterId=rldot1xAuthMultiSessionRadiusAttrFilterId, rldot1xAuthMultiPaeState=rldot1xAuthMultiPaeState, rldot1xAuthMultiBackendOtherRequestsToSupplicant=rldot1xAuthMultiBackendOtherRequestsToSupplicant, rldot1xAuthMultiPortNumber=rldot1xAuthMultiPortNumber, rldot1xAuthMultiInvalidEapolFramesRx=rldot1xAuthMultiInvalidEapolFramesRx, rldot1xAuthMultiAuthReauthsWhileAuthenticating=rldot1xAuthMultiAuthReauthsWhileAuthenticating, rldot1xUnAuthenticatedVlanSupported=rldot1xUnAuthenticatedVlanSupported, rldot1xAuthMultiBackendAccessChallenges=rldot1xAuthMultiBackendAccessChallenges, rldot1xAuthMultiBackendAuthState=rldot1xAuthMultiBackendAuthState, rldot1xAuthMultiDiagSourceMac=rldot1xAuthMultiDiagSourceMac, rldot1xAuthMultiEapolRespIdFramesRx=rldot1xAuthMultiEapolRespIdFramesRx, rldot1xAuthMultiSessionFramesRx=rldot1xAuthMultiSessionFramesRx, rldot1xMacAuthSuccessTrapEnabled=rldot1xMacAuthSuccessTrapEnabled, rldot1xAuthMultiEapolStartFramesRx=rldot1xAuthMultiEapolStartFramesRx, PYSNMP_MODULE_ID=rldot1x, rldot1xAuthMultiSourceMac=rldot1xAuthMultiSourceMac, rldot1xBpduFilteringEnabled=rldot1xBpduFilteringEnabled, rldot1xLegacyPortEntry=rldot1xLegacyPortEntry, rldot1xAuthMultiSessionId=rldot1xAuthMultiSessionId, rldot1xExtAuthSessionStatsEntry=rldot1xExtAuthSessionStatsEntry, rldot1xUnAuthenticatedVlanEntry=rldot1xUnAuthenticatedVlanEntry, rldot1xAuthMultiSessionOctetsRx=rldot1xAuthMultiSessionOctetsRx, rldot1xAuthMultiAuthReauthsWhileAuthenticated=rldot1xAuthMultiAuthReauthsWhileAuthenticated, rldot1xAuthMultiDiagPortNumber=rldot1xAuthMultiDiagPortNumber, rldot1xAuthMultiStatsEntry=rldot1xAuthMultiStatsEntry, rldot1xAuthMultiEapolFramesRx=rldot1xAuthMultiEapolFramesRx, rldot1xAuthMultiSessionStatsTable=rldot1xAuthMultiSessionStatsTable, rlDot1xAuthSessionAuthenticMethod=rlDot1xAuthSessionAuthenticMethod, rldot1xAuthenticationPortEntry=rldot1xAuthenticationPortEntry, rldot1xAuthMultiEapolLogoffFramesRx=rldot1xAuthMultiEapolLogoffFramesRx, rldot1xGuestVlanVID=rldot1xGuestVlanVID, rldot1xRadiusAttAclNameEnabled=rldot1xRadiusAttAclNameEnabled, rldot1xAuthMultiDiagEntry=rldot1xAuthMultiDiagEntry, rldot1xAuthMultiEntersConnecting=rldot1xAuthMultiEntersConnecting, rldot1x=rldot1x, rldot1xGuestVlanPorts=rldot1xGuestVlanPorts, rldot1xAuthMultiEapolReqIdFramesTx=rldot1xAuthMultiEapolReqIdFramesTx, rldot1xAuthMultiAuthEapStartsWhileAuthenticating=rldot1xAuthMultiAuthEapStartsWhileAuthenticating, rldot1xAuthMultiBackendNonNakResponsesFromSupplicant=rldot1xAuthMultiBackendNonNakResponsesFromSupplicant, rldot1xUnAuthenticatedVlanTable=rldot1xUnAuthenticatedVlanTable, rldot1xAuthMultiSessionRadiusAttrVlan=rldot1xAuthMultiSessionRadiusAttrVlan, rldot1xUnAuthenticatedVlanStatus=rldot1xUnAuthenticatedVlanStatus, rldot1xAuthMultiConfigEntry=rldot1xAuthMultiConfigEntry, rldot1xAuthMultiStatsTable=rldot1xAuthMultiStatsTable, rldot1xAuthMultiDiagTable=rldot1xAuthMultiDiagTable, rldot1xAuthenticationPortMethod=rldot1xAuthenticationPortMethod, rldot1xAuthMultiAuthFailWhileAuthenticating=rldot1xAuthMultiAuthFailWhileAuthenticating, rldot1xAuthMultiSessionStatsSourceMac=rldot1xAuthMultiSessionStatsSourceMac, rldot1xAuthMultiConfigTable=rldot1xAuthMultiConfigTable, rldot1xAuthMultiAuthEapStartsWhileAuthenticated=rldot1xAuthMultiAuthEapStartsWhileAuthenticated, rldot1xAuthMultiBackendResponses=rldot1xAuthMultiBackendResponses) |
def is_subsequence(str1, str2):
if len(str1) == 0:
return True
if len(str2) == 0:
return False
index = 0
current = str1[index]
for letter in str2:
if letter == current:
index += 1
if len(str1) == index:
return True
current = str1[index]
return False
def main():
str1 = input().strip()
str2 = input().strip()
print(is_subsequence(str1, str2))
if __name__ == '__main__':
main()
| def is_subsequence(str1, str2):
if len(str1) == 0:
return True
if len(str2) == 0:
return False
index = 0
current = str1[index]
for letter in str2:
if letter == current:
index += 1
if len(str1) == index:
return True
current = str1[index]
return False
def main():
str1 = input().strip()
str2 = input().strip()
print(is_subsequence(str1, str2))
if __name__ == '__main__':
main() |
__author__ = 'Aaron Yang'
__email__ = 'byang971@usc.edu'
__date__ = '8/28/2020 10:55 PM'
class Solution:
def shortestPalindrome(self, s: str) -> str:
i, j = 0, len(s)
if_palindrome = lambda item: item == item[::-1]
while 0 < j:
if if_palindrome(s[i: j]):
break
else:
j -= 1
pre = []
if j == 0:
pre = list(s[::-1])
else:
pre = list(s[j:])[::-1]
pre.extend(list(s))
return "".join(pre)
if __name__ == '__main__':
ss = "abcd"
res = Solution().shortestPalindrome(ss)
print(res)
| __author__ = 'Aaron Yang'
__email__ = 'byang971@usc.edu'
__date__ = '8/28/2020 10:55 PM'
class Solution:
def shortest_palindrome(self, s: str) -> str:
(i, j) = (0, len(s))
if_palindrome = lambda item: item == item[::-1]
while 0 < j:
if if_palindrome(s[i:j]):
break
else:
j -= 1
pre = []
if j == 0:
pre = list(s[::-1])
else:
pre = list(s[j:])[::-1]
pre.extend(list(s))
return ''.join(pre)
if __name__ == '__main__':
ss = 'abcd'
res = solution().shortestPalindrome(ss)
print(res) |
# basic types
'hello' # str
True # bool
None # null
4 # int
2.5 # float
0. # ...
1j # complex
[1,2,3] # list
(1,2,3) # tuple
range(4) # range
{'a','b','c'} # set
frozenset({'a','b'}) # frozenset
{'a': 'foo', 'b': 4} # dict
b'hello' # bytes
bytearray(5) # bytearray
memoryview(bytes(5)) # memoryview
# type fns
str('Hello World') # str
int(20) # int
float(20.5) # float
complex(1j) # complex
list(('a','b','c')) # list
tuple(('a','b','c')) # tuple
range(6) # range
dict(name='John', age=36)# dict
set(('a','b','c')) # set
frozenset(('a','b','c')) # frozenset
bool(5) # bool
bytes(5) # bytes
bytearray(5) # bytearray
memoryview(bytes(5)) # memoryview
# type coercion
str(25) # '25'
int('25') # 25
float('12.34') # 12.34
if None or 0 or 0.0 or '' or [] or {} or set():
print('dead code') # not reached | """hello"""
True
None
4
2.5
0.0
1j
[1, 2, 3]
(1, 2, 3)
range(4)
{'a', 'b', 'c'}
frozenset({'a', 'b'})
{'a': 'foo', 'b': 4}
b'hello'
bytearray(5)
memoryview(bytes(5))
str('Hello World')
int(20)
float(20.5)
complex(1j)
list(('a', 'b', 'c'))
tuple(('a', 'b', 'c'))
range(6)
dict(name='John', age=36)
set(('a', 'b', 'c'))
frozenset(('a', 'b', 'c'))
bool(5)
bytes(5)
bytearray(5)
memoryview(bytes(5))
str(25)
int('25')
float('12.34')
if None or 0 or 0.0 or '' or [] or {} or set():
print('dead code') |
#
# PySNMP MIB module Brcm-adapterInfo-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Brcm-adapterInfo-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:42:51 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, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Bits, TimeTicks, MibIdentifier, Counter32, IpAddress, Unsigned32, enterprises, Gauge32, ModuleIdentity, ObjectIdentity, Integer32, iso, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "TimeTicks", "MibIdentifier", "Counter32", "IpAddress", "Unsigned32", "enterprises", "Gauge32", "ModuleIdentity", "ObjectIdentity", "Integer32", "iso", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64")
DisplayString, TextualConvention, PhysAddress = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "PhysAddress")
broadcom = MibIdentifier((1, 3, 6, 1, 4, 1, 4413))
enet = MibIdentifier((1, 3, 6, 1, 4, 1, 4413, 1))
basp = MibIdentifier((1, 3, 6, 1, 4, 1, 4413, 1, 2))
ifControllers = MibIdentifier((1, 3, 6, 1, 4, 1, 4413, 1, 3))
baspConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 4413, 1, 2, 1))
baspStat = MibIdentifier((1, 3, 6, 1, 4, 1, 4413, 1, 2, 2))
baspTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 4413, 1, 2, 3))
class InetAddressType(TextualConvention, Integer32):
description = 'A value that represents a type of Internet address. unknown(0) An unknown address type. This value MUST be used if the value of the corresponding InetAddress object is a zero-length string. It may also be used to indicate an IP address that is not in one of the formats defined below. ipv4(1) An IPv4 address as defined by the InetAddressIPv4 textual convention. ipv6(2) An IPv6 address as defined by the InetAddressIPv6 textual convention. ipv4z(3) A non-global IPv4 address including a zone index as defined by the InetAddressIPv4z textual convention. ipv6z(4) A non-global IPv6 address including a zone index as defined by the InetAddressIPv6z textual convention. dns(16) A DNS domain name as defined by the InetAddressDNS textual convention. Each definition of a concrete InetAddressType value must be accompanied by a definition of a textual convention for use with that InetAddressType. To support future extensions, the InetAddressType textual convention SHOULD NOT be sub-typed in object type definitions. It MAY be sub-typed in compliance statements in order to require only a subset of these address types for a compliant implementation. Implementations must ensure that InetAddressType objects and any dependent objects (e.g., InetAddress objects) are consistent. An inconsistentValue error must be generated if an attempt to change an InetAddressType object would, for example, lead to an undefined InetAddress value. In particular, InetAddressType/InetAddress pairs must be changed together if the address type changes (e.g., from ipv6(2) to ipv4(1)).'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 16))
namedValues = NamedValues(("unknown", 0), ("ipv4", 1), ("ipv6", 2), ("ipv4z", 3), ("ipv6z", 4), ("dns", 16))
class InetAddress(TextualConvention, OctetString):
description = "Denotes a generic Internet address. An InetAddress value is always interpreted within the context of an InetAddressType value. Every usage of the InetAddress textual convention is required to specify the InetAddressType object that provides the context. It is suggested that the InetAddressType object be logically registered before the object(s) that use the InetAddress textual convention, if they appear in the same logical row. The value of an InetAddress object must always be consistent with the value of the associated InetAddressType object. Attempts to set an InetAddress object to a value inconsistent with the associated InetAddressType must fail with an inconsistentValue error. When this textual convention is used as the syntax of an index object, there may be issues with the limit of 128 sub-identifiers specified in SMIv2, STD 58. In this case, the object definition MUST include a 'SIZE' clause to limit the number of potential instance sub-identifiers; otherwise the applicable constraints MUST be stated in the appropriate conceptual row DESCRIPTION clauses, or in the surrounding documentation if there is no single DESCRIPTION clause that is appropriate."
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 255)
class InetAddressIPv4(TextualConvention, OctetString):
description = 'Represents an IPv4 network address: Octets Contents Encoding 1-4 IPv4 address network-byte order The corresponding InetAddressType value is ipv4(1). This textual convention SHOULD NOT be used directly in object definitions, as it restricts addresses to a specific format. However, if it is used, it MAY be used either on its own or in conjunction with InetAddressType, as a pair.'
status = 'current'
displayHint = '1d.1d.1d.1d'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(4, 4)
fixedLength = 4
class InetAddressIPv6(TextualConvention, OctetString):
description = 'Represents an IPv6 network address: Octets Contents Encoding 1-16 IPv6 address network-byte order The corresponding InetAddressType value is ipv6(2). This textual convention SHOULD NOT be used directly in object definitions, as it restricts addresses to a specific format. However, if it is used, it MAY be used either on its own or in conjunction with InetAddressType, as a pair.'
status = 'current'
displayHint = '2x:2x:2x:2x:2x:2x:2x:2x'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(16, 16)
fixedLength = 16
ifNumber = MibScalar((1, 3, 6, 1, 4, 1, 4413, 1, 3, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifNumber.setStatus('mandatory')
if mibBuilder.loadTexts: ifNumber.setDescription('The number of Broadcom network interfaces (regardless of their current state) present on this system.')
ifTable = MibTable((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2), )
if mibBuilder.loadTexts: ifTable.setStatus('mandatory')
if mibBuilder.loadTexts: ifTable.setDescription('A list of Broadcom network interface entries. The number of entries is given by the ifNumber.')
ifEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1), ).setIndexNames((0, "Brcm-adapterInfo-MIB", "ifIndex"))
if mibBuilder.loadTexts: ifEntry.setStatus('mandatory')
if mibBuilder.loadTexts: ifEntry.setDescription('An entry containing statistics objects of a Broadcom network interface in this system.')
ifIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifIndex.setStatus('mandatory')
if mibBuilder.loadTexts: ifIndex.setDescription("An unique value for each Broadcom interface. The value for each interface must remain constant at least from one re-initialization of the entity's network management system to the next re- initialization.")
ifName = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifName.setStatus('mandatory')
if mibBuilder.loadTexts: ifName.setDescription(' A textual string containing name of the adapter or team')
ifDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifDescr.setStatus('mandatory')
if mibBuilder.loadTexts: ifDescr.setDescription(' A textual string containing the adapter or team description')
ifNetworkAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 4), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifNetworkAddress.setStatus('mandatory')
if mibBuilder.loadTexts: ifNetworkAddress.setDescription('IP address of the adapter.')
ifSubnetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 5), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifSubnetMask.setStatus('mandatory')
if mibBuilder.loadTexts: ifSubnetMask.setDescription('IP subnet Mask of the adapter.')
ifPhysAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 6), PhysAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifPhysAddress.setStatus('mandatory')
if mibBuilder.loadTexts: ifPhysAddress.setDescription('MAC address of the adapter.')
ifPermPhysAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 7), PhysAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifPermPhysAddress.setStatus('mandatory')
if mibBuilder.loadTexts: ifPermPhysAddress.setDescription('Permanent MAC address of the adapter.')
ifLinkStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("link-up", 1), ("link-fail", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifLinkStatus.setStatus('mandatory')
if mibBuilder.loadTexts: ifLinkStatus.setDescription(' Adapter link status, this information only applicable to the Broadcom adapter')
ifState = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("normal-mode", 1), ("diagnotic-mode", 2), ("adapter-removed", 3), ("lowpower-mode", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifState.setStatus('mandatory')
if mibBuilder.loadTexts: ifState.setDescription('The operating mode of the driver, this information only applicable to the Broadcom adapter')
ifLineSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("unknown", 1), ("speed-10-Mbps", 2), ("speed-100-Mbps", 3), ("speed-1000-Mbps", 4), ("speed-2500-Mbps", 5), ("speed-10-Gbps", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifLineSpeed.setStatus('mandatory')
if mibBuilder.loadTexts: ifLineSpeed.setDescription(' The operating speed of the adapter, this information only applicable to the Broadcom adapter')
ifDuplexMode = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("half-duplex", 2), ("full-duplex", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifDuplexMode.setStatus('mandatory')
if mibBuilder.loadTexts: ifDuplexMode.setDescription(' Adapter duplex mode, this information only applicable to the Broadcom adapter')
ifMemBaseLow = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 12), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifMemBaseLow.setStatus('mandatory')
if mibBuilder.loadTexts: ifMemBaseLow.setDescription(' memory low range of the adapter, this information only applicable to the Broadcom adapter')
ifMemBaseHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 13), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifMemBaseHigh.setStatus('mandatory')
if mibBuilder.loadTexts: ifMemBaseHigh.setDescription(' memory high range of the adapter, this information only applicable to the Broadcom adapter')
ifInterrupt = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifInterrupt.setStatus('mandatory')
if mibBuilder.loadTexts: ifInterrupt.setDescription(' IRQ value for the adapter, this information only applicable to the Broadcom adapter')
ifBusNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 15), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifBusNumber.setStatus('mandatory')
if mibBuilder.loadTexts: ifBusNumber.setDescription(' PCI Bus Number where the Adapter is situated, this information only applicable to the Broadcom adapter')
ifDeviceNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 16), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifDeviceNumber.setStatus('mandatory')
if mibBuilder.loadTexts: ifDeviceNumber.setDescription(' PCI Device Number of the adapter, this information only applicable to the Broadcom adapter')
ifFunctionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 17), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifFunctionNumber.setStatus('mandatory')
if mibBuilder.loadTexts: ifFunctionNumber.setDescription(' PCI Function Number of the adapter, this information only applicable to the Broadcom adapter')
ifIpv6NetworkAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 18), InetAddressIPv6()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifIpv6NetworkAddress.setStatus('mandatory')
if mibBuilder.loadTexts: ifIpv6NetworkAddress.setDescription('IPv6 address of the adapter.')
mibBuilder.exportSymbols("Brcm-adapterInfo-MIB", InetAddressIPv4=InetAddressIPv4, baspTrap=baspTrap, ifState=ifState, ifFunctionNumber=ifFunctionNumber, ifName=ifName, ifBusNumber=ifBusNumber, ifEntry=ifEntry, ifPhysAddress=ifPhysAddress, baspStat=baspStat, ifMemBaseLow=ifMemBaseLow, ifNetworkAddress=ifNetworkAddress, ifDuplexMode=ifDuplexMode, ifLineSpeed=ifLineSpeed, ifSubnetMask=ifSubnetMask, ifNumber=ifNumber, ifControllers=ifControllers, ifIndex=ifIndex, ifDescr=ifDescr, broadcom=broadcom, ifPermPhysAddress=ifPermPhysAddress, ifInterrupt=ifInterrupt, InetAddressType=InetAddressType, baspConfig=baspConfig, ifTable=ifTable, ifLinkStatus=ifLinkStatus, basp=basp, InetAddress=InetAddress, InetAddressIPv6=InetAddressIPv6, ifIpv6NetworkAddress=ifIpv6NetworkAddress, ifMemBaseHigh=ifMemBaseHigh, ifDeviceNumber=ifDeviceNumber, enet=enet)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, constraints_union, constraints_intersection, value_size_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ValueRangeConstraint')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(bits, time_ticks, mib_identifier, counter32, ip_address, unsigned32, enterprises, gauge32, module_identity, object_identity, integer32, iso, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'TimeTicks', 'MibIdentifier', 'Counter32', 'IpAddress', 'Unsigned32', 'enterprises', 'Gauge32', 'ModuleIdentity', 'ObjectIdentity', 'Integer32', 'iso', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64')
(display_string, textual_convention, phys_address) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'PhysAddress')
broadcom = mib_identifier((1, 3, 6, 1, 4, 1, 4413))
enet = mib_identifier((1, 3, 6, 1, 4, 1, 4413, 1))
basp = mib_identifier((1, 3, 6, 1, 4, 1, 4413, 1, 2))
if_controllers = mib_identifier((1, 3, 6, 1, 4, 1, 4413, 1, 3))
basp_config = mib_identifier((1, 3, 6, 1, 4, 1, 4413, 1, 2, 1))
basp_stat = mib_identifier((1, 3, 6, 1, 4, 1, 4413, 1, 2, 2))
basp_trap = mib_identifier((1, 3, 6, 1, 4, 1, 4413, 1, 2, 3))
class Inetaddresstype(TextualConvention, Integer32):
description = 'A value that represents a type of Internet address. unknown(0) An unknown address type. This value MUST be used if the value of the corresponding InetAddress object is a zero-length string. It may also be used to indicate an IP address that is not in one of the formats defined below. ipv4(1) An IPv4 address as defined by the InetAddressIPv4 textual convention. ipv6(2) An IPv6 address as defined by the InetAddressIPv6 textual convention. ipv4z(3) A non-global IPv4 address including a zone index as defined by the InetAddressIPv4z textual convention. ipv6z(4) A non-global IPv6 address including a zone index as defined by the InetAddressIPv6z textual convention. dns(16) A DNS domain name as defined by the InetAddressDNS textual convention. Each definition of a concrete InetAddressType value must be accompanied by a definition of a textual convention for use with that InetAddressType. To support future extensions, the InetAddressType textual convention SHOULD NOT be sub-typed in object type definitions. It MAY be sub-typed in compliance statements in order to require only a subset of these address types for a compliant implementation. Implementations must ensure that InetAddressType objects and any dependent objects (e.g., InetAddress objects) are consistent. An inconsistentValue error must be generated if an attempt to change an InetAddressType object would, for example, lead to an undefined InetAddress value. In particular, InetAddressType/InetAddress pairs must be changed together if the address type changes (e.g., from ipv6(2) to ipv4(1)).'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 16))
named_values = named_values(('unknown', 0), ('ipv4', 1), ('ipv6', 2), ('ipv4z', 3), ('ipv6z', 4), ('dns', 16))
class Inetaddress(TextualConvention, OctetString):
description = "Denotes a generic Internet address. An InetAddress value is always interpreted within the context of an InetAddressType value. Every usage of the InetAddress textual convention is required to specify the InetAddressType object that provides the context. It is suggested that the InetAddressType object be logically registered before the object(s) that use the InetAddress textual convention, if they appear in the same logical row. The value of an InetAddress object must always be consistent with the value of the associated InetAddressType object. Attempts to set an InetAddress object to a value inconsistent with the associated InetAddressType must fail with an inconsistentValue error. When this textual convention is used as the syntax of an index object, there may be issues with the limit of 128 sub-identifiers specified in SMIv2, STD 58. In this case, the object definition MUST include a 'SIZE' clause to limit the number of potential instance sub-identifiers; otherwise the applicable constraints MUST be stated in the appropriate conceptual row DESCRIPTION clauses, or in the surrounding documentation if there is no single DESCRIPTION clause that is appropriate."
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 255)
class Inetaddressipv4(TextualConvention, OctetString):
description = 'Represents an IPv4 network address: Octets Contents Encoding 1-4 IPv4 address network-byte order The corresponding InetAddressType value is ipv4(1). This textual convention SHOULD NOT be used directly in object definitions, as it restricts addresses to a specific format. However, if it is used, it MAY be used either on its own or in conjunction with InetAddressType, as a pair.'
status = 'current'
display_hint = '1d.1d.1d.1d'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(4, 4)
fixed_length = 4
class Inetaddressipv6(TextualConvention, OctetString):
description = 'Represents an IPv6 network address: Octets Contents Encoding 1-16 IPv6 address network-byte order The corresponding InetAddressType value is ipv6(2). This textual convention SHOULD NOT be used directly in object definitions, as it restricts addresses to a specific format. However, if it is used, it MAY be used either on its own or in conjunction with InetAddressType, as a pair.'
status = 'current'
display_hint = '2x:2x:2x:2x:2x:2x:2x:2x'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(16, 16)
fixed_length = 16
if_number = mib_scalar((1, 3, 6, 1, 4, 1, 4413, 1, 3, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
ifNumber.setDescription('The number of Broadcom network interfaces (regardless of their current state) present on this system.')
if_table = mib_table((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2))
if mibBuilder.loadTexts:
ifTable.setStatus('mandatory')
if mibBuilder.loadTexts:
ifTable.setDescription('A list of Broadcom network interface entries. The number of entries is given by the ifNumber.')
if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1)).setIndexNames((0, 'Brcm-adapterInfo-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
ifEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
ifEntry.setDescription('An entry containing statistics objects of a Broadcom network interface in this system.')
if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
ifIndex.setDescription("An unique value for each Broadcom interface. The value for each interface must remain constant at least from one re-initialization of the entity's network management system to the next re- initialization.")
if_name = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifName.setStatus('mandatory')
if mibBuilder.loadTexts:
ifName.setDescription(' A textual string containing name of the adapter or team')
if_descr = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifDescr.setStatus('mandatory')
if mibBuilder.loadTexts:
ifDescr.setDescription(' A textual string containing the adapter or team description')
if_network_address = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 4), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifNetworkAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
ifNetworkAddress.setDescription('IP address of the adapter.')
if_subnet_mask = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 5), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifSubnetMask.setStatus('mandatory')
if mibBuilder.loadTexts:
ifSubnetMask.setDescription('IP subnet Mask of the adapter.')
if_phys_address = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 6), phys_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifPhysAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
ifPhysAddress.setDescription('MAC address of the adapter.')
if_perm_phys_address = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 7), phys_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifPermPhysAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
ifPermPhysAddress.setDescription('Permanent MAC address of the adapter.')
if_link_status = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('link-up', 1), ('link-fail', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifLinkStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
ifLinkStatus.setDescription(' Adapter link status, this information only applicable to the Broadcom adapter')
if_state = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('normal-mode', 1), ('diagnotic-mode', 2), ('adapter-removed', 3), ('lowpower-mode', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifState.setStatus('mandatory')
if mibBuilder.loadTexts:
ifState.setDescription('The operating mode of the driver, this information only applicable to the Broadcom adapter')
if_line_speed = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('unknown', 1), ('speed-10-Mbps', 2), ('speed-100-Mbps', 3), ('speed-1000-Mbps', 4), ('speed-2500-Mbps', 5), ('speed-10-Gbps', 6)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifLineSpeed.setStatus('mandatory')
if mibBuilder.loadTexts:
ifLineSpeed.setDescription(' The operating speed of the adapter, this information only applicable to the Broadcom adapter')
if_duplex_mode = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unknown', 1), ('half-duplex', 2), ('full-duplex', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifDuplexMode.setStatus('mandatory')
if mibBuilder.loadTexts:
ifDuplexMode.setDescription(' Adapter duplex mode, this information only applicable to the Broadcom adapter')
if_mem_base_low = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 12), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifMemBaseLow.setStatus('mandatory')
if mibBuilder.loadTexts:
ifMemBaseLow.setDescription(' memory low range of the adapter, this information only applicable to the Broadcom adapter')
if_mem_base_high = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 13), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifMemBaseHigh.setStatus('mandatory')
if mibBuilder.loadTexts:
ifMemBaseHigh.setDescription(' memory high range of the adapter, this information only applicable to the Broadcom adapter')
if_interrupt = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 14), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifInterrupt.setStatus('mandatory')
if mibBuilder.loadTexts:
ifInterrupt.setDescription(' IRQ value for the adapter, this information only applicable to the Broadcom adapter')
if_bus_number = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 15), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifBusNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
ifBusNumber.setDescription(' PCI Bus Number where the Adapter is situated, this information only applicable to the Broadcom adapter')
if_device_number = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 16), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifDeviceNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
ifDeviceNumber.setDescription(' PCI Device Number of the adapter, this information only applicable to the Broadcom adapter')
if_function_number = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 17), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifFunctionNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
ifFunctionNumber.setDescription(' PCI Function Number of the adapter, this information only applicable to the Broadcom adapter')
if_ipv6_network_address = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 3, 2, 1, 18), inet_address_i_pv6()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ifIpv6NetworkAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
ifIpv6NetworkAddress.setDescription('IPv6 address of the adapter.')
mibBuilder.exportSymbols('Brcm-adapterInfo-MIB', InetAddressIPv4=InetAddressIPv4, baspTrap=baspTrap, ifState=ifState, ifFunctionNumber=ifFunctionNumber, ifName=ifName, ifBusNumber=ifBusNumber, ifEntry=ifEntry, ifPhysAddress=ifPhysAddress, baspStat=baspStat, ifMemBaseLow=ifMemBaseLow, ifNetworkAddress=ifNetworkAddress, ifDuplexMode=ifDuplexMode, ifLineSpeed=ifLineSpeed, ifSubnetMask=ifSubnetMask, ifNumber=ifNumber, ifControllers=ifControllers, ifIndex=ifIndex, ifDescr=ifDescr, broadcom=broadcom, ifPermPhysAddress=ifPermPhysAddress, ifInterrupt=ifInterrupt, InetAddressType=InetAddressType, baspConfig=baspConfig, ifTable=ifTable, ifLinkStatus=ifLinkStatus, basp=basp, InetAddress=InetAddress, InetAddressIPv6=InetAddressIPv6, ifIpv6NetworkAddress=ifIpv6NetworkAddress, ifMemBaseHigh=ifMemBaseHigh, ifDeviceNumber=ifDeviceNumber, enet=enet) |
#grading system
print("grading system")
s=float(input("Enter marks of the student"))
if(s>90 and s<=100):
print("grade=A")
elif(s>80 and s<=90):
print("grade=B")
elif(s>70 and s<=80):
print("grade=c")
elif(s>60 and s<=70):
print("grade=d")
elif(s>50 and s<=60):
print("grade=e")
elif(s<40):
print("grade=fail")
else:
print("invalid input") | print('grading system')
s = float(input('Enter marks of the student'))
if s > 90 and s <= 100:
print('grade=A')
elif s > 80 and s <= 90:
print('grade=B')
elif s > 70 and s <= 80:
print('grade=c')
elif s > 60 and s <= 70:
print('grade=d')
elif s > 50 and s <= 60:
print('grade=e')
elif s < 40:
print('grade=fail')
else:
print('invalid input') |
result = ""
summe = 0
while(True):
nums = input().split(" ")
M = int(nums[0])
N = int(nums[1])
if(M <= 0 or N <= 0):
break
if(M > N):
for i in range(N,M+1):
result += str(i)+" "
summe += i
else:
for i in range(M,N+1):
result += str(i)+" "
summe += i
result += "Sum="+str(summe)
print(result)
result = ""
summe = 0 | result = ''
summe = 0
while True:
nums = input().split(' ')
m = int(nums[0])
n = int(nums[1])
if M <= 0 or N <= 0:
break
if M > N:
for i in range(N, M + 1):
result += str(i) + ' '
summe += i
else:
for i in range(M, N + 1):
result += str(i) + ' '
summe += i
result += 'Sum=' + str(summe)
print(result)
result = ''
summe = 0 |
n = int(input())
x = 1
for _ in range(n, 0, -1):
print(' '*_ + '*'*x)
x=x+2
_ = _-1
| n = int(input())
x = 1
for _ in range(n, 0, -1):
print(' ' * _ + '*' * x)
x = x + 2
_ = _ - 1 |
class Cat:
def __init__(self, name) -> None:
self.name = name
def __str__(self) -> str:
return f"Meow {self.name}!"
| class Cat:
def __init__(self, name) -> None:
self.name = name
def __str__(self) -> str:
return f'Meow {self.name}!' |
RECORDS =[
{
'name': 'Cluster 1',
'number_of_nodes': 5,
'node_type': 'm5.xlarge',
'region': 'us-west-1'
},
{
'name': 'Cluster 2',
'number_of_nodes': 6,
'node_type': 'm5.large',
'region': 'eu-west-1'
},
{
'name': 'Cluster 3',
'number_of_nodes': 13,
'node_type': 'm5.24xlarge',
'region': 'us-east-3'
},
{
'name': 'Cluster 4',
'number_of_nodes': 2,
'node_type': 'm4.xlarge',
'region': 'us-west-1'
},
{
'name': 'Cluster 5',
'number_of_nodes': 4,
'node_type': 't2.large',
'region': 'ap-northeast-1'
},
]
| records = [{'name': 'Cluster 1', 'number_of_nodes': 5, 'node_type': 'm5.xlarge', 'region': 'us-west-1'}, {'name': 'Cluster 2', 'number_of_nodes': 6, 'node_type': 'm5.large', 'region': 'eu-west-1'}, {'name': 'Cluster 3', 'number_of_nodes': 13, 'node_type': 'm5.24xlarge', 'region': 'us-east-3'}, {'name': 'Cluster 4', 'number_of_nodes': 2, 'node_type': 'm4.xlarge', 'region': 'us-west-1'}, {'name': 'Cluster 5', 'number_of_nodes': 4, 'node_type': 't2.large', 'region': 'ap-northeast-1'}] |
'''
Write a Python program print every second character(Even) from a string.
'''
string=input()
final=''
for i in range(1,len(string),2):
final+=string[i]
print(final) | """
Write a Python program print every second character(Even) from a string.
"""
string = input()
final = ''
for i in range(1, len(string), 2):
final += string[i]
print(final) |
# Bubble Sort
# Find the largest element A[i], reverse A[0:i+1], making the current largest at the head of the array, then reverse the whole array to make A[i] at the bottom.
# Do the above again and again, finally we'll have the whole array sorted.
# eg:
# [3,1,4,2] (input array)
# [4,1,3,2] -> [2,3,1,4] (current maximum 4 is placed at the bottom)
# [3,2,1,4] -> [1,2,3,4] (current maximum 3 is placed at the bottom)
# [2,1,3,4] -> [1,2,3,4] (current maximum 2 is placed at the bottom)
# [1,2,3,4] -> [1,2,3,4] (current maximum 1 is placed at the bottom)
# done!
class Solution:
def pancakeSort(self, arr: List[int]) -> List[int]:
n = len(arr)
res = []
for i in range(n):
# find max from first n-i elements
cur_max = max(arr[0:n-i])
j = 0
# find the index of this max value
while arr[j] != cur_max:
j += 1
# j is the index of the max value, there are j+1 elements until the max
# reverse first j+1 elements
arr[:j+1] = reversed(arr[:j+1])
res.append(j+1)
# reverse all first n - i elements
arr[:n-i] = reversed(arr[:n-i])
res.append(n-i)
return res
# Time: O(N^2)
# Space:O(N) | class Solution:
def pancake_sort(self, arr: List[int]) -> List[int]:
n = len(arr)
res = []
for i in range(n):
cur_max = max(arr[0:n - i])
j = 0
while arr[j] != cur_max:
j += 1
arr[:j + 1] = reversed(arr[:j + 1])
res.append(j + 1)
arr[:n - i] = reversed(arr[:n - i])
res.append(n - i)
return res |
def get_truncated_str(str_: str, _max_len: int = 80) -> str:
truncated_str = str_[:_max_len]
if len(str_) > _max_len:
return truncated_str[:-5] + '[...]'
return truncated_str
| def get_truncated_str(str_: str, _max_len: int=80) -> str:
truncated_str = str_[:_max_len]
if len(str_) > _max_len:
return truncated_str[:-5] + '[...]'
return truncated_str |
au_cities = (('Wollongong', 150.902, -34.4245),
('Shellharbour', 150.87, -34.5789),
('Thirroul', 150.924, -34.3147),
('Mittagong', 150.449, -34.4509),
('Batemans Bay', 150.175, -35.7082),
('Canberra', 144.963, -37.8143),
('Melbourne', 145.963, -37.8143),
('Sydney', 151.26071, -33.887034),
('Hobart', 147.33, -42.8827),
('Adelaide', 138.6, -34.9258),
('Hillsdale', 151.231341, -33.952685),
)
stx_cities = (('Downtown Houston', -95.363151, 29.763374),
('West University Place', -95.448601, 29.713803),
('Southside Place', -95.436920, 29.705777),
('Bellaire', -95.458732, 29.705614),
('Pearland', -95.287303, 29.563568),
('Galveston', -94.797489, 29.301336),
('Sealy', -96.156952, 29.780918),
('San Antonio', -98.493183, 29.424170),
('Saint Hedwig', -98.199820, 29.414197),
)
# Data from U.S. Census ZCTA cartographic boundary file for Texas (`zt48_d00.shp`).
stx_zips = (('77002', 'POLYGON ((-95.365015 29.772327, -95.362415 29.772327, -95.360915 29.771827, -95.354615 29.771827, -95.351515 29.772527, -95.350915 29.765327, -95.351015 29.762436, -95.350115 29.760328, -95.347515 29.758528, -95.352315 29.753928, -95.356415 29.756328, -95.358215 29.754028, -95.360215 29.756328, -95.363415 29.757128, -95.364014 29.75638, -95.363415 29.753928, -95.360015 29.751828, -95.361815 29.749528, -95.362715 29.750028, -95.367516 29.744128, -95.369316 29.745128, -95.373916 29.744128, -95.380116 29.738028, -95.387916 29.727929, -95.388516 29.729629, -95.387916 29.732129, -95.382916 29.737428, -95.376616 29.742228, -95.372616 29.747228, -95.378601 29.750846, -95.378616 29.752028, -95.378616 29.754428, -95.376016 29.754528, -95.374616 29.759828, -95.373616 29.761128, -95.371916 29.763928, -95.372316 29.768727, -95.365884 29.76791, -95.366015 29.767127, -95.358715 29.765327, -95.358615 29.766327, -95.359115 29.767227, -95.360215 29.767027, -95.362783 29.768267, -95.365315 29.770527, -95.365015 29.772327))'),
('77005', 'POLYGON ((-95.447918 29.727275, -95.428017 29.728729, -95.421117 29.729029, -95.418617 29.727629, -95.418517 29.726429, -95.402117 29.726629, -95.402117 29.725729, -95.395316 29.725729, -95.391916 29.726229, -95.389716 29.725829, -95.396517 29.715429, -95.397517 29.715929, -95.400917 29.711429, -95.411417 29.715029, -95.418417 29.714729, -95.418317 29.70623, -95.440818 29.70593, -95.445018 29.70683, -95.446618 29.70763, -95.447418 29.71003, -95.447918 29.727275))'),
('77025', 'POLYGON ((-95.418317 29.70623, -95.414717 29.706129, -95.414617 29.70533, -95.418217 29.70533, -95.419817 29.69533, -95.419484 29.694196, -95.417166 29.690901, -95.414517 29.69433, -95.413317 29.69263, -95.412617 29.68973, -95.412817 29.68753, -95.414087 29.685055, -95.419165 29.685428, -95.421617 29.68513, -95.425717 29.67983, -95.425017 29.67923, -95.424517 29.67763, -95.427418 29.67763, -95.438018 29.664631, -95.436713 29.664411, -95.440118 29.662231, -95.439218 29.661031, -95.437718 29.660131, -95.435718 29.659731, -95.431818 29.660331, -95.441418 29.656631, -95.441318 29.656331, -95.441818 29.656131, -95.441718 29.659031, -95.441118 29.661031, -95.446718 29.656431, -95.446518 29.673431, -95.446918 29.69013, -95.447418 29.71003, -95.446618 29.70763, -95.445018 29.70683, -95.440818 29.70593, -95.418317 29.70623))'),
('77401', 'POLYGON ((-95.447918 29.727275, -95.447418 29.71003, -95.446918 29.69013, -95.454318 29.68893, -95.475819 29.68903, -95.475819 29.69113, -95.484419 29.69103, -95.484519 29.69903, -95.480419 29.70133, -95.480419 29.69833, -95.474119 29.69833, -95.474119 29.70453, -95.472719 29.71283, -95.468019 29.71293, -95.468219 29.720229, -95.464018 29.720229, -95.464118 29.724529, -95.463018 29.725929, -95.459818 29.726129, -95.459918 29.720329, -95.451418 29.720429, -95.451775 29.726303, -95.451318 29.727029, -95.447918 29.727275))'),
)
interstates = (('I-25', 'LINESTRING(-104.4780170766108 36.66698791870694, -104.4468522338495 36.79925409393386, -104.46212692626 36.9372149776075, -104.5126119783768 37.08163268820887, -104.5247764602161 37.29300499892048, -104.7084397427668 37.49150259925398, -104.8126599016282 37.69514285621863, -104.8452887035466 37.87613395659479, -104.7160169341003 38.05951763337799, -104.6165437927668 38.30432045855106, -104.6437227858174 38.53979986564737, -104.7596170387259 38.7322907594295, -104.8380078676822 38.89998460604341, -104.8501253693506 39.09980189213358, -104.8791648316464 39.24368776457503, -104.8635041274215 39.3785278162751, -104.8894471170052 39.5929228239605, -104.9721242843344 39.69528482419685, -105.0112104500356 39.7273080432394, -105.0010368577104 39.76677607811571, -104.981835619 39.81466504121967, -104.9858891550477 39.88806911250832, -104.9873548059578 39.98117234571016, -104.9766220487419 40.09796423450692, -104.9818565932953 40.36056530662884, -104.9912746373997 40.74904484447656)'),
)
stx_interstates = (('I-10', 'LINESTRING(924952.5 4220931.6,925065.3 4220931.6,929568.4 4221057.8)'),
)
| au_cities = (('Wollongong', 150.902, -34.4245), ('Shellharbour', 150.87, -34.5789), ('Thirroul', 150.924, -34.3147), ('Mittagong', 150.449, -34.4509), ('Batemans Bay', 150.175, -35.7082), ('Canberra', 144.963, -37.8143), ('Melbourne', 145.963, -37.8143), ('Sydney', 151.26071, -33.887034), ('Hobart', 147.33, -42.8827), ('Adelaide', 138.6, -34.9258), ('Hillsdale', 151.231341, -33.952685))
stx_cities = (('Downtown Houston', -95.363151, 29.763374), ('West University Place', -95.448601, 29.713803), ('Southside Place', -95.43692, 29.705777), ('Bellaire', -95.458732, 29.705614), ('Pearland', -95.287303, 29.563568), ('Galveston', -94.797489, 29.301336), ('Sealy', -96.156952, 29.780918), ('San Antonio', -98.493183, 29.42417), ('Saint Hedwig', -98.19982, 29.414197))
stx_zips = (('77002', 'POLYGON ((-95.365015 29.772327, -95.362415 29.772327, -95.360915 29.771827, -95.354615 29.771827, -95.351515 29.772527, -95.350915 29.765327, -95.351015 29.762436, -95.350115 29.760328, -95.347515 29.758528, -95.352315 29.753928, -95.356415 29.756328, -95.358215 29.754028, -95.360215 29.756328, -95.363415 29.757128, -95.364014 29.75638, -95.363415 29.753928, -95.360015 29.751828, -95.361815 29.749528, -95.362715 29.750028, -95.367516 29.744128, -95.369316 29.745128, -95.373916 29.744128, -95.380116 29.738028, -95.387916 29.727929, -95.388516 29.729629, -95.387916 29.732129, -95.382916 29.737428, -95.376616 29.742228, -95.372616 29.747228, -95.378601 29.750846, -95.378616 29.752028, -95.378616 29.754428, -95.376016 29.754528, -95.374616 29.759828, -95.373616 29.761128, -95.371916 29.763928, -95.372316 29.768727, -95.365884 29.76791, -95.366015 29.767127, -95.358715 29.765327, -95.358615 29.766327, -95.359115 29.767227, -95.360215 29.767027, -95.362783 29.768267, -95.365315 29.770527, -95.365015 29.772327))'), ('77005', 'POLYGON ((-95.447918 29.727275, -95.428017 29.728729, -95.421117 29.729029, -95.418617 29.727629, -95.418517 29.726429, -95.402117 29.726629, -95.402117 29.725729, -95.395316 29.725729, -95.391916 29.726229, -95.389716 29.725829, -95.396517 29.715429, -95.397517 29.715929, -95.400917 29.711429, -95.411417 29.715029, -95.418417 29.714729, -95.418317 29.70623, -95.440818 29.70593, -95.445018 29.70683, -95.446618 29.70763, -95.447418 29.71003, -95.447918 29.727275))'), ('77025', 'POLYGON ((-95.418317 29.70623, -95.414717 29.706129, -95.414617 29.70533, -95.418217 29.70533, -95.419817 29.69533, -95.419484 29.694196, -95.417166 29.690901, -95.414517 29.69433, -95.413317 29.69263, -95.412617 29.68973, -95.412817 29.68753, -95.414087 29.685055, -95.419165 29.685428, -95.421617 29.68513, -95.425717 29.67983, -95.425017 29.67923, -95.424517 29.67763, -95.427418 29.67763, -95.438018 29.664631, -95.436713 29.664411, -95.440118 29.662231, -95.439218 29.661031, -95.437718 29.660131, -95.435718 29.659731, -95.431818 29.660331, -95.441418 29.656631, -95.441318 29.656331, -95.441818 29.656131, -95.441718 29.659031, -95.441118 29.661031, -95.446718 29.656431, -95.446518 29.673431, -95.446918 29.69013, -95.447418 29.71003, -95.446618 29.70763, -95.445018 29.70683, -95.440818 29.70593, -95.418317 29.70623))'), ('77401', 'POLYGON ((-95.447918 29.727275, -95.447418 29.71003, -95.446918 29.69013, -95.454318 29.68893, -95.475819 29.68903, -95.475819 29.69113, -95.484419 29.69103, -95.484519 29.69903, -95.480419 29.70133, -95.480419 29.69833, -95.474119 29.69833, -95.474119 29.70453, -95.472719 29.71283, -95.468019 29.71293, -95.468219 29.720229, -95.464018 29.720229, -95.464118 29.724529, -95.463018 29.725929, -95.459818 29.726129, -95.459918 29.720329, -95.451418 29.720429, -95.451775 29.726303, -95.451318 29.727029, -95.447918 29.727275))'))
interstates = (('I-25', 'LINESTRING(-104.4780170766108 36.66698791870694, -104.4468522338495 36.79925409393386, -104.46212692626 36.9372149776075, -104.5126119783768 37.08163268820887, -104.5247764602161 37.29300499892048, -104.7084397427668 37.49150259925398, -104.8126599016282 37.69514285621863, -104.8452887035466 37.87613395659479, -104.7160169341003 38.05951763337799, -104.6165437927668 38.30432045855106, -104.6437227858174 38.53979986564737, -104.7596170387259 38.7322907594295, -104.8380078676822 38.89998460604341, -104.8501253693506 39.09980189213358, -104.8791648316464 39.24368776457503, -104.8635041274215 39.3785278162751, -104.8894471170052 39.5929228239605, -104.9721242843344 39.69528482419685, -105.0112104500356 39.7273080432394, -105.0010368577104 39.76677607811571, -104.981835619 39.81466504121967, -104.9858891550477 39.88806911250832, -104.9873548059578 39.98117234571016, -104.9766220487419 40.09796423450692, -104.9818565932953 40.36056530662884, -104.9912746373997 40.74904484447656)'),)
stx_interstates = (('I-10', 'LINESTRING(924952.5 4220931.6,925065.3 4220931.6,929568.4 4221057.8)'),) |
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"get_pandas": "01_klass.ipynb",
"avled_tverrvar": "03_sporre.ipynb",
"df": "04_proc.ipynb",
"freq": "04_proc.ipynb"}
modules = ["klass.py",
"sporre.py",
"proc.py"]
doc_url = "https://statisticsnorway.github.io/ssb_fellesfunksjoner_360//ssb_fellesfunksjoner_360/"
git_url = "https://github.com/statisticsnorway/ssb_fellesfunksjoner_360/"
def custom_doc_links(name): return None
| __all__ = ['index', 'modules', 'custom_doc_links', 'git_url']
index = {'get_pandas': '01_klass.ipynb', 'avled_tverrvar': '03_sporre.ipynb', 'df': '04_proc.ipynb', 'freq': '04_proc.ipynb'}
modules = ['klass.py', 'sporre.py', 'proc.py']
doc_url = 'https://statisticsnorway.github.io/ssb_fellesfunksjoner_360//ssb_fellesfunksjoner_360/'
git_url = 'https://github.com/statisticsnorway/ssb_fellesfunksjoner_360/'
def custom_doc_links(name):
return None |
# tb retorna valores booleanos
set_1 = {1,2,3,4,5,6,7}
set_2 = {0,3,4,5,6,7,8,9}
set_3={1,2,3,4,7,0,9}
print(set_1)
print(set_2)
print(set_3)
set_4={77,33}
print(set_4)
print(set_2.isdisjoint(set_3))
print(set_3.isdisjoint(set_1))
print(set_3.isdisjoint(set_4)) | set_1 = {1, 2, 3, 4, 5, 6, 7}
set_2 = {0, 3, 4, 5, 6, 7, 8, 9}
set_3 = {1, 2, 3, 4, 7, 0, 9}
print(set_1)
print(set_2)
print(set_3)
set_4 = {77, 33}
print(set_4)
print(set_2.isdisjoint(set_3))
print(set_3.isdisjoint(set_1))
print(set_3.isdisjoint(set_4)) |
# fail history: I tried so much because memory limit error(MLE)
# it is better to process a number than a string
T = int(input())
def solution(N):
A = 0
B = 0
if N % 2 == 0:
A, B = N//2, N//2
else:
A, B = N//2+1, (N//2)
_A = A
_B = B
len_N = len(str(N))
for i in range(len_N):
if _A % 10 == 4 or _B % 10 == 4:
A += 2*10**i
B -= 2*10**i
_A //= 10
_B //= 10
return A, B
for i in range(1, T+1):
N = int(input())
A, B = solution(N)
print(f"Case #{i}: {A} {B}") | t = int(input())
def solution(N):
a = 0
b = 0
if N % 2 == 0:
(a, b) = (N // 2, N // 2)
else:
(a, b) = (N // 2 + 1, N // 2)
_a = A
_b = B
len_n = len(str(N))
for i in range(len_N):
if _A % 10 == 4 or _B % 10 == 4:
a += 2 * 10 ** i
b -= 2 * 10 ** i
_a //= 10
_b //= 10
return (A, B)
for i in range(1, T + 1):
n = int(input())
(a, b) = solution(N)
print(f'Case #{i}: {A} {B}') |
class Solution:
def reversePrefix(self, word: str, ch: str) -> str:
if(ch in word):
return ch+word.split(ch, 1)[0][::-1]+word.split(ch, 1)[1]
else:
return word
| class Solution:
def reverse_prefix(self, word: str, ch: str) -> str:
if ch in word:
return ch + word.split(ch, 1)[0][::-1] + word.split(ch, 1)[1]
else:
return word |
'''
QUESTION:
125. Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
Note: For the purpose of this problem, we define empty string as valid palindrome.
Example 1:
Input: "A man, a plan, a canal: Panama"
Output: true
Example 2:
Input: "race a car"
Output: false
'''
class Solution(object):
def isPalindrome(self, s):
char_list = []
for c in s:
if c.isalnum():
char_list.append(c)
left_index = 0
right_index = len(char_list) - 1
while (left_index < right_index):
if char_list[left_index].upper() != char_list[right_index].upper():
return False
else:
left_index += 1
right_index -= 1
return True
'''
Ideas/thoughts:
make a lst with the characters adding only alphanum
check if the left and right characters are equal
''' | """
QUESTION:
125. Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
Note: For the purpose of this problem, we define empty string as valid palindrome.
Example 1:
Input: "A man, a plan, a canal: Panama"
Output: true
Example 2:
Input: "race a car"
Output: false
"""
class Solution(object):
def is_palindrome(self, s):
char_list = []
for c in s:
if c.isalnum():
char_list.append(c)
left_index = 0
right_index = len(char_list) - 1
while left_index < right_index:
if char_list[left_index].upper() != char_list[right_index].upper():
return False
else:
left_index += 1
right_index -= 1
return True
'\nIdeas/thoughts:\nmake a lst with the characters adding only alphanum\ncheck if the left and right characters are equal\n\n' |
__author__ = "John Kirkham <kirkhamj@janelia.hhmi.org>"
__date__ = "$May 18, 2015 22:05:20 EDT$"
| __author__ = 'John Kirkham <kirkhamj@janelia.hhmi.org>'
__date__ = '$May 18, 2015 22:05:20 EDT$' |
#!/usr/bin/env python
#
# This is the Python 'module' that contains the
# disposition criteria for Yara and jq filters the scanner framework
# will work on. Each member is the name of a
# high fidelity detection.
#
# default - Modules that are always run on a returned buffer value
# triggers - List of tuples that are configured to drive the flow of execution
# as the file itself it scanned recursively. They consist of Yara rule names
# that (if evaluated to true) may then run zero, one or more modules and optionally
# set the alert flag.
# post_processor - List of tuples that are configured to capture observations
# concerning the JSON output. These consist of jq filters that ultimately produce
# a boolean value dictating if a given condition is true. If 'true' then the
# observation is captured and the alert flag is optionally set.
default = ['META_BASIC_INFO',
'EXTRACT_EMBEDDED',
'SCAN_YARA']
# STRUCTURE: List of tuples such that...
# Types: [('string', 'list', boolean'), ...]
# Variables: [('rule name', ['module_1' , 'module_2'] , 'alert_flag'), ...]
triggers = [('ft_zip', ['EXTRACT_ZIP'], False),
('ft_exe', ['META_PE'], False),
('ft_rar', ['EXTRACT_RAR'], False),
('ft_ole_cf', ['META_OLECF', 'EXTRACT_VBA_MACRO'], False),
('ft_pdf', ['META_PDF'], False),
('misc_ooxml_core_properties', ['META_OOXML'], False),
('ft_swf', ['EXTRACT_SWF'], False),
('misc_upx_packed_binary', ['EXTRACT_UPX'], False),
('ft_rtf', ['EXTRACT_RTF_OBJ'], False),
('ft_tar', ['EXTRACT_TAR'], False),
('ft_gzip', ['EXTRACT_GZIP'], False),
('misc_pe_signature', ['META_PE_SIGNATURE'], False),
('ft_cab', ['EXTRACT_CAB'], False),
('ft_elf', ['META_ELF'], False),
('ft_java_class', ['META_JAVA_CLASS'], False),
('misc_hexascii_pe_in_html', ['EXTRACT_HEXASCII_PE'], False),
('misc_no_dosmode_header', '', False),
('ft_macho', ['META_MACHO'], False),
]
# STRUCTURE: List of tuples such that...
# Types: [('string', 'string', boolean'), ...]
# Variables: [('jq script', 'observation' , 'alert_flag'), ...]
post_processor = [('one_module.jq', 'Only one kind of module was run on for this report.', False),
('no_yara_hits.jq', 'There doesn\'t appear to be any Yara signature hits for this scan.', False),
('exe_in_zip.jq', 'An executable was found inside a ZIP file.', False),
('embedded_sfx_rar_w_exe.jq', 'An embedded file contained a self-extracting RAR that itself contained an executable payload.', False),
('many_objects.jq', 'More than 10 unique objects were observed in this file.', False),
('vt_match_found.jq', 'At least one file was found to have results in VirusTotal\'s database.', False),
('vt_match_not_found.jq', 'There were no matches found when VirusTotal was queried.', False),
('macro_gt_five_suspicious.jq', 'A macro was found with more than five suspicious traits.', False),
('vt_broadbased_detections_found.jq', 'Some AV products have detected this as a PUP threat.', False),
('vt_exploit_detections_found.jq', 'Some AV products have detected this as an exploit.', False),
('more_than_ten_yara.jq', 'More than 10 unique Yara signatures fired when processing this file!', False),
('fresh_vt_scan.jq', 'One of the VirusTotal results contains an object that was scanned less than 24 hours ago.', False),
('pe_recently_compiled.jq', 'An executable has a compile time less than a week old.', False),
]
| default = ['META_BASIC_INFO', 'EXTRACT_EMBEDDED', 'SCAN_YARA']
triggers = [('ft_zip', ['EXTRACT_ZIP'], False), ('ft_exe', ['META_PE'], False), ('ft_rar', ['EXTRACT_RAR'], False), ('ft_ole_cf', ['META_OLECF', 'EXTRACT_VBA_MACRO'], False), ('ft_pdf', ['META_PDF'], False), ('misc_ooxml_core_properties', ['META_OOXML'], False), ('ft_swf', ['EXTRACT_SWF'], False), ('misc_upx_packed_binary', ['EXTRACT_UPX'], False), ('ft_rtf', ['EXTRACT_RTF_OBJ'], False), ('ft_tar', ['EXTRACT_TAR'], False), ('ft_gzip', ['EXTRACT_GZIP'], False), ('misc_pe_signature', ['META_PE_SIGNATURE'], False), ('ft_cab', ['EXTRACT_CAB'], False), ('ft_elf', ['META_ELF'], False), ('ft_java_class', ['META_JAVA_CLASS'], False), ('misc_hexascii_pe_in_html', ['EXTRACT_HEXASCII_PE'], False), ('misc_no_dosmode_header', '', False), ('ft_macho', ['META_MACHO'], False)]
post_processor = [('one_module.jq', 'Only one kind of module was run on for this report.', False), ('no_yara_hits.jq', "There doesn't appear to be any Yara signature hits for this scan.", False), ('exe_in_zip.jq', 'An executable was found inside a ZIP file.', False), ('embedded_sfx_rar_w_exe.jq', 'An embedded file contained a self-extracting RAR that itself contained an executable payload.', False), ('many_objects.jq', 'More than 10 unique objects were observed in this file.', False), ('vt_match_found.jq', "At least one file was found to have results in VirusTotal's database.", False), ('vt_match_not_found.jq', 'There were no matches found when VirusTotal was queried.', False), ('macro_gt_five_suspicious.jq', 'A macro was found with more than five suspicious traits.', False), ('vt_broadbased_detections_found.jq', 'Some AV products have detected this as a PUP threat.', False), ('vt_exploit_detections_found.jq', 'Some AV products have detected this as an exploit.', False), ('more_than_ten_yara.jq', 'More than 10 unique Yara signatures fired when processing this file!', False), ('fresh_vt_scan.jq', 'One of the VirusTotal results contains an object that was scanned less than 24 hours ago.', False), ('pe_recently_compiled.jq', 'An executable has a compile time less than a week old.', False)] |
# authorization user not abonement
class AutopaymentMailRu(object):
def __init__(self, driver):
self.driver = driver
def enter_email(self, user_name="autopayment@mail.ru"):
self.driver.find_element_by_xpath("//div/label[1]/input").send_keys(user_name)
def enter_password(self, password="123456"):
self.driver.find_element_by_xpath("//div/label[2]/input").send_keys(password)
# registration user buy subscription
class PaymentnotMailRu(object):
def __init__(self, driver):
self.driver = driver
def reg_enter_email(self, user_name="payment.not@mail.ru"):
self.driver.find_element_by_xpath("//div/label[1]/input").send_keys(user_name)
def reg_enter_password(self, password="123456"):
self.driver.find_element_by_xpath("//div/label[2]/input").send_keys(password)
# registration user with abonement
class PaymNotYandexRu(object):
def __init__(self, driver):
self.driver = driver
def reg_enter_email(self, user_name="paym.not@yandex.ru"):
self.driver.find_element_by_xpath("//div/label[1]/input").send_keys(user_name)
def reg_enter_password(self, password="123456"):
self.driver.find_element_by_xpath("//div/label[2]/input").send_keys(password)
def enter_email(self, user_name="paym.not@yandex.ru"):
self.driver.find_element_by_xpath("//div/label[1]/input").send_keys(user_name)
def enter_password(self, password="123456"):
self.driver.find_element_by_xpath("//div/label[2]/input").send_keys(password)
# registration user with abonement
class VratchGlavYandexRu(object):
def __init__(self, driver):
self.driver = driver
def reg_enter_email(self, user_name="vratch.glav@yandex.ru"):
self.driver.find_element_by_xpath("//div/label[1]/input").send_keys(user_name)
def reg_enter_password(self, password="123456"):
self.driver.find_element_by_xpath("//div/label[2]/input").send_keys(password)
def enter_email(self, user_name="vratch.glav@yandex.ru"):
self.driver.find_element_by_xpath("//div/label[1]/input").send_keys(user_name)
def enter_password(self, password="123456"):
self.driver.find_element_by_xpath("//div/label[2]/input").send_keys(password)
# authorization admin user
class Admin(object):
def __init__(self, driver):
self.driver = driver
def enter_email(self, user_name):
self.driver.find_element_by_name("user[email]").clear()
self.driver.find_element_by_name("user[email]").send_keys("%s" % user_name)
def enter_password(self, password):
self.driver.find_element_by_id("user_password").clear()
self.driver.find_element_by_id("user_password").send_keys("%s" % password)
class IuUseryopmail(object):
def __init__(self, driver):
self.driver = driver
def reg_enter_email(self, user_name="iuuser@yopmail.com"):
self.driver.find_element_by_xpath("//div/label[1]/input").send_keys(user_name)
def reg_enter_password(self, password="123456"):
self.driver.find_element_by_xpath("//div/label[2]/input").send_keys(password)
| class Autopaymentmailru(object):
def __init__(self, driver):
self.driver = driver
def enter_email(self, user_name='autopayment@mail.ru'):
self.driver.find_element_by_xpath('//div/label[1]/input').send_keys(user_name)
def enter_password(self, password='123456'):
self.driver.find_element_by_xpath('//div/label[2]/input').send_keys(password)
class Paymentnotmailru(object):
def __init__(self, driver):
self.driver = driver
def reg_enter_email(self, user_name='payment.not@mail.ru'):
self.driver.find_element_by_xpath('//div/label[1]/input').send_keys(user_name)
def reg_enter_password(self, password='123456'):
self.driver.find_element_by_xpath('//div/label[2]/input').send_keys(password)
class Paymnotyandexru(object):
def __init__(self, driver):
self.driver = driver
def reg_enter_email(self, user_name='paym.not@yandex.ru'):
self.driver.find_element_by_xpath('//div/label[1]/input').send_keys(user_name)
def reg_enter_password(self, password='123456'):
self.driver.find_element_by_xpath('//div/label[2]/input').send_keys(password)
def enter_email(self, user_name='paym.not@yandex.ru'):
self.driver.find_element_by_xpath('//div/label[1]/input').send_keys(user_name)
def enter_password(self, password='123456'):
self.driver.find_element_by_xpath('//div/label[2]/input').send_keys(password)
class Vratchglavyandexru(object):
def __init__(self, driver):
self.driver = driver
def reg_enter_email(self, user_name='vratch.glav@yandex.ru'):
self.driver.find_element_by_xpath('//div/label[1]/input').send_keys(user_name)
def reg_enter_password(self, password='123456'):
self.driver.find_element_by_xpath('//div/label[2]/input').send_keys(password)
def enter_email(self, user_name='vratch.glav@yandex.ru'):
self.driver.find_element_by_xpath('//div/label[1]/input').send_keys(user_name)
def enter_password(self, password='123456'):
self.driver.find_element_by_xpath('//div/label[2]/input').send_keys(password)
class Admin(object):
def __init__(self, driver):
self.driver = driver
def enter_email(self, user_name):
self.driver.find_element_by_name('user[email]').clear()
self.driver.find_element_by_name('user[email]').send_keys('%s' % user_name)
def enter_password(self, password):
self.driver.find_element_by_id('user_password').clear()
self.driver.find_element_by_id('user_password').send_keys('%s' % password)
class Iuuseryopmail(object):
def __init__(self, driver):
self.driver = driver
def reg_enter_email(self, user_name='iuuser@yopmail.com'):
self.driver.find_element_by_xpath('//div/label[1]/input').send_keys(user_name)
def reg_enter_password(self, password='123456'):
self.driver.find_element_by_xpath('//div/label[2]/input').send_keys(password) |
src = Split('''
port.c
portISR.c
port_aos.c
startup.c
panic.c
backtrace.c
vectors.S
os_cpu_a.S
''')
component = aos_component('andes', src)
component.add_global_includes('./include')
| src = split('\n port.c\n portISR.c\n port_aos.c\n\t\tstartup.c\n panic.c\n backtrace.c\n vectors.S\n os_cpu_a.S\n')
component = aos_component('andes', src)
component.add_global_includes('./include') |
class Solution:
def fourSum(self, nums: List[int], target: int) -> List[List[int]]:
def twoSum(i,j):
target2 = target - nums[i] - nums[j]
left = j+1
right = n-1
while left < right:
total = nums[left] + nums[right]
if total == target2:
result.append([nums[i], nums[j], nums[left], nums[right]])
left += 1
while left < right and nums[left] == nums[left-1]:
left += 1
elif total < target2:
left += 1
else:
right -= 1
nums.sort()
n = len(nums)
i=0
result = []
while i < n-3:
if i>0 and nums[i] == nums[i-1]:
i += 1
continue
j = i+1
while j < n-2:
if j > i+1 and nums[j] == nums[j-1]:
j+=1
continue
twoSum(i, j)
j+=1
i += 1
return result
| class Solution:
def four_sum(self, nums: List[int], target: int) -> List[List[int]]:
def two_sum(i, j):
target2 = target - nums[i] - nums[j]
left = j + 1
right = n - 1
while left < right:
total = nums[left] + nums[right]
if total == target2:
result.append([nums[i], nums[j], nums[left], nums[right]])
left += 1
while left < right and nums[left] == nums[left - 1]:
left += 1
elif total < target2:
left += 1
else:
right -= 1
nums.sort()
n = len(nums)
i = 0
result = []
while i < n - 3:
if i > 0 and nums[i] == nums[i - 1]:
i += 1
continue
j = i + 1
while j < n - 2:
if j > i + 1 and nums[j] == nums[j - 1]:
j += 1
continue
two_sum(i, j)
j += 1
i += 1
return result |
class CraigslistApartmentListing:
def __init__(self):
self.properties = {
"datapid": None,
"datetime": None,
"title": None,
"housing" : None,
"ft" : None,
"ad_url" : None,
"hood" : None,
"zipcode" : None,
"bedrooms" : None,
"bathrooms" : None,
"price" : None,
"map_location" : None
}
def __setitem__(self, key, value):
self.properties[key] = value
def __getitem__(self, key):
return self.properties[key]
def __str__(self):
retstr = "|".join(str(v).rstrip().lstrip() for v in self.properties.values())
return retstr
| class Craigslistapartmentlisting:
def __init__(self):
self.properties = {'datapid': None, 'datetime': None, 'title': None, 'housing': None, 'ft': None, 'ad_url': None, 'hood': None, 'zipcode': None, 'bedrooms': None, 'bathrooms': None, 'price': None, 'map_location': None}
def __setitem__(self, key, value):
self.properties[key] = value
def __getitem__(self, key):
return self.properties[key]
def __str__(self):
retstr = '|'.join((str(v).rstrip().lstrip() for v in self.properties.values()))
return retstr |
#!/usr/bin/env python3
def rev_str(inp):
str = ""
length = len(inp)
for i in range(length,0,-1):
str = str + inp[i]
return str
str = input("Enter a string:")
print(rev_str(str)) | def rev_str(inp):
str = ''
length = len(inp)
for i in range(length, 0, -1):
str = str + inp[i]
return str
str = input('Enter a string:')
print(rev_str(str)) |
t = int(input())
while t > 0:
t -= 1
n = int(input())
l = list(map(int, input().split()))
l_ = {}
for i in range(n):
for j in range(i, n):
ind_ = tuple(l[i:j+1])
if ind_ in l_:
l_[ind_]+=1
else:
l_[ind_]=1
l1= []
for i in l_:
l1.append(sum(i)*l_[i])
print(max(l1))
| t = int(input())
while t > 0:
t -= 1
n = int(input())
l = list(map(int, input().split()))
l_ = {}
for i in range(n):
for j in range(i, n):
ind_ = tuple(l[i:j + 1])
if ind_ in l_:
l_[ind_] += 1
else:
l_[ind_] = 1
l1 = []
for i in l_:
l1.append(sum(i) * l_[i])
print(max(l1)) |
SSID1 = 'AP1'
SALASANA1 = 'pass'
SSID2 = 'AP2'
SALASANA2 = 'word'
MQTT_SERVERI = 'raspi'
MQTT_PORTTI = '1883'
MQTT_KAYTTAJA = 'user'
MQTT_SALASANA = 'sala'
CLIENT_ID = "ESP32-kaasuanturi"
DHCP_NIMI = "ESP32-kaasuanturi"
MQ135_PINNI = 36
SISA_LAMPO = b'kanala/sisa/lampo'
SISA_KOSTEUS = b'kanala/sisa/kosteus'
SISA_PPM = b'kanala/sisa/ppm'
NTPPALVELIN = 'pool.ntp.org'
| ssid1 = 'AP1'
salasana1 = 'pass'
ssid2 = 'AP2'
salasana2 = 'word'
mqtt_serveri = 'raspi'
mqtt_portti = '1883'
mqtt_kayttaja = 'user'
mqtt_salasana = 'sala'
client_id = 'ESP32-kaasuanturi'
dhcp_nimi = 'ESP32-kaasuanturi'
mq135_pinni = 36
sisa_lampo = b'kanala/sisa/lampo'
sisa_kosteus = b'kanala/sisa/kosteus'
sisa_ppm = b'kanala/sisa/ppm'
ntppalvelin = 'pool.ntp.org' |
for _ in range(0,int(input())):
s = input()
es=""
os=""
for i in range(len(s)):
if i % 2 == 0:
es = es + s[i]
else:
os = os + s[i]
print(es,os) | for _ in range(0, int(input())):
s = input()
es = ''
os = ''
for i in range(len(s)):
if i % 2 == 0:
es = es + s[i]
else:
os = os + s[i]
print(es, os) |
class PC:
def __init__(self):
self.codigo = None
self.caracteristico = ''
self.sequencia = ''
self.descricao = ''
self.latitude = ''
self.longitude = ''
self.auxiliar = ''
self.chave = ''
self.tipo = ''
| class Pc:
def __init__(self):
self.codigo = None
self.caracteristico = ''
self.sequencia = ''
self.descricao = ''
self.latitude = ''
self.longitude = ''
self.auxiliar = ''
self.chave = ''
self.tipo = '' |
# -*- coding: utf_8 -*-
class Stack(object):
def __init__(self):
self.values = []
def __len__(self):
return len(self.values)
def push(self, value):
self.values.append(value)
def pop(self):
value = self.values[-1]
del self.values[-1]
return value
| class Stack(object):
def __init__(self):
self.values = []
def __len__(self):
return len(self.values)
def push(self, value):
self.values.append(value)
def pop(self):
value = self.values[-1]
del self.values[-1]
return value |
class Solution:
def __init__(self):
self.cache = {}
def fib(self, N: int) -> int:
if N in self.cache:
return self.cache[N]
if N < 2:
self.cache[N] = N
return N
self.cache[N] = self.fib(N - 1) + self.fib(N - 2)
return self.cache[N] | class Solution:
def __init__(self):
self.cache = {}
def fib(self, N: int) -> int:
if N in self.cache:
return self.cache[N]
if N < 2:
self.cache[N] = N
return N
self.cache[N] = self.fib(N - 1) + self.fib(N - 2)
return self.cache[N] |
# This module is used to map the old Python 2 names to the new names used in
# Python 3 for the pickle module. This needed to make pickle streams
# generated with Python 2 loadable by Python 3.
# This is a copy of lib2to3.fixes.fix_imports.MAPPING. We cannot import
# lib2to3 and use the mapping defined there, because lib2to3 uses pickle.
# Thus, this could cause the module to be imported recursively.
IMPORT_MAPPING = {
'StringIO': 'io',
'cStringIO': 'io',
'cPickle': 'pickle',
'__builtin__' : 'builtins',
'copy_reg': 'copyreg',
'Queue': 'queue',
'SocketServer': 'socketserver',
'ConfigParser': 'configparser',
'repr': 'reprlib',
'FileDialog': 'tkinter.filedialog',
'tkFileDialog': 'tkinter.filedialog',
'SimpleDialog': 'tkinter.simpledialog',
'tkSimpleDialog': 'tkinter.simpledialog',
'tkColorChooser': 'tkinter.colorchooser',
'tkCommonDialog': 'tkinter.commondialog',
'Dialog': 'tkinter.dialog',
'Tkdnd': 'tkinter.dnd',
'tkFont': 'tkinter.font',
'tkMessageBox': 'tkinter.messagebox',
'ScrolledText': 'tkinter.scrolledtext',
'Tkconstants': 'tkinter.constants',
'Tix': 'tkinter.tix',
'ttk': 'tkinter.ttk',
'Tkinter': 'tkinter',
'markupbase': '_markupbase',
'_winreg': 'winreg',
'thread': '_thread',
'dummy_thread': '_dummy_thread',
'dbhash': 'dbm.bsd',
'dumbdbm': 'dbm.dumb',
'dbm': 'dbm.ndbm',
'gdbm': 'dbm.gnu',
'xmlrpclib': 'xmlrpc.client',
'DocXMLRPCServer': 'xmlrpc.server',
'SimpleXMLRPCServer': 'xmlrpc.server',
'httplib': 'http.client',
'htmlentitydefs' : 'html.entities',
'HTMLParser' : 'html.parser',
'Cookie': 'http.cookies',
'cookielib': 'http.cookiejar',
'BaseHTTPServer': 'http.server',
'SimpleHTTPServer': 'http.server',
'CGIHTTPServer': 'http.server',
'test.test_support': 'test.support',
'commands': 'subprocess',
'UserString' : 'collections',
'UserList' : 'collections',
'urlparse' : 'urllib.parse',
'robotparser' : 'urllib.robotparser',
'whichdb': 'dbm',
'anydbm': 'dbm'
}
# This contains rename rules that are easy to handle. We ignore the more
# complex stuff (e.g. mapping the names in the urllib and types modules).
# These rules should be run before import names are fixed.
NAME_MAPPING = {
('__builtin__', 'xrange'): ('builtins', 'range'),
('__builtin__', 'reduce'): ('functools', 'reduce'),
('__builtin__', 'intern'): ('sys', 'intern'),
('__builtin__', 'unichr'): ('builtins', 'chr'),
('__builtin__', 'basestring'): ('builtins', 'str'),
('__builtin__', 'long'): ('builtins', 'int'),
('itertools', 'izip'): ('builtins', 'zip'),
('itertools', 'imap'): ('builtins', 'map'),
('itertools', 'ifilter'): ('builtins', 'filter'),
('itertools', 'ifilterfalse'): ('itertools', 'filterfalse'),
}
# Same, but for 3.x to 2.x
REVERSE_IMPORT_MAPPING = dict((v, k) for (k, v) in IMPORT_MAPPING.items())
REVERSE_NAME_MAPPING = dict((v, k) for (k, v) in NAME_MAPPING.items())
| import_mapping = {'StringIO': 'io', 'cStringIO': 'io', 'cPickle': 'pickle', '__builtin__': 'builtins', 'copy_reg': 'copyreg', 'Queue': 'queue', 'SocketServer': 'socketserver', 'ConfigParser': 'configparser', 'repr': 'reprlib', 'FileDialog': 'tkinter.filedialog', 'tkFileDialog': 'tkinter.filedialog', 'SimpleDialog': 'tkinter.simpledialog', 'tkSimpleDialog': 'tkinter.simpledialog', 'tkColorChooser': 'tkinter.colorchooser', 'tkCommonDialog': 'tkinter.commondialog', 'Dialog': 'tkinter.dialog', 'Tkdnd': 'tkinter.dnd', 'tkFont': 'tkinter.font', 'tkMessageBox': 'tkinter.messagebox', 'ScrolledText': 'tkinter.scrolledtext', 'Tkconstants': 'tkinter.constants', 'Tix': 'tkinter.tix', 'ttk': 'tkinter.ttk', 'Tkinter': 'tkinter', 'markupbase': '_markupbase', '_winreg': 'winreg', 'thread': '_thread', 'dummy_thread': '_dummy_thread', 'dbhash': 'dbm.bsd', 'dumbdbm': 'dbm.dumb', 'dbm': 'dbm.ndbm', 'gdbm': 'dbm.gnu', 'xmlrpclib': 'xmlrpc.client', 'DocXMLRPCServer': 'xmlrpc.server', 'SimpleXMLRPCServer': 'xmlrpc.server', 'httplib': 'http.client', 'htmlentitydefs': 'html.entities', 'HTMLParser': 'html.parser', 'Cookie': 'http.cookies', 'cookielib': 'http.cookiejar', 'BaseHTTPServer': 'http.server', 'SimpleHTTPServer': 'http.server', 'CGIHTTPServer': 'http.server', 'test.test_support': 'test.support', 'commands': 'subprocess', 'UserString': 'collections', 'UserList': 'collections', 'urlparse': 'urllib.parse', 'robotparser': 'urllib.robotparser', 'whichdb': 'dbm', 'anydbm': 'dbm'}
name_mapping = {('__builtin__', 'xrange'): ('builtins', 'range'), ('__builtin__', 'reduce'): ('functools', 'reduce'), ('__builtin__', 'intern'): ('sys', 'intern'), ('__builtin__', 'unichr'): ('builtins', 'chr'), ('__builtin__', 'basestring'): ('builtins', 'str'), ('__builtin__', 'long'): ('builtins', 'int'), ('itertools', 'izip'): ('builtins', 'zip'), ('itertools', 'imap'): ('builtins', 'map'), ('itertools', 'ifilter'): ('builtins', 'filter'), ('itertools', 'ifilterfalse'): ('itertools', 'filterfalse')}
reverse_import_mapping = dict(((v, k) for (k, v) in IMPORT_MAPPING.items()))
reverse_name_mapping = dict(((v, k) for (k, v) in NAME_MAPPING.items())) |
class Solution:
def findRadius(self, houses: List[int], heaters: List[int]) -> int:
houses.sort()
heaters.sort()
heaters = [float('-inf')] + heaters
p = 0
res = 0
for i in range(len(houses)):
h = houses[i]
while p+1 < len(heaters)-1 and heaters[p+1] < h:
p += 1
res = max(res, min(abs(h-heaters[p]), abs(heaters[p+1] - h)))
return res | class Solution:
def find_radius(self, houses: List[int], heaters: List[int]) -> int:
houses.sort()
heaters.sort()
heaters = [float('-inf')] + heaters
p = 0
res = 0
for i in range(len(houses)):
h = houses[i]
while p + 1 < len(heaters) - 1 and heaters[p + 1] < h:
p += 1
res = max(res, min(abs(h - heaters[p]), abs(heaters[p + 1] - h)))
return res |
def factorial(num):
if num >= 0:
if num == 0:
return 1
return num * factorial(num -1)
else:
return -1 | def factorial(num):
if num >= 0:
if num == 0:
return 1
return num * factorial(num - 1)
else:
return -1 |
#Written by: Karim shoair - D4Vinci ( Dr0p1t-Framework )
#This module aims to run vbs scripts
#Start
def F522F(tobe):
f = open("SMB_Service.vbs","w")
f.write(tobe)
f.write("\nDim objShell")
f.write('\nSet objShell = WScript.CreateObject ("WScript.shell")')
f.write('\nobjShell.run "cmd /c break>SMB_Service.vbs && DEL SMB_Service.vbs"')
f.close()
c = subprocess.Popen("wscript.exe SMB_Service.vbs >> NUL",shell=True)
F522F(Vbs_Script_Data)
| def f522_f(tobe):
f = open('SMB_Service.vbs', 'w')
f.write(tobe)
f.write('\nDim objShell')
f.write('\nSet objShell = WScript.CreateObject ("WScript.shell")')
f.write('\nobjShell.run "cmd /c break>SMB_Service.vbs && DEL SMB_Service.vbs"')
f.close()
c = subprocess.Popen('wscript.exe SMB_Service.vbs >> NUL', shell=True)
f522_f(Vbs_Script_Data) |
def get_power_set(numbers):
if len(numbers) == 0:
return [set([])]
power_set = list()
current_number = numbers[0]
child_power_set = get_power_set(numbers[1:])
power_set.extend(child_power_set)
for child_set in child_power_set:
new_set = child_set.copy()
new_set.add(current_number)
power_set.append(new_set)
return power_set
assert get_power_set([]) == [set()]
assert get_power_set([1]) == [set(), {1}]
assert get_power_set([1, 2]) == [set(), {2}, {1}, {1, 2}]
assert get_power_set([1, 2, 3]) == [
set(), {3}, {2}, {2, 3}, {1}, {1, 3}, {1, 2}, {1, 2, 3}]
assert get_power_set([1, 2, 3, 4]) == [
set(), {4}, {3}, {3, 4}, {2}, {2, 4}, {2, 3}, {2, 3, 4}, {1}, {1, 4},
{1, 3}, {1, 3, 4}, {1, 2}, {1, 2, 4}, {1, 2, 3}, {1, 2, 3, 4}]
| def get_power_set(numbers):
if len(numbers) == 0:
return [set([])]
power_set = list()
current_number = numbers[0]
child_power_set = get_power_set(numbers[1:])
power_set.extend(child_power_set)
for child_set in child_power_set:
new_set = child_set.copy()
new_set.add(current_number)
power_set.append(new_set)
return power_set
assert get_power_set([]) == [set()]
assert get_power_set([1]) == [set(), {1}]
assert get_power_set([1, 2]) == [set(), {2}, {1}, {1, 2}]
assert get_power_set([1, 2, 3]) == [set(), {3}, {2}, {2, 3}, {1}, {1, 3}, {1, 2}, {1, 2, 3}]
assert get_power_set([1, 2, 3, 4]) == [set(), {4}, {3}, {3, 4}, {2}, {2, 4}, {2, 3}, {2, 3, 4}, {1}, {1, 4}, {1, 3}, {1, 3, 4}, {1, 2}, {1, 2, 4}, {1, 2, 3}, {1, 2, 3, 4}] |
def glyphs():
return 96
_font =\
b'\x00\x4a\x5a\x21\x4d\x58\x56\x46\x55\x46\x54\x47\x52\x54\x20'\
b'\x52\x56\x47\x55\x47\x52\x54\x20\x52\x56\x47\x56\x48\x52\x54'\
b'\x20\x52\x56\x46\x57\x47\x57\x48\x52\x54\x20\x52\x50\x58\x4f'\
b'\x59\x4f\x5a\x50\x5b\x51\x5b\x52\x5a\x52\x59\x51\x58\x50\x58'\
b'\x20\x52\x50\x59\x50\x5a\x51\x5a\x51\x59\x50\x59\x0b\x49\x5b'\
b'\x50\x46\x4e\x4d\x20\x52\x51\x46\x4e\x4d\x20\x52\x59\x46\x57'\
b'\x4d\x20\x52\x5a\x46\x57\x4d\x0b\x48\x5d\x53\x42\x4c\x62\x20'\
b'\x52\x59\x42\x52\x62\x20\x52\x4c\x4f\x5a\x4f\x20\x52\x4b\x55'\
b'\x59\x55\x33\x48\x5d\x54\x42\x4c\x5f\x20\x52\x59\x42\x51\x5f'\
b'\x20\x52\x5a\x4b\x5a\x4a\x59\x4a\x59\x4c\x5b\x4c\x5b\x4a\x5a'\
b'\x48\x59\x47\x56\x46\x52\x46\x4f\x47\x4d\x49\x4d\x4c\x4e\x4e'\
b'\x50\x50\x56\x53\x57\x55\x57\x58\x56\x5a\x20\x52\x4e\x4c\x4f'\
b'\x4e\x56\x52\x57\x54\x20\x52\x4f\x47\x4e\x49\x4e\x4b\x4f\x4d'\
b'\x55\x50\x57\x52\x58\x54\x58\x57\x57\x59\x56\x5a\x53\x5b\x4f'\
b'\x5b\x4c\x5a\x4b\x59\x4a\x57\x4a\x55\x4c\x55\x4c\x57\x4b\x57'\
b'\x4b\x56\x1f\x46\x5e\x5b\x46\x49\x5b\x20\x52\x4e\x46\x50\x48'\
b'\x50\x4a\x4f\x4c\x4d\x4d\x4b\x4d\x49\x4b\x49\x49\x4a\x47\x4c'\
b'\x46\x4e\x46\x50\x47\x53\x48\x56\x48\x59\x47\x5b\x46\x20\x52'\
b'\x57\x54\x55\x55\x54\x57\x54\x59\x56\x5b\x58\x5b\x5a\x5a\x5b'\
b'\x58\x5b\x56\x59\x54\x57\x54\x47\x45\x5f\x5c\x4f\x5c\x4e\x5b'\
b'\x4e\x5b\x50\x5d\x50\x5d\x4e\x5c\x4d\x5b\x4d\x59\x4e\x57\x50'\
b'\x52\x58\x50\x5a\x4e\x5b\x4b\x5b\x48\x5a\x47\x58\x47\x56\x48'\
b'\x54\x49\x53\x4b\x52\x50\x50\x52\x4f\x54\x4d\x55\x4b\x55\x49'\
b'\x54\x47\x52\x46\x50\x47\x4f\x49\x4f\x4c\x50\x52\x51\x55\x52'\
b'\x57\x54\x5a\x56\x5b\x58\x5b\x59\x59\x59\x58\x20\x52\x4c\x5b'\
b'\x48\x5a\x20\x52\x49\x5a\x48\x58\x48\x56\x49\x54\x4a\x53\x4c'\
b'\x52\x20\x52\x50\x50\x51\x53\x54\x59\x56\x5a\x20\x52\x4b\x5b'\
b'\x4a\x5a\x49\x58\x49\x56\x4a\x54\x4b\x53\x4d\x52\x52\x4f\x20'\
b'\x52\x4f\x4c\x50\x4f\x51\x52\x53\x56\x55\x59\x57\x5a\x58\x5a'\
b'\x59\x59\x05\x4e\x57\x55\x46\x53\x4d\x20\x52\x56\x46\x53\x4d'\
b'\x1f\x4a\x5a\x5a\x42\x58\x43\x55\x45\x52\x48\x50\x4b\x4e\x4f'\
b'\x4d\x53\x4d\x58\x4e\x5c\x4f\x5f\x51\x62\x20\x52\x53\x48\x51'\
b'\x4b\x4f\x4f\x4e\x54\x4e\x5c\x20\x52\x5a\x42\x57\x44\x54\x47'\
b'\x52\x4a\x51\x4c\x50\x4f\x4f\x53\x4e\x5c\x20\x52\x4e\x54\x4f'\
b'\x5d\x50\x60\x51\x62\x1f\x4a\x5a\x53\x42\x55\x45\x56\x48\x57'\
b'\x4c\x57\x51\x56\x55\x54\x59\x52\x5c\x4f\x5f\x4c\x61\x4a\x62'\
b'\x20\x52\x56\x48\x56\x50\x55\x55\x53\x59\x51\x5c\x20\x52\x53'\
b'\x42\x54\x44\x55\x47\x56\x50\x20\x52\x56\x48\x55\x51\x54\x55'\
b'\x53\x58\x52\x5a\x50\x5d\x4d\x60\x4a\x62\x26\x4a\x5b\x54\x46'\
b'\x53\x47\x55\x51\x54\x52\x20\x52\x54\x46\x54\x52\x20\x52\x54'\
b'\x46\x55\x47\x53\x51\x54\x52\x20\x52\x4f\x49\x50\x49\x58\x4f'\
b'\x59\x4f\x20\x52\x4f\x49\x59\x4f\x20\x52\x4f\x49\x4f\x4a\x59'\
b'\x4e\x59\x4f\x20\x52\x59\x49\x58\x49\x50\x4f\x4f\x4f\x20\x52'\
b'\x59\x49\x4f\x4f\x20\x52\x59\x49\x59\x4a\x4f\x4e\x4f\x4f\x0f'\
b'\x46\x5f\x52\x49\x52\x5a\x53\x5a\x20\x52\x52\x49\x53\x49\x53'\
b'\x5a\x20\x52\x4a\x51\x5b\x51\x5b\x52\x20\x52\x4a\x51\x4a\x52'\
b'\x5b\x52\x15\x4d\x58\x51\x5b\x50\x5b\x4f\x5a\x4f\x59\x50\x58'\
b'\x51\x58\x52\x59\x52\x5b\x51\x5d\x50\x5e\x4e\x5f\x20\x52\x50'\
b'\x59\x50\x5a\x51\x5a\x51\x59\x50\x59\x20\x52\x51\x5b\x51\x5c'\
b'\x50\x5e\x02\x45\x5f\x49\x52\x5b\x52\x0f\x4d\x58\x50\x58\x4f'\
b'\x59\x4f\x5a\x50\x5b\x51\x5b\x52\x5a\x52\x59\x51\x58\x50\x58'\
b'\x20\x52\x50\x59\x50\x5a\x51\x5a\x51\x59\x50\x59\x07\x47\x5e'\
b'\x5b\x42\x49\x62\x4a\x62\x20\x52\x5b\x42\x5c\x42\x4a\x62\x39'\
b'\x48\x5d\x54\x46\x51\x47\x4f\x49\x4d\x4c\x4c\x4f\x4b\x53\x4b'\
b'\x56\x4c\x59\x4d\x5a\x4f\x5b\x51\x5b\x54\x5a\x56\x58\x58\x55'\
b'\x59\x52\x5a\x4e\x5a\x4b\x59\x48\x58\x47\x56\x46\x54\x46\x20'\
b'\x52\x51\x48\x4f\x4a\x4e\x4c\x4d\x4f\x4c\x53\x4c\x57\x4d\x59'\
b'\x20\x52\x54\x59\x56\x57\x57\x55\x58\x52\x59\x4e\x59\x4a\x58'\
b'\x48\x20\x52\x54\x46\x52\x47\x50\x4a\x4f\x4c\x4e\x4f\x4d\x53'\
b'\x4d\x58\x4e\x5a\x4f\x5b\x20\x52\x51\x5b\x53\x5a\x55\x57\x56'\
b'\x55\x57\x52\x58\x4e\x58\x49\x57\x47\x56\x46\x13\x48\x5d\x54'\
b'\x4a\x4f\x5b\x51\x5b\x20\x52\x57\x46\x55\x4a\x50\x5b\x20\x52'\
b'\x57\x46\x51\x5b\x20\x52\x57\x46\x54\x49\x51\x4b\x4f\x4c\x20'\
b'\x52\x54\x4a\x52\x4b\x4f\x4c\x33\x48\x5d\x4f\x4b\x4f\x4a\x50'\
b'\x4a\x50\x4c\x4e\x4c\x4e\x4a\x4f\x48\x50\x47\x53\x46\x56\x46'\
b'\x59\x47\x5a\x49\x5a\x4b\x59\x4d\x57\x4f\x4d\x55\x4b\x57\x49'\
b'\x5b\x20\x52\x58\x47\x59\x49\x59\x4b\x58\x4d\x56\x4f\x53\x51'\
b'\x20\x52\x56\x46\x57\x47\x58\x49\x58\x4b\x57\x4d\x55\x4f\x4d'\
b'\x55\x20\x52\x4a\x59\x4b\x58\x4d\x58\x52\x59\x57\x59\x58\x58'\
b'\x20\x52\x4d\x58\x52\x5a\x57\x5a\x20\x52\x4d\x58\x52\x5b\x55'\
b'\x5b\x57\x5a\x58\x58\x58\x57\x3f\x48\x5d\x4f\x4b\x4f\x4a\x50'\
b'\x4a\x50\x4c\x4e\x4c\x4e\x4a\x4f\x48\x50\x47\x53\x46\x56\x46'\
b'\x59\x47\x5a\x49\x5a\x4b\x59\x4d\x58\x4e\x56\x4f\x53\x50\x20'\
b'\x52\x58\x47\x59\x49\x59\x4b\x58\x4d\x57\x4e\x20\x52\x56\x46'\
b'\x57\x47\x58\x49\x58\x4b\x57\x4d\x55\x4f\x53\x50\x20\x52\x51'\
b'\x50\x53\x50\x56\x51\x57\x52\x58\x54\x58\x57\x57\x59\x55\x5a'\
b'\x52\x5b\x4f\x5b\x4c\x5a\x4b\x59\x4a\x57\x4a\x55\x4c\x55\x4c'\
b'\x57\x4b\x57\x4b\x56\x20\x52\x56\x52\x57\x54\x57\x57\x56\x59'\
b'\x20\x52\x53\x50\x55\x51\x56\x53\x56\x57\x55\x59\x54\x5a\x52'\
b'\x5b\x0e\x48\x5d\x57\x4a\x52\x5b\x54\x5b\x20\x52\x5a\x46\x58'\
b'\x4a\x53\x5b\x20\x52\x5a\x46\x54\x5b\x20\x52\x5a\x46\x4a\x55'\
b'\x5a\x55\x30\x48\x5d\x51\x46\x4c\x50\x20\x52\x51\x46\x5b\x46'\
b'\x20\x52\x51\x47\x59\x47\x20\x52\x50\x48\x55\x48\x59\x47\x5b'\
b'\x46\x20\x52\x4c\x50\x4d\x4f\x50\x4e\x53\x4e\x56\x4f\x57\x50'\
b'\x58\x52\x58\x55\x57\x58\x55\x5a\x51\x5b\x4e\x5b\x4c\x5a\x4b'\
b'\x59\x4a\x57\x4a\x55\x4c\x55\x4c\x57\x4b\x57\x4b\x56\x20\x52'\
b'\x56\x50\x57\x52\x57\x55\x56\x58\x54\x5a\x20\x52\x53\x4e\x55'\
b'\x4f\x56\x51\x56\x55\x55\x58\x53\x5a\x51\x5b\x3c\x48\x5d\x59'\
b'\x4a\x59\x49\x58\x49\x58\x4b\x5a\x4b\x5a\x49\x59\x47\x57\x46'\
b'\x54\x46\x51\x47\x4f\x49\x4d\x4c\x4c\x4f\x4b\x53\x4b\x56\x4c'\
b'\x59\x4d\x5a\x4f\x5b\x52\x5b\x55\x5a\x57\x58\x58\x56\x58\x53'\
b'\x57\x51\x56\x50\x54\x4f\x51\x4f\x4f\x50\x4e\x51\x4d\x53\x20'\
b'\x52\x50\x49\x4e\x4c\x4d\x4f\x4c\x53\x4c\x57\x4d\x59\x20\x52'\
b'\x56\x58\x57\x56\x57\x53\x56\x51\x20\x52\x54\x46\x52\x47\x50'\
b'\x4a\x4f\x4c\x4e\x4f\x4d\x53\x4d\x58\x4e\x5a\x4f\x5b\x20\x52'\
b'\x52\x5b\x54\x5a\x55\x59\x56\x56\x56\x52\x55\x50\x54\x4f\x26'\
b'\x48\x5d\x4e\x46\x4c\x4c\x20\x52\x5b\x46\x5a\x49\x58\x4c\x54'\
b'\x51\x52\x54\x51\x57\x50\x5b\x20\x52\x52\x53\x50\x57\x4f\x5b'\
b'\x20\x52\x58\x4c\x52\x52\x50\x55\x4f\x57\x4e\x5b\x50\x5b\x20'\
b'\x52\x4d\x49\x50\x46\x52\x46\x57\x49\x20\x52\x4f\x47\x52\x47'\
b'\x57\x49\x20\x52\x4d\x49\x4f\x48\x52\x48\x57\x49\x59\x49\x5a'\
b'\x48\x5b\x46\x67\x48\x5d\x53\x46\x50\x47\x4f\x48\x4e\x4a\x4e'\
b'\x4d\x4f\x4f\x51\x50\x54\x50\x57\x4f\x59\x4e\x5a\x4c\x5a\x49'\
b'\x59\x47\x57\x46\x53\x46\x20\x52\x55\x46\x50\x47\x20\x52\x50'\
b'\x48\x4f\x4a\x4f\x4e\x50\x4f\x20\x52\x4f\x4f\x52\x50\x20\x52'\
b'\x53\x50\x57\x4f\x20\x52\x58\x4e\x59\x4c\x59\x49\x58\x47\x20'\
b'\x52\x59\x47\x55\x46\x20\x52\x53\x46\x51\x48\x50\x4a\x50\x4e'\
b'\x51\x50\x20\x52\x54\x50\x56\x4f\x57\x4e\x58\x4c\x58\x48\x57'\
b'\x46\x20\x52\x51\x50\x4d\x51\x4b\x53\x4a\x55\x4a\x58\x4b\x5a'\
b'\x4e\x5b\x52\x5b\x56\x5a\x57\x59\x58\x57\x58\x54\x57\x52\x56'\
b'\x51\x54\x50\x20\x52\x52\x50\x4d\x51\x20\x52\x4e\x51\x4c\x53'\
b'\x4b\x55\x4b\x58\x4c\x5a\x20\x52\x4b\x5a\x50\x5b\x56\x5a\x20'\
b'\x52\x56\x59\x57\x57\x57\x54\x56\x52\x20\x52\x56\x51\x53\x50'\
b'\x20\x52\x51\x50\x4f\x51\x4d\x53\x4c\x55\x4c\x58\x4d\x5a\x4e'\
b'\x5b\x20\x52\x52\x5b\x54\x5a\x55\x59\x56\x57\x56\x53\x55\x51'\
b'\x54\x50\x3c\x48\x5d\x58\x4e\x57\x50\x56\x51\x54\x52\x51\x52'\
b'\x4f\x51\x4e\x50\x4d\x4e\x4d\x4b\x4e\x49\x50\x47\x53\x46\x56'\
b'\x46\x58\x47\x59\x48\x5a\x4b\x5a\x4e\x59\x52\x58\x55\x56\x58'\
b'\x54\x5a\x51\x5b\x4e\x5b\x4c\x5a\x4b\x58\x4b\x56\x4d\x56\x4d'\
b'\x58\x4c\x58\x4c\x57\x20\x52\x4f\x50\x4e\x4e\x4e\x4b\x4f\x49'\
b'\x20\x52\x58\x48\x59\x4a\x59\x4e\x58\x52\x57\x55\x55\x58\x20'\
b'\x52\x51\x52\x50\x51\x4f\x4f\x4f\x4b\x50\x48\x51\x47\x53\x46'\
b'\x20\x52\x56\x46\x57\x47\x58\x49\x58\x4e\x57\x52\x56\x55\x55'\
b'\x57\x53\x5a\x51\x5b\x1f\x4d\x58\x53\x4d\x52\x4e\x52\x4f\x53'\
b'\x50\x54\x50\x55\x4f\x55\x4e\x54\x4d\x53\x4d\x20\x52\x53\x4e'\
b'\x53\x4f\x54\x4f\x54\x4e\x53\x4e\x20\x52\x50\x58\x4f\x59\x4f'\
b'\x5a\x50\x5b\x51\x5b\x52\x5a\x52\x59\x51\x58\x50\x58\x20\x52'\
b'\x50\x59\x50\x5a\x51\x5a\x51\x59\x50\x59\x25\x4d\x58\x53\x4d'\
b'\x52\x4e\x52\x4f\x53\x50\x54\x50\x55\x4f\x55\x4e\x54\x4d\x53'\
b'\x4d\x20\x52\x53\x4e\x53\x4f\x54\x4f\x54\x4e\x53\x4e\x20\x52'\
b'\x51\x5b\x50\x5b\x4f\x5a\x4f\x59\x50\x58\x51\x58\x52\x59\x52'\
b'\x5b\x51\x5d\x50\x5e\x4e\x5f\x20\x52\x50\x59\x50\x5a\x51\x5a'\
b'\x51\x59\x50\x59\x20\x52\x51\x5b\x51\x5c\x50\x5e\x03\x46\x5e'\
b'\x5a\x49\x4a\x52\x5a\x5b\x0f\x46\x5f\x4a\x4d\x5b\x4d\x5b\x4e'\
b'\x20\x52\x4a\x4d\x4a\x4e\x5b\x4e\x20\x52\x4a\x55\x5b\x55\x5b'\
b'\x56\x20\x52\x4a\x55\x4a\x56\x5b\x56\x03\x46\x5e\x4a\x49\x5a'\
b'\x52\x4a\x5b\x3a\x48\x5d\x4f\x4b\x4f\x4a\x50\x4a\x50\x4c\x4e'\
b'\x4c\x4e\x4a\x4f\x48\x50\x47\x53\x46\x57\x46\x5a\x47\x5b\x49'\
b'\x5b\x4b\x5a\x4d\x59\x4e\x57\x4f\x53\x50\x51\x51\x51\x53\x53'\
b'\x54\x54\x54\x20\x52\x55\x46\x5a\x47\x20\x52\x59\x47\x5a\x49'\
b'\x5a\x4b\x59\x4d\x58\x4e\x56\x4f\x20\x52\x57\x46\x58\x47\x59'\
b'\x49\x59\x4b\x58\x4d\x57\x4e\x53\x50\x52\x51\x52\x53\x53\x54'\
b'\x20\x52\x50\x58\x4f\x59\x4f\x5a\x50\x5b\x51\x5b\x52\x5a\x52'\
b'\x59\x51\x58\x50\x58\x20\x52\x50\x59\x50\x5a\x51\x5a\x51\x59'\
b'\x50\x59\x37\x45\x60\x57\x4e\x56\x4c\x54\x4b\x51\x4b\x4f\x4c'\
b'\x4e\x4d\x4d\x50\x4d\x53\x4e\x55\x50\x56\x53\x56\x55\x55\x56'\
b'\x53\x20\x52\x51\x4b\x4f\x4d\x4e\x50\x4e\x53\x4f\x55\x50\x56'\
b'\x20\x52\x57\x4b\x56\x53\x56\x55\x58\x56\x5a\x56\x5c\x54\x5d'\
b'\x51\x5d\x4f\x5c\x4c\x5b\x4a\x59\x48\x57\x47\x54\x46\x51\x46'\
b'\x4e\x47\x4c\x48\x4a\x4a\x49\x4c\x48\x4f\x48\x52\x49\x55\x4a'\
b'\x57\x4c\x59\x4e\x5a\x51\x5b\x54\x5b\x57\x5a\x59\x59\x5a\x58'\
b'\x20\x52\x58\x4b\x57\x53\x57\x55\x58\x56\x25\x48\x5c\x55\x46'\
b'\x49\x5a\x20\x52\x53\x4a\x54\x5b\x20\x52\x54\x48\x55\x5a\x20'\
b'\x52\x55\x46\x55\x48\x56\x59\x56\x5b\x20\x52\x4c\x55\x54\x55'\
b'\x20\x52\x46\x5b\x4c\x5b\x20\x52\x51\x5b\x58\x5b\x20\x52\x49'\
b'\x5a\x47\x5b\x20\x52\x49\x5a\x4b\x5b\x20\x52\x54\x5a\x52\x5b'\
b'\x20\x52\x54\x59\x53\x5b\x20\x52\x56\x59\x57\x5b\x4d\x46\x5e'\
b'\x4f\x46\x49\x5b\x20\x52\x50\x46\x4a\x5b\x20\x52\x51\x46\x4b'\
b'\x5b\x20\x52\x4c\x46\x57\x46\x5a\x47\x5b\x49\x5b\x4b\x5a\x4e'\
b'\x59\x4f\x56\x50\x20\x52\x59\x47\x5a\x49\x5a\x4b\x59\x4e\x58'\
b'\x4f\x20\x52\x57\x46\x58\x47\x59\x49\x59\x4b\x58\x4e\x56\x50'\
b'\x20\x52\x4e\x50\x56\x50\x58\x51\x59\x53\x59\x55\x58\x58\x56'\
b'\x5a\x52\x5b\x46\x5b\x20\x52\x57\x51\x58\x53\x58\x55\x57\x58'\
b'\x55\x5a\x20\x52\x56\x50\x57\x52\x57\x55\x56\x58\x54\x5a\x52'\
b'\x5b\x20\x52\x4d\x46\x50\x47\x20\x52\x4e\x46\x4f\x48\x20\x52'\
b'\x52\x46\x50\x48\x20\x52\x53\x46\x50\x47\x20\x52\x4a\x5a\x47'\
b'\x5b\x20\x52\x4a\x59\x48\x5b\x20\x52\x4b\x59\x4c\x5b\x20\x52'\
b'\x4a\x5a\x4d\x5b\x28\x48\x5d\x5a\x48\x5b\x48\x5c\x46\x5b\x4c'\
b'\x5b\x4a\x5a\x48\x59\x47\x57\x46\x54\x46\x51\x47\x4f\x49\x4d'\
b'\x4c\x4c\x4f\x4b\x53\x4b\x56\x4c\x59\x4d\x5a\x50\x5b\x53\x5b'\
b'\x55\x5a\x57\x58\x58\x56\x20\x52\x51\x48\x4f\x4a\x4e\x4c\x4d'\
b'\x4f\x4c\x53\x4c\x57\x4d\x59\x20\x52\x54\x46\x52\x47\x50\x4a'\
b'\x4f\x4c\x4e\x4f\x4d\x53\x4d\x58\x4e\x5a\x50\x5b\x3e\x46\x5d'\
b'\x4f\x46\x49\x5b\x20\x52\x50\x46\x4a\x5b\x20\x52\x51\x46\x4b'\
b'\x5b\x20\x52\x4c\x46\x55\x46\x58\x47\x59\x48\x5a\x4b\x5a\x4f'\
b'\x59\x53\x57\x57\x55\x59\x53\x5a\x4f\x5b\x46\x5b\x20\x52\x57'\
b'\x47\x58\x48\x59\x4b\x59\x4f\x58\x53\x56\x57\x54\x59\x20\x52'\
b'\x55\x46\x57\x48\x58\x4b\x58\x4f\x57\x53\x55\x57\x52\x5a\x4f'\
b'\x5b\x20\x52\x4d\x46\x50\x47\x20\x52\x4e\x46\x4f\x48\x20\x52'\
b'\x52\x46\x50\x48\x20\x52\x53\x46\x50\x47\x20\x52\x4a\x5a\x47'\
b'\x5b\x20\x52\x4a\x59\x48\x5b\x20\x52\x4b\x59\x4c\x5b\x20\x52'\
b'\x4a\x5a\x4d\x5b\x4f\x46\x5d\x4f\x46\x49\x5b\x20\x52\x50\x46'\
b'\x4a\x5b\x20\x52\x51\x46\x4b\x5b\x20\x52\x55\x4c\x53\x54\x20'\
b'\x52\x4c\x46\x5b\x46\x5a\x4c\x20\x52\x4e\x50\x54\x50\x20\x52'\
b'\x46\x5b\x55\x5b\x57\x56\x20\x52\x4d\x46\x50\x47\x20\x52\x4e'\
b'\x46\x4f\x48\x20\x52\x52\x46\x50\x48\x20\x52\x53\x46\x50\x47'\
b'\x20\x52\x57\x46\x5a\x47\x20\x52\x58\x46\x5a\x48\x20\x52\x59'\
b'\x46\x5a\x49\x20\x52\x5a\x46\x5a\x4c\x20\x52\x55\x4c\x53\x50'\
b'\x53\x54\x20\x52\x54\x4e\x52\x50\x53\x52\x20\x52\x54\x4f\x51'\
b'\x50\x53\x51\x20\x52\x4a\x5a\x47\x5b\x20\x52\x4a\x59\x48\x5b'\
b'\x20\x52\x4b\x59\x4c\x5b\x20\x52\x4a\x5a\x4d\x5b\x20\x52\x50'\
b'\x5b\x55\x5a\x20\x52\x52\x5b\x55\x59\x20\x52\x55\x59\x57\x56'\
b'\x45\x46\x5c\x4f\x46\x49\x5b\x20\x52\x50\x46\x4a\x5b\x20\x52'\
b'\x51\x46\x4b\x5b\x20\x52\x55\x4c\x53\x54\x20\x52\x4c\x46\x5b'\
b'\x46\x5a\x4c\x20\x52\x4e\x50\x54\x50\x20\x52\x46\x5b\x4e\x5b'\
b'\x20\x52\x4d\x46\x50\x47\x20\x52\x4e\x46\x4f\x48\x20\x52\x52'\
b'\x46\x50\x48\x20\x52\x53\x46\x50\x47\x20\x52\x57\x46\x5a\x47'\
b'\x20\x52\x58\x46\x5a\x48\x20\x52\x59\x46\x5a\x49\x20\x52\x5a'\
b'\x46\x5a\x4c\x20\x52\x55\x4c\x53\x50\x53\x54\x20\x52\x54\x4e'\
b'\x52\x50\x53\x52\x20\x52\x54\x4f\x51\x50\x53\x51\x20\x52\x4a'\
b'\x5a\x47\x5b\x20\x52\x4a\x59\x48\x5b\x20\x52\x4b\x59\x4c\x5b'\
b'\x20\x52\x4a\x5a\x4d\x5b\x40\x48\x5e\x5a\x48\x5b\x48\x5c\x46'\
b'\x5b\x4c\x5b\x4a\x5a\x48\x59\x47\x57\x46\x54\x46\x51\x47\x4f'\
b'\x49\x4d\x4c\x4c\x4f\x4b\x53\x4b\x56\x4c\x59\x4d\x5a\x50\x5b'\
b'\x52\x5b\x55\x5a\x57\x58\x59\x54\x20\x52\x51\x48\x4f\x4a\x4e'\
b'\x4c\x4d\x4f\x4c\x53\x4c\x57\x4d\x59\x20\x52\x56\x58\x57\x57'\
b'\x58\x54\x20\x52\x54\x46\x52\x47\x50\x4a\x4f\x4c\x4e\x4f\x4d'\
b'\x53\x4d\x58\x4e\x5a\x50\x5b\x20\x52\x52\x5b\x54\x5a\x56\x57'\
b'\x57\x54\x20\x52\x54\x54\x5c\x54\x20\x52\x55\x54\x57\x55\x20'\
b'\x52\x56\x54\x57\x57\x20\x52\x5a\x54\x58\x56\x20\x52\x5b\x54'\
b'\x58\x55\x50\x45\x5f\x4e\x46\x48\x5b\x20\x52\x4f\x46\x49\x5b'\
b'\x20\x52\x50\x46\x4a\x5b\x20\x52\x5a\x46\x54\x5b\x20\x52\x5b'\
b'\x46\x55\x5b\x20\x52\x5c\x46\x56\x5b\x20\x52\x4b\x46\x53\x46'\
b'\x20\x52\x57\x46\x5f\x46\x20\x52\x4c\x50\x58\x50\x20\x52\x45'\
b'\x5b\x4d\x5b\x20\x52\x51\x5b\x59\x5b\x20\x52\x4c\x46\x4f\x47'\
b'\x20\x52\x4d\x46\x4e\x48\x20\x52\x51\x46\x4f\x48\x20\x52\x52'\
b'\x46\x4f\x47\x20\x52\x58\x46\x5b\x47\x20\x52\x59\x46\x5a\x48'\
b'\x20\x52\x5d\x46\x5b\x48\x20\x52\x5e\x46\x5b\x47\x20\x52\x49'\
b'\x5a\x46\x5b\x20\x52\x49\x59\x47\x5b\x20\x52\x4a\x59\x4b\x5b'\
b'\x20\x52\x49\x5a\x4c\x5b\x20\x52\x55\x5a\x52\x5b\x20\x52\x55'\
b'\x59\x53\x5b\x20\x52\x56\x59\x57\x5b\x20\x52\x55\x5a\x58\x5b'\
b'\x26\x4b\x59\x54\x46\x4e\x5b\x20\x52\x55\x46\x4f\x5b\x20\x52'\
b'\x56\x46\x50\x5b\x20\x52\x51\x46\x59\x46\x20\x52\x4b\x5b\x53'\
b'\x5b\x20\x52\x52\x46\x55\x47\x20\x52\x53\x46\x54\x48\x20\x52'\
b'\x57\x46\x55\x48\x20\x52\x58\x46\x55\x47\x20\x52\x4f\x5a\x4c'\
b'\x5b\x20\x52\x4f\x59\x4d\x5b\x20\x52\x50\x59\x51\x5b\x20\x52'\
b'\x4f\x5a\x52\x5b\x2e\x49\x5c\x57\x46\x52\x57\x51\x59\x4f\x5b'\
b'\x20\x52\x58\x46\x54\x53\x53\x56\x52\x58\x20\x52\x59\x46\x55'\
b'\x53\x53\x58\x51\x5a\x4f\x5b\x4d\x5b\x4b\x5a\x4a\x58\x4a\x56'\
b'\x4b\x55\x4c\x55\x4d\x56\x4d\x57\x4c\x58\x4b\x58\x20\x52\x4b'\
b'\x56\x4b\x57\x4c\x57\x4c\x56\x4b\x56\x20\x52\x54\x46\x5c\x46'\
b'\x20\x52\x55\x46\x58\x47\x20\x52\x56\x46\x57\x48\x20\x52\x5a'\
b'\x46\x58\x48\x20\x52\x5b\x46\x58\x47\x47\x46\x5d\x4f\x46\x49'\
b'\x5b\x20\x52\x50\x46\x4a\x5b\x20\x52\x51\x46\x4b\x5b\x20\x52'\
b'\x5c\x47\x4d\x52\x20\x52\x51\x4f\x55\x5b\x20\x52\x52\x4f\x56'\
b'\x5b\x20\x52\x53\x4e\x57\x5a\x20\x52\x4c\x46\x54\x46\x20\x52'\
b'\x59\x46\x5f\x46\x20\x52\x46\x5b\x4e\x5b\x20\x52\x52\x5b\x59'\
b'\x5b\x20\x52\x4d\x46\x50\x47\x20\x52\x4e\x46\x4f\x48\x20\x52'\
b'\x52\x46\x50\x48\x20\x52\x53\x46\x50\x47\x20\x52\x5a\x46\x5c'\
b'\x47\x20\x52\x5e\x46\x5c\x47\x20\x52\x4a\x5a\x47\x5b\x20\x52'\
b'\x4a\x59\x48\x5b\x20\x52\x4b\x59\x4c\x5b\x20\x52\x4a\x5a\x4d'\
b'\x5b\x20\x52\x55\x5a\x53\x5b\x20\x52\x55\x59\x54\x5b\x20\x52'\
b'\x56\x59\x58\x5b\x30\x48\x5c\x51\x46\x4b\x5b\x20\x52\x52\x46'\
b'\x4c\x5b\x20\x52\x53\x46\x4d\x5b\x20\x52\x4e\x46\x56\x46\x20'\
b'\x52\x48\x5b\x57\x5b\x59\x55\x20\x52\x4f\x46\x52\x47\x20\x52'\
b'\x50\x46\x51\x48\x20\x52\x54\x46\x52\x48\x20\x52\x55\x46\x52'\
b'\x47\x20\x52\x4c\x5a\x49\x5b\x20\x52\x4c\x59\x4a\x5b\x20\x52'\
b'\x4d\x59\x4e\x5b\x20\x52\x4c\x5a\x4f\x5b\x20\x52\x52\x5b\x57'\
b'\x5a\x20\x52\x54\x5b\x58\x58\x20\x52\x56\x5b\x59\x55\x43\x44'\
b'\x60\x4d\x46\x47\x5a\x20\x52\x4d\x47\x4e\x59\x4e\x5b\x20\x52'\
b'\x4e\x46\x4f\x59\x20\x52\x4f\x46\x50\x58\x20\x52\x5b\x46\x50'\
b'\x58\x4e\x5b\x20\x52\x5b\x46\x55\x5b\x20\x52\x5c\x46\x56\x5b'\
b'\x20\x52\x5d\x46\x57\x5b\x20\x52\x4a\x46\x4f\x46\x20\x52\x5b'\
b'\x46\x60\x46\x20\x52\x44\x5b\x4a\x5b\x20\x52\x52\x5b\x5a\x5b'\
b'\x20\x52\x4b\x46\x4d\x47\x20\x52\x4c\x46\x4d\x48\x20\x52\x5e'\
b'\x46\x5c\x48\x20\x52\x5f\x46\x5c\x47\x20\x52\x47\x5a\x45\x5b'\
b'\x20\x52\x47\x5a\x49\x5b\x20\x52\x56\x5a\x53\x5b\x20\x52\x56'\
b'\x59\x54\x5b\x20\x52\x57\x59\x58\x5b\x20\x52\x56\x5a\x59\x5b'\
b'\x2a\x46\x5f\x4f\x46\x49\x5a\x20\x52\x4f\x46\x56\x5b\x20\x52'\
b'\x50\x46\x56\x58\x20\x52\x51\x46\x57\x58\x20\x52\x5c\x47\x57'\
b'\x58\x56\x5b\x20\x52\x4c\x46\x51\x46\x20\x52\x59\x46\x5f\x46'\
b'\x20\x52\x46\x5b\x4c\x5b\x20\x52\x4d\x46\x50\x47\x20\x52\x4e'\
b'\x46\x50\x48\x20\x52\x5a\x46\x5c\x47\x20\x52\x5e\x46\x5c\x47'\
b'\x20\x52\x49\x5a\x47\x5b\x20\x52\x49\x5a\x4b\x5b\x37\x47\x5d'\
b'\x53\x46\x50\x47\x4e\x49\x4c\x4c\x4b\x4f\x4a\x53\x4a\x56\x4b'\
b'\x59\x4c\x5a\x4e\x5b\x51\x5b\x54\x5a\x56\x58\x58\x55\x59\x52'\
b'\x5a\x4e\x5a\x4b\x59\x48\x58\x47\x56\x46\x53\x46\x20\x52\x4f'\
b'\x49\x4d\x4c\x4c\x4f\x4b\x53\x4b\x57\x4c\x59\x20\x52\x55\x58'\
b'\x57\x55\x58\x52\x59\x4e\x59\x4a\x58\x48\x20\x52\x53\x46\x51'\
b'\x47\x4f\x4a\x4e\x4c\x4d\x4f\x4c\x53\x4c\x58\x4d\x5a\x4e\x5b'\
b'\x20\x52\x51\x5b\x53\x5a\x55\x57\x56\x55\x57\x52\x58\x4e\x58'\
b'\x49\x57\x47\x56\x46\x3b\x46\x5d\x4f\x46\x49\x5b\x20\x52\x50'\
b'\x46\x4a\x5b\x20\x52\x51\x46\x4b\x5b\x20\x52\x4c\x46\x58\x46'\
b'\x5b\x47\x5c\x49\x5c\x4b\x5b\x4e\x59\x50\x55\x51\x4d\x51\x20'\
b'\x52\x5a\x47\x5b\x49\x5b\x4b\x5a\x4e\x58\x50\x20\x52\x58\x46'\
b'\x59\x47\x5a\x49\x5a\x4b\x59\x4e\x57\x50\x55\x51\x20\x52\x46'\
b'\x5b\x4e\x5b\x20\x52\x4d\x46\x50\x47\x20\x52\x4e\x46\x4f\x48'\
b'\x20\x52\x52\x46\x50\x48\x20\x52\x53\x46\x50\x47\x20\x52\x4a'\
b'\x5a\x47\x5b\x20\x52\x4a\x59\x48\x5b\x20\x52\x4b\x59\x4c\x5b'\
b'\x20\x52\x4a\x5a\x4d\x5b\x4d\x47\x5d\x53\x46\x50\x47\x4e\x49'\
b'\x4c\x4c\x4b\x4f\x4a\x53\x4a\x56\x4b\x59\x4c\x5a\x4e\x5b\x51'\
b'\x5b\x54\x5a\x56\x58\x58\x55\x59\x52\x5a\x4e\x5a\x4b\x59\x48'\
b'\x58\x47\x56\x46\x53\x46\x20\x52\x4f\x49\x4d\x4c\x4c\x4f\x4b'\
b'\x53\x4b\x57\x4c\x59\x20\x52\x55\x58\x57\x55\x58\x52\x59\x4e'\
b'\x59\x4a\x58\x48\x20\x52\x53\x46\x51\x47\x4f\x4a\x4e\x4c\x4d'\
b'\x4f\x4c\x53\x4c\x58\x4d\x5a\x4e\x5b\x20\x52\x51\x5b\x53\x5a'\
b'\x55\x57\x56\x55\x57\x52\x58\x4e\x58\x49\x57\x47\x56\x46\x20'\
b'\x52\x4c\x58\x4d\x56\x4f\x55\x50\x55\x52\x56\x53\x58\x54\x5d'\
b'\x55\x5e\x56\x5e\x57\x5d\x20\x52\x54\x5e\x55\x5f\x56\x5f\x20'\
b'\x52\x53\x58\x53\x5f\x54\x60\x56\x60\x57\x5d\x57\x5c\x4d\x46'\
b'\x5e\x4f\x46\x49\x5b\x20\x52\x50\x46\x4a\x5b\x20\x52\x51\x46'\
b'\x4b\x5b\x20\x52\x4c\x46\x57\x46\x5a\x47\x5b\x49\x5b\x4b\x5a'\
b'\x4e\x59\x4f\x56\x50\x4e\x50\x20\x52\x59\x47\x5a\x49\x5a\x4b'\
b'\x59\x4e\x58\x4f\x20\x52\x57\x46\x58\x47\x59\x49\x59\x4b\x58'\
b'\x4e\x56\x50\x20\x52\x52\x50\x54\x51\x55\x52\x57\x58\x58\x59'\
b'\x59\x59\x5a\x58\x20\x52\x57\x59\x58\x5a\x59\x5a\x20\x52\x55'\
b'\x52\x56\x5a\x57\x5b\x59\x5b\x5a\x58\x5a\x57\x20\x52\x46\x5b'\
b'\x4e\x5b\x20\x52\x4d\x46\x50\x47\x20\x52\x4e\x46\x4f\x48\x20'\
b'\x52\x52\x46\x50\x48\x20\x52\x53\x46\x50\x47\x20\x52\x4a\x5a'\
b'\x47\x5b\x20\x52\x4a\x59\x48\x5b\x20\x52\x4b\x59\x4c\x5b\x20'\
b'\x52\x4a\x5a\x4d\x5b\x2b\x47\x5e\x5a\x48\x5b\x48\x5c\x46\x5b'\
b'\x4c\x5b\x4a\x5a\x48\x59\x47\x56\x46\x52\x46\x4f\x47\x4d\x49'\
b'\x4d\x4c\x4e\x4e\x50\x50\x56\x53\x57\x55\x57\x58\x56\x5a\x20'\
b'\x52\x4e\x4c\x4f\x4e\x56\x52\x57\x54\x20\x52\x4f\x47\x4e\x49'\
b'\x4e\x4b\x4f\x4d\x55\x50\x57\x52\x58\x54\x58\x57\x57\x59\x56'\
b'\x5a\x53\x5b\x4f\x5b\x4c\x5a\x4b\x59\x4a\x57\x4a\x55\x49\x5b'\
b'\x4a\x59\x4b\x59\x35\x47\x5d\x54\x46\x4e\x5b\x20\x52\x55\x46'\
b'\x4f\x5b\x20\x52\x56\x46\x50\x5b\x20\x52\x4d\x46\x4b\x4c\x20'\
b'\x52\x5d\x46\x5c\x4c\x20\x52\x4d\x46\x5d\x46\x20\x52\x4b\x5b'\
b'\x53\x5b\x20\x52\x4e\x46\x4b\x4c\x20\x52\x50\x46\x4c\x49\x20'\
b'\x52\x52\x46\x4d\x47\x20\x52\x59\x46\x5c\x47\x20\x52\x5a\x46'\
b'\x5c\x48\x20\x52\x5b\x46\x5c\x49\x20\x52\x5c\x46\x5c\x4c\x20'\
b'\x52\x4f\x5a\x4c\x5b\x20\x52\x4f\x59\x4d\x5b\x20\x52\x50\x59'\
b'\x51\x5b\x20\x52\x4f\x5a\x52\x5b\x2f\x46\x5f\x4e\x46\x4b\x51'\
b'\x4a\x55\x4a\x58\x4b\x5a\x4e\x5b\x52\x5b\x55\x5a\x57\x58\x58'\
b'\x55\x5c\x47\x20\x52\x4f\x46\x4c\x51\x4b\x55\x4b\x59\x4c\x5a'\
b'\x20\x52\x50\x46\x4d\x51\x4c\x55\x4c\x59\x4e\x5b\x20\x52\x4b'\
b'\x46\x53\x46\x20\x52\x59\x46\x5f\x46\x20\x52\x4c\x46\x4f\x47'\
b'\x20\x52\x4d\x46\x4e\x48\x20\x52\x51\x46\x4f\x48\x20\x52\x52'\
b'\x46\x4f\x47\x20\x52\x5a\x46\x5c\x47\x20\x52\x5e\x46\x5c\x47'\
b'\x22\x48\x5c\x4e\x46\x4e\x48\x4f\x59\x4f\x5b\x20\x52\x4f\x47'\
b'\x50\x58\x20\x52\x50\x46\x51\x57\x20\x52\x5b\x47\x4f\x5b\x20'\
b'\x52\x4c\x46\x53\x46\x20\x52\x58\x46\x5e\x46\x20\x52\x4d\x46'\
b'\x4e\x48\x20\x52\x51\x46\x50\x48\x20\x52\x52\x46\x4f\x47\x20'\
b'\x52\x59\x46\x5b\x47\x20\x52\x5d\x46\x5b\x47\x38\x45\x5f\x4d'\
b'\x46\x4d\x48\x4b\x59\x4b\x5b\x20\x52\x4e\x47\x4c\x58\x20\x52'\
b'\x4f\x46\x4d\x57\x20\x52\x55\x46\x4d\x57\x4b\x5b\x20\x52\x55'\
b'\x46\x55\x48\x53\x59\x53\x5b\x20\x52\x56\x47\x54\x58\x20\x52'\
b'\x57\x46\x55\x57\x20\x52\x5d\x47\x55\x57\x53\x5b\x20\x52\x4a'\
b'\x46\x52\x46\x20\x52\x55\x46\x57\x46\x20\x52\x5a\x46\x60\x46'\
b'\x20\x52\x4b\x46\x4e\x47\x20\x52\x4c\x46\x4d\x48\x20\x52\x50'\
b'\x46\x4e\x49\x20\x52\x51\x46\x4e\x47\x20\x52\x5b\x46\x5d\x47'\
b'\x20\x52\x5f\x46\x5d\x47\x35\x47\x5d\x4e\x46\x54\x5b\x20\x52'\
b'\x4f\x46\x55\x5b\x20\x52\x50\x46\x56\x5b\x20\x52\x5b\x47\x49'\
b'\x5a\x20\x52\x4c\x46\x53\x46\x20\x52\x58\x46\x5e\x46\x20\x52'\
b'\x46\x5b\x4c\x5b\x20\x52\x51\x5b\x58\x5b\x20\x52\x4d\x46\x4f'\
b'\x48\x20\x52\x51\x46\x50\x48\x20\x52\x52\x46\x50\x47\x20\x52'\
b'\x59\x46\x5b\x47\x20\x52\x5d\x46\x5b\x47\x20\x52\x49\x5a\x47'\
b'\x5b\x20\x52\x49\x5a\x4b\x5b\x20\x52\x54\x5a\x52\x5b\x20\x52'\
b'\x54\x59\x53\x5b\x20\x52\x55\x59\x57\x5b\x32\x47\x5d\x4d\x46'\
b'\x51\x50\x4e\x5b\x20\x52\x4e\x46\x52\x50\x4f\x5b\x20\x52\x4f'\
b'\x46\x53\x50\x50\x5b\x20\x52\x5c\x47\x53\x50\x20\x52\x4b\x46'\
b'\x52\x46\x20\x52\x59\x46\x5f\x46\x20\x52\x4b\x5b\x53\x5b\x20'\
b'\x52\x4c\x46\x4e\x47\x20\x52\x50\x46\x4f\x48\x20\x52\x51\x46'\
b'\x4e\x47\x20\x52\x5a\x46\x5c\x47\x20\x52\x5e\x46\x5c\x47\x20'\
b'\x52\x4f\x5a\x4c\x5b\x20\x52\x4f\x59\x4d\x5b\x20\x52\x50\x59'\
b'\x51\x5b\x20\x52\x4f\x5a\x52\x5b\x22\x47\x5d\x5a\x46\x48\x5b'\
b'\x20\x52\x5b\x46\x49\x5b\x20\x52\x5c\x46\x4a\x5b\x20\x52\x5c'\
b'\x46\x4e\x46\x4c\x4c\x20\x52\x48\x5b\x56\x5b\x58\x55\x20\x52'\
b'\x4f\x46\x4c\x4c\x20\x52\x50\x46\x4d\x49\x20\x52\x52\x46\x4e'\
b'\x47\x20\x52\x52\x5b\x56\x5a\x20\x52\x54\x5b\x57\x58\x20\x52'\
b'\x55\x5b\x58\x55\x0b\x4b\x59\x4f\x42\x4f\x62\x20\x52\x50\x42'\
b'\x50\x62\x20\x52\x4f\x42\x56\x42\x20\x52\x4f\x62\x56\x62\x02'\
b'\x4b\x59\x4b\x46\x59\x5e\x0b\x4b\x59\x54\x42\x54\x62\x20\x52'\
b'\x55\x42\x55\x62\x20\x52\x4e\x42\x55\x42\x20\x52\x4e\x62\x55'\
b'\x62\x07\x47\x5d\x4a\x54\x52\x4f\x5a\x54\x20\x52\x4a\x54\x52'\
b'\x50\x5a\x54\x02\x48\x5c\x48\x62\x5c\x62\x06\x4c\x58\x50\x46'\
b'\x55\x4c\x20\x52\x50\x46\x4f\x47\x55\x4c\x31\x47\x5d\x57\x4d'\
b'\x55\x54\x55\x58\x56\x5a\x57\x5b\x59\x5b\x5b\x59\x5c\x57\x20'\
b'\x52\x58\x4d\x56\x54\x56\x5a\x20\x52\x57\x4d\x59\x4d\x57\x54'\
b'\x56\x58\x20\x52\x55\x54\x55\x51\x54\x4e\x52\x4d\x50\x4d\x4d'\
b'\x4e\x4b\x51\x4a\x54\x4a\x56\x4b\x59\x4c\x5a\x4e\x5b\x50\x5b'\
b'\x52\x5a\x53\x59\x54\x57\x55\x54\x20\x52\x4e\x4e\x4c\x51\x4b'\
b'\x54\x4b\x57\x4c\x59\x20\x52\x50\x4d\x4e\x4f\x4d\x51\x4c\x54'\
b'\x4c\x57\x4d\x5a\x4e\x5b\x33\x49\x5c\x50\x46\x4e\x4d\x4d\x53'\
b'\x4d\x57\x4e\x59\x4f\x5a\x51\x5b\x53\x5b\x56\x5a\x58\x57\x59'\
b'\x54\x59\x52\x58\x4f\x57\x4e\x55\x4d\x53\x4d\x51\x4e\x50\x4f'\
b'\x4f\x51\x4e\x54\x20\x52\x51\x46\x4f\x4d\x4e\x51\x4e\x57\x4f'\
b'\x5a\x20\x52\x56\x59\x57\x57\x58\x54\x58\x51\x57\x4f\x20\x52'\
b'\x4d\x46\x52\x46\x50\x4d\x4e\x54\x20\x52\x53\x5b\x55\x59\x56'\
b'\x57\x57\x54\x57\x51\x56\x4e\x55\x4d\x20\x52\x4e\x46\x51\x47'\
b'\x20\x52\x4f\x46\x50\x48\x21\x49\x5b\x57\x51\x57\x50\x56\x50'\
b'\x56\x52\x58\x52\x58\x50\x57\x4e\x55\x4d\x52\x4d\x4f\x4e\x4d'\
b'\x51\x4c\x54\x4c\x56\x4d\x59\x4e\x5a\x50\x5b\x52\x5b\x55\x5a'\
b'\x57\x57\x20\x52\x4f\x4f\x4e\x51\x4d\x54\x4d\x57\x4e\x59\x20'\
b'\x52\x52\x4d\x50\x4f\x4f\x51\x4e\x54\x4e\x57\x4f\x5a\x50\x5b'\
b'\x39\x47\x5d\x59\x46\x56\x51\x55\x55\x55\x58\x56\x5a\x57\x5b'\
b'\x59\x5b\x5b\x59\x5c\x57\x20\x52\x5a\x46\x57\x51\x56\x55\x56'\
b'\x5a\x20\x52\x56\x46\x5b\x46\x57\x54\x56\x58\x20\x52\x55\x54'\
b'\x55\x51\x54\x4e\x52\x4d\x50\x4d\x4d\x4e\x4b\x51\x4a\x54\x4a'\
b'\x56\x4b\x59\x4c\x5a\x4e\x5b\x50\x5b\x52\x5a\x53\x59\x54\x57'\
b'\x55\x54\x20\x52\x4d\x4f\x4c\x51\x4b\x54\x4b\x57\x4c\x59\x20'\
b'\x52\x50\x4d\x4e\x4f\x4d\x51\x4c\x54\x4c\x57\x4d\x5a\x4e\x5b'\
b'\x20\x52\x57\x46\x5a\x47\x20\x52\x58\x46\x59\x48\x20\x49\x5b'\
b'\x4d\x56\x51\x55\x54\x54\x57\x52\x58\x50\x57\x4e\x55\x4d\x52'\
b'\x4d\x4f\x4e\x4d\x51\x4c\x54\x4c\x56\x4d\x59\x4e\x5a\x50\x5b'\
b'\x52\x5b\x55\x5a\x57\x58\x20\x52\x4f\x4f\x4e\x51\x4d\x54\x4d'\
b'\x57\x4e\x59\x20\x52\x52\x4d\x50\x4f\x4f\x51\x4e\x54\x4e\x57'\
b'\x4f\x5a\x50\x5b\x2c\x4a\x5a\x5a\x48\x5a\x47\x59\x47\x59\x49'\
b'\x5b\x49\x5b\x47\x5a\x46\x58\x46\x56\x47\x54\x49\x53\x4b\x52'\
b'\x4e\x51\x52\x4f\x5b\x4e\x5e\x4d\x60\x4b\x62\x20\x52\x54\x4a'\
b'\x53\x4d\x52\x52\x50\x5b\x4f\x5e\x20\x52\x58\x46\x56\x48\x55'\
b'\x4a\x54\x4d\x53\x52\x51\x5a\x50\x5d\x4f\x5f\x4d\x61\x4b\x62'\
b'\x49\x62\x48\x61\x48\x5f\x4a\x5f\x4a\x61\x49\x61\x49\x60\x20'\
b'\x52\x4e\x4d\x59\x4d\x38\x48\x5d\x58\x4d\x54\x5b\x53\x5e\x51'\
b'\x61\x4f\x62\x20\x52\x59\x4d\x55\x5b\x53\x5f\x20\x52\x58\x4d'\
b'\x5a\x4d\x56\x5b\x54\x5f\x52\x61\x4f\x62\x4c\x62\x4a\x61\x49'\
b'\x60\x49\x5e\x4b\x5e\x4b\x60\x4a\x60\x4a\x5f\x20\x52\x56\x54'\
b'\x56\x51\x55\x4e\x53\x4d\x51\x4d\x4e\x4e\x4c\x51\x4b\x54\x4b'\
b'\x56\x4c\x59\x4d\x5a\x4f\x5b\x51\x5b\x53\x5a\x54\x59\x55\x57'\
b'\x56\x54\x20\x52\x4e\x4f\x4d\x51\x4c\x54\x4c\x57\x4d\x59\x20'\
b'\x52\x51\x4d\x4f\x4f\x4e\x51\x4d\x54\x4d\x57\x4e\x5a\x4f\x5b'\
b'\x28\x47\x5d\x4f\x46\x49\x5b\x4b\x5b\x20\x52\x50\x46\x4a\x5b'\
b'\x20\x52\x4c\x46\x51\x46\x4b\x5b\x20\x52\x4d\x54\x4f\x50\x51'\
b'\x4e\x53\x4d\x55\x4d\x57\x4e\x58\x50\x58\x53\x56\x58\x20\x52'\
b'\x57\x4e\x57\x52\x56\x56\x56\x5a\x20\x52\x57\x50\x55\x55\x55'\
b'\x58\x56\x5a\x57\x5b\x59\x5b\x5b\x59\x5c\x57\x20\x52\x4d\x46'\
b'\x50\x47\x20\x52\x4e\x46\x4f\x48\x22\x4b\x58\x53\x46\x53\x48'\
b'\x55\x48\x55\x46\x53\x46\x20\x52\x54\x46\x54\x48\x20\x52\x53'\
b'\x47\x55\x47\x20\x52\x4c\x51\x4d\x4f\x4f\x4d\x51\x4d\x52\x4e'\
b'\x53\x50\x53\x53\x51\x58\x20\x52\x52\x4e\x52\x52\x51\x56\x51'\
b'\x5a\x20\x52\x52\x50\x50\x55\x50\x58\x51\x5a\x52\x5b\x54\x5b'\
b'\x56\x59\x57\x57\x2c\x4b\x58\x55\x46\x55\x48\x57\x48\x57\x46'\
b'\x55\x46\x20\x52\x56\x46\x56\x48\x20\x52\x55\x47\x57\x47\x20'\
b'\x52\x4d\x51\x4e\x4f\x50\x4d\x52\x4d\x53\x4e\x54\x50\x54\x53'\
b'\x52\x5a\x51\x5d\x50\x5f\x4e\x61\x4c\x62\x4a\x62\x49\x61\x49'\
b'\x5f\x4b\x5f\x4b\x61\x4a\x61\x4a\x60\x20\x52\x53\x4e\x53\x53'\
b'\x51\x5a\x50\x5d\x4f\x5f\x20\x52\x53\x50\x52\x54\x50\x5b\x4f'\
b'\x5e\x4e\x60\x4c\x62\x30\x47\x5d\x4f\x46\x49\x5b\x4b\x5b\x20'\
b'\x52\x50\x46\x4a\x5b\x20\x52\x4c\x46\x51\x46\x4b\x5b\x20\x52'\
b'\x59\x4f\x59\x4e\x58\x4e\x58\x50\x5a\x50\x5a\x4e\x59\x4d\x57'\
b'\x4d\x55\x4e\x51\x52\x4f\x53\x20\x52\x4d\x53\x4f\x53\x51\x54'\
b'\x52\x55\x54\x59\x55\x5a\x57\x5a\x20\x52\x51\x55\x53\x59\x54'\
b'\x5a\x20\x52\x4f\x53\x50\x54\x52\x5a\x53\x5b\x55\x5b\x57\x5a'\
b'\x59\x57\x20\x52\x4d\x46\x50\x47\x20\x52\x4e\x46\x4f\x48\x19'\
b'\x4c\x58\x54\x46\x51\x51\x50\x55\x50\x58\x51\x5a\x52\x5b\x54'\
b'\x5b\x56\x59\x57\x57\x20\x52\x55\x46\x52\x51\x51\x55\x51\x5a'\
b'\x20\x52\x51\x46\x56\x46\x52\x54\x51\x58\x20\x52\x52\x46\x55'\
b'\x47\x20\x52\x53\x46\x54\x48\x3c\x40\x63\x41\x51\x42\x4f\x44'\
b'\x4d\x46\x4d\x47\x4e\x48\x50\x48\x53\x46\x5b\x20\x52\x47\x4e'\
b'\x47\x53\x45\x5b\x20\x52\x47\x50\x46\x54\x44\x5b\x46\x5b\x20'\
b'\x52\x48\x53\x4a\x50\x4c\x4e\x4e\x4d\x50\x4d\x52\x4e\x53\x50'\
b'\x53\x53\x51\x5b\x20\x52\x52\x4e\x52\x53\x50\x5b\x20\x52\x52'\
b'\x50\x51\x54\x4f\x5b\x51\x5b\x20\x52\x53\x53\x55\x50\x57\x4e'\
b'\x59\x4d\x5b\x4d\x5d\x4e\x5e\x50\x5e\x53\x5c\x58\x20\x52\x5d'\
b'\x4e\x5d\x52\x5c\x56\x5c\x5a\x20\x52\x5d\x50\x5b\x55\x5b\x58'\
b'\x5c\x5a\x5d\x5b\x5f\x5b\x61\x59\x62\x57\x29\x46\x5e\x47\x51'\
b'\x48\x4f\x4a\x4d\x4c\x4d\x4d\x4e\x4e\x50\x4e\x53\x4c\x5b\x20'\
b'\x52\x4d\x4e\x4d\x53\x4b\x5b\x20\x52\x4d\x50\x4c\x54\x4a\x5b'\
b'\x4c\x5b\x20\x52\x4e\x53\x50\x50\x52\x4e\x54\x4d\x56\x4d\x58'\
b'\x4e\x59\x50\x59\x53\x57\x58\x20\x52\x58\x4e\x58\x52\x57\x56'\
b'\x57\x5a\x20\x52\x58\x50\x56\x55\x56\x58\x57\x5a\x58\x5b\x5a'\
b'\x5b\x5c\x59\x5d\x57\x2d\x48\x5c\x51\x4d\x4e\x4e\x4c\x51\x4b'\
b'\x54\x4b\x56\x4c\x59\x4d\x5a\x50\x5b\x53\x5b\x56\x5a\x58\x57'\
b'\x59\x54\x59\x52\x58\x4f\x57\x4e\x54\x4d\x51\x4d\x20\x52\x4e'\
b'\x4f\x4d\x51\x4c\x54\x4c\x57\x4d\x59\x20\x52\x56\x59\x57\x57'\
b'\x58\x54\x58\x51\x57\x4f\x20\x52\x51\x4d\x4f\x4f\x4e\x51\x4d'\
b'\x54\x4d\x57\x4e\x5a\x50\x5b\x20\x52\x53\x5b\x55\x59\x56\x57'\
b'\x57\x54\x57\x51\x56\x4e\x54\x4d\x41\x47\x5d\x48\x51\x49\x4f'\
b'\x4b\x4d\x4d\x4d\x4e\x4e\x4f\x50\x4f\x53\x4e\x57\x4b\x62\x20'\
b'\x52\x4e\x4e\x4e\x53\x4d\x57\x4a\x62\x20\x52\x4e\x50\x4d\x54'\
b'\x49\x62\x20\x52\x4f\x54\x50\x51\x51\x4f\x52\x4e\x54\x4d\x56'\
b'\x4d\x58\x4e\x59\x4f\x5a\x52\x5a\x54\x59\x57\x57\x5a\x54\x5b'\
b'\x52\x5b\x50\x5a\x4f\x57\x4f\x54\x20\x52\x58\x4f\x59\x51\x59'\
b'\x54\x58\x57\x57\x59\x20\x52\x56\x4d\x57\x4e\x58\x51\x58\x54'\
b'\x57\x57\x56\x59\x54\x5b\x20\x52\x46\x62\x4e\x62\x20\x52\x4a'\
b'\x61\x47\x62\x20\x52\x4a\x60\x48\x62\x20\x52\x4b\x60\x4c\x62'\
b'\x20\x52\x4a\x61\x4d\x62\x38\x47\x5c\x57\x4d\x51\x62\x20\x52'\
b'\x58\x4d\x52\x62\x20\x52\x57\x4d\x59\x4d\x53\x62\x20\x52\x55'\
b'\x54\x55\x51\x54\x4e\x52\x4d\x50\x4d\x4d\x4e\x4b\x51\x4a\x54'\
b'\x4a\x56\x4b\x59\x4c\x5a\x4e\x5b\x50\x5b\x52\x5a\x53\x59\x54'\
b'\x57\x55\x54\x20\x52\x4d\x4f\x4c\x51\x4b\x54\x4b\x57\x4c\x59'\
b'\x20\x52\x50\x4d\x4e\x4f\x4d\x51\x4c\x54\x4c\x57\x4d\x5a\x4e'\
b'\x5b\x20\x52\x4e\x62\x56\x62\x20\x52\x52\x61\x4f\x62\x20\x52'\
b'\x52\x60\x50\x62\x20\x52\x53\x60\x54\x62\x20\x52\x52\x61\x55'\
b'\x62\x1d\x49\x5b\x4a\x51\x4b\x4f\x4d\x4d\x4f\x4d\x50\x4e\x51'\
b'\x50\x51\x54\x4f\x5b\x20\x52\x50\x4e\x50\x54\x4e\x5b\x20\x52'\
b'\x50\x50\x4f\x54\x4d\x5b\x4f\x5b\x20\x52\x59\x4f\x59\x4e\x58'\
b'\x4e\x58\x50\x5a\x50\x5a\x4e\x59\x4d\x57\x4d\x55\x4e\x53\x50'\
b'\x51\x54\x2e\x4a\x5b\x58\x50\x58\x4f\x57\x4f\x57\x51\x59\x51'\
b'\x59\x4f\x58\x4e\x55\x4d\x52\x4d\x4f\x4e\x4e\x4f\x4e\x51\x4f'\
b'\x53\x51\x54\x54\x55\x56\x56\x57\x58\x20\x52\x4f\x4e\x4e\x51'\
b'\x20\x52\x4f\x52\x51\x53\x54\x54\x56\x55\x20\x52\x57\x56\x56'\
b'\x5a\x20\x52\x4e\x4f\x4f\x51\x51\x52\x54\x53\x56\x54\x57\x56'\
b'\x57\x58\x56\x5a\x53\x5b\x50\x5b\x4d\x5a\x4c\x59\x4c\x57\x4e'\
b'\x57\x4e\x59\x4d\x59\x4d\x58\x16\x4b\x59\x54\x46\x51\x51\x50'\
b'\x55\x50\x58\x51\x5a\x52\x5b\x54\x5b\x56\x59\x57\x57\x20\x52'\
b'\x55\x46\x52\x51\x51\x55\x51\x5a\x20\x52\x54\x46\x56\x46\x52'\
b'\x54\x51\x58\x20\x52\x4e\x4d\x58\x4d\x29\x46\x5e\x47\x51\x48'\
b'\x4f\x4a\x4d\x4c\x4d\x4d\x4e\x4e\x50\x4e\x53\x4c\x58\x20\x52'\
b'\x4d\x4e\x4d\x52\x4c\x56\x4c\x5a\x20\x52\x4d\x50\x4b\x55\x4b'\
b'\x58\x4c\x5a\x4e\x5b\x50\x5b\x52\x5a\x54\x58\x56\x55\x20\x52'\
b'\x58\x4d\x56\x55\x56\x58\x57\x5a\x58\x5b\x5a\x5b\x5c\x59\x5d'\
b'\x57\x20\x52\x59\x4d\x57\x55\x57\x5a\x20\x52\x58\x4d\x5a\x4d'\
b'\x58\x54\x57\x58\x1c\x48\x5c\x49\x51\x4a\x4f\x4c\x4d\x4e\x4d'\
b'\x4f\x4e\x50\x50\x50\x53\x4e\x58\x20\x52\x4f\x4e\x4f\x52\x4e'\
b'\x56\x4e\x5a\x20\x52\x4f\x50\x4d\x55\x4d\x58\x4e\x5a\x50\x5b'\
b'\x52\x5b\x54\x5a\x56\x58\x58\x55\x59\x51\x59\x4d\x58\x4d\x58'\
b'\x4e\x59\x50\x2f\x43\x61\x44\x51\x45\x4f\x47\x4d\x49\x4d\x4a'\
b'\x4e\x4b\x50\x4b\x53\x49\x58\x20\x52\x4a\x4e\x4a\x52\x49\x56'\
b'\x49\x5a\x20\x52\x4a\x50\x48\x55\x48\x58\x49\x5a\x4b\x5b\x4d'\
b'\x5b\x4f\x5a\x51\x58\x52\x55\x20\x52\x54\x4d\x52\x55\x52\x58'\
b'\x53\x5a\x55\x5b\x57\x5b\x59\x5a\x5b\x58\x5d\x55\x5e\x51\x5e'\
b'\x4d\x5d\x4d\x5d\x4e\x5e\x50\x20\x52\x55\x4d\x53\x55\x53\x5a'\
b'\x20\x52\x54\x4d\x56\x4d\x54\x54\x53\x58\x32\x47\x5d\x4a\x51'\
b'\x4c\x4e\x4e\x4d\x50\x4d\x52\x4e\x53\x50\x53\x52\x20\x52\x50'\
b'\x4d\x51\x4e\x51\x52\x50\x56\x4f\x58\x4d\x5a\x4b\x5b\x49\x5b'\
b'\x48\x5a\x48\x58\x4a\x58\x4a\x5a\x49\x5a\x49\x59\x20\x52\x52'\
b'\x4f\x52\x52\x51\x56\x51\x59\x20\x52\x5a\x4f\x5a\x4e\x59\x4e'\
b'\x59\x50\x5b\x50\x5b\x4e\x5a\x4d\x58\x4d\x56\x4e\x54\x50\x53'\
b'\x52\x52\x56\x52\x5a\x53\x5b\x20\x52\x50\x56\x50\x58\x51\x5a'\
b'\x53\x5b\x55\x5b\x57\x5a\x59\x57\x30\x47\x5d\x48\x51\x49\x4f'\
b'\x4b\x4d\x4d\x4d\x4e\x4e\x4f\x50\x4f\x53\x4d\x58\x20\x52\x4e'\
b'\x4e\x4e\x52\x4d\x56\x4d\x5a\x20\x52\x4e\x50\x4c\x55\x4c\x58'\
b'\x4d\x5a\x4f\x5b\x51\x5b\x53\x5a\x55\x58\x57\x54\x20\x52\x59'\
b'\x4d\x55\x5b\x54\x5e\x52\x61\x50\x62\x20\x52\x5a\x4d\x56\x5b'\
b'\x54\x5f\x20\x52\x59\x4d\x5b\x4d\x57\x5b\x55\x5f\x53\x61\x50'\
b'\x62\x4d\x62\x4b\x61\x4a\x60\x4a\x5e\x4c\x5e\x4c\x60\x4b\x60'\
b'\x4b\x5f\x26\x48\x5c\x59\x4d\x58\x4f\x56\x51\x4e\x57\x4c\x59'\
b'\x4b\x5b\x20\x52\x58\x4f\x4f\x4f\x4d\x50\x4c\x52\x20\x52\x56'\
b'\x4f\x52\x4e\x4f\x4e\x4e\x4f\x20\x52\x56\x4f\x52\x4d\x4f\x4d'\
b'\x4d\x4f\x4c\x52\x20\x52\x4c\x59\x55\x59\x57\x58\x58\x56\x20'\
b'\x52\x4e\x59\x52\x5a\x55\x5a\x56\x59\x20\x52\x4e\x59\x52\x5b'\
b'\x55\x5b\x57\x59\x58\x56\x27\x4b\x59\x54\x42\x52\x43\x51\x44'\
b'\x50\x46\x50\x48\x51\x4a\x52\x4b\x53\x4d\x53\x4f\x51\x51\x20'\
b'\x52\x52\x43\x51\x45\x51\x47\x52\x49\x53\x4a\x54\x4c\x54\x4e'\
b'\x53\x50\x4f\x52\x53\x54\x54\x56\x54\x58\x53\x5a\x52\x5b\x51'\
b'\x5d\x51\x5f\x52\x61\x20\x52\x51\x53\x53\x55\x53\x57\x52\x59'\
b'\x51\x5a\x50\x5c\x50\x5e\x51\x60\x52\x61\x54\x62\x02\x4e\x56'\
b'\x52\x42\x52\x62\x27\x4b\x59\x50\x42\x52\x43\x53\x44\x54\x46'\
b'\x54\x48\x53\x4a\x52\x4b\x51\x4d\x51\x4f\x53\x51\x20\x52\x52'\
b'\x43\x53\x45\x53\x47\x52\x49\x51\x4a\x50\x4c\x50\x4e\x51\x50'\
b'\x55\x52\x51\x54\x50\x56\x50\x58\x51\x5a\x52\x5b\x53\x5d\x53'\
b'\x5f\x52\x61\x20\x52\x53\x53\x51\x55\x51\x57\x52\x59\x53\x5a'\
b'\x54\x5c\x54\x5e\x53\x60\x52\x61\x50\x62\x17\x46\x5e\x49\x55'\
b'\x49\x53\x4a\x50\x4c\x4f\x4e\x4f\x50\x50\x54\x53\x56\x54\x58'\
b'\x54\x5a\x53\x5b\x51\x20\x52\x49\x53\x4a\x51\x4c\x50\x4e\x50'\
b'\x50\x51\x54\x54\x56\x55\x58\x55\x5a\x54\x5b\x51\x5b\x4f\x22'\
b'\x4a\x5a\x4a\x46\x4a\x5b\x4b\x5b\x4b\x46\x4c\x46\x4c\x5b\x4d'\
b'\x5b\x4d\x46\x4e\x46\x4e\x5b\x4f\x5b\x4f\x46\x50\x46\x50\x5b'\
b'\x51\x5b\x51\x46\x52\x46\x52\x5b\x53\x5b\x53\x46\x54\x46\x54'\
b'\x5b\x55\x5b\x55\x46\x56\x46\x56\x5b\x57\x5b\x57\x46\x58\x46'\
b'\x58\x5b\x59\x5b\x59\x46\x5a\x46\x5a\x5b'
_index =\
b'\x00\x00\x03\x00\x48\x00\x61\x00\x7a\x00\xe3\x00\x24\x01\xb5'\
b'\x01\xc2\x01\x03\x02\x44\x02\x93\x02\xb4\x02\xe1\x02\xe8\x02'\
b'\x09\x03\x1a\x03\x8f\x03\xb8\x03\x21\x04\xa2\x04\xc1\x04\x24'\
b'\x05\x9f\x05\xee\x05\xbf\x06\x3a\x07\x7b\x07\xc8\x07\xd1\x07'\
b'\xf2\x07\xfb\x07\x72\x08\xe3\x08\x30\x09\xcd\x09\x20\x0a\x9f'\
b'\x0a\x40\x0b\xcd\x0b\x50\x0c\xf3\x0c\x42\x0d\xa1\x0d\x32\x0e'\
b'\x95\x0e\x1e\x0f\x75\x0f\xe6\x0f\x5f\x10\xfc\x10\x99\x11\xf2'\
b'\x11\x5f\x12\xc0\x12\x07\x13\x7a\x13\xe7\x13\x4e\x14\x95\x14'\
b'\xae\x14\xb5\x14\xce\x14\xdf\x14\xe6\x14\xf5\x14\x5a\x15\xc3'\
b'\x15\x08\x16\x7d\x16\xc0\x16\x1b\x17\x8e\x17\xe1\x17\x28\x18'\
b'\x83\x18\xe6\x18\x1b\x19\x96\x19\xeb\x19\x48\x1a\xcd\x1a\x40'\
b'\x1b\x7d\x1b\xdc\x1b\x0b\x1c\x60\x1c\x9b\x1c\xfc\x1c\x63\x1d'\
b'\xc6\x1d\x15\x1e\x66\x1e\x6d\x1e\xbe\x1e\xef\x1e'
_mvfont = memoryview(_font)
def _chr_addr(ordch):
offset = 2 * (ordch - 32)
return int.from_bytes(_index[offset:offset + 2], 'little')
def get_ch(ordch):
offset = _chr_addr(ordch if 32 <= ordch <= 127 else ord('?'))
count = _font[offset]
return _mvfont[offset:offset+(count+2)*2-1]
| def glyphs():
return 96
_font = b'\x00JZ!MXVFUFTGRT RVGUGRT RVGVHRT RVFWGWHRT RPXOYOZP[Q[RZRYQXPX RPYPZQZQYPY\x0bI[PFNM RQFNM RYFWM RZFWM\x0bH]SBLb RYBRb RLOZO RKUYU3H]TBL_ RYBQ_ RZKZJYJYL[L[JZHYGVFRFOGMIMLNNPPVSWUWXVZ RNLONVRWT ROGNINKOMUPWRXTXWWYVZS[O[LZKYJWJULULWKWKV\x1fF^[FI[ RNFPHPJOLMMKMIKIIJGLFNFPGSHVHYG[F RWTUUTWTYV[X[ZZ[X[VYTWTGE_\\O\\N[N[P]P]N\\M[MYNWPRXPZN[K[HZGXGVHTISKRPPROTMUKUITGRFPGOIOLPRQURWTZV[X[YYYX RL[HZ RIZHXHVITJSLR RPPQSTYVZ RK[JZIXIVJTKSMRRO ROLPOQRSVUYWZXZYY\x05NWUFSM RVFSM\x1fJZZBXCUERHPKNOMSMXN\\O_Qb RSHQKOONTN\\ RZBWDTGRJQLPOOSN\\ RNTO]P`Qb\x1fJZSBUEVHWLWQVUTYR\\O_LaJb RVHVPUUSYQ\\ RSBTDUGVP RVHUQTUSXRZP]M`Jb&J[TFSGUQTR RTFTR RTFUGSQTR ROIPIXOYO ROIYO ROIOJYNYO RYIXIPOOO RYIOO RYIYJONOO\x0fF_RIRZSZ RRISISZ RJQ[Q[R RJQJR[R\x15MXQ[P[OZOYPXQXRYR[Q]P^N_ RPYPZQZQYPY RQ[Q\\P^\x02E_IR[R\x0fMXPXOYOZP[Q[RZRYQXPX RPYPZQZQYPY\x07G^[BIbJb R[B\\BJb9H]TFQGOIMLLOKSKVLYMZO[Q[TZVXXUYRZNZKYHXGVFTF RQHOJNLMOLSLWMY RTYVWWUXRYNYJXH RTFRGPJOLNOMSMXNZO[ RQ[SZUWVUWRXNXIWGVF\x13H]TJO[Q[ RWFUJP[ RWFQ[ RWFTIQKOL RTJRKOL3H]OKOJPJPLNLNJOHPGSFVFYGZIZKYMWOMUKWI[ RXGYIYKXMVOSQ RVFWGXIXKWMUOMU RJYKXMXRYWYXX RMXRZWZ RMXR[U[WZXXXW?H]OKOJPJPLNLNJOHPGSFVFYGZIZKYMXNVOSP RXGYIYKXMWN RVFWGXIXKWMUOSP RQPSPVQWRXTXWWYUZR[O[LZKYJWJULULWKWKV RVRWTWWVY RSPUQVSVWUYTZR[\x0eH]WJR[T[ RZFXJS[ RZFT[ RZFJUZU0H]QFLP RQF[F RQGYG RPHUHYG[F RLPMOPNSNVOWPXRXUWXUZQ[N[LZKYJWJULULWKWKV RVPWRWUVXTZ RSNUOVQVUUXSZQ[<H]YJYIXIXKZKZIYGWFTFQGOIMLLOKSKVLYMZO[R[UZWXXVXSWQVPTOQOOPNQMS RPINLMOLSLWMY RVXWVWSVQ RTFRGPJOLNOMSMXNZO[ RR[TZUYVVVRUPTO&H]NFLL R[FZIXLTQRTQWP[ RRSPWO[ RXLRRPUOWN[P[ RMIPFRFWI ROGRGWI RMIOHRHWIYIZH[FgH]SFPGOHNJNMOOQPTPWOYNZLZIYGWFSF RUFPG RPHOJONPO ROORP RSPWO RXNYLYIXG RYGUF RSFQHPJPNQP RTPVOWNXLXHWF RQPMQKSJUJXKZN[R[VZWYXWXTWRVQTP RRPMQ RNQLSKUKXLZ RKZP[VZ RVYWWWTVR RVQSP RQPOQMSLULXMZN[ RR[TZUYVWVSUQTP<H]XNWPVQTRQROQNPMNMKNIPGSFVFXGYHZKZNYRXUVXTZQ[N[LZKXKVMVMXLXLW ROPNNNKOI RXHYJYNXRWUUX RQRPQOOOKPHQGSF RVFWGXIXNWRVUUWSZQ[\x1fMXSMRNROSPTPUOUNTMSM RSNSOTOTNSN RPXOYOZP[Q[RZRYQXPX RPYPZQZQYPY%MXSMRNROSPTPUOUNTMSM RSNSOTOTNSN RQ[P[OZOYPXQXRYR[Q]P^N_ RPYPZQZQYPY RQ[Q\\P^\x03F^ZIJRZ[\x0fF_JM[M[N RJMJN[N RJU[U[V RJUJV[V\x03F^JIZRJ[:H]OKOJPJPLNLNJOHPGSFWFZG[I[KZMYNWOSPQQQSSTTT RUFZG RYGZIZKYMXNVO RWFXGYIYKXMWNSPRQRSST RPXOYOZP[Q[RZRYQXPX RPYPZQZQYPY7E`WNVLTKQKOLNMMPMSNUPVSVUUVS RQKOMNPNSOUPV RWKVSVUXVZV\\T]Q]O\\L[JYHWGTFQFNGLHJJILHOHRIUJWLYNZQ[T[WZYYZX RXKWSWUXV%H\\UFIZ RSJT[ RTHUZ RUFUHVYV[ RLUTU RF[L[ RQ[X[ RIZG[ RIZK[ RTZR[ RTYS[ RVYW[MF^OFI[ RPFJ[ RQFK[ RLFWFZG[I[KZNYOVP RYGZIZKYNXO RWFXGYIYKXNVP RNPVPXQYSYUXXVZR[F[ RWQXSXUWXUZ RVPWRWUVXTZR[ RMFPG RNFOH RRFPH RSFPG RJZG[ RJYH[ RKYL[ RJZM[(H]ZH[H\\F[L[JZHYGWFTFQGOIMLLOKSKVLYMZP[S[UZWXXV RQHOJNLMOLSLWMY RTFRGPJOLNOMSMXNZP[>F]OFI[ RPFJ[ RQFK[ RLFUFXGYHZKZOYSWWUYSZO[F[ RWGXHYKYOXSVWTY RUFWHXKXOWSUWRZO[ RMFPG RNFOH RRFPH RSFPG RJZG[ RJYH[ RKYL[ RJZM[OF]OFI[ RPFJ[ RQFK[ RULST RLF[FZL RNPTP RF[U[WV RMFPG RNFOH RRFPH RSFPG RWFZG RXFZH RYFZI RZFZL RULSPST RTNRPSR RTOQPSQ RJZG[ RJYH[ RKYL[ RJZM[ RP[UZ RR[UY RUYWVEF\\OFI[ RPFJ[ RQFK[ RULST RLF[FZL RNPTP RF[N[ RMFPG RNFOH RRFPH RSFPG RWFZG RXFZH RYFZI RZFZL RULSPST RTNRPSR RTOQPSQ RJZG[ RJYH[ RKYL[ RJZM[@H^ZH[H\\F[L[JZHYGWFTFQGOIMLLOKSKVLYMZP[R[UZWXYT RQHOJNLMOLSLWMY RVXWWXT RTFRGPJOLNOMSMXNZP[ RR[TZVWWT RTT\\T RUTWU RVTWW RZTXV R[TXUPE_NFH[ ROFI[ RPFJ[ RZFT[ R[FU[ R\\FV[ RKFSF RWF_F RLPXP RE[M[ RQ[Y[ RLFOG RMFNH RQFOH RRFOG RXF[G RYFZH R]F[H R^F[G RIZF[ RIYG[ RJYK[ RIZL[ RUZR[ RUYS[ RVYW[ RUZX[&KYTFN[ RUFO[ RVFP[ RQFYF RK[S[ RRFUG RSFTH RWFUH RXFUG ROZL[ ROYM[ RPYQ[ ROZR[.I\\WFRWQYO[ RXFTSSVRX RYFUSSXQZO[M[KZJXJVKULUMVMWLXKX RKVKWLWLVKV RTF\\F RUFXG RVFWH RZFXH R[FXGGF]OFI[ RPFJ[ RQFK[ R\\GMR RQOU[ RROV[ RSNWZ RLFTF RYF_F RF[N[ RR[Y[ RMFPG RNFOH RRFPH RSFPG RZF\\G R^F\\G RJZG[ RJYH[ RKYL[ RJZM[ RUZS[ RUYT[ RVYX[0H\\QFK[ RRFL[ RSFM[ RNFVF RH[W[YU ROFRG RPFQH RTFRH RUFRG RLZI[ RLYJ[ RMYN[ RLZO[ RR[WZ RT[XX RV[YUCD`MFGZ RMGNYN[ RNFOY ROFPX R[FPXN[ R[FU[ R\\FV[ R]FW[ RJFOF R[F`F RD[J[ RR[Z[ RKFMG RLFMH R^F\\H R_F\\G RGZE[ RGZI[ RVZS[ RVYT[ RWYX[ RVZY[*F_OFIZ ROFV[ RPFVX RQFWX R\\GWXV[ RLFQF RYF_F RF[L[ RMFPG RNFPH RZF\\G R^F\\G RIZG[ RIZK[7G]SFPGNILLKOJSJVKYLZN[Q[TZVXXUYRZNZKYHXGVFSF ROIMLLOKSKWLY RUXWUXRYNYJXH RSFQGOJNLMOLSLXMZN[ RQ[SZUWVUWRXNXIWGVF;F]OFI[ RPFJ[ RQFK[ RLFXF[G\\I\\K[NYPUQMQ RZG[I[KZNXP RXFYGZIZKYNWPUQ RF[N[ RMFPG RNFOH RRFPH RSFPG RJZG[ RJYH[ RKYL[ RJZM[MG]SFPGNILLKOJSJVKYLZN[Q[TZVXXUYRZNZKYHXGVFSF ROIMLLOKSKWLY RUXWUXRYNYJXH RSFQGOJNLMOLSLXMZN[ RQ[SZUWVUWRXNXIWGVF RLXMVOUPURVSXT]U^V^W] RT^U_V_ RSXS_T`V`W]W\\MF^OFI[ RPFJ[ RQFK[ RLFWFZG[I[KZNYOVPNP RYGZIZKYNXO RWFXGYIYKXNVP RRPTQURWXXYYYZX RWYXZYZ RURVZW[Y[ZXZW RF[N[ RMFPG RNFOH RRFPH RSFPG RJZG[ RJYH[ RKYL[ RJZM[+G^ZH[H\\F[L[JZHYGVFRFOGMIMLNNPPVSWUWXVZ RNLONVRWT ROGNINKOMUPWRXTXWWYVZS[O[LZKYJWJUI[JYKY5G]TFN[ RUFO[ RVFP[ RMFKL R]F\\L RMF]F RK[S[ RNFKL RPFLI RRFMG RYF\\G RZF\\H R[F\\I R\\F\\L ROZL[ ROYM[ RPYQ[ ROZR[/F_NFKQJUJXKZN[R[UZWXXU\\G ROFLQKUKYLZ RPFMQLULYN[ RKFSF RYF_F RLFOG RMFNH RQFOH RRFOG RZF\\G R^F\\G"H\\NFNHOYO[ ROGPX RPFQW R[GO[ RLFSF RXF^F RMFNH RQFPH RRFOG RYF[G R]F[G8E_MFMHKYK[ RNGLX ROFMW RUFMWK[ RUFUHSYS[ RVGTX RWFUW R]GUWS[ RJFRF RUFWF RZF`F RKFNG RLFMH RPFNI RQFNG R[F]G R_F]G5G]NFT[ ROFU[ RPFV[ R[GIZ RLFSF RXF^F RF[L[ RQ[X[ RMFOH RQFPH RRFPG RYF[G R]F[G RIZG[ RIZK[ RTZR[ RTYS[ RUYW[2G]MFQPN[ RNFRPO[ ROFSPP[ R\\GSP RKFRF RYF_F RK[S[ RLFNG RPFOH RQFNG RZF\\G R^F\\G ROZL[ ROYM[ RPYQ[ ROZR["G]ZFH[ R[FI[ R\\FJ[ R\\FNFLL RH[V[XU ROFLL RPFMI RRFNG RR[VZ RT[WX RU[XU\x0bKYOBOb RPBPb ROBVB RObVb\x02KYKFY^\x0bKYTBTb RUBUb RNBUB RNbUb\x07G]JTROZT RJTRPZT\x02H\\Hb\\b\x06LXPFUL RPFOGUL1G]WMUTUXVZW[Y[[Y\\W RXMVTVZ RWMYMWTVX RUTUQTNRMPMMNKQJTJVKYLZN[P[RZSYTWUT RNNLQKTKWLY RPMNOMQLTLWMZN[3I\\PFNMMSMWNYOZQ[S[VZXWYTYRXOWNUMSMQNPOOQNT RQFOMNQNWOZ RVYWWXTXQWO RMFRFPMNT RS[UYVWWTWQVNUM RNFQG ROFPH!I[WQWPVPVRXRXPWNUMRMONMQLTLVMYNZP[R[UZWW ROONQMTMWNY RRMPOOQNTNWOZP[9G]YFVQUUUXVZW[Y[[Y\\W RZFWQVUVZ RVF[FWTVX RUTUQTNRMPMMNKQJTJVKYLZN[P[RZSYTWUT RMOLQKTKWLY RPMNOMQLTLWMZN[ RWFZG RXFYH I[MVQUTTWRXPWNUMRMONMQLTLVMYNZP[R[UZWX ROONQMTMWNY RRMPOOQNTNWOZP[,JZZHZGYGYI[I[GZFXFVGTISKRNQRO[N^M`Kb RTJSMRRP[O^ RXFVHUJTMSRQZP]O_MaKbIbHaH_J_JaIaI` RNMYM8H]XMT[S^QaOb RYMU[S_ RXMZMV[T_RaObLbJaI`I^K^K`J`J_ RVTVQUNSMQMNNLQKTKVLYMZO[Q[SZTYUWVT RNOMQLTLWMY RQMOONQMTMWNZO[(G]OFI[K[ RPFJ[ RLFQFK[ RMTOPQNSMUMWNXPXSVX RWNWRVVVZ RWPUUUXVZW[Y[[Y\\W RMFPG RNFOH"KXSFSHUHUFSF RTFTH RSGUG RLQMOOMQMRNSPSSQX RRNRRQVQZ RRPPUPXQZR[T[VYWW,KXUFUHWHWFUF RVFVH RUGWG RMQNOPMRMSNTPTSRZQ]P_NaLbJbIaI_K_KaJaJ` RSNSSQZP]O_ RSPRTP[O^N`Lb0G]OFI[K[ RPFJ[ RLFQFK[ RYOYNXNXPZPZNYMWMUNQROS RMSOSQTRUTYUZWZ RQUSYTZ ROSPTRZS[U[WZYW RMFPG RNFOH\x19LXTFQQPUPXQZR[T[VYWW RUFRQQUQZ RQFVFRTQX RRFUG RSFTH<@cAQBODMFMGNHPHSF[ RGNGSE[ RGPFTD[F[ RHSJPLNNMPMRNSPSSQ[ RRNRSP[ RRPQTO[Q[ RSSUPWNYM[M]N^P^S\\X R]N]R\\V\\Z R]P[U[X\\Z][_[aYbW)F^GQHOJMLMMNNPNSL[ RMNMSK[ RMPLTJ[L[ RNSPPRNTMVMXNYPYSWX RXNXRWVWZ RXPVUVXWZX[Z[\\Y]W-H\\QMNNLQKTKVLYMZP[S[VZXWYTYRXOWNTMQM RNOMQLTLWMY RVYWWXTXQWO RQMOONQMTMWNZP[ RS[UYVWWTWQVNTMAG]HQIOKMMMNNOPOSNWKb RNNNSMWJb RNPMTIb ROTPQQORNTMVMXNYOZRZTYWWZT[R[PZOWOT RXOYQYTXWWY RVMWNXQXTWWVYT[ RFbNb RJaGb RJ`Hb RK`Lb RJaMb8G\\WMQb RXMRb RWMYMSb RUTUQTNRMPMMNKQJTJVKYLZN[P[RZSYTWUT RMOLQKTKWLY RPMNOMQLTLWMZN[ RNbVb RRaOb RR`Pb RS`Tb RRaUb\x1dI[JQKOMMOMPNQPQTO[ RPNPTN[ RPPOTM[O[ RYOYNXNXPZPZNYMWMUNSPQT.J[XPXOWOWQYQYOXNUMRMONNONQOSQTTUVVWX RONNQ RORQSTTVU RWVVZ RNOOQQRTSVTWVWXVZS[P[MZLYLWNWNYMYMX\x16KYTFQQPUPXQZR[T[VYWW RUFRQQUQZ RTFVFRTQX RNMXM)F^GQHOJMLMMNNPNSLX RMNMRLVLZ RMPKUKXLZN[P[RZTXVU RXMVUVXWZX[Z[\\Y]W RYMWUWZ RXMZMXTWX\x1cH\\IQJOLMNMONPPPSNX RONORNVNZ ROPMUMXNZP[R[TZVXXUYQYMXMXNYP/CaDQEOGMIMJNKPKSIX RJNJRIVIZ RJPHUHXIZK[M[OZQXRU RTMRURXSZU[W[YZ[X]U^Q^M]M]N^P RUMSUSZ RTMVMTTSX2G]JQLNNMPMRNSPSR RPMQNQRPVOXMZK[I[HZHXJXJZIZIY RRORRQVQY RZOZNYNYP[P[NZMXMVNTPSRRVRZS[ RPVPXQZS[U[WZYW0G]HQIOKMMMNNOPOSMX RNNNRMVMZ RNPLULXMZO[Q[SZUXWT RYMU[T^RaPb RZMV[T_ RYM[MW[U_SaPbMbKaJ`J^L^L`K`K_&H\\YMXOVQNWLYK[ RXOOOMPLR RVORNONNO RVORMOMMOLR RLYUYWXXV RNYRZUZVY RNYR[U[WYXV\'KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSUSWRYQZP\\P^Q`RaTb\x02NVRBRb\'KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQUQWRYSZT\\T^S`RaPb\x17F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O"JZJFJ[K[KFLFL[M[MFNFN[O[OFPFP[Q[QFRFR[S[SFTFT[U[UFVFV[W[WFXFX[Y[YFZFZ['
_index = b'\x00\x00\x03\x00H\x00a\x00z\x00\xe3\x00$\x01\xb5\x01\xc2\x01\x03\x02D\x02\x93\x02\xb4\x02\xe1\x02\xe8\x02\t\x03\x1a\x03\x8f\x03\xb8\x03!\x04\xa2\x04\xc1\x04$\x05\x9f\x05\xee\x05\xbf\x06:\x07{\x07\xc8\x07\xd1\x07\xf2\x07\xfb\x07r\x08\xe3\x080\t\xcd\t \n\x9f\n@\x0b\xcd\x0bP\x0c\xf3\x0cB\r\xa1\r2\x0e\x95\x0e\x1e\x0fu\x0f\xe6\x0f_\x10\xfc\x10\x99\x11\xf2\x11_\x12\xc0\x12\x07\x13z\x13\xe7\x13N\x14\x95\x14\xae\x14\xb5\x14\xce\x14\xdf\x14\xe6\x14\xf5\x14Z\x15\xc3\x15\x08\x16}\x16\xc0\x16\x1b\x17\x8e\x17\xe1\x17(\x18\x83\x18\xe6\x18\x1b\x19\x96\x19\xeb\x19H\x1a\xcd\x1a@\x1b}\x1b\xdc\x1b\x0b\x1c`\x1c\x9b\x1c\xfc\x1cc\x1d\xc6\x1d\x15\x1ef\x1em\x1e\xbe\x1e\xef\x1e'
_mvfont = memoryview(_font)
def _chr_addr(ordch):
offset = 2 * (ordch - 32)
return int.from_bytes(_index[offset:offset + 2], 'little')
def get_ch(ordch):
offset = _chr_addr(ordch if 32 <= ordch <= 127 else ord('?'))
count = _font[offset]
return _mvfont[offset:offset + (count + 2) * 2 - 1] |
ll = [1, 2, 3, 4]
def increment(x):
return x + 1
print(map(increment, ll))
for x in map(increment, ll):
print(x)
| ll = [1, 2, 3, 4]
def increment(x):
return x + 1
print(map(increment, ll))
for x in map(increment, ll):
print(x) |
def add_prune_to_parser(parser):
parser.add_argument('-bp', '--batch-size-prune', default=128, type=int,
metavar='N', help='mini-batch size (default: 256)')
parser.add_argument('--prune', action='store_true', default=False,
help='Prune the network')
parser.add_argument('--pruning_ratio', type=float, default=0.2,
help='pruning ratio')
parser.add_argument('--gamma_knowledge', type=float, default=0.2,
help='factor for distillation penalty')
parser.add_argument('--taylor_file', default=None, type=str, help='File where to save the taylor computation')
parser.add_argument('--prune_test', action='store_true', default=False,
help='Prune on test set')
parser.add_argument('--no_pwl', action='store_true', default=False,
help='Do not prune pwl conv')
parser.add_argument('--taylor_abs', action='store_true', default=False,
help='Alternative taylor')
parser.add_argument('--prune_skip', action='store_true', default=False,
help='Prune skip connection in resnet')
parser.add_argument('--only_last', action='store_true', default=False,
help='IKD only on last layer of the block')
parser.add_argument('--prune_conv1', action='store_true', default=False,
help='Prune stem')
parser.add_argument('--progressive_IKD_factor', action='store_true', default=False,
help='The IKD factor increase linearily along the depth of the network')
parser.add_argument('--use_time', action='store_true', default=False,
help='Use time measurement instead of FLOPS')
| def add_prune_to_parser(parser):
parser.add_argument('-bp', '--batch-size-prune', default=128, type=int, metavar='N', help='mini-batch size (default: 256)')
parser.add_argument('--prune', action='store_true', default=False, help='Prune the network')
parser.add_argument('--pruning_ratio', type=float, default=0.2, help='pruning ratio')
parser.add_argument('--gamma_knowledge', type=float, default=0.2, help='factor for distillation penalty')
parser.add_argument('--taylor_file', default=None, type=str, help='File where to save the taylor computation')
parser.add_argument('--prune_test', action='store_true', default=False, help='Prune on test set')
parser.add_argument('--no_pwl', action='store_true', default=False, help='Do not prune pwl conv')
parser.add_argument('--taylor_abs', action='store_true', default=False, help='Alternative taylor')
parser.add_argument('--prune_skip', action='store_true', default=False, help='Prune skip connection in resnet')
parser.add_argument('--only_last', action='store_true', default=False, help='IKD only on last layer of the block')
parser.add_argument('--prune_conv1', action='store_true', default=False, help='Prune stem')
parser.add_argument('--progressive_IKD_factor', action='store_true', default=False, help='The IKD factor increase linearily along the depth of the network')
parser.add_argument('--use_time', action='store_true', default=False, help='Use time measurement instead of FLOPS') |
class Person:
def __init__(self, name):
self.name = name
def say_hi(self):
print('Hello, my name is', self.name)
p = Person('Swaroop')
p.say_hi()
# The previous 2 lines can also be written as
# Person('Swaroop').say_hi()
str = 'abcdefghijklmnopqrstuvwxyz'
s = slice(5, 20, 2)
i = s.indices(10)
print(i)
print(str[1:3])
| class Person:
def __init__(self, name):
self.name = name
def say_hi(self):
print('Hello, my name is', self.name)
p = person('Swaroop')
p.say_hi()
str = 'abcdefghijklmnopqrstuvwxyz'
s = slice(5, 20, 2)
i = s.indices(10)
print(i)
print(str[1:3]) |
a = 1
b = 2
def myfun():
x = 1
x
print(myfun())
| a = 1
b = 2
def myfun():
x = 1
x
print(myfun()) |
'''Custom exceptions'''
class ConstructorException(Exception):
'''Custom Constructor.io Exception'''
class HttpException(ConstructorException):
'''Custom HTTP exception'''
def __init__(self, message, status, status_text, url, headers): # pylint: disable=too-many-arguments
self.message = message
self.status = status
self.status_text = status_text
self.url = url
self.headers = headers
super().__init__(self.message)
| """Custom exceptions"""
class Constructorexception(Exception):
"""Custom Constructor.io Exception"""
class Httpexception(ConstructorException):
"""Custom HTTP exception"""
def __init__(self, message, status, status_text, url, headers):
self.message = message
self.status = status
self.status_text = status_text
self.url = url
self.headers = headers
super().__init__(self.message) |
def health_calculator(age, apples_ate, cigs_smoked):
awnser = (100 * age) + (apples_ate * 3.5) - (cigs_smoked * 2)
print(awnser)
buckys_data = [27, 70, 0]
health_calculator(buckys_data[0], buckys_data[1], buckys_data[2])
health_calculator(*buckys_data) | def health_calculator(age, apples_ate, cigs_smoked):
awnser = 100 * age + apples_ate * 3.5 - cigs_smoked * 2
print(awnser)
buckys_data = [27, 70, 0]
health_calculator(buckys_data[0], buckys_data[1], buckys_data[2])
health_calculator(*buckys_data) |
while True:
try:
x = int(input())
coe = list(map(int,input().split()))
# the following method gives TLE
#n = len(coe)
#ans = 0
# for i in range(n-1):
# ans += (coe[i]*(n-i-1)) * pow(x,n-i-2)
# for optimization, we use horner's rule
# https://en.wikipedia.org/wiki/Horner's_method
n = len(coe) -1
ans = n * coe[0]
for i in range(1,n):
ans = x*ans + (n-i)*coe[i]
print(ans)
except EOFError:
break | while True:
try:
x = int(input())
coe = list(map(int, input().split()))
n = len(coe) - 1
ans = n * coe[0]
for i in range(1, n):
ans = x * ans + (n - i) * coe[i]
print(ans)
except EOFError:
break |
x,y,n = map(int, input().split())
for i in range(1,n+1):
if not(i%x) and not(i%y):
print("FizzBuzz")
elif not(i%x):
print("Fizz")
elif not(i%y):
print("Buzz")
else:
print(i) | (x, y, n) = map(int, input().split())
for i in range(1, n + 1):
if not i % x and (not i % y):
print('FizzBuzz')
elif not i % x:
print('Fizz')
elif not i % y:
print('Buzz')
else:
print(i) |
class Solution:
def findUnsortedSubarray(self, nums: List[int]) -> int:
num2 = sorted(nums)
start = 0
end = (len(nums) - 1)
while(start <= end):
if nums[start] == num2[start]:
start += 1
elif nums[end] == num2[end]:
end -= 1
else:
break
return (end - start + 1)
| class Solution:
def find_unsorted_subarray(self, nums: List[int]) -> int:
num2 = sorted(nums)
start = 0
end = len(nums) - 1
while start <= end:
if nums[start] == num2[start]:
start += 1
elif nums[end] == num2[end]:
end -= 1
else:
break
return end - start + 1 |
primes: List[int] = []
captain: str # Note: no initial value!
class Starship:
stats: Dict[str, int] = {}
header: str
kind: int
body: Optional[List[str]]
header, kind, body = message
def f():
a: int
print(a) # raises UnboundLocalError
# Commenting out the a: int makes it a NameError.
a: int
a: str # Static type checker may or may not warn about this.
class BasicStarship:
captain: str = 'Picard' # instance variable with default
damage: int # instance variable without default
stats: ClassVar[Dict[str, int]] = {} # class variable
class Starship:
captain: str = 'Picard'
damage: int
stats: ClassVar[Dict[str, int]] = {}
def __init__(self, damage: int, captain: str = None):
self.damage = damage
if captain:
self.captain = captain # Else keep the default
def hit(self):
Starship.stats['hits'] = Starship.stats.get('hits', 0) + 1
class Cls:
pass
c = Cls()
c.x: int = 0 # Annotates c.x with int.
c.y: int # Annotates c.y with int.
d = {}
d['a']: int = 0 # Annotates d['a'] with int.
d['b']: int # Annotates d['b'] with int.
| primes: List[int] = []
captain: str
class Starship:
stats: Dict[str, int] = {}
header: str
kind: int
body: Optional[List[str]]
(header, kind, body) = message
def f():
a: int
print(a)
a: int
a: str
class Basicstarship:
captain: str = 'Picard'
damage: int
stats: ClassVar[Dict[str, int]] = {}
class Starship:
captain: str = 'Picard'
damage: int
stats: ClassVar[Dict[str, int]] = {}
def __init__(self, damage: int, captain: str=None):
self.damage = damage
if captain:
self.captain = captain
def hit(self):
Starship.stats['hits'] = Starship.stats.get('hits', 0) + 1
class Cls:
pass
c = cls()
c.x: int = 0
c.y: int
d = {}
d['a']: int = 0
d['b']: int |
'''
Created on 1.12.2016
@author: Darren
''''''
Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.
The update(i, val) function modifies nums by updating the element at index i to val.
Example:
Given nums = [1, 3, 5]
sumRange(0, 2) -> 9
update(1, 2)
sumRange(0, 2) -> 8
Note:
The array is only modifiable by the update function.
You may assume the number of calls to update and sumRange function is distributed evenly.
"
'''
| """
Created on 1.12.2016
@author: Darren
Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.
The update(i, val) function modifies nums by updating the element at index i to val.
Example:
Given nums = [1, 3, 5]
sumRange(0, 2) -> 9
update(1, 2)
sumRange(0, 2) -> 8
Note:
The array is only modifiable by the update function.
You may assume the number of calls to update and sumRange function is distributed evenly.
"
""" |
shopping_list = ["milk", "pasta", "eggs", "spam", "bread","rice"]
item_to_find = "spam"
# use None when does not have a value
found_at = None
# last value in range is not included
# for index in range(len(shopping_list)):
# # len is length
# if shopping_list[index] == item_to_find:
# found_at = index
# break
if item_to_find in shopping_list:
found_at = shopping_list.index(item_to_find)
if found_at is not None:
print("Item found at position {}".format(found_at))
else:
print("{} not found".format(item_to_find))
| shopping_list = ['milk', 'pasta', 'eggs', 'spam', 'bread', 'rice']
item_to_find = 'spam'
found_at = None
if item_to_find in shopping_list:
found_at = shopping_list.index(item_to_find)
if found_at is not None:
print('Item found at position {}'.format(found_at))
else:
print('{} not found'.format(item_to_find)) |
key = int(input("Enter shift key: "))
# noinspection DuplicatedCode
encrypt_dict = {chr(a % 26 + 97): chr((a + key) % 26 + 97) for a in range(27)}
decrypt_dict = {v: k for k, v in encrypt_dict.items()}
to_encrypt = input("Enter text to encrypt:").lower()
crypt = ""
for i in to_encrypt:
crypt += encrypt_dict[i]
print(crypt)
to_crack = input("Enter string to be cracked: ").lower()
soln = ""
for i in to_crack:
soln += decrypt_dict[i]
print(soln)
| key = int(input('Enter shift key: '))
encrypt_dict = {chr(a % 26 + 97): chr((a + key) % 26 + 97) for a in range(27)}
decrypt_dict = {v: k for (k, v) in encrypt_dict.items()}
to_encrypt = input('Enter text to encrypt:').lower()
crypt = ''
for i in to_encrypt:
crypt += encrypt_dict[i]
print(crypt)
to_crack = input('Enter string to be cracked: ').lower()
soln = ''
for i in to_crack:
soln += decrypt_dict[i]
print(soln) |
# @desc Triangle practice
# @desc by Bernie '21
def pythagSolve(side_A, side_B):
side_A = side_A ** 2
side_B = side_B ** 2
side_C= (side_A + side_B) ** 0.5
return side_C
def main():
print(pythagSolve(8, 6))
print(pythagSolve(3, 4))
print(pythagSolve(4, 3))
print(pythagSolve(5, 12))
if __name__ == '__main__':
main() | def pythag_solve(side_A, side_B):
side_a = side_A ** 2
side_b = side_B ** 2
side_c = (side_A + side_B) ** 0.5
return side_C
def main():
print(pythag_solve(8, 6))
print(pythag_solve(3, 4))
print(pythag_solve(4, 3))
print(pythag_solve(5, 12))
if __name__ == '__main__':
main() |
r=float(input())*3.5
pi=float(input())*7.5
a = (pi + r)/(11.0)
print("MEDIA = {0:.5f}".format(a))
| r = float(input()) * 3.5
pi = float(input()) * 7.5
a = (pi + r) / 11.0
print('MEDIA = {0:.5f}'.format(a)) |
# Copyright (c) Vera Galstyan Jan 25,2018
people = ['jen', 'vera','phil','ofa','sarah']
languages = {
'jen': 'c',
'sarah':'python',
'edward':'ruby',
'phil':'python'
}
for name in people:
if name in languages.keys():
print(name + " , thank you for your particiaption")
else:
print(name + " , you should take a poll")
| people = ['jen', 'vera', 'phil', 'ofa', 'sarah']
languages = {'jen': 'c', 'sarah': 'python', 'edward': 'ruby', 'phil': 'python'}
for name in people:
if name in languages.keys():
print(name + ' , thank you for your particiaption')
else:
print(name + ' , you should take a poll') |
opt_use_idf = "use_idf"
opt_idf_boosting_threshold = "idf_boosting_threshold"
opt_intensify_factor_m = "intensify_factor_m"
opt_intensify_factor_p = "intensify_factor_p"
opt_ceiling = "ceiling"
opt_multiprocessing = "multiprocessing" | opt_use_idf = 'use_idf'
opt_idf_boosting_threshold = 'idf_boosting_threshold'
opt_intensify_factor_m = 'intensify_factor_m'
opt_intensify_factor_p = 'intensify_factor_p'
opt_ceiling = 'ceiling'
opt_multiprocessing = 'multiprocessing' |
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"product_moment_corr": "encoding.ipynb",
"get_model_plus_scores": "encoding.ipynb",
"BlockMultiOutput": "encoding.ipynb",
"preprocess_bold_fmri": "preprocessing.ipynb",
"get_remove_idx": "preprocessing.ipynb",
"make_lagged_stimulus": "preprocessing.ipynb",
"generate_lagged_stimulus": "preprocessing.ipynb",
"make_X_Y": "preprocessing.ipynb",
"create_stim_filename_from_args": "process_bids.ipynb",
"create_output_filename_from_args": "process_bids.ipynb",
"create_metadata_filename_from_args": "process_bids.ipynb",
"create_bold_glob_from_args": "process_bids.ipynb",
"run": "process_bids.ipynb",
"get_func_bold_directory": "process_bids.ipynb",
"process_bids_subject": "process_bids.ipynb",
"run_model_for_subject": "process_bids.ipynb"}
modules = ["encoding.py",
"preprocessing.py",
"process_bids.py"]
doc_url = "https://mjboos.github.io/voxelwiseencoding/"
git_url = "https://github.com/mjboos/voxelwiseencoding/tree/master/"
def custom_doc_links(name): return None
| __all__ = ['index', 'modules', 'custom_doc_links', 'git_url']
index = {'product_moment_corr': 'encoding.ipynb', 'get_model_plus_scores': 'encoding.ipynb', 'BlockMultiOutput': 'encoding.ipynb', 'preprocess_bold_fmri': 'preprocessing.ipynb', 'get_remove_idx': 'preprocessing.ipynb', 'make_lagged_stimulus': 'preprocessing.ipynb', 'generate_lagged_stimulus': 'preprocessing.ipynb', 'make_X_Y': 'preprocessing.ipynb', 'create_stim_filename_from_args': 'process_bids.ipynb', 'create_output_filename_from_args': 'process_bids.ipynb', 'create_metadata_filename_from_args': 'process_bids.ipynb', 'create_bold_glob_from_args': 'process_bids.ipynb', 'run': 'process_bids.ipynb', 'get_func_bold_directory': 'process_bids.ipynb', 'process_bids_subject': 'process_bids.ipynb', 'run_model_for_subject': 'process_bids.ipynb'}
modules = ['encoding.py', 'preprocessing.py', 'process_bids.py']
doc_url = 'https://mjboos.github.io/voxelwiseencoding/'
git_url = 'https://github.com/mjboos/voxelwiseencoding/tree/master/'
def custom_doc_links(name):
return None |
class Cella:
def __init__(self, init_str):
cols = {82: "red", 66: "blue", 71: "green", 32: "white"}
self.x = init_str['userX']
self.y = init_str['userY']
self.color = cols[init_str['userVal']]
def __repr__(self) -> str:
str_ = f"x: {self.x}\ty: {self.y}\tcolor: {self.color}"
return str_
def to_csv(self) -> str:
str_ = f"{self.x},{self.y},{self.color}\n"
return str_
| class Cella:
def __init__(self, init_str):
cols = {82: 'red', 66: 'blue', 71: 'green', 32: 'white'}
self.x = init_str['userX']
self.y = init_str['userY']
self.color = cols[init_str['userVal']]
def __repr__(self) -> str:
str_ = f'x: {self.x}\ty: {self.y}\tcolor: {self.color}'
return str_
def to_csv(self) -> str:
str_ = f'{self.x},{self.y},{self.color}\n'
return str_ |
def reduce_namedtuples_for_httpRequest(tpdict):
kvfinal = {}
for key in tpdict._fields:
_val = getattr(tpdict, (key))
if isinstance(_val, list):
kvfinal.update({key: _val.pop()})
else:
kvfinal.update({key: _val})
return tpdict._replace(**kvfinal)
| def reduce_namedtuples_for_http_request(tpdict):
kvfinal = {}
for key in tpdict._fields:
_val = getattr(tpdict, key)
if isinstance(_val, list):
kvfinal.update({key: _val.pop()})
else:
kvfinal.update({key: _val})
return tpdict._replace(**kvfinal) |
ROW_LIMIT = 5000
SUPERSET_WEBSERVER_PORT = 8088
SUPERSET_WEBSERVER_TIMEOUT = 60
SECRET_KEY = "XPivhoGODD"
SQLALCHEMY_DATABASE_URI = "sqlite:////superset/superset.db"
WTF_CSRF_ENABLED = True
| row_limit = 5000
superset_webserver_port = 8088
superset_webserver_timeout = 60
secret_key = 'XPivhoGODD'
sqlalchemy_database_uri = 'sqlite:////superset/superset.db'
wtf_csrf_enabled = True |
def memorize(func):
memo = {}
def helper(x):
if not (x in memo):
memo[x] = func(x)
return memo[x]
return helper
def tripnach(n):
if n == 1:
return 0
elif n == 2:
return 0
elif n == 3:
return 1
else:
return tripnach(n-1) + tripnach(n-2) + tripnach(n-3)
def main():
n = int(input())
func = memorize(tripnach)
print(func(n))
if __name__=='__main__':
main() | def memorize(func):
memo = {}
def helper(x):
if not x in memo:
memo[x] = func(x)
return memo[x]
return helper
def tripnach(n):
if n == 1:
return 0
elif n == 2:
return 0
elif n == 3:
return 1
else:
return tripnach(n - 1) + tripnach(n - 2) + tripnach(n - 3)
def main():
n = int(input())
func = memorize(tripnach)
print(func(n))
if __name__ == '__main__':
main() |
Import("env")
optimze_flags = [s for s in env.GetProjectOption("system_flags", "").splitlines() if s]
linker_flags = []
common_flags = [
"-Wdouble-promotion",
"-fsingle-precision-constant",
"-fno-exceptions",
"-fno-strict-aliasing",
"-fstack-usage",
"-fno-stack-protector",
"-fomit-frame-pointer",
"-fno-unwind-tables",
"-fno-asynchronous-unwind-tables",
"-fno-math-errno",
"-fmerge-all-constants"
]
if env.GetBuildType() == "release":
common_flags.append("-s")
common_flags.append("-O3")
else:
common_flags.append("-O1")
env.Append(
BUILD_FLAGS=["-std=gnu11"],
BUILD_UNFLAGS=["-Og", "-Os"],
ASFLAGS=optimze_flags + common_flags,
CCFLAGS=linker_flags + optimze_flags + common_flags,
LINKFLAGS=linker_flags + optimze_flags + common_flags
) | import('env')
optimze_flags = [s for s in env.GetProjectOption('system_flags', '').splitlines() if s]
linker_flags = []
common_flags = ['-Wdouble-promotion', '-fsingle-precision-constant', '-fno-exceptions', '-fno-strict-aliasing', '-fstack-usage', '-fno-stack-protector', '-fomit-frame-pointer', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '-fno-math-errno', '-fmerge-all-constants']
if env.GetBuildType() == 'release':
common_flags.append('-s')
common_flags.append('-O3')
else:
common_flags.append('-O1')
env.Append(BUILD_FLAGS=['-std=gnu11'], BUILD_UNFLAGS=['-Og', '-Os'], ASFLAGS=optimze_flags + common_flags, CCFLAGS=linker_flags + optimze_flags + common_flags, LINKFLAGS=linker_flags + optimze_flags + common_flags) |
# https://open.kattis.com/problems/pet
largest = 0
index = 1
for i in range(5):
s = sum(map(int, input().split()))
if s > largest:
largest = s
index = i + 1
print('%s %s' % (index, largest))
| largest = 0
index = 1
for i in range(5):
s = sum(map(int, input().split()))
if s > largest:
largest = s
index = i + 1
print('%s %s' % (index, largest)) |
#
# PySNMP MIB module CTRON-SFPS-PKTMGR-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CTRON-SFPS-PKTMGR-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:15: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)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion")
sfpsSwitchSfpsPacket, sfpsCSPPacket, sfpsPktDispatchStats = mibBuilder.importSymbols("CTRON-SFPS-INCLUDE-MIB", "sfpsSwitchSfpsPacket", "sfpsCSPPacket", "sfpsPktDispatchStats")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Counter32, NotificationType, IpAddress, Gauge32, ModuleIdentity, ObjectIdentity, Integer32, TimeTicks, iso, Unsigned32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "NotificationType", "IpAddress", "Gauge32", "ModuleIdentity", "ObjectIdentity", "Integer32", "TimeTicks", "iso", "Unsigned32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "Bits")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
class SfpsSwitchInstance(Integer32):
pass
class HexInteger(Integer32):
pass
sfpsPacketMgrTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1), )
if mibBuilder.loadTexts: sfpsPacketMgrTable.setStatus('mandatory')
sfpsPacketMgrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1), ).setIndexNames((0, "CTRON-SFPS-PKTMGR-MIB", "sfpsPacketMgrSwitchID"), (0, "CTRON-SFPS-PKTMGR-MIB", "sfpsPacketMgrPacketType"))
if mibBuilder.loadTexts: sfpsPacketMgrEntry.setStatus('mandatory')
sfpsPacketMgrSwitchID = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketMgrSwitchID.setStatus('mandatory')
sfpsPacketMgrPacketType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 2), HexInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketMgrPacketType.setStatus('mandatory')
sfpsPacketMgrTotalPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketMgrTotalPackets.setStatus('mandatory')
sfpsPacketMgrPktsUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketMgrPktsUsed.setStatus('mandatory')
sfpsPacketMgrPktsAvailable = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketMgrPktsAvailable.setStatus('mandatory')
sfpsPacketMgrPktsInUse = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketMgrPktsInUse.setStatus('mandatory')
sfpsPacketMgrNotFound = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketMgrNotFound.setStatus('mandatory')
sfpsPacketMgrTooLarge = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketMgrTooLarge.setStatus('mandatory')
sfpsPacketMgrToCreate = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 10), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sfpsPacketMgrToCreate.setStatus('mandatory')
sfpsPacketMgrReInit = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("reinit", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sfpsPacketMgrReInit.setStatus('mandatory')
sfpsPacketListTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2), )
if mibBuilder.loadTexts: sfpsPacketListTable.setStatus('mandatory')
sfpsPacketListEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1), ).setIndexNames((0, "CTRON-SFPS-PKTMGR-MIB", "sfpsPacketListPacketType"), (0, "CTRON-SFPS-PKTMGR-MIB", "sfpsPacketListSize"))
if mibBuilder.loadTexts: sfpsPacketListEntry.setStatus('mandatory')
sfpsPacketListPacketType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 1), HexInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketListPacketType.setStatus('mandatory')
sfpsPacketListSize = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketListSize.setStatus('mandatory')
sfpsPacketListTotalPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketListTotalPackets.setStatus('mandatory')
sfpsPacketListPktsUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketListPktsUsed.setStatus('mandatory')
sfpsPacketListPktsLeft = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketListPktsLeft.setStatus('mandatory')
sfpsPacketListPktsInUse = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketListPktsInUse.setStatus('mandatory')
sfpsPacketListLowWater = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketListLowWater.setStatus('mandatory')
sfpsPacketListNotFound = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketListNotFound.setStatus('mandatory')
sfpsPacketListStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("enabled", 2), ("disabled", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketListStatus.setStatus('mandatory')
sfpsPacketSizeTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 3), )
if mibBuilder.loadTexts: sfpsPacketSizeTable.setStatus('mandatory')
sfpsPacketSizeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 3, 1), ).setIndexNames((0, "CTRON-SFPS-PKTMGR-MIB", "sfpsPacketSizeSwitchInstance"), (0, "CTRON-SFPS-PKTMGR-MIB", "sfpsPacketSizeSize"))
if mibBuilder.loadTexts: sfpsPacketSizeEntry.setStatus('mandatory')
sfpsPacketSizeSwitchInstance = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 3, 1, 1), SfpsSwitchInstance()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketSizeSwitchInstance.setStatus('mandatory')
sfpsPacketSizeSize = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 3, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketSizeSize.setStatus('mandatory')
sfpsPacketSizePktsUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 3, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketSizePktsUsed.setStatus('mandatory')
sfpsPacketSizeNotFound = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 3, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketSizeNotFound.setStatus('mandatory')
sfpsPacketQTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 4), )
if mibBuilder.loadTexts: sfpsPacketQTable.setStatus('mandatory')
sfpsPacketQEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 4, 1), ).setIndexNames((0, "CTRON-SFPS-PKTMGR-MIB", "sfpsPacketQPriorityQ"))
if mibBuilder.loadTexts: sfpsPacketQEntry.setStatus('mandatory')
sfpsPacketQPriorityQ = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 4, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("low", 1), ("medium", 2), ("high", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketQPriorityQ.setStatus('mandatory')
sfpsPacketQTotalPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 4, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketQTotalPackets.setStatus('mandatory')
sfpsPacketQCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 4, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketQCurrent.setStatus('mandatory')
sfpsPacketQHighWater = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 4, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsPacketQHighWater.setStatus('mandatory')
sfpsCSPPacketStatsPacketsSentBad = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 10, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsCSPPacketStatsPacketsSentBad.setStatus('mandatory')
sfpsCSPPacketStatsPacketsSentGood = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 10, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsCSPPacketStatsPacketsSentGood.setStatus('mandatory')
sfpsCSPPacketStatsPacketsReceivedBad = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 10, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsCSPPacketStatsPacketsReceivedBad.setStatus('mandatory')
sfpsCSPPacketStatsPacketsReceivedGood = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 10, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sfpsCSPPacketStatsPacketsReceivedGood.setStatus('mandatory')
sfpsPktDispatchStatsVerb = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("resetAllStats", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sfpsPktDispatchStatsVerb.setStatus('mandatory')
numHPMInvalidFrameTypeDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numHPMInvalidFrameTypeDrops.setStatus('mandatory')
numHPMFilterMgtPortDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numHPMFilterMgtPortDrops.setStatus('mandatory')
numHPMPhysToLogPortDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numHPMPhysToLogPortDrops.setStatus('mandatory')
numHPMNullSFPSPktDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numHPMNullSFPSPktDrops.setStatus('mandatory')
numHPM81fdThrottleDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numHPM81fdThrottleDrops.setStatus('mandatory')
numHPM81ffThrottleDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numHPM81ffThrottleDrops.setStatus('mandatory')
numHPMPhysStandbyMaskDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numHPMPhysStandbyMaskDrops.setStatus('mandatory')
numBSInvSrcPortDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSInvSrcPortDrops.setStatus('mandatory')
numBSSourceBlockDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSSourceBlockDrops.setStatus('mandatory')
numBSViolationDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSViolationDrops.setStatus('mandatory')
numBSUnknownPortDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSUnknownPortDrops.setStatus('mandatory')
numBSStandbyPortDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSStandbyPortDrops.setStatus('mandatory')
numBSFabricNghbrPortDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSFabricNghbrPortDrops.setStatus('mandatory')
numBSGoingToAccessPortDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 15), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSGoingToAccessPortDrops.setStatus('mandatory')
numBSInvPortTypeDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 16), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSInvPortTypeDrops.setStatus('mandatory')
numBSNullCallDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 17), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSNullCallDrops.setStatus('mandatory')
numBSNullBottomCPDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 18), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSNullBottomCPDrops.setStatus('mandatory')
numBSInvCSPTypeDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 19), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSInvCSPTypeDrops.setStatus('mandatory')
numBSNonHello81fdDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 20), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSNonHello81fdDrops.setStatus('mandatory')
numBSCSPCtrlDisableDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 21), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSCSPCtrlDisableDrops.setStatus('mandatory')
numBSCSPCtrlIndexDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 22), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBSCSPCtrlIndexDrops.setStatus('mandatory')
numBCPNullCallDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 23), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBCPNullCallDrops.setStatus('mandatory')
numBCPCPFaultedDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 24), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBCPCPFaultedDrops.setStatus('mandatory')
numBCPGleanFailDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 25), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBCPGleanFailDrops.setStatus('mandatory')
numBCPCPHaltedDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 26), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBCPCPHaltedDrops.setStatus('mandatory')
numBCPSwitchedBCADrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 27), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBCPSwitchedBCADrops.setStatus('mandatory')
numBCPCallNotAcceptedDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 28), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numBCPCallNotAcceptedDrops.setStatus('mandatory')
numHPM81fdNullPktDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 29), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numHPM81fdNullPktDrops.setStatus('mandatory')
numHPM81fdHelloNullPktDrops = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 30), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numHPM81fdHelloNullPktDrops.setStatus('mandatory')
mibBuilder.exportSymbols("CTRON-SFPS-PKTMGR-MIB", numBSInvCSPTypeDrops=numBSInvCSPTypeDrops, numBCPGleanFailDrops=numBCPGleanFailDrops, sfpsPacketListPktsLeft=sfpsPacketListPktsLeft, numBCPCPHaltedDrops=numBCPCPHaltedDrops, sfpsPacketListNotFound=sfpsPacketListNotFound, sfpsPacketSizeSize=sfpsPacketSizeSize, numBCPCPFaultedDrops=numBCPCPFaultedDrops, numBSNullBottomCPDrops=numBSNullBottomCPDrops, sfpsPacketMgrPacketType=sfpsPacketMgrPacketType, sfpsPacketListTotalPackets=sfpsPacketListTotalPackets, sfpsCSPPacketStatsPacketsSentGood=sfpsCSPPacketStatsPacketsSentGood, sfpsPacketMgrSwitchID=sfpsPacketMgrSwitchID, numBCPCallNotAcceptedDrops=numBCPCallNotAcceptedDrops, sfpsPacketQPriorityQ=sfpsPacketQPriorityQ, sfpsPacketMgrPktsAvailable=sfpsPacketMgrPktsAvailable, numHPMInvalidFrameTypeDrops=numHPMInvalidFrameTypeDrops, sfpsPacketSizeSwitchInstance=sfpsPacketSizeSwitchInstance, numBSFabricNghbrPortDrops=numBSFabricNghbrPortDrops, sfpsPacketSizeTable=sfpsPacketSizeTable, numHPM81fdHelloNullPktDrops=numHPM81fdHelloNullPktDrops, sfpsPacketListSize=sfpsPacketListSize, numBSGoingToAccessPortDrops=numBSGoingToAccessPortDrops, numHPMFilterMgtPortDrops=numHPMFilterMgtPortDrops, sfpsPacketMgrEntry=sfpsPacketMgrEntry, sfpsCSPPacketStatsPacketsSentBad=sfpsCSPPacketStatsPacketsSentBad, numBSCSPCtrlDisableDrops=numBSCSPCtrlDisableDrops, sfpsPacketMgrTooLarge=sfpsPacketMgrTooLarge, numHPM81fdThrottleDrops=numHPM81fdThrottleDrops, numBSNullCallDrops=numBSNullCallDrops, numBSInvSrcPortDrops=numBSInvSrcPortDrops, sfpsPacketMgrToCreate=sfpsPacketMgrToCreate, SfpsSwitchInstance=SfpsSwitchInstance, sfpsPacketListLowWater=sfpsPacketListLowWater, numBSViolationDrops=numBSViolationDrops, sfpsPacketMgrPktsUsed=sfpsPacketMgrPktsUsed, numHPM81ffThrottleDrops=numHPM81ffThrottleDrops, numBSUnknownPortDrops=numBSUnknownPortDrops, sfpsPacketQHighWater=sfpsPacketQHighWater, sfpsCSPPacketStatsPacketsReceivedGood=sfpsCSPPacketStatsPacketsReceivedGood, sfpsPacketMgrTable=sfpsPacketMgrTable, sfpsPacketListEntry=sfpsPacketListEntry, sfpsPacketQTable=sfpsPacketQTable, sfpsPacketQTotalPackets=sfpsPacketQTotalPackets, sfpsPktDispatchStatsVerb=sfpsPktDispatchStatsVerb, numHPMPhysToLogPortDrops=numHPMPhysToLogPortDrops, numBSSourceBlockDrops=numBSSourceBlockDrops, sfpsPacketSizePktsUsed=sfpsPacketSizePktsUsed, numBSCSPCtrlIndexDrops=numBSCSPCtrlIndexDrops, sfpsPacketListTable=sfpsPacketListTable, sfpsPacketQCurrent=sfpsPacketQCurrent, numHPMPhysStandbyMaskDrops=numHPMPhysStandbyMaskDrops, numBSInvPortTypeDrops=numBSInvPortTypeDrops, numBSNonHello81fdDrops=numBSNonHello81fdDrops, numBCPSwitchedBCADrops=numBCPSwitchedBCADrops, sfpsPacketMgrPktsInUse=sfpsPacketMgrPktsInUse, sfpsPacketListPacketType=sfpsPacketListPacketType, sfpsCSPPacketStatsPacketsReceivedBad=sfpsCSPPacketStatsPacketsReceivedBad, numBSStandbyPortDrops=numBSStandbyPortDrops, sfpsPacketMgrTotalPackets=sfpsPacketMgrTotalPackets, sfpsPacketListStatus=sfpsPacketListStatus, sfpsPacketMgrReInit=sfpsPacketMgrReInit, sfpsPacketListPktsInUse=sfpsPacketListPktsInUse, sfpsPacketQEntry=sfpsPacketQEntry, HexInteger=HexInteger, sfpsPacketSizeNotFound=sfpsPacketSizeNotFound, numHPMNullSFPSPktDrops=numHPMNullSFPSPktDrops, numBCPNullCallDrops=numBCPNullCallDrops, sfpsPacketMgrNotFound=sfpsPacketMgrNotFound, numHPM81fdNullPktDrops=numHPM81fdNullPktDrops, sfpsPacketListPktsUsed=sfpsPacketListPktsUsed, sfpsPacketSizeEntry=sfpsPacketSizeEntry)
| (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, single_value_constraint, value_range_constraint, value_size_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion')
(sfps_switch_sfps_packet, sfps_csp_packet, sfps_pkt_dispatch_stats) = mibBuilder.importSymbols('CTRON-SFPS-INCLUDE-MIB', 'sfpsSwitchSfpsPacket', 'sfpsCSPPacket', 'sfpsPktDispatchStats')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(counter32, notification_type, ip_address, gauge32, module_identity, object_identity, integer32, time_ticks, iso, unsigned32, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'NotificationType', 'IpAddress', 'Gauge32', 'ModuleIdentity', 'ObjectIdentity', 'Integer32', 'TimeTicks', 'iso', 'Unsigned32', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'Bits')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
class Sfpsswitchinstance(Integer32):
pass
class Hexinteger(Integer32):
pass
sfps_packet_mgr_table = mib_table((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1))
if mibBuilder.loadTexts:
sfpsPacketMgrTable.setStatus('mandatory')
sfps_packet_mgr_entry = mib_table_row((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1)).setIndexNames((0, 'CTRON-SFPS-PKTMGR-MIB', 'sfpsPacketMgrSwitchID'), (0, 'CTRON-SFPS-PKTMGR-MIB', 'sfpsPacketMgrPacketType'))
if mibBuilder.loadTexts:
sfpsPacketMgrEntry.setStatus('mandatory')
sfps_packet_mgr_switch_id = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketMgrSwitchID.setStatus('mandatory')
sfps_packet_mgr_packet_type = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 2), hex_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketMgrPacketType.setStatus('mandatory')
sfps_packet_mgr_total_packets = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketMgrTotalPackets.setStatus('mandatory')
sfps_packet_mgr_pkts_used = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketMgrPktsUsed.setStatus('mandatory')
sfps_packet_mgr_pkts_available = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketMgrPktsAvailable.setStatus('mandatory')
sfps_packet_mgr_pkts_in_use = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketMgrPktsInUse.setStatus('mandatory')
sfps_packet_mgr_not_found = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketMgrNotFound.setStatus('mandatory')
sfps_packet_mgr_too_large = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketMgrTooLarge.setStatus('mandatory')
sfps_packet_mgr_to_create = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 10), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
sfpsPacketMgrToCreate.setStatus('mandatory')
sfps_packet_mgr_re_init = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('other', 1), ('reinit', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
sfpsPacketMgrReInit.setStatus('mandatory')
sfps_packet_list_table = mib_table((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2))
if mibBuilder.loadTexts:
sfpsPacketListTable.setStatus('mandatory')
sfps_packet_list_entry = mib_table_row((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1)).setIndexNames((0, 'CTRON-SFPS-PKTMGR-MIB', 'sfpsPacketListPacketType'), (0, 'CTRON-SFPS-PKTMGR-MIB', 'sfpsPacketListSize'))
if mibBuilder.loadTexts:
sfpsPacketListEntry.setStatus('mandatory')
sfps_packet_list_packet_type = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 1), hex_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketListPacketType.setStatus('mandatory')
sfps_packet_list_size = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketListSize.setStatus('mandatory')
sfps_packet_list_total_packets = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketListTotalPackets.setStatus('mandatory')
sfps_packet_list_pkts_used = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketListPktsUsed.setStatus('mandatory')
sfps_packet_list_pkts_left = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketListPktsLeft.setStatus('mandatory')
sfps_packet_list_pkts_in_use = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketListPktsInUse.setStatus('mandatory')
sfps_packet_list_low_water = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketListLowWater.setStatus('mandatory')
sfps_packet_list_not_found = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketListNotFound.setStatus('mandatory')
sfps_packet_list_status = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('enabled', 2), ('disabled', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketListStatus.setStatus('mandatory')
sfps_packet_size_table = mib_table((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 3))
if mibBuilder.loadTexts:
sfpsPacketSizeTable.setStatus('mandatory')
sfps_packet_size_entry = mib_table_row((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 3, 1)).setIndexNames((0, 'CTRON-SFPS-PKTMGR-MIB', 'sfpsPacketSizeSwitchInstance'), (0, 'CTRON-SFPS-PKTMGR-MIB', 'sfpsPacketSizeSize'))
if mibBuilder.loadTexts:
sfpsPacketSizeEntry.setStatus('mandatory')
sfps_packet_size_switch_instance = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 3, 1, 1), sfps_switch_instance()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketSizeSwitchInstance.setStatus('mandatory')
sfps_packet_size_size = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 3, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketSizeSize.setStatus('mandatory')
sfps_packet_size_pkts_used = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 3, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketSizePktsUsed.setStatus('mandatory')
sfps_packet_size_not_found = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 3, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketSizeNotFound.setStatus('mandatory')
sfps_packet_q_table = mib_table((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 4))
if mibBuilder.loadTexts:
sfpsPacketQTable.setStatus('mandatory')
sfps_packet_q_entry = mib_table_row((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 4, 1)).setIndexNames((0, 'CTRON-SFPS-PKTMGR-MIB', 'sfpsPacketQPriorityQ'))
if mibBuilder.loadTexts:
sfpsPacketQEntry.setStatus('mandatory')
sfps_packet_q_priority_q = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 4, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('low', 1), ('medium', 2), ('high', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketQPriorityQ.setStatus('mandatory')
sfps_packet_q_total_packets = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 4, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketQTotalPackets.setStatus('mandatory')
sfps_packet_q_current = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 4, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketQCurrent.setStatus('mandatory')
sfps_packet_q_high_water = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 4, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsPacketQHighWater.setStatus('mandatory')
sfps_csp_packet_stats_packets_sent_bad = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 10, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsCSPPacketStatsPacketsSentBad.setStatus('mandatory')
sfps_csp_packet_stats_packets_sent_good = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 10, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsCSPPacketStatsPacketsSentGood.setStatus('mandatory')
sfps_csp_packet_stats_packets_received_bad = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 10, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsCSPPacketStatsPacketsReceivedBad.setStatus('mandatory')
sfps_csp_packet_stats_packets_received_good = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 10, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
sfpsCSPPacketStatsPacketsReceivedGood.setStatus('mandatory')
sfps_pkt_dispatch_stats_verb = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('other', 1), ('resetAllStats', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
sfpsPktDispatchStatsVerb.setStatus('mandatory')
num_hpm_invalid_frame_type_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numHPMInvalidFrameTypeDrops.setStatus('mandatory')
num_hpm_filter_mgt_port_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numHPMFilterMgtPortDrops.setStatus('mandatory')
num_hpm_phys_to_log_port_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numHPMPhysToLogPortDrops.setStatus('mandatory')
num_hpm_null_sfps_pkt_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numHPMNullSFPSPktDrops.setStatus('mandatory')
num_hpm81fd_throttle_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numHPM81fdThrottleDrops.setStatus('mandatory')
num_hpm81ff_throttle_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numHPM81ffThrottleDrops.setStatus('mandatory')
num_hpm_phys_standby_mask_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numHPMPhysStandbyMaskDrops.setStatus('mandatory')
num_bs_inv_src_port_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSInvSrcPortDrops.setStatus('mandatory')
num_bs_source_block_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSSourceBlockDrops.setStatus('mandatory')
num_bs_violation_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 11), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSViolationDrops.setStatus('mandatory')
num_bs_unknown_port_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSUnknownPortDrops.setStatus('mandatory')
num_bs_standby_port_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSStandbyPortDrops.setStatus('mandatory')
num_bs_fabric_nghbr_port_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 14), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSFabricNghbrPortDrops.setStatus('mandatory')
num_bs_going_to_access_port_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 15), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSGoingToAccessPortDrops.setStatus('mandatory')
num_bs_inv_port_type_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 16), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSInvPortTypeDrops.setStatus('mandatory')
num_bs_null_call_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 17), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSNullCallDrops.setStatus('mandatory')
num_bs_null_bottom_cp_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 18), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSNullBottomCPDrops.setStatus('mandatory')
num_bs_inv_csp_type_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 19), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSInvCSPTypeDrops.setStatus('mandatory')
num_bs_non_hello81fd_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 20), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSNonHello81fdDrops.setStatus('mandatory')
num_bscsp_ctrl_disable_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 21), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSCSPCtrlDisableDrops.setStatus('mandatory')
num_bscsp_ctrl_index_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 22), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBSCSPCtrlIndexDrops.setStatus('mandatory')
num_bcp_null_call_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 23), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBCPNullCallDrops.setStatus('mandatory')
num_bcpcp_faulted_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 24), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBCPCPFaultedDrops.setStatus('mandatory')
num_bcp_glean_fail_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 25), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBCPGleanFailDrops.setStatus('mandatory')
num_bcpcp_halted_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 26), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBCPCPHaltedDrops.setStatus('mandatory')
num_bcp_switched_bca_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 27), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBCPSwitchedBCADrops.setStatus('mandatory')
num_bcp_call_not_accepted_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 28), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numBCPCallNotAcceptedDrops.setStatus('mandatory')
num_hpm81fd_null_pkt_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 29), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numHPM81fdNullPktDrops.setStatus('mandatory')
num_hpm81fd_hello_null_pkt_drops = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 1, 7, 5, 30), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numHPM81fdHelloNullPktDrops.setStatus('mandatory')
mibBuilder.exportSymbols('CTRON-SFPS-PKTMGR-MIB', numBSInvCSPTypeDrops=numBSInvCSPTypeDrops, numBCPGleanFailDrops=numBCPGleanFailDrops, sfpsPacketListPktsLeft=sfpsPacketListPktsLeft, numBCPCPHaltedDrops=numBCPCPHaltedDrops, sfpsPacketListNotFound=sfpsPacketListNotFound, sfpsPacketSizeSize=sfpsPacketSizeSize, numBCPCPFaultedDrops=numBCPCPFaultedDrops, numBSNullBottomCPDrops=numBSNullBottomCPDrops, sfpsPacketMgrPacketType=sfpsPacketMgrPacketType, sfpsPacketListTotalPackets=sfpsPacketListTotalPackets, sfpsCSPPacketStatsPacketsSentGood=sfpsCSPPacketStatsPacketsSentGood, sfpsPacketMgrSwitchID=sfpsPacketMgrSwitchID, numBCPCallNotAcceptedDrops=numBCPCallNotAcceptedDrops, sfpsPacketQPriorityQ=sfpsPacketQPriorityQ, sfpsPacketMgrPktsAvailable=sfpsPacketMgrPktsAvailable, numHPMInvalidFrameTypeDrops=numHPMInvalidFrameTypeDrops, sfpsPacketSizeSwitchInstance=sfpsPacketSizeSwitchInstance, numBSFabricNghbrPortDrops=numBSFabricNghbrPortDrops, sfpsPacketSizeTable=sfpsPacketSizeTable, numHPM81fdHelloNullPktDrops=numHPM81fdHelloNullPktDrops, sfpsPacketListSize=sfpsPacketListSize, numBSGoingToAccessPortDrops=numBSGoingToAccessPortDrops, numHPMFilterMgtPortDrops=numHPMFilterMgtPortDrops, sfpsPacketMgrEntry=sfpsPacketMgrEntry, sfpsCSPPacketStatsPacketsSentBad=sfpsCSPPacketStatsPacketsSentBad, numBSCSPCtrlDisableDrops=numBSCSPCtrlDisableDrops, sfpsPacketMgrTooLarge=sfpsPacketMgrTooLarge, numHPM81fdThrottleDrops=numHPM81fdThrottleDrops, numBSNullCallDrops=numBSNullCallDrops, numBSInvSrcPortDrops=numBSInvSrcPortDrops, sfpsPacketMgrToCreate=sfpsPacketMgrToCreate, SfpsSwitchInstance=SfpsSwitchInstance, sfpsPacketListLowWater=sfpsPacketListLowWater, numBSViolationDrops=numBSViolationDrops, sfpsPacketMgrPktsUsed=sfpsPacketMgrPktsUsed, numHPM81ffThrottleDrops=numHPM81ffThrottleDrops, numBSUnknownPortDrops=numBSUnknownPortDrops, sfpsPacketQHighWater=sfpsPacketQHighWater, sfpsCSPPacketStatsPacketsReceivedGood=sfpsCSPPacketStatsPacketsReceivedGood, sfpsPacketMgrTable=sfpsPacketMgrTable, sfpsPacketListEntry=sfpsPacketListEntry, sfpsPacketQTable=sfpsPacketQTable, sfpsPacketQTotalPackets=sfpsPacketQTotalPackets, sfpsPktDispatchStatsVerb=sfpsPktDispatchStatsVerb, numHPMPhysToLogPortDrops=numHPMPhysToLogPortDrops, numBSSourceBlockDrops=numBSSourceBlockDrops, sfpsPacketSizePktsUsed=sfpsPacketSizePktsUsed, numBSCSPCtrlIndexDrops=numBSCSPCtrlIndexDrops, sfpsPacketListTable=sfpsPacketListTable, sfpsPacketQCurrent=sfpsPacketQCurrent, numHPMPhysStandbyMaskDrops=numHPMPhysStandbyMaskDrops, numBSInvPortTypeDrops=numBSInvPortTypeDrops, numBSNonHello81fdDrops=numBSNonHello81fdDrops, numBCPSwitchedBCADrops=numBCPSwitchedBCADrops, sfpsPacketMgrPktsInUse=sfpsPacketMgrPktsInUse, sfpsPacketListPacketType=sfpsPacketListPacketType, sfpsCSPPacketStatsPacketsReceivedBad=sfpsCSPPacketStatsPacketsReceivedBad, numBSStandbyPortDrops=numBSStandbyPortDrops, sfpsPacketMgrTotalPackets=sfpsPacketMgrTotalPackets, sfpsPacketListStatus=sfpsPacketListStatus, sfpsPacketMgrReInit=sfpsPacketMgrReInit, sfpsPacketListPktsInUse=sfpsPacketListPktsInUse, sfpsPacketQEntry=sfpsPacketQEntry, HexInteger=HexInteger, sfpsPacketSizeNotFound=sfpsPacketSizeNotFound, numHPMNullSFPSPktDrops=numHPMNullSFPSPktDrops, numBCPNullCallDrops=numBCPNullCallDrops, sfpsPacketMgrNotFound=sfpsPacketMgrNotFound, numHPM81fdNullPktDrops=numHPM81fdNullPktDrops, sfpsPacketListPktsUsed=sfpsPacketListPktsUsed, sfpsPacketSizeEntry=sfpsPacketSizeEntry) |
# _____ _____ _____ _______ _____
# /\ \ /\ \ /\ \ /::\ \ /\ \
# /::\ \ /::\____\ /::\ \ /::::\ \ /::\ \
# /::::\ \ /:::/ / \:::\ \ /::::::\ \ \:::\ \
# /::::::\ \ /:::/ / \:::\ \ /::::::::\ \ \:::\ \
# /:::/\:::\ \ /:::/ / \:::\ \ /:::/~~\:::\ \ \:::\ \
# /:::/ \:::\ \ /:::/ / \:::\ \ /:::/ \:::\ \ \:::\ \
# /:::/ \:::\ \ /:::/ / /::::\ \ /:::/ / \:::\ \ \:::\ \
# /:::/ / \:::\ \ /:::/ / ____ /::::::\ \ /:::/____/ \:::\____\ \:::\ \
# /:::/ / \:::\ \ /:::/ / /\ \ /:::/\:::\ \ |:::| | |:::| | \:::\ \
# /:::/____/ \:::\____\/:::/____/ /::\ \/:::/ \:::\____\|:::|____| |:::|____|_______________\:::\____\
# \:::\ \ \::/ /\:::\ \ \:::\ /:::/ \::/ / \:::\ _\___/:::/ / \::::::::::::::::::/ /
# \:::\ \ \/____/ \:::\ \ \:::\/:::/ / \/____/ \:::\ |::| /:::/ / \::::::::::::::::/____/
# \:::\ \ \:::\ \ \::::::/ / \:::\|::|/:::/ / \:::\~~~~\~~~~~~
# \:::\ \ \:::\ \ \::::/____/ \::::::::::/ / \:::\ \
# \:::\ \ \:::\ \ \:::\ \ \::::::::/ / \:::\ \
# \:::\ \ \:::\ \ \:::\ \ \::::::/ / \:::\ \
# \:::\ \ \:::\ \ \:::\ \ \::::/____/ \:::\ \
# \:::\____\ \:::\____\ \:::\____\ |::| | \:::\____\
# \::/ / \::/ / \::/ / |::|____| \::/ /
# \/____/ \/____/ \/____/ ~~ \/____/
#
# ~
VERSION = (0,1,2)
__version__ = '.'.join(map(str, VERSION))
| version = (0, 1, 2)
__version__ = '.'.join(map(str, VERSION)) |
class DbObject(object):
def __init__(self, **args):
for (column, value) in args.iteritems():
setattr(self, column, value)
| class Dbobject(object):
def __init__(self, **args):
for (column, value) in args.iteritems():
setattr(self, column, value) |
list1=[1,2,4,5,6]
print(list1[0:2])
print(list1[4])
list1[1]=9
print(list1) # adds data in a particular position
#updating in list
names=['Kiran','Ravi',1996,2001]
print(names)
print("Value at index 2",names[2])
names[2]=2013
print("New Value at index 2 now" , names[2])
print(names)
print(names[:2])
print(names[1:])
print(names[-3:-1])
print(names[:-1])
| list1 = [1, 2, 4, 5, 6]
print(list1[0:2])
print(list1[4])
list1[1] = 9
print(list1)
names = ['Kiran', 'Ravi', 1996, 2001]
print(names)
print('Value at index 2', names[2])
names[2] = 2013
print('New Value at index 2 now', names[2])
print(names)
print(names[:2])
print(names[1:])
print(names[-3:-1])
print(names[:-1]) |
# creates the salt for security !!change this!! on the config.py file
config = {
'secret': 'secret-sauce'
}
| config = {'secret': 'secret-sauce'} |
class Solution:
def findDisappearedNumbers(self, nums: List[int]) -> List[int]:
for i in range(len(nums)):
index = abs(nums[i]) - 1
if nums[index] > 0:
nums[index] = -nums[index]
return [i + 1 for i in range(len(nums)) if nums[i] > 0]
| class Solution:
def find_disappeared_numbers(self, nums: List[int]) -> List[int]:
for i in range(len(nums)):
index = abs(nums[i]) - 1
if nums[index] > 0:
nums[index] = -nums[index]
return [i + 1 for i in range(len(nums)) if nums[i] > 0] |
'''
This directory contains libraries and code for reading file formats
using vendorized dependencies, not necessarily for MS vendor binary
files. These vendorized libraries may still require other platform-dependent
resources such as installed DLLs or 3rd party programs.
Each reader has had it's author's license prepended.
'''
| """
This directory contains libraries and code for reading file formats
using vendorized dependencies, not necessarily for MS vendor binary
files. These vendorized libraries may still require other platform-dependent
resources such as installed DLLs or 3rd party programs.
Each reader has had it's author's license prepended.
""" |
class MyService:
def __init__(self, sso_registry):
self.sso_registry = sso_registry
def handle_request_correctly(self, request, token):
if self.sso_registry.is_valid(token):
return "hello world"
return "please enter your login details"
def handle_request_wrong_token(self, request, token):
if self.sso_registry.is_valid(None):
return "hello world"
return "please enter your login details"
def handle_request_no_call_to_is_valid(self, request, token):
if token:
return "hello world"
return "please enter your login details"
handle_request = handle_request_correctly
| class Myservice:
def __init__(self, sso_registry):
self.sso_registry = sso_registry
def handle_request_correctly(self, request, token):
if self.sso_registry.is_valid(token):
return 'hello world'
return 'please enter your login details'
def handle_request_wrong_token(self, request, token):
if self.sso_registry.is_valid(None):
return 'hello world'
return 'please enter your login details'
def handle_request_no_call_to_is_valid(self, request, token):
if token:
return 'hello world'
return 'please enter your login details'
handle_request = handle_request_correctly |
class Contract(object):
def __init__(self, provider):
self._provider = provider
self._number = None
@property
def provider(self):
return self._provider.calculate()
@property
def number(self):
return self._number
@number.setter
def number(self,value):
self._number = value
| class Contract(object):
def __init__(self, provider):
self._provider = provider
self._number = None
@property
def provider(self):
return self._provider.calculate()
@property
def number(self):
return self._number
@number.setter
def number(self, value):
self._number = value |
three = ['A', 'E', 'I', 'O', 'S', 'a', 'e', 'i', 'o', 's']
for k in range(int(input())):
res = 1
for w in input():
if w in three:
res *= 3
else:
res *= 2
print(res)
| three = ['A', 'E', 'I', 'O', 'S', 'a', 'e', 'i', 'o', 's']
for k in range(int(input())):
res = 1
for w in input():
if w in three:
res *= 3
else:
res *= 2
print(res) |
# -*- coding: utf-8 -*-
def hello():
print("Hello World")
return True
def add_two_things(a, b):
return a+b
| def hello():
print('Hello World')
return True
def add_two_things(a, b):
return a + b |
def partition(arr, start, end):
pivot = arr[end]
tail_index = start
for i in range(start, end):
if arr[i] < pivot:
arr[i], arr[tail_index] = arr[tail_index], arr[i]
tail_index += 1
arr[end], arr[tail_index] = arr[tail_index], arr[end]
return tail_index
def find_kth_min(k, arr):
if k < 1 or k > len(arr):
print('Invalid Input!')
return -1
else:
start = 0
end = len(arr)-1
while start <= end:
pivot_index = partition(arr, start, end)
if pivot_index == (k-1):
return arr[pivot_index]
elif pivot_index < (k-1):
start = pivot_index+1
else:
end = pivot_index-1
def find_kth_max(k, arr):
if k < 1 or k > len(arr):
print('Invalid Input!')
return -1
else:
start = 0
end = len(arr)-1
while start <= end:
pivot_index = partition(arr, start, end)
if pivot_index == (len(arr)-k):
return arr[pivot_index]
elif pivot_index < (len(arr)-k):
start = pivot_index+1
else:
end = pivot_index-1
if __name__ == '__main__':
arr = [10, 2, 7, 4, 9, 6, 3, 8, 1, 5]
k = 9
print("K-th MIN : ", find_kth_min(k, arr))
print("K-th MAX : ", find_kth_max(k, arr))
| def partition(arr, start, end):
pivot = arr[end]
tail_index = start
for i in range(start, end):
if arr[i] < pivot:
(arr[i], arr[tail_index]) = (arr[tail_index], arr[i])
tail_index += 1
(arr[end], arr[tail_index]) = (arr[tail_index], arr[end])
return tail_index
def find_kth_min(k, arr):
if k < 1 or k > len(arr):
print('Invalid Input!')
return -1
else:
start = 0
end = len(arr) - 1
while start <= end:
pivot_index = partition(arr, start, end)
if pivot_index == k - 1:
return arr[pivot_index]
elif pivot_index < k - 1:
start = pivot_index + 1
else:
end = pivot_index - 1
def find_kth_max(k, arr):
if k < 1 or k > len(arr):
print('Invalid Input!')
return -1
else:
start = 0
end = len(arr) - 1
while start <= end:
pivot_index = partition(arr, start, end)
if pivot_index == len(arr) - k:
return arr[pivot_index]
elif pivot_index < len(arr) - k:
start = pivot_index + 1
else:
end = pivot_index - 1
if __name__ == '__main__':
arr = [10, 2, 7, 4, 9, 6, 3, 8, 1, 5]
k = 9
print('K-th MIN : ', find_kth_min(k, arr))
print('K-th MAX : ', find_kth_max(k, arr)) |
# -*- coding: utf-8 -*
def format_table(table, format):
if format == "xml":
return table2xml(keyphrases_table)
elif format == "csv":
return table2csv(keyphrases_table)
else:
raise Exception("Unknown table format: '%s'. "
"Please use one of: 'xml', 'csv'." % format)
def table2xml(keyphrases_table):
res = "<table>\n"
for keyphrase in sorted(keyphrases_table.keys()):
res += ' <keyphrase value="%s">\n' % keyphrase
for text in sorted(keyphrases_table[keyphrase].keys()):
res += ' <text name="%s">' % text
res += '%.3f' % keyphrases_table[keyphrase][text]
res += '</text>\n'
res += ' </keyphrase>\n'
res += "</table>\n"
return res
def table2csv(keyphrases_table):
def quote(s):
return '"' + s.replace('"', "'") + '"'
keyphrases = sorted(keyphrases_table.keys())
texts = sorted(keyphrases_table[keyphrases[0]].keys())
res = "," + ",".join(map(quote, keyphrases)) + "\n" # Heading
for text in texts:
scores = map(lambda score: u"%.3f" % score,
[keyphrases_table[keyphrase][text] for keyphrase in keyphrases])
res += (quote(text) + "," + ",".join(scores) + "\n")
return res
def format_graph(graph, format):
if format == "gml":
return graph2gml(graph)
elif format == "edges":
return graph2edges(graph)
else:
raise Exception("Unknown graph format: '%s'. "
"Please use one of: 'gml', 'edges'." % format)
def graph2edges(graph):
# TODO(mikhaildubov): Exception on the US constitution example!
res = ""
node_edges = {}
for edge in graph["edges"]:
source_label = graph["nodes"][edge["source"]]["label"]
target_label = graph["nodes"][edge["target"]]["label"]
if source_label not in node_edges:
node_edges[source_label] = []
node_edges[source_label].append(target_label)
for node in node_edges:
res += "%s -> %s\n" % (node, ", ".join(node_edges[node]))
return res
def graph2gml(graph):
res = "graph\n[\n"
res += " directed 1\n"
res += " referral_confidence %.2f\n" % graph["referral_confidence"]
res += " relevance_threshold %.2f\n" % graph["relevance_threshold"]
res += " support_threshold %i\n" % graph["support_threshold"]
for node in graph["nodes"]:
res += (' node\n [\n id %i\n label "%s"\n ]\n' %
(node["id"], node["label"]))
for edge in graph["edges"]:
res += (' edge\n [\n source %i\n target %i\n confidence %.2f\n ]\n' %
(edge["source"], edge["target"], edge["confidence"]))
res += "]\n"
return res
| def format_table(table, format):
if format == 'xml':
return table2xml(keyphrases_table)
elif format == 'csv':
return table2csv(keyphrases_table)
else:
raise exception("Unknown table format: '%s'. Please use one of: 'xml', 'csv'." % format)
def table2xml(keyphrases_table):
res = '<table>\n'
for keyphrase in sorted(keyphrases_table.keys()):
res += ' <keyphrase value="%s">\n' % keyphrase
for text in sorted(keyphrases_table[keyphrase].keys()):
res += ' <text name="%s">' % text
res += '%.3f' % keyphrases_table[keyphrase][text]
res += '</text>\n'
res += ' </keyphrase>\n'
res += '</table>\n'
return res
def table2csv(keyphrases_table):
def quote(s):
return '"' + s.replace('"', "'") + '"'
keyphrases = sorted(keyphrases_table.keys())
texts = sorted(keyphrases_table[keyphrases[0]].keys())
res = ',' + ','.join(map(quote, keyphrases)) + '\n'
for text in texts:
scores = map(lambda score: u'%.3f' % score, [keyphrases_table[keyphrase][text] for keyphrase in keyphrases])
res += quote(text) + ',' + ','.join(scores) + '\n'
return res
def format_graph(graph, format):
if format == 'gml':
return graph2gml(graph)
elif format == 'edges':
return graph2edges(graph)
else:
raise exception("Unknown graph format: '%s'. Please use one of: 'gml', 'edges'." % format)
def graph2edges(graph):
res = ''
node_edges = {}
for edge in graph['edges']:
source_label = graph['nodes'][edge['source']]['label']
target_label = graph['nodes'][edge['target']]['label']
if source_label not in node_edges:
node_edges[source_label] = []
node_edges[source_label].append(target_label)
for node in node_edges:
res += '%s -> %s\n' % (node, ', '.join(node_edges[node]))
return res
def graph2gml(graph):
res = 'graph\n[\n'
res += ' directed 1\n'
res += ' referral_confidence %.2f\n' % graph['referral_confidence']
res += ' relevance_threshold %.2f\n' % graph['relevance_threshold']
res += ' support_threshold %i\n' % graph['support_threshold']
for node in graph['nodes']:
res += ' node\n [\n id %i\n label "%s"\n ]\n' % (node['id'], node['label'])
for edge in graph['edges']:
res += ' edge\n [\n source %i\n target %i\n confidence %.2f\n ]\n' % (edge['source'], edge['target'], edge['confidence'])
res += ']\n'
return res |
#!/usr/bin/env python
numbers = [
1721,
979,
366,
299,
675,
1456,
]
# Identify pairs
pairs = list()
for i in numbers:
for j in numbers:
if i+j == 2020:
pairs.append((i, j))
# Remove redundant pairs
for pair in pairs:
i, j = pair
if (j, i) in pairs:
pairs.remove((j, i))
# Print the answer[s]
for pair in pairs:
print(pair[0]*pair[1])
| numbers = [1721, 979, 366, 299, 675, 1456]
pairs = list()
for i in numbers:
for j in numbers:
if i + j == 2020:
pairs.append((i, j))
for pair in pairs:
(i, j) = pair
if (j, i) in pairs:
pairs.remove((j, i))
for pair in pairs:
print(pair[0] * pair[1]) |
class CollectionClass:
def __init__(self, items, params):
self.items = items
self.params = params
self.cursor = 0
def items(self):
return self.items
def params(self):
return self.params
def delete_all(self):
self.cursor = 0
while len(self.items) > 0:
item = self.items.pop()
item.delete()
return True
def first(self):
self.cursor = 0
if len(self.items) > 0:
return self.items[0]
else:
return None
# TODO: Add tests
def iter(self):
if self.cursor + 1 < len(self.items):
self.cursor += 1
return self.items[self.cursor]
else:
return None
| class Collectionclass:
def __init__(self, items, params):
self.items = items
self.params = params
self.cursor = 0
def items(self):
return self.items
def params(self):
return self.params
def delete_all(self):
self.cursor = 0
while len(self.items) > 0:
item = self.items.pop()
item.delete()
return True
def first(self):
self.cursor = 0
if len(self.items) > 0:
return self.items[0]
else:
return None
def iter(self):
if self.cursor + 1 < len(self.items):
self.cursor += 1
return self.items[self.cursor]
else:
return None |
# execfile(r'C:\qtlab-aalto\scripts\Qubit\TimeDomain\swap_batch\0dbm_swap\swap_with_high_pulse_30.py')
# execfile(r'C:\qtlab-aalto\scripts\Qubit\TimeDomain\swap_batch\0dbm_swap\swap_with_high_pulse_100.py')
#execfile(r'C:\qtlab-aalto\scripts\Qubit\TimeDomain\swap_batch\0dbm_swap\swap_with_high_pulse_200.py')
#execfile(r'C:\qtlab-aalto\scripts\Qubit\TimeDomain\swap_batch\0dbm_swap\swap_with_high_pulse_300.py')
#execfile(r'C:\qtlab-aalto\scripts\Qubit\TimeDomain\swap_batch\0dbm_swap\swap_with_high_pulse_400.py')
#execfile(r'C:\qtlab-aalto\scripts\Qubit\TimeDomain\swap_batch\0dbm_swap\swap_with_high_pulse_500.py')
#execfile(r'C:\qtlab-aalto\scripts\Qubit\TimeDomain\swap_batch\0dbm_swap\swap_with_high_pulse_600.py')
#execfile(r'C:\qtlab-aalto\scripts\Qubit\TimeDomain\swap_batch\0dbm_swap\swap_with_high_pulse_800.py')
#execfile(r'C:\qtlab-aalto\scripts\Qubit\TimeDomain\swap_batch\0dbm_swap\swap_with_high_pulse_1000.py')
execfile(r'C:\qtlab-aalto\scripts\Qubit\TimeDomain\swap_batch\0dbm_swap\swap_with_high_pulse_2000.py')
execfile(r'C:\qtlab-aalto\scripts\Qubit\TimeDomain\swap_batch\0dbm_swap\swap_with_high_pulse_3000.py')
execfile(r'C:\qtlab-aalto\scripts\Qubit\TimeDomain\swap_batch\0dbm_swap\swap_with_high_pulse_4000.py')
execfile(r'C:\qtlab-aalto\scripts\Qubit\TimeDomain\swap_batch\0dbm_swap\swap_with_high_pulse_5000.py')
| execfile('C:\\qtlab-aalto\\scripts\\Qubit\\TimeDomain\\swap_batch\\0dbm_swap\\swap_with_high_pulse_2000.py')
execfile('C:\\qtlab-aalto\\scripts\\Qubit\\TimeDomain\\swap_batch\\0dbm_swap\\swap_with_high_pulse_3000.py')
execfile('C:\\qtlab-aalto\\scripts\\Qubit\\TimeDomain\\swap_batch\\0dbm_swap\\swap_with_high_pulse_4000.py')
execfile('C:\\qtlab-aalto\\scripts\\Qubit\\TimeDomain\\swap_batch\\0dbm_swap\\swap_with_high_pulse_5000.py') |
def test():
r0 = 123.0
r1 = 123.1
r2 = 123.2
r3 = 123.3
r4 = 123.4
r5 = 123.5
r6 = 123.6
r7 = 123.7
r8 = 123.8
r9 = 123.9
i = 0
while i < 1e7:
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
i += 1
test()
| def test():
r0 = 123.0
r1 = 123.1
r2 = 123.2
r3 = 123.3
r4 = 123.4
r5 = 123.5
r6 = 123.6
r7 = 123.7
r8 = 123.8
r9 = 123.9
i = 0
while i < 10000000.0:
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
t = r0
t = r1
t = r2
t = r3
t = r4
t = r5
t = r6
t = r7
t = r8
t = r9
i += 1
test() |
def permutation(array, start = 0):
if (start == len(array)):
print(array)
return
for i in range(start, len(array)):
array[start], array[i] = array[i], array[start]
permutation(array, start + 1)
array[start], array[i] = array[i], array[start]
if __name__ == "__main__":
permutation(['d','a','n'])
| def permutation(array, start=0):
if start == len(array):
print(array)
return
for i in range(start, len(array)):
(array[start], array[i]) = (array[i], array[start])
permutation(array, start + 1)
(array[start], array[i]) = (array[i], array[start])
if __name__ == '__main__':
permutation(['d', 'a', 'n']) |
#Getting Input
strInput = input('Enter a string: ')
#Check if string is empty
if strInput == "":
print('The string is empty.')
else:
#String length function
print(len(strInput)) | str_input = input('Enter a string: ')
if strInput == '':
print('The string is empty.')
else:
print(len(strInput)) |
#
# @lc app=leetcode id=172 lang=python3
#
# [172] Factorial Trailing Zeroes
#
# @lc code=start
class Solution:
def trailingZeroes(self, n: int) -> int:
res = 0
while n > 0:
n //= 5
res += n
return res
# @lc code=end
# Accepted
# 502/502 cases passed(32 ms)
# Your runtime beats 88.85 % of python3 submissions
# Your memory usage beats 100 % of python3 submissions(12.6 MB)
| class Solution:
def trailing_zeroes(self, n: int) -> int:
res = 0
while n > 0:
n //= 5
res += n
return res |
income = float(input())
middle_grade = float(input())
minimal_payment = float(input())
scholarship = 0
if income < minimal_payment and middle_grade > 4.50:
scholarship = minimal_payment * 0.65
elif middle_grade <= 5.50:
scholarship = middle_grade * 25
| income = float(input())
middle_grade = float(input())
minimal_payment = float(input())
scholarship = 0
if income < minimal_payment and middle_grade > 4.5:
scholarship = minimal_payment * 0.65
elif middle_grade <= 5.5:
scholarship = middle_grade * 25 |
def estimate_probability(word, previous_n_gram,
n_gram_counts, n_plus1_gram_counts, vocabulary_size, k=1.0):
denominator = n_gram_counts.get(previous_n_gram, 0)
denominator += k * vocabulary_size
numerator = n_plus1_gram_counts.get(previous_n_gram + ' ' + word, 0)
numerator += k
probability = numerator / denominator
return probability | def estimate_probability(word, previous_n_gram, n_gram_counts, n_plus1_gram_counts, vocabulary_size, k=1.0):
denominator = n_gram_counts.get(previous_n_gram, 0)
denominator += k * vocabulary_size
numerator = n_plus1_gram_counts.get(previous_n_gram + ' ' + word, 0)
numerator += k
probability = numerator / denominator
return probability |
# Hayley
# Check if a number is prime
p = 13 * 17
m = 2
while m < p:
if p % m == 0:
print(m , "divides", p, "and therefore", p, "is not prime.")
m = m + 1 | p = 13 * 17
m = 2
while m < p:
if p % m == 0:
print(m, 'divides', p, 'and therefore', p, 'is not prime.')
m = m + 1 |
class QuickFindUF:
id = []
def __init__(self, N):
self.id = []
for i in range(N):
self.id[i] = i
def connected(self, p, q):
return self.id[p] == self.id[q]
def union(self, p, q):
pid = self.id[p]
qid = self.id[q]
for i in range(len(self.id)):
if id[i] == pid:
id[i] = qid
| class Quickfinduf:
id = []
def __init__(self, N):
self.id = []
for i in range(N):
self.id[i] = i
def connected(self, p, q):
return self.id[p] == self.id[q]
def union(self, p, q):
pid = self.id[p]
qid = self.id[q]
for i in range(len(self.id)):
if id[i] == pid:
id[i] = qid |
#!/usr/bin/python3
class Solution:
def isPalindrome(self, x: int) -> bool:
if x < 0:
return False
elif x < 10:
return True
reversed, k = 0, x
while k != 0:
reversed = reversed * 10 + (k % 10)
k //= 10
return x == reversed
| class Solution:
def is_palindrome(self, x: int) -> bool:
if x < 0:
return False
elif x < 10:
return True
(reversed, k) = (0, x)
while k != 0:
reversed = reversed * 10 + k % 10
k //= 10
return x == reversed |
max=0
while True:
a=int(input("masukan bilangan : "))
if max < a :
max = a
if a==0:
break
print("bilangan terbesar adalah = ",max) | max = 0
while True:
a = int(input('masukan bilangan : '))
if max < a:
max = a
if a == 0:
break
print('bilangan terbesar adalah = ', max) |
class Person:
"This is the Base Class"
def get_name(self, name):
"This is the Person Class Function"
self.name= name
def get_details(self):
return self.name
class Student(Person):
def fill_details(self, name, branch, year):
Person.get_name(self, name)
self.branch = branch
self.year = year
def get_details(self):
print("Name:", Person.get_details(self))
# print("Name:", self.name)
print("Branch:", self.branch)
print("Year:", self.year)
p1=Person()
s1=Student()
p1.get_name("ABC")
s1.fill_details("XYZ", "CSE", 2020)
print(p1.get_details())
s1.get_details()
# Class built-in Attributes
print(Student.__bases__)
print(Student.__dict__)
print(s1.__dict__)
print(Student.__name__)
print(s1.__module__)
print(Person.__doc__)
print(Person.get_name.__doc__)
print(p1.get_name.__doc__)
| class Person:
"""This is the Base Class"""
def get_name(self, name):
"""This is the Person Class Function"""
self.name = name
def get_details(self):
return self.name
class Student(Person):
def fill_details(self, name, branch, year):
Person.get_name(self, name)
self.branch = branch
self.year = year
def get_details(self):
print('Name:', Person.get_details(self))
print('Branch:', self.branch)
print('Year:', self.year)
p1 = person()
s1 = student()
p1.get_name('ABC')
s1.fill_details('XYZ', 'CSE', 2020)
print(p1.get_details())
s1.get_details()
print(Student.__bases__)
print(Student.__dict__)
print(s1.__dict__)
print(Student.__name__)
print(s1.__module__)
print(Person.__doc__)
print(Person.get_name.__doc__)
print(p1.get_name.__doc__) |
n, k=map(int,input().split())
e=list(map(int,input().split()))
p=v=0
a=''
for c, i in enumerate(e[1:]):
if i > e[c]:
if a == 'd':v+=1
a='s'
elif i < e[c]:
if a=='s': p+=1
a='d'
print('beautiful') if k==p==v+1 else print('ugly')
| (n, k) = map(int, input().split())
e = list(map(int, input().split()))
p = v = 0
a = ''
for (c, i) in enumerate(e[1:]):
if i > e[c]:
if a == 'd':
v += 1
a = 's'
elif i < e[c]:
if a == 's':
p += 1
a = 'd'
print('beautiful') if k == p == v + 1 else print('ugly') |
########## Imports and other setup ############
########## Preparing data ##############
target = open('../data/example').read().split(': ')[1].split(', ')
xTarget = target[0]; yTarget = target[1]
xTarget = xTarget.split('=')[1].split('..'); yTarget = yTarget.split('=')[1].split('..')
xTarget = [int(x) for x in xTarget]; yTarget = [int(y) for y in yTarget]
position = {'x':0, 'y':0}
velocity = {'x':0, 'y':0}
########### Functions that update the positions and check if a certain position matches target area############
def applyVelocity(): position['x'] += velocity['x']; position['y'] += velocity['y']
def applyDrag():
if velocity['x'] > 0: velocity['x'] -=1
def applyGravity(): velocity['y'] -= 1
def matchesTargetArea():
if xTarget[0] <= position['x'] <= xTarget[1] and yTarget[0] <= position['y'] <= yTarget[1]: return True
return False
def neverGonnaMatchArea():
if velocity['x'] == xTarget[0] and position['y'] < yTarget[0] and velocity['y'] < 0: return True
return False
############ Actual solution ###############
## We are going to try a lot of different velocities but let's pick our values carefully
## Like we can't select an x value for velocity that is higher than the x value of target area
## We can say this because the x seeks 0, y on the other hand will just continue to get more negative
## Thus we know the initial y value can not be more negative than the target area. So some limit on y
## Also the problem is to find the highest y value. We also know that y/x is the
## So we have at least some initial thoughts on what values we should try. Let's try them.
def doesItHitTheTarget(vel):
velocity['x'] = vel[0]; velocity['y'] = vel[1]
while True:
if matchesTargetArea(): position['x'] = 0; position['y'] = 0; velocity['x'] = 0; velocity['y'] = 0; return vel, True
elif neverGonnaMatchArea(): position['x'] = 0; position['y'] = 0; velocity['x'] = 0; velocity['y'] = 0; return vel, False
applyVelocity(); applyDrag(); applyGravity()
def doesRangeHitTarget(x_max = 10, y_min = -10, y_max = 10):
velsThatHitTarget = []
for y in range(y_min, y_max):
for x in range(1,x_max):
vel, b = doesItHitTheTarget((x,y))
if b: velsThatHitTarget.append(vel)
return velsThatHitTarget
def getHighestYValue(vel):
velocity['x'] = vel[0]; velocity['y'] = vel[1]
while True:
if velocity['y'] <= 0:
x,y = position['x'], position['y']
position['x'] = 0; position['y'] = 0; velocity['x'] = 0; velocity['y'] = 0
return vel, (x,y)
applyVelocity(); applyDrag(); applyGravity()
def getAllHighestValues(hits):
topVelOPoint = {}
for hit in hits:
vel, pos = getHighestYValue(hit)
topVelOPoint[vel] = pos
return topVelOPoint
pointsThatHitTarget = doesRangeHitTarget(x_max=xTarget[1], y_min=yTarget[1])
allHighestValues = getAllHighestValues(pointsThatHitTarget) | target = open('../data/example').read().split(': ')[1].split(', ')
x_target = target[0]
y_target = target[1]
x_target = xTarget.split('=')[1].split('..')
y_target = yTarget.split('=')[1].split('..')
x_target = [int(x) for x in xTarget]
y_target = [int(y) for y in yTarget]
position = {'x': 0, 'y': 0}
velocity = {'x': 0, 'y': 0}
def apply_velocity():
position['x'] += velocity['x']
position['y'] += velocity['y']
def apply_drag():
if velocity['x'] > 0:
velocity['x'] -= 1
def apply_gravity():
velocity['y'] -= 1
def matches_target_area():
if xTarget[0] <= position['x'] <= xTarget[1] and yTarget[0] <= position['y'] <= yTarget[1]:
return True
return False
def never_gonna_match_area():
if velocity['x'] == xTarget[0] and position['y'] < yTarget[0] and (velocity['y'] < 0):
return True
return False
def does_it_hit_the_target(vel):
velocity['x'] = vel[0]
velocity['y'] = vel[1]
while True:
if matches_target_area():
position['x'] = 0
position['y'] = 0
velocity['x'] = 0
velocity['y'] = 0
return (vel, True)
elif never_gonna_match_area():
position['x'] = 0
position['y'] = 0
velocity['x'] = 0
velocity['y'] = 0
return (vel, False)
apply_velocity()
apply_drag()
apply_gravity()
def does_range_hit_target(x_max=10, y_min=-10, y_max=10):
vels_that_hit_target = []
for y in range(y_min, y_max):
for x in range(1, x_max):
(vel, b) = does_it_hit_the_target((x, y))
if b:
velsThatHitTarget.append(vel)
return velsThatHitTarget
def get_highest_y_value(vel):
velocity['x'] = vel[0]
velocity['y'] = vel[1]
while True:
if velocity['y'] <= 0:
(x, y) = (position['x'], position['y'])
position['x'] = 0
position['y'] = 0
velocity['x'] = 0
velocity['y'] = 0
return (vel, (x, y))
apply_velocity()
apply_drag()
apply_gravity()
def get_all_highest_values(hits):
top_vel_o_point = {}
for hit in hits:
(vel, pos) = get_highest_y_value(hit)
topVelOPoint[vel] = pos
return topVelOPoint
points_that_hit_target = does_range_hit_target(x_max=xTarget[1], y_min=yTarget[1])
all_highest_values = get_all_highest_values(pointsThatHitTarget) |
#!/usr/bin/python3
# -*-coding:utf-8-*-
__author__ = "Bannings"
class Solution:
def toGoatLatin(self, S: str) -> str:
vowel = set([
'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U',
])
ans, words_count, first_char, is_begin = [], 1, "", True
for char in S:
if char == " ":
if is_begin: continue
tail = "a" * words_count
ans.append(f"{first_char}ma{tail}")
is_begin, first_char, words_count = True, "", words_count + 1
elif is_begin:
if words_count > 1: ans.append(" ")
if char in vowel:
ans.append(char)
else:
first_char = char
is_begin = False
else:
ans.append(char)
if not is_begin:
tail = "a" * words_count
ans.append(f"{first_char}ma{tail}")
return "".join(ans)
if __name__ == '__main__':
assert Solution().toGoatLatin("I speak Goat Latin") == "Imaa peaksmaaa oatGmaaaa atinLmaaaaa"
assert Solution().toGoatLatin(" I speak Goat Latin") == "Imaa peaksmaaa oatGmaaaa atinLmaaaaa"
assert Solution().toGoatLatin(" I speak Goat Latin ") == "Imaa peaksmaaa oatGmaaaa atinLmaaaaa"
assert Solution().toGoatLatin("The quick brown fox jumped over the lazy dog") == "heTmaa uickqmaaa rownbmaaaa oxfmaaaaa umpedjmaaaaaa overmaaaaaaa hetmaaaaaaaa azylmaaaaaaaaa ogdmaaaaaaaaaa"
| __author__ = 'Bannings'
class Solution:
def to_goat_latin(self, S: str) -> str:
vowel = set(['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'])
(ans, words_count, first_char, is_begin) = ([], 1, '', True)
for char in S:
if char == ' ':
if is_begin:
continue
tail = 'a' * words_count
ans.append(f'{first_char}ma{tail}')
(is_begin, first_char, words_count) = (True, '', words_count + 1)
elif is_begin:
if words_count > 1:
ans.append(' ')
if char in vowel:
ans.append(char)
else:
first_char = char
is_begin = False
else:
ans.append(char)
if not is_begin:
tail = 'a' * words_count
ans.append(f'{first_char}ma{tail}')
return ''.join(ans)
if __name__ == '__main__':
assert solution().toGoatLatin('I speak Goat Latin') == 'Imaa peaksmaaa oatGmaaaa atinLmaaaaa'
assert solution().toGoatLatin(' I speak Goat Latin') == 'Imaa peaksmaaa oatGmaaaa atinLmaaaaa'
assert solution().toGoatLatin(' I speak Goat Latin ') == 'Imaa peaksmaaa oatGmaaaa atinLmaaaaa'
assert solution().toGoatLatin('The quick brown fox jumped over the lazy dog') == 'heTmaa uickqmaaa rownbmaaaa oxfmaaaaa umpedjmaaaaaa overmaaaaaaa hetmaaaaaaaa azylmaaaaaaaaa ogdmaaaaaaaaaa' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.