View aws.conf
[plugins]
cwlogs = cwlogs
[default]
region = ap-southeast-2
View cleanup_edges.py
#!/usr/bin/env python
import numpy
import sys
import gdal
def cleanup_edges(source, nodata_value, mask_filename="mask.tiff"):
band_data = source.GetRasterBand(1).ReadAsArray()
y_size, x_size = band_data.shape
View publish_queue_size.py
#!/usr/bin/env python
from __future__ import with_statement, print_function
from pyrabbit.api import Client
from boto.ec2.cloudwatch import CloudWatchConnection
import os
from time import sleep
def get_queue_depths(host, username, password, vhost):
cl = Client(host, username, password)
View gpx-photo.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from optparse import OptionParser
import os
import sys
import pyexiv2
import logging
import gpxpy
import gpxpy.gpx
import datetime
View profile-source.py
#!/usr/bin/env python
import logging
from optparse import OptionParser
import os
import sys
import mercantile
import psycopg2
import yaml
View gist:f1130d63b7a37d3abc0a
-- ---------------------------------------------------------------------
-- converts mapnik's !scale_denominator! param to web mercator z
CREATE OR REPLACE FUNCTION public.z(scaledenominator numeric)
RETURNS integer
LANGUAGE plpgsql IMMUTABLE
AS $function$
begin
-- Don't bother if the scale is larger than ~zoom level 0
if scaledenominator > 600000000 then
return null;
View test.py
#!/usr/bin/env python
import subprocess
def _main():
source_image = "source.tiff"
subprocess.call("gdalwarp -t_srs epsg:3857 -r cubic " + source_image + " pre-import.tiff", shell=True)
import fiona
subprocess.call("gdalwarp -t_srs epsg:3857 -r cubic " + source_image + " post-import.tiff", shell=True)
View StyleTemplate.json
{
"version": 8,
"name": "OpenHuntingData",
"center": [
-118.291995,
36.578581
],
"zoom": 12,
"bearing": 0,
"pitch": 0,
View playback-gpx.py
#!/usr/bin/env python
import sys
import logging
from optparse import OptionParser
import os
import gpxpy
import gpxpy.gpx
import time
from subprocess import check_output
import math
View set_s3_metadata.py
#!/usr/bin/env python
import logging
from optparse import OptionParser
import os
from urlparse import urlparse
from boto.s3.connection import S3Connection
def _main():