Skip to content

Instantly share code, notes, and snippets.

Michal Migurski migurski

Block or report user

Report or block migurski

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Landsat 8 gdal processing
#! /bin/bash -ex
# Convert Landsat 8 GeoTIFF images into RGB pan-sharpened JPEGs.
# Requirements:
# * gdal
# * Dan Stahlke's
# * convert (image-magick)
# Reference info:
''' Search for records in g20151-slice.csv using index g20151-index.csv.
Also search for a few junk records, to make sure they're not found.
import csv, os, io
from remote import RemoteFileObject
INDEX_URL = 'http://localhost/~migurski/Census-Reporter/g20151-index.csv'
DATA_URL = 'http://localhost/~migurski/Census-Reporter/g20151-slice.csv'
View blosxom.php
// What's this blog's title?
$blog_title = "tecznotes";
// What's this blog's description (for outgoing RSS feed)?
$blog_description = "Michal Migurski's notebook, listening post, and soapbox.";
// What's this blog's primary language (for outgoing RSS feed)?
$blog_language = "en";
migurski / Compare G-Econ.ipynb
Last active Feb 15, 2016
Testing Compare G-Econ.ipynb
View Compare G-Econ.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
migurski / index.json
Last active Jan 17, 2016
Mapzen API index
View index.json
"vector_tile_url": "{layers}/{z}/{x}/{y}.{format}{?api_key}",
"time_distance_matrix_url": "{action}{?api_key,json}",
"search_geocode_url": "{?api_key,text}{&size,,boundary.rect.min_lat,boundary.rect.min_lon,boundary.rect.max_lat,boundary.rect.max_lon,,,,,focus.point.lon,sources,layers}",
"search_reverse_url": "{?api_key,,point.lon}{&size,,sources,layers}",
"search_autocomplete_url": "{?api_key,text}{&,focus.point.lon}",
"search_place_url": "{?api_key,ids}",
"elevation_url": "{?api_key,json}"
migurski /
Created Jul 23, 2015
Converting from OpenAddresses stats table to runs and sets table
from __future__ import print_function
from os import environ
from psycopg2 import connect
from psycopg2.extras import DictCursor, Json
from itertools import count, groupby
from datetime import timedelta, datetime
from operator import itemgetter
from uritemplate import expand
from dateutil.parser import parse
migurski / index.html
Last active Aug 29, 2015
Grabbing census tracts around Oakland, messing with Turf
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8" />
<script src="" charset="utf-8"></script>
<script src="modestmaps.min.js" charset="utf-8"></script>
<script src="turf.min.js" charset="utf-8"></script>
migurski / squares-map.js
Created Mar 3, 2015
Compiled TypeScript sample
View squares-map.js
var Map = (function () {
function Map(parent, template, proj, loc, zoom) {
this.selection =;
this.loaded_tiles = {
this.template = template;
this.parent = parent;
var size = Mouse.element_size(this.parent), coord = proj.locationCoordinate(loc).zoomTo(zoom);
this.grid = new Grid.Grid(size.x, size.y, coord, 3);
this.projection = proj;
migurski /
Created Jan 28, 2015
guess reason for OpenAddresses failure
def guess_reason(log):
if 'JobTimeoutException' in log:
return 'took too long'
elif 'DownloadError: 404 response' in log:
return 'missing source'
elif 'Source says to skip' in log:
return 'skipped'
elif 'Invalid number of points in LinearRing' in log:
% curl -sIL ''
HTTP/1.1 405 Method Not Allowed
Server: nginx
Date: Tue, 13 Jan 2015 01:52:36 GMT
Connection: keep-alive
Access-Control-Allow-Origin: *
X-Error-Code: method_not_allowed
X-Error-Message: HEAD not allowed
X-Socrata-Region: production
You can’t perform that action at this time.