Catalogue of the different kinds of lists we compose in our day-to-day lives
-
Bucket list
Such as "Things to do before you die". Typically aspirational, completeable. Manual sorting (usually importance or desired completion order).
from simpleapi import SimpleAPI | |
class FacebookError(Exception): | |
def __init__(self, type, message, response=None): | |
self.type = type | |
self.message = message | |
self.response = response | |
def __str__(self): | |
return "%s (%s)" % (self.type, self.message) |
#!/bin/bash | |
# Setup deployment target for Nginx + Python/uWSGI + Supervisor + Git | |
# From: https://gist.github.com/1210041 | |
function usage() { | |
cat << EOF | |
Usage: $0 PROJECT_NAME [DOMAIN] [OPTIONS] | |
Options: | |
-y No prompts, assume yes to all. |
#!/bin/sh | |
mount /boot | |
cd /usr/src/linux | |
make clean; make; make modules_install | |
NEW_KERNEL=$(readlink /usr/src/linux) | |
echo "Copying kernel: ${NEW_KERNEL}" |
# listopi/test/__init__.py | |
from unittest import TestCase | |
from pyramid import testing | |
from sqlalchemy import create_engine | |
from listopi.model import metadata, Session | |
class TestModel(TestCase): | |
def setUp(self): |
class TestUtil(TestCase): | |
def test_split_first(self): | |
test_cases = [ | |
( | |
('abcd', ['b']), | |
('a', 'cd') | |
), | |
( | |
('abcd', ['c', 'b']), | |
('a', 'cd')), |
requirements: requirements.txt.out | |
requirements.txt.out: requirements.txt | |
pip install -r requirements.txt | tee requirements.txt.out |
REQUIREMENTS_FILE=requirements.txt | |
REQUIREMENTS_OUT=requirements.txt.log | |
SETUP_OUT=*.egg-info | |
all: setup requirements | |
requirements: $(REQUIREMENTS_OUT) | |
$(REQUIREMENTS_OUT): $(REQUIREMENTS_FILE) | |
pip install -r $(REQUIREMENTS_FILE) | tee $(REQUIREMENTS_OUT) |
def brandon_rhodes(): | |
"""Complete the foo of the 1st argument. | |
Completing the foo is always difficult, you know? | |
But this function does it, else raises ValueError. | |
""" | |
pass | |