Skip to content

Instantly share code, notes, and snippets.

View jamescasbon's full-sized avatar

James Casbon jamescasbon

View GitHub Profile
@jamescasbon
jamescasbon / attr_np_mp.py
Created March 31, 2019 11:20
Evil monkeypatch for numpy cmp with attrs
import attr
import numpy as np
import attr._make
original_make_cmp = attr._make._make_cmp
@jamescasbon
jamescasbon / example.py
Created June 20, 2012 21:27
Tornado github API client
import tornado.ioloop
import tornado.web
import tornado.escape
import tornado.options
import tornado.httputil
import jinja2
import pyjade.compiler
import coffeescript
import markdown
@jamescasbon
jamescasbon / template.py
Created December 11, 2011 16:37
Pure python templates using with statement
"""
A really stupid python template language inspired by coffeekup, markaby.
Do not use this code, it will ruin your day. A byproduct of insomnia.
TL;DR
-----
This module defines a template language that allows us to do:
d = Doc()