Chapters 4-6
Case study: Turtle
from datetime import datetime | |
class W(object): | |
def __getattr__(self, attr): | |
def meta(*args, **kwargs): | |
def inner(value): | |
return getattr(value, attr)(*args, **kwargs) | |
return inner | |
return meta | |
"""\ | |
TinyObj does the bare minimum to make a nice object layer on top of datastores | |
which return dicts. It can set defaults, validate data types, and provides a | |
dot-access style interface for getting and setting attributes (truthfully, | |
because it just sprinkles a little magic Python dust over the dicts so they are | |
full Python objects with all of those qualities.) | |
""" | |
import datetime | |
class Field(object): |
# I'd like to be able to define a service something like the following... | |
name = "Some Python Webapp" | |
[environment.production] | |
DJANGO_SETTINGS_MODULE=testapp.settings.production | |
[environment.staging] | |
DJANGO_SETTINGS_MODULE=testapp.settings.staging | |
[[service]] |
I hereby claim:
To claim this, I am signing this object:
fakemail: python fakemail.py localhost ${MAIL_PORT:-4467} |
import random | |
sherlock = open('sherlock-normalized.txt', 'r').read() | |
sherlock[100:200] | |
# look at each word (DONE) | |
# look at the next word in the sequence | |
# add the next word to the list of words following the first word | |
class Markov(object): |