Skip to content

Instantly share code, notes, and snippets.

View rburhum's full-sized avatar

Ragi Yaser Burhum rburhum

View GitHub Profile
rburhum /
Last active March 7, 2021 15:49
Procesar Casos positivos de datos abiertos (Perú) MINSA
from datetime import datetime
start_time =
import os
# Open data portal constants
ALTERNATE_URL_CASOS_POSITIVOS = '' # alternate URL from MINSA cloud service
DESTINATION_CASOS_POSITIVOS_RAW = './data/casos-positivos-raw.csv'
CASOS_POSITIVOS_CLEAN = './data/casos-positivos-utf8.csv'
rburhum /
Created March 30, 2020 17:08
Download a Google Sheet (or any Google Doc) to Colab VM using gspread
from google.colab import auth
import gspread
from oauth2client.client import GoogleCredentials
gc = gspread.authorize(GoogleCredentials.get_application_default())
rburhum /
Created May 14, 2017 02:24 — forked from mojodna/
Chunk out NED ⅓arc second data using pyspark

To run this on EMR, do something akin to the following (with buckets changed as appropriate):

aws emr create-cluster \
  --name "NED Conversion" \
  --log-uri s3:// \
  --release-label emr-4.0.0 \
  --use-default-roles \
  --auto-terminate \
 --ec2-attributes KeyName=stamen-keypair \
setup_brew () {
if ![-f "/usr/local/bin/brew"]; then
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL"
setup_ipython () {
brew install readline
rburhum /
Created January 17, 2013 20:15
Add tilestache to Django
url(r'^v1/tiles/(?P<tile_user>([^/]+))/(?P<tile_layer>([^/]+))/(?P<tile_zoom>(\d+))/(?P<tile_column>(\d+))/(?P<tile_row>(\d+))\.(?P<tile_format>([a-z]+))$', TileManager.as_view(), name='tile_manager'),
rburhum / gist:4080308
Created November 15, 2012 18:30
Homebrew QGIS build failed
brew remove pyqt
brew install pyqt #verify everything works fine
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
brew tap homebrew/science
brew install qgis --with-grass --with-postgis
rburhum /
Created June 19, 2012 17:31
Fabric script to compile FileGDB
from fabric.api import *
from fabric.contrib.console import confirm
import tempfile
import re
PROJ_PATH='/usr/local/proj/' + PROJ_VER