Skip to content

Instantly share code, notes, and snippets.

View zyegfryed's full-sized avatar

Sébastien Fievet zyegfryed

View GitHub Profile
@zyegfryed
zyegfryed / check_for_updates.py
Created April 19, 2011 13:11 — forked from coordt/check_for_updates.py
Check locally installed packages against one or more package indexes for updates and list them. Using subprocess instead of stdout (wasn't working on my MacPython 2.6.1)
#!/usr/bin/env python
"""
Use pip to get a list of local packages to check against one or more package
indexes for updated versions.
"""
import sys
import xmlrpclib
import subprocess
from distutils.version import StrictVersion, LooseVersion
@zyegfryed
zyegfryed / pdf.py
Created April 13, 2011 21:00
Outputting PDFs with Django and FDFgen
# -*- coding: utf-8 -*-
import codecs
import subprocess
from fdfgen import forge_fdf
from django.template import Template, loader
from django.template.loader import find_template, LoaderOrigin
class PdfTemplateError(Exception):
@zyegfryed
zyegfryed / gist:814432
Created February 7, 2011 14:25
Tastypie OAuth
from oauth2 import Error
from django.utils.translation import ugettext as _
from tastypie.authentication import Authentication
from oauth_provider.utils import initialize_server_request, send_oauth_error, get_oauth_request
from oauth_provider.consts import OAUTH_PARAMETERS_NAMES
from oauth_provider.store import store, InvalidTokenError