Skip to content

Instantly share code, notes, and snippets.

View Kobold's full-sized avatar

Andy Kish Kobold

  • TenantBase
  • Santa Monica, CA
View GitHub Profile
-- Playing around with ContraFunctors
-- http://blog.ezyang.com/2010/07/flipping-arrows-in-coburger-king/
class ContraFunctor t where
contramap :: (a -> b) -> t b -> t a
newtype ContraF a b = ContraF (b -> a)
instance ContraFunctor (ContraF a) where
contramap g (ContraF f) = ContraF (f . g)
class SubdivisionTree(object):
"""docstring for SubdivisionTree"""
def __init__(self, top, right, bottom, left, element=None):
self.top = top
self.right = right
self.bottom = bottom
self.left = left
self.element = element
import urllib
from xml.dom import minidom
from xml.dom.minidom import parse, parseString
display_tags = ["d:PartitionKey", "d:RowKey", "d:TimeStamp", "d:entityid",
"d:name", "d:address", "d:weburl", "d:gis_id", "d:gender",
"d:offensedescription"]
def GetData():
url = "http://ogdi.cloudapp.net/v1/dc/JuvenileArrestsCharges/?$filter=gender%20eq%20'F'"