This file contains 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 bash | |
# Written by William Ting for the following blog post: | |
# http://williamting.com/posts/2012/04/18/set-up-python-and-django-on-dreamhost/ | |
rcfile="${HOME}/.bashrc" | |
version="2.7.3" | |
setuptools_version="2.7" | |
tmp_dir="${HOME}/tmp-${RANDOM}" | |
if [[ ${#} == 0 ]]; then |
This file contains 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
def upsert(db_cur, table, pk_fields, schema=None, **kwargs): | |
"""Updates the specified relation with the key-value pairs in kwargs if a | |
row matching the primary key value(s) already exists. Otherwise, a new row | |
is inserted. Returns True if a new row was inserted. | |
schema the schema to use, if any (not sanitized) | |
table the table to use (not sanitized) | |
pk_fields tuple of field names which are part of the primary key | |
kwargs all key-value pairs which should be set in the row | |
""" |
This file contains 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
require 'formula' | |
class Vim < Formula | |
homepage 'http://www.vim.org/' | |
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2' | |
head 'https://vim.googlecode.com/hg/' | |
sha256 '5c5d5d6e07f1bbc49b6fe3906ff8a7e39b049928b68195b38e3e3d347100221d' | |
version '7.3.682' | |
def features; %w(tiny small normal big huge) end |