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
### Keybase proof | |
I hereby claim: | |
* I am whardier on github. | |
* I am whardier (https://keybase.io/whardier) on keybase. | |
* I have a public key whose fingerprint is 4B80 7B6D 34B4 9934 E19C 46D2 79FA CAF8 4FEC E52D | |
To claim this, I am signing this object: |
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
/data/gis/gis_base/Landsat/data/raw/wrs1/088/015/LM10880151977146FAK03_20140227 | |
/data/gis/gis_base/Landsat/data/raw/wrs1/088/013/LM10880131977146FAK03_20140227 | |
/data/gis/gis_base/Landsat/data/raw/wrs1/084/014/LM10840141977160FAK03_20140227 | |
/data/gis/gis_base/Landsat/data/raw/wrs1/085/013/LM10850131977161FAK03_20140227 | |
/data/gis/gis_base/Landsat/data/raw/wrs1/089/015/LM10890151977184FAK04_20140304 | |
/data/gis/gis_base/Landsat/data/raw/wrs1/075/018/LM10750181977206FAK04_20140304 | |
/data/gis/gis_base/Landsat/data/raw/wrs1/075/019/LM10750191977206FAK04_20140227 | |
/data/gis/gis_base/Landsat/data/raw/wrs1/079/021/LM10790211977208FAK03_20140227 | |
/data/gis/gis_base/Landsat/data/raw/wrs1/083/017/LM10830171977213FAK03_20140227 | |
/data/gis/gis_base/Landsat/data/raw/wrs1/083/016/LM10830161977213FAK03_20140304 |
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
#!/usr/bin/env python2.7 | |
# -*- coding: UTF-8 -*- | |
import os | |
import sys | |
import stat | |
import tornado.ioloop | |
import tornado.netutil | |
import tornado.gen |
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
CREATE TABLE ogr_stream_template (fid integer, the_geom geometry, fields text[], integers int[], floats float[], texts text[]); | |
CREATE OR REPLACE FUNCTION ogr_stream_iterator(path text, layer_name text, srid integer) | |
RETURNS SETOF ogr_stream_template | |
AS $$ | |
import sys | |
sys.path.insert(1, '/usr/local/gis/lib/python2.7/site-packages') |
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 | |
set -e | |
LOCKFILE="/tmp/things.lock" | |
trap "rm -f $LOCKFILE" EXIT | |
if [ -e "$LOCKFILE" ]; then | |
echo >&2 "Warning: $LOCKFILE present, not doing things." |
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
>>> import pyabr.common.string | |
>>> pyabr.common.string.format_vars('{__name__}') | |
'pyabr.common.string' | |
>>> print pyabr.common.string.format_vars_source() | |
def format_vars(s, vars=None): | |
if not vars: | |
vars = globals() |
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
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
def format_vars(format_string, format_vars=None): | |
if not format_vars: | |
format_vars = globals() | |
return format_string.format(**format_vars) | |
if __name__ == "__main__": |
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
root@hopu:~# mount /dev/sde1 /mnt/wonderboy/ | |
root@hopu:~# mount /dev/sdf1 /mnt/wondergirl/ | |
root@hopu:~# mhddfs /mnt/wonderboy/ /mnt/wondergirl/ /mnt/wondertwins/ | |
root@hopu:~# df -h /mnt/wonder* | |
Filesystem Size Used Avail Use% Mounted on | |
/dev/sde1 118G 60M 112G 1% /mnt/wonderboy | |
/dev/sdf1 118G 60M 112G 1% /mnt/wondergirl | |
/mnt/wonderboy/;/mnt/wondergirl/ 235G 120M 223G 1% /mnt/wondertwins |
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 expand_path(path, absolute=False, max_loop=10): | |
for loop in range(max_loop): | |
newpath = os.path.expandvars(path) | |
newpath = os.path.expanduser(newpath) | |
if newpath == path: | |
break | |
else: | |
path = newpath |
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 abspath_expand(path, absolute=False, max_loop=10): | |
for loop in range(max_loop): | |
newpath = os.path.expandvars(path) | |
newpath = os.path.expanduser(newpath) | |
if newpath == path: | |
break | |
else: | |
path = newpath |