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
| #!/usr/bin/env python | |
| "Run me to check if there's any new code that doesn't have test coverage." | |
| import os | |
| import os.path | |
| import pickle | |
| import re | |
| import git |
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
| """ | |
| demonstration of an obscure edge case / bug(?) in sqlalchemy where | |
| adding a from_self() to a query that's already been aliased once and | |
| contains a labeled literal will fail. | |
| summary | |
| 1 - from_self | |
| 2 - add a non-column entity like count() | |
| 3 - another from_self fails |
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
| #!/usr/bin/env python | |
| import os | |
| import os.path | |
| import id3reader | |
| import re | |
| SRC_ROOT = '/Users/Shared/Music' | |
| DST_ROOT = '/Users/Shared/Music-sorted' |
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
| """ | |
| test multiple layers sqlalchemy inheritance | |
| e.g. Person -> Employee -> Engineer | |
| """ | |
| from sqlalchemy import MetaData, Column, ForeignKey, types, orm | |
| from sqlalchemy.ext.declarative import declarative_base | |
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
| """ | |
| Quick hack to return a likely User Agent based on a weighted list of strings. | |
| Use like: | |
| >>> import useragent | |
| >>> useragent.pick() | |
| """ | |
| import random |
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
| """ | |
| walk through related tags on twitter. | |
| start it with something like python twitterwalk.py sxsw | |
| """ | |
| import sys, re | |
| from twitter import Twitter | |
| if len(sys.argv) > 1: |
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
| """ | |
| Cute twitter bot to twitter pretty flickr photos and unicode characters. | |
| """ | |
| import flickr, random, urllib | |
| from twitter import Twitter | |
| flickr.API_KEY = 'FILL ME IN' | |
| username = 'prettier' |
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
| """ | |
| sqlalchemy composite column example. | |
| """ | |
| from sqlalchemy import * | |
| from sqlalchemy.orm import * | |
| metadata = MetaData('sqlite://') | |
| vertices = Table('vertices', metadata, |
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
| Price comparison of favorably reviewed SSDs as of 5/31/2009 | |
| $/GB Size Cost Vendor | |
| OCZ Summit | |
| 4.23 60GB $253.99 eCOST | |
| 4.87 60GB $292.00 Amazon | |
| 3.79 120GB $455.00 Amazon | |
| 3.48 250GB $871.00 Amazon |
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
| """ | |
| example of (bug?) in adding deferred columns to a declarative class | |
| after the | |
| class's creation. | |
| Foo is a normal declarative class with a deferred column. Bar is the | |
| same class, | |
| but with the deferred column added afterwards. | |
| """ |