Skip to content

Instantly share code, notes, and snippets.

View gridcell's full-sized avatar

Dustin Sampson gridcell

View GitHub Profile
@gridcell
gridcell / spatialquery.py
Created January 25, 2016 23:46
Spatial Queries in Python
import fiona
import os
import rtree
from collections import defaultdict
from shapely.geometry import shape
CONTAINS = 'contains'
CROSSES = 'crosses'
DISJOINT = 'disjoint'
@gridcell
gridcell / verbatim_include.py
Last active August 29, 2015 13:57
Django template tag to include template contents verbatim
import os
from django import template
from django.template.loader import get_template
from django.conf import settings
register = template.Library()
@register.simple_tag()