Skip to content

Instantly share code, notes, and snippets.

View mcdonc's full-sized avatar

Chris McDonough mcdonc

View GitHub Profile
@mcdonc
mcdonc / hello.py
Last active December 29, 2015 20:29 — forked from offby1/hello.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from chameleon import PageTemplate
template = PageTemplate("Hello, ${name}.")
for name in ('Fred', u'ἃc', '\xf8'):
print(template(name=name))
@mcdonc
mcdonc / bench.py
Created January 20, 2011 22:10 — forked from defnull/bench.py
# with pyramid tweak (and 80-column wrapping)
import time
import sys
import StringIO
class Bench(object):
def __init__(self, flags=None):
''' Flags:
* cgi: Build a new app every time.