Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Alex Pretzlav Pretz

🎯
Focusing
View GitHub Profile
@Pretz
Pretz / trac-tickets-to-gh.py
Created Sep 21, 2010 — forked from dittos/trac-tickets-to-gh.py
import trac tickets to github from a mysql trac install
View trac-tickets-to-gh.py
import sys; reload(sys); sys.setdefaultencoding('utf-8')
import MySQLdb
import urllib2
import urllib
import simplejson
login = 'your github login'
token = 'your github API key'
repo = 'username/repo'
View simulate_errorcodes.py
import web
import httplib
urls = ("/(.+?)/?", "http_err")
app = web.application(urls, globals())
class http_err:
def GET(self, err_code):
err_code = int(err_code.split("/")[0])
response = "%d %s" % (err_code, httplib.responses[err_code])