Skip to content

Instantly share code, notes, and snippets.

~/tri-zilla test-agg ✗ 1h11m ⚑ ◒
▶ foo=(-b 0 0 0)
~/tri-zilla test-agg ✗ 1h13m ⚑ ◒
▶ bar=$(printf " %s" "${foo[@]}")
~/tri-zilla test-agg ✗ 1h13m ⚑ ◒
▶ bar=${bar:1}
~/tri-zilla test-agg ✗ 1h13m ⚑ ◒
module.js:340
throw err;
^
Error: Cannot find module 'mkdirp'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/dnomadb/weather-data/index.js:5:14)
at Module._compile (module.js:456:26)
This file has been truncated, but you can view the full file.
{"attributes": {"band_1": 4.648577466762207}, "key": "n0n0n0n0n0n0n0n0n"}
{"attributes": {"band_1": 4.673655656474146}, "key": "s0s0s0s0s0s0s0s0s"}
{"attributes": {"band_1": 4.648577466762207}, "key": "n0n0n0n0n0n0n0n1n"}
{"attributes": {"band_1": 4.587318408405432}, "key": "n0n0n0n0n0n0n0n1s"}
{"attributes": {"band_1": 4.536698747421282}, "key": "n0n0n0n0n0n0n1n0n"}
{"attributes": {"band_1": 4.5485773304946555}, "key": "n0n0n0n0n0n0n1n0s"}
{"attributes": {"band_1": 4.448577425862086}, "key": "n0n0n0n0n0n0n1n1n"}
{"attributes": {"band_1": 4.448577425862086}, "key": "n0n0n0n0n0n0n1s1s"}
{"attributes": {"band_1": 4.348577521229518}, "key": "n0n0n0n0n0n1n0n0n"}
{"attributes": {"band_1": 4.348577521229519}, "key": "n0n0n0n0n0n1n0s0s"}
function eat(line, callback) {
try {
var data = JSON.parse(line);
aggregator.dataEater(data.key, data.attributes, 5, function(err, GeoJSON) {
if (err) throw err;
callback(GeoJSON)
});
} catch(err) { }
}
@dnomadb
dnomadb / a.rb
Created February 10, 2015 23:21
In [1]:
from shapely import wkb
In [4]:
point = wkb.loads('0101000020E6100000FD31AD4D632254C04A79AD84EE364140', hex=True)
In [7]:
point.coords.xy
Out[7]:
makesurface triangulate 11 --tile 7 7 3 | makesurface fillfacets -np\ -b\ 1\ snod\ -b\ 2\ temp\ /Users/dnomadb/weather-data/data/1423815006651/gfs-out.tif | node /Users/dnomadb/weather-data/bin/update-db
makesurface triangulate 11 --tile 7 7 3 | makesurface fillfacets \ -b\ 1\ wind\ /Users/dnomadb/weather-data/data/1423815006651/hrrr-out.tif | node /Users/dnomadb/weather-data/bin/update-db
/Users/dnomadb/weather-data/lib/postgis.js:59
return Object.keys(o).map(function(k) {return [k, o[k]]; })
^
TypeError: Object.keys called on non-object
at Function.keys (native)
at pairs (/Users/dnomadb/weather-data/lib/postgis.js:59:21)
at /Users/dnomadb/weather-data/lib/postgis.js:49:15
at Array.map (native)
at UpdateStream._process (/Users/dnomadb/weather-data/lib/postgis.js:48:30)
at processChunk (/Users/dnomadb/weather-data/node_modules/parallel-stream/index.js:62:10)
{"Table":{"AttributeDefinitions":[{"AttributeName":"id","AttributeType":"S"},{"AttributeName":"qt","AttributeType":"S"}],"TableName":"weather-lattice","ProvisionedThroughput":{"WriteCapacityUnits":500,"ReadCapacityUnits":500,"NumberOfDecreasesToday":0},"KeySchema":[{"AttributeName":"id","KeyType":"HASH"},{"AttributeName":"qt","KeyType":"RANGE"}],"CreationDateTime":"2015-02-17T23:48:03.660Z","ItemCount":0,"TableSizeBytes":0,"TableStatus":"ACTIVE"}}
{"AttributeDefinitions":[{"AttributeName":"id","AttributeType":"S"},{"AttributeName": "qt","AttributeType":"S"}],"KeySchema":[{"AttributeName":"id","KeyType":"HASH"},{"AttributeName":"qt","KeyType":"RANGE"}],"ProvisionedThroughput":{"WriteCapacityUnits": 500,"ReadCapacityUnits": 500}}
{"id": "tri", "qt": "s0s2n1n2n0n0n0n0n0n0n0n"}
{"id": "tri", "qt": "s0s2n1n2n0s0s0s0s0s0s0s"}
{"id": "tri", "qt": "s0s2n1n2n0n0n0n0n0n0n1n"}
{"id": "tri", "qt": "s0s2n1n2n0n0n0n0n0n0n1s"}
{"id": "tri", "qt": "s0s2n1n2n0n0n0n0n0n1n0n"}
{"id": "tri", "qt": "s0s2n1n2n0n0n0n0n0n1n0s"}
{"id": "tri", "qt": "s0s2n1n2n0n0n0n0n0n1n1n"}
{"id": "tri", "qt": "s0s2n1n2n0n0n0n0n0n1s1s"}
{"id": "tri", "qt": "s0s2n1n2n0n0n0n0n1n0n0n"}
[email protected] /Users/dnomadb/weather-data
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │ ├── [email protected]