This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'" |
NewerOlder