Skip to content

Instantly share code, notes, and snippets.

@minrk
minrk / checkconstants.py
Created January 27, 2011 04:47
compare constants in zmq.h to czmq.pxd
#!/usr/bin/env python
"""A simply script to scrape zmq.h and zmq/core/czmq.pxd for constants,
and compare the two. This can be used to check for updates to zmq.h
that pyzmq may not yet match.
"""
from __future__ import with_statement
import os
import sys
# Download all current FAA sectional GeoTIFFs (zipped)
import urllib, os, csv
from lxml.html.soupparser import fromstring
FAA_CHART_URL = 'http://aeronav.faa.gov/index.asp?xml=aeronav/applications/VFR/chartlist_sect'
BASE_CONTENT_URL = 'http://aeronav.faa.gov/'
DOWNLOAD_DIR = 'download'
data = urllib.urlopen(FAA_CHART_URL).read()
@jameshfisher
jameshfisher / trie.go
Created May 15, 2010 19:05
A trie structure, storing []byte elements, implemented in Go
package trie
import (
"container/vector"
"sort"
)
// A 'set' structure, that can hold []byte objects.
// For any one []byte instance, it is either in the set or not.
type Trie struct {