Skip to content

Instantly share code, notes, and snippets.

View nikalras's full-sized avatar

Nikon Rasumov nikalras

View GitHub Profile
M1719: |Labc|Ldce|Ebze| 0.20 0.30 0.32 0.32 0.32 0.32 0.263296394963 0.111387109786 0.470177600114 0.029771700191 0.173209325064 3.28129207574
import time
nb_repeat = 50
def a_complex_operation(*args):
a = []
for x in range(999999):
a.append(x)
return None
import sys
def pali(l):
dic ={}
for i in l:
dic[i] = dic[i] +1 if i in dic else 1
out = [ v % 2 for v in dic.values()]
def accumulator(sum):
while True:
sum += yield sum
x = accumulator(1)
x.send(None)
x.send(5)
print(accumulator(3))
print(x.send(2.3))
class mme(object):
def __init__(self,f):
self.f = f
self.d = {}
def __call__(self,arg):
if arg in self.d:
return self.d[arg]
else: