Skip to content

Instantly share code, notes, and snippets.

{
"cache": {"name": "Disk", "path": "/var/cache/tilestache/"},
"layers":
{
"unqc_cref_20140102.000000":
{
"projection": "spherical mercator",
"provider": { "name": "mapnik", "mapfile": "unqc_cref_mapnik.xml" },
"preview": { "lat": 49.0, "lon": -107.0, "zoom": 5, "ext": "png"}
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
---
layout: bootcamp
root: .
venue: Euphoric State University
address: 123 College Street, Euphoria
country: United-States
humandate: Feb 17-18, 2020
humantime: 9:00 am - 4:30 pm
startdate: 2020-06-17
enddate: 2020-06-18
gdal_merge.py -co COMPRESS=LZW -o ~/UNQC_CREF.20090101.000000.gtiff tile{1..8}/unqc_cref/UNQC_CREF.20090101.000000.gtiff
copynmq() {
month=$1;
year=$2;
product=$3;
INVENTORY=/ldm/data/tmp/manifest_new.txt.gz
ROOT=/ldm/data/nws/ldm/tiles
TARGET=wind.rccc.ou.edu:/scratch/cybercommons/nmq_annual/${product}/${year}/${month}
TARFILE=/ldm/data/tmp/${product}_${year}_${month}.tar
#!/bin/env python
"""
Zonal Statistics
Vector-Raster Analysis
Copyright 2013 Matthew Perry
Usage:
zonal_stats.py VECTOR RASTER TAG
zonal_stats.py -h | --help
@jduckles
jduckles / index.html
Created May 15, 2012 17:49
Testing D3
<html>
<head>
<link type="text/css" href="http://static.cybercommons.org/css/cybercomui/jquery-ui-1.8.13.custom.css" rel="Stylesheet"/>
<link type="text/css" href="http://static.cybercommons.org/css/cybercom/style.css" rel="Stylesheet" />
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css">
<script type="text/javascript" src="http://static.cybercommons.org/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="http://static.cybercommons.org/js/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" src="http://static.cybercommons.org/js/jquery.cookie.js"></script>
<!--<link type="text/css" href="form.css" rel="Stylesheet" />-->
@jduckles
jduckles / mahout
Created July 28, 2011 00:10
Commands from Mahout workshop Pt 1 at OSCON2011
# See http://www.oscon.com/oscon2011/public/schedule/detail/18836 for getting Mahout setup
# Get Reuters Data
wget http://goo.gl/qv6Ad
mkdir reuters-out
mv reuters21578.tar.gz reuters-out
cd reuters-out
tar -xzvf reuters21578.tar.gz
cd ..
# Mahout steps
# slip out text from SGM files
@jduckles
jduckles / gist:1086542
Created July 16, 2011 17:01
gdalinfo output
Driver: NITF/National Imagery Transmission Format
Files: 002AA013.TF3
Size is 1536, 1536
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6326"]],
@jduckles
jduckles / csv2psql
Created June 6, 2011 23:26
simple csv importer to psql
#!/bin/sh
DBHOST=mydbhost
DBNAME=mydbname
files=$1
target=$2
for file in ${files}; do
psql -h ${DBHOST} ${DBNAME} -c "\copy ${target} FROM '${file}' delimiters ','"
# TODO support Binary and Code
import calendar
import datetime
import re
try:
import uuid
_use_uuid = True
except ImportError:
_use_uuid = False