I hereby claim:
- I am davidism on github.
- I am davidism (https://keybase.io/davidism) on keybase.
- I have a public key ASBDYLNew7drjvzVbNID47IlHGxdpsy1Z0Nzz8-GSIiaSAo
To claim this, I am signing this object:
<!-- executing from http://localhost.localdomain:63342 --> | |
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> | |
<script> | |
$.ajax({ | |
url: 'http://localhost.localdomain:5000/', | |
xhrFields: { | |
withCredentials: true | |
}, | |
success: function (data) { | |
$.post({ |
import sqlalchemy as sa | |
from sqlalchemy import orm | |
from sqlalchemy.ext.associationproxy import association_proxy | |
from sqlalchemy.ext.declarative import declarative_base | |
engine = sa.create_engine('sqlite://', echo=True) | |
session = orm.Session(engine) | |
Base = declarative_base() |
a = 'global' | |
class Fred: | |
a = 'class' | |
b = (a for i in range(10)) | |
c = [a for i in range(10)] | |
d = a | |
e = lambda: a | |
f = lambda a=a: a | |
I hereby claim:
To claim this, I am signing this object:
import sys | |
from flask import Flask, session, url_for, redirect | |
app = Flask(__name__) | |
app.secret_key = 'secret' | |
@app.route('/') | |
def set(): | |
session.clear() | |
session['works'] = True |
# ================ | |
# Models | |
# represents data that will be stored and retrieved | |
# normally would go in a database (see SQLAlchemy), here it's just some plain classes and dictionaries | |
# ================ | |
class Word(object): | |
"""Represents a word in the Cabbage language and it's translation to English.""" | |
def __init__(self, value, translation): |
class NestMeta(type): | |
def __getattr__(cls, key): | |
return cls(cls, key) | |
def __str__(cls): | |
return cls.__name__ | |
__repr__ = __str__ |