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
#! /bin/bash -ex | |
# Convert Landsat 8 GeoTIFF images into RGB pan-sharpened JPEGs. | |
# | |
# Requirements: | |
# * gdal http://www.mapbox.com/tilemill/docs/guides/gdal/ | |
# * Dan Stahlke's https://github.com/gina-alaska/dans-gdal-scripts | |
# * convert (image-magick) | |
# | |
# Reference info: |
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
''' 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' |
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
<?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"; | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{ | |
"vector_tile_url": "http://vector.mapzen.com/osm/{layers}/{z}/{x}/{y}.{format}{?api_key}", | |
"time_distance_matrix_url": "https://matrix.mapzen.com/{action}{?api_key,json}", | |
"search_geocode_url": "https://search.mapzen.com/v1/search{?api_key,text}{&size,boundary.country,boundary.rect.min_lat,boundary.rect.min_lon,boundary.rect.max_lat,boundary.rect.max_lon,boundary.circle.lat,boundary.circle.lon,boundary.circle.radius,focus.point.lat,focus.point.lon,sources,layers}", | |
"search_reverse_url": "https://search.mapzen.com/v1/reverse{?api_key,point.lat,point.lon}{&size,boundary.country,sources,layers}", | |
"search_autocomplete_url": "https://search.mapzen.com/v1/autocomplete{?api_key,text}{&focus.point.lat,focus.point.lon}", | |
"search_place_url": "https://search.mapzen.com/v1/place{?api_key,ids}", | |
"elevation_url": "https://elevation.mapzen.com/height{?api_key,json}" | |
} |
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
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 |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Untitled</title> | |
<script src="https://code.jquery.com/jquery-1.11.2.min.js" charset="utf-8"></script> | |
<script src="modestmaps.min.js" charset="utf-8"></script> | |
<script src="turf.min.js" charset="utf-8"></script> | |
</head> | |
<body> |
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
var Map = (function () { | |
function Map(parent, template, proj, loc, zoom) { | |
this.selection = d3.select(parent); | |
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; |
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
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: |
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
% curl -sIL 'https://data.acgov.org/api/geospatial/8e4s-7f4v?method=export&format=Original' | |
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 |