nate's teachers for soft circuitry/etextiles/etc:
nate's teachers for knitting, crocheting, sewing and such:
- several local meetup groups
- knittinghelp.com
class FlexibleRequest(urllib2.Request): | |
VALID_METHODS = [ 'GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'TRACE', 'OPTIONS', 'CONNECT', 'PATCH' ] | |
def __init__(self, *args, **kwargs): | |
if 'method' in kwargs: | |
if not kwargs['method'] in self.VALID_METHODS: | |
raise ValueError("Invalid method specified: %s" % kwargs['method']) | |
self.method = kwargs.pop('method') | |
else: | |
self.method = None | |
urllib2.Request.__init__(self, *args, **kwargs) |
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' | |
STATICFILES_STORAGE = 'path.to.storage.S3StaticStorage' | |
THUMBNAIL_DEFAULT_STORAGE = 'storages.backends.s3boto.S3BotoStorage' | |
AWS_ACCESS_KEY_ID = 'YOUR KEY' | |
AWS_SECRET_ACCESS_KEY = 'YOUR KEY' | |
AWS_STORAGE_BUCKET_NAME = 'media.YOURSITE.com' | |
AWS_STATIC_BUCKET_NAME = 'static.YOURSITE.com' | |
AWS_S3_CUSTOM_DOMAIN = AWS_STORAGE_BUCKET_NAME | |
AWS_STATIC_CUSTOM_DOMAIN = AWS_STATIC_BUCKET_NAME | |
STATIC_URL = 'http://%s/' % AWS_STATIC_BUCKET_NAME |
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the active virtualenv | |
# * the branch/status of the current git repository | |
# * the return value of the previous command | |
# * the fact you just came from Windows and are used to having newlines in | |
# your prompts. |
nate's teachers for soft circuitry/etextiles/etc:
nate's teachers for knitting, crocheting, sewing and such:
package { "dkms": | |
ensure => latest, | |
} | |
package { "chromium-browser": | |
ensure => latest, | |
} | |
package { "emacs": | |
ensure => latest, |
#!/bin/bash | |
NAME="hello_app" # Name of the application | |
DJANGODIR=/webapps/hello_django/hello # Django project directory | |
SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket | |
USER=hello # the user to run as | |
GROUP=webapps # the group to run as | |
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | |
DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use | |
DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name |
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
bumpversion patch
#!/bin/bash | |
# git-recheckout: git reset to the upstream branch | |
# | |
# Your local checkout of a branch, and the remote branch it tracks are out of | |
# sync. You want to check it out again, discarding your version of the branch. | |
# | |
# Because you need to know the remotename/branchname string to reset to | |
# | |
# 1. get the remotename/the-branch combination | |
# 2. git reset remotename/the-branch |
edit: see http://cs.brown.edu/~sk/Memos/Examining-Reproducibility/
Not deserving of a full post, but nonetheless worth writing about: @ongardie, @aalevy, and a few others on Twitter were surprised by the number of papers that were flagged as "not reproducible" according to the recent study at http://reproducibility.cs.arizona.edu. Digging deeper, it appeared that 1.) "code builds" is the standard for reproducibility in this study and that 2.) many broken builds were the result of missing dependencies on the researchers' systems.
I tried reproducing a few of the authors' "unreproducible" results. It's hard to vet 600+ research code repositories, but, with a little effort (< ~10 minutes each?), I was able to get all of the following to actually build (on Ubuntu 13.10). This doesn't inspire confidence in the reproducibility of the study results.
Peter [email protected]