Skip to content

Instantly share code, notes, and snippets.

@grepdisc
grepdisc / index.html
Last active January 17, 2018 08:39
Comic for Justice
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/>
<script src="http://cmx.io/v/0.1/cmx.js"></script>
<body>
<scene width="500" id="scene1">
<label t="translate(0,346)">
<tspan x="0" y="0em">Bell Hooks</tspan>
</label>
<actor t="translate(131,49)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-18,79|-18,59|-6,79|-1,59">
@grepdisc
grepdisc / loopcomparison.py
Created June 7, 2011 19:24
patterns to stop iteration on a sorted sequence
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""These are patterns to stop iteration on a sorted sequence.
In the case that there is a performance requirement to short-circuit
an iteration, using a sentinel pattern can reduce the cost incurred by
a conditional on each iteration.
itertools.combinations() is used in these example functions to
represent any iterator that emits tuples that are sorted with