Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
Simple script to create geojson from osm files. | |
Prints geojson features line by line. | |
Currently we don't support relations. | |
Requires (unmodified) imposm and imposm.parser | |
Inspired by https://github.com/emka/OSMCouch | |
''' |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
#Quick cp from http://sekati.com/etc/install-nodejs-on-debian-squeeze | |
# | |
#Needed to install TileMill from MapBox | |
# | |
#Installs node.js which has npm bundled | |
# | |
#Build Dependencies | |
sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev |
#!/bin/sh | |
# To the extent possible under law, the person who associated CC0 | |
# with this work has waived all copyright and related or neighboring | |
# rights to this work. | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
SCRIPT_DIR=`dirname $0` | |
if [ -e $1 ] ; then |
# Ruby is our language as asciidoctor is a ruby gem. | |
lang: ruby | |
before_install: | |
- sudo apt-get install pandoc | |
- gem install asciidoctor | |
script: | |
- make | |
after_success: | |
- .travis/push.sh | |
env: |
##How to get started contributing to a Humanitarian OpenStreetMap Team task
###Overview
OpenStreetMap (OSM) is an open-source map of the world that anyone can edit. But like any map, it's incomplete.
The Humanitarian OpenStreetMap Team (HOT) helps organize people to improve the OSM map for crisis areas, mostly so aid workers can find their way around and make decisions about undermapped places. The data in these crisis areas is often very poor, or completely non-existent. Therefore any contribution you make at all will be a vast improvement, and could materially help people who are on the ground right now, looking at this data as you edit it, and deciding where to go and who to help.
There are many HOT tasks active at once. As of August 2014, the highest-priority tasks are Gaza and areas affected by the West African Ebola outbreak.
##Update:
Please refer to: https://github.com/KonradIT/goprowifihack
import sys, marshal, functools, subprocess | |
child_script = """ | |
import marshal, sys, types; | |
fn, args, kwargs = marshal.load(sys.stdin) | |
marshal.dump( | |
types.FunctionType(fn, globals())(*args, **kwargs), | |
sys.stdout) | |
""" |