content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
class MonoidLawTester:
def __init__(self, monoid, value):
self.monoid = monoid
self.value = value
def left_identity_test(self):
monoid = self.monoid(self.value)
assert monoid.concat(monoid.neutral()) == monoid
def right_identity_test(self):
monoid = self.monoid(self.value)
assert monoid.neutral().concat(monoid) == monoid
def test(self):
self.left_identity_test()
self.right_identity_test()
| class Monoidlawtester:
def __init__(self, monoid, value):
self.monoid = monoid
self.value = value
def left_identity_test(self):
monoid = self.monoid(self.value)
assert monoid.concat(monoid.neutral()) == monoid
def right_identity_test(self):
monoid = self.monoid(self.value)
assert monoid.neutral().concat(monoid) == monoid
def test(self):
self.left_identity_test()
self.right_identity_test() |
class Circulo:
pi = 3.14 # variable de clase (sin self), puede ser utilizadas por las instancias
def __init__(self,radio):
self.radio = radio # radio es una variable de instancia
circle1 = Circulo(10)
circle2 = Circulo(20)
print(circle1.radio)
circle2.radio = 100
print(circle2.radio)
# uso de la variable sin instancia
print(Circulo.pi)
| class Circulo:
pi = 3.14
def __init__(self, radio):
self.radio = radio
circle1 = circulo(10)
circle2 = circulo(20)
print(circle1.radio)
circle2.radio = 100
print(circle2.radio)
print(Circulo.pi) |
# -*- coding:utf-8 -*-
class Type:
id = ''
word_id = ''
name = ''
meanings = []
def desc(self):
name = self.name if self.name is not None else ''
return '(\'' + self.word_id + '\', \'' + name + '\')'
| class Type:
id = ''
word_id = ''
name = ''
meanings = []
def desc(self):
name = self.name if self.name is not None else ''
return "('" + self.word_id + "', '" + name + "')" |
##Clock in pt2thon##
t1 = input("Init schedule : ") # first schedule
HH1 = int(t1[0] + t1[1])
MM1 = int(t1[3] + t1[4])
SS1 = int(t1[6] + t1[7])
t2 = input("Final schedule : ") # second schedule
HH2 = int(t2[0] + t2[1])
MM2 = int(t2[3] + t2[4])
SS2 = int(t2[6] + t2[7])
tt1 = (HH1 * 3600) + (MM1 * 60) + SS1 # total schedule 1
tt2 = (HH2 * 3600) + (MM2 * 60) + SS2 # total schedule 2
tt3 = tt2 - tt1 # difference between tt2 e tt1
# Part Math
if tt3 < 0:
# If the difference between tt2 e tt1 for negative :
a = 86400 - tt1 # 86400 is seconds in 1 day;
a2 = a + tt2 # a2 is the difference between 1 day e the <hours var>;
Ht = a2 // 3600 # Ht is hours calculated;
a = a2 % 3600 # Convert 'a' in seconds;
Mt = a // 60 # Mt is minutes calculated;
St = a % 60 # St is seconds calculated;
else:
# If the difference between tt2 e tt1 for positive :
Ht = tt3 // 3600 # Ht is hours calculated;
z = tt3 % 3600 # 'z' is tt3 converting in hours by seconds
Mt = z // 60 # Mt is minutes calculated;
St = tt3 % 60 # St is seconds calculated;
# special condition below :
if Ht < 10:
h = "0" + str(Ht)
Ht = h
if Mt < 10:
m = "0" + str(Mt)
Mt = m
if St < 10:
s = "0" + str(St)
St = s
# add '0' to the empty spaces (caused by previous operations) in the final result!
print(
"final result is :", str(Ht) + ":" + str(Mt) + ":" + str(St)
) # final result (formatted in clock)
| t1 = input('Init schedule : ')
hh1 = int(t1[0] + t1[1])
mm1 = int(t1[3] + t1[4])
ss1 = int(t1[6] + t1[7])
t2 = input('Final schedule : ')
hh2 = int(t2[0] + t2[1])
mm2 = int(t2[3] + t2[4])
ss2 = int(t2[6] + t2[7])
tt1 = HH1 * 3600 + MM1 * 60 + SS1
tt2 = HH2 * 3600 + MM2 * 60 + SS2
tt3 = tt2 - tt1
if tt3 < 0:
a = 86400 - tt1
a2 = a + tt2
ht = a2 // 3600
a = a2 % 3600
mt = a // 60
st = a % 60
else:
ht = tt3 // 3600
z = tt3 % 3600
mt = z // 60
st = tt3 % 60
if Ht < 10:
h = '0' + str(Ht)
ht = h
if Mt < 10:
m = '0' + str(Mt)
mt = m
if St < 10:
s = '0' + str(St)
st = s
print('final result is :', str(Ht) + ':' + str(Mt) + ':' + str(St)) |
# PySNMP SMI module. Autogenerated from smidump -f python IANA-MAU-MIB
# by libsmi2pysnmp-0.1.3 at Thu May 22 11:57:41 2014,
# Python version sys.version_info(major=2, minor=7, micro=2, releaselevel='final', serial=0)
# Imports
( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
( ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint")
( Bits, Integer32, ModuleIdentity, MibIdentifier, ObjectIdentity, TimeTicks, mib_2, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "ModuleIdentity", "MibIdentifier", "ObjectIdentity", "TimeTicks", "mib-2")
( TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention")
# Types
class IANAifJackType(Integer):
subtypeSpec = Integer.subtypeSpec+SingleValueConstraint(9,15,11,3,7,8,12,4,2,1,13,6,5,10,14,)
namedValues = NamedValues(("other", 1), ("fiberST", 10), ("telco", 11), ("mtrj", 12), ("hssdc", 13), ("fiberLC", 14), ("cx4", 15), ("rj45", 2), ("rj45S", 3), ("db9", 4), ("bnc", 5), ("fAUI", 6), ("mAUI", 7), ("fiberSC", 8), ("fiberMIC", 9), )
class IANAifMauAutoNegCapBits(Bits):
namedValues = NamedValues(("bOther", 0), ("b10baseT", 1), ("bFdxSPause", 10), ("bFdxBPause", 11), ("b1000baseX", 12), ("b1000baseXFD", 13), ("b1000baseT", 14), ("b1000baseTFD", 15), ("b10baseTFD", 2), ("b100baseT4", 3), ("b100baseTX", 4), ("b100baseTXFD", 5), ("b100baseT2", 6), ("b100baseT2FD", 7), ("bFdxPause", 8), ("bFdxAPause", 9), )
class IANAifMauMediaAvailable(Integer):
subtypeSpec = Integer.subtypeSpec+SingleValueConstraint(9,3,12,13,20,6,2,17,1,14,10,7,5,4,16,11,15,8,18,19,)
namedValues = NamedValues(("other", 1), ("offline", 10), ("autoNegError", 11), ("pmdLinkFault", 12), ("wisFrameLoss", 13), ("wisSignalLoss", 14), ("pcsLinkFault", 15), ("excessiveBER", 16), ("dxsLinkFault", 17), ("pxsLinkFault", 18), ("availableReduced", 19), ("unknown", 2), ("ready", 20), ("available", 3), ("notAvailable", 4), ("remoteFault", 5), ("invalidSignal", 6), ("remoteJabber", 7), ("remoteLinkLoss", 8), ("remoteTest", 9), )
class IANAifMauTypeListBits(Bits):
namedValues = NamedValues(("bOther", 0), ("bAUI", 1), ("b10baseTHD", 10), ("b10baseTFD", 11), ("b10baseFLHD", 12), ("b10baseFLFD", 13), ("b100baseT4", 14), ("b100baseTXHD", 15), ("b100baseTXFD", 16), ("b100baseFXHD", 17), ("b100baseFXFD", 18), ("b100baseT2HD", 19), ("b10base5", 2), ("b100baseT2FD", 20), ("b1000baseXHD", 21), ("b1000baseXFD", 22), ("b1000baseLXHD", 23), ("b1000baseLXFD", 24), ("b1000baseSXHD", 25), ("b1000baseSXFD", 26), ("b1000baseCXHD", 27), ("b1000baseCXFD", 28), ("b1000baseTHD", 29), ("bFoirl", 3), ("b1000baseTFD", 30), ("b10GbaseX", 31), ("b10GbaseLX4", 32), ("b10GbaseR", 33), ("b10GbaseER", 34), ("b10GbaseLR", 35), ("b10GbaseSR", 36), ("b10GbaseW", 37), ("b10GbaseEW", 38), ("b10GbaseLW", 39), ("b10base2", 4), ("b10GbaseSW", 40), ("b10GbaseCX4", 41), ("b2BaseTL", 42), ("b10PassTS", 43), ("b100BaseBX10D", 44), ("b100BaseBX10U", 45), ("b100BaseLX10", 46), ("b1000BaseBX10D", 47), ("b1000BaseBX10U", 48), ("b1000BaseLX10", 49), ("b10baseT", 5), ("b1000BasePX10D", 50), ("b1000BasePX10U", 51), ("b1000BasePX20D", 52), ("b1000BasePX20U", 53), ("b10baseFP", 6), ("b10baseFB", 7), ("b10baseFL", 8), ("b10broad36", 9), )
# Objects
dot3MauType = MibIdentifier((1, 3, 6, 1, 2, 1, 26, 4))
dot3MauTypeAUI = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 1))
if mibBuilder.loadTexts: dot3MauTypeAUI.setDescription("no internal MAU, view from AUI")
dot3MauType10Base5 = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 2))
if mibBuilder.loadTexts: dot3MauType10Base5.setDescription("thick coax MAU")
dot3MauTypeFoirl = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 3))
if mibBuilder.loadTexts: dot3MauTypeFoirl.setDescription("FOIRL MAU")
dot3MauType10Base2 = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 4))
if mibBuilder.loadTexts: dot3MauType10Base2.setDescription("thin coax MAU")
dot3MauType10BaseT = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 5))
if mibBuilder.loadTexts: dot3MauType10BaseT.setDescription("UTP MAU.\nNote that it is strongly recommended that\nagents return either dot3MauType10BaseTHD or\ndot3MauType10BaseTFD if the duplex mode is\nknown. However, management applications should\nbe prepared to receive this MAU type value from\nolder agent implementations.")
dot3MauType10BaseFP = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 6))
if mibBuilder.loadTexts: dot3MauType10BaseFP.setDescription("passive fiber MAU")
dot3MauType10BaseFB = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 7))
if mibBuilder.loadTexts: dot3MauType10BaseFB.setDescription("sync fiber MAU")
dot3MauType10BaseFL = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 8))
if mibBuilder.loadTexts: dot3MauType10BaseFL.setDescription("async fiber MAU.\nNote that it is strongly recommended that\nagents return either dot3MauType10BaseFLHD or\ndot3MauType10BaseFLFD if the duplex mode is\nknown. However, management applications should\nbe prepared to receive this MAU type value from\nolder agent implementations.")
dot3MauType10Broad36 = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 9))
if mibBuilder.loadTexts: dot3MauType10Broad36.setDescription("broadband DTE MAU.\nNote that 10BROAD36 MAUs can be attached to\ninterfaces but not to repeaters.")
dot3MauType10BaseTHD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 10))
if mibBuilder.loadTexts: dot3MauType10BaseTHD.setDescription("UTP MAU, half duplex mode")
dot3MauType10BaseTFD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 11))
if mibBuilder.loadTexts: dot3MauType10BaseTFD.setDescription("UTP MAU, full duplex mode")
dot3MauType10BaseFLHD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 12))
if mibBuilder.loadTexts: dot3MauType10BaseFLHD.setDescription("async fiber MAU, half duplex mode")
dot3MauType10BaseFLFD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 13))
if mibBuilder.loadTexts: dot3MauType10BaseFLFD.setDescription("async fiber MAU, full duplex mode")
dot3MauType100BaseT4 = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 14))
if mibBuilder.loadTexts: dot3MauType100BaseT4.setDescription("4 pair category 3 UTP")
dot3MauType100BaseTXHD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 15))
if mibBuilder.loadTexts: dot3MauType100BaseTXHD.setDescription("2 pair category 5 UTP, half duplex mode")
dot3MauType100BaseTXFD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 16))
if mibBuilder.loadTexts: dot3MauType100BaseTXFD.setDescription("2 pair category 5 UTP, full duplex mode")
dot3MauType100BaseFXHD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 17))
if mibBuilder.loadTexts: dot3MauType100BaseFXHD.setDescription("X fiber over PMT, half duplex mode")
dot3MauType100BaseFXFD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 18))
if mibBuilder.loadTexts: dot3MauType100BaseFXFD.setDescription("X fiber over PMT, full duplex mode")
dot3MauType100BaseT2HD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 19))
if mibBuilder.loadTexts: dot3MauType100BaseT2HD.setDescription("2 pair category 3 UTP, half duplex mode")
dot3MauType100BaseT2FD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 20))
if mibBuilder.loadTexts: dot3MauType100BaseT2FD.setDescription("2 pair category 3 UTP, full duplex mode")
dot3MauType1000BaseXHD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 21))
if mibBuilder.loadTexts: dot3MauType1000BaseXHD.setDescription("PCS/PMA, unknown PMD, half duplex mode")
dot3MauType1000BaseXFD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 22))
if mibBuilder.loadTexts: dot3MauType1000BaseXFD.setDescription("PCS/PMA, unknown PMD, full duplex mode")
dot3MauType1000BaseLXHD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 23))
if mibBuilder.loadTexts: dot3MauType1000BaseLXHD.setDescription("Fiber over long-wavelength laser, half duplex\nmode")
dot3MauType1000BaseLXFD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 24))
if mibBuilder.loadTexts: dot3MauType1000BaseLXFD.setDescription("Fiber over long-wavelength laser, full duplex\nmode")
dot3MauType1000BaseSXHD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 25))
if mibBuilder.loadTexts: dot3MauType1000BaseSXHD.setDescription("Fiber over short-wavelength laser, half\nduplex mode")
dot3MauType1000BaseSXFD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 26))
if mibBuilder.loadTexts: dot3MauType1000BaseSXFD.setDescription("Fiber over short-wavelength laser, full\nduplex mode")
dot3MauType1000BaseCXHD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 27))
if mibBuilder.loadTexts: dot3MauType1000BaseCXHD.setDescription("Copper over 150-Ohm balanced cable, half\nduplex mode")
dot3MauType1000BaseCXFD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 28))
if mibBuilder.loadTexts: dot3MauType1000BaseCXFD.setDescription("Copper over 150-Ohm balanced cable, full\n\nduplex mode")
dot3MauType1000BaseTHD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 29))
if mibBuilder.loadTexts: dot3MauType1000BaseTHD.setDescription("Four-pair Category 5 UTP, half duplex mode")
dot3MauType1000BaseTFD = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 30))
if mibBuilder.loadTexts: dot3MauType1000BaseTFD.setDescription("Four-pair Category 5 UTP, full duplex mode")
dot3MauType10GigBaseX = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 31))
if mibBuilder.loadTexts: dot3MauType10GigBaseX.setDescription("X PCS/PMA, unknown PMD.")
dot3MauType10GigBaseLX4 = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 32))
if mibBuilder.loadTexts: dot3MauType10GigBaseLX4.setDescription("X fiber over WWDM optics")
dot3MauType10GigBaseR = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 33))
if mibBuilder.loadTexts: dot3MauType10GigBaseR.setDescription("R PCS/PMA, unknown PMD.")
dot3MauType10GigBaseER = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 34))
if mibBuilder.loadTexts: dot3MauType10GigBaseER.setDescription("R fiber over 1550 nm optics")
dot3MauType10GigBaseLR = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 35))
if mibBuilder.loadTexts: dot3MauType10GigBaseLR.setDescription("R fiber over 1310 nm optics")
dot3MauType10GigBaseSR = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 36))
if mibBuilder.loadTexts: dot3MauType10GigBaseSR.setDescription("R fiber over 850 nm optics")
dot3MauType10GigBaseW = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 37))
if mibBuilder.loadTexts: dot3MauType10GigBaseW.setDescription("W PCS/PMA, unknown PMD.")
dot3MauType10GigBaseEW = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 38))
if mibBuilder.loadTexts: dot3MauType10GigBaseEW.setDescription("W fiber over 1550 nm optics")
dot3MauType10GigBaseLW = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 39))
if mibBuilder.loadTexts: dot3MauType10GigBaseLW.setDescription("W fiber over 1310 nm optics")
dot3MauType10GigBaseSW = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 40))
if mibBuilder.loadTexts: dot3MauType10GigBaseSW.setDescription("W fiber over 850 nm optics")
dot3MauType10GigBaseCX4 = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 41))
if mibBuilder.loadTexts: dot3MauType10GigBaseCX4.setDescription("X copper over 8 pair 100-Ohm balanced cable")
dot3MauType2BaseTL = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 42))
if mibBuilder.loadTexts: dot3MauType2BaseTL.setDescription("Voice grade UTP copper, up to 2700m, optional PAF")
dot3MauType10PassTS = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 43))
if mibBuilder.loadTexts: dot3MauType10PassTS.setDescription("Voice grade UTP copper, up to 750m, optional PAF")
dot3MauType100BaseBX10D = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 44))
if mibBuilder.loadTexts: dot3MauType100BaseBX10D.setDescription("One single-mode fiber OLT, long wavelength, 10km")
dot3MauType100BaseBX10U = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 45))
if mibBuilder.loadTexts: dot3MauType100BaseBX10U.setDescription("One single-mode fiber ONU, long wavelength, 10km")
dot3MauType100BaseLX10 = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 46))
if mibBuilder.loadTexts: dot3MauType100BaseLX10.setDescription("Two single-mode fibers, long wavelength, 10km")
dot3MauType1000BaseBX10D = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 47))
if mibBuilder.loadTexts: dot3MauType1000BaseBX10D.setDescription("One single-mode fiber OLT, long wavelength, 10km")
dot3MauType1000BaseBX10U = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 48))
if mibBuilder.loadTexts: dot3MauType1000BaseBX10U.setDescription("One single-mode fiber ONU, long wavelength, 10km")
dot3MauType1000BaseLX10 = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 49))
if mibBuilder.loadTexts: dot3MauType1000BaseLX10.setDescription("Two sigle-mode fiber, long wavelength, 10km")
dot3MauType1000BasePX10D = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 50))
if mibBuilder.loadTexts: dot3MauType1000BasePX10D.setDescription("One single-mode fiber EPON OLT, 10km")
dot3MauType1000BasePX10U = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 51))
if mibBuilder.loadTexts: dot3MauType1000BasePX10U.setDescription("One single-mode fiber EPON ONU, 10km")
dot3MauType1000BasePX20D = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 52))
if mibBuilder.loadTexts: dot3MauType1000BasePX20D.setDescription("One single-mode fiber EPON OLT, 20km")
dot3MauType1000BasePX20U = ObjectIdentity((1, 3, 6, 1, 2, 1, 26, 4, 53))
if mibBuilder.loadTexts: dot3MauType1000BasePX20U.setDescription("One single-mode fiber EPON ONU, 20km")
ianaMauMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 154)).setRevisions(("2007-04-21 00:00",))
if mibBuilder.loadTexts: ianaMauMIB.setOrganization("IANA")
if mibBuilder.loadTexts: ianaMauMIB.setContactInfo(" Internet Assigned Numbers Authority\n\nPostal: ICANN\n 4676 Admiralty Way, Suite 330\n Marina del Rey, CA 90292\n\n Tel: +1-310-823-9358\n EMail: iana&iana.org")
if mibBuilder.loadTexts: ianaMauMIB.setDescription("This MIB module defines dot3MauType OBJECT-IDENTITIES and\nIANAifMauListBits, IANAifMauMediaAvailable,\nIANAifMauAutoNegCapBits, and IANAifJackType\n\nTEXTUAL-CONVENTIONs, specifying enumerated values of the\nifMauTypeListBits, ifMauMediaAvailable / rpMauMediaAvailable,\nifMauAutoNegCapabilityBits / ifMauAutoNegCapAdvertisedBits /\nifMauAutoNegCapReceivedBits and ifJackType / rpJackType objects\nrespectively, defined in the MAU-MIB.\n\nIt is intended that each new MAU type, Media Availability\nstate, Auto Negotiation capability and/or Jack type defined by\nthe IEEE 802.3 working group and approved for publication in a\nrevision of IEEE Std 802.3 will be added to this MIB module,\nprovided that it is suitable for being managed by the base\nobjects in the MAU-MIB. An Expert Review, as defined in\nRFC 2434 [RFC2434], is REQUIRED for such additions.\n\nThe following reference is used throughout this MIB module:\n\n[IEEE802.3] refers to:\n IEEE Std 802.3, 2005 Edition: 'IEEE Standard for\n Information technology - Telecommunications and information\n exchange between systems - Local and metropolitan area\n networks - Specific requirements -\n Part 3: Carrier sense multiple access with collision\n detection (CSMA/CD) access method and physical layer\n specifications'.\n\nThis reference should be updated as appropriate when new\nMAU types, Media Availability states, Auto Negotiation\ncapabilities, and/or Jack types are added to this MIB module.\n\nCopyright (C) The IETF Trust (2007).\nThe initial version of this MIB module was published in\nRFC 4836; for full legal notices see the RFC itself.\nSupplementary information may be available at:\nhttp://www.ietf.org/copyrights/ianamib.html")
# Augmentions
# Exports
# Module identity
mibBuilder.exportSymbols("IANA-MAU-MIB", PYSNMP_MODULE_ID=ianaMauMIB)
# Types
mibBuilder.exportSymbols("IANA-MAU-MIB", IANAifJackType=IANAifJackType, IANAifMauAutoNegCapBits=IANAifMauAutoNegCapBits, IANAifMauMediaAvailable=IANAifMauMediaAvailable, IANAifMauTypeListBits=IANAifMauTypeListBits)
# Objects
mibBuilder.exportSymbols("IANA-MAU-MIB", dot3MauType=dot3MauType, dot3MauTypeAUI=dot3MauTypeAUI, dot3MauType10Base5=dot3MauType10Base5, dot3MauTypeFoirl=dot3MauTypeFoirl, dot3MauType10Base2=dot3MauType10Base2, dot3MauType10BaseT=dot3MauType10BaseT, dot3MauType10BaseFP=dot3MauType10BaseFP, dot3MauType10BaseFB=dot3MauType10BaseFB, dot3MauType10BaseFL=dot3MauType10BaseFL, dot3MauType10Broad36=dot3MauType10Broad36, dot3MauType10BaseTHD=dot3MauType10BaseTHD, dot3MauType10BaseTFD=dot3MauType10BaseTFD, dot3MauType10BaseFLHD=dot3MauType10BaseFLHD, dot3MauType10BaseFLFD=dot3MauType10BaseFLFD, dot3MauType100BaseT4=dot3MauType100BaseT4, dot3MauType100BaseTXHD=dot3MauType100BaseTXHD, dot3MauType100BaseTXFD=dot3MauType100BaseTXFD, dot3MauType100BaseFXHD=dot3MauType100BaseFXHD, dot3MauType100BaseFXFD=dot3MauType100BaseFXFD, dot3MauType100BaseT2HD=dot3MauType100BaseT2HD, dot3MauType100BaseT2FD=dot3MauType100BaseT2FD, dot3MauType1000BaseXHD=dot3MauType1000BaseXHD, dot3MauType1000BaseXFD=dot3MauType1000BaseXFD, dot3MauType1000BaseLXHD=dot3MauType1000BaseLXHD, dot3MauType1000BaseLXFD=dot3MauType1000BaseLXFD, dot3MauType1000BaseSXHD=dot3MauType1000BaseSXHD, dot3MauType1000BaseSXFD=dot3MauType1000BaseSXFD, dot3MauType1000BaseCXHD=dot3MauType1000BaseCXHD, dot3MauType1000BaseCXFD=dot3MauType1000BaseCXFD, dot3MauType1000BaseTHD=dot3MauType1000BaseTHD, dot3MauType1000BaseTFD=dot3MauType1000BaseTFD, dot3MauType10GigBaseX=dot3MauType10GigBaseX, dot3MauType10GigBaseLX4=dot3MauType10GigBaseLX4, dot3MauType10GigBaseR=dot3MauType10GigBaseR, dot3MauType10GigBaseER=dot3MauType10GigBaseER, dot3MauType10GigBaseLR=dot3MauType10GigBaseLR, dot3MauType10GigBaseSR=dot3MauType10GigBaseSR, dot3MauType10GigBaseW=dot3MauType10GigBaseW, dot3MauType10GigBaseEW=dot3MauType10GigBaseEW, dot3MauType10GigBaseLW=dot3MauType10GigBaseLW, dot3MauType10GigBaseSW=dot3MauType10GigBaseSW, dot3MauType10GigBaseCX4=dot3MauType10GigBaseCX4, dot3MauType2BaseTL=dot3MauType2BaseTL, dot3MauType10PassTS=dot3MauType10PassTS, dot3MauType100BaseBX10D=dot3MauType100BaseBX10D, dot3MauType100BaseBX10U=dot3MauType100BaseBX10U, dot3MauType100BaseLX10=dot3MauType100BaseLX10, dot3MauType1000BaseBX10D=dot3MauType1000BaseBX10D, dot3MauType1000BaseBX10U=dot3MauType1000BaseBX10U, dot3MauType1000BaseLX10=dot3MauType1000BaseLX10, dot3MauType1000BasePX10D=dot3MauType1000BasePX10D, dot3MauType1000BasePX10U=dot3MauType1000BasePX10U, dot3MauType1000BasePX20D=dot3MauType1000BasePX20D, dot3MauType1000BasePX20U=dot3MauType1000BasePX20U, ianaMauMIB=ianaMauMIB)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, constraints_union, single_value_constraint, value_range_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueRangeConstraint', 'ValueSizeConstraint')
(bits, integer32, module_identity, mib_identifier, object_identity, time_ticks, mib_2) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'Integer32', 'ModuleIdentity', 'MibIdentifier', 'ObjectIdentity', 'TimeTicks', 'mib-2')
(textual_convention,) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention')
class Ianaifjacktype(Integer):
subtype_spec = Integer.subtypeSpec + single_value_constraint(9, 15, 11, 3, 7, 8, 12, 4, 2, 1, 13, 6, 5, 10, 14)
named_values = named_values(('other', 1), ('fiberST', 10), ('telco', 11), ('mtrj', 12), ('hssdc', 13), ('fiberLC', 14), ('cx4', 15), ('rj45', 2), ('rj45S', 3), ('db9', 4), ('bnc', 5), ('fAUI', 6), ('mAUI', 7), ('fiberSC', 8), ('fiberMIC', 9))
class Ianaifmauautonegcapbits(Bits):
named_values = named_values(('bOther', 0), ('b10baseT', 1), ('bFdxSPause', 10), ('bFdxBPause', 11), ('b1000baseX', 12), ('b1000baseXFD', 13), ('b1000baseT', 14), ('b1000baseTFD', 15), ('b10baseTFD', 2), ('b100baseT4', 3), ('b100baseTX', 4), ('b100baseTXFD', 5), ('b100baseT2', 6), ('b100baseT2FD', 7), ('bFdxPause', 8), ('bFdxAPause', 9))
class Ianaifmaumediaavailable(Integer):
subtype_spec = Integer.subtypeSpec + single_value_constraint(9, 3, 12, 13, 20, 6, 2, 17, 1, 14, 10, 7, 5, 4, 16, 11, 15, 8, 18, 19)
named_values = named_values(('other', 1), ('offline', 10), ('autoNegError', 11), ('pmdLinkFault', 12), ('wisFrameLoss', 13), ('wisSignalLoss', 14), ('pcsLinkFault', 15), ('excessiveBER', 16), ('dxsLinkFault', 17), ('pxsLinkFault', 18), ('availableReduced', 19), ('unknown', 2), ('ready', 20), ('available', 3), ('notAvailable', 4), ('remoteFault', 5), ('invalidSignal', 6), ('remoteJabber', 7), ('remoteLinkLoss', 8), ('remoteTest', 9))
class Ianaifmautypelistbits(Bits):
named_values = named_values(('bOther', 0), ('bAUI', 1), ('b10baseTHD', 10), ('b10baseTFD', 11), ('b10baseFLHD', 12), ('b10baseFLFD', 13), ('b100baseT4', 14), ('b100baseTXHD', 15), ('b100baseTXFD', 16), ('b100baseFXHD', 17), ('b100baseFXFD', 18), ('b100baseT2HD', 19), ('b10base5', 2), ('b100baseT2FD', 20), ('b1000baseXHD', 21), ('b1000baseXFD', 22), ('b1000baseLXHD', 23), ('b1000baseLXFD', 24), ('b1000baseSXHD', 25), ('b1000baseSXFD', 26), ('b1000baseCXHD', 27), ('b1000baseCXFD', 28), ('b1000baseTHD', 29), ('bFoirl', 3), ('b1000baseTFD', 30), ('b10GbaseX', 31), ('b10GbaseLX4', 32), ('b10GbaseR', 33), ('b10GbaseER', 34), ('b10GbaseLR', 35), ('b10GbaseSR', 36), ('b10GbaseW', 37), ('b10GbaseEW', 38), ('b10GbaseLW', 39), ('b10base2', 4), ('b10GbaseSW', 40), ('b10GbaseCX4', 41), ('b2BaseTL', 42), ('b10PassTS', 43), ('b100BaseBX10D', 44), ('b100BaseBX10U', 45), ('b100BaseLX10', 46), ('b1000BaseBX10D', 47), ('b1000BaseBX10U', 48), ('b1000BaseLX10', 49), ('b10baseT', 5), ('b1000BasePX10D', 50), ('b1000BasePX10U', 51), ('b1000BasePX20D', 52), ('b1000BasePX20U', 53), ('b10baseFP', 6), ('b10baseFB', 7), ('b10baseFL', 8), ('b10broad36', 9))
dot3_mau_type = mib_identifier((1, 3, 6, 1, 2, 1, 26, 4))
dot3_mau_type_aui = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 1))
if mibBuilder.loadTexts:
dot3MauTypeAUI.setDescription('no internal MAU, view from AUI')
dot3_mau_type10_base5 = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 2))
if mibBuilder.loadTexts:
dot3MauType10Base5.setDescription('thick coax MAU')
dot3_mau_type_foirl = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 3))
if mibBuilder.loadTexts:
dot3MauTypeFoirl.setDescription('FOIRL MAU')
dot3_mau_type10_base2 = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 4))
if mibBuilder.loadTexts:
dot3MauType10Base2.setDescription('thin coax MAU')
dot3_mau_type10_base_t = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 5))
if mibBuilder.loadTexts:
dot3MauType10BaseT.setDescription('UTP MAU.\nNote that it is strongly recommended that\nagents return either dot3MauType10BaseTHD or\ndot3MauType10BaseTFD if the duplex mode is\nknown. However, management applications should\nbe prepared to receive this MAU type value from\nolder agent implementations.')
dot3_mau_type10_base_fp = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 6))
if mibBuilder.loadTexts:
dot3MauType10BaseFP.setDescription('passive fiber MAU')
dot3_mau_type10_base_fb = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 7))
if mibBuilder.loadTexts:
dot3MauType10BaseFB.setDescription('sync fiber MAU')
dot3_mau_type10_base_fl = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 8))
if mibBuilder.loadTexts:
dot3MauType10BaseFL.setDescription('async fiber MAU.\nNote that it is strongly recommended that\nagents return either dot3MauType10BaseFLHD or\ndot3MauType10BaseFLFD if the duplex mode is\nknown. However, management applications should\nbe prepared to receive this MAU type value from\nolder agent implementations.')
dot3_mau_type10_broad36 = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 9))
if mibBuilder.loadTexts:
dot3MauType10Broad36.setDescription('broadband DTE MAU.\nNote that 10BROAD36 MAUs can be attached to\ninterfaces but not to repeaters.')
dot3_mau_type10_base_thd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 10))
if mibBuilder.loadTexts:
dot3MauType10BaseTHD.setDescription('UTP MAU, half duplex mode')
dot3_mau_type10_base_tfd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 11))
if mibBuilder.loadTexts:
dot3MauType10BaseTFD.setDescription('UTP MAU, full duplex mode')
dot3_mau_type10_base_flhd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 12))
if mibBuilder.loadTexts:
dot3MauType10BaseFLHD.setDescription('async fiber MAU, half duplex mode')
dot3_mau_type10_base_flfd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 13))
if mibBuilder.loadTexts:
dot3MauType10BaseFLFD.setDescription('async fiber MAU, full duplex mode')
dot3_mau_type100_base_t4 = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 14))
if mibBuilder.loadTexts:
dot3MauType100BaseT4.setDescription('4 pair category 3 UTP')
dot3_mau_type100_base_txhd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 15))
if mibBuilder.loadTexts:
dot3MauType100BaseTXHD.setDescription('2 pair category 5 UTP, half duplex mode')
dot3_mau_type100_base_txfd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 16))
if mibBuilder.loadTexts:
dot3MauType100BaseTXFD.setDescription('2 pair category 5 UTP, full duplex mode')
dot3_mau_type100_base_fxhd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 17))
if mibBuilder.loadTexts:
dot3MauType100BaseFXHD.setDescription('X fiber over PMT, half duplex mode')
dot3_mau_type100_base_fxfd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 18))
if mibBuilder.loadTexts:
dot3MauType100BaseFXFD.setDescription('X fiber over PMT, full duplex mode')
dot3_mau_type100_base_t2_hd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 19))
if mibBuilder.loadTexts:
dot3MauType100BaseT2HD.setDescription('2 pair category 3 UTP, half duplex mode')
dot3_mau_type100_base_t2_fd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 20))
if mibBuilder.loadTexts:
dot3MauType100BaseT2FD.setDescription('2 pair category 3 UTP, full duplex mode')
dot3_mau_type1000_base_xhd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 21))
if mibBuilder.loadTexts:
dot3MauType1000BaseXHD.setDescription('PCS/PMA, unknown PMD, half duplex mode')
dot3_mau_type1000_base_xfd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 22))
if mibBuilder.loadTexts:
dot3MauType1000BaseXFD.setDescription('PCS/PMA, unknown PMD, full duplex mode')
dot3_mau_type1000_base_lxhd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 23))
if mibBuilder.loadTexts:
dot3MauType1000BaseLXHD.setDescription('Fiber over long-wavelength laser, half duplex\nmode')
dot3_mau_type1000_base_lxfd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 24))
if mibBuilder.loadTexts:
dot3MauType1000BaseLXFD.setDescription('Fiber over long-wavelength laser, full duplex\nmode')
dot3_mau_type1000_base_sxhd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 25))
if mibBuilder.loadTexts:
dot3MauType1000BaseSXHD.setDescription('Fiber over short-wavelength laser, half\nduplex mode')
dot3_mau_type1000_base_sxfd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 26))
if mibBuilder.loadTexts:
dot3MauType1000BaseSXFD.setDescription('Fiber over short-wavelength laser, full\nduplex mode')
dot3_mau_type1000_base_cxhd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 27))
if mibBuilder.loadTexts:
dot3MauType1000BaseCXHD.setDescription('Copper over 150-Ohm balanced cable, half\nduplex mode')
dot3_mau_type1000_base_cxfd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 28))
if mibBuilder.loadTexts:
dot3MauType1000BaseCXFD.setDescription('Copper over 150-Ohm balanced cable, full\n\nduplex mode')
dot3_mau_type1000_base_thd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 29))
if mibBuilder.loadTexts:
dot3MauType1000BaseTHD.setDescription('Four-pair Category 5 UTP, half duplex mode')
dot3_mau_type1000_base_tfd = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 30))
if mibBuilder.loadTexts:
dot3MauType1000BaseTFD.setDescription('Four-pair Category 5 UTP, full duplex mode')
dot3_mau_type10_gig_base_x = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 31))
if mibBuilder.loadTexts:
dot3MauType10GigBaseX.setDescription('X PCS/PMA, unknown PMD.')
dot3_mau_type10_gig_base_lx4 = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 32))
if mibBuilder.loadTexts:
dot3MauType10GigBaseLX4.setDescription('X fiber over WWDM optics')
dot3_mau_type10_gig_base_r = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 33))
if mibBuilder.loadTexts:
dot3MauType10GigBaseR.setDescription('R PCS/PMA, unknown PMD.')
dot3_mau_type10_gig_base_er = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 34))
if mibBuilder.loadTexts:
dot3MauType10GigBaseER.setDescription('R fiber over 1550 nm optics')
dot3_mau_type10_gig_base_lr = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 35))
if mibBuilder.loadTexts:
dot3MauType10GigBaseLR.setDescription('R fiber over 1310 nm optics')
dot3_mau_type10_gig_base_sr = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 36))
if mibBuilder.loadTexts:
dot3MauType10GigBaseSR.setDescription('R fiber over 850 nm optics')
dot3_mau_type10_gig_base_w = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 37))
if mibBuilder.loadTexts:
dot3MauType10GigBaseW.setDescription('W PCS/PMA, unknown PMD.')
dot3_mau_type10_gig_base_ew = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 38))
if mibBuilder.loadTexts:
dot3MauType10GigBaseEW.setDescription('W fiber over 1550 nm optics')
dot3_mau_type10_gig_base_lw = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 39))
if mibBuilder.loadTexts:
dot3MauType10GigBaseLW.setDescription('W fiber over 1310 nm optics')
dot3_mau_type10_gig_base_sw = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 40))
if mibBuilder.loadTexts:
dot3MauType10GigBaseSW.setDescription('W fiber over 850 nm optics')
dot3_mau_type10_gig_base_cx4 = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 41))
if mibBuilder.loadTexts:
dot3MauType10GigBaseCX4.setDescription('X copper over 8 pair 100-Ohm balanced cable')
dot3_mau_type2_base_tl = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 42))
if mibBuilder.loadTexts:
dot3MauType2BaseTL.setDescription('Voice grade UTP copper, up to 2700m, optional PAF')
dot3_mau_type10_pass_ts = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 43))
if mibBuilder.loadTexts:
dot3MauType10PassTS.setDescription('Voice grade UTP copper, up to 750m, optional PAF')
dot3_mau_type100_base_bx10_d = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 44))
if mibBuilder.loadTexts:
dot3MauType100BaseBX10D.setDescription('One single-mode fiber OLT, long wavelength, 10km')
dot3_mau_type100_base_bx10_u = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 45))
if mibBuilder.loadTexts:
dot3MauType100BaseBX10U.setDescription('One single-mode fiber ONU, long wavelength, 10km')
dot3_mau_type100_base_lx10 = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 46))
if mibBuilder.loadTexts:
dot3MauType100BaseLX10.setDescription('Two single-mode fibers, long wavelength, 10km')
dot3_mau_type1000_base_bx10_d = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 47))
if mibBuilder.loadTexts:
dot3MauType1000BaseBX10D.setDescription('One single-mode fiber OLT, long wavelength, 10km')
dot3_mau_type1000_base_bx10_u = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 48))
if mibBuilder.loadTexts:
dot3MauType1000BaseBX10U.setDescription('One single-mode fiber ONU, long wavelength, 10km')
dot3_mau_type1000_base_lx10 = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 49))
if mibBuilder.loadTexts:
dot3MauType1000BaseLX10.setDescription('Two sigle-mode fiber, long wavelength, 10km')
dot3_mau_type1000_base_px10_d = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 50))
if mibBuilder.loadTexts:
dot3MauType1000BasePX10D.setDescription('One single-mode fiber EPON OLT, 10km')
dot3_mau_type1000_base_px10_u = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 51))
if mibBuilder.loadTexts:
dot3MauType1000BasePX10U.setDescription('One single-mode fiber EPON ONU, 10km')
dot3_mau_type1000_base_px20_d = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 52))
if mibBuilder.loadTexts:
dot3MauType1000BasePX20D.setDescription('One single-mode fiber EPON OLT, 20km')
dot3_mau_type1000_base_px20_u = object_identity((1, 3, 6, 1, 2, 1, 26, 4, 53))
if mibBuilder.loadTexts:
dot3MauType1000BasePX20U.setDescription('One single-mode fiber EPON ONU, 20km')
iana_mau_mib = module_identity((1, 3, 6, 1, 2, 1, 154)).setRevisions(('2007-04-21 00:00',))
if mibBuilder.loadTexts:
ianaMauMIB.setOrganization('IANA')
if mibBuilder.loadTexts:
ianaMauMIB.setContactInfo(' Internet Assigned Numbers Authority\n\nPostal: ICANN\n 4676 Admiralty Way, Suite 330\n Marina del Rey, CA 90292\n\n Tel: +1-310-823-9358\n EMail: iana&iana.org')
if mibBuilder.loadTexts:
ianaMauMIB.setDescription("This MIB module defines dot3MauType OBJECT-IDENTITIES and\nIANAifMauListBits, IANAifMauMediaAvailable,\nIANAifMauAutoNegCapBits, and IANAifJackType\n\nTEXTUAL-CONVENTIONs, specifying enumerated values of the\nifMauTypeListBits, ifMauMediaAvailable / rpMauMediaAvailable,\nifMauAutoNegCapabilityBits / ifMauAutoNegCapAdvertisedBits /\nifMauAutoNegCapReceivedBits and ifJackType / rpJackType objects\nrespectively, defined in the MAU-MIB.\n\nIt is intended that each new MAU type, Media Availability\nstate, Auto Negotiation capability and/or Jack type defined by\nthe IEEE 802.3 working group and approved for publication in a\nrevision of IEEE Std 802.3 will be added to this MIB module,\nprovided that it is suitable for being managed by the base\nobjects in the MAU-MIB. An Expert Review, as defined in\nRFC 2434 [RFC2434], is REQUIRED for such additions.\n\nThe following reference is used throughout this MIB module:\n\n[IEEE802.3] refers to:\n IEEE Std 802.3, 2005 Edition: 'IEEE Standard for\n Information technology - Telecommunications and information\n exchange between systems - Local and metropolitan area\n networks - Specific requirements -\n Part 3: Carrier sense multiple access with collision\n detection (CSMA/CD) access method and physical layer\n specifications'.\n\nThis reference should be updated as appropriate when new\nMAU types, Media Availability states, Auto Negotiation\ncapabilities, and/or Jack types are added to this MIB module.\n\nCopyright (C) The IETF Trust (2007).\nThe initial version of this MIB module was published in\nRFC 4836; for full legal notices see the RFC itself.\nSupplementary information may be available at:\nhttp://www.ietf.org/copyrights/ianamib.html")
mibBuilder.exportSymbols('IANA-MAU-MIB', PYSNMP_MODULE_ID=ianaMauMIB)
mibBuilder.exportSymbols('IANA-MAU-MIB', IANAifJackType=IANAifJackType, IANAifMauAutoNegCapBits=IANAifMauAutoNegCapBits, IANAifMauMediaAvailable=IANAifMauMediaAvailable, IANAifMauTypeListBits=IANAifMauTypeListBits)
mibBuilder.exportSymbols('IANA-MAU-MIB', dot3MauType=dot3MauType, dot3MauTypeAUI=dot3MauTypeAUI, dot3MauType10Base5=dot3MauType10Base5, dot3MauTypeFoirl=dot3MauTypeFoirl, dot3MauType10Base2=dot3MauType10Base2, dot3MauType10BaseT=dot3MauType10BaseT, dot3MauType10BaseFP=dot3MauType10BaseFP, dot3MauType10BaseFB=dot3MauType10BaseFB, dot3MauType10BaseFL=dot3MauType10BaseFL, dot3MauType10Broad36=dot3MauType10Broad36, dot3MauType10BaseTHD=dot3MauType10BaseTHD, dot3MauType10BaseTFD=dot3MauType10BaseTFD, dot3MauType10BaseFLHD=dot3MauType10BaseFLHD, dot3MauType10BaseFLFD=dot3MauType10BaseFLFD, dot3MauType100BaseT4=dot3MauType100BaseT4, dot3MauType100BaseTXHD=dot3MauType100BaseTXHD, dot3MauType100BaseTXFD=dot3MauType100BaseTXFD, dot3MauType100BaseFXHD=dot3MauType100BaseFXHD, dot3MauType100BaseFXFD=dot3MauType100BaseFXFD, dot3MauType100BaseT2HD=dot3MauType100BaseT2HD, dot3MauType100BaseT2FD=dot3MauType100BaseT2FD, dot3MauType1000BaseXHD=dot3MauType1000BaseXHD, dot3MauType1000BaseXFD=dot3MauType1000BaseXFD, dot3MauType1000BaseLXHD=dot3MauType1000BaseLXHD, dot3MauType1000BaseLXFD=dot3MauType1000BaseLXFD, dot3MauType1000BaseSXHD=dot3MauType1000BaseSXHD, dot3MauType1000BaseSXFD=dot3MauType1000BaseSXFD, dot3MauType1000BaseCXHD=dot3MauType1000BaseCXHD, dot3MauType1000BaseCXFD=dot3MauType1000BaseCXFD, dot3MauType1000BaseTHD=dot3MauType1000BaseTHD, dot3MauType1000BaseTFD=dot3MauType1000BaseTFD, dot3MauType10GigBaseX=dot3MauType10GigBaseX, dot3MauType10GigBaseLX4=dot3MauType10GigBaseLX4, dot3MauType10GigBaseR=dot3MauType10GigBaseR, dot3MauType10GigBaseER=dot3MauType10GigBaseER, dot3MauType10GigBaseLR=dot3MauType10GigBaseLR, dot3MauType10GigBaseSR=dot3MauType10GigBaseSR, dot3MauType10GigBaseW=dot3MauType10GigBaseW, dot3MauType10GigBaseEW=dot3MauType10GigBaseEW, dot3MauType10GigBaseLW=dot3MauType10GigBaseLW, dot3MauType10GigBaseSW=dot3MauType10GigBaseSW, dot3MauType10GigBaseCX4=dot3MauType10GigBaseCX4, dot3MauType2BaseTL=dot3MauType2BaseTL, dot3MauType10PassTS=dot3MauType10PassTS, dot3MauType100BaseBX10D=dot3MauType100BaseBX10D, dot3MauType100BaseBX10U=dot3MauType100BaseBX10U, dot3MauType100BaseLX10=dot3MauType100BaseLX10, dot3MauType1000BaseBX10D=dot3MauType1000BaseBX10D, dot3MauType1000BaseBX10U=dot3MauType1000BaseBX10U, dot3MauType1000BaseLX10=dot3MauType1000BaseLX10, dot3MauType1000BasePX10D=dot3MauType1000BasePX10D, dot3MauType1000BasePX10U=dot3MauType1000BasePX10U, dot3MauType1000BasePX20D=dot3MauType1000BasePX20D, dot3MauType1000BasePX20U=dot3MauType1000BasePX20U, ianaMauMIB=ianaMauMIB) |
# name: Exes and Ohs
# url: https://www.codewars.com/kata/55908aad6620c066bc00002a
# Check to see if a string has the same amount of 'x's and 'o's. The method
# must return a boolean and be case insensitive. The string can contain any char.
def xo(s):
lowerStr = s.lower()
return lowerStr.count('o') == lowerStr.count('x')
if __name__ == '__main__':
print(xo("ooxx")) # => true
print(xo("xooxx")) # => false
print(xo("ooxXm")) # => true
print(xo("zpzpzpp")) # => true // when no 'x' and 'o' is present should return true
print(xo("zzoo")) # => false | def xo(s):
lower_str = s.lower()
return lowerStr.count('o') == lowerStr.count('x')
if __name__ == '__main__':
print(xo('ooxx'))
print(xo('xooxx'))
print(xo('ooxXm'))
print(xo('zpzpzpp'))
print(xo('zzoo')) |
BASE_URL = "https://paper-api.alpaca.markets"
KEY = "your key here"
SECRET_KEY = "your secret key here"
HEADERS = {"APCA-API-KEY-ID": KEY, "APCA-API-SECRET-KEY": SECRET_KEY}
# headers are used to authenticate our request | base_url = 'https://paper-api.alpaca.markets'
key = 'your key here'
secret_key = 'your secret key here'
headers = {'APCA-API-KEY-ID': KEY, 'APCA-API-SECRET-KEY': SECRET_KEY} |
# coding: utf-8
# Copyright 2014 jeoliva author. All rights reserved.
# Use of this source code is governed by a MIT License
# license that can be found in the LICENSE file.
class RangedUri(object):
def __init__(self):
self.start = 0
self.length = -1
self.baseUri = ""
self.referenceUri = ""
| class Rangeduri(object):
def __init__(self):
self.start = 0
self.length = -1
self.baseUri = ''
self.referenceUri = '' |
class Solution:
def wordPatternV1(self, pattern: str, str: str) -> bool:
p2s, s2p, words = {}, {}, str.split()
if len(pattern) != len(words):
return False
for p, s in zip(pattern, words):
if p in p2s and p2s[p] != s:
return False
else:
p2s[p] = s
if s in s2p and s2p[s] != p:
return False
else:
s2p[s] = p
return True
def wordPatternV2(self, pattern: str, str: str) -> bool:
# map the element of iterable xs to the index of first appearance
f = lambda xs: map({}.setdefault, xs, range(len(xs)))
return list(f(pattern)) == list(f(str.split()))
# TESTS
tests = [
("aaa", "aa aa aa aa", False),
("abba", "dog cat cat dog", True),
("abba", "dog cat cat fish", False),
("aaaa", "dog cat cat dog", False),
("abba", "dog dog dog dog", False),
]
for pattern, string, expected in tests:
sol = Solution()
actual = sol.wordPatternV1(pattern, string)
print("String", string, "follows the same pattern", pattern, "->", actual)
assert actual == expected
assert expected == sol.wordPatternV2(pattern, string)
| class Solution:
def word_pattern_v1(self, pattern: str, str: str) -> bool:
(p2s, s2p, words) = ({}, {}, str.split())
if len(pattern) != len(words):
return False
for (p, s) in zip(pattern, words):
if p in p2s and p2s[p] != s:
return False
else:
p2s[p] = s
if s in s2p and s2p[s] != p:
return False
else:
s2p[s] = p
return True
def word_pattern_v2(self, pattern: str, str: str) -> bool:
f = lambda xs: map({}.setdefault, xs, range(len(xs)))
return list(f(pattern)) == list(f(str.split()))
tests = [('aaa', 'aa aa aa aa', False), ('abba', 'dog cat cat dog', True), ('abba', 'dog cat cat fish', False), ('aaaa', 'dog cat cat dog', False), ('abba', 'dog dog dog dog', False)]
for (pattern, string, expected) in tests:
sol = solution()
actual = sol.wordPatternV1(pattern, string)
print('String', string, 'follows the same pattern', pattern, '->', actual)
assert actual == expected
assert expected == sol.wordPatternV2(pattern, string) |
#-------------------------------------------------------------------------------
# Name: powerlaw.py
# Purpose: This is a set of power law coefficients(a,b) for the calculation of
# empirical rain attenuation model A = a*R^b.
#-------------------------------------------------------------------------------
def get_coef_ab(freq, mod_type = 'MP'):
'''
Returns power law coefficients according to model type (mod_type)
at a given frequency[Hz].
Input:
freq - frequency, [Hz].
Optional:
mod_type - model type for power law. This can be 'ITU_R2005',
'MP','GAMMA'. By default, mode_type = 'ITU_R2005'.
Output:
a,b - power law coefficients.
'''
if mod_type == 'ITU_R2005':
a = {'18': 0.07393, '23': 0.1285, '38': 0.39225}
b = {'18':1.0404605978, '23': 0.99222272,'38':0.8686641682}
elif mod_type == 'MP':
a = {'18': 0.05911087, '23': 0.1080751, '38': 0.37898495}
b = {'18': 1.08693514, '23': 1.05342886, '38': 0.92876888}
elif mod_type=='GAMMA':
a = {'18': 0.04570854, '23': 0.08174184, '38': 0.28520923}
b = {'18': 1.09211488, '23': 1.08105214, '38': 1.01426258}
freq = int(freq/1e9)
return a[str(freq)], b[str(freq)] | def get_coef_ab(freq, mod_type='MP'):
"""
Returns power law coefficients according to model type (mod_type)
at a given frequency[Hz].
Input:
freq - frequency, [Hz].
Optional:
mod_type - model type for power law. This can be 'ITU_R2005',
'MP','GAMMA'. By default, mode_type = 'ITU_R2005'.
Output:
a,b - power law coefficients.
"""
if mod_type == 'ITU_R2005':
a = {'18': 0.07393, '23': 0.1285, '38': 0.39225}
b = {'18': 1.0404605978, '23': 0.99222272, '38': 0.8686641682}
elif mod_type == 'MP':
a = {'18': 0.05911087, '23': 0.1080751, '38': 0.37898495}
b = {'18': 1.08693514, '23': 1.05342886, '38': 0.92876888}
elif mod_type == 'GAMMA':
a = {'18': 0.04570854, '23': 0.08174184, '38': 0.28520923}
b = {'18': 1.09211488, '23': 1.08105214, '38': 1.01426258}
freq = int(freq / 1000000000.0)
return (a[str(freq)], b[str(freq)]) |
def isPalindrome(x):
#x = x.casefold()
rev_str = reversed(x)
if list(x) == list(rev_str):
print("It is palindrome")
return True
else:
print("It is not palindrome")
return False
isPalindrome("SSAASS") | def is_palindrome(x):
rev_str = reversed(x)
if list(x) == list(rev_str):
print('It is palindrome')
return True
else:
print('It is not palindrome')
return False
is_palindrome('SSAASS') |
'''Application Data (bpy.app)
This module contains application values that remain unchanged during runtime.
'''
debug = None
'''Boolean, for debug info (started with --debug / --debug_* matching this attribute name)
'''
debug_events = None
'''Boolean, for debug info (started with --debug / --debug_* matching this attribute name)
'''
debug_ffmpeg = None
'''Boolean, for debug info (started with --debug / --debug_* matching this attribute name)
'''
debug_handlers = None
'''Boolean, for debug info (started with --debug / --debug_* matching this attribute name)
'''
debug_python = None
'''Boolean, for debug info (started with --debug / --debug_* matching this attribute name)
'''
debug_value = None
'''Int, number which can be set to non-zero values for testing purposes
'''
debug_wm = None
'''Boolean, for debug info (started with --debug / --debug_* matching this attribute name)
'''
driver_namespace = None
'''Dictionary for drivers namespace, editable in-place, reset on file load (read-only)
'''
tempdir = None
'''String, the temp directory used by blender (read-only)
'''
background = None
'''Boolean, True when blender is running without a user interface (started with -b)
'''
binary_path = None
'''The location of blenders executable, useful for utilities that spawn new instances
'''
build_cflags = None
'''C compiler flags
'''
build_cxxflags = None
'''C++ compiler flags
'''
build_date = None
'''The date this blender instance was built
'''
build_linkflags = None
'''Binary linking flags
'''
build_options = None
'''A set containing most important enabled optional build features
'''
build_platform = None
'''The platform this blender instance was built for
'''
build_revision = None
'''The subversion revision this blender instance was built with
'''
build_system = None
'''Build system used
'''
build_time = None
'''The time this blender instance was built
'''
build_type = None
'''The type of build (Release, Debug)
'''
ffmpeg = None
'''FFmpeg library information backend
'''
handlers = None
'''Application handler callbacks
'''
translations = None
'''Application and addons internationalization API
'''
version = None
'''The Blender version as a tuple of 3 numbers. eg. (2, 50, 11)
'''
version_char = None
'''The Blender version character (for minor releases)
'''
version_cycle = None
'''The release status of this build alpha/beta/rc/release
'''
version_string = None
'''The Blender version formatted as a string
'''
def count(*argv):
'''T.count(value) -> integer -- return number of occurrences of value
'''
pass
def index(*argv):
'''T.index(value, [start, [stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
'''
pass
| """Application Data (bpy.app)
This module contains application values that remain unchanged during runtime.
"""
debug = None
'Boolean, for debug info (started with --debug / --debug_* matching this attribute name)\n \n'
debug_events = None
'Boolean, for debug info (started with --debug / --debug_* matching this attribute name)\n \n'
debug_ffmpeg = None
'Boolean, for debug info (started with --debug / --debug_* matching this attribute name)\n \n'
debug_handlers = None
'Boolean, for debug info (started with --debug / --debug_* matching this attribute name)\n \n'
debug_python = None
'Boolean, for debug info (started with --debug / --debug_* matching this attribute name)\n \n'
debug_value = None
'Int, number which can be set to non-zero values for testing purposes\n \n'
debug_wm = None
'Boolean, for debug info (started with --debug / --debug_* matching this attribute name)\n \n'
driver_namespace = None
'Dictionary for drivers namespace, editable in-place, reset on file load (read-only)\n \n'
tempdir = None
'String, the temp directory used by blender (read-only)\n \n'
background = None
'Boolean, True when blender is running without a user interface (started with -b)\n \n'
binary_path = None
'The location of blenders executable, useful for utilities that spawn new instances\n \n'
build_cflags = None
'C compiler flags\n \n'
build_cxxflags = None
'C++ compiler flags\n \n'
build_date = None
'The date this blender instance was built\n \n'
build_linkflags = None
'Binary linking flags\n \n'
build_options = None
'A set containing most important enabled optional build features\n \n'
build_platform = None
'The platform this blender instance was built for\n \n'
build_revision = None
'The subversion revision this blender instance was built with\n \n'
build_system = None
'Build system used\n \n'
build_time = None
'The time this blender instance was built\n \n'
build_type = None
'The type of build (Release, Debug)\n \n'
ffmpeg = None
'FFmpeg library information backend\n \n'
handlers = None
'Application handler callbacks\n \n'
translations = None
'Application and addons internationalization API\n \n'
version = None
'The Blender version as a tuple of 3 numbers. eg. (2, 50, 11)\n \n'
version_char = None
'The Blender version character (for minor releases)\n \n'
version_cycle = None
'The release status of this build alpha/beta/rc/release\n \n'
version_string = None
'The Blender version formatted as a string\n \n'
def count(*argv):
"""T.count(value) -> integer -- return number of occurrences of value
"""
pass
def index(*argv):
"""T.index(value, [start, [stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
"""
pass |
##############################################
# parameters than can be defined by the user #
##############################################
# parameters modifying the behaviour of the network
global weight_multiplicator # multiplicator of a returned observation, allow to scale observations in order to make the network differentiate them
weight_multiplicator = 0.25
global victory_reward
victory_reward = 0 # reward at win
global defeat_punishment
defeat_punishment = 1 # punishment given when the game is lost (pool fall or cart get out of bound)
global network_param
network_param = [4] # shape of hidden layers
network_type = "mlp" # network_type ("mlp", "elman")
# parameters modifying the result display (might not be change by a common user)
max_score = 200 # score which makes the game end (200 is the basic OpenAI gym value)
nb_seq = 1000 # lenght of a simulation
nb_simulation = 10 # number of simulations
save_frequency = 100
gamma = 0.6
hyperopt = 0 # set to 1 to launch with hyperopt, 0 for normal use
pro_level_exists = 0 # if set to 1, the network stop learning after winning a game
| global weight_multiplicator
weight_multiplicator = 0.25
global victory_reward
victory_reward = 0
global defeat_punishment
defeat_punishment = 1
global network_param
network_param = [4]
network_type = 'mlp'
max_score = 200
nb_seq = 1000
nb_simulation = 10
save_frequency = 100
gamma = 0.6
hyperopt = 0
pro_level_exists = 0 |
# -*- coding: utf-8 -*-
name = 'nuke_ML_server'
version = '0.1.3'
build_requires = [
'cmake-3.10+'
]
variants = [
['platform-linux', 'arch-x86_64', 'nuke-12.2']
]
def commands():
env.NUKE_PATH.append('{root}/lib')
env.LDD_LIBRARY_PATH.append(env.NUKE_LOCATION)
| name = 'nuke_ML_server'
version = '0.1.3'
build_requires = ['cmake-3.10+']
variants = [['platform-linux', 'arch-x86_64', 'nuke-12.2']]
def commands():
env.NUKE_PATH.append('{root}/lib')
env.LDD_LIBRARY_PATH.append(env.NUKE_LOCATION) |
input()
x = list(map(int, input().split()))
N = len(x)
for i in range(0, N - 1):
for j in range(0, N - i - 1):
if x[j] > x[j + 1]:
x[j], x[j + 1] = x[j + 1], x[j]
print(' '.join(map(str, x)))
| input()
x = list(map(int, input().split()))
n = len(x)
for i in range(0, N - 1):
for j in range(0, N - i - 1):
if x[j] > x[j + 1]:
(x[j], x[j + 1]) = (x[j + 1], x[j])
print(' '.join(map(str, x))) |
# author: Bilal El Uneis
# since: April 2018
# bilaleluneis@gmail.com
class Methods:
number_of_instances = 0 # this is a class level property
# initializer with default values (constructor)
def __init__(self, method_name="anonymous", method_return_type="void"):
self.method_name = method_name
self.method_return_type = method_return_type
type(self).number_of_instances += 1 # this is how to access class level var inside init
# I am guessing this is like a destructor in other languages like C++
def __del__(self):
type(self).number_of_instances -= 1
# this is an instance method, every instance method has first argument as self
def update_method_name(self, new_name):
self.method_name = new_name
# this is a class level method
@classmethod
def get_class_number_of_instances(cls):
return cls.number_of_instances
# a static method
@staticmethod
def is_valid_return_type(method_return_type):
if method_return_type in ["void", "int", "String"]:
return True
else:
return False
# start of running code
if __name__ == "__main__":
print("current number of instances = {}".format(Methods.get_class_number_of_instances()))
instance_1 = Methods()
instance_2 = Methods(method_return_type="float") # need to use argument name if you are passing only one param
instance_3 = Methods("awesome", "String")
print("current number of instances = {}".format(Methods.get_class_number_of_instances()))
instance_1.update_method_name("instance_1")
print("instance_1 method name is updated to {}".format(instance_1.method_name))
del instance_1 # this will call the __del__ (destructor)
print("current number of instances = {}".format(Methods.get_class_number_of_instances()))
valid_return_type = Methods.is_valid_return_type(instance_2.method_return_type)
print("instance_2 method return type is valid: {}".format(valid_return_type))
valid_return_type = Methods.is_valid_return_type(instance_3.method_return_type)
print("instance_3 method return type is valid: {}".format(valid_return_type))
del instance_2
del instance_3
print("current number of instances = {}".format(Methods.get_class_number_of_instances()))
| class Methods:
number_of_instances = 0
def __init__(self, method_name='anonymous', method_return_type='void'):
self.method_name = method_name
self.method_return_type = method_return_type
type(self).number_of_instances += 1
def __del__(self):
type(self).number_of_instances -= 1
def update_method_name(self, new_name):
self.method_name = new_name
@classmethod
def get_class_number_of_instances(cls):
return cls.number_of_instances
@staticmethod
def is_valid_return_type(method_return_type):
if method_return_type in ['void', 'int', 'String']:
return True
else:
return False
if __name__ == '__main__':
print('current number of instances = {}'.format(Methods.get_class_number_of_instances()))
instance_1 = methods()
instance_2 = methods(method_return_type='float')
instance_3 = methods('awesome', 'String')
print('current number of instances = {}'.format(Methods.get_class_number_of_instances()))
instance_1.update_method_name('instance_1')
print('instance_1 method name is updated to {}'.format(instance_1.method_name))
del instance_1
print('current number of instances = {}'.format(Methods.get_class_number_of_instances()))
valid_return_type = Methods.is_valid_return_type(instance_2.method_return_type)
print('instance_2 method return type is valid: {}'.format(valid_return_type))
valid_return_type = Methods.is_valid_return_type(instance_3.method_return_type)
print('instance_3 method return type is valid: {}'.format(valid_return_type))
del instance_2
del instance_3
print('current number of instances = {}'.format(Methods.get_class_number_of_instances())) |
n = int(input())
a = list(map(int, input().split()))
total = sum(a)
if total % n != 0:
print(-1)
exit()
num = total // n
ans = 0
for i in range(n - 1):
left = sum(a[:i + 1])
right = sum(a[i + 1:])
if left < num * (i + 1) or right < num * (n - i - 1):
ans += 1
print(ans)
| n = int(input())
a = list(map(int, input().split()))
total = sum(a)
if total % n != 0:
print(-1)
exit()
num = total // n
ans = 0
for i in range(n - 1):
left = sum(a[:i + 1])
right = sum(a[i + 1:])
if left < num * (i + 1) or right < num * (n - i - 1):
ans += 1
print(ans) |
#encoding:utf-8
subreddit = 'KamenRider'
t_channel = '@r_KamenRider'
def send_post(submission, r2t):
return r2t.send_simple(submission)
| subreddit = 'KamenRider'
t_channel = '@r_KamenRider'
def send_post(submission, r2t):
return r2t.send_simple(submission) |
t = int(input())
tests = []
def fact(n):
if n == 1:
return n
else:
return n * fact(n - 1)
while t > 0:
n = int(input())
tests.append(fact(n))
t -= 1
for x in tests:
print(x % 10) | t = int(input())
tests = []
def fact(n):
if n == 1:
return n
else:
return n * fact(n - 1)
while t > 0:
n = int(input())
tests.append(fact(n))
t -= 1
for x in tests:
print(x % 10) |
for _ in range(int(input())):
a,b,q=map(int,input().split())
arr=[]
for i in range(q):
arr+=[list(map(int,input().split()))]
res=0
if a!=b:
for j in range(arr[i][0],arr[i][1]+1):
if (j%a)%b!=(j%b)%a:
res+=1
if i!=q-1:
print(res,end=" ")
if i==q-1:
print(res) | for _ in range(int(input())):
(a, b, q) = map(int, input().split())
arr = []
for i in range(q):
arr += [list(map(int, input().split()))]
res = 0
if a != b:
for j in range(arr[i][0], arr[i][1] + 1):
if j % a % b != j % b % a:
res += 1
if i != q - 1:
print(res, end=' ')
if i == q - 1:
print(res) |
# The isBadVersion API is already defined for you.
# @param version, an integer
# @return a bool
def isBadVersion(version):
pass
class Solution:
def firstBadVersion(self, n):
left, right = 0, n
while left <= right:
mid = (left + right) // 2
if not isBadVersion(mid):
left = mid + 1
else:
right = mid - 1
return left
| def is_bad_version(version):
pass
class Solution:
def first_bad_version(self, n):
(left, right) = (0, n)
while left <= right:
mid = (left + right) // 2
if not is_bad_version(mid):
left = mid + 1
else:
right = mid - 1
return left |
def takeInstInput(S):
degrees = []
inputS = S.split(" ")
inputS = [int(x) for x in inputS]
for i in range(len(inputS)):
degrees.append((inputS[i], i))
return degrees
def takeFileInput(FileName):
fileI = open(FileName, 'r')
inputS = fileI.readline()
degrees = takeInstInput(inputS)
fileI.close()
return inputS, degrees | def take_inst_input(S):
degrees = []
input_s = S.split(' ')
input_s = [int(x) for x in inputS]
for i in range(len(inputS)):
degrees.append((inputS[i], i))
return degrees
def take_file_input(FileName):
file_i = open(FileName, 'r')
input_s = fileI.readline()
degrees = take_inst_input(inputS)
fileI.close()
return (inputS, degrees) |
class Solution:
def intToRoman(self, num: int) -> str:
'''
T: O(1) and S: O(1)
'''
int2rom = {1000:'M',
900:'CM',
500:'D',
400:'CD',
100:'C',
90:'XC',
50:'L',
40:'XL',
10:'X',
9:'IX',
5:'V',
4:'IV',
1:'I'}
result = ''
for divisor in int2rom:
carry, num = divmod(num, divisor)
result += carry * int2rom[divisor]
return result
| class Solution:
def int_to_roman(self, num: int) -> str:
"""
T: O(1) and S: O(1)
"""
int2rom = {1000: 'M', 900: 'CM', 500: 'D', 400: 'CD', 100: 'C', 90: 'XC', 50: 'L', 40: 'XL', 10: 'X', 9: 'IX', 5: 'V', 4: 'IV', 1: 'I'}
result = ''
for divisor in int2rom:
(carry, num) = divmod(num, divisor)
result += carry * int2rom[divisor]
return result |
#
# config.py: configuration for semantic segmentation
# (c) Neil Nie, 2017
# All Rights Reserved.
#
batch_size = 8
img_height = 512
img_width = 1024
display_height = 512
display_width = 1024
nb_classes = 34
learning_rate = 1e-4
nb_epoch = 10
| batch_size = 8
img_height = 512
img_width = 1024
display_height = 512
display_width = 1024
nb_classes = 34
learning_rate = 0.0001
nb_epoch = 10 |
#
# @lc app=leetcode id=485 lang=python3
#
# [485] Max Consecutive Ones
#
# @lc code=start
class Solution:
def findMaxConsecutiveOnes(self, nums: List[int]) -> int:
res = 0
count = 0
for i in nums:
if i == 0:
count = 0
else:
count += 1
res = max(res, count)
return res
# @lc code=end
| class Solution:
def find_max_consecutive_ones(self, nums: List[int]) -> int:
res = 0
count = 0
for i in nums:
if i == 0:
count = 0
else:
count += 1
res = max(res, count)
return res |
'''
module for calculating
greatest common divisor (GCD)
and lowest common multiple
(LCM)
'''
def gcd(x: int, y: int):
'''
Calculating GCD of x and y
using Euclid's algorithm
'''
if (x > y):
while (y != 0):
x, y = y, x % y
return x
else:
while (x != 0):
y, x = x, y % x
return y
def lcm(x: int, y: int):
'''
Calculating LCM of x and y
using the formula
LCM * GCD = x * y
'''
result = (x * y) // gcd(x, y)
return result
'''
PyAlgo
Devansh Singh, 2021
''' | """
module for calculating
greatest common divisor (GCD)
and lowest common multiple
(LCM)
"""
def gcd(x: int, y: int):
"""
Calculating GCD of x and y
using Euclid's algorithm
"""
if x > y:
while y != 0:
(x, y) = (y, x % y)
return x
else:
while x != 0:
(y, x) = (x, y % x)
return y
def lcm(x: int, y: int):
"""
Calculating LCM of x and y
using the formula
LCM * GCD = x * y
"""
result = x * y // gcd(x, y)
return result
'\nPyAlgo\nDevansh Singh, 2021\n' |
#!/bin/python3
#I think this needs to run in c
def addTuple(t1, t2):
return [t1i + t2i for t1i, t2i in zip(t1, t2)]
def compareTuple(t1, t2):
return all([t1i <= t2i for t1i, t2i in zip(t1, t2)])
def theHackathon(n, m, a, b, f, s, t):
# Participant code here
people = {}
groups = {}
max_dep = f, s, t
for i in range(n):
inputdata = input().split()
name = inputdata[0]
people[name] = i
dep = [0, 0, 0]
dep[int(inputdata[1]) - 1] = 1
groups[i] = [[name], dep]
def mergeGroups(g1, g2):
if g1 != g2:
group1 = groups[g1]
group2 = groups[g2]
addedTuples = addTuple(group1[1], group2[1])
if(len(group1[0]) + len(group2[0]) <= b and compareTuple(addedTuples, max_dep)):
groups[g1] = [group1[0] + group2[0], addedTuples]
for name in group2[0]:
people[name] = g1
del groups[g2]
for i in range(m):
r1, r2 = input().split()
mergeGroups(people[r1], people[r2])
maxlen = a
namesToPrint = []
for group in groups.values():
glen = len(group[0])
if glen > maxlen:
maxlen = glen
namesToPrint = group[0]
elif glen == maxlen:
namesToPrint += group[0]
if not len(namesToPrint):
print("no groups")
else:
namesToPrint.sort()
for name in namesToPrint:
print(name)
if __name__ == '__main__':
inputdata = input().split()
n = int(inputdata[0])
m = int(inputdata[1])
a = int(inputdata[2])
b = int(inputdata[3])
f = int(inputdata[4])
s = int(inputdata[5])
t = int(inputdata[6])
theHackathon(n, m, a, b, f, s, t)
| def add_tuple(t1, t2):
return [t1i + t2i for (t1i, t2i) in zip(t1, t2)]
def compare_tuple(t1, t2):
return all([t1i <= t2i for (t1i, t2i) in zip(t1, t2)])
def the_hackathon(n, m, a, b, f, s, t):
people = {}
groups = {}
max_dep = (f, s, t)
for i in range(n):
inputdata = input().split()
name = inputdata[0]
people[name] = i
dep = [0, 0, 0]
dep[int(inputdata[1]) - 1] = 1
groups[i] = [[name], dep]
def merge_groups(g1, g2):
if g1 != g2:
group1 = groups[g1]
group2 = groups[g2]
added_tuples = add_tuple(group1[1], group2[1])
if len(group1[0]) + len(group2[0]) <= b and compare_tuple(addedTuples, max_dep):
groups[g1] = [group1[0] + group2[0], addedTuples]
for name in group2[0]:
people[name] = g1
del groups[g2]
for i in range(m):
(r1, r2) = input().split()
merge_groups(people[r1], people[r2])
maxlen = a
names_to_print = []
for group in groups.values():
glen = len(group[0])
if glen > maxlen:
maxlen = glen
names_to_print = group[0]
elif glen == maxlen:
names_to_print += group[0]
if not len(namesToPrint):
print('no groups')
else:
namesToPrint.sort()
for name in namesToPrint:
print(name)
if __name__ == '__main__':
inputdata = input().split()
n = int(inputdata[0])
m = int(inputdata[1])
a = int(inputdata[2])
b = int(inputdata[3])
f = int(inputdata[4])
s = int(inputdata[5])
t = int(inputdata[6])
the_hackathon(n, m, a, b, f, s, t) |
# https://www.geeksforgeeks.org/merge-sort/
# merge(arr,l,m,r) is a key process assuming that arr[l..m] and arr[m+1..r] are sorted and merges the sub-arrays into one
# Recursive implementation
# Space complexity is O(n)+O(logn) counting stack frames -> still O(n) in case of arrays
def mergeSort(arr):
# base case, need at least 2 el in arr to divide
if len(arr) > 1:
mid = len(arr) // 2
# Divide to L and R sub-arrays
L = arr[:mid]
R = arr[mid:]
# sort the first and seconds halves
mergeSort(L)
mergeSort(R)
# merge the two sub-arrays
i = j = k = 0
while i < len(L) and j < len(R):
# Merge back into arr
if L[i] < R[j]:
arr[k] = L[i]
i += 1
else:
arr[k] = R[j]
j += 1
k += 1
# check for remaining el
while i < len(L):
arr[k] = L[i]
i += 1
k += 1
while j < len(R):
arr[k] = R[j]
j += 1
k += 1
arr = [12,11,2,4,3,9,5,7,0]
print('before merge sort:', arr)
mergeSort(arr)
print('after merge sort', arr)
| def merge_sort(arr):
if len(arr) > 1:
mid = len(arr) // 2
l = arr[:mid]
r = arr[mid:]
merge_sort(L)
merge_sort(R)
i = j = k = 0
while i < len(L) and j < len(R):
if L[i] < R[j]:
arr[k] = L[i]
i += 1
else:
arr[k] = R[j]
j += 1
k += 1
while i < len(L):
arr[k] = L[i]
i += 1
k += 1
while j < len(R):
arr[k] = R[j]
j += 1
k += 1
arr = [12, 11, 2, 4, 3, 9, 5, 7, 0]
print('before merge sort:', arr)
merge_sort(arr)
print('after merge sort', arr) |
# list of lists
matrix = [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]]
# get element from list of lists
x = matrix[0][0]
# slice a list of lists
x = matrix[0][0:2]
# update element in list
matrix[0][0] = -1
# remove element in list
matrix[0].remove(-1)
# get number of lists
x = len(matrix)
| matrix = [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]]
x = matrix[0][0]
x = matrix[0][0:2]
matrix[0][0] = -1
matrix[0].remove(-1)
x = len(matrix) |
# A little about strings
# Often programmers face a problem that can be solved by
# analogy. You are already familiar with the string data type,
# Now you need to study the relevant section of the
# documentation about strings to solve this problem. In the
# documentation you will find the necessary similar examples.
# Your task is correct the code so that the output would be the
# following:
print(r"It isn`t in the section 'C:\some\name_of_file'") | print("It isn`t in the section 'C:\\some\\name_of_file'") |
def stringfixer(sentence):
sentence = sentence.split()
symbollst = [".","!","?"]
flag = False
count = 0
final = ""
for elm in sentence:
if count ==0:
elm = elm.capitalize()
count += 1
if flag:
elm = elm.capitalize()
flag = False
for letter in elm:
if letter in symbollst:
flag = True
if elm == "i":
elm = elm.capitalize()
elif "i" in elm:
if len(elm) == 2:
if elm[1] in symbollst:
elm = elm.capitalize()
final += elm + " "
final = final.rstrip()
return final
sentence = input("Enter your string: ")
print(stringfixer(sentence))
| def stringfixer(sentence):
sentence = sentence.split()
symbollst = ['.', '!', '?']
flag = False
count = 0
final = ''
for elm in sentence:
if count == 0:
elm = elm.capitalize()
count += 1
if flag:
elm = elm.capitalize()
flag = False
for letter in elm:
if letter in symbollst:
flag = True
if elm == 'i':
elm = elm.capitalize()
elif 'i' in elm:
if len(elm) == 2:
if elm[1] in symbollst:
elm = elm.capitalize()
final += elm + ' '
final = final.rstrip()
return final
sentence = input('Enter your string: ')
print(stringfixer(sentence)) |
def positive_or_negative(value):
if value > 0:
return "Positive!"
elif value < 0:
return "Negative!"
else:
return "It's zero!"
number = int(input("Wprowadz liczbe: "))
print(positive_or_negative(number)) | def positive_or_negative(value):
if value > 0:
return 'Positive!'
elif value < 0:
return 'Negative!'
else:
return "It's zero!"
number = int(input('Wprowadz liczbe: '))
print(positive_or_negative(number)) |
command = input().split("|")
energy = 100
coins = 100
clear_event = True
for current_command in command:
current_command = current_command.split("-")
event = current_command[0]
number = int(current_command[1])
if event == "rest":
needed_energy = 100 - energy
gained_energy = min(number, needed_energy)
energy += gained_energy
print(f"You gained {gained_energy} energy.")
print(f"Current energy: {energy}.")
elif event == "order":
if energy >= 30:
coins += number
energy -= 30
print(f"You earned {number} coins.")
else:
energy += 50
print(f"You had to rest!")
else:
coins -= number
if coins > 0:
print(f"You bought {event}.")
else:
print(f"Closed! Cannot afford {event}.")
clear_event = False
break
if clear_event:
print(f"Day completed!")
print(f"Coins: {coins}")
print(f"Energy: {energy}")
| command = input().split('|')
energy = 100
coins = 100
clear_event = True
for current_command in command:
current_command = current_command.split('-')
event = current_command[0]
number = int(current_command[1])
if event == 'rest':
needed_energy = 100 - energy
gained_energy = min(number, needed_energy)
energy += gained_energy
print(f'You gained {gained_energy} energy.')
print(f'Current energy: {energy}.')
elif event == 'order':
if energy >= 30:
coins += number
energy -= 30
print(f'You earned {number} coins.')
else:
energy += 50
print(f'You had to rest!')
else:
coins -= number
if coins > 0:
print(f'You bought {event}.')
else:
print(f'Closed! Cannot afford {event}.')
clear_event = False
break
if clear_event:
print(f'Day completed!')
print(f'Coins: {coins}')
print(f'Energy: {energy}') |
def diff_tests(input_files):
tests = []
updates = []
for input_file in input_files:
genrule_name = "gen_{}.actual".format(input_file)
actual_file = "{}.actual".format(input_file)
native.genrule(
name = genrule_name,
srcs = [input_file],
outs = [actual_file],
tools = ["//main:as-tree"],
cmd = "$(location //main:as-tree) $(location {input_file}) > $(location {actual_file})".format(
input_file = input_file,
actual_file = actual_file
),
testonly = True,
# This is manual to avoid being caught with `//...`
tags = ["manual"],
)
test_name = "test_{}".format(input_file)
exp_file = "{}.exp".format(input_file)
native.sh_test(
name = test_name,
srcs = ["diff_one.sh"],
args = [
"$(location {})".format(exp_file),
"$(location {})".format(actual_file),
],
data = [
exp_file,
actual_file,
],
size = "small",
tags = [],
)
update_name = "update_{}".format(input_file)
native.sh_test(
name = update_name,
srcs = ["update_one.sh"],
args = [
"$(location {})".format(actual_file),
"$(location {})".format(exp_file),
],
data = [
actual_file,
exp_file,
],
size = "small",
tags = [
# Avoid being caught with `//...`
"manual",
# Forces the test to be run locally, without sandboxing
"local",
# Unconditionally run this rule, and don't run in the sandbox
"external",
],
)
tests.append(test_name)
updates.append(update_name)
native.test_suite(
name = "test",
tests = tests,
)
native.test_suite(
name = "update",
tests = updates,
tags = ["manual"],
)
| def diff_tests(input_files):
tests = []
updates = []
for input_file in input_files:
genrule_name = 'gen_{}.actual'.format(input_file)
actual_file = '{}.actual'.format(input_file)
native.genrule(name=genrule_name, srcs=[input_file], outs=[actual_file], tools=['//main:as-tree'], cmd='$(location //main:as-tree) $(location {input_file}) > $(location {actual_file})'.format(input_file=input_file, actual_file=actual_file), testonly=True, tags=['manual'])
test_name = 'test_{}'.format(input_file)
exp_file = '{}.exp'.format(input_file)
native.sh_test(name=test_name, srcs=['diff_one.sh'], args=['$(location {})'.format(exp_file), '$(location {})'.format(actual_file)], data=[exp_file, actual_file], size='small', tags=[])
update_name = 'update_{}'.format(input_file)
native.sh_test(name=update_name, srcs=['update_one.sh'], args=['$(location {})'.format(actual_file), '$(location {})'.format(exp_file)], data=[actual_file, exp_file], size='small', tags=['manual', 'local', 'external'])
tests.append(test_name)
updates.append(update_name)
native.test_suite(name='test', tests=tests)
native.test_suite(name='update', tests=updates, tags=['manual']) |
#-----------------------------------------------------------------------------
# Name: Looping Structures - While (loopingWhile.py)
# Purpose: To provide information about how while loops work as a looping
# structure in Python
#
# Author: Mr. Seidel
# Created: 17-Aug-2018
# Updated: 22-Aug-2018
#-----------------------------------------------------------------------------
# Using a while loop to count up
count = 1
while count < 10:
print(str(x + count))
count = count + 1 # this can also be written as count += 1
# Using a while loop to count down
count = 275
while count > 250:
count = count - 1 # this can also be written as z -= 1
if count % 2 == 0:
print(str(z) + ": This number is even")
# Creating an infinite loop. This loop won't stop.
count = 1
while count == 1:
print("Count is equal to the number 1")
# Using an "else" statement with a while loop
count = 1
while count < 10:
print(str(2 * count))
count += 1
else:
print("Done")
# Breaking out of a loop early
count = 1
while count < 10:
if count == 5:
break
count += 1
# Using Continue to skip certain values
count = 1
while count < 10:
count += 1
if count % 2 == 0: # skip EVEN numbers (and ZERO)
continue # immediately jump back to "while count < 10"
print(str(count))
# Using pass
count = 1
while count < 10:
count += 1
if count % 2 == 0: # Plan to do something for EVEN numbers (and ZERO)
pass
elif count == 5: # Plan something else for when count is 5
pass
print(str(count)) | count = 1
while count < 10:
print(str(x + count))
count = count + 1
count = 275
while count > 250:
count = count - 1
if count % 2 == 0:
print(str(z) + ': This number is even')
count = 1
while count == 1:
print('Count is equal to the number 1')
count = 1
while count < 10:
print(str(2 * count))
count += 1
else:
print('Done')
count = 1
while count < 10:
if count == 5:
break
count += 1
count = 1
while count < 10:
count += 1
if count % 2 == 0:
continue
print(str(count))
count = 1
while count < 10:
count += 1
if count % 2 == 0:
pass
elif count == 5:
pass
print(str(count)) |
print("Akshitha Sai");
print("AM.EN.U4CSE18122");
print("CSE");
print("marvel rocks");
| print('Akshitha Sai')
print('AM.EN.U4CSE18122')
print('CSE')
print('marvel rocks') |
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
},
'targets': [
{
# GN version: //ios/net:ios_net_unittests
'target_name': 'ios_net_unittests',
'type': '<(gtest_target_type)',
'dependencies': [
'../../base/base.gyp:base',
'../../base/base.gyp:run_all_unittests',
'../../net/net.gyp:net_test_support',
'../../testing/gtest.gyp:gtest',
'../../url/url.gyp:url_lib',
'ios_net.gyp:ios_net',
],
'include_dirs': [
'../..',
],
'sources': [
'clients/crn_forwarding_network_client_factory_unittest.mm',
'cookies/cookie_cache_unittest.cc',
'cookies/cookie_creation_time_manager_unittest.mm',
'cookies/cookie_store_ios_unittest.mm',
'cookies/system_cookie_util_unittest.mm',
'http_response_headers_util_unittest.mm',
'nsurlrequest_util_unittest.mm',
'protocol_handler_util_unittest.mm',
'url_scheme_util_unittest.mm',
],
},
],
}
| {'variables': {'chromium_code': 1}, 'targets': [{'target_name': 'ios_net_unittests', 'type': '<(gtest_target_type)', 'dependencies': ['../../base/base.gyp:base', '../../base/base.gyp:run_all_unittests', '../../net/net.gyp:net_test_support', '../../testing/gtest.gyp:gtest', '../../url/url.gyp:url_lib', 'ios_net.gyp:ios_net'], 'include_dirs': ['../..'], 'sources': ['clients/crn_forwarding_network_client_factory_unittest.mm', 'cookies/cookie_cache_unittest.cc', 'cookies/cookie_creation_time_manager_unittest.mm', 'cookies/cookie_store_ios_unittest.mm', 'cookies/system_cookie_util_unittest.mm', 'http_response_headers_util_unittest.mm', 'nsurlrequest_util_unittest.mm', 'protocol_handler_util_unittest.mm', 'url_scheme_util_unittest.mm']}]} |
n = int(input("Enter N: "))
l = []
for i in range(0 , n):
inp = int(input("Enter numbers: "))
l.append(inp)
l.sort()
a = 0
b = 0
for i in range(0 , n):
if i % 2 != 0:
a = a * 10 + l[i]
else:
b = b * 10 + l[i]
c = a + b
print(c)
| n = int(input('Enter N: '))
l = []
for i in range(0, n):
inp = int(input('Enter numbers: '))
l.append(inp)
l.sort()
a = 0
b = 0
for i in range(0, n):
if i % 2 != 0:
a = a * 10 + l[i]
else:
b = b * 10 + l[i]
c = a + b
print(c) |
help = '''tdo -- A todo list tool for the terminal.
Available commands:
tdo Lists all undone tasks, sorted by category.
tdo all Lists all tasks.
tdo add "task" [list] Add a task to a certain list or the default list.
tdo edit id Edit a task description.
tdo done id Mark tha task with the ID 'id' as done.
tdo newlist "name" Create a new list named 'name'
tdo remove "list" Delete the list 'list'
tdo clean [list] Removes all tasks that have been marked as done.
If you specify a list name, only this list is cleared.
tdo lists List all lists with a statistic of undone/done tasks.
tdo help Display this help.
tdo reset DANGER ZONE. Delete all your todos and todo lists.
tdo themes Shows all available themes.
tdo settheme id Set the theme to <id>
tdo export filename Export all your todos to Markdown.'''
| help = 'tdo -- A todo list tool for the terminal.\n\nAvailable commands:\ntdo Lists all undone tasks, sorted by category.\ntdo all Lists all tasks.\ntdo add "task" [list] Add a task to a certain list or the default list.\ntdo edit id Edit a task description.\ntdo done id Mark tha task with the ID \'id\' as done.\ntdo newlist "name" Create a new list named \'name\'\ntdo remove "list" Delete the list \'list\'\ntdo clean [list] Removes all tasks that have been marked as done.\n If you specify a list name, only this list is cleared.\ntdo lists List all lists with a statistic of undone/done tasks.\ntdo help Display this help.\ntdo reset DANGER ZONE. Delete all your todos and todo lists.\ntdo themes Shows all available themes.\ntdo settheme id Set the theme to <id>\ntdo export filename Export all your todos to Markdown.' |
game_list = {
"games": [
"4story",
"8bitmmo",
"9dragons",
"9lives-arena",
"a-tale-in-the-desert",
"a3",
"a3-still-alive",
"aberoth",
"ace-online",
"achaea",
"ad2460",
"adventure-land",
"adventure-quest-3d",
"adventurequest-worlds",
"aetolia-the-midnight-age",
"age-of-conan-unchained",
"age-of-the-four-clans",
"age-of-wushu",
"age-of-wushu-dynasty",
"agents-of-aggro-city-online",
"aika",
"aion",
"aion-classic",
"airside-andy",
"akanbar",
"albion-online",
"allods-online",
"alphadia-genesis",
"anarchy-online",
"angels-online",
"angry-birds-epic",
"animal-crossing-new-horizons",
"anime-ninja",
"anime-pirates",
"anocris",
"anthem",
"antilia",
"apb-reloaded",
"apex-legends",
"aranock-online",
"arcane-legends",
"arcane-waters",
"arcfall",
"archeage",
"archeage-begins",
"archeage-unchained",
"archeblade",
"ark-survival-evolved",
"armed-heroes-2",
"armored-warfare",
"artifact",
"ashen-empires",
"ashes-of-creation-apocalypse",
"assassins-creed-valhalla",
"astaria",
"asteidus",
"astellia",
"astonia-reborn",
"astral-terra",
"astro-empires",
"astro-lords-oort-cloud",
"atlantica-online",
"atlas",
"atlas-reactor",
"atlas-rogues",
"atom-rpg",
"aura-kingdom",
"avalon-the-legend-lives",
"avatar-star",
"avernum-2-crystal-souls",
"avowed",
"azulgar",
"baldurs-gate-iii",
"barons-of-the-galaxy",
"battle-chasers",
"battle-dawn",
"battle-dawn-galaxies",
"battleborn",
"battlerite",
"black-aftermath",
"black-desert-mobile",
"black-desert-online",
"black-legend",
"black-prophecy-tactics-nexus-conflict",
"blackfaun",
"blackguards",
"blackguards-2",
"blacklight-retribution",
"blade-and-soul",
"blade-and-soul-2",
"blade-and-soul-revolution",
"blankos-block-party",
"bleach-online",
"bless-mobile",
"bless-unleashed",
"block-story",
"bloodborne",
"bloodline-champions",
"blossom-and-decay",
"bombshell",
"book-of-demons",
"book-of-travels",
"boot-hill-heroes",
"borderlands-2",
"borderlands-3",
"borderlands-the-pre-sequel",
"bound-by-flame",
"boundless",
"bounty-bay-online",
"bounty-hounds-online",
"bravada",
"brave-nine",
"bravely-default",
"bravely-default-ii",
"bravely-second",
"cabal-online",
"call-of-duty-warzone",
"call-of-gods",
"camelot-unchained",
"caravan-stories",
"cardlife",
"casinorpg",
"castlot",
"celtic-heroes",
"champions-of-regnum",
"champions-of-titan",
"champions-online",
"child-of-light",
"chroma-squad",
"chronicles-of-denzar",
"chrono-odyssey",
"chrono-tales",
"chrono-wars",
"citizens-of-earth",
"city-of-titans",
"clan-lord",
"clash-of-avatars",
"clash-of-clans",
"closers",
"colonies-online",
"command-and-conquer-tiberium-alliances",
"conan-exiles",
"conquer-online",
"conquerors-blade",
"continent-of-the-ninth-seal",
"core-exiles",
"cosmicbreak-universal",
"costume-quest-2",
"crimson-desert",
"cronous",
"crossfire",
"crossout",
"crowfall",
"crucible",
"crusader-kings-iii",
"crystal-saga",
"crystal-saga-2",
"cubic-castles",
"cuisine-royale",
"cyberpunk-2077",
"daimonin",
"damascus",
"dark-age-of-camelot",
"dark-ages",
"dark-and-light",
"dark-genesis",
"dark-knight",
"dark-legends",
"dark-souls-3",
"dark-souls-ii",
"darkest-dungeon",
"darkorbit-reloaded",
"darkspace",
"darkstory-online",
"darkwind-war-on-wheels",
"dauntless",
"dayz",
"dc-legends",
"dc-universe-online",
"ddtank",
"dead-by-daylight",
"dead-frontier",
"dead-frontier-ii",
"dead-island",
"dead-island-riptide",
"dead-maze",
"dead-state",
"deadside",
"deepworld",
"defend-the-night",
"defiance",
"defiance-2050",
"dekaron",
"deorum-online",
"desert-operations",
"destiny",
"destiny-2",
"destiny-of-ancient-kingdoms",
"destinys-sword",
"deus-ex-mankind-divided",
"diablo-3",
"diablo-ii-resurrected",
"diablo-immortal",
"diablo-iv",
"digimon-masters-online",
"dino-storm",
"disintegration",
"divergence-online",
"divinity-original-sin-2",
"divinity-original-sin",
"dk-online",
"dofus",
"dokev",
"doom-eternal",
"dota-2",
"drachenblut2",
"dragon-age-4",
"dragon-age-inquisition",
"dragon-awaken",
"dragon-blood",
"dragon-eternity",
"dragon-fin-soup",
"dragon-lord",
"dragon-nest",
"dragon-of-legends",
"dragon-pals",
"dragon-raja-online",
"dragon-saga",
"dragons-dogma-dark-arisen",
"dragonfable",
"dragons-and-titans",
"drakengard-3",
"drakensang-online",
"dransik-classic",
"dreadnought",
"dream-of-mirror-online",
"dreamworld",
"drifters-loot-the-galaxy",
"duelyst",
"dungeon-fighter-online",
"dungeon-hero",
"dungeon-hunter-5",
"dungeon-of-the-endless",
"dungeon-party",
"dungeons-and-dragons-online",
"dungeons-and-dragons-dark-alliance",
"dv8-exile",
"dying-light",
"dynastica",
"dynasty-of-the-magi",
"earthlock-festival-of-magic",
"echo-of-soul",
"echo-of-soul-phoenix",
"eden-eternal",
"eden-falling",
"edenbrawl",
"edengrad",
"edge-of-space",
"elden-ring",
"eldevin",
"elite-dangerous",
"elsword",
"elvenar",
"elyon",
"elysian-war",
"ember-sword",
"empire",
"empire-four-kingdoms",
"empire-of-sports",
"empire-universe-3",
"empire-warzone",
"empire-revenant",
"enlisted",
"entropia-universe",
"epicduel",
"erectus-the-game",
"eredan",
"erepublik",
"escape-from-tarkov",
"estogan",
"eternal-fury",
"eternal-lands",
"eternal-magic",
"etrian-mystery-dungeon",
"etrian-odyssey-2-untold-the-fafnir-knight",
"eudemons-online",
"eve-online",
"eve-valkyrie",
"everember-online",
"evernight",
"everquest",
"everquest-ii",
"everspace-2",
"evidyon-no-mans-land",
"evony",
"excalibur",
"exile-online",
"fire-special-ops",
"factions-origins-of-malu",
"fallen-earth",
"fallen-sword",
"fallout-4",
"fallout-76",
"fantasy-life",
"fantasy-realm-online-moon-haven",
"fantasy-tales-online",
"fantasy-worlds-rhynn",
"fasaria-world-online",
"fear-the-night",
"fear-the-wolves",
"fearless-fantasy",
"fellow-eternal-clash",
"felspire",
"fiesta-online",
"final-fantasy-type-0-hd",
"final-fantasy-vii-remake",
"final-fantasy-xx-2-remaster",
"final-fantasy-xi",
"final-fantasy-xv",
"final-fantasy-xvi",
"five-guardians-of-david",
"flamefrost-legacy",
"florensia",
"flyff-gold",
"football-superstars",
"force-of-arms",
"forge-of-empires",
"forsaken-world",
"fortnite",
"foxhole",
"fragmented",
"freeworld-apocalypse-portal",
"furcadia",
"galaxy-online-2",
"galaxy-warfare",
"game-of-thrones-winter-is-coming",
"games-of-glory",
"gates-of-andaron",
"gauntlet",
"gekkeiju-online",
"generals-art-of-war",
"genshin-impact",
"ghost-of-tsushima",
"gladiatus",
"gloria-victis",
"glory-of-gods",
"goal-line-blitz",
"godfall",
"godswar-online",
"graal-kingdoms",
"gran-saga",
"granado-espada-online",
"grand-fantasia",
"grand-theft-auto-online",
"grav",
"grepolis",
"grim-dawn",
"grounded",
"guardians-of-divinity",
"guardians-of-ember",
"guild-wars",
"guild-wars-factions",
"guild-wars-nightfall",
"habbo",
"halosphere2",
"hand-of-fate",
"haven-and-hearth",
"hawken",
"heart-forth-alicia",
"hearthstone",
"helbreath",
"hellgate",
"hello-kitty-online",
"hero-online",
"hero-wars",
"hero-zero",
"heroes-and-generals",
"heroes-and-legends-conquerors-of-kolhar",
"heroes-evolved",
"heroes-in-the-sky",
"heroes-of-atlan",
"heroes-of-gaia",
"heroes-of-newerth",
"heroes-of-the-storm",
"herosmash",
"hex-shards-of-fate",
"highlands",
"hob",
"hogwarts-legacy",
"hood-outlaws-and-legends",
"hordes",
"horizon-zero-dawn",
"hostile-space",
"humankind",
"hunters-arena-legends",
"hustle-castle",
"hyper-universe",
"i-am-setsuna",
"icewind-dale-enhanced-edition",
"ikariam",
"illyriad",
"ilysia",
"immortal-day",
"immortals-fenyx-rising",
"imperian",
"infantry-online",
"inferna",
"infestation-survivor-stories",
"infinite-fleet",
"inked-mafia",
"interstellar-war",
"ironsight",
"island-forge",
"islandoom",
"istaria-chronicles-of-the-gifted",
"kal-online",
"key-to-heaven",
"kingdom-come-deliverance",
"kingdom-of-drakkar",
"kingdom-under-fire-ii",
"kingdom-wars",
"kingdoms-of-amalur-re-reckoning",
"kingory",
"kings-and-heroes",
"kings-and-legends",
"kings-era",
"kings-of-the-realm",
"kingshunt",
"kingsroad",
"knight-online",
"kurtzpel",
"kyn",
"la-tale",
"last-chaos",
"last-epoch",
"last-oasis",
"league-of-angels",
"league-of-angels-heavens-fury",
"league-of-angels-ii",
"league-of-angels-iii",
"league-of-legends",
"league-of-legends-wild-rift",
"leap-of-fate",
"left-to-survive",
"legend-of-grimrock-2",
"legend-of-zelda-breath-of-the-wild",
"legends-of-aria",
"legends-of-equestria",
"legends-of-honor",
"legends-of-persia",
"legends-of-runeterra",
"liberators",
"lichdom-battlemage",
"life-beyond",
"life-is-feudal",
"life-of-rome",
"light-of-nova",
"line-of-defense",
"lineage-2",
"lineage-2-aden",
"lineage-2-essence",
"lineage-2-revolution",
"lineage-eternal-twilight-resistance",
"livelock",
"lord-of-chains",
"lord-of-the-rings-online",
"lords-of-the-fallen",
"lords-of-the-fallen-2",
"lost-dimension",
"lucent-heart",
"luckcatchers",
"luminary-rise-of-the-goonzu",
"lusternia-age-of-ascension",
"mabinogi",
"mad-max",
"mad-world-mmo",
"maelstrom",
"mafiashot",
"magic-duels-origins",
"magic-legends",
"magic-the-gathering-arena",
"manarocks",
"maplestory",
"maplestory-2",
"maplestory-m",
"march-to-rome",
"margonem",
"marvel-future-revolution",
"marvels-avengers",
"marvel-puzzle-quest",
"mass-effect-legendary-edition",
"mass-effect-andromeda",
"mechwarrior-online",
"meridian-59",
"merlin",
"metal-war-online",
"metin-2",
"middle-earth-shadow-of-mordor",
"might-and-magic-heroes-online",
"might-and-magic-x-legacy",
"milmo",
"minecraft",
"minecraft-dungeons",
"ministry-of-war",
"mirage-online-classic",
"monster-hunter-4-ultimate",
"monster-hunter-rise",
"monster-hunter-world",
"monstermmorpg",
"mordhau",
"mortal-online",
"mortal-shell",
"mount-and-blade-ii-bannerlord",
"mu-legend",
"mu-online",
"mu-origin",
"mu-origin-2",
"my-lands",
"myst-online-uru-live",
"myth-war-2",
"mythborne",
"mytheon",
"naruto-online",
"naval-action",
"navy-field",
"navy-field-2",
"necropolis",
"nemexia",
"neocron-2",
"nether",
"neverwinter",
"new-dawn",
"new-world",
"next-island",
"nexus-the-kingdom-of-the-winds",
"nioh-2",
"no-mans-sky",
"nords-heroes-of-the-north",
"nostale",
"nova-genesis",
"oberin",
"odin-quest",
"ogre-island",
"old-world",
"omega-zodiac",
"omerta-3",
"one-piece-online",
"one-piece-online-2-pirate-king",
"online-boxing-manager",
"online-tennis-manager",
"orake",
"orbusvr",
"orcs-must-die-3",
"order-and-chaos-2-redemption",
"order-and-chaos-online",
"order-of-magic",
"origins-return",
"orions-belt",
"osiris-new-dawn",
"otherland",
"out-of-reach",
"outlaws-of-the-old-west",
"outriders",
"outwar",
"overkings",
"oversoul",
"overwatch",
"oz-broken-kingdom",
"pagan-online",
"paladins-champions-of-the-realm",
"palia",
"panzar",
"past-fate",
"path-of-exile",
"pathfinder-online",
"perfect-world-international",
"perfect-world-mobile",
"persona-5",
"persona-5-royal",
"persona-q-shadow-of-the-labyrinth",
"phantasy-star-online-2",
"phoenix-dynasty-2",
"piercing-blow",
"pillars-of-eternity",
"pillars-of-eternity-2-deadfire",
"pirate-arena",
"pirate-galaxy",
"pirate-king-online",
"pirate-storm",
"pirate101",
"pirates-of-the-burning-sea",
"pirates-tides-of-fortune",
"planeshift",
"planet-arkadia",
"planet-calypso",
"planetside-2",
"playable-worlds",
"playerunknowns-battlegrounds",
"pocket-legends",
"pokemon-go",
"pokemon-xy",
"population-zero",
"portal-knights",
"pox-nora",
"predator-hunting-grounds",
"preta-vendetta-rising",
"prime-world",
"priston-tale",
"profane",
"project-genom",
"project-gorgon",
"project-ion",
"project-x-zone-2",
"project-zomboid",
"prosperous-universe",
"quest-for-infamy",
"r2-online-reign-of-revolution",
"radical-heights",
"rage-of-3-kingdoms",
"ragewar",
"ragnarok-online",
"ragnarok-online-ii",
"ragnarok-online-transcendence",
"ragnarok-origin",
"raid-shadow-legends",
"rail-nation",
"rakion",
"ran-online",
"rangers-of-oblivion",
"rappelz",
"rappelzsea",
"rapture-rejects",
"realm-of-the-mad-god",
"realm-royale",
"rebel-galaxy",
"rebirth-fantasy",
"record-of-lodoss-war-online",
"red-dead-online",
"red-stone",
"redemptions-guild",
"redfall",
"regnum-online",
"remnant-from-the-ashes",
"rend",
"requiem-memento-mori",
"revelation-online",
"riders-of-icarus",
"riders-republic",
"rift",
"rimworld",
"ring-of-elysium",
"riotzone",
"rise",
"rise-of-the-tycoon",
"risen-3-titan-lords",
"rivality",
"roblox",
"robocraft",
"rocket-league",
"rogalia",
"rogue-company",
"rohan-blood-feud",
"romadoria",
"rosh-online",
"roto-x",
"royal-quest",
"rulers-of-the-sea",
"rumble-fighter",
"runes-of-magic",
"runescape",
"rust",
"ryzom",
"s4-league",
"sacred-3",
"saga",
"salem",
"samutale",
"savage-lands",
"scarlet-nexus",
"scars-of-honor",
"scavengers",
"scions-of-fate-yulgang",
"sea-of-thieves",
"seal-online-blades-of-destiny",
"seas-of-gold",
"second-life",
"serenia-fantasy",
"seven-seas-saga",
"shadow-arena",
"shadowbound",
"shadowgate",
"shadowgun-legends",
"shadowrun-chronicles",
"shadowrun-returns",
"shadowrun-hong-kong",
"shadowverse",
"shaiya",
"shattered-galaxy",
"shin-megami-tensei-devil-survivor-2-record-breaker",
"ship-of-heroes",
"shot-online",
"shroud-of-the-avatar",
"siegefall",
"siegelord",
"silkroad-online",
"skull-and-bones",
"skyclimbers",
"skyforge",
"skylanders-battlecast",
"smite",
"solasta-crown-of-the-magister",
"soldiers-inc",
"soul-order-online-2",
"soulworker",
"south-park-stick-of-truth",
"space-wars-interstellar-empires",
"sparta-war-of-empires",
"spellbreak",
"spellgear",
"spellstone",
"sphere-3",
"spiral-knights",
"splitgate-arena-warfare",
"star-citizen",
"star-colony",
"star-conflict",
"star-crusade-war-for-the-expanse",
"star-legends",
"star-ocean-5-integrity-and-faithlessness",
"star-sonata-2",
"star-stable",
"star-trek-online",
"star-wars-battlefront-ii",
"star-wars-squadrons",
"star-wars-the-old-republic",
"starbase",
"starborne",
"starborne-frontiers",
"starbound",
"starfield",
"starport-galactic-empires",
"stash-no-loot-left-behind",
"state-of-decay",
"steambirds-alliance",
"steamcraft",
"steinworld",
"stoneage-world",
"storm-riders",
"stormfall-age-of-war",
"stormthrone",
"stranger-of-paradise",
"stronghold-kingdoms",
"styx-master-of-shadows",
"supernova",
"supremacy-1914",
"supreme-destiny",
"survarium",
"sword-coast-legends",
"swords-of-legends-online",
"tales-of-symphonia-chronicles",
"tales-of-zestiria",
"talisman-online",
"tamer-saga",
"tantra-online",
"tantra-rumble",
"temtem",
"tentlan",
"tera",
"terraria",
"thang-online",
"the-4th-coming",
"the-aetherlight-chronicles-of-the-resistance",
"the-ascent",
"the-banner-saga",
"the-banner-saga-2",
"the-black-death",
"the-black-watchmen",
"the-crew",
"the-crew-2",
"the-division",
"the-division-2",
"the-dwarves",
"the-elder-scrolls-blades",
"the-end",
"the-epic-might",
"the-exiled",
"the-hammers-end",
"the-incredible-adventures-of-van-helsing",
"the-incredible-adventures-of-van-helsing-2",
"the-incredible-adventures-of-van-helsing-iii",
"the-legend-of-legacy",
"the-legend-of-pirates-online",
"the-mighty-quest-for-epic-loot",
"the-mob-wars",
"the-outer-worlds",
"the-pride-of-taern",
"the-realm-online",
"the-repopulation",
"the-settlers-online",
"the-skies",
"the-technomancer",
"the-wagadu-chronicles",
"the-waylanders",
"the-west",
"the-witcher-3-wild-hunt",
"there",
"therian-saga",
"thunder-run-firestrike",
"tibia",
"tibia-micro-edition",
"tiger-knight",
"titan-siege",
"titanreach",
"titans-of-time",
"torchlight-2",
"torchlight-iii",
"torment-tides-of-numenera",
"total-domination",
"total-war-saga-troy",
"total-war-three-kingdoms",
"total-war-arena",
"transistor",
"trapped-dead-lockdown",
"travian",
"travian-kingdoms",
"tree-of-life",
"tree-of-savior",
"trials-of-mana",
"tribal-wars",
"tribes-of-midgard",
"tribes-ascend",
"trove",
"tug",
"turf-battles",
"twin-saga",
"tynon",
"tyranny",
"ufo-online",
"ultima-online",
"uncharted-waters-online",
"underlight-clash-of-dreams",
"underworld-ascendant",
"unification-wars",
"unlimited-ninja",
"utopia",
"v-rising",
"v4",
"vainglory",
"valdis-story-abyssal-city",
"valheim",
"valiance-online",
"valnir-rok",
"valorant",
"vampire-the-masquerade-bloodlines-2",
"vampyr",
"vendetta-online",
"victor-vran",
"victory-age-of-racing",
"vikings-war-of-clans",
"villagers-and-heroes",
"vindictus",
"virtonomics-economics-game-online",
"visions-of-zosimos",
"voidexpanse",
"voyage-century-online",
"wakfu",
"war-of-mercenaries",
"war-thunder",
"war2-glory",
"warflare",
"wargame1942",
"warhammer-40k-inquisitor-martyr",
"warhammer-chaosbane",
"warhammer-odyssey",
"warmonger",
"warp-nexus",
"wartune",
"wasteland-2",
"wasteland-3",
"waven",
"we-ride",
"weapons-of-mythology",
"wild-terra",
"wild-west-online",
"wind-of-luck-arena",
"wings-of-destiny",
"winning-putt",
"with-your-destiny",
"wizard101",
"wolcen-lords-of-mayhem",
"world-golf-tour",
"world-of-kung-fu",
"world-of-tanks",
"world-of-trinketz",
"world-of-warcraft",
"world-of-warplanes",
"world-of-warriors",
"world-of-warships",
"world-war-online",
"worldalpha",
"worlds-adrift",
"wurm-online",
"wwii-online",
"xcom-chimera-squad",
"xenoblade-chronicles-3d",
"xenoblade-chronicles-definitive-edition",
"xenoblade-chronicles-x",
"xsyon-prelude",
"xulu",
"yohoho-puzzle-pirates",
"z1-battle-royale",
"zeal",
"zenith",
"zodiac"
]
} | game_list = {'games': ['4story', '8bitmmo', '9dragons', '9lives-arena', 'a-tale-in-the-desert', 'a3', 'a3-still-alive', 'aberoth', 'ace-online', 'achaea', 'ad2460', 'adventure-land', 'adventure-quest-3d', 'adventurequest-worlds', 'aetolia-the-midnight-age', 'age-of-conan-unchained', 'age-of-the-four-clans', 'age-of-wushu', 'age-of-wushu-dynasty', 'agents-of-aggro-city-online', 'aika', 'aion', 'aion-classic', 'airside-andy', 'akanbar', 'albion-online', 'allods-online', 'alphadia-genesis', 'anarchy-online', 'angels-online', 'angry-birds-epic', 'animal-crossing-new-horizons', 'anime-ninja', 'anime-pirates', 'anocris', 'anthem', 'antilia', 'apb-reloaded', 'apex-legends', 'aranock-online', 'arcane-legends', 'arcane-waters', 'arcfall', 'archeage', 'archeage-begins', 'archeage-unchained', 'archeblade', 'ark-survival-evolved', 'armed-heroes-2', 'armored-warfare', 'artifact', 'ashen-empires', 'ashes-of-creation-apocalypse', 'assassins-creed-valhalla', 'astaria', 'asteidus', 'astellia', 'astonia-reborn', 'astral-terra', 'astro-empires', 'astro-lords-oort-cloud', 'atlantica-online', 'atlas', 'atlas-reactor', 'atlas-rogues', 'atom-rpg', 'aura-kingdom', 'avalon-the-legend-lives', 'avatar-star', 'avernum-2-crystal-souls', 'avowed', 'azulgar', 'baldurs-gate-iii', 'barons-of-the-galaxy', 'battle-chasers', 'battle-dawn', 'battle-dawn-galaxies', 'battleborn', 'battlerite', 'black-aftermath', 'black-desert-mobile', 'black-desert-online', 'black-legend', 'black-prophecy-tactics-nexus-conflict', 'blackfaun', 'blackguards', 'blackguards-2', 'blacklight-retribution', 'blade-and-soul', 'blade-and-soul-2', 'blade-and-soul-revolution', 'blankos-block-party', 'bleach-online', 'bless-mobile', 'bless-unleashed', 'block-story', 'bloodborne', 'bloodline-champions', 'blossom-and-decay', 'bombshell', 'book-of-demons', 'book-of-travels', 'boot-hill-heroes', 'borderlands-2', 'borderlands-3', 'borderlands-the-pre-sequel', 'bound-by-flame', 'boundless', 'bounty-bay-online', 'bounty-hounds-online', 'bravada', 'brave-nine', 'bravely-default', 'bravely-default-ii', 'bravely-second', 'cabal-online', 'call-of-duty-warzone', 'call-of-gods', 'camelot-unchained', 'caravan-stories', 'cardlife', 'casinorpg', 'castlot', 'celtic-heroes', 'champions-of-regnum', 'champions-of-titan', 'champions-online', 'child-of-light', 'chroma-squad', 'chronicles-of-denzar', 'chrono-odyssey', 'chrono-tales', 'chrono-wars', 'citizens-of-earth', 'city-of-titans', 'clan-lord', 'clash-of-avatars', 'clash-of-clans', 'closers', 'colonies-online', 'command-and-conquer-tiberium-alliances', 'conan-exiles', 'conquer-online', 'conquerors-blade', 'continent-of-the-ninth-seal', 'core-exiles', 'cosmicbreak-universal', 'costume-quest-2', 'crimson-desert', 'cronous', 'crossfire', 'crossout', 'crowfall', 'crucible', 'crusader-kings-iii', 'crystal-saga', 'crystal-saga-2', 'cubic-castles', 'cuisine-royale', 'cyberpunk-2077', 'daimonin', 'damascus', 'dark-age-of-camelot', 'dark-ages', 'dark-and-light', 'dark-genesis', 'dark-knight', 'dark-legends', 'dark-souls-3', 'dark-souls-ii', 'darkest-dungeon', 'darkorbit-reloaded', 'darkspace', 'darkstory-online', 'darkwind-war-on-wheels', 'dauntless', 'dayz', 'dc-legends', 'dc-universe-online', 'ddtank', 'dead-by-daylight', 'dead-frontier', 'dead-frontier-ii', 'dead-island', 'dead-island-riptide', 'dead-maze', 'dead-state', 'deadside', 'deepworld', 'defend-the-night', 'defiance', 'defiance-2050', 'dekaron', 'deorum-online', 'desert-operations', 'destiny', 'destiny-2', 'destiny-of-ancient-kingdoms', 'destinys-sword', 'deus-ex-mankind-divided', 'diablo-3', 'diablo-ii-resurrected', 'diablo-immortal', 'diablo-iv', 'digimon-masters-online', 'dino-storm', 'disintegration', 'divergence-online', 'divinity-original-sin-2', 'divinity-original-sin', 'dk-online', 'dofus', 'dokev', 'doom-eternal', 'dota-2', 'drachenblut2', 'dragon-age-4', 'dragon-age-inquisition', 'dragon-awaken', 'dragon-blood', 'dragon-eternity', 'dragon-fin-soup', 'dragon-lord', 'dragon-nest', 'dragon-of-legends', 'dragon-pals', 'dragon-raja-online', 'dragon-saga', 'dragons-dogma-dark-arisen', 'dragonfable', 'dragons-and-titans', 'drakengard-3', 'drakensang-online', 'dransik-classic', 'dreadnought', 'dream-of-mirror-online', 'dreamworld', 'drifters-loot-the-galaxy', 'duelyst', 'dungeon-fighter-online', 'dungeon-hero', 'dungeon-hunter-5', 'dungeon-of-the-endless', 'dungeon-party', 'dungeons-and-dragons-online', 'dungeons-and-dragons-dark-alliance', 'dv8-exile', 'dying-light', 'dynastica', 'dynasty-of-the-magi', 'earthlock-festival-of-magic', 'echo-of-soul', 'echo-of-soul-phoenix', 'eden-eternal', 'eden-falling', 'edenbrawl', 'edengrad', 'edge-of-space', 'elden-ring', 'eldevin', 'elite-dangerous', 'elsword', 'elvenar', 'elyon', 'elysian-war', 'ember-sword', 'empire', 'empire-four-kingdoms', 'empire-of-sports', 'empire-universe-3', 'empire-warzone', 'empire-revenant', 'enlisted', 'entropia-universe', 'epicduel', 'erectus-the-game', 'eredan', 'erepublik', 'escape-from-tarkov', 'estogan', 'eternal-fury', 'eternal-lands', 'eternal-magic', 'etrian-mystery-dungeon', 'etrian-odyssey-2-untold-the-fafnir-knight', 'eudemons-online', 'eve-online', 'eve-valkyrie', 'everember-online', 'evernight', 'everquest', 'everquest-ii', 'everspace-2', 'evidyon-no-mans-land', 'evony', 'excalibur', 'exile-online', 'fire-special-ops', 'factions-origins-of-malu', 'fallen-earth', 'fallen-sword', 'fallout-4', 'fallout-76', 'fantasy-life', 'fantasy-realm-online-moon-haven', 'fantasy-tales-online', 'fantasy-worlds-rhynn', 'fasaria-world-online', 'fear-the-night', 'fear-the-wolves', 'fearless-fantasy', 'fellow-eternal-clash', 'felspire', 'fiesta-online', 'final-fantasy-type-0-hd', 'final-fantasy-vii-remake', 'final-fantasy-xx-2-remaster', 'final-fantasy-xi', 'final-fantasy-xv', 'final-fantasy-xvi', 'five-guardians-of-david', 'flamefrost-legacy', 'florensia', 'flyff-gold', 'football-superstars', 'force-of-arms', 'forge-of-empires', 'forsaken-world', 'fortnite', 'foxhole', 'fragmented', 'freeworld-apocalypse-portal', 'furcadia', 'galaxy-online-2', 'galaxy-warfare', 'game-of-thrones-winter-is-coming', 'games-of-glory', 'gates-of-andaron', 'gauntlet', 'gekkeiju-online', 'generals-art-of-war', 'genshin-impact', 'ghost-of-tsushima', 'gladiatus', 'gloria-victis', 'glory-of-gods', 'goal-line-blitz', 'godfall', 'godswar-online', 'graal-kingdoms', 'gran-saga', 'granado-espada-online', 'grand-fantasia', 'grand-theft-auto-online', 'grav', 'grepolis', 'grim-dawn', 'grounded', 'guardians-of-divinity', 'guardians-of-ember', 'guild-wars', 'guild-wars-factions', 'guild-wars-nightfall', 'habbo', 'halosphere2', 'hand-of-fate', 'haven-and-hearth', 'hawken', 'heart-forth-alicia', 'hearthstone', 'helbreath', 'hellgate', 'hello-kitty-online', 'hero-online', 'hero-wars', 'hero-zero', 'heroes-and-generals', 'heroes-and-legends-conquerors-of-kolhar', 'heroes-evolved', 'heroes-in-the-sky', 'heroes-of-atlan', 'heroes-of-gaia', 'heroes-of-newerth', 'heroes-of-the-storm', 'herosmash', 'hex-shards-of-fate', 'highlands', 'hob', 'hogwarts-legacy', 'hood-outlaws-and-legends', 'hordes', 'horizon-zero-dawn', 'hostile-space', 'humankind', 'hunters-arena-legends', 'hustle-castle', 'hyper-universe', 'i-am-setsuna', 'icewind-dale-enhanced-edition', 'ikariam', 'illyriad', 'ilysia', 'immortal-day', 'immortals-fenyx-rising', 'imperian', 'infantry-online', 'inferna', 'infestation-survivor-stories', 'infinite-fleet', 'inked-mafia', 'interstellar-war', 'ironsight', 'island-forge', 'islandoom', 'istaria-chronicles-of-the-gifted', 'kal-online', 'key-to-heaven', 'kingdom-come-deliverance', 'kingdom-of-drakkar', 'kingdom-under-fire-ii', 'kingdom-wars', 'kingdoms-of-amalur-re-reckoning', 'kingory', 'kings-and-heroes', 'kings-and-legends', 'kings-era', 'kings-of-the-realm', 'kingshunt', 'kingsroad', 'knight-online', 'kurtzpel', 'kyn', 'la-tale', 'last-chaos', 'last-epoch', 'last-oasis', 'league-of-angels', 'league-of-angels-heavens-fury', 'league-of-angels-ii', 'league-of-angels-iii', 'league-of-legends', 'league-of-legends-wild-rift', 'leap-of-fate', 'left-to-survive', 'legend-of-grimrock-2', 'legend-of-zelda-breath-of-the-wild', 'legends-of-aria', 'legends-of-equestria', 'legends-of-honor', 'legends-of-persia', 'legends-of-runeterra', 'liberators', 'lichdom-battlemage', 'life-beyond', 'life-is-feudal', 'life-of-rome', 'light-of-nova', 'line-of-defense', 'lineage-2', 'lineage-2-aden', 'lineage-2-essence', 'lineage-2-revolution', 'lineage-eternal-twilight-resistance', 'livelock', 'lord-of-chains', 'lord-of-the-rings-online', 'lords-of-the-fallen', 'lords-of-the-fallen-2', 'lost-dimension', 'lucent-heart', 'luckcatchers', 'luminary-rise-of-the-goonzu', 'lusternia-age-of-ascension', 'mabinogi', 'mad-max', 'mad-world-mmo', 'maelstrom', 'mafiashot', 'magic-duels-origins', 'magic-legends', 'magic-the-gathering-arena', 'manarocks', 'maplestory', 'maplestory-2', 'maplestory-m', 'march-to-rome', 'margonem', 'marvel-future-revolution', 'marvels-avengers', 'marvel-puzzle-quest', 'mass-effect-legendary-edition', 'mass-effect-andromeda', 'mechwarrior-online', 'meridian-59', 'merlin', 'metal-war-online', 'metin-2', 'middle-earth-shadow-of-mordor', 'might-and-magic-heroes-online', 'might-and-magic-x-legacy', 'milmo', 'minecraft', 'minecraft-dungeons', 'ministry-of-war', 'mirage-online-classic', 'monster-hunter-4-ultimate', 'monster-hunter-rise', 'monster-hunter-world', 'monstermmorpg', 'mordhau', 'mortal-online', 'mortal-shell', 'mount-and-blade-ii-bannerlord', 'mu-legend', 'mu-online', 'mu-origin', 'mu-origin-2', 'my-lands', 'myst-online-uru-live', 'myth-war-2', 'mythborne', 'mytheon', 'naruto-online', 'naval-action', 'navy-field', 'navy-field-2', 'necropolis', 'nemexia', 'neocron-2', 'nether', 'neverwinter', 'new-dawn', 'new-world', 'next-island', 'nexus-the-kingdom-of-the-winds', 'nioh-2', 'no-mans-sky', 'nords-heroes-of-the-north', 'nostale', 'nova-genesis', 'oberin', 'odin-quest', 'ogre-island', 'old-world', 'omega-zodiac', 'omerta-3', 'one-piece-online', 'one-piece-online-2-pirate-king', 'online-boxing-manager', 'online-tennis-manager', 'orake', 'orbusvr', 'orcs-must-die-3', 'order-and-chaos-2-redemption', 'order-and-chaos-online', 'order-of-magic', 'origins-return', 'orions-belt', 'osiris-new-dawn', 'otherland', 'out-of-reach', 'outlaws-of-the-old-west', 'outriders', 'outwar', 'overkings', 'oversoul', 'overwatch', 'oz-broken-kingdom', 'pagan-online', 'paladins-champions-of-the-realm', 'palia', 'panzar', 'past-fate', 'path-of-exile', 'pathfinder-online', 'perfect-world-international', 'perfect-world-mobile', 'persona-5', 'persona-5-royal', 'persona-q-shadow-of-the-labyrinth', 'phantasy-star-online-2', 'phoenix-dynasty-2', 'piercing-blow', 'pillars-of-eternity', 'pillars-of-eternity-2-deadfire', 'pirate-arena', 'pirate-galaxy', 'pirate-king-online', 'pirate-storm', 'pirate101', 'pirates-of-the-burning-sea', 'pirates-tides-of-fortune', 'planeshift', 'planet-arkadia', 'planet-calypso', 'planetside-2', 'playable-worlds', 'playerunknowns-battlegrounds', 'pocket-legends', 'pokemon-go', 'pokemon-xy', 'population-zero', 'portal-knights', 'pox-nora', 'predator-hunting-grounds', 'preta-vendetta-rising', 'prime-world', 'priston-tale', 'profane', 'project-genom', 'project-gorgon', 'project-ion', 'project-x-zone-2', 'project-zomboid', 'prosperous-universe', 'quest-for-infamy', 'r2-online-reign-of-revolution', 'radical-heights', 'rage-of-3-kingdoms', 'ragewar', 'ragnarok-online', 'ragnarok-online-ii', 'ragnarok-online-transcendence', 'ragnarok-origin', 'raid-shadow-legends', 'rail-nation', 'rakion', 'ran-online', 'rangers-of-oblivion', 'rappelz', 'rappelzsea', 'rapture-rejects', 'realm-of-the-mad-god', 'realm-royale', 'rebel-galaxy', 'rebirth-fantasy', 'record-of-lodoss-war-online', 'red-dead-online', 'red-stone', 'redemptions-guild', 'redfall', 'regnum-online', 'remnant-from-the-ashes', 'rend', 'requiem-memento-mori', 'revelation-online', 'riders-of-icarus', 'riders-republic', 'rift', 'rimworld', 'ring-of-elysium', 'riotzone', 'rise', 'rise-of-the-tycoon', 'risen-3-titan-lords', 'rivality', 'roblox', 'robocraft', 'rocket-league', 'rogalia', 'rogue-company', 'rohan-blood-feud', 'romadoria', 'rosh-online', 'roto-x', 'royal-quest', 'rulers-of-the-sea', 'rumble-fighter', 'runes-of-magic', 'runescape', 'rust', 'ryzom', 's4-league', 'sacred-3', 'saga', 'salem', 'samutale', 'savage-lands', 'scarlet-nexus', 'scars-of-honor', 'scavengers', 'scions-of-fate-yulgang', 'sea-of-thieves', 'seal-online-blades-of-destiny', 'seas-of-gold', 'second-life', 'serenia-fantasy', 'seven-seas-saga', 'shadow-arena', 'shadowbound', 'shadowgate', 'shadowgun-legends', 'shadowrun-chronicles', 'shadowrun-returns', 'shadowrun-hong-kong', 'shadowverse', 'shaiya', 'shattered-galaxy', 'shin-megami-tensei-devil-survivor-2-record-breaker', 'ship-of-heroes', 'shot-online', 'shroud-of-the-avatar', 'siegefall', 'siegelord', 'silkroad-online', 'skull-and-bones', 'skyclimbers', 'skyforge', 'skylanders-battlecast', 'smite', 'solasta-crown-of-the-magister', 'soldiers-inc', 'soul-order-online-2', 'soulworker', 'south-park-stick-of-truth', 'space-wars-interstellar-empires', 'sparta-war-of-empires', 'spellbreak', 'spellgear', 'spellstone', 'sphere-3', 'spiral-knights', 'splitgate-arena-warfare', 'star-citizen', 'star-colony', 'star-conflict', 'star-crusade-war-for-the-expanse', 'star-legends', 'star-ocean-5-integrity-and-faithlessness', 'star-sonata-2', 'star-stable', 'star-trek-online', 'star-wars-battlefront-ii', 'star-wars-squadrons', 'star-wars-the-old-republic', 'starbase', 'starborne', 'starborne-frontiers', 'starbound', 'starfield', 'starport-galactic-empires', 'stash-no-loot-left-behind', 'state-of-decay', 'steambirds-alliance', 'steamcraft', 'steinworld', 'stoneage-world', 'storm-riders', 'stormfall-age-of-war', 'stormthrone', 'stranger-of-paradise', 'stronghold-kingdoms', 'styx-master-of-shadows', 'supernova', 'supremacy-1914', 'supreme-destiny', 'survarium', 'sword-coast-legends', 'swords-of-legends-online', 'tales-of-symphonia-chronicles', 'tales-of-zestiria', 'talisman-online', 'tamer-saga', 'tantra-online', 'tantra-rumble', 'temtem', 'tentlan', 'tera', 'terraria', 'thang-online', 'the-4th-coming', 'the-aetherlight-chronicles-of-the-resistance', 'the-ascent', 'the-banner-saga', 'the-banner-saga-2', 'the-black-death', 'the-black-watchmen', 'the-crew', 'the-crew-2', 'the-division', 'the-division-2', 'the-dwarves', 'the-elder-scrolls-blades', 'the-end', 'the-epic-might', 'the-exiled', 'the-hammers-end', 'the-incredible-adventures-of-van-helsing', 'the-incredible-adventures-of-van-helsing-2', 'the-incredible-adventures-of-van-helsing-iii', 'the-legend-of-legacy', 'the-legend-of-pirates-online', 'the-mighty-quest-for-epic-loot', 'the-mob-wars', 'the-outer-worlds', 'the-pride-of-taern', 'the-realm-online', 'the-repopulation', 'the-settlers-online', 'the-skies', 'the-technomancer', 'the-wagadu-chronicles', 'the-waylanders', 'the-west', 'the-witcher-3-wild-hunt', 'there', 'therian-saga', 'thunder-run-firestrike', 'tibia', 'tibia-micro-edition', 'tiger-knight', 'titan-siege', 'titanreach', 'titans-of-time', 'torchlight-2', 'torchlight-iii', 'torment-tides-of-numenera', 'total-domination', 'total-war-saga-troy', 'total-war-three-kingdoms', 'total-war-arena', 'transistor', 'trapped-dead-lockdown', 'travian', 'travian-kingdoms', 'tree-of-life', 'tree-of-savior', 'trials-of-mana', 'tribal-wars', 'tribes-of-midgard', 'tribes-ascend', 'trove', 'tug', 'turf-battles', 'twin-saga', 'tynon', 'tyranny', 'ufo-online', 'ultima-online', 'uncharted-waters-online', 'underlight-clash-of-dreams', 'underworld-ascendant', 'unification-wars', 'unlimited-ninja', 'utopia', 'v-rising', 'v4', 'vainglory', 'valdis-story-abyssal-city', 'valheim', 'valiance-online', 'valnir-rok', 'valorant', 'vampire-the-masquerade-bloodlines-2', 'vampyr', 'vendetta-online', 'victor-vran', 'victory-age-of-racing', 'vikings-war-of-clans', 'villagers-and-heroes', 'vindictus', 'virtonomics-economics-game-online', 'visions-of-zosimos', 'voidexpanse', 'voyage-century-online', 'wakfu', 'war-of-mercenaries', 'war-thunder', 'war2-glory', 'warflare', 'wargame1942', 'warhammer-40k-inquisitor-martyr', 'warhammer-chaosbane', 'warhammer-odyssey', 'warmonger', 'warp-nexus', 'wartune', 'wasteland-2', 'wasteland-3', 'waven', 'we-ride', 'weapons-of-mythology', 'wild-terra', 'wild-west-online', 'wind-of-luck-arena', 'wings-of-destiny', 'winning-putt', 'with-your-destiny', 'wizard101', 'wolcen-lords-of-mayhem', 'world-golf-tour', 'world-of-kung-fu', 'world-of-tanks', 'world-of-trinketz', 'world-of-warcraft', 'world-of-warplanes', 'world-of-warriors', 'world-of-warships', 'world-war-online', 'worldalpha', 'worlds-adrift', 'wurm-online', 'wwii-online', 'xcom-chimera-squad', 'xenoblade-chronicles-3d', 'xenoblade-chronicles-definitive-edition', 'xenoblade-chronicles-x', 'xsyon-prelude', 'xulu', 'yohoho-puzzle-pirates', 'z1-battle-royale', 'zeal', 'zenith', 'zodiac']} |
# For demonstration this will serve as the database of partners
# For real implementation this will come from a database.
# Both partnerId and key should be shared between services.
partners = {
'abcd123' : { # this is partner ssoId (abcd123)
'name': 'Partner 1 inc.',
'shared_key' : '5f4dcc3b5aa765d61d8327deb882cf99',
'is_active' : True
},
'abcd1234':{ # this is partner ssoId (abcd1234)
'name' : 'Partner 2 inc.',
'shared_key' : '482c811da5d5b4bc6d497ffa98491e38',
'is_active' : False
}
}
| partners = {'abcd123': {'name': 'Partner 1 inc.', 'shared_key': '5f4dcc3b5aa765d61d8327deb882cf99', 'is_active': True}, 'abcd1234': {'name': 'Partner 2 inc.', 'shared_key': '482c811da5d5b4bc6d497ffa98491e38', 'is_active': False}} |
#!/usr/bin/env python3
steps = 10
with open('input.txt', 'r') as f:
lines = f.read().splitlines()
initial_string = lines[0]
mapping = {}
for line in lines:
if '->' in line:
x,y=line.split(" -> ")
replacement_text = x[0]+y
mapping[x] = replacement_text
for _ in range(1, steps+1):
processed_string = ''
for i in range(0, len(initial_string)):
if i == len(initial_string)-1:
processed_string += initial_string[i]
else:
pair = initial_string[i]+initial_string[i+1]
processed_string += mapping[pair]
initial_string = processed_string
unique = list(set(processed_string))
values = []
for letter in unique:
values.append(processed_string.count(letter))
print(f"{max(values)} - {min(values)} = {max(values)-min(values)}") | steps = 10
with open('input.txt', 'r') as f:
lines = f.read().splitlines()
initial_string = lines[0]
mapping = {}
for line in lines:
if '->' in line:
(x, y) = line.split(' -> ')
replacement_text = x[0] + y
mapping[x] = replacement_text
for _ in range(1, steps + 1):
processed_string = ''
for i in range(0, len(initial_string)):
if i == len(initial_string) - 1:
processed_string += initial_string[i]
else:
pair = initial_string[i] + initial_string[i + 1]
processed_string += mapping[pair]
initial_string = processed_string
unique = list(set(processed_string))
values = []
for letter in unique:
values.append(processed_string.count(letter))
print(f'{max(values)} - {min(values)} = {max(values) - min(values)}') |
#Occurance of a word in text file
Text = open("abc.txt","r")
d = dict() #Dictionary to store words(keys) and its iterations(values)
# iterate through each line in txt file
for line in Text:
line = line.strip() #remove leading space and \n chrtr
line = line.lower() #convert to lower case
words = line.split(" ") # Spilit line with space
for word in words:
if word in d:
d[word] += 1
else:
d[word] = 1
for key in list(d.keys()):
print (key, ":", d[key])
| text = open('abc.txt', 'r')
d = dict()
for line in Text:
line = line.strip()
line = line.lower()
words = line.split(' ')
for word in words:
if word in d:
d[word] += 1
else:
d[word] = 1
for key in list(d.keys()):
print(key, ':', d[key]) |
# Easy horntail gem
sm.spawnMob(8810102, 95, 260, False)
sm.spawnMob(8810103, 95, 260, False)
sm.spawnMob(8810104, 95, 260, False)
sm.spawnMob(8810105, 95, 260, False)
sm.spawnMob(8810106, 95, 260, False)
sm.spawnMob(8810107, 95, 260, False)
sm.spawnMob(8810108, 95, 260, False)
sm.spawnMob(8810109, 95, 260, False)
sm.spawnMob(8810118, 95, 260, False, 10000000000) #10,000,000,000
sm.removeReactor() | sm.spawnMob(8810102, 95, 260, False)
sm.spawnMob(8810103, 95, 260, False)
sm.spawnMob(8810104, 95, 260, False)
sm.spawnMob(8810105, 95, 260, False)
sm.spawnMob(8810106, 95, 260, False)
sm.spawnMob(8810107, 95, 260, False)
sm.spawnMob(8810108, 95, 260, False)
sm.spawnMob(8810109, 95, 260, False)
sm.spawnMob(8810118, 95, 260, False, 10000000000)
sm.removeReactor() |
# file generated by setuptools_scm
# don't change, don't track in version control
version = "0.1.dev1+ga7b326d.d20210618"
version_tuple = (0, 1, "dev1+ga7b326d", "d20210618")
| version = '0.1.dev1+ga7b326d.d20210618'
version_tuple = (0, 1, 'dev1+ga7b326d', 'd20210618') |
pattern_zero=[0.0, 0.024983563445, 0.048652202498, 0.051282051282, 0.07100591716, 0.076265614727, 0.092044707429, 0.09993425378, 0.102564102564, 0.111768573307, 0.122287968442, 0.127547666009, 0.130177514793, 0.143326758711, 0.147271531887, 0.151216305062, 0.153846153846, 0.163050624589, 0.173570019724, 0.177514792899, 0.178829717291, 0.181459566075, 0.190664036818, 0.194608809993, 0.198553583169, 0.202498356345, 0.205128205128, 0.213017751479, 0.214332675871, 0.222222222222, 0.224852071006, 0.228796844181, 0.230111768573, 0.232741617357, 0.236686390533, 0.2419460881, 0.245890861275, 0.248520710059, 0.249835634451, 0.253780407627, 0.25641025641, 0.264299802761, 0.265614727153, 0.273504273504, 0.276134122288, 0.280078895464, 0.281393819855, 0.284023668639, 0.287968441815, 0.293228139382, 0.297172912558, 0.299802761341, 0.301117685733, 0.305062458909, 0.307692307692, 0.315581854043, 0.316896778435, 0.324786324786, 0.32741617357, 0.331360946746, 0.332675871137, 0.335305719921, 0.339250493097, 0.344510190664, 0.34845496384, 0.351084812623, 0.352399737015, 0.356344510191, 0.358974358974, 0.366863905325, 0.368178829717, 0.376068376068, 0.378698224852, 0.382642998028, 0.383957922419, 0.386587771203, 0.390532544379, 0.395792241946, 0.399737015122, 0.402366863905, 0.403681788297, 0.407626561473, 0.410256410256, 0.418145956607, 0.419460880999, 0.42735042735, 0.429980276134, 0.43392504931, 0.435239973702, 0.437869822485, 0.441814595661, 0.447074293228, 0.451019066404, 0.453648915187, 0.454963839579, 0.458908612755, 0.461538461538, 0.46942800789, 0.470742932281, 0.478632478632, 0.481262327416, 0.485207100592, 0.486522024984, 0.489151873767, 0.493096646943, 0.49835634451, 0.502301117686, 0.504930966469, 0.506245890861, 0.510190664037, 0.512820512821, 0.520710059172, 0.522024983563, 0.529914529915, 0.532544378698, 0.536489151874, 0.537804076266, 0.540433925049, 0.544378698225, 0.549638395792, 0.553583168968, 0.556213017751, 0.557527942143, 0.561472715319, 0.564102564103, 0.571992110454, 0.573307034845, 0.581196581197, 0.58382642998, 0.587771203156, 0.589086127548, 0.591715976331, 0.595660749507, 0.600920447074, 0.60486522025, 0.607495069034, 0.608809993425, 0.612754766601, 0.615384615385, 0.623274161736, 0.624589086128, 0.632478632479, 0.635108481262, 0.639053254438, 0.64036817883, 0.642998027613, 0.646942800789, 0.652202498356, 0.656147271532, 0.658777120316, 0.660092044707, 0.664036817883, 0.666666666667, 0.674556213018, 0.67587113741, 0.683760683761, 0.686390532544, 0.69033530572, 0.691650230112, 0.694280078895, 0.698224852071, 0.703484549638, 0.707429322814, 0.710059171598, 0.711374095989, 0.715318869165, 0.717948717949, 0.7258382643, 0.727153188692, 0.735042735043, 0.737672583826, 0.741617357002, 0.742932281394, 0.745562130178, 0.749506903353, 0.75476660092, 0.758711374096, 0.76134122288, 0.762656147272, 0.766600920447, 0.769230769231, 0.777120315582, 0.778435239974, 0.786324786325, 0.788954635108, 0.792899408284, 0.794214332676, 0.79684418146, 0.800788954635, 0.806048652202, 0.809993425378, 0.812623274162, 0.813938198554, 0.817882971729, 0.820512820513, 0.828402366864, 0.829717291256, 0.837606837607, 0.840236686391, 0.844181459566, 0.845496383958, 0.848126232742, 0.852071005917, 0.857330703485, 0.86127547666, 0.863905325444, 0.865220249836, 0.869165023011, 0.871794871795, 0.879684418146, 0.880999342538, 0.888888888889, 0.891518737673, 0.895463510848, 0.89677843524, 0.899408284024, 0.903353057199, 0.908612754767, 0.912557527942, 0.915187376726, 0.916502301118, 0.920447074293, 0.923076923077, 0.930966469428, 0.93228139382, 0.940170940171, 0.942800788955, 0.94674556213, 0.948060486522, 0.950690335306, 0.954635108481, 0.959894806049, 0.963839579224, 0.966469428008, 0.9677843524, 0.971729125575, 0.974358974359, 0.98224852071, 0.983563445102, 0.991452991453, 0.994082840237, 0.998027613412, 0.999342537804]
pattern_odd=[0.001972386588, 0.005917159763, 0.011176857331, 0.015121630506, 0.01775147929, 0.019066403682, 0.023011176857, 0.025641025641, 0.033530571992, 0.034845496384, 0.042735042735, 0.045364891519, 0.049309664694, 0.050624589086, 0.05325443787, 0.057199211045, 0.062458908613, 0.066403681788, 0.069033530572, 0.070348454964, 0.074293228139, 0.076923076923, 0.084812623274, 0.086127547666, 0.094017094017, 0.096646942801, 0.100591715976, 0.101906640368, 0.104536489152, 0.108481262327, 0.113740959895, 0.11768573307, 0.120315581854, 0.121630506246, 0.125575279421, 0.128205128205, 0.136094674556, 0.137409598948, 0.145299145299, 0.147928994083, 0.151873767258, 0.15318869165, 0.155818540434, 0.159763313609, 0.165023011177, 0.168967784352, 0.171597633136, 0.172912557528, 0.176857330703, 0.179487179487, 0.187376725838, 0.18869165023, 0.196581196581, 0.199211045365, 0.20315581854, 0.204470742932, 0.207100591716, 0.211045364892, 0.216305062459, 0.220249835634, 0.222879684418, 0.22419460881, 0.228139381986, 0.230769230769, 0.23865877712, 0.239973701512, 0.247863247863, 0.250493096647, 0.254437869822, 0.255752794214, 0.258382642998, 0.262327416174, 0.267587113741, 0.271531886917, 0.2741617357, 0.275476660092, 0.279421433268, 0.282051282051, 0.289940828402, 0.291255752794, 0.299145299145, 0.301775147929, 0.305719921105, 0.307034845496, 0.30966469428, 0.313609467456, 0.318869165023, 0.322813938199, 0.325443786982, 0.326758711374, 0.33070348455, 0.333333333333, 0.341222879684, 0.342537804076, 0.350427350427, 0.353057199211, 0.357001972387, 0.358316896778, 0.360946745562, 0.364891518738, 0.370151216305, 0.374095989481, 0.376725838264, 0.378040762656, 0.381985535832, 0.384615384615, 0.392504930966, 0.393819855358, 0.401709401709, 0.404339250493, 0.408284023669, 0.40959894806, 0.412228796844, 0.41617357002, 0.421433267587, 0.425378040763, 0.428007889546, 0.429322813938, 0.433267587114, 0.435897435897, 0.443786982249, 0.44510190664, 0.452991452991, 0.455621301775, 0.459566074951, 0.460880999343, 0.463510848126, 0.467455621302, 0.472715318869, 0.476660092045, 0.479289940828, 0.48060486522, 0.484549638396, 0.487179487179, 0.495069033531, 0.496383957922, 0.504273504274, 0.506903353057, 0.510848126233, 0.512163050625, 0.514792899408, 0.518737672584, 0.523997370151, 0.527942143327, 0.53057199211, 0.531886916502, 0.535831689678, 0.538461538462, 0.546351084813, 0.547666009204, 0.555555555556, 0.558185404339, 0.562130177515, 0.563445101907, 0.56607495069, 0.570019723866, 0.575279421433, 0.579224194609, 0.581854043393, 0.583168967784, 0.58711374096, 0.589743589744, 0.597633136095, 0.598948060487, 0.606837606838, 0.609467455621, 0.613412228797, 0.614727153189, 0.617357001972, 0.621301775148, 0.626561472715, 0.630506245891, 0.633136094675, 0.634451019066, 0.638395792242, 0.641025641026, 0.648915187377, 0.650230111769, 0.65811965812, 0.660749506903, 0.664694280079, 0.666009204471, 0.668639053254, 0.67258382643, 0.677843523997, 0.681788297173, 0.684418145957, 0.685733070348, 0.689677843524, 0.692307692308, 0.700197238659, 0.701512163051, 0.709401709402, 0.712031558185, 0.715976331361, 0.717291255753, 0.719921104536, 0.723865877712, 0.729125575279, 0.733070348455, 0.735700197239, 0.737015121631, 0.740959894806, 0.74358974359, 0.751479289941, 0.752794214333, 0.760683760684, 0.763313609467, 0.767258382643, 0.768573307035, 0.771203155819, 0.775147928994, 0.780407626561, 0.784352399737, 0.786982248521, 0.788297172913, 0.792241946088, 0.794871794872, 0.802761341223, 0.804076265615, 0.811965811966, 0.81459566075, 0.818540433925, 0.819855358317, 0.822485207101, 0.826429980276, 0.831689677844, 0.835634451019, 0.838264299803, 0.839579224195, 0.84352399737, 0.846153846154, 0.854043392505, 0.855358316897, 0.863247863248, 0.865877712032, 0.869822485207, 0.871137409599, 0.873767258383, 0.877712031558, 0.882971729126, 0.886916502301, 0.889546351085, 0.890861275477, 0.894806048652, 0.897435897436, 0.905325443787, 0.906640368179, 0.91452991453, 0.917159763314, 0.921104536489, 0.922419460881, 0.925049309665, 0.92899408284, 0.934253780408, 0.938198553583, 0.940828402367, 0.942143326759, 0.946088099934, 0.948717948718, 0.956607495069, 0.957922419461, 0.965811965812, 0.968441814596, 0.972386587771, 0.973701512163, 0.976331360947, 0.980276134122, 0.98553583169, 0.989480604865, 0.992110453649, 0.993425378041, 0.997370151216]
pattern_even=[0.0, 0.00788954635, 0.00920447074, 0.01709401709, 0.01972386588, 0.02366863905, 0.02498356345, 0.02761341223, 0.0315581854, 0.03681788297, 0.04076265615, 0.04339250493, 0.04470742932, 0.0486522025, 0.05128205128, 0.05917159763, 0.06048652203, 0.06837606838, 0.07100591716, 0.07495069034, 0.07626561473, 0.07889546351, 0.08284023669, 0.08809993425, 0.09204470743, 0.09467455621, 0.09598948061, 0.09993425378, 0.10256410256, 0.11045364892, 0.11176857331, 0.11965811966, 0.12228796844, 0.12623274162, 0.12754766601, 0.13017751479, 0.13412228797, 0.13938198554, 0.14332675871, 0.1459566075, 0.14727153189, 0.15121630506, 0.15384615385, 0.1617357002, 0.16305062459, 0.17094017094, 0.17357001972, 0.1775147929, 0.17882971729, 0.18145956608, 0.18540433925, 0.19066403682, 0.19460880999, 0.19723865878, 0.19855358317, 0.20249835635, 0.20512820513, 0.21301775148, 0.21433267587, 0.22222222222, 0.22485207101, 0.22879684418, 0.23011176857, 0.23274161736, 0.23668639053, 0.2419460881, 0.24589086128, 0.24852071006, 0.24983563445, 0.25378040763, 0.25641025641, 0.26429980276, 0.26561472715, 0.2735042735, 0.27613412229, 0.28007889546, 0.28139381986, 0.28402366864, 0.28796844182, 0.29322813938, 0.29717291256, 0.29980276134, 0.30111768573, 0.30506245891, 0.30769230769, 0.31558185404, 0.31689677844, 0.32478632479, 0.32741617357, 0.33136094675, 0.33267587114, 0.33530571992, 0.3392504931, 0.34451019066, 0.34845496384, 0.35108481262, 0.35239973702, 0.35634451019, 0.35897435897, 0.36686390533, 0.36817882972, 0.37606837607, 0.37869822485, 0.38264299803, 0.38395792242, 0.3865877712, 0.39053254438, 0.39579224195, 0.39973701512, 0.40236686391, 0.4036817883, 0.40762656147, 0.41025641026, 0.41814595661, 0.419460881, 0.42735042735, 0.42998027613, 0.43392504931, 0.4352399737, 0.43786982249, 0.44181459566, 0.44707429323, 0.4510190664, 0.45364891519, 0.45496383958, 0.45890861276, 0.46153846154, 0.46942800789, 0.47074293228, 0.47863247863, 0.48126232742, 0.48520710059, 0.48652202498, 0.48915187377, 0.49309664694, 0.49835634451, 0.50230111769, 0.50493096647, 0.50624589086, 0.51019066404, 0.51282051282, 0.52071005917, 0.52202498356, 0.52991452992, 0.5325443787, 0.53648915187, 0.53780407627, 0.54043392505, 0.54437869823, 0.54963839579, 0.55358316897, 0.55621301775, 0.55752794214, 0.56147271532, 0.5641025641, 0.57199211045, 0.57330703485, 0.5811965812, 0.58382642998, 0.58777120316, 0.58908612755, 0.59171597633, 0.59566074951, 0.60092044707, 0.60486522025, 0.60749506903, 0.60880999343, 0.6127547666, 0.61538461539, 0.62327416174, 0.62458908613, 0.63247863248, 0.63510848126, 0.63905325444, 0.64036817883, 0.64299802761, 0.64694280079, 0.65220249836, 0.65614727153, 0.65877712032, 0.66009204471, 0.66403681788, 0.66666666667, 0.67455621302, 0.67587113741, 0.68376068376, 0.68639053254, 0.69033530572, 0.69165023011, 0.6942800789, 0.69822485207, 0.70348454964, 0.70742932281, 0.7100591716, 0.71137409599, 0.71531886917, 0.71794871795, 0.7258382643, 0.72715318869, 0.73504273504, 0.73767258383, 0.741617357, 0.74293228139, 0.74556213018, 0.74950690335, 0.75476660092, 0.7587113741, 0.76134122288, 0.76265614727, 0.76660092045, 0.76923076923, 0.77712031558, 0.77843523997, 0.78632478633, 0.78895463511, 0.79289940828, 0.79421433268, 0.79684418146, 0.80078895464, 0.8060486522, 0.80999342538, 0.81262327416, 0.81393819855, 0.81788297173, 0.82051282051, 0.82840236686, 0.82971729126, 0.83760683761, 0.84023668639, 0.84418145957, 0.84549638396, 0.84812623274, 0.85207100592, 0.85733070349, 0.86127547666, 0.86390532544, 0.86522024984, 0.86916502301, 0.8717948718, 0.87968441815, 0.88099934254, 0.88888888889, 0.89151873767, 0.89546351085, 0.89677843524, 0.89940828402, 0.9033530572, 0.90861275477, 0.91255752794, 0.91518737673, 0.91650230112, 0.92044707429, 0.92307692308, 0.93096646943, 0.93228139382, 0.94017094017, 0.94280078896, 0.94674556213, 0.94806048652, 0.95069033531, 0.95463510848, 0.95989480605, 0.96383957922, 0.96646942801, 0.9677843524, 0.97172912558, 0.97435897436, 0.98224852071, 0.9835634451, 0.99145299145, 0.99408284024, 0.99802761341, 0.9993425378]
averages_even={0.0: [0.0], 0.7258382643: [0.6923076923077, 0.3076923076923], 0.48126232742: [0.0769230769231, 0.9230769230769], 0.67587113741: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.05128205128: [0.0], 0.68376068376: [0.6666666666667, 0.3333333333333], 0.1775147929: [0.7692307692308, 0.2307692307692], 0.60092044707: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.0486522025: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.63510848126: [0.0769230769231, 0.9230769230769], 0.81262327416: [0.5384615384615, 0.4615384615385], 0.29980276134: [0.5384615384615, 0.4615384615385], 0.70348454964: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.65877712032: [0.5384615384615, 0.4615384615385], 0.28007889546: [0.7692307692308, 0.2307692307692], 0.89151873767: [0.0769230769231, 0.9230769230769], 0.88099934254: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.13938198554: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.29717291256: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.22879684418: [0.7692307692308, 0.2307692307692], 0.8060486522: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.08284023669: [0.3846153846154, 0.6153846153846], 0.24589086128: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.84023668639: [0.0769230769231, 0.9230769230769], 0.34845496384: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.55358316897: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.49835634451: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.79421433268: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.38264299803: [0.7692307692308, 0.2307692307692], 0.94280078896: [0.0769230769231, 0.9230769230769], 0.09993425378: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.02498356345: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.58382642998: [0.0769230769231, 0.9230769230769], 0.25641025641: [0.0], 0.69033530572: [0.7692307692308, 0.2307692307692], 0.2735042735: [0.6666666666667, 0.3333333333333], 0.06837606838: [0.3333333333333, 0.6666666666667], 0.43392504931: [0.7692307692308, 0.2307692307692], 0.7100591716: [0.5384615384615, 0.4615384615385], 0.5811965812: [0.6666666666667, 0.3333333333333], 0.97172912558: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.4510190664: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.7587113741: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.30769230769: [0.0], 0.95069033531: [0.8461538461538, 0.1538461538462], 0.57330703485: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.32478632479: [0.6666666666667, 0.3333333333333], 0.48520710059: [0.7692307692308, 0.2307692307692], 0.17094017094: [0.6666666666667, 0.3333333333333], 0.54043392505: [0.8461538461538, 0.1538461538462], 0.78632478633: [0.6666666666667, 0.3333333333333], 0.86127547666: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.35897435897: [0.0], 0.89940828402: [0.8461538461538, 0.1538461538462], 0.89546351085: [0.7692307692308, 0.2307692307692], 0.05917159763: [0.6923076923077, 0.3076923076923], 0.37606837607: [0.6666666666667, 0.3333333333333], 0.60880999343: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.30506245891: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.64299802761: [0.8461538461538, 0.1538461538462], 0.96383957922: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.10256410256: [0.0], 0.20512820513: [0.0], 0.90861275477: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.94674556213: [0.7692307692308, 0.2307692307692], 0.42735042735: [0.6666666666667, 0.3333333333333], 0.71137409599: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.28402366864: [0.8461538461538, 0.1538461538462], 0.22222222222: [0.6666666666667, 0.3333333333333], 0.74556213018: [0.8461538461538, 0.1538461538462], 0.30111768573: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.46153846154: [0.0], 0.41025641026: [0.0], 0.19460880999: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.11965811966: [0.6666666666667, 0.3333333333333], 0.81393819855: [0.8205128205128, 0.1794871794872, 0.4871794871795, 0.5128205128205], 0.33530571992: [0.8461538461538, 0.1538461538462], 0.99145299145: [0.3333333333333, 0.6666666666667], 0.84812623274: [0.8461538461538, 0.1538461538462], 0.08809993425: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.56147271532: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.83760683761: [0.6666666666667, 0.3333333333333], 0.44181459566: [0.3846153846154, 0.6153846153846], 0.59566074951: [0.3846153846154, 0.6153846153846], 0.04339250493: [0.5384615384615, 0.4615384615385], 0.3865877712: [0.8461538461538, 0.1538461538462], 0.97435897436: [0.0], 0.33136094675: [0.7692307692308, 0.2307692307692], 0.4036817883: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.66403681788: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.13017751479: [0.8461538461538, 0.1538461538462], 0.36817882972: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.43786982249: [0.8461538461538, 0.1538461538462], 0.00920447074: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.03681788297: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.45496383958: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.76660092045: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.62327416174: [0.6923076923077, 0.3076923076923], 0.93096646943: [0.6923076923077, 0.3076923076923], 0.07100591716: [0.0769230769231, 0.9230769230769], 0.99802761341: [0.7692307692308, 0.2307692307692], 0.12228796844: [0.0769230769231, 0.9230769230769], 0.6942800789: [0.8461538461538, 0.1538461538462], 0.69165023011: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.86916502301: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.18145956608: [0.8461538461538, 0.1538461538462], 0.9033530572: [0.3846153846154, 0.6153846153846], 0.92044707429: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.19855358317: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.25378040763: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.82840236686: [0.6923076923077, 0.3076923076923], 0.61538461539: [0.0], 0.85207100592: [0.3846153846154, 0.6153846153846], 0.28796844182: [0.3846153846154, 0.6153846153846], 0.89677843524: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.07626561473: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.23274161736: [0.8461538461538, 0.1538461538462], 0.3392504931: [0.3846153846154, 0.6153846153846], 0.24983563445: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.35634451019: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.73767258383: [0.0769230769231, 0.9230769230769], 0.9993425378: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.79684418146: [0.8461538461538, 0.1538461538462], 0.39053254438: [0.3846153846154, 0.6153846153846], 0.47863247863: [0.6666666666667, 0.3333333333333], 0.40762656147: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.9677843524: [0.8205128205128, 0.1794871794872, 0.4871794871795, 0.5128205128205], 0.26429980276: [0.6923076923077, 0.3076923076923], 0.28139381986: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.02761341223: [0.8461538461538, 0.1538461538462], 0.91650230112: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.51019066404: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.45890861276: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.92307692308: [0.0], 0.07889546351: [0.8461538461538, 0.1538461538462], 0.33267587114: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.12623274162: [0.7692307692308, 0.2307692307692], 0.49309664694: [0.3846153846154, 0.6153846153846], 0.78895463511: [0.0769230769231, 0.9230769230769], 0.55621301775: [0.5384615384615, 0.4615384615385], 0.9835634451: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.36686390533: [0.6923076923077, 0.3076923076923], 0.09598948061: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.62458908613: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.65220249836: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.58908612755: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.35239973702: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.41814595661: [0.6923076923077, 0.3076923076923], 0.96646942801: [0.5384615384615, 0.4615384615385], 0.54963839579: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.4352399737: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.72715318869: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.1459566075: [0.5384615384615, 0.4615384615385], 0.76134122288: [0.5384615384615, 0.4615384615385], 0.46942800789: [0.6923076923077, 0.3076923076923], 0.04076265615: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.48652202498: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.82971729126: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.68639053254: [0.0769230769231, 0.9230769230769], 0.16305062459: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.86390532544: [0.5384615384615, 0.4615384615385], 0.53648915187: [0.7692307692308, 0.2307692307692], 0.75476660092: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.93228139382: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.19723865878: [0.5384615384615, 0.4615384615385], 0.39973701512: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.50230111769: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.85733070349: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.13412228797: [0.3846153846154, 0.6153846153846], 0.21433267587: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.71531886917: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.76265614727: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.15121630506: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.37869822485: [0.0769230769231, 0.9230769230769], 0.63905325444: [0.7692307692308, 0.2307692307692], 0.95989480605: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.52991452992: [0.6666666666667, 0.3333333333333], 0.24852071006: [0.5384615384615, 0.4615384615385], 0.70742932281: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.5641025641: [0.0], 0.18540433925: [0.3846153846154, 0.6153846153846], 0.64694280079: [0.3846153846154, 0.6153846153846], 0.63247863248: [0.6666666666667, 0.3333333333333], 0.80999342538: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.20249835635: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.66666666667: [0.0], 0.82051282051: [0.0], 0.60486522025: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.01972386588: [0.0769230769231, 0.9230769230769], 0.2419460881: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.73504273504: [0.6666666666667, 0.3333333333333], 0.59171597633: [0.8461538461538, 0.1538461538462], 0.91255752794: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.76923076923: [0.0], 0.23668639053: [0.3846153846154, 0.6153846153846], 0.52071005917: [0.6923076923077, 0.3076923076923], 0.66009204471: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.11045364892: [0.6923076923077, 0.3076923076923], 0.17357001972: [0.0769230769231, 0.9230769230769], 0.8717948718: [0.0], 0.50493096647: [0.5384615384615, 0.4615384615385], 0.19066403682: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.94017094017: [0.6666666666667, 0.3333333333333], 0.69822485207: [0.3846153846154, 0.6153846153846], 0.12754766601: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.09467455621: [0.5384615384615, 0.4615384615385], 0.54437869823: [0.3846153846154, 0.6153846153846], 0.65614727153: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.86522024984: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.04470742932: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.22485207101: [0.0769230769231, 0.9230769230769], 0.51282051282: [0.0], 0.6127547666: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.91518737673: [0.5384615384615, 0.4615384615385], 0.1617357002: [0.6923076923077, 0.3076923076923], 0.06048652203: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.53780407627: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.31558185404: [0.6923076923077, 0.3076923076923], 0.17882971729: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.57199211045: [0.6923076923077, 0.3076923076923], 0.99408284024: [0.0769230769231, 0.9230769230769], 0.74950690335: [0.3846153846154, 0.6153846153846], 0.14727153189: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.01709401709: [0.6666666666667, 0.3333333333333], 0.55752794214: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.81788297173: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.67455621302: [0.6923076923077, 0.3076923076923], 0.26561472715: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.00788954635: [0.6923076923077, 0.3076923076923], 0.21301775148: [0.6923076923077, 0.3076923076923], 0.58777120316: [0.7692307692308, 0.2307692307692], 0.74293228139: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.07495069034: [0.7692307692308, 0.2307692307692], 0.23011176857: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.77712031558: [0.6923076923077, 0.3076923076923], 0.31689677844: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.5325443787: [0.0769230769231, 0.9230769230769], 0.95463510848: [0.3846153846154, 0.6153846153846], 0.52202498356: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.84549638396: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.35108481262: [0.5384615384615, 0.4615384615385], 0.87968441815: [0.6923076923077, 0.3076923076923], 0.09204470743: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.64036817883: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.84418145957: [0.7692307692308, 0.2307692307692], 0.741617357: [0.7692307692308, 0.2307692307692], 0.80078895464: [0.3846153846154, 0.6153846153846], 0.94806048652: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.40236686391: [0.5384615384615, 0.4615384615385], 0.98224852071: [0.6923076923077, 0.3076923076923], 0.419460881: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.77843523997: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.27613412229: [0.0769230769231, 0.9230769230769], 0.71794871795: [0.0], 0.29322813938: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.15384615385: [0.0], 0.45364891519: [0.5384615384615, 0.4615384615385], 0.48915187377: [0.8461538461538, 0.1538461538462], 0.47074293228: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.32741617357: [0.0769230769231, 0.9230769230769], 0.34451019066: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.88888888889: [0.6666666666667, 0.3333333333333], 0.79289940828: [0.7692307692308, 0.2307692307692], 0.44707429323: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.02366863905: [0.7692307692308, 0.2307692307692], 0.39579224195: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.0315581854: [0.3846153846154, 0.6153846153846], 0.42998027613: [0.0769230769231, 0.9230769230769], 0.50624589086: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.14332675871: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.38395792242: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.11176857331: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.60749506903: [0.5384615384615, 0.4615384615385]}
averages_odd={0.392504930966: [0.6923076923077, 0.3076923076923], 0.570019723866: [0.3846153846154, 0.6153846153846], 0.120315581854: [0.5384615384615, 0.4615384615385], 0.40959894806: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.168967784352: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.925049309665: [0.8461538461538, 0.1538461538462], 0.638395792242: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.443786982249: [0.6923076923077, 0.3076923076923], 0.67258382643: [0.3846153846154, 0.6153846153846], 0.993425378041: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.460880999343: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.563445101907: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.20315581854: [0.7692307692308, 0.2307692307692], 0.597633136095: [0.6923076923077, 0.3076923076923], 0.495069033531: [0.6923076923077, 0.3076923076923], 0.775147928994: [0.3846153846154, 0.6153846153846], 0.890861275477: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.220249835634: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.074293228139: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.057199211045: [0.3846153846154, 0.6153846153846], 0.84352399737: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.700197238659: [0.6923076923077, 0.3076923076923], 0.877712031558: [0.3846153846154, 0.6153846153846], 0.768573307035: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.677843523997: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.946088099934: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.802761341223: [0.6923076923077, 0.3076923076923], 0.980276134122: [0.3846153846154, 0.6153846153846], 0.897435897436: [0.0], 0.871137409599: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.882971729126: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.128205128205: [0.0], 0.905325443787: [0.6923076923077, 0.3076923076923], 0.108481262327: [0.3846153846154, 0.6153846153846], 0.145299145299: [0.3333333333333, 0.6666666666667], 0.634451019066: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.076923076923: [0.0], 0.042735042735: [0.3333333333333, 0.6666666666667], 0.179487179487: [0.0], 0.613412228797: [0.7692307692308, 0.2307692307692], 0.531886916502: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.094017094017: [0.3333333333333, 0.6666666666667], 0.976331360947: [0.8461538461538, 0.1538461538462], 0.196581196581: [0.3333333333333, 0.6666666666667], 0.025641025641: [0.0], 0.630506245891: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.01775147929: [0.5384615384615, 0.4615384615385], 0.53057199211: [0.5384615384615, 0.4615384615385], 0.230769230769: [0.0], 0.598948060487: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.247863247863: [0.3333333333333, 0.6666666666667], 0.835634451019: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.855358316897: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.633136094675: [0.5384615384615, 0.4615384615385], 0.780407626561: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.523997370151: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.096646942801: [0.0769230769231, 0.9230769230769], 0.701512163051: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.558185404339: [0.0769230769231, 0.9230769230769], 0.735700197239: [0.5384615384615, 0.4615384615385], 0.98553583169: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.626561472715: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.740959894806: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.804076265615: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.538461538462: [0.0], 0.113740959895: [0.2564102564103, 0.5897435897436, 0.7435897435897, 0.4102564102564], 0.838264299803: [0.5384615384615, 0.4615384615385], 0.155818540434: [0.8461538461538, 0.1538461538462], 0.729125575279: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.906640368179: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.763313609467: [0.0769230769231, 0.9230769230769], 0.172912557528: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.2741617357: [0.5384615384615, 0.4615384615385], 0.940828402367: [0.5384615384615, 0.4615384615385], 0.045364891519: [0.0769230769231, 0.9230769230769], 0.291255752794: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.831689677844: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.865877712032: [0.0769230769231, 0.9230769230769], 0.325443786982: [0.5384615384615, 0.4615384615385], 0.579224194609: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.207100591716: [0.8461538461538, 0.1538461538462], 0.342537804076: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.934253780408: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.733070348455: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.504273504274: [0.3333333333333, 0.6666666666667], 0.22419460881: [0.8205128205128, 0.1794871794872, 0.4871794871795, 0.5128205128205], 0.376725838264: [0.5384615384615, 0.4615384615385], 0.681788297173: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.019066403682: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.393819855358: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.250493096647: [0.0769230769231, 0.9230769230769], 0.794871794872: [0.0], 0.084812623274: [0.6923076923077, 0.3076923076923], 0.606837606838: [0.3333333333333, 0.6666666666667], 0.062458908613: [0.2564102564103, 0.5897435897436, 0.7435897435897, 0.4102564102564], 0.428007889546: [0.5384615384615, 0.4615384615385], 0.641025641026: [0.0], 0.510848126233: [0.7692307692308, 0.2307692307692], 0.44510190664: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.267587113741: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.301775147929: [0.0769230769231, 0.9230769230769], 0.666009204471: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.709401709402: [0.6666666666667, 0.3333333333333], 0.318869165023: [0.2564102564103, 0.5897435897436, 0.7435897435897, 0.4102564102564], 0.56607495069: [0.8461538461538, 0.1538461538462], 0.479289940828: [0.5384615384615, 0.4615384615385], 0.101906640368: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.74358974359: [0.0], 0.496383957922: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.921104536489: [0.7692307692308, 0.2307692307692], 0.581854043393: [0.5384615384615, 0.4615384615385], 0.353057199211: [0.0769230769231, 0.9230769230769], 0.070348454964: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.811965811966: [0.3333333333333, 0.6666666666667], 0.370151216305: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.668639053254: [0.8461538461538, 0.1538461538462], 0.989480604865: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.846153846154: [0.0], 0.968441814596: [0.0769230769231, 0.9230769230769], 0.404339250493: [0.0769230769231, 0.9230769230769], 0.737015121631: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.421433267587: [0.2564102564103, 0.5897435897436, 0.7435897435897, 0.4102564102564], 0.771203155819: [0.8461538461538, 0.1538461538462], 0.948717948718: [0.0], 0.518737672584: [0.3846153846154, 0.6153846153846], 0.455621301775: [0.0769230769231, 0.9230769230769], 0.818540433925: [0.7692307692308, 0.2307692307692], 0.472715318869: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.873767258383: [0.8461538461538, 0.1538461538462], 0.58711374096: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.104536489152: [0.8461538461538, 0.1538461538462], 0.621301775148: [0.3846153846154, 0.6153846153846], 0.137409598948: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.942143326759: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.715976331361: [0.7692307692308, 0.2307692307692], 0.894806048652: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.512163050625: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.689677843524: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.546351084813: [0.6923076923077, 0.3076923076923], 0.723865877712: [0.3846153846154, 0.6153846153846], 0.254437869822: [0.7692307692308, 0.2307692307692], 0.121630506246: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.171597633136: [0.5384615384615, 0.4615384615385], 0.614727153189: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.271531886917: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.792241946088: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.648915187377: [0.6923076923077, 0.3076923076923], 0.826429980276: [0.3846153846154, 0.6153846153846], 0.18869165023: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.305719921105: [0.7692307692308, 0.2307692307692], 0.92899408284: [0.3846153846154, 0.6153846153846], 0.049309664694: [0.7692307692308, 0.2307692307692], 0.717291255753: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.322813938199: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.125575279421: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.889546351085: [0.5384615384615, 0.4615384615385], 0.751479289941: [0.6923076923077, 0.3076923076923], 0.886916502301: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.033530571992: [0.6923076923077, 0.3076923076923], 0.684418145957: [0.5384615384615, 0.4615384615385], 0.357001972387: [0.7692307692308, 0.2307692307692], 0.222879684418: [0.5384615384615, 0.4615384615385], 0.374095989481: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.997370151216: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.854043392505: [0.6923076923077, 0.3076923076923], 0.159763313609: [0.3846153846154, 0.6153846153846], 0.239973701512: [0.2051282051282, 0.7948717948718, 0.1282051282051, 0.8717948717949], 0.408284023669: [0.7692307692308, 0.2307692307692], 0.922419460881: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.425378040763: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.176857330703: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.282051282051: [0.0], 0.956607495069: [0.6923076923077, 0.3076923076923], 0.819855358317: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.299145299145: [0.3333333333333, 0.6666666666667], 0.617357001972: [0.8461538461538, 0.1538461538462], 0.459566074951: [0.7692307692308, 0.2307692307692], 0.476660092045: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.050624589086: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.333333333333: [0.0], 0.211045364892: [0.3846153846154, 0.6153846153846], 0.350427350427: [0.3333333333333, 0.6666666666667], 0.034845496384: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.147928994083: [0.0769230769231, 0.9230769230769], 0.228139381986: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.384615384615: [0.0], 0.401709401709: [0.3333333333333, 0.6666666666667], 0.165023011177: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.258382642998: [0.8461538461538, 0.1538461538462], 0.784352399737: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.275476660092: [0.8205128205128, 0.1794871794872, 0.4871794871795, 0.5128205128205], 0.435897435897: [0.0], 0.452991452991: [0.3333333333333, 0.6666666666667], 0.30966469428: [0.8461538461538, 0.1538461538462], 0.547666009204: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.199211045365: [0.0769230769231, 0.9230769230769], 0.326758711374: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.487179487179: [0.0], 0.786982248521: [0.5384615384615, 0.4615384615385], 0.136094674556: [0.6923076923077, 0.3076923076923], 0.216305062459: [0.2564102564103, 0.5897435897436, 0.7435897435897, 0.4102564102564], 0.360946745562: [0.8461538461538, 0.1538461538462], 0.650230111769: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.506903353057: [0.0769230769231, 0.9230769230769], 0.378040762656: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.15318869165: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.575279421433: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.015121630506: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.412228796844: [0.8461538461538, 0.1538461538462], 0.752794214333: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.609467455621: [0.0769230769231, 0.9230769230769], 0.429322813938: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.011176857331: [0.2564102564103, 0.5897435897436, 0.7435897435897, 0.4102564102564], 0.660749506903: [0.0769230769231, 0.9230769230769], 0.187376725838: [0.6923076923077, 0.3076923076923], 0.463510848126: [0.8461538461538, 0.1538461538462], 0.712031558185: [0.0769230769231, 0.9230769230769], 0.48060486522: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.204470742932: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.066403681788: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.05325443787: [0.8461538461538, 0.1538461538462], 0.957922419461: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.81459566075: [0.0769230769231, 0.9230769230769], 0.527942143327: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.992110453649: [0.5384615384615, 0.4615384615385], 0.562130177515: [0.7692307692308, 0.2307692307692], 0.23865877712: [0.6923076923077, 0.3076923076923], 0.262327416174: [0.3846153846154, 0.6153846153846], 0.917159763314: [0.0769230769231, 0.9230769230769], 0.279421433268: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.91452991453: [0.6666666666667, 0.3333333333333], 0.023011176857: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.664694280079: [0.7692307692308, 0.2307692307692], 0.973701512163: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.313609467456: [0.3846153846154, 0.6153846153846], 0.555555555556: [0.6666666666667, 0.3333333333333], 0.100591715976: [0.7692307692308, 0.2307692307692], 0.33070348455: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.589743589744: [0.0], 0.767258382643: [0.7692307692308, 0.2307692307692], 0.069033530572: [0.5384615384615, 0.4615384615385], 0.364891518738: [0.3846153846154, 0.6153846153846], 0.65811965812: [0.3333333333333, 0.6666666666667], 0.514792899408: [0.8461538461538, 0.1538461538462], 0.381985535832: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.692307692308: [0.0], 0.11768573307: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.869822485207: [0.7692307692308, 0.2307692307692], 0.583168967784: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.255752794214: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.41617357002: [0.3846153846154, 0.6153846153846], 0.760683760684: [0.6666666666667, 0.3333333333333], 0.086127547666: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.965811965812: [0.6666666666667, 0.3333333333333], 0.938198553583: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.433267587114: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.289940828402: [0.6923076923077, 0.3076923076923], 0.972386587771: [0.7692307692308, 0.2307692307692], 0.005917159763: [0.3846153846154, 0.6153846153846], 0.685733070348: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.307034845496: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.467455621302: [0.3846153846154, 0.6153846153846], 0.863247863248: [0.6666666666667, 0.3333333333333], 0.719921104536: [0.8461538461538, 0.1538461538462], 0.001972386588: [0.8461538461538, 0.1538461538462], 0.484549638396: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.341222879684: [0.6923076923077, 0.3076923076923], 0.788297172913: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.358316896778: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.839579224195: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.822485207101: [0.8461538461538, 0.1538461538462], 0.151873767258: [0.7692307692308, 0.2307692307692], 0.535831689678: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821]} | pattern_zero = [0.0, 0.024983563445, 0.048652202498, 0.051282051282, 0.07100591716, 0.076265614727, 0.092044707429, 0.09993425378, 0.102564102564, 0.111768573307, 0.122287968442, 0.127547666009, 0.130177514793, 0.143326758711, 0.147271531887, 0.151216305062, 0.153846153846, 0.163050624589, 0.173570019724, 0.177514792899, 0.178829717291, 0.181459566075, 0.190664036818, 0.194608809993, 0.198553583169, 0.202498356345, 0.205128205128, 0.213017751479, 0.214332675871, 0.222222222222, 0.224852071006, 0.228796844181, 0.230111768573, 0.232741617357, 0.236686390533, 0.2419460881, 0.245890861275, 0.248520710059, 0.249835634451, 0.253780407627, 0.25641025641, 0.264299802761, 0.265614727153, 0.273504273504, 0.276134122288, 0.280078895464, 0.281393819855, 0.284023668639, 0.287968441815, 0.293228139382, 0.297172912558, 0.299802761341, 0.301117685733, 0.305062458909, 0.307692307692, 0.315581854043, 0.316896778435, 0.324786324786, 0.32741617357, 0.331360946746, 0.332675871137, 0.335305719921, 0.339250493097, 0.344510190664, 0.34845496384, 0.351084812623, 0.352399737015, 0.356344510191, 0.358974358974, 0.366863905325, 0.368178829717, 0.376068376068, 0.378698224852, 0.382642998028, 0.383957922419, 0.386587771203, 0.390532544379, 0.395792241946, 0.399737015122, 0.402366863905, 0.403681788297, 0.407626561473, 0.410256410256, 0.418145956607, 0.419460880999, 0.42735042735, 0.429980276134, 0.43392504931, 0.435239973702, 0.437869822485, 0.441814595661, 0.447074293228, 0.451019066404, 0.453648915187, 0.454963839579, 0.458908612755, 0.461538461538, 0.46942800789, 0.470742932281, 0.478632478632, 0.481262327416, 0.485207100592, 0.486522024984, 0.489151873767, 0.493096646943, 0.49835634451, 0.502301117686, 0.504930966469, 0.506245890861, 0.510190664037, 0.512820512821, 0.520710059172, 0.522024983563, 0.529914529915, 0.532544378698, 0.536489151874, 0.537804076266, 0.540433925049, 0.544378698225, 0.549638395792, 0.553583168968, 0.556213017751, 0.557527942143, 0.561472715319, 0.564102564103, 0.571992110454, 0.573307034845, 0.581196581197, 0.58382642998, 0.587771203156, 0.589086127548, 0.591715976331, 0.595660749507, 0.600920447074, 0.60486522025, 0.607495069034, 0.608809993425, 0.612754766601, 0.615384615385, 0.623274161736, 0.624589086128, 0.632478632479, 0.635108481262, 0.639053254438, 0.64036817883, 0.642998027613, 0.646942800789, 0.652202498356, 0.656147271532, 0.658777120316, 0.660092044707, 0.664036817883, 0.666666666667, 0.674556213018, 0.67587113741, 0.683760683761, 0.686390532544, 0.69033530572, 0.691650230112, 0.694280078895, 0.698224852071, 0.703484549638, 0.707429322814, 0.710059171598, 0.711374095989, 0.715318869165, 0.717948717949, 0.7258382643, 0.727153188692, 0.735042735043, 0.737672583826, 0.741617357002, 0.742932281394, 0.745562130178, 0.749506903353, 0.75476660092, 0.758711374096, 0.76134122288, 0.762656147272, 0.766600920447, 0.769230769231, 0.777120315582, 0.778435239974, 0.786324786325, 0.788954635108, 0.792899408284, 0.794214332676, 0.79684418146, 0.800788954635, 0.806048652202, 0.809993425378, 0.812623274162, 0.813938198554, 0.817882971729, 0.820512820513, 0.828402366864, 0.829717291256, 0.837606837607, 0.840236686391, 0.844181459566, 0.845496383958, 0.848126232742, 0.852071005917, 0.857330703485, 0.86127547666, 0.863905325444, 0.865220249836, 0.869165023011, 0.871794871795, 0.879684418146, 0.880999342538, 0.888888888889, 0.891518737673, 0.895463510848, 0.89677843524, 0.899408284024, 0.903353057199, 0.908612754767, 0.912557527942, 0.915187376726, 0.916502301118, 0.920447074293, 0.923076923077, 0.930966469428, 0.93228139382, 0.940170940171, 0.942800788955, 0.94674556213, 0.948060486522, 0.950690335306, 0.954635108481, 0.959894806049, 0.963839579224, 0.966469428008, 0.9677843524, 0.971729125575, 0.974358974359, 0.98224852071, 0.983563445102, 0.991452991453, 0.994082840237, 0.998027613412, 0.999342537804]
pattern_odd = [0.001972386588, 0.005917159763, 0.011176857331, 0.015121630506, 0.01775147929, 0.019066403682, 0.023011176857, 0.025641025641, 0.033530571992, 0.034845496384, 0.042735042735, 0.045364891519, 0.049309664694, 0.050624589086, 0.05325443787, 0.057199211045, 0.062458908613, 0.066403681788, 0.069033530572, 0.070348454964, 0.074293228139, 0.076923076923, 0.084812623274, 0.086127547666, 0.094017094017, 0.096646942801, 0.100591715976, 0.101906640368, 0.104536489152, 0.108481262327, 0.113740959895, 0.11768573307, 0.120315581854, 0.121630506246, 0.125575279421, 0.128205128205, 0.136094674556, 0.137409598948, 0.145299145299, 0.147928994083, 0.151873767258, 0.15318869165, 0.155818540434, 0.159763313609, 0.165023011177, 0.168967784352, 0.171597633136, 0.172912557528, 0.176857330703, 0.179487179487, 0.187376725838, 0.18869165023, 0.196581196581, 0.199211045365, 0.20315581854, 0.204470742932, 0.207100591716, 0.211045364892, 0.216305062459, 0.220249835634, 0.222879684418, 0.22419460881, 0.228139381986, 0.230769230769, 0.23865877712, 0.239973701512, 0.247863247863, 0.250493096647, 0.254437869822, 0.255752794214, 0.258382642998, 0.262327416174, 0.267587113741, 0.271531886917, 0.2741617357, 0.275476660092, 0.279421433268, 0.282051282051, 0.289940828402, 0.291255752794, 0.299145299145, 0.301775147929, 0.305719921105, 0.307034845496, 0.30966469428, 0.313609467456, 0.318869165023, 0.322813938199, 0.325443786982, 0.326758711374, 0.33070348455, 0.333333333333, 0.341222879684, 0.342537804076, 0.350427350427, 0.353057199211, 0.357001972387, 0.358316896778, 0.360946745562, 0.364891518738, 0.370151216305, 0.374095989481, 0.376725838264, 0.378040762656, 0.381985535832, 0.384615384615, 0.392504930966, 0.393819855358, 0.401709401709, 0.404339250493, 0.408284023669, 0.40959894806, 0.412228796844, 0.41617357002, 0.421433267587, 0.425378040763, 0.428007889546, 0.429322813938, 0.433267587114, 0.435897435897, 0.443786982249, 0.44510190664, 0.452991452991, 0.455621301775, 0.459566074951, 0.460880999343, 0.463510848126, 0.467455621302, 0.472715318869, 0.476660092045, 0.479289940828, 0.48060486522, 0.484549638396, 0.487179487179, 0.495069033531, 0.496383957922, 0.504273504274, 0.506903353057, 0.510848126233, 0.512163050625, 0.514792899408, 0.518737672584, 0.523997370151, 0.527942143327, 0.53057199211, 0.531886916502, 0.535831689678, 0.538461538462, 0.546351084813, 0.547666009204, 0.555555555556, 0.558185404339, 0.562130177515, 0.563445101907, 0.56607495069, 0.570019723866, 0.575279421433, 0.579224194609, 0.581854043393, 0.583168967784, 0.58711374096, 0.589743589744, 0.597633136095, 0.598948060487, 0.606837606838, 0.609467455621, 0.613412228797, 0.614727153189, 0.617357001972, 0.621301775148, 0.626561472715, 0.630506245891, 0.633136094675, 0.634451019066, 0.638395792242, 0.641025641026, 0.648915187377, 0.650230111769, 0.65811965812, 0.660749506903, 0.664694280079, 0.666009204471, 0.668639053254, 0.67258382643, 0.677843523997, 0.681788297173, 0.684418145957, 0.685733070348, 0.689677843524, 0.692307692308, 0.700197238659, 0.701512163051, 0.709401709402, 0.712031558185, 0.715976331361, 0.717291255753, 0.719921104536, 0.723865877712, 0.729125575279, 0.733070348455, 0.735700197239, 0.737015121631, 0.740959894806, 0.74358974359, 0.751479289941, 0.752794214333, 0.760683760684, 0.763313609467, 0.767258382643, 0.768573307035, 0.771203155819, 0.775147928994, 0.780407626561, 0.784352399737, 0.786982248521, 0.788297172913, 0.792241946088, 0.794871794872, 0.802761341223, 0.804076265615, 0.811965811966, 0.81459566075, 0.818540433925, 0.819855358317, 0.822485207101, 0.826429980276, 0.831689677844, 0.835634451019, 0.838264299803, 0.839579224195, 0.84352399737, 0.846153846154, 0.854043392505, 0.855358316897, 0.863247863248, 0.865877712032, 0.869822485207, 0.871137409599, 0.873767258383, 0.877712031558, 0.882971729126, 0.886916502301, 0.889546351085, 0.890861275477, 0.894806048652, 0.897435897436, 0.905325443787, 0.906640368179, 0.91452991453, 0.917159763314, 0.921104536489, 0.922419460881, 0.925049309665, 0.92899408284, 0.934253780408, 0.938198553583, 0.940828402367, 0.942143326759, 0.946088099934, 0.948717948718, 0.956607495069, 0.957922419461, 0.965811965812, 0.968441814596, 0.972386587771, 0.973701512163, 0.976331360947, 0.980276134122, 0.98553583169, 0.989480604865, 0.992110453649, 0.993425378041, 0.997370151216]
pattern_even = [0.0, 0.00788954635, 0.00920447074, 0.01709401709, 0.01972386588, 0.02366863905, 0.02498356345, 0.02761341223, 0.0315581854, 0.03681788297, 0.04076265615, 0.04339250493, 0.04470742932, 0.0486522025, 0.05128205128, 0.05917159763, 0.06048652203, 0.06837606838, 0.07100591716, 0.07495069034, 0.07626561473, 0.07889546351, 0.08284023669, 0.08809993425, 0.09204470743, 0.09467455621, 0.09598948061, 0.09993425378, 0.10256410256, 0.11045364892, 0.11176857331, 0.11965811966, 0.12228796844, 0.12623274162, 0.12754766601, 0.13017751479, 0.13412228797, 0.13938198554, 0.14332675871, 0.1459566075, 0.14727153189, 0.15121630506, 0.15384615385, 0.1617357002, 0.16305062459, 0.17094017094, 0.17357001972, 0.1775147929, 0.17882971729, 0.18145956608, 0.18540433925, 0.19066403682, 0.19460880999, 0.19723865878, 0.19855358317, 0.20249835635, 0.20512820513, 0.21301775148, 0.21433267587, 0.22222222222, 0.22485207101, 0.22879684418, 0.23011176857, 0.23274161736, 0.23668639053, 0.2419460881, 0.24589086128, 0.24852071006, 0.24983563445, 0.25378040763, 0.25641025641, 0.26429980276, 0.26561472715, 0.2735042735, 0.27613412229, 0.28007889546, 0.28139381986, 0.28402366864, 0.28796844182, 0.29322813938, 0.29717291256, 0.29980276134, 0.30111768573, 0.30506245891, 0.30769230769, 0.31558185404, 0.31689677844, 0.32478632479, 0.32741617357, 0.33136094675, 0.33267587114, 0.33530571992, 0.3392504931, 0.34451019066, 0.34845496384, 0.35108481262, 0.35239973702, 0.35634451019, 0.35897435897, 0.36686390533, 0.36817882972, 0.37606837607, 0.37869822485, 0.38264299803, 0.38395792242, 0.3865877712, 0.39053254438, 0.39579224195, 0.39973701512, 0.40236686391, 0.4036817883, 0.40762656147, 0.41025641026, 0.41814595661, 0.419460881, 0.42735042735, 0.42998027613, 0.43392504931, 0.4352399737, 0.43786982249, 0.44181459566, 0.44707429323, 0.4510190664, 0.45364891519, 0.45496383958, 0.45890861276, 0.46153846154, 0.46942800789, 0.47074293228, 0.47863247863, 0.48126232742, 0.48520710059, 0.48652202498, 0.48915187377, 0.49309664694, 0.49835634451, 0.50230111769, 0.50493096647, 0.50624589086, 0.51019066404, 0.51282051282, 0.52071005917, 0.52202498356, 0.52991452992, 0.5325443787, 0.53648915187, 0.53780407627, 0.54043392505, 0.54437869823, 0.54963839579, 0.55358316897, 0.55621301775, 0.55752794214, 0.56147271532, 0.5641025641, 0.57199211045, 0.57330703485, 0.5811965812, 0.58382642998, 0.58777120316, 0.58908612755, 0.59171597633, 0.59566074951, 0.60092044707, 0.60486522025, 0.60749506903, 0.60880999343, 0.6127547666, 0.61538461539, 0.62327416174, 0.62458908613, 0.63247863248, 0.63510848126, 0.63905325444, 0.64036817883, 0.64299802761, 0.64694280079, 0.65220249836, 0.65614727153, 0.65877712032, 0.66009204471, 0.66403681788, 0.66666666667, 0.67455621302, 0.67587113741, 0.68376068376, 0.68639053254, 0.69033530572, 0.69165023011, 0.6942800789, 0.69822485207, 0.70348454964, 0.70742932281, 0.7100591716, 0.71137409599, 0.71531886917, 0.71794871795, 0.7258382643, 0.72715318869, 0.73504273504, 0.73767258383, 0.741617357, 0.74293228139, 0.74556213018, 0.74950690335, 0.75476660092, 0.7587113741, 0.76134122288, 0.76265614727, 0.76660092045, 0.76923076923, 0.77712031558, 0.77843523997, 0.78632478633, 0.78895463511, 0.79289940828, 0.79421433268, 0.79684418146, 0.80078895464, 0.8060486522, 0.80999342538, 0.81262327416, 0.81393819855, 0.81788297173, 0.82051282051, 0.82840236686, 0.82971729126, 0.83760683761, 0.84023668639, 0.84418145957, 0.84549638396, 0.84812623274, 0.85207100592, 0.85733070349, 0.86127547666, 0.86390532544, 0.86522024984, 0.86916502301, 0.8717948718, 0.87968441815, 0.88099934254, 0.88888888889, 0.89151873767, 0.89546351085, 0.89677843524, 0.89940828402, 0.9033530572, 0.90861275477, 0.91255752794, 0.91518737673, 0.91650230112, 0.92044707429, 0.92307692308, 0.93096646943, 0.93228139382, 0.94017094017, 0.94280078896, 0.94674556213, 0.94806048652, 0.95069033531, 0.95463510848, 0.95989480605, 0.96383957922, 0.96646942801, 0.9677843524, 0.97172912558, 0.97435897436, 0.98224852071, 0.9835634451, 0.99145299145, 0.99408284024, 0.99802761341, 0.9993425378]
averages_even = {0.0: [0.0], 0.7258382643: [0.6923076923077, 0.3076923076923], 0.48126232742: [0.0769230769231, 0.9230769230769], 0.67587113741: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.05128205128: [0.0], 0.68376068376: [0.6666666666667, 0.3333333333333], 0.1775147929: [0.7692307692308, 0.2307692307692], 0.60092044707: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.0486522025: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.63510848126: [0.0769230769231, 0.9230769230769], 0.81262327416: [0.5384615384615, 0.4615384615385], 0.29980276134: [0.5384615384615, 0.4615384615385], 0.70348454964: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.65877712032: [0.5384615384615, 0.4615384615385], 0.28007889546: [0.7692307692308, 0.2307692307692], 0.89151873767: [0.0769230769231, 0.9230769230769], 0.88099934254: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.13938198554: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.29717291256: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.22879684418: [0.7692307692308, 0.2307692307692], 0.8060486522: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.08284023669: [0.3846153846154, 0.6153846153846], 0.24589086128: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.84023668639: [0.0769230769231, 0.9230769230769], 0.34845496384: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.55358316897: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.49835634451: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.79421433268: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.38264299803: [0.7692307692308, 0.2307692307692], 0.94280078896: [0.0769230769231, 0.9230769230769], 0.09993425378: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.02498356345: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.58382642998: [0.0769230769231, 0.9230769230769], 0.25641025641: [0.0], 0.69033530572: [0.7692307692308, 0.2307692307692], 0.2735042735: [0.6666666666667, 0.3333333333333], 0.06837606838: [0.3333333333333, 0.6666666666667], 0.43392504931: [0.7692307692308, 0.2307692307692], 0.7100591716: [0.5384615384615, 0.4615384615385], 0.5811965812: [0.6666666666667, 0.3333333333333], 0.97172912558: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.4510190664: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.7587113741: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.30769230769: [0.0], 0.95069033531: [0.8461538461538, 0.1538461538462], 0.57330703485: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.32478632479: [0.6666666666667, 0.3333333333333], 0.48520710059: [0.7692307692308, 0.2307692307692], 0.17094017094: [0.6666666666667, 0.3333333333333], 0.54043392505: [0.8461538461538, 0.1538461538462], 0.78632478633: [0.6666666666667, 0.3333333333333], 0.86127547666: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.35897435897: [0.0], 0.89940828402: [0.8461538461538, 0.1538461538462], 0.89546351085: [0.7692307692308, 0.2307692307692], 0.05917159763: [0.6923076923077, 0.3076923076923], 0.37606837607: [0.6666666666667, 0.3333333333333], 0.60880999343: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.30506245891: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.64299802761: [0.8461538461538, 0.1538461538462], 0.96383957922: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.10256410256: [0.0], 0.20512820513: [0.0], 0.90861275477: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.94674556213: [0.7692307692308, 0.2307692307692], 0.42735042735: [0.6666666666667, 0.3333333333333], 0.71137409599: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.28402366864: [0.8461538461538, 0.1538461538462], 0.22222222222: [0.6666666666667, 0.3333333333333], 0.74556213018: [0.8461538461538, 0.1538461538462], 0.30111768573: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.46153846154: [0.0], 0.41025641026: [0.0], 0.19460880999: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.11965811966: [0.6666666666667, 0.3333333333333], 0.81393819855: [0.8205128205128, 0.1794871794872, 0.4871794871795, 0.5128205128205], 0.33530571992: [0.8461538461538, 0.1538461538462], 0.99145299145: [0.3333333333333, 0.6666666666667], 0.84812623274: [0.8461538461538, 0.1538461538462], 0.08809993425: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.56147271532: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.83760683761: [0.6666666666667, 0.3333333333333], 0.44181459566: [0.3846153846154, 0.6153846153846], 0.59566074951: [0.3846153846154, 0.6153846153846], 0.04339250493: [0.5384615384615, 0.4615384615385], 0.3865877712: [0.8461538461538, 0.1538461538462], 0.97435897436: [0.0], 0.33136094675: [0.7692307692308, 0.2307692307692], 0.4036817883: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.66403681788: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.13017751479: [0.8461538461538, 0.1538461538462], 0.36817882972: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.43786982249: [0.8461538461538, 0.1538461538462], 0.00920447074: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.03681788297: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.45496383958: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.76660092045: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.62327416174: [0.6923076923077, 0.3076923076923], 0.93096646943: [0.6923076923077, 0.3076923076923], 0.07100591716: [0.0769230769231, 0.9230769230769], 0.99802761341: [0.7692307692308, 0.2307692307692], 0.12228796844: [0.0769230769231, 0.9230769230769], 0.6942800789: [0.8461538461538, 0.1538461538462], 0.69165023011: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.86916502301: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.18145956608: [0.8461538461538, 0.1538461538462], 0.9033530572: [0.3846153846154, 0.6153846153846], 0.92044707429: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.19855358317: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.25378040763: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.82840236686: [0.6923076923077, 0.3076923076923], 0.61538461539: [0.0], 0.85207100592: [0.3846153846154, 0.6153846153846], 0.28796844182: [0.3846153846154, 0.6153846153846], 0.89677843524: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.07626561473: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.23274161736: [0.8461538461538, 0.1538461538462], 0.3392504931: [0.3846153846154, 0.6153846153846], 0.24983563445: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.35634451019: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.73767258383: [0.0769230769231, 0.9230769230769], 0.9993425378: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.79684418146: [0.8461538461538, 0.1538461538462], 0.39053254438: [0.3846153846154, 0.6153846153846], 0.47863247863: [0.6666666666667, 0.3333333333333], 0.40762656147: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.9677843524: [0.8205128205128, 0.1794871794872, 0.4871794871795, 0.5128205128205], 0.26429980276: [0.6923076923077, 0.3076923076923], 0.28139381986: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.02761341223: [0.8461538461538, 0.1538461538462], 0.91650230112: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.51019066404: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.45890861276: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.92307692308: [0.0], 0.07889546351: [0.8461538461538, 0.1538461538462], 0.33267587114: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.12623274162: [0.7692307692308, 0.2307692307692], 0.49309664694: [0.3846153846154, 0.6153846153846], 0.78895463511: [0.0769230769231, 0.9230769230769], 0.55621301775: [0.5384615384615, 0.4615384615385], 0.9835634451: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.36686390533: [0.6923076923077, 0.3076923076923], 0.09598948061: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.62458908613: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.65220249836: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.58908612755: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.35239973702: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.41814595661: [0.6923076923077, 0.3076923076923], 0.96646942801: [0.5384615384615, 0.4615384615385], 0.54963839579: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.4352399737: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.72715318869: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.1459566075: [0.5384615384615, 0.4615384615385], 0.76134122288: [0.5384615384615, 0.4615384615385], 0.46942800789: [0.6923076923077, 0.3076923076923], 0.04076265615: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.48652202498: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.82971729126: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.68639053254: [0.0769230769231, 0.9230769230769], 0.16305062459: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.86390532544: [0.5384615384615, 0.4615384615385], 0.53648915187: [0.7692307692308, 0.2307692307692], 0.75476660092: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.93228139382: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.19723865878: [0.5384615384615, 0.4615384615385], 0.39973701512: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.50230111769: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.85733070349: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.13412228797: [0.3846153846154, 0.6153846153846], 0.21433267587: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.71531886917: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.76265614727: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.15121630506: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.37869822485: [0.0769230769231, 0.9230769230769], 0.63905325444: [0.7692307692308, 0.2307692307692], 0.95989480605: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.52991452992: [0.6666666666667, 0.3333333333333], 0.24852071006: [0.5384615384615, 0.4615384615385], 0.70742932281: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.5641025641: [0.0], 0.18540433925: [0.3846153846154, 0.6153846153846], 0.64694280079: [0.3846153846154, 0.6153846153846], 0.63247863248: [0.6666666666667, 0.3333333333333], 0.80999342538: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.20249835635: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.66666666667: [0.0], 0.82051282051: [0.0], 0.60486522025: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.01972386588: [0.0769230769231, 0.9230769230769], 0.2419460881: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.73504273504: [0.6666666666667, 0.3333333333333], 0.59171597633: [0.8461538461538, 0.1538461538462], 0.91255752794: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.76923076923: [0.0], 0.23668639053: [0.3846153846154, 0.6153846153846], 0.52071005917: [0.6923076923077, 0.3076923076923], 0.66009204471: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.11045364892: [0.6923076923077, 0.3076923076923], 0.17357001972: [0.0769230769231, 0.9230769230769], 0.8717948718: [0.0], 0.50493096647: [0.5384615384615, 0.4615384615385], 0.19066403682: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.94017094017: [0.6666666666667, 0.3333333333333], 0.69822485207: [0.3846153846154, 0.6153846153846], 0.12754766601: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.09467455621: [0.5384615384615, 0.4615384615385], 0.54437869823: [0.3846153846154, 0.6153846153846], 0.65614727153: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.86522024984: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.04470742932: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.22485207101: [0.0769230769231, 0.9230769230769], 0.51282051282: [0.0], 0.6127547666: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.91518737673: [0.5384615384615, 0.4615384615385], 0.1617357002: [0.6923076923077, 0.3076923076923], 0.06048652203: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.53780407627: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.31558185404: [0.6923076923077, 0.3076923076923], 0.17882971729: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.57199211045: [0.6923076923077, 0.3076923076923], 0.99408284024: [0.0769230769231, 0.9230769230769], 0.74950690335: [0.3846153846154, 0.6153846153846], 0.14727153189: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.01709401709: [0.6666666666667, 0.3333333333333], 0.55752794214: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.81788297173: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.67455621302: [0.6923076923077, 0.3076923076923], 0.26561472715: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.00788954635: [0.6923076923077, 0.3076923076923], 0.21301775148: [0.6923076923077, 0.3076923076923], 0.58777120316: [0.7692307692308, 0.2307692307692], 0.74293228139: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.07495069034: [0.7692307692308, 0.2307692307692], 0.23011176857: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.77712031558: [0.6923076923077, 0.3076923076923], 0.31689677844: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.5325443787: [0.0769230769231, 0.9230769230769], 0.95463510848: [0.3846153846154, 0.6153846153846], 0.52202498356: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.84549638396: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.35108481262: [0.5384615384615, 0.4615384615385], 0.87968441815: [0.6923076923077, 0.3076923076923], 0.09204470743: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.64036817883: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.84418145957: [0.7692307692308, 0.2307692307692], 0.741617357: [0.7692307692308, 0.2307692307692], 0.80078895464: [0.3846153846154, 0.6153846153846], 0.94806048652: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.40236686391: [0.5384615384615, 0.4615384615385], 0.98224852071: [0.6923076923077, 0.3076923076923], 0.419460881: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.77843523997: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.27613412229: [0.0769230769231, 0.9230769230769], 0.71794871795: [0.0], 0.29322813938: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.15384615385: [0.0], 0.45364891519: [0.5384615384615, 0.4615384615385], 0.48915187377: [0.8461538461538, 0.1538461538462], 0.47074293228: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.32741617357: [0.0769230769231, 0.9230769230769], 0.34451019066: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.88888888889: [0.6666666666667, 0.3333333333333], 0.79289940828: [0.7692307692308, 0.2307692307692], 0.44707429323: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.02366863905: [0.7692307692308, 0.2307692307692], 0.39579224195: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.0315581854: [0.3846153846154, 0.6153846153846], 0.42998027613: [0.0769230769231, 0.9230769230769], 0.50624589086: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.14332675871: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.38395792242: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.11176857331: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.60749506903: [0.5384615384615, 0.4615384615385]}
averages_odd = {0.392504930966: [0.6923076923077, 0.3076923076923], 0.570019723866: [0.3846153846154, 0.6153846153846], 0.120315581854: [0.5384615384615, 0.4615384615385], 0.40959894806: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.168967784352: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.925049309665: [0.8461538461538, 0.1538461538462], 0.638395792242: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.443786982249: [0.6923076923077, 0.3076923076923], 0.67258382643: [0.3846153846154, 0.6153846153846], 0.993425378041: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.460880999343: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.563445101907: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.20315581854: [0.7692307692308, 0.2307692307692], 0.597633136095: [0.6923076923077, 0.3076923076923], 0.495069033531: [0.6923076923077, 0.3076923076923], 0.775147928994: [0.3846153846154, 0.6153846153846], 0.890861275477: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.220249835634: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.074293228139: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.057199211045: [0.3846153846154, 0.6153846153846], 0.84352399737: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.700197238659: [0.6923076923077, 0.3076923076923], 0.877712031558: [0.3846153846154, 0.6153846153846], 0.768573307035: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.677843523997: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.946088099934: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.802761341223: [0.6923076923077, 0.3076923076923], 0.980276134122: [0.3846153846154, 0.6153846153846], 0.897435897436: [0.0], 0.871137409599: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.882971729126: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.128205128205: [0.0], 0.905325443787: [0.6923076923077, 0.3076923076923], 0.108481262327: [0.3846153846154, 0.6153846153846], 0.145299145299: [0.3333333333333, 0.6666666666667], 0.634451019066: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.076923076923: [0.0], 0.042735042735: [0.3333333333333, 0.6666666666667], 0.179487179487: [0.0], 0.613412228797: [0.7692307692308, 0.2307692307692], 0.531886916502: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.094017094017: [0.3333333333333, 0.6666666666667], 0.976331360947: [0.8461538461538, 0.1538461538462], 0.196581196581: [0.3333333333333, 0.6666666666667], 0.025641025641: [0.0], 0.630506245891: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.01775147929: [0.5384615384615, 0.4615384615385], 0.53057199211: [0.5384615384615, 0.4615384615385], 0.230769230769: [0.0], 0.598948060487: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.247863247863: [0.3333333333333, 0.6666666666667], 0.835634451019: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.855358316897: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.633136094675: [0.5384615384615, 0.4615384615385], 0.780407626561: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.523997370151: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.096646942801: [0.0769230769231, 0.9230769230769], 0.701512163051: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.558185404339: [0.0769230769231, 0.9230769230769], 0.735700197239: [0.5384615384615, 0.4615384615385], 0.98553583169: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.626561472715: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.740959894806: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.804076265615: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.538461538462: [0.0], 0.113740959895: [0.2564102564103, 0.5897435897436, 0.7435897435897, 0.4102564102564], 0.838264299803: [0.5384615384615, 0.4615384615385], 0.155818540434: [0.8461538461538, 0.1538461538462], 0.729125575279: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.906640368179: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.763313609467: [0.0769230769231, 0.9230769230769], 0.172912557528: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.2741617357: [0.5384615384615, 0.4615384615385], 0.940828402367: [0.5384615384615, 0.4615384615385], 0.045364891519: [0.0769230769231, 0.9230769230769], 0.291255752794: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.831689677844: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.865877712032: [0.0769230769231, 0.9230769230769], 0.325443786982: [0.5384615384615, 0.4615384615385], 0.579224194609: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.207100591716: [0.8461538461538, 0.1538461538462], 0.342537804076: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.934253780408: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.733070348455: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.504273504274: [0.3333333333333, 0.6666666666667], 0.22419460881: [0.8205128205128, 0.1794871794872, 0.4871794871795, 0.5128205128205], 0.376725838264: [0.5384615384615, 0.4615384615385], 0.681788297173: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.019066403682: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.393819855358: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.250493096647: [0.0769230769231, 0.9230769230769], 0.794871794872: [0.0], 0.084812623274: [0.6923076923077, 0.3076923076923], 0.606837606838: [0.3333333333333, 0.6666666666667], 0.062458908613: [0.2564102564103, 0.5897435897436, 0.7435897435897, 0.4102564102564], 0.428007889546: [0.5384615384615, 0.4615384615385], 0.641025641026: [0.0], 0.510848126233: [0.7692307692308, 0.2307692307692], 0.44510190664: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.267587113741: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.301775147929: [0.0769230769231, 0.9230769230769], 0.666009204471: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.709401709402: [0.6666666666667, 0.3333333333333], 0.318869165023: [0.2564102564103, 0.5897435897436, 0.7435897435897, 0.4102564102564], 0.56607495069: [0.8461538461538, 0.1538461538462], 0.479289940828: [0.5384615384615, 0.4615384615385], 0.101906640368: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.74358974359: [0.0], 0.496383957922: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.921104536489: [0.7692307692308, 0.2307692307692], 0.581854043393: [0.5384615384615, 0.4615384615385], 0.353057199211: [0.0769230769231, 0.9230769230769], 0.070348454964: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.811965811966: [0.3333333333333, 0.6666666666667], 0.370151216305: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.668639053254: [0.8461538461538, 0.1538461538462], 0.989480604865: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.846153846154: [0.0], 0.968441814596: [0.0769230769231, 0.9230769230769], 0.404339250493: [0.0769230769231, 0.9230769230769], 0.737015121631: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.421433267587: [0.2564102564103, 0.5897435897436, 0.7435897435897, 0.4102564102564], 0.771203155819: [0.8461538461538, 0.1538461538462], 0.948717948718: [0.0], 0.518737672584: [0.3846153846154, 0.6153846153846], 0.455621301775: [0.0769230769231, 0.9230769230769], 0.818540433925: [0.7692307692308, 0.2307692307692], 0.472715318869: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.873767258383: [0.8461538461538, 0.1538461538462], 0.58711374096: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.104536489152: [0.8461538461538, 0.1538461538462], 0.621301775148: [0.3846153846154, 0.6153846153846], 0.137409598948: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.942143326759: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.715976331361: [0.7692307692308, 0.2307692307692], 0.894806048652: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.512163050625: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.689677843524: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.546351084813: [0.6923076923077, 0.3076923076923], 0.723865877712: [0.3846153846154, 0.6153846153846], 0.254437869822: [0.7692307692308, 0.2307692307692], 0.121630506246: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.171597633136: [0.5384615384615, 0.4615384615385], 0.614727153189: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.271531886917: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.792241946088: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.648915187377: [0.6923076923077, 0.3076923076923], 0.826429980276: [0.3846153846154, 0.6153846153846], 0.18869165023: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.305719921105: [0.7692307692308, 0.2307692307692], 0.92899408284: [0.3846153846154, 0.6153846153846], 0.049309664694: [0.7692307692308, 0.2307692307692], 0.717291255753: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.322813938199: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.125575279421: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.889546351085: [0.5384615384615, 0.4615384615385], 0.751479289941: [0.6923076923077, 0.3076923076923], 0.886916502301: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.033530571992: [0.6923076923077, 0.3076923076923], 0.684418145957: [0.5384615384615, 0.4615384615385], 0.357001972387: [0.7692307692308, 0.2307692307692], 0.222879684418: [0.5384615384615, 0.4615384615385], 0.374095989481: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.997370151216: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.854043392505: [0.6923076923077, 0.3076923076923], 0.159763313609: [0.3846153846154, 0.6153846153846], 0.239973701512: [0.2051282051282, 0.7948717948718, 0.1282051282051, 0.8717948717949], 0.408284023669: [0.7692307692308, 0.2307692307692], 0.922419460881: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.425378040763: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.176857330703: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.282051282051: [0.0], 0.956607495069: [0.6923076923077, 0.3076923076923], 0.819855358317: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.299145299145: [0.3333333333333, 0.6666666666667], 0.617357001972: [0.8461538461538, 0.1538461538462], 0.459566074951: [0.7692307692308, 0.2307692307692], 0.476660092045: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.050624589086: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.333333333333: [0.0], 0.211045364892: [0.3846153846154, 0.6153846153846], 0.350427350427: [0.3333333333333, 0.6666666666667], 0.034845496384: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.147928994083: [0.0769230769231, 0.9230769230769], 0.228139381986: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.384615384615: [0.0], 0.401709401709: [0.3333333333333, 0.6666666666667], 0.165023011177: [0.4102564102564, 0.2564102564103, 0.5897435897436, 0.7435897435897], 0.258382642998: [0.8461538461538, 0.1538461538462], 0.784352399737: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.275476660092: [0.8205128205128, 0.1794871794872, 0.4871794871795, 0.5128205128205], 0.435897435897: [0.0], 0.452991452991: [0.3333333333333, 0.6666666666667], 0.30966469428: [0.8461538461538, 0.1538461538462], 0.547666009204: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.199211045365: [0.0769230769231, 0.9230769230769], 0.326758711374: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.487179487179: [0.0], 0.786982248521: [0.5384615384615, 0.4615384615385], 0.136094674556: [0.6923076923077, 0.3076923076923], 0.216305062459: [0.2564102564103, 0.5897435897436, 0.7435897435897, 0.4102564102564], 0.360946745562: [0.8461538461538, 0.1538461538462], 0.650230111769: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.506903353057: [0.0769230769231, 0.9230769230769], 0.378040762656: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.15318869165: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.575279421433: [0.4102564102564, 0.5897435897436, 0.2564102564103, 0.7435897435897], 0.015121630506: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.412228796844: [0.8461538461538, 0.1538461538462], 0.752794214333: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.609467455621: [0.0769230769231, 0.9230769230769], 0.429322813938: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.011176857331: [0.2564102564103, 0.5897435897436, 0.7435897435897, 0.4102564102564], 0.660749506903: [0.0769230769231, 0.9230769230769], 0.187376725838: [0.6923076923077, 0.3076923076923], 0.463510848126: [0.8461538461538, 0.1538461538462], 0.712031558185: [0.0769230769231, 0.9230769230769], 0.48060486522: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.204470742932: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.066403681788: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.05325443787: [0.8461538461538, 0.1538461538462], 0.957922419461: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.81459566075: [0.0769230769231, 0.9230769230769], 0.527942143327: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.992110453649: [0.5384615384615, 0.4615384615385], 0.562130177515: [0.7692307692308, 0.2307692307692], 0.23865877712: [0.6923076923077, 0.3076923076923], 0.262327416174: [0.3846153846154, 0.6153846153846], 0.917159763314: [0.0769230769231, 0.9230769230769], 0.279421433268: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.91452991453: [0.6666666666667, 0.3333333333333], 0.023011176857: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.664694280079: [0.7692307692308, 0.2307692307692], 0.973701512163: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.313609467456: [0.3846153846154, 0.6153846153846], 0.555555555556: [0.6666666666667, 0.3333333333333], 0.100591715976: [0.7692307692308, 0.2307692307692], 0.33070348455: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.589743589744: [0.0], 0.767258382643: [0.7692307692308, 0.2307692307692], 0.069033530572: [0.5384615384615, 0.4615384615385], 0.364891518738: [0.3846153846154, 0.6153846153846], 0.65811965812: [0.3333333333333, 0.6666666666667], 0.514792899408: [0.8461538461538, 0.1538461538462], 0.381985535832: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.692307692308: [0.0], 0.11768573307: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.869822485207: [0.7692307692308, 0.2307692307692], 0.583168967784: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.255752794214: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.41617357002: [0.3846153846154, 0.6153846153846], 0.760683760684: [0.6666666666667, 0.3333333333333], 0.086127547666: [0.2051282051282, 0.1282051282051, 0.7948717948718, 0.8717948717949], 0.965811965812: [0.6666666666667, 0.3333333333333], 0.938198553583: [0.5641025641026, 0.1025641025641, 0.8974358974359, 0.4358974358974], 0.433267587114: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.289940828402: [0.6923076923077, 0.3076923076923], 0.972386587771: [0.7692307692308, 0.2307692307692], 0.005917159763: [0.3846153846154, 0.6153846153846], 0.685733070348: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.307034845496: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.467455621302: [0.3846153846154, 0.6153846153846], 0.863247863248: [0.6666666666667, 0.3333333333333], 0.719921104536: [0.8461538461538, 0.1538461538462], 0.001972386588: [0.8461538461538, 0.1538461538462], 0.484549638396: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821], 0.341222879684: [0.6923076923077, 0.3076923076923], 0.788297172913: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.358316896778: [0.025641025641, 0.6410256410256, 0.3589743589744, 0.974358974359], 0.839579224195: [0.5128205128205, 0.1794871794872, 0.4871794871795, 0.8205128205128], 0.822485207101: [0.8461538461538, 0.1538461538462], 0.151873767258: [0.7692307692308, 0.2307692307692], 0.535831689678: [0.2820512820513, 0.9487179487179, 0.7179487179487, 0.0512820512821]} |
class Solution:
def findRepeatNumber(self, nums: List[int]) -> int:
s = set()
for _ in nums:
if _ not in s:
s.add(_)
else:
return _
| class Solution:
def find_repeat_number(self, nums: List[int]) -> int:
s = set()
for _ in nums:
if _ not in s:
s.add(_)
else:
return _ |
def dfs(vertex):
global reachable_vertex
global visited_vertex
if visited_vertex[vertex] is True:
return
visited_vertex[vertex] = True
reachable_vertex.append(vertex)
for i in range(0, vertex_num):
if adjacent_matrix[vertex][i] is True:
dfs(i)
vertex_num = int(input())
edge_num = int(input())
adjacent_matrix = [[False for x in range(0, vertex_num)] for y in range(0, vertex_num)]
visited_vertex = [False for x in range(0, vertex_num)]
for i in range(0, edge_num):
s, d = map(lambda x: (int(x) - 1), input().split())
adjacent_matrix[s][d] = True
adjacent_matrix[d][s] = True
reachable_vertex = list()
dfs(0)
print(len(reachable_vertex) - 1)
| def dfs(vertex):
global reachable_vertex
global visited_vertex
if visited_vertex[vertex] is True:
return
visited_vertex[vertex] = True
reachable_vertex.append(vertex)
for i in range(0, vertex_num):
if adjacent_matrix[vertex][i] is True:
dfs(i)
vertex_num = int(input())
edge_num = int(input())
adjacent_matrix = [[False for x in range(0, vertex_num)] for y in range(0, vertex_num)]
visited_vertex = [False for x in range(0, vertex_num)]
for i in range(0, edge_num):
(s, d) = map(lambda x: int(x) - 1, input().split())
adjacent_matrix[s][d] = True
adjacent_matrix[d][s] = True
reachable_vertex = list()
dfs(0)
print(len(reachable_vertex) - 1) |
N, K=map(int, input().split())
arr=[]
result=0
for i in range(N):
arr.append(int(input()))
for i in range(N-1, -1, -1):
if K==0:
break
else:
result+=K//arr[i]
K=K%arr[i]
print(result)
| (n, k) = map(int, input().split())
arr = []
result = 0
for i in range(N):
arr.append(int(input()))
for i in range(N - 1, -1, -1):
if K == 0:
break
else:
result += K // arr[i]
k = K % arr[i]
print(result) |
myl1 = [12,10,38,22]
myl1.sort(reverse = True)
print(myl1)
myl1.sort(reverse = False)
print(myl1)
| myl1 = [12, 10, 38, 22]
myl1.sort(reverse=True)
print(myl1)
myl1.sort(reverse=False)
print(myl1) |
def minSwap(arr, n, k) :
# Find count of elements
# which are less than
# equals to k
count = 0
for i in range(0, n) :
if (arr[i] <= k) :
count = count + 1
# Find unwanted elements
# in current window of
# size 'count'
bad = 0
for i in range(0, count) :
if (arr[i] > k) :
bad = bad + 1
# Initialize answer with
# 'bad' value of current
# window
ans = bad
j = count
for i in range(0, n) :
if(j == n) :
break
# Decrement count of
# previous window
if (arr[i] > k) :
bad = bad - 1
# Increment count of
# current window
if (arr[j] > k) :
bad = bad + 1
# Update ans if count
# of 'bad' is less in
# current window
ans = min(ans, bad)
j = j + 1
return ans
# Driver code
arr = [2, 1, 5, 6, 3]
n = len(arr)
k = 3
print (minSwap(arr, n, k)) | def min_swap(arr, n, k):
count = 0
for i in range(0, n):
if arr[i] <= k:
count = count + 1
bad = 0
for i in range(0, count):
if arr[i] > k:
bad = bad + 1
ans = bad
j = count
for i in range(0, n):
if j == n:
break
if arr[i] > k:
bad = bad - 1
if arr[j] > k:
bad = bad + 1
ans = min(ans, bad)
j = j + 1
return ans
arr = [2, 1, 5, 6, 3]
n = len(arr)
k = 3
print(min_swap(arr, n, k)) |
class Product:
def __init__(self, name="", price=0.0, discountPercent=0):
self.name = name
self.price = price
self.discountPercent = discountPercent
def getDiscountAmount(self):
return self.price * self.discountPercent / 100
def getDiscountPrice(self):
return self.price - self.getDiscountAmount()
def getDescription(self):
return self.name
class Media(Product):
def __init__(self, name="", price=0.0, discountPercent=0, format=""):
self.format = format
Product.__init__(self, name, price, discountPercent)
# def getDiscription(self):
# return Product.getDescription(self)
class Book(Media):
def __init__(self, name="", price=0.0, discountPercent=0, author="", format="Hardcover"):
self.author = author
Media.__init__(self, name, price, discountPercent, format)
# Book("The Big Short", 15.95, 34, "Michael Lewis", "Ebook")) # ,
def getDescription(self):
return Media.getDescription(self) + " by " + self.author
class Album(Media):
def __init__(self, name="", price=0.0, discountPercent=0, author="", format="cassette"):
Media.__init__(self, name, price, discountPercent, format)
self.author = author
def getDescription(self):
return Media.getDescription(self) + " by " + self.author
class Movie(Media):
def __init__(self, name="", price=0.0, discountPercent=0, year=0, format="DVD"):
Media.__init__(self, name, price, discountPercent, format)
self.year = year
def getDescription(self):
return Media.getDescription(self) + " (" + str(self.year) + ")"
| class Product:
def __init__(self, name='', price=0.0, discountPercent=0):
self.name = name
self.price = price
self.discountPercent = discountPercent
def get_discount_amount(self):
return self.price * self.discountPercent / 100
def get_discount_price(self):
return self.price - self.getDiscountAmount()
def get_description(self):
return self.name
class Media(Product):
def __init__(self, name='', price=0.0, discountPercent=0, format=''):
self.format = format
Product.__init__(self, name, price, discountPercent)
class Book(Media):
def __init__(self, name='', price=0.0, discountPercent=0, author='', format='Hardcover'):
self.author = author
Media.__init__(self, name, price, discountPercent, format)
def get_description(self):
return Media.getDescription(self) + ' by ' + self.author
class Album(Media):
def __init__(self, name='', price=0.0, discountPercent=0, author='', format='cassette'):
Media.__init__(self, name, price, discountPercent, format)
self.author = author
def get_description(self):
return Media.getDescription(self) + ' by ' + self.author
class Movie(Media):
def __init__(self, name='', price=0.0, discountPercent=0, year=0, format='DVD'):
Media.__init__(self, name, price, discountPercent, format)
self.year = year
def get_description(self):
return Media.getDescription(self) + ' (' + str(self.year) + ')' |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def isPalindrome(self, head: ListNode) -> bool:
slow, fast = head, head
tot = 0
while fast and fast.next:
fast = fast.next.next
slow = slow.next
# check odd or even
if not fast: # even
mid = slow
else: # odd
mid = slow.next
# reverse starting from mid
mid = self.reveserLL(mid)
# compare palindromeLL
p1 = head
p2 = mid
while p1 and p2:
if p1.val != p2.val:
return False
p1 = p1.next
p2 = p2.next
return True
def reveserLL(self, head: ListNode) -> ListNode:
newNext = None
curr = head
while curr:
prev = curr.next
curr.next = newNext
newNext = curr
curr = prev
return newNext
| class Solution:
def is_palindrome(self, head: ListNode) -> bool:
(slow, fast) = (head, head)
tot = 0
while fast and fast.next:
fast = fast.next.next
slow = slow.next
if not fast:
mid = slow
else:
mid = slow.next
mid = self.reveserLL(mid)
p1 = head
p2 = mid
while p1 and p2:
if p1.val != p2.val:
return False
p1 = p1.next
p2 = p2.next
return True
def reveser_ll(self, head: ListNode) -> ListNode:
new_next = None
curr = head
while curr:
prev = curr.next
curr.next = newNext
new_next = curr
curr = prev
return newNext |
n = int(input())
count = 0
for i in range(n):
one_word = list(input())
count_arr = [0 for _ in range(26)]
pre = ""
for c in one_word:
idx = ord(c) - 97
cur = c
if (count_arr[idx] == 0) or (pre == cur):
count_arr[idx] += 1
pre = c
if sum(count_arr) == len(one_word):
count += 1
print(count) | n = int(input())
count = 0
for i in range(n):
one_word = list(input())
count_arr = [0 for _ in range(26)]
pre = ''
for c in one_word:
idx = ord(c) - 97
cur = c
if count_arr[idx] == 0 or pre == cur:
count_arr[idx] += 1
pre = c
if sum(count_arr) == len(one_word):
count += 1
print(count) |
p=21888242871839275222246405745257275088696311157297823662689037894645226208583
print("over 253 bit")
for i in range (10):
print(i, (p * i) >> 253)
def maxarg(x):
return x // p
print("maxarg")
for i in range(16):
print(i, maxarg(i << 253))
x=0x2c130429c1d4802eb8703197d038ebd5109f96aee333bd027963094f5bb33ad
y = x * 9
print(hex(y))
| p = 21888242871839275222246405745257275088696311157297823662689037894645226208583
print('over 253 bit')
for i in range(10):
print(i, p * i >> 253)
def maxarg(x):
return x // p
print('maxarg')
for i in range(16):
print(i, maxarg(i << 253))
x = 1245960260290650057564252865548478619374135861792959100192203205078981227437
y = x * 9
print(hex(y)) |
# This problem was recently asked by AirBNB:
# You are given a singly linked list and an integer k. Return the linked list, removing the k-th last element from the list.
# Try to do it in a single pass and using constant space.
class Node:
def __init__(self, val, next=None):
self.val = val
self.next = next
def __str__(self):
current_node = self
result = []
while current_node:
result.append(current_node.val)
current_node = current_node.next
return str(result)
def remove_kth_from_linked_list(head, k):
# Fill this in
i = 1
res = []
n = head
while n and n.next:
if i >= k:
res.append(n.next.val)
else:
res.append(n.val)
i += 1
n = n.next
return res
head = Node(1, Node(2, Node(3, Node(4, Node(5)))))
print(head)
# [1, 2, 3, 4, 5]
head = remove_kth_from_linked_list(head, 3)
print(head)
# [1, 2, 4, 5]
| class Node:
def __init__(self, val, next=None):
self.val = val
self.next = next
def __str__(self):
current_node = self
result = []
while current_node:
result.append(current_node.val)
current_node = current_node.next
return str(result)
def remove_kth_from_linked_list(head, k):
i = 1
res = []
n = head
while n and n.next:
if i >= k:
res.append(n.next.val)
else:
res.append(n.val)
i += 1
n = n.next
return res
head = node(1, node(2, node(3, node(4, node(5)))))
print(head)
head = remove_kth_from_linked_list(head, 3)
print(head) |
a=int(input())
if(a%2==0):
if(a>=2 and a<5):
print ("Not Weird")
elif(a<=20):
print("Weird")
else:
print("Not Weird")
else:
print("Weird")
| a = int(input())
if a % 2 == 0:
if a >= 2 and a < 5:
print('Not Weird')
elif a <= 20:
print('Weird')
else:
print('Not Weird')
else:
print('Weird') |
# test builtin object()
# creation
object()
# printing
print(repr(object())[:7])
| object()
print(repr(object())[:7]) |
class Solution:
def findSpecialInteger(self, arr: List[int]) -> int:
n = len(arr) // 4
c = 0
prev = -1
for e in arr:
if e == prev:
c += 1
else:
c = 1
prev = e
if c > n:
return e
| class Solution:
def find_special_integer(self, arr: List[int]) -> int:
n = len(arr) // 4
c = 0
prev = -1
for e in arr:
if e == prev:
c += 1
else:
c = 1
prev = e
if c > n:
return e |
'''
Data list contains all users info. Each user's info must be a list.
First Element: 0 (int)
Second Element: name (str)
Third Element: username (str)
Fourth Element: toph link (str)
Fifth Element: dimik link (str)
Sixth Element: uri link (str)
Note: If any user does not have an account leave there an empty string.
'''
data = [
[0, "Mahinul Islam", "mahin", "", "",
"https://urionlinejudge.com.br/judge/en/profile/239509"],
[0, "Majedul Islam", "majed", "", "",
"https://urionlinejudge.com.br/judge/en/profile/229317"],
[0, "Md. Mushfiqur Rahman", "mdvirus", "https://toph.co/u/mdvirus",
"https://dimikoj.com/users/53/mdvirus", "https://urionlinejudge.com.br/judge/en/profile/223624"],
[0, "Md. Shazzad Hossein Shakib", "HackersBoss",
"https://toph.co/u/HackersBoss", "", ""],
[0, "Abdullah Al Mukit", "newbie_mukit", "https://toph.co/u/newbie_mukit",
"", "https://urionlinejudge.com.br/judge/en/profile/228785"],
[0, "Md. Toukir Ahammed", "toukir48bit",
"https://toph.co/u/toukir48bit", "", ""],
[0, "Md. Sifat Al Imtiaz", "SifatTheCoder",
"https://toph.co/u/SifatTheCoder", "", ""],
[0, "Mojahidul Islam Rakib", "HelloRakib",
"https://toph.co/u/HelloRakib", "", ""],
[0, "Md. Forhad Islam", "fiveG_coder",
"https://toph.co/u/fiveG_coder", "", ""],
[0, "Most Rumana Akter Rupa", "programmer_upa",
"https://toph.co/u/programmer_upa", "", ""],
[0, "Most Keya Akter", "Uniqe_coder",
"https://toph.co/u/Uniqe_coder", "", ""],
[0, "Most Nargiz Akter", "Simple_coder",
"https://toph.co/u/Simple_coder", "", ""],
[0, "Most Masuda Akter Momota", "itsmomota",
"https://toph.co/u/itsmomota", "", ""],
[0, "Lutfor Rahman", "Scanfl", "https://toph.co/u/Scanfl", "", ""],
[0, "Most Aysha Akter Borsha", "Smart_coder",
"https://toph.co/u/Smart_coder", "", ""]
]
| """
Data list contains all users info. Each user's info must be a list.
First Element: 0 (int)
Second Element: name (str)
Third Element: username (str)
Fourth Element: toph link (str)
Fifth Element: dimik link (str)
Sixth Element: uri link (str)
Note: If any user does not have an account leave there an empty string.
"""
data = [[0, 'Mahinul Islam', 'mahin', '', '', 'https://urionlinejudge.com.br/judge/en/profile/239509'], [0, 'Majedul Islam', 'majed', '', '', 'https://urionlinejudge.com.br/judge/en/profile/229317'], [0, 'Md. Mushfiqur Rahman', 'mdvirus', 'https://toph.co/u/mdvirus', 'https://dimikoj.com/users/53/mdvirus', 'https://urionlinejudge.com.br/judge/en/profile/223624'], [0, 'Md. Shazzad Hossein Shakib', 'HackersBoss', 'https://toph.co/u/HackersBoss', '', ''], [0, 'Abdullah Al Mukit', 'newbie_mukit', 'https://toph.co/u/newbie_mukit', '', 'https://urionlinejudge.com.br/judge/en/profile/228785'], [0, 'Md. Toukir Ahammed', 'toukir48bit', 'https://toph.co/u/toukir48bit', '', ''], [0, 'Md. Sifat Al Imtiaz', 'SifatTheCoder', 'https://toph.co/u/SifatTheCoder', '', ''], [0, 'Mojahidul Islam Rakib', 'HelloRakib', 'https://toph.co/u/HelloRakib', '', ''], [0, 'Md. Forhad Islam', 'fiveG_coder', 'https://toph.co/u/fiveG_coder', '', ''], [0, 'Most Rumana Akter Rupa', 'programmer_upa', 'https://toph.co/u/programmer_upa', '', ''], [0, 'Most Keya Akter', 'Uniqe_coder', 'https://toph.co/u/Uniqe_coder', '', ''], [0, 'Most Nargiz Akter', 'Simple_coder', 'https://toph.co/u/Simple_coder', '', ''], [0, 'Most Masuda Akter Momota', 'itsmomota', 'https://toph.co/u/itsmomota', '', ''], [0, 'Lutfor Rahman', 'Scanfl', 'https://toph.co/u/Scanfl', '', ''], [0, 'Most Aysha Akter Borsha', 'Smart_coder', 'https://toph.co/u/Smart_coder', '', '']] |
students = []
references = []
benefits = []
MODE_SPECIFIC = '1. SPECIFIC'
MODE_HOSTEL = '2. HOSTEL'
MODE_MCDM = '3. MCDM'
MODE_REMAIN = '4. REMAIN'
| students = []
references = []
benefits = []
mode_specific = '1. SPECIFIC'
mode_hostel = '2. HOSTEL'
mode_mcdm = '3. MCDM'
mode_remain = '4. REMAIN' |
secret_password = "marty"
def apasswordcheker(password_checkers):
if password == "marty":
print("You figured out the secret password")
def password_check(passwd):
SpecialSym =['$', '@', '#', '%']
val = True
if len(passwd) < 6:
print('length should be at least 6')
val = False
if len(passwd) > 20:
print('length should be not be greater than 8')
val = False
if not any(char.isdigit() for char in passwd):
print('Password should have at least one numeral')
val = False
if not any(char.isupper() for char in passwd):
print('Password should have at least one uppercase letter')
val = False
if not any(char.islower() for char in passwd):
print('Password should have at least one lowercase letter')
val = False
if not any(char in SpecialSym for char in passwd):
print('Password should have at least one of the symbols $@#')
val = False
if val:
return val
def password_check(passwd):
SpecialSym =['$', '@', '#', '%']
val = True
if len(passwd) < 6:
print('length should be at least 6')
val = False
if len(passwd) > 20:
print('length should be not be greater than 8')
val = False
if not any(char.isdigit() for char in passwd):
print('Password should have at least one numeral')
val = False
if not any(char.isupper() for char in passwd):
print('Password should have at least one uppercase letter')
val = False
if not any(char.islower() for char in passwd):
print('Password should have at least one lowercase letter')
val = False
if not any(char in SpecialSym for char in passwd):
print('Password should have at least one of the symbols $@#')
val = False
if val:
return val
def password_chek(passwd):
SpecialSym =['$', '@', '#', '%']
val = True
if len(passwd) < 6:
print('length should be at least 6')
val = False
if len(passwd) > 20:
print('length should be not be greater than 8')
val = False
if not any(char.isdigit() for char in passwd):
print('Password should have at least one numeral')
val = False
if not any(char.isupper() for char in passwd):
print('Password should have at least one uppercase letter')
val = False
if not any(char.islower() for char in passwd):
print('Password should have at least one lowercase letter')
val = False
if not any(char in SpecialSym for char in passwd):
print('Password should have at least one of the symbols $@#')
val = False
if val:
return val
tannen = "jigowatt"
check = "FALSE"
while check == "FALSE":
user_password = input("Hi Mr Tannen, What is your password (lowercase only) ? ")
if user_password == tannen:
check = "TRUE"
print("Hello Detective Tannen, the last file you accessed is: topsecret.txt")
elif user_password == "marty":
print("Please dont look at the code to figure out the password ")
else:
print("That is incorrect, please try again")
def passord_check(passwd):
SpecialSym =['$', '@', '#', '%']
val = True
if len(passwd) < 6:
print('length should be at least 6')
val = False
if len(passwd) > 20:
print('length should be not be greater than 8')
val = False
if not any(char.isdigit() for char in passwd):
print('Password should have at least one numeral')
val = False
if not any(char.isupper() for char in passwd):
print('Password should have at least one uppercase letter')
val = False
if not any(char.islower() for char in passwd):
print('Password should have at least one lowercase letter')
val = False
if not any(char in SpecialSym for char in passwd):
print('Password should have at least one of the symbols $@#')
val = False
if val:
return val | secret_password = 'marty'
def apasswordcheker(password_checkers):
if password == 'marty':
print('You figured out the secret password')
def password_check(passwd):
special_sym = ['$', '@', '#', '%']
val = True
if len(passwd) < 6:
print('length should be at least 6')
val = False
if len(passwd) > 20:
print('length should be not be greater than 8')
val = False
if not any((char.isdigit() for char in passwd)):
print('Password should have at least one numeral')
val = False
if not any((char.isupper() for char in passwd)):
print('Password should have at least one uppercase letter')
val = False
if not any((char.islower() for char in passwd)):
print('Password should have at least one lowercase letter')
val = False
if not any((char in SpecialSym for char in passwd)):
print('Password should have at least one of the symbols $@#')
val = False
if val:
return val
def password_check(passwd):
special_sym = ['$', '@', '#', '%']
val = True
if len(passwd) < 6:
print('length should be at least 6')
val = False
if len(passwd) > 20:
print('length should be not be greater than 8')
val = False
if not any((char.isdigit() for char in passwd)):
print('Password should have at least one numeral')
val = False
if not any((char.isupper() for char in passwd)):
print('Password should have at least one uppercase letter')
val = False
if not any((char.islower() for char in passwd)):
print('Password should have at least one lowercase letter')
val = False
if not any((char in SpecialSym for char in passwd)):
print('Password should have at least one of the symbols $@#')
val = False
if val:
return val
def password_chek(passwd):
special_sym = ['$', '@', '#', '%']
val = True
if len(passwd) < 6:
print('length should be at least 6')
val = False
if len(passwd) > 20:
print('length should be not be greater than 8')
val = False
if not any((char.isdigit() for char in passwd)):
print('Password should have at least one numeral')
val = False
if not any((char.isupper() for char in passwd)):
print('Password should have at least one uppercase letter')
val = False
if not any((char.islower() for char in passwd)):
print('Password should have at least one lowercase letter')
val = False
if not any((char in SpecialSym for char in passwd)):
print('Password should have at least one of the symbols $@#')
val = False
if val:
return val
tannen = 'jigowatt'
check = 'FALSE'
while check == 'FALSE':
user_password = input('Hi Mr Tannen, What is your password (lowercase only) ? ')
if user_password == tannen:
check = 'TRUE'
print('Hello Detective Tannen, the last file you accessed is: topsecret.txt')
elif user_password == 'marty':
print('Please dont look at the code to figure out the password ')
else:
print('That is incorrect, please try again')
def passord_check(passwd):
special_sym = ['$', '@', '#', '%']
val = True
if len(passwd) < 6:
print('length should be at least 6')
val = False
if len(passwd) > 20:
print('length should be not be greater than 8')
val = False
if not any((char.isdigit() for char in passwd)):
print('Password should have at least one numeral')
val = False
if not any((char.isupper() for char in passwd)):
print('Password should have at least one uppercase letter')
val = False
if not any((char.islower() for char in passwd)):
print('Password should have at least one lowercase letter')
val = False
if not any((char in SpecialSym for char in passwd)):
print('Password should have at least one of the symbols $@#')
val = False
if val:
return val |
def levenshtein_dis(wordA, wordB):
wordA = wordA.lower() # making the wordA lower case
wordB = wordB.lower() # making the wordB lower case
# get the length of the words and defining the variables
length_A = len(wordA)
length_B = len(wordB)
max_len = 0
diff = 0
distances = []
distance = 0
# check the difference of the word to decide how many letter should be delete or add
# also store that value in the 'diff' variable and get the max length of the user given words
if length_A > length_B:
diff = length_A - length_B
max_len = length_A
elif length_A < length_B:
diff = length_B - length_A
max_len = length_B
else:
diff = 0
max_len = length_A
# starting from the front of the words and compare the letters of the both user given words
for x in range(max_len - diff):
if wordA[x] != wordB[x]:
distance += 1
# add the 'distance' value to the 'distances' array
distances.append(distance)
distance = 0
# starting from the back of the words and compare the letters of the both user given words
for x in range(max_len - diff):
if wordA[-(x + 1)] != wordB[-(x + 1)]:
distance += 1
# add the 'distance' value to the 'distances' array
distances.append(distance)
# get the minimun value of the 'distances' array and add it with the 'diff' values and
# store them in the 'diff' variable
diff = diff + min(distances)
# return the value
return diff
| def levenshtein_dis(wordA, wordB):
word_a = wordA.lower()
word_b = wordB.lower()
length_a = len(wordA)
length_b = len(wordB)
max_len = 0
diff = 0
distances = []
distance = 0
if length_A > length_B:
diff = length_A - length_B
max_len = length_A
elif length_A < length_B:
diff = length_B - length_A
max_len = length_B
else:
diff = 0
max_len = length_A
for x in range(max_len - diff):
if wordA[x] != wordB[x]:
distance += 1
distances.append(distance)
distance = 0
for x in range(max_len - diff):
if wordA[-(x + 1)] != wordB[-(x + 1)]:
distance += 1
distances.append(distance)
diff = diff + min(distances)
return diff |
#
# PySNMP MIB module SHIVA-ETHER-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SHIVA-ETHER-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:54:57 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")
ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint")
tEther, = mibBuilder.importSymbols("SHIVA-MIB", "tEther")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Unsigned32, TimeTicks, ObjectIdentity, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, NotificationType, Integer32, IpAddress, Counter64, Bits, Counter32, ModuleIdentity, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "TimeTicks", "ObjectIdentity", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "NotificationType", "Integer32", "IpAddress", "Counter64", "Bits", "Counter32", "ModuleIdentity", "MibIdentifier")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
tEtherTable = MibTable((1, 3, 6, 1, 4, 1, 166, 4, 5, 1), )
if mibBuilder.loadTexts: tEtherTable.setStatus('mandatory')
pysmiFakeCol1000 = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1) + (1000, ), Integer32())
tEtherEntry = MibTableRow((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1), ).setIndexNames((0, "SHIVA-ETHER-MIB", "pysmiFakeCol1000"))
if mibBuilder.loadTexts: tEtherEntry.setStatus('mandatory')
etherCRCErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherCRCErrors.setStatus('mandatory')
etherAlignErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherAlignErrors.setStatus('mandatory')
etherResourceErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherResourceErrors.setStatus('mandatory')
etherOverrunErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherOverrunErrors.setStatus('mandatory')
etherInPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherInPackets.setStatus('mandatory')
etherOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherOutPackets.setStatus('mandatory')
etherBadTransmits = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherBadTransmits.setStatus('mandatory')
etherOversizeFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherOversizeFrames.setStatus('mandatory')
etherSpurRUReadys = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherSpurRUReadys.setStatus('mandatory')
etherSpurCUActives = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherSpurCUActives.setStatus('mandatory')
etherSpurUnknowns = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherSpurUnknowns.setStatus('mandatory')
etherBcastDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherBcastDrops.setStatus('mandatory')
etherReceiverRestarts = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherReceiverRestarts.setStatus('mandatory')
etherReinterrupts = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherReinterrupts.setStatus('mandatory')
etherBufferReroutes = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherBufferReroutes.setStatus('mandatory')
etherBufferDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherBufferDrops.setStatus('mandatory')
etherCollisions = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherCollisions.setStatus('mandatory')
etherDefers = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherDefers.setStatus('mandatory')
etherDMAUnderruns = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherDMAUnderruns.setStatus('mandatory')
etherMaxCollisions = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherMaxCollisions.setStatus('mandatory')
etherNoCarriers = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 21), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherNoCarriers.setStatus('mandatory')
etherNoCTSs = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherNoCTSs.setStatus('mandatory')
etherNoSQEs = MibTableColumn((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etherNoSQEs.setStatus('mandatory')
mibBuilder.exportSymbols("SHIVA-ETHER-MIB", etherOutPackets=etherOutPackets, etherBufferDrops=etherBufferDrops, etherBadTransmits=etherBadTransmits, etherDefers=etherDefers, etherBcastDrops=etherBcastDrops, tEtherTable=tEtherTable, etherOverrunErrors=etherOverrunErrors, etherAlignErrors=etherAlignErrors, etherDMAUnderruns=etherDMAUnderruns, etherSpurCUActives=etherSpurCUActives, etherNoCarriers=etherNoCarriers, etherMaxCollisions=etherMaxCollisions, etherNoCTSs=etherNoCTSs, etherBufferReroutes=etherBufferReroutes, etherCollisions=etherCollisions, etherReinterrupts=etherReinterrupts, tEtherEntry=tEtherEntry, etherSpurUnknowns=etherSpurUnknowns, etherNoSQEs=etherNoSQEs, etherSpurRUReadys=etherSpurRUReadys, etherInPackets=etherInPackets, etherOversizeFrames=etherOversizeFrames, pysmiFakeCol1000=pysmiFakeCol1000, etherReceiverRestarts=etherReceiverRestarts, etherResourceErrors=etherResourceErrors, etherCRCErrors=etherCRCErrors)
| (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, constraints_intersection, value_size_constraint, single_value_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint')
(t_ether,) = mibBuilder.importSymbols('SHIVA-MIB', 'tEther')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(unsigned32, time_ticks, object_identity, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32, notification_type, integer32, ip_address, counter64, bits, counter32, module_identity, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'TimeTicks', 'ObjectIdentity', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32', 'NotificationType', 'Integer32', 'IpAddress', 'Counter64', 'Bits', 'Counter32', 'ModuleIdentity', 'MibIdentifier')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
t_ether_table = mib_table((1, 3, 6, 1, 4, 1, 166, 4, 5, 1))
if mibBuilder.loadTexts:
tEtherTable.setStatus('mandatory')
pysmi_fake_col1000 = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1) + (1000,), integer32())
t_ether_entry = mib_table_row((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1)).setIndexNames((0, 'SHIVA-ETHER-MIB', 'pysmiFakeCol1000'))
if mibBuilder.loadTexts:
tEtherEntry.setStatus('mandatory')
ether_crc_errors = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherCRCErrors.setStatus('mandatory')
ether_align_errors = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherAlignErrors.setStatus('mandatory')
ether_resource_errors = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherResourceErrors.setStatus('mandatory')
ether_overrun_errors = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherOverrunErrors.setStatus('mandatory')
ether_in_packets = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherInPackets.setStatus('mandatory')
ether_out_packets = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherOutPackets.setStatus('mandatory')
ether_bad_transmits = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherBadTransmits.setStatus('mandatory')
ether_oversize_frames = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherOversizeFrames.setStatus('mandatory')
ether_spur_ru_readys = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherSpurRUReadys.setStatus('mandatory')
ether_spur_cu_actives = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherSpurCUActives.setStatus('mandatory')
ether_spur_unknowns = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherSpurUnknowns.setStatus('mandatory')
ether_bcast_drops = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherBcastDrops.setStatus('mandatory')
ether_receiver_restarts = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherReceiverRestarts.setStatus('mandatory')
ether_reinterrupts = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherReinterrupts.setStatus('mandatory')
ether_buffer_reroutes = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherBufferReroutes.setStatus('mandatory')
ether_buffer_drops = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherBufferDrops.setStatus('mandatory')
ether_collisions = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherCollisions.setStatus('mandatory')
ether_defers = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 18), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherDefers.setStatus('mandatory')
ether_dma_underruns = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 19), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherDMAUnderruns.setStatus('mandatory')
ether_max_collisions = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 20), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherMaxCollisions.setStatus('mandatory')
ether_no_carriers = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 21), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherNoCarriers.setStatus('mandatory')
ether_no_ct_ss = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherNoCTSs.setStatus('mandatory')
ether_no_sq_es = mib_table_column((1, 3, 6, 1, 4, 1, 166, 4, 5, 1, 1, 23), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etherNoSQEs.setStatus('mandatory')
mibBuilder.exportSymbols('SHIVA-ETHER-MIB', etherOutPackets=etherOutPackets, etherBufferDrops=etherBufferDrops, etherBadTransmits=etherBadTransmits, etherDefers=etherDefers, etherBcastDrops=etherBcastDrops, tEtherTable=tEtherTable, etherOverrunErrors=etherOverrunErrors, etherAlignErrors=etherAlignErrors, etherDMAUnderruns=etherDMAUnderruns, etherSpurCUActives=etherSpurCUActives, etherNoCarriers=etherNoCarriers, etherMaxCollisions=etherMaxCollisions, etherNoCTSs=etherNoCTSs, etherBufferReroutes=etherBufferReroutes, etherCollisions=etherCollisions, etherReinterrupts=etherReinterrupts, tEtherEntry=tEtherEntry, etherSpurUnknowns=etherSpurUnknowns, etherNoSQEs=etherNoSQEs, etherSpurRUReadys=etherSpurRUReadys, etherInPackets=etherInPackets, etherOversizeFrames=etherOversizeFrames, pysmiFakeCol1000=pysmiFakeCol1000, etherReceiverRestarts=etherReceiverRestarts, etherResourceErrors=etherResourceErrors, etherCRCErrors=etherCRCErrors) |
def set_search_path(sender, **kwargs):
conn = kwargs.get('connection')
if conn is not None:
cursor = conn.cursor()
cursor.execute("SET search_path=saleor")
| def set_search_path(sender, **kwargs):
conn = kwargs.get('connection')
if conn is not None:
cursor = conn.cursor()
cursor.execute('SET search_path=saleor') |
def debug_report_progress(repo_ctx, msg):
if repo_ctx.attr.debug:
print(msg)
repo_ctx.report_progress(msg)
for i in range(25000000):
x = 1
| def debug_report_progress(repo_ctx, msg):
if repo_ctx.attr.debug:
print(msg)
repo_ctx.report_progress(msg)
for i in range(25000000):
x = 1 |
def respond(code=200, payload={}, messages=[]):
return {
'status': 'ok' if int(code/100) == 2 else 'error',
'code': code,
'messages': messages,
'payload': payload,
}, code
| def respond(code=200, payload={}, messages=[]):
return ({'status': 'ok' if int(code / 100) == 2 else 'error', 'code': code, 'messages': messages, 'payload': payload}, code) |
# finding least positive number
# Given an array of integers, find the first missing positive integer in linear time and constant space. In other words,
# find the lowest positive integer that does not exist in the array. The array can contain duplicates and negative numbers as well.
# code contributed by devanshi katyal
# space complexity:O(1)
# time complexity:O(n)
def MainFunction(arr, size):
for i in range(size):
if (abs(arr[i]) - 1 < size and arr[abs(arr[i]) - 1] > 0):
arr[abs(arr[i]) - 1] = -arr[abs(arr[i]) - 1]
for i in range(size):
if (arr[i] > 0):
return i + 1
return size + 1
def findpositive(arr, size):
j= 0
for i in range(size):
if (arr[i] <= 0):
arr[i], arr[j] = arr[j], arr[i]
j += 1
return MainFunction(arr[j:], size - j)
arr = list(map(int, input().split(" ")))
print("the smallest missing number", findpositive(arr, len(arr)))
| def main_function(arr, size):
for i in range(size):
if abs(arr[i]) - 1 < size and arr[abs(arr[i]) - 1] > 0:
arr[abs(arr[i]) - 1] = -arr[abs(arr[i]) - 1]
for i in range(size):
if arr[i] > 0:
return i + 1
return size + 1
def findpositive(arr, size):
j = 0
for i in range(size):
if arr[i] <= 0:
(arr[i], arr[j]) = (arr[j], arr[i])
j += 1
return main_function(arr[j:], size - j)
arr = list(map(int, input().split(' ')))
print('the smallest missing number', findpositive(arr, len(arr))) |
def login_required(func):
def not_logged_in(self, **kwargs):
self.send_login_required({'signin_required': 'you need to sign in'})
return
def check_user(self, **kwargs):
user = self.connection.user
if not user:
return not_logged_in(self, **kwargs)
return func(self, **kwargs)
return check_user
class RoutePermission(object):
def test_permission(self, handler, verb, **kwargs):
raise NotImplementedError("You need to implement test_permission")
def permission_failed(self, handler):
raise NotImplementedError("You need to implement permission_failed")
class LoginRequired(RoutePermission):
def __init__(self, verbs=None):
self.test_against_verbs = verbs
def test_permission(self, handler, verb, **kwargs):
if not self.test_against_verbs:
return handler.connection.user is not None
if self.test_against_verbs:
if verb not in self.test_against_verbs:
return True
user = handler.connection.user
return user is not None
def permission_failed(self, handler):
handler.send_login_required()
| def login_required(func):
def not_logged_in(self, **kwargs):
self.send_login_required({'signin_required': 'you need to sign in'})
return
def check_user(self, **kwargs):
user = self.connection.user
if not user:
return not_logged_in(self, **kwargs)
return func(self, **kwargs)
return check_user
class Routepermission(object):
def test_permission(self, handler, verb, **kwargs):
raise not_implemented_error('You need to implement test_permission')
def permission_failed(self, handler):
raise not_implemented_error('You need to implement permission_failed')
class Loginrequired(RoutePermission):
def __init__(self, verbs=None):
self.test_against_verbs = verbs
def test_permission(self, handler, verb, **kwargs):
if not self.test_against_verbs:
return handler.connection.user is not None
if self.test_against_verbs:
if verb not in self.test_against_verbs:
return True
user = handler.connection.user
return user is not None
def permission_failed(self, handler):
handler.send_login_required() |
# C.O.R.S.
cors_origins = [
"http://localhost",
"http://localhost:8080",
"http://localhost:3000",
# Production Client on Vercel
"https://twitter-clone.programmertutor.com",
"https://www.twitter-clone.programmertutor.com",
"https://twitter.dericfagnan.com",
"https://www.twitter.dericfagnan.com",
# Websocket Origins
"ws://localhost",
"wss://localhost",
"ws://localhost:8080",
"wss://localhost:8080",
"ws://twitter-clone.programmertutor.com",
"ws://www.twitter-clone.programmertutor.com",
"wss://twitter-clone.programmertutor.com",
"wss://www.twitter-clone.programmertutor.com",
"ws://twitter.dericfagnan.com",
"ws://www.twitter.dericfagnan.com",
"wss://twitter.dericfagnan.com",
"wss://www.twitter.dericfagnan.com",
]
| cors_origins = ['http://localhost', 'http://localhost:8080', 'http://localhost:3000', 'https://twitter-clone.programmertutor.com', 'https://www.twitter-clone.programmertutor.com', 'https://twitter.dericfagnan.com', 'https://www.twitter.dericfagnan.com', 'ws://localhost', 'wss://localhost', 'ws://localhost:8080', 'wss://localhost:8080', 'ws://twitter-clone.programmertutor.com', 'ws://www.twitter-clone.programmertutor.com', 'wss://twitter-clone.programmertutor.com', 'wss://www.twitter-clone.programmertutor.com', 'ws://twitter.dericfagnan.com', 'ws://www.twitter.dericfagnan.com', 'wss://twitter.dericfagnan.com', 'wss://www.twitter.dericfagnan.com'] |
class Job:
def __init__(self, title, link, date, job_id):
'''
This class holds job information and attributes
'''
self.title = title
self.link = link
self.date = date
self.job_id = job_id
self.applied = False
self.old = False
self.new = True
self.desc = ''
| class Job:
def __init__(self, title, link, date, job_id):
"""
This class holds job information and attributes
"""
self.title = title
self.link = link
self.date = date
self.job_id = job_id
self.applied = False
self.old = False
self.new = True
self.desc = '' |
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "f9af1484",
"metadata": {},
"outputs": [],
"source": [
"# ---------------------- STEP 2: Climate APP\n",
"\n",
"from flask import Flask, json, jsonify\n",
"import datetime as dt\n",
"\n",
"import sqlalchemy\n",
"from sqlalchemy.ext.automap import automap_base\n",
"from sqlalchemy.orm import Session\n",
"from sqlalchemy import create_engine, func\n",
"from sqlalchemy import inspect\n",
"\n",
"engine = create_engine(\"sqlite:///./Resources/hawaii.sqlite\", connect_args={'check_same_thread': False})\n",
"# reflect an existing database into a new model\n",
"Base = automap_base()\n",
"# reflect the tables\n",
"Base.prepare(engine, reflect=True)\n",
"\n",
"# Save references to each table\n",
"Measurement = Base.classes.measurement\n",
"Station = Base.classes.station\n",
"session = Session(engine)\n",
"\n",
"app = Flask(__name__) # the name of the file & the object (double usage)\n",
"\n",
"# List all routes that are available.\n",
"@app.route(\"/\")\n",
"def home():\n",
" print(\"In & Out of Home section.\")\n",
" return (\n",
" f\"Welcome to the Climate API!<br/>\"\n",
" f\"Available Routes:<br/>\"\n",
" f\"/api/v1.0/precipitation<br/>\"\n",
" f\"/api/v1.0/stations<br/>\"\n",
" f\"/api/v1.0/tobs<br/>\"\n",
" f\"/api/v1.0/2016-01-01/<br/>\"\n",
" f\"/api/v1.0/2016-01-01/2016-12-31/\"\n",
" )\n",
"\n",
"# Return the JSON representation of your dictionary\n",
"@app.route('/api/v1.0/precipitation/')\n",
"def precipitation():\n",
" print(\"In Precipitation section.\")\n",
" \n",
" last_date = session.query(Measurement.date).order_by(Measurement.date.desc()).first().date\n",
" last_year = dt.datetime.strptime(last_date, '%Y-%m-%d') - dt.timedelta(days=365)\n",
"\n",
" rain_results = session.query(Measurement.date, Measurement.prcp).\\\n",
" filter(Measurement.date >= last_year).\\\n",
" order_by(Measurement.date).all()\n",
"\n",
" p_dict = dict(rain_results)\n",
" print(f\"Results for Precipitation - {p_dict}\")\n",
" print(\"Out of Precipitation section.\")\n",
" return jsonify(p_dict) \n",
"\n",
"# Return a JSON-list of stations from the dataset.\n",
"@app.route('/api/v1.0/stations/')\n",
"def stations():\n",
" print(\"In station section.\")\n",
" \n",
" station_list = session.query(Station.station)\\\n",
" .order_by(Station.station).all() \n",
" print()\n",
" print(\"Station List:\") \n",
" for row in station_list:\n",
" print (row[0])\n",
" print(\"Out of Station section.\")\n",
" return jsonify(station_list)\n",
"\n",
"# Return a JSON-list of Temperature Observations from the dataset.\n",
"@app.route('/api/v1.0/tobs/')\n",
"def tobs():\n",
" print(\"In TOBS section.\")\n",
" \n",
" last_date = session.query(Measurement.date).order_by(Measurement.date.desc()).first().date\n",
" last_year = dt.datetime.strptime(last_date, '%Y-%m-%d') - dt.timedelta(days=365)\n",
"\n",
" temp_obs = session.query(Measurement.date, Measurement.tobs)\\\n",
" .filter(Measurement.date >= last_year)\\\n",
" .order_by(Measurement.date).all()\n",
" print()\n",
" print(\"Temperature Results for All Stations\")\n",
" print(temp_obs)\n",
" print(\"Out of TOBS section.\")\n",
" return jsonify(temp_obs)\n",
"\n",
"# Return a JSON list of the minimum temperature, the average temperature, and the max temperature for a given start date\n",
"@app.route('/api/v1.0/<start_date>/')\n",
"def calc_temps_start(start_date):\n",
" print(\"In start date section.\")\n",
" print(start_date)\n",
" \n",
" select = [func.min(Measurement.tobs), func.avg(Measurement.tobs), func.max(Measurement.tobs)]\n",
" result_temp = session.query(*select).\\\n",
" filter(Measurement.date >= start_date).all()\n",
" print()\n",
" print(f\"Calculated temp for start date {start_date}\")\n",
" print(result_temp)\n",
" print(\"Out of start date section.\")\n",
" return jsonify(result_temp)\n",
"\n",
"# Return a JSON list of the minimum temperature, the average temperature, and the max temperature for a given start-end range.\n",
"@app.route('/api/v1.0/<start_date>/<end_date>/')\n",
"def calc_temps_start_end(start_date, end_date):\n",
" print(\"In start & end date section.\")\n",
" \n",
" select = [func.min(Measurement.tobs), func.avg(Measurement.tobs), func.max(Measurement.tobs)]\n",
" result_temp = session.query(*select).\\\n",
" filter(Measurement.date >= start_date).filter(Measurement.date <= end_date).all()\n",
" print()\n",
" print(f\"Calculated temp for start date {start_date} & end date {end_date}\")\n",
" print(result_temp)\n",
" print(\"Out of start & end date section.\")\n",
" return jsonify(result_temp)\n",
"\n",
"if __name__ == \"__main__\":\n",
" app.run(debug=True)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
| {'cells': [{'cell_type': 'code', 'execution_count': null, 'id': 'f9af1484', 'metadata': {}, 'outputs': [], 'source': ['# ---------------------- STEP 2: Climate APP\n', '\n', 'from flask import Flask, json, jsonify\n', 'import datetime as dt\n', '\n', 'import sqlalchemy\n', 'from sqlalchemy.ext.automap import automap_base\n', 'from sqlalchemy.orm import Session\n', 'from sqlalchemy import create_engine, func\n', 'from sqlalchemy import inspect\n', '\n', 'engine = create_engine("sqlite:///./Resources/hawaii.sqlite", connect_args={\'check_same_thread\': False})\n', '# reflect an existing database into a new model\n', 'Base = automap_base()\n', '# reflect the tables\n', 'Base.prepare(engine, reflect=True)\n', '\n', '# Save references to each table\n', 'Measurement = Base.classes.measurement\n', 'Station = Base.classes.station\n', 'session = Session(engine)\n', '\n', 'app = Flask(__name__) # the name of the file & the object (double usage)\n', '\n', '# List all routes that are available.\n', '@app.route("/")\n', 'def home():\n', ' print("In & Out of Home section.")\n', ' return (\n', ' f"Welcome to the Climate API!<br/>"\n', ' f"Available Routes:<br/>"\n', ' f"/api/v1.0/precipitation<br/>"\n', ' f"/api/v1.0/stations<br/>"\n', ' f"/api/v1.0/tobs<br/>"\n', ' f"/api/v1.0/2016-01-01/<br/>"\n', ' f"/api/v1.0/2016-01-01/2016-12-31/"\n', ' )\n', '\n', '# Return the JSON representation of your dictionary\n', "@app.route('/api/v1.0/precipitation/')\n", 'def precipitation():\n', ' print("In Precipitation section.")\n', ' \n', ' last_date = session.query(Measurement.date).order_by(Measurement.date.desc()).first().date\n', " last_year = dt.datetime.strptime(last_date, '%Y-%m-%d') - dt.timedelta(days=365)\n", '\n', ' rain_results = session.query(Measurement.date, Measurement.prcp).\\\n', ' filter(Measurement.date >= last_year).\\\n', ' order_by(Measurement.date).all()\n', '\n', ' p_dict = dict(rain_results)\n', ' print(f"Results for Precipitation - {p_dict}")\n', ' print("Out of Precipitation section.")\n', ' return jsonify(p_dict) \n', '\n', '# Return a JSON-list of stations from the dataset.\n', "@app.route('/api/v1.0/stations/')\n", 'def stations():\n', ' print("In station section.")\n', ' \n', ' station_list = session.query(Station.station)\\\n', ' .order_by(Station.station).all() \n', ' print()\n', ' print("Station List:") \n', ' for row in station_list:\n', ' print (row[0])\n', ' print("Out of Station section.")\n', ' return jsonify(station_list)\n', '\n', '# Return a JSON-list of Temperature Observations from the dataset.\n', "@app.route('/api/v1.0/tobs/')\n", 'def tobs():\n', ' print("In TOBS section.")\n', ' \n', ' last_date = session.query(Measurement.date).order_by(Measurement.date.desc()).first().date\n', " last_year = dt.datetime.strptime(last_date, '%Y-%m-%d') - dt.timedelta(days=365)\n", '\n', ' temp_obs = session.query(Measurement.date, Measurement.tobs)\\\n', ' .filter(Measurement.date >= last_year)\\\n', ' .order_by(Measurement.date).all()\n', ' print()\n', ' print("Temperature Results for All Stations")\n', ' print(temp_obs)\n', ' print("Out of TOBS section.")\n', ' return jsonify(temp_obs)\n', '\n', '# Return a JSON list of the minimum temperature, the average temperature, and the max temperature for a given start date\n', "@app.route('/api/v1.0/<start_date>/')\n", 'def calc_temps_start(start_date):\n', ' print("In start date section.")\n', ' print(start_date)\n', ' \n', ' select = [func.min(Measurement.tobs), func.avg(Measurement.tobs), func.max(Measurement.tobs)]\n', ' result_temp = session.query(*select).\\\n', ' filter(Measurement.date >= start_date).all()\n', ' print()\n', ' print(f"Calculated temp for start date {start_date}")\n', ' print(result_temp)\n', ' print("Out of start date section.")\n', ' return jsonify(result_temp)\n', '\n', '# Return a JSON list of the minimum temperature, the average temperature, and the max temperature for a given start-end range.\n', "@app.route('/api/v1.0/<start_date>/<end_date>/')\n", 'def calc_temps_start_end(start_date, end_date):\n', ' print("In start & end date section.")\n', ' \n', ' select = [func.min(Measurement.tobs), func.avg(Measurement.tobs), func.max(Measurement.tobs)]\n', ' result_temp = session.query(*select).\\\n', ' filter(Measurement.date >= start_date).filter(Measurement.date <= end_date).all()\n', ' print()\n', ' print(f"Calculated temp for start date {start_date} & end date {end_date}")\n', ' print(result_temp)\n', ' print("Out of start & end date section.")\n', ' return jsonify(result_temp)\n', '\n', 'if __name__ == "__main__":\n', ' app.run(debug=True)']}], 'metadata': {'kernelspec': {'display_name': 'Python 3', 'language': 'python', 'name': 'python3'}, 'language_info': {'codemirror_mode': {'name': 'ipython', 'version': 3}, 'file_extension': '.py', 'mimetype': 'text/x-python', 'name': 'python', 'nbconvert_exporter': 'python', 'pygments_lexer': 'ipython3', 'version': '3.8.8'}}, 'nbformat': 4, 'nbformat_minor': 5} |
# Add your import statements here
# Add any utility functions here
def rel_docs(query_id,qrels):
j=[item['id'] for item in qrels if item['query_num']==str(query_id)]
return j
def rel_score_as_dict_for_query(query_id,qrels):
docs_score_dict={int(item['id']):int(item['position']) for item in qrels if int(item['query_num'])==int(query_id)}
return docs_score_dict
def rel_score_for_query(query_id,qrels):
score=[int(item['position']) for item in qrels if int(item['query_num'])==int(query_id)]
i_d=[int(item['id']) for item in qrels if int(item['query_num'])==int(query_id)]
score_id=list(map(lambda x,y: [x,y],score,i_d))
return score_id
| def rel_docs(query_id, qrels):
j = [item['id'] for item in qrels if item['query_num'] == str(query_id)]
return j
def rel_score_as_dict_for_query(query_id, qrels):
docs_score_dict = {int(item['id']): int(item['position']) for item in qrels if int(item['query_num']) == int(query_id)}
return docs_score_dict
def rel_score_for_query(query_id, qrels):
score = [int(item['position']) for item in qrels if int(item['query_num']) == int(query_id)]
i_d = [int(item['id']) for item in qrels if int(item['query_num']) == int(query_id)]
score_id = list(map(lambda x, y: [x, y], score, i_d))
return score_id |
class MockData:
def __init__(self):
self.data = [
'ATGCAT',
'ATGGGT',
'ATGAAT',
]
def get_row(self, i):
return self.sequences[i] | class Mockdata:
def __init__(self):
self.data = ['ATGCAT', 'ATGGGT', 'ATGAAT']
def get_row(self, i):
return self.sequences[i] |
#
# PySNMP MIB module ONEACCESS-DOT11-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ONEACCESS-DOT11-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:25:00 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
oacRequirements, oacMIBModules, oacExpIMDot11 = mibBuilder.importSymbols("ONEACCESS-GLOBAL-REG", "oacRequirements", "oacMIBModules", "oacExpIMDot11")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, iso, Counter32, Gauge32, MibIdentifier, Unsigned32, Counter64, Integer32, NotificationType, TimeTicks, ObjectIdentity, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "iso", "Counter32", "Gauge32", "MibIdentifier", "Unsigned32", "Counter64", "Integer32", "NotificationType", "TimeTicks", "ObjectIdentity", "Bits")
DisplayString, TextualConvention, MacAddress = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "MacAddress")
oacDot11MIBModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 13191, 1, 100, 900))
oacDot11MIBModule.setRevisions(('2011-10-27 00:00', '2010-07-08 00:01',))
if mibBuilder.loadTexts: oacDot11MIBModule.setLastUpdated('201110270000Z')
if mibBuilder.loadTexts: oacDot11MIBModule.setOrganization(' OneAccess ')
class InterfaceType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("mainInterface", 1), ("subInterface", 2))
oacExpIMDot11Objects = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1))
oacExpIMDot11InterfaceTable = MibTable((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1, 1), )
if mibBuilder.loadTexts: oacExpIMDot11InterfaceTable.setStatus('current')
oacExpIMDot11InterfaceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: oacExpIMDot11InterfaceEntry.setStatus('current')
oacExpIMDot11EntryType = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1, 1, 1, 1), InterfaceType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: oacExpIMDot11EntryType.setStatus('current')
oacExpIMDot11MACAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1, 1, 1, 2), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: oacExpIMDot11MACAddress.setStatus('current')
oacExpIMDot11SSID = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1, 1, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: oacExpIMDot11SSID.setStatus('current')
oacExpIMDot11AssociatedStations = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1, 1, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: oacExpIMDot11AssociatedStations.setStatus('current')
oacExpIMDot11Conformance = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 5, 900))
oacExpIMDot11Groups = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 5, 900, 1))
oacExpIMDot11Compliances = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 5, 900, 2))
oacExpIMDot11Compliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 13191, 5, 900, 2, 1)).setObjects(("ONEACCESS-DOT11-MIB", "oacExpIMDot11GeneralGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
oacExpIMDot11Compliance = oacExpIMDot11Compliance.setStatus('current')
oacExpIMDot11GeneralGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 13191, 5, 900, 1, 1)).setObjects(("ONEACCESS-DOT11-MIB", "oacExpIMDot11EntryType"), ("ONEACCESS-DOT11-MIB", "oacExpIMDot11MACAddress"), ("ONEACCESS-DOT11-MIB", "oacExpIMDot11SSID"), ("ONEACCESS-DOT11-MIB", "oacExpIMDot11AssociatedStations"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
oacExpIMDot11GeneralGroup = oacExpIMDot11GeneralGroup.setStatus('current')
mibBuilder.exportSymbols("ONEACCESS-DOT11-MIB", PYSNMP_MODULE_ID=oacDot11MIBModule, InterfaceType=InterfaceType, oacExpIMDot11SSID=oacExpIMDot11SSID, oacExpIMDot11Conformance=oacExpIMDot11Conformance, oacExpIMDot11MACAddress=oacExpIMDot11MACAddress, oacExpIMDot11InterfaceTable=oacExpIMDot11InterfaceTable, oacExpIMDot11Groups=oacExpIMDot11Groups, oacDot11MIBModule=oacDot11MIBModule, oacExpIMDot11AssociatedStations=oacExpIMDot11AssociatedStations, oacExpIMDot11EntryType=oacExpIMDot11EntryType, oacExpIMDot11Compliance=oacExpIMDot11Compliance, oacExpIMDot11Objects=oacExpIMDot11Objects, oacExpIMDot11InterfaceEntry=oacExpIMDot11InterfaceEntry, oacExpIMDot11Compliances=oacExpIMDot11Compliances, oacExpIMDot11GeneralGroup=oacExpIMDot11GeneralGroup)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_intersection, constraints_union, value_size_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(oac_requirements, oac_mib_modules, oac_exp_im_dot11) = mibBuilder.importSymbols('ONEACCESS-GLOBAL-REG', 'oacRequirements', 'oacMIBModules', 'oacExpIMDot11')
(object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance')
(module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, iso, counter32, gauge32, mib_identifier, unsigned32, counter64, integer32, notification_type, time_ticks, object_identity, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'iso', 'Counter32', 'Gauge32', 'MibIdentifier', 'Unsigned32', 'Counter64', 'Integer32', 'NotificationType', 'TimeTicks', 'ObjectIdentity', 'Bits')
(display_string, textual_convention, mac_address) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'MacAddress')
oac_dot11_mib_module = module_identity((1, 3, 6, 1, 4, 1, 13191, 1, 100, 900))
oacDot11MIBModule.setRevisions(('2011-10-27 00:00', '2010-07-08 00:01'))
if mibBuilder.loadTexts:
oacDot11MIBModule.setLastUpdated('201110270000Z')
if mibBuilder.loadTexts:
oacDot11MIBModule.setOrganization(' OneAccess ')
class Interfacetype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('mainInterface', 1), ('subInterface', 2))
oac_exp_im_dot11_objects = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1))
oac_exp_im_dot11_interface_table = mib_table((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1, 1))
if mibBuilder.loadTexts:
oacExpIMDot11InterfaceTable.setStatus('current')
oac_exp_im_dot11_interface_entry = mib_table_row((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
oacExpIMDot11InterfaceEntry.setStatus('current')
oac_exp_im_dot11_entry_type = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1, 1, 1, 1), interface_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
oacExpIMDot11EntryType.setStatus('current')
oac_exp_im_dot11_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1, 1, 1, 2), mac_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
oacExpIMDot11MACAddress.setStatus('current')
oac_exp_im_dot11_ssid = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1, 1, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
oacExpIMDot11SSID.setStatus('current')
oac_exp_im_dot11_associated_stations = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 8, 1, 1, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
oacExpIMDot11AssociatedStations.setStatus('current')
oac_exp_im_dot11_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 5, 900))
oac_exp_im_dot11_groups = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 5, 900, 1))
oac_exp_im_dot11_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 5, 900, 2))
oac_exp_im_dot11_compliance = module_compliance((1, 3, 6, 1, 4, 1, 13191, 5, 900, 2, 1)).setObjects(('ONEACCESS-DOT11-MIB', 'oacExpIMDot11GeneralGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
oac_exp_im_dot11_compliance = oacExpIMDot11Compliance.setStatus('current')
oac_exp_im_dot11_general_group = object_group((1, 3, 6, 1, 4, 1, 13191, 5, 900, 1, 1)).setObjects(('ONEACCESS-DOT11-MIB', 'oacExpIMDot11EntryType'), ('ONEACCESS-DOT11-MIB', 'oacExpIMDot11MACAddress'), ('ONEACCESS-DOT11-MIB', 'oacExpIMDot11SSID'), ('ONEACCESS-DOT11-MIB', 'oacExpIMDot11AssociatedStations'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
oac_exp_im_dot11_general_group = oacExpIMDot11GeneralGroup.setStatus('current')
mibBuilder.exportSymbols('ONEACCESS-DOT11-MIB', PYSNMP_MODULE_ID=oacDot11MIBModule, InterfaceType=InterfaceType, oacExpIMDot11SSID=oacExpIMDot11SSID, oacExpIMDot11Conformance=oacExpIMDot11Conformance, oacExpIMDot11MACAddress=oacExpIMDot11MACAddress, oacExpIMDot11InterfaceTable=oacExpIMDot11InterfaceTable, oacExpIMDot11Groups=oacExpIMDot11Groups, oacDot11MIBModule=oacDot11MIBModule, oacExpIMDot11AssociatedStations=oacExpIMDot11AssociatedStations, oacExpIMDot11EntryType=oacExpIMDot11EntryType, oacExpIMDot11Compliance=oacExpIMDot11Compliance, oacExpIMDot11Objects=oacExpIMDot11Objects, oacExpIMDot11InterfaceEntry=oacExpIMDot11InterfaceEntry, oacExpIMDot11Compliances=oacExpIMDot11Compliances, oacExpIMDot11GeneralGroup=oacExpIMDot11GeneralGroup) |
class Decipher:
def __init__(self, data='', password=''):
self.data = data
self.password = password
self.result = False
def decipher_password(self):
# For authentication(Deciphering your password)..
helper = self.data.split('*/*/')
count, separator, compare, helper_list = 1, '', '', []
for i in helper[0]:
if i == '%':
helper_list.append(int(separator) - count)
count += 1
separator = ''
continue
separator += i
for i in helper_list:
compare += chr(i)
if compare == self.password:
self.result = True
return self.result, helper
def decipher_message(self, helper):
# Deciphering your message
helper_list = []
helper_msg = helper[1].split('@*@')
message = str(helper_msg[0])
size = int(helper_msg[1])
separator, deciphered = '', ''
for i in message:
if i == '@':
helper_list.append(int(separator) - size)
size -= 1
separator = ''
continue
separator += i
for i in helper_list:
deciphered += chr(i)
return deciphered
if __name__ == '__main__':
pass
| class Decipher:
def __init__(self, data='', password=''):
self.data = data
self.password = password
self.result = False
def decipher_password(self):
helper = self.data.split('*/*/')
(count, separator, compare, helper_list) = (1, '', '', [])
for i in helper[0]:
if i == '%':
helper_list.append(int(separator) - count)
count += 1
separator = ''
continue
separator += i
for i in helper_list:
compare += chr(i)
if compare == self.password:
self.result = True
return (self.result, helper)
def decipher_message(self, helper):
helper_list = []
helper_msg = helper[1].split('@*@')
message = str(helper_msg[0])
size = int(helper_msg[1])
(separator, deciphered) = ('', '')
for i in message:
if i == '@':
helper_list.append(int(separator) - size)
size -= 1
separator = ''
continue
separator += i
for i in helper_list:
deciphered += chr(i)
return deciphered
if __name__ == '__main__':
pass |
class Error(Exception):
pass
class ResourceNotFoundError(Error):
pass
class ResourceAlreadyExistsError(Error):
pass
class DatabaseCommitFailedError(Error):
pass
| class Error(Exception):
pass
class Resourcenotfounderror(Error):
pass
class Resourcealreadyexistserror(Error):
pass
class Databasecommitfailederror(Error):
pass |
N = int(input())
t = N % 360
if t == 90 or t == 270:
print('Yes')
else:
print('No')
| n = int(input())
t = N % 360
if t == 90 or t == 270:
print('Yes')
else:
print('No') |
#!/usr/bin/python3
# Demo of a dictionary comprehension
d={i:chr(i) for i in range(ord('a'),ord('z')+1)}
for k,v in d.items():
print(k,':',v)
| d = {i: chr(i) for i in range(ord('a'), ord('z') + 1)}
for (k, v) in d.items():
print(k, ':', v) |
#!/usr/bin/python3
class GuiService():
def readSettingsFile(self,wert):
settingsFile = open("Settings","r")
file = settingsFile.read()
fileList = file.split("\n")
for element in fileList:
if wert in element:
x = element.split(":")
return x[1]
def getPort(self):
self.port = self.readSettingsFile("Port")
return self.port
def getBaudRate(self):
self.baudRate = self.readSettingsFile("Baud")
return self.baudRate
def getIsTrigger(self):
if self.readSettingsFile("Trigger") == "True":
self.isTrigger = True
else:
self.isTrigger = False
return self.isTrigger
def getDesiredDistance(self):
self.desieredDistance = float(self.readSettingsFile("Desiered Distance"))
return self.desieredDistance
def getAcceptableDeviation(self):
self.acceptableDeviation = float(self.readSettingsFile("Acceptable Deviation"))
return self.acceptableDeviation
def getRunsPerSecond(self):
self.runsPerSecond = float(self.readSettingsFile("Runs per Second"))
return self.runsPerSecond
def getSmoothMode(self):
if int(self.readSettingsFile("SecList"))==1:
self.Smoothmode = "secList"
elif int(self.readSettingsFile("Gprmc"))==1:
self.Smoothmode = "GPRMC"
elif int(self.readSettingsFile("Simple"))==1:
self.Smoothmode = "simple"
return self.Smoothmode
def getLogFile(self):
if int(self.readSettingsFile("Gprmc"))==1:
self.logFile = "$GPRMC.log"
else:
self.logFile = "$GPGGA.log"
return self.logFile
def getListDimensions(self):
self.listDimensions = [float(self.readSettingsFile("Length of rawlist")),float(self.readSettingsFile("Length of smoothlist"))]
return self.listDimensions
def __init__(self):
self.port = ""
self.baudRate = 0
self.isTrigger = False
self.desieredDistance = 1.5
self.acceptableDeviation = 1.0
self.runsPerSecond = 50.0
self.Smoothmode = "secList"
self.logFile = "$GPGGA.log"
self.listDimensions = [20,2]
| class Guiservice:
def read_settings_file(self, wert):
settings_file = open('Settings', 'r')
file = settingsFile.read()
file_list = file.split('\n')
for element in fileList:
if wert in element:
x = element.split(':')
return x[1]
def get_port(self):
self.port = self.readSettingsFile('Port')
return self.port
def get_baud_rate(self):
self.baudRate = self.readSettingsFile('Baud')
return self.baudRate
def get_is_trigger(self):
if self.readSettingsFile('Trigger') == 'True':
self.isTrigger = True
else:
self.isTrigger = False
return self.isTrigger
def get_desired_distance(self):
self.desieredDistance = float(self.readSettingsFile('Desiered Distance'))
return self.desieredDistance
def get_acceptable_deviation(self):
self.acceptableDeviation = float(self.readSettingsFile('Acceptable Deviation'))
return self.acceptableDeviation
def get_runs_per_second(self):
self.runsPerSecond = float(self.readSettingsFile('Runs per Second'))
return self.runsPerSecond
def get_smooth_mode(self):
if int(self.readSettingsFile('SecList')) == 1:
self.Smoothmode = 'secList'
elif int(self.readSettingsFile('Gprmc')) == 1:
self.Smoothmode = 'GPRMC'
elif int(self.readSettingsFile('Simple')) == 1:
self.Smoothmode = 'simple'
return self.Smoothmode
def get_log_file(self):
if int(self.readSettingsFile('Gprmc')) == 1:
self.logFile = '$GPRMC.log'
else:
self.logFile = '$GPGGA.log'
return self.logFile
def get_list_dimensions(self):
self.listDimensions = [float(self.readSettingsFile('Length of rawlist')), float(self.readSettingsFile('Length of smoothlist'))]
return self.listDimensions
def __init__(self):
self.port = ''
self.baudRate = 0
self.isTrigger = False
self.desieredDistance = 1.5
self.acceptableDeviation = 1.0
self.runsPerSecond = 50.0
self.Smoothmode = 'secList'
self.logFile = '$GPGGA.log'
self.listDimensions = [20, 2] |
n = int(input("Enter a number you want to check:"))
def digisum(n):
return sum([int(s) for s in str(n)])
def getfactors(n):
k=2
result=[]
while k ** 2 <= n:
while n%k==0:
result.append(k)
n = n // k
k = k +1
if n > 1:
result.append(n)
return result
if digisum(n)==sum([digisum(i) for i in getfactors(n)]):
print('It is a smith number')
else:
print('It is not a smith number')
| n = int(input('Enter a number you want to check:'))
def digisum(n):
return sum([int(s) for s in str(n)])
def getfactors(n):
k = 2
result = []
while k ** 2 <= n:
while n % k == 0:
result.append(k)
n = n // k
k = k + 1
if n > 1:
result.append(n)
return result
if digisum(n) == sum([digisum(i) for i in getfactors(n)]):
print('It is a smith number')
else:
print('It is not a smith number') |
def obok(n, kost):
szesc = [[[k * n**2 + j * n + i + 1 for i in range(n)] for j in range(n)] for k in range(n)]
p = 0
r = 0
m = 0
for a in range(n):
for b in range(n):
for c in range(n):
if szesc[a][b][c] == kost:
p=a
r=b
m=c
#print(szesc[p][r][m])
ret = []
for indexy in [
[p + 1, r, m], [p - 1, r, m],
[p, r + 1, m], [p, r - 1, m],
[p, r, m + 1], [p, r, m - 1]
]:
if indexy[0] not in range(n) or indexy[1] not in range(n) or indexy[2] not in range(n):
continue
ret.append(szesc[indexy[0]][indexy[1]][indexy[2]])
ret.sort()
return ret
| def obok(n, kost):
szesc = [[[k * n ** 2 + j * n + i + 1 for i in range(n)] for j in range(n)] for k in range(n)]
p = 0
r = 0
m = 0
for a in range(n):
for b in range(n):
for c in range(n):
if szesc[a][b][c] == kost:
p = a
r = b
m = c
ret = []
for indexy in [[p + 1, r, m], [p - 1, r, m], [p, r + 1, m], [p, r - 1, m], [p, r, m + 1], [p, r, m - 1]]:
if indexy[0] not in range(n) or indexy[1] not in range(n) or indexy[2] not in range(n):
continue
ret.append(szesc[indexy[0]][indexy[1]][indexy[2]])
ret.sort()
return ret |
class OrderNotFound(Exception):
def __init__(self, message='Order tidak ditemukan!'):
self.message = message
super().__init__(self.message)
pass
| class Ordernotfound(Exception):
def __init__(self, message='Order tidak ditemukan!'):
self.message = message
super().__init__(self.message)
pass |
class Solution:
def addDigits(self, num: int) -> int:
while num > 9:
num = sum(int(ch) for ch in str(num))
return num
| class Solution:
def add_digits(self, num: int) -> int:
while num > 9:
num = sum((int(ch) for ch in str(num)))
return num |
value = ''
for i in range(1, 10001):
value = value + str(i) + ' '
value = value.replace('0', ' ')
values = value.split(' ')
total = 0;
for num in values:
if num.lstrip().rstrip().strip() == '':
continue
total += int(num)
print ('Total: ' + str(total))
| value = ''
for i in range(1, 10001):
value = value + str(i) + ' '
value = value.replace('0', ' ')
values = value.split(' ')
total = 0
for num in values:
if num.lstrip().rstrip().strip() == '':
continue
total += int(num)
print('Total: ' + str(total)) |
class Stack:
def __init__(self):
self.data = []
def pop(self):
if self.is_empty():
return None
val = self.data[len(self.data)-1]
self.data = self.data[:len(self.data)-1]
return val
def peek(self):
if self.is_empty():
return None
return self.data[len(self.data)-1]
def push(self, val):
self.data.append(val)
def is_empty(self):
return len(self.data) == 0
class Queue:
def __init__(self):
self.in_stack = Stack()
self.out_stack = Stack()
def enqueue(self, val):
self.in_stack.push(val)
def dequeue(self):
if self.out_stack.is_empty():
if self.in_stack.is_empty():
return None
while self.in_stack.is_empty() == False:
self.out_stack.push(self.in_stack.pop())
return self.out_stack.pop()
def peek(self):
if self.out_stack.is_empty():
if self.in_stack.is_empty():
return None
while self.in_stack.is_empty() == False:
self.out_stack.push(self.in_stack.pop())
return self.out_stack.peek()
def is_empty(self):
return self.in_stack.is_empty() and self.out_stack.is_empty
def print_queue(q):
s = "["
for i in range(0, len(q.out_stack.data)):
s += str(q.out_stack.data[i])
if i < len(q.out_stack.data)-1:
s += ", "
for i in range(0, len(q.in_stack.data)):
s += str(q.in_stack.data[i])
if i < len(q.in_stack.data)-1:
s += ", "
s += "]"
print(s)
queue = Queue()
queue.enqueue(1)
queue.enqueue(2)
queue.enqueue(3)
# should print [1, 2, 3]
print_queue(queue)
v = queue.dequeue()
# should print [2, 3]
print_queue(queue)
v = queue.dequeue()
# should print [3]
print_queue(queue)
queue.enqueue(4)
queue.enqueue(5)
queue.enqueue(6)
v = queue.dequeue()
# should print [4, 5, 6]
print_queue(queue)
v = queue.dequeue()
v = queue.dequeue()
v = queue.dequeue()
print_queue(queue)
v = queue.dequeue()
print_queue(queue) | class Stack:
def __init__(self):
self.data = []
def pop(self):
if self.is_empty():
return None
val = self.data[len(self.data) - 1]
self.data = self.data[:len(self.data) - 1]
return val
def peek(self):
if self.is_empty():
return None
return self.data[len(self.data) - 1]
def push(self, val):
self.data.append(val)
def is_empty(self):
return len(self.data) == 0
class Queue:
def __init__(self):
self.in_stack = stack()
self.out_stack = stack()
def enqueue(self, val):
self.in_stack.push(val)
def dequeue(self):
if self.out_stack.is_empty():
if self.in_stack.is_empty():
return None
while self.in_stack.is_empty() == False:
self.out_stack.push(self.in_stack.pop())
return self.out_stack.pop()
def peek(self):
if self.out_stack.is_empty():
if self.in_stack.is_empty():
return None
while self.in_stack.is_empty() == False:
self.out_stack.push(self.in_stack.pop())
return self.out_stack.peek()
def is_empty(self):
return self.in_stack.is_empty() and self.out_stack.is_empty
def print_queue(q):
s = '['
for i in range(0, len(q.out_stack.data)):
s += str(q.out_stack.data[i])
if i < len(q.out_stack.data) - 1:
s += ', '
for i in range(0, len(q.in_stack.data)):
s += str(q.in_stack.data[i])
if i < len(q.in_stack.data) - 1:
s += ', '
s += ']'
print(s)
queue = queue()
queue.enqueue(1)
queue.enqueue(2)
queue.enqueue(3)
print_queue(queue)
v = queue.dequeue()
print_queue(queue)
v = queue.dequeue()
print_queue(queue)
queue.enqueue(4)
queue.enqueue(5)
queue.enqueue(6)
v = queue.dequeue()
print_queue(queue)
v = queue.dequeue()
v = queue.dequeue()
v = queue.dequeue()
print_queue(queue)
v = queue.dequeue()
print_queue(queue) |
class Solution:
def shortestWordDistance(self, words, word1, word2):
i1 = i2 = -1
res, same = float("inf"), word1 == word2
for i, w in enumerate(words):
if w == word1:
if same: i2 = i1
i1 = i
if i2 >= 0: res = min(res, i1 - i2)
elif w == word2:
i2 = i
if i1 >= 0: res = min(res, i2 - i1)
return res | class Solution:
def shortest_word_distance(self, words, word1, word2):
i1 = i2 = -1
(res, same) = (float('inf'), word1 == word2)
for (i, w) in enumerate(words):
if w == word1:
if same:
i2 = i1
i1 = i
if i2 >= 0:
res = min(res, i1 - i2)
elif w == word2:
i2 = i
if i1 >= 0:
res = min(res, i2 - i1)
return res |
if __name__ == '__main__':
n = int(input())
arr = map(int, input().split(' '))
arr = sorted(list(arr))
arr.reverse()
biggest = arr[0]
for i in arr:
if i != biggest:
print(i)
break
| if __name__ == '__main__':
n = int(input())
arr = map(int, input().split(' '))
arr = sorted(list(arr))
arr.reverse()
biggest = arr[0]
for i in arr:
if i != biggest:
print(i)
break |
class Test():
pass
test = Test()
print(test.__new__)
| class Test:
pass
test = test()
print(test.__new__) |
i = input('carteira em reais: ')
d = float(i)/3.27
print('carteira em dollar: ',d) | i = input('carteira em reais: ')
d = float(i) / 3.27
print('carteira em dollar: ', d) |
class News:
'''
news class to define news Objects
'''
def __init__(self, id, name, description, url, category, language, country):
self.id =id
self.name = name
self.description= description
self.url =url
self.category=category
self.language = language
self.country = country | class News:
"""
news class to define news Objects
"""
def __init__(self, id, name, description, url, category, language, country):
self.id = id
self.name = name
self.description = description
self.url = url
self.category = category
self.language = language
self.country = country |
class Solution:
# 1st solution, TLE
def shortestPath(self, grid: List[List[int]], k: int) -> int:
ans = [float("inf")]
self.bfs(grid, 0, 0, 0, k, ans)
return ans[0] if ans[0] != float("inf") else -1
def bfs(self, grid, i, j, steps, k, ans):
if k < 0:
return
m = len(grid)
n = len(grid[0])
if ans[0] == m + n - 2:
return
if i < 0 or i > m - 1 or j < 0 or j > n - 1 or grid[i][j] == "#":
return
if (i, j) == (m - 1, n - 1):
ans[0] = min(ans[0], steps)
return
for x, y in [(1, 0), (0, 1), (-1, 0), (0, -1)]:
tmp = grid[i][j]
grid[i][j] = "#"
self.bfs(grid, i + x, j + y, steps + 1, k - tmp, ans)
grid[i][j] = tmp
# 2nd solution
# O(m * n * k) time | O(m * n * k) space
def shortestPath(self, grid: List[List[int]], k: int) -> int:
m, n = len(grid), len(grid[0])
stack, visited = deque([(0, 0, 0, k)]), set()
if k >= m + n - 2:
return m + n - 2
while stack:
steps, i, j, k = stack.popleft()
if (i, j) == (m-1, n-1): return steps
for x, y in [(0, -1), (0, 1), (-1, 0), (1, 0)]:
row, col = i + x, j + y
if 0 <= row < m and 0 <= col < n and k - grid[row][col] >= 0:
new = (row, col, k - grid[row][col])
if new not in visited:
visited.add(new)
stack.append((steps + 1,) + new)
return -1 | class Solution:
def shortest_path(self, grid: List[List[int]], k: int) -> int:
ans = [float('inf')]
self.bfs(grid, 0, 0, 0, k, ans)
return ans[0] if ans[0] != float('inf') else -1
def bfs(self, grid, i, j, steps, k, ans):
if k < 0:
return
m = len(grid)
n = len(grid[0])
if ans[0] == m + n - 2:
return
if i < 0 or i > m - 1 or j < 0 or (j > n - 1) or (grid[i][j] == '#'):
return
if (i, j) == (m - 1, n - 1):
ans[0] = min(ans[0], steps)
return
for (x, y) in [(1, 0), (0, 1), (-1, 0), (0, -1)]:
tmp = grid[i][j]
grid[i][j] = '#'
self.bfs(grid, i + x, j + y, steps + 1, k - tmp, ans)
grid[i][j] = tmp
def shortest_path(self, grid: List[List[int]], k: int) -> int:
(m, n) = (len(grid), len(grid[0]))
(stack, visited) = (deque([(0, 0, 0, k)]), set())
if k >= m + n - 2:
return m + n - 2
while stack:
(steps, i, j, k) = stack.popleft()
if (i, j) == (m - 1, n - 1):
return steps
for (x, y) in [(0, -1), (0, 1), (-1, 0), (1, 0)]:
(row, col) = (i + x, j + y)
if 0 <= row < m and 0 <= col < n and (k - grid[row][col] >= 0):
new = (row, col, k - grid[row][col])
if new not in visited:
visited.add(new)
stack.append((steps + 1,) + new)
return -1 |
class Solution:
def customSortString(self, S: str, T: str) -> str:
char_map = {}
for el in S:
char_map[el] = 0
for el in T:
if el in char_map:
char_map[el] = char_map[el] + 1
else:
char_map[el] = 1
output_str = ""
for el in char_map.keys():
num = char_map[el]
for i in range(0, num):
output_str += el
return output_str
if __name__ == '__main__':
S = "cba"
T = "abcd"
solution = Solution()
result = solution.customSortString(S, T)
print(result)
| class Solution:
def custom_sort_string(self, S: str, T: str) -> str:
char_map = {}
for el in S:
char_map[el] = 0
for el in T:
if el in char_map:
char_map[el] = char_map[el] + 1
else:
char_map[el] = 1
output_str = ''
for el in char_map.keys():
num = char_map[el]
for i in range(0, num):
output_str += el
return output_str
if __name__ == '__main__':
s = 'cba'
t = 'abcd'
solution = solution()
result = solution.customSortString(S, T)
print(result) |
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def taskflow_repository():
maybe(
http_archive,
name = "taskflow",
urls = [
"https://github.com/taskflow/taskflow/archive/refs/tags/v3.2.0.zip",
],
sha256 = "dec011fcd9d73ae4bd8ae4d2714c2c108a013d5f27761d77aa33ea28f516ac8a",
strip_prefix = "taskflow-3.2.0/",
build_file = "@third_party//taskflow:package.BUILD",
)
| load('@bazel_tools//tools/build_defs/repo:utils.bzl', 'maybe')
load('@bazel_tools//tools/build_defs/repo:http.bzl', 'http_archive')
def taskflow_repository():
maybe(http_archive, name='taskflow', urls=['https://github.com/taskflow/taskflow/archive/refs/tags/v3.2.0.zip'], sha256='dec011fcd9d73ae4bd8ae4d2714c2c108a013d5f27761d77aa33ea28f516ac8a', strip_prefix='taskflow-3.2.0/', build_file='@third_party//taskflow:package.BUILD') |
line = input()
abbr = line[0]
for i in range(len(line)):
if line[i] == "-":
abbr += line[i+1]
print(abbr)
| line = input()
abbr = line[0]
for i in range(len(line)):
if line[i] == '-':
abbr += line[i + 1]
print(abbr) |
class BinaryTree:
def __init__(self, value):
self.value = value
self.left = None
self.right = None
def nodeDepths(root, depth=0):
if root is None:
return 0
return (depth + nodeDepths(root.left, depth + 1)
+ nodeDepths(root.right, depth + 1))
| class Binarytree:
def __init__(self, value):
self.value = value
self.left = None
self.right = None
def node_depths(root, depth=0):
if root is None:
return 0
return depth + node_depths(root.left, depth + 1) + node_depths(root.right, depth + 1) |
def sqrt(x):
y = 1.0
while abs(y*y - x) > 1e-6 :
print(y)
y=(y+x/y)/2
return y
if __name__=='__main__':
print(sqrt(99))
| def sqrt(x):
y = 1.0
while abs(y * y - x) > 1e-06:
print(y)
y = (y + x / y) / 2
return y
if __name__ == '__main__':
print(sqrt(99)) |
a1 = str(input('Digite o nome completo de uma pessoa : '))
a3 = a1.strip().lower().find('silva')
if a3 < 0:
print('O nome {} nao possui a palavra Silva'.format(a1))
else:
print('O nome {} possui a palavra Silva'.format(a1))
# ou
nom = str(input('digite o nome : ')).strip()
print('seu nome tem silva? {}'.format('silva' in nom.lower()))
| a1 = str(input('Digite o nome completo de uma pessoa : '))
a3 = a1.strip().lower().find('silva')
if a3 < 0:
print('O nome {} nao possui a palavra Silva'.format(a1))
else:
print('O nome {} possui a palavra Silva'.format(a1))
nom = str(input('digite o nome : ')).strip()
print('seu nome tem silva? {}'.format('silva' in nom.lower())) |
#===============================================
#RESOLUTION KEYWORDS
#===============================================
oref = 0 #over refine factor - should typically be set to 0
n_ref = 32 #when n_particles > n_ref, octree refines further
zoom_box_len = 100 #kpc; so the box will be +/- zoom_box_len from the center
bbox_lim = 1.e5 #kpc - this is the initial bounding box of the grid (+/- bbox_lim)
#This *must* encompass all of the particles in the
#simulation.
#===============================================
#PARALLELIZATION
#===============================================
n_processes = 16 #number of pool processes to run
n_MPI_processes = 1 #number oF MPI processes to run
#===============================================
#RT INFORMATION
#===============================================
n_photons_initial = 1.e5
n_photons_imaging = 1.e5
n_photons_raytracing_sources = 1.e5
n_photons_raytracing_dust = 1.e5
FORCE_RANDOM_SEED = False
seed = -12345 #has to be an int, and negative.
#===============================================
#DUST INFORMATION
#===============================================
dustdir = '/home/desika.narayanan/hyperion-dust-0.1.0/dust_files/' #location of your dust files
dustfile = 'd03_3.1_6.0_A.hdf5'
PAH = True
dust_grid_type = 'dtm' #needs to be in ['dtm','rr','manual','li_bestfit']
dusttometals_ratio = 0.4
enforce_energy_range = False #False is the default; ensures energy conservation
SUBLIMATION = False #do we automatically kill dust grains above the
#sublimation temperature; right now is set to fast
#mode
SUBLIMATION_TEMPERATURE = 1600. #K -- meaningliess if SUBLIMATION == False
#===============================================
#STELLAR SEDS INFO
#===============================================
FORCE_BINNING = True #force SED binning
imf_type = 2 #FSPS imf types; 0 = salpeter, 1 = chabrier; 2 = kroupa; 3 and 4 (vandokkum/dave) not currently supported
pagb = 0 #weight given to post agb stars# 1 is the default
add_neb_emission = False #add nebular line emission from Cloudy Lookup tables (dev. by Nell Byler)
gas_logu = -2 #gas ionization parameter for HII regions; only relevant
#if add_neb_emission = True default = -2
FORCE_gas_logz = False #if set, then we force the gas_logz of HII
#regions to be gas_logz (next parameter); else, it is taken to be the star particles metallicity. default is False
gas_logz = 0 #units of log(Z/Z_sun); metallicity of the HII region
#metallicity; only relevant if add_neb_emission = True;
#default is 0
add_agb_dust_model=False #add circumstellar AGB dust model (100%); Villaume, Conroy & Jonson 2015
CF_on = False #if set to true, then we enable the Charlot & Fall birthcloud models
birth_cloud_clearing_age = 0.01 #Gyr - stars with age <
#birth_cloud_clearing_age have
#charlot&fall birthclouds meaningless
#of CF_on == False
Z_init = 0 #force a metallicity increase in the newstar particles.
#This is useful for idealized galaxies. The units for this
#are absolute (so enter 0.02 for solar). Setting to 0
#means you use the stellar metallicities as they come in
#the simulation (more likely appropriate for cosmological
#runs)
#Idealized Galaxy SED Parameters
disk_stars_age = 8 #Gyr ;meaningless if this is a cosmological simulation; note, if this is <= 7, then these will live in birth clouds
bulge_stars_age = 8 #Gyr ; meaningless if this is a cosmological simulation; note, if this is <= 7, then these will live in birth clouds
disk_stars_metals = 19 #in fsps metallicity units
bulge_stars_metals = 19 #in fsps metallicity units
#bins for binning the stellar ages and metallicities for SED
#assignments in cases of many (where many ==
#>N_METALLICITY_BINS*N_STELLAR_AGE_BINS) stars; this is necessary for
#reduction of memory load; see manual for details.
N_STELLAR_AGE_BINS = 100
metallicity_legend= "/home/desika.narayanan/fsps/ISOCHRONES/Padova/Padova2007/zlegend.dat"
#===============================================
#BLACK HOLE STUFF
#===============================================
BH_SED = False
BH_eta = 0.1 #bhluminosity = BH_eta * mdot * c**2.
BH_model = "Nenkova"
BH_modelfile = "/home/desika.narayanan/powderday/agn_models/clumpy_models_201410_tvavg.hdf5"
# The Nenkova BH_modelfile can be downloaded here:
# https://www.clumpy.org/downloads/clumpy_models_201410_tvavg.hdf5
nenkova_params = [5,30,0,1.5,30,40] #Nenkova+ (2008) model parameters
#===============================================
#IMAGES AND SED
#===============================================
NTHETA = 1
NPHI = 1
SED = True
SED_MONOCHROMATIC = False
FIX_SED_MONOCHROMATIC_WAVELENGTHS = False #if set, then we only use
#nlam wavelengths in the
#range between min_lam and
#max_lam
SED_MONOCHROMATIC_min_lam = 0.3 #micron
SED_MONOCHROMATIC_max_lam = 0.4 #micron
SED_MONOCHROMATIC_nlam = 100
IMAGING = False
filterdir = '/home/desika.narayanan/powderday/filters/'
filterfiles = [
'arbitrary.filter',
# 'ACS_F475W.filter',
# 'ACS_F606W.filter',
# 'ACS_F814W.filter',
# 'B_subaru.filter',
]
# Insert additional filter files as above. In bash, the following command
# formats the filenames for easy copying/pasting.
# $ shopt -s globstar; printf "# '%s'\n" *.filter
npix_x = 128
npix_y = 128
#experimental and under development - not advised for use
IMAGING_TRANSMISSION_FILTER = False
filter_list = ['filters/irac_ch1.filter']
TRANSMISSION_FILTER_REDSHIFT = 0.001
#===============================================
#OTHER INFORMATION
#===============================================
solar = 0.013
PAH_frac = {'usg': 0.0586, 'vsg': 0.1351, 'big': 0.8063} # values will be normalized to 1
#===============================================
#DEBUGGING
#===============================================
SOURCES_IN_CENTER = False
STELLAR_SED_WRITE = True
SKIP_RT = False #skip radiative transfer (i.e. just read in the grids and maybe write some diagnostics)
SUPER_SIMPLE_SED = False #just generate 1 oct of 100 pc on a side,
#centered on [0,0,0]. sources are added at
#random positions.
SKIP_GRID_READIN = False
CONSTANT_DUST_GRID = False #if set, then we don't create a dust grid by
#smoothing, but rather just make it the same
#size as the octree with a constant value of
#4e-20
N_MASS_BINS = 1 #this is really just a place holder that exists in
#some loops to be able to insert some code downstream
#for spatially varying IMFs. right now for speed best
#to set to 1 as it doesn't actually do anything.
FORCE_STELLAR_AGES = False
FORCE_STELLAR_AGES_VALUE = 0.05# Gyr
FORCE_STELLAR_METALLICITIES = False
FORCE_STELLAR_METALLICITIES_VALUE = 0.012 #absolute values (so 0.013 ~ solar)
| oref = 0
n_ref = 32
zoom_box_len = 100
bbox_lim = 100000.0
n_processes = 16
n_mpi_processes = 1
n_photons_initial = 100000.0
n_photons_imaging = 100000.0
n_photons_raytracing_sources = 100000.0
n_photons_raytracing_dust = 100000.0
force_random_seed = False
seed = -12345
dustdir = '/home/desika.narayanan/hyperion-dust-0.1.0/dust_files/'
dustfile = 'd03_3.1_6.0_A.hdf5'
pah = True
dust_grid_type = 'dtm'
dusttometals_ratio = 0.4
enforce_energy_range = False
sublimation = False
sublimation_temperature = 1600.0
force_binning = True
imf_type = 2
pagb = 0
add_neb_emission = False
gas_logu = -2
force_gas_logz = False
gas_logz = 0
add_agb_dust_model = False
cf_on = False
birth_cloud_clearing_age = 0.01
z_init = 0
disk_stars_age = 8
bulge_stars_age = 8
disk_stars_metals = 19
bulge_stars_metals = 19
n_stellar_age_bins = 100
metallicity_legend = '/home/desika.narayanan/fsps/ISOCHRONES/Padova/Padova2007/zlegend.dat'
bh_sed = False
bh_eta = 0.1
bh_model = 'Nenkova'
bh_modelfile = '/home/desika.narayanan/powderday/agn_models/clumpy_models_201410_tvavg.hdf5'
nenkova_params = [5, 30, 0, 1.5, 30, 40]
ntheta = 1
nphi = 1
sed = True
sed_monochromatic = False
fix_sed_monochromatic_wavelengths = False
sed_monochromatic_min_lam = 0.3
sed_monochromatic_max_lam = 0.4
sed_monochromatic_nlam = 100
imaging = False
filterdir = '/home/desika.narayanan/powderday/filters/'
filterfiles = ['arbitrary.filter']
npix_x = 128
npix_y = 128
imaging_transmission_filter = False
filter_list = ['filters/irac_ch1.filter']
transmission_filter_redshift = 0.001
solar = 0.013
pah_frac = {'usg': 0.0586, 'vsg': 0.1351, 'big': 0.8063}
sources_in_center = False
stellar_sed_write = True
skip_rt = False
super_simple_sed = False
skip_grid_readin = False
constant_dust_grid = False
n_mass_bins = 1
force_stellar_ages = False
force_stellar_ages_value = 0.05
force_stellar_metallicities = False
force_stellar_metallicities_value = 0.012 |
#
# PySNMP MIB module CISCO-VLAN-BRIDGING-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-VLAN-BRIDGING-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:18:48 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
CiscoPortList, = mibBuilder.importSymbols("CISCO-TC", "CiscoPortList")
vtpVlanIndex, = mibBuilder.importSymbols("CISCO-VTP-MIB", "vtpVlanIndex")
ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup")
Gauge32, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, MibIdentifier, Integer32, Counter64, Counter32, ModuleIdentity, Unsigned32, ObjectIdentity, Bits, NotificationType, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "MibIdentifier", "Integer32", "Counter64", "Counter32", "ModuleIdentity", "Unsigned32", "ObjectIdentity", "Bits", "NotificationType", "iso")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
ciscoVlanBridgingMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 56))
ciscoVlanBridgingMIB.setRevisions(('2003-08-22 00:00', '1996-09-12 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ciscoVlanBridgingMIB.setRevisionsDescriptions(('Deprecate cvbStpForwardingMap and define cvbStpForwardingMap2k to support up to 2k bridge ports.', 'Initial version of this MIB module.',))
if mibBuilder.loadTexts: ciscoVlanBridgingMIB.setLastUpdated('200308220000Z')
if mibBuilder.loadTexts: ciscoVlanBridgingMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts: ciscoVlanBridgingMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-vlans@cisco.com cs-lan-switch-snmp')
if mibBuilder.loadTexts: ciscoVlanBridgingMIB.setDescription('A set of managed objects for optimizing access to bridging related data from RFC 1493. This MIB is modeled after portions of RFC 1493, adding VLAN ID based indexing and bitmapped encoding of frequently accessed data.')
ciscoVlanBridgingMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 56, 1))
cvbStp = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 56, 1, 1))
cvbStpTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 56, 1, 1, 1), )
if mibBuilder.loadTexts: cvbStpTable.setStatus('current')
if mibBuilder.loadTexts: cvbStpTable.setDescription('This table contains device STP status information for each VLAN.')
cvbStpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 56, 1, 1, 1, 1), ).setIndexNames((0, "CISCO-VTP-MIB", "vtpVlanIndex"))
if mibBuilder.loadTexts: cvbStpEntry.setStatus('current')
if mibBuilder.loadTexts: cvbStpEntry.setDescription('Device STP status for specified VLAN.')
cvbStpForwardingMap = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 56, 1, 1, 1, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvbStpForwardingMap.setStatus('deprecated')
if mibBuilder.loadTexts: cvbStpForwardingMap.setDescription('An indication of which ports are forwarding by spanning tree for the specified VLAN. The octet string contains one bit per port on the bridge for the specified VLAN. Each octet within the value of this object specifies a set of eight ports, with the first octet specifying ports 1 through 8, the second octet specifying ports 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered port, and the least significant bit represents the highest numbered port. The bit value interpretation is related to RFC 1493 dot1dStpPortState values is as follows: 1 = forwarding 0 = disabled, blocking, listening, learning, broken, or nonexistent')
cvbStpForwardingMap2k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 56, 1, 1, 1, 1, 3), CiscoPortList()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvbStpForwardingMap2k.setStatus('current')
if mibBuilder.loadTexts: cvbStpForwardingMap2k.setDescription('An indication of which ports are forwarding by spanning tree for the specified VLAN. The octet string contains one bit per port on the bridge for the specified VLAN. This object has STP status information of up to 2k ports with the port number from 1 to 2048. Each octet within the value of this object specifies a set of eight ports, with the first octet specifying ports 1 through 8, the second octet specifying ports 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered port, and the least significant bit represents the highest numbered port. The bit value interpretation is related to RFC 1493 dot1dStpPortState values is as follows: 1 = forwarding 0 = disabled, blocking, listening, learning, broken, or nonexistent.')
ciscoVlanBridgingMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 56, 3))
ciscoVlanBridgingMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 56, 3, 1))
ciscoVlanBridgingMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 56, 3, 2))
ciscoVlanBridgingMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 56, 3, 1, 1)).setObjects(("CISCO-VLAN-BRIDGING-MIB", "ciscoVlanBridgingMIBGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoVlanBridgingMIBCompliance = ciscoVlanBridgingMIBCompliance.setStatus('deprecated')
if mibBuilder.loadTexts: ciscoVlanBridgingMIBCompliance.setDescription('The compliance statement for entities which implement the Cisco VLAN Bridging MIB.')
ciscoVlanBridgingMIBCompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 56, 3, 1, 2)).setObjects(("CISCO-VLAN-BRIDGING-MIB", "ciscoVlanBridgingMIBGroup2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoVlanBridgingMIBCompliance2 = ciscoVlanBridgingMIBCompliance2.setStatus('current')
if mibBuilder.loadTexts: ciscoVlanBridgingMIBCompliance2.setDescription('The compliance statement for entities which implement the Cisco VLAN Bridging MIB.')
ciscoVlanBridgingMIBGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 56, 3, 2, 1)).setObjects(("CISCO-VLAN-BRIDGING-MIB", "cvbStpForwardingMap"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoVlanBridgingMIBGroup = ciscoVlanBridgingMIBGroup.setStatus('deprecated')
if mibBuilder.loadTexts: ciscoVlanBridgingMIBGroup.setDescription('A collection of objects providing the STP status information of up to 1k ports with the port number from 1 to 1024.')
ciscoVlanBridgingMIBGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 56, 3, 2, 2)).setObjects(("CISCO-VLAN-BRIDGING-MIB", "cvbStpForwardingMap2k"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoVlanBridgingMIBGroup2 = ciscoVlanBridgingMIBGroup2.setStatus('current')
if mibBuilder.loadTexts: ciscoVlanBridgingMIBGroup2.setDescription('A collection of objects providing the STP status information of up to 2k ports with the port number from 1 to 2048.')
mibBuilder.exportSymbols("CISCO-VLAN-BRIDGING-MIB", ciscoVlanBridgingMIB=ciscoVlanBridgingMIB, cvbStp=cvbStp, cvbStpTable=cvbStpTable, ciscoVlanBridgingMIBConformance=ciscoVlanBridgingMIBConformance, ciscoVlanBridgingMIBCompliance=ciscoVlanBridgingMIBCompliance, ciscoVlanBridgingMIBCompliance2=ciscoVlanBridgingMIBCompliance2, ciscoVlanBridgingMIBObjects=ciscoVlanBridgingMIBObjects, PYSNMP_MODULE_ID=ciscoVlanBridgingMIB, ciscoVlanBridgingMIBGroup2=ciscoVlanBridgingMIBGroup2, ciscoVlanBridgingMIBGroups=ciscoVlanBridgingMIBGroups, ciscoVlanBridgingMIBGroup=ciscoVlanBridgingMIBGroup, cvbStpForwardingMap=cvbStpForwardingMap, cvbStpEntry=cvbStpEntry, ciscoVlanBridgingMIBCompliances=ciscoVlanBridgingMIBCompliances, cvbStpForwardingMap2k=cvbStpForwardingMap2k)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_size_constraint, constraints_union, value_range_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(cisco_port_list,) = mibBuilder.importSymbols('CISCO-TC', 'CiscoPortList')
(vtp_vlan_index,) = mibBuilder.importSymbols('CISCO-VTP-MIB', 'vtpVlanIndex')
(module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup')
(gauge32, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, time_ticks, mib_identifier, integer32, counter64, counter32, module_identity, unsigned32, object_identity, bits, notification_type, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'TimeTicks', 'MibIdentifier', 'Integer32', 'Counter64', 'Counter32', 'ModuleIdentity', 'Unsigned32', 'ObjectIdentity', 'Bits', 'NotificationType', 'iso')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
cisco_vlan_bridging_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 56))
ciscoVlanBridgingMIB.setRevisions(('2003-08-22 00:00', '1996-09-12 00:00'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
ciscoVlanBridgingMIB.setRevisionsDescriptions(('Deprecate cvbStpForwardingMap and define cvbStpForwardingMap2k to support up to 2k bridge ports.', 'Initial version of this MIB module.'))
if mibBuilder.loadTexts:
ciscoVlanBridgingMIB.setLastUpdated('200308220000Z')
if mibBuilder.loadTexts:
ciscoVlanBridgingMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts:
ciscoVlanBridgingMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-vlans@cisco.com cs-lan-switch-snmp')
if mibBuilder.loadTexts:
ciscoVlanBridgingMIB.setDescription('A set of managed objects for optimizing access to bridging related data from RFC 1493. This MIB is modeled after portions of RFC 1493, adding VLAN ID based indexing and bitmapped encoding of frequently accessed data.')
cisco_vlan_bridging_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 56, 1))
cvb_stp = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 56, 1, 1))
cvb_stp_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 56, 1, 1, 1))
if mibBuilder.loadTexts:
cvbStpTable.setStatus('current')
if mibBuilder.loadTexts:
cvbStpTable.setDescription('This table contains device STP status information for each VLAN.')
cvb_stp_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 56, 1, 1, 1, 1)).setIndexNames((0, 'CISCO-VTP-MIB', 'vtpVlanIndex'))
if mibBuilder.loadTexts:
cvbStpEntry.setStatus('current')
if mibBuilder.loadTexts:
cvbStpEntry.setDescription('Device STP status for specified VLAN.')
cvb_stp_forwarding_map = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 56, 1, 1, 1, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvbStpForwardingMap.setStatus('deprecated')
if mibBuilder.loadTexts:
cvbStpForwardingMap.setDescription('An indication of which ports are forwarding by spanning tree for the specified VLAN. The octet string contains one bit per port on the bridge for the specified VLAN. Each octet within the value of this object specifies a set of eight ports, with the first octet specifying ports 1 through 8, the second octet specifying ports 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered port, and the least significant bit represents the highest numbered port. The bit value interpretation is related to RFC 1493 dot1dStpPortState values is as follows: 1 = forwarding 0 = disabled, blocking, listening, learning, broken, or nonexistent')
cvb_stp_forwarding_map2k = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 56, 1, 1, 1, 1, 3), cisco_port_list()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvbStpForwardingMap2k.setStatus('current')
if mibBuilder.loadTexts:
cvbStpForwardingMap2k.setDescription('An indication of which ports are forwarding by spanning tree for the specified VLAN. The octet string contains one bit per port on the bridge for the specified VLAN. This object has STP status information of up to 2k ports with the port number from 1 to 2048. Each octet within the value of this object specifies a set of eight ports, with the first octet specifying ports 1 through 8, the second octet specifying ports 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered port, and the least significant bit represents the highest numbered port. The bit value interpretation is related to RFC 1493 dot1dStpPortState values is as follows: 1 = forwarding 0 = disabled, blocking, listening, learning, broken, or nonexistent.')
cisco_vlan_bridging_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 56, 3))
cisco_vlan_bridging_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 56, 3, 1))
cisco_vlan_bridging_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 56, 3, 2))
cisco_vlan_bridging_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 56, 3, 1, 1)).setObjects(('CISCO-VLAN-BRIDGING-MIB', 'ciscoVlanBridgingMIBGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_vlan_bridging_mib_compliance = ciscoVlanBridgingMIBCompliance.setStatus('deprecated')
if mibBuilder.loadTexts:
ciscoVlanBridgingMIBCompliance.setDescription('The compliance statement for entities which implement the Cisco VLAN Bridging MIB.')
cisco_vlan_bridging_mib_compliance2 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 56, 3, 1, 2)).setObjects(('CISCO-VLAN-BRIDGING-MIB', 'ciscoVlanBridgingMIBGroup2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_vlan_bridging_mib_compliance2 = ciscoVlanBridgingMIBCompliance2.setStatus('current')
if mibBuilder.loadTexts:
ciscoVlanBridgingMIBCompliance2.setDescription('The compliance statement for entities which implement the Cisco VLAN Bridging MIB.')
cisco_vlan_bridging_mib_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 56, 3, 2, 1)).setObjects(('CISCO-VLAN-BRIDGING-MIB', 'cvbStpForwardingMap'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_vlan_bridging_mib_group = ciscoVlanBridgingMIBGroup.setStatus('deprecated')
if mibBuilder.loadTexts:
ciscoVlanBridgingMIBGroup.setDescription('A collection of objects providing the STP status information of up to 1k ports with the port number from 1 to 1024.')
cisco_vlan_bridging_mib_group2 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 56, 3, 2, 2)).setObjects(('CISCO-VLAN-BRIDGING-MIB', 'cvbStpForwardingMap2k'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_vlan_bridging_mib_group2 = ciscoVlanBridgingMIBGroup2.setStatus('current')
if mibBuilder.loadTexts:
ciscoVlanBridgingMIBGroup2.setDescription('A collection of objects providing the STP status information of up to 2k ports with the port number from 1 to 2048.')
mibBuilder.exportSymbols('CISCO-VLAN-BRIDGING-MIB', ciscoVlanBridgingMIB=ciscoVlanBridgingMIB, cvbStp=cvbStp, cvbStpTable=cvbStpTable, ciscoVlanBridgingMIBConformance=ciscoVlanBridgingMIBConformance, ciscoVlanBridgingMIBCompliance=ciscoVlanBridgingMIBCompliance, ciscoVlanBridgingMIBCompliance2=ciscoVlanBridgingMIBCompliance2, ciscoVlanBridgingMIBObjects=ciscoVlanBridgingMIBObjects, PYSNMP_MODULE_ID=ciscoVlanBridgingMIB, ciscoVlanBridgingMIBGroup2=ciscoVlanBridgingMIBGroup2, ciscoVlanBridgingMIBGroups=ciscoVlanBridgingMIBGroups, ciscoVlanBridgingMIBGroup=ciscoVlanBridgingMIBGroup, cvbStpForwardingMap=cvbStpForwardingMap, cvbStpEntry=cvbStpEntry, ciscoVlanBridgingMIBCompliances=ciscoVlanBridgingMIBCompliances, cvbStpForwardingMap2k=cvbStpForwardingMap2k) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.