Skip to content

Instantly share code, notes, and snippets.

# original: https://github.com/simonw/mytweets
# modified by Brian Rosner
# This script does not fetch all tweets. It is limited by what Twitter's API
# returns. Somewhere around 3200 tweets.
#
# Tweak the API keys around line 40 for your Twitter app
import json
import httplib
@benjaminws
benjaminws / gist:1309375
Created October 24, 2011 15:59
For Gary
======================================================================
ERROR: test_coolstorybro.TestCoolStoryBro.test_coolstorybro
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/bsmith/Dev/python/coolstorybro/local/lib/python2.7/site-packages/nose/case.py", line 133, in run
self.runTest(result)
File "/home/bsmith/Dev/python/coolstorybro/local/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
test(result)
File "/usr/lib/python2.7/unittest/case.py", line 385, in __call__
return self.run(*args, **kwds)
@toastdriven
toastdriven / mytwilight.tmTheme
Created July 29, 2011 16:04 — forked from epicserve/sublime_text_2_notes.md
My Sublime Text 2 Setup
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Daniel Lindsley</string>
<key>name</key>
<string>My Twilight</string>
<key>settings</key>
<array>
@ericflo
ericflo / backup_db.py
Created January 5, 2011 18:25
A management command to put on a cron to keep daily backups of a postgres database (with a 1-week window)
import datetime
import subprocess
from django.conf import settings
from django.core.management.base import BaseCommand
from boto.s3.connection import S3Connection
from boto.s3.key import Key
class Command(BaseCommand):
@klipstein
klipstein / b64field.py
Created November 22, 2010 12:25
Base64 file handling for django-tastypie
import base64
import os
from tastypie.fields import FileField
from django.core.files.uploadedfile import SimpleUploadedFile
class Base64FileField(FileField):
"""
A django-tastypie field for handling file-uploads through raw post data.
It uses base64 for en-/decoding the contents of the file.
Usage:
@eykd
eykd / pycache.py
Created October 26, 2010 15:06
A simple script for caching packages on S3 and building simple HTML indices.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""pycache -- cache a python package from PyPI on S3.
A simple script to collect a cache of packages locally and sync them up to an S3 bucket, using directories as namespaces so that different projects can have different dependencies.
This is just about the simplest thing that could possibly work.
"""
import warnings
warnings.filterwarnings('ignore')