This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy.ext.declarative import declarative_base, declared_attr | |
from sqlalchemy import Column, Integer, String, create_engine | |
Base = declarative_base() | |
class Thing(Base): | |
__tablename__ = 'things' | |
id = Column(Integer, primary_key=True) | |
name = Column(String) | |
discriminator = Column('type', String) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function reauthor_git() | |
{ | |
git filter-branch -f --commit-filter ' | |
GIT_AUTHOR_NAME=$1 | |
GIT_AUTHOR_EMAIL=$2 | |
git commit-tree "$@" | |
' $3 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from setuptools import Command | |
class Compile(Command): | |
description = "run a custom compile command" | |
user_options = tuple() | |
def run(self): | |
print self.description | |
def initialize_options(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
i=0 | |
while true | |
do | |
pass=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c $i` | |
echo $pass > ./testcases/length_$i.txt | |
i=$(($i + 1)) | |
sleep 1 | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File "/home/medwards/.virtualenvs/pyramid/local/lib/python2.7/site-packages/chameleon/template.py", line 128, in __call__ | |
return self.render(**kwargs) | |
File "/home/medwards/.virtualenvs/pyramid/local/lib/python2.7/site-packages/chameleon/zpt/template.py", line 258, in render | |
return super(PageTemplate, self).render(**vars) | |
File "/home/medwards/.virtualenvs/pyramid/local/lib/python2.7/site-packages/chameleon/template.py", line 188, in render | |
raise_with_traceback(exc, tb) | |
File "/home/medwards/.virtualenvs/pyramid/local/lib/python2.7/site-packages/chameleon/template.py", line 175, in render | |
self._render(stream, econtext, rcontext) | |
File "listing_ff766ad4b34fe2da3a424c3defebda82d297cfa5.py", line 223, in render | |
File "master_0f566c540119710058468ca546bb52d1cc73277f.py", line 289, in render_master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/home/medwards/.virtualenvs/pyramid/bin/pserve", line 9, in <module> | |
load_entry_point('pyramid==1.3', 'console_scripts', 'pserve')() | |
File "/home/medwards/.virtualenvs/pyramid/local/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 47, in main | |
return command.run() | |
File "/home/medwards/.virtualenvs/pyramid/local/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 290, in run | |
relative_to=base, global_conf=vars) | |
File "/home/medwards/.virtualenvs/pyramid/local/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 318, in loadapp | |
return loadapp(app_spec, name=name, relative_to=relative_to, **kw) | |
File "/home/medwards/.virtualenvs/pyramid/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
person = Person(name='Alice') | |
DBSession.add(person) | |
message = Message(person_id=person.id, content="a message to bob") | |
DBSession.add(message) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set row_blocks = [] %} | |
{% for item in items %} | |
{%- if row_width + item.width > 12 %} | |
{%- include "rowofstuff.html" %} | |
{%- for rowitem in row_blocks %} | |
{%- set something = row_blocks.remove(rowitem) %} | |
{%- endfor %} | |
{%- set row_width = 0 %} | |
{%- endif %} | |
{%- set something = row_blocks.append(item) %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
{% block thebody %} | |
{% include "something.html" %} | |
</body> | |
{% endblock %} | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Might be bad bc I removed some other junk in the diff | |
diff --git a/lib/play.rb b/lib/play.rb | |
index e8e7ceb..7ddc757 100644 | |
--- a/lib/play.rb | |
+++ b/lib/play.rb | |
@@ -76,14 +76,16 @@ module Play | |
# Returns the Client subclass that matches the client requested | |
# in the config subclass. | |
def self.client |