I hereby claim:
- I am huntcsg on github.
- I am hsenftgrupp (https://keybase.io/hsenftgrupp) on keybase.
- I have a public key ASBgrWC4Qjfc31_su-avYtrJH3Duuh8lzg06T-aPo0--4wo
To claim this, I am signing this object:
import csv | |
class validator: | |
VALIDATORS = {} | |
@classmethod | |
def validate(cls, key, value): | |
return cls.VALIDATORS.get(key, lambda x: x)(value) |
I hereby claim:
To claim this, I am signing this object:
from functools import wraps | |
class LazyFunction: | |
def __init__(self, fn, args, kwargs): | |
self.fn = fn | |
self.args = args | |
self.kwargs = kwargs |
def get_data_with_return(): | |
for i in range(5): | |
yield i | |
return "I finished my task." | |
data = get_data_with_return() | |
while True: | |
try: | |
print("In iteration: {}".format(next(data))) | |
except StopIteration as e: |
###################################################################### | |
# This is how to use the server.Site class | |
###################################################################### | |
site = server.Site(SimpleSineApp) | |
# You can change the top of the tree by passing your app class definition to the .addRoot method. I think a best practice would be | |
# to define this when you initilize your server.Site object. However, if for some reason you need to set the root at a different | |
# time, this is the method to do so. | |
#site.addRoot(SimpleSineApp) |