Skip to content

Instantly share code, notes, and snippets.

View eightysteele's full-sized avatar

Aaron Steele eightysteele

View GitHub Profile
class OccurrencePolygonSet(db.Model):
# Normal properties...
class Ecoregion(db.Model):
cluster = db.ReferenceProperty(OccurrencePolygonSet)
terms = db.StringListProperty()
# Other properties here...
# Find all ecoregions for a cluster where the ecoregion is introduced and g200Num is 2:
cluster = OccurrencePolygonSet.get(some_key)
{
"item":{
"source":"World Wildlife Fund (WWF)",
"type":"Ecoregion",
"name":"Admiralty Island lowland rain forests",
"description":"",
"storage":{
"location":"G:/MoL/....",
"format":"esri-shape"
},
(import '[java.util UUID])
(defn uuid-stream []
(repeatedly #(str (UUID/randomUUID))))
(defn domain-map [root-path n]
(let [name-seq (take n (uuid-stream))]
(->> (map (partial str root-path "/") name-seq)
(interleave name-seq)
(apply hash-map))))
(use 'forma.hadoop.jobs.scatter)
;; put stuff in pail
(let [pail-path "/Users/robin/delete/tmp/newpail"
vcf-src [(thrift/DataChunk* "vcf"
(thrift/ModisPixelLocation* "500" 28 8 0 0)
25
"00")]
gadm-src [(thrift/DataChunk* "gadm"
(thrift/ModisPixelLocation* "500" 28 8 0 0)