Skip to content

Instantly share code, notes, and snippets.

View tucotuco's full-sized avatar

John Wieczorek tucotuco

View GitHub Profile
Generating public/private rsa key pair.
open /home/hadoop/.ssh/id_rsa failed: No such file or directory.
Saving the key failed: /home/hadoop/.ssh/id_rsa.
chmod: cannot access `/home/hadoop/.ssh/id_rsa': No such file or directory
./bootstrap.sh: line 17: /home/hadoop/.ssh/known_hosts: No such file or directory
./bootstrap.sh: line 21: /home/hadoop/.bashrc: No such file or directory
./bootstrap.sh: line 24: /home/hadoop/.bashrc: No such file or directory
./bootstrap.sh: line 27: /home/hadoop/.bashrc: No such file or directory
./bootstrap.sh: line 28: /home/hadoop/.bashrc: No such file or directory
./bootstrap.sh: line 30: /home/hadoop/.bashrc: No such file or directory
gulo.harvest=> (harvest-all "/mnt/beast" :path-file "/home/ubuntu/resource_list.txt")
"Harvesting 1 resources"
"Downloading records from http://ipt.vertnet.org:8080/ipt/resource.do?r=ccber_mammals"
" records found"
"Writing to /mnt/beast/2013-12-12/ccber_mammals-6caea6d4-b677-4e29-b574-0165e55b2396/ccber_mammals-6caea6d4-b677-4e29-b574-0165e55b2396.csv"
"Done harvesting ccber_mammals"
"Copying /mnt/beast/2013-12-12/ccber_mammals-6caea6d4-b677-4e29-b574-0165e55b2396 to gs://vn-harvest/data/2013-12-12/"
"Harvest complete."
nil
ERROR 2013-12-10 21:10:00,214 wsgi.py:262]
Traceback (most recent call last):
File "/Users/tuco/bin/google_appengine/google/appengine/runtime/wsgi.py", line 239, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/Users/tuco/bin/google_appengine/google/appengine/api/lib_config.py", line 353, in __getattr__
self._update_configs()
File "/Users/tuco/bin/google_appengine/google/appengine/api/lib_config.py", line 289, in _update_configs
self._registry.initialize()
File "/Users/tuco/bin/google_appengine/google/appengine/api/lib_config.py", line 164, in initialize
import_func(self._modname)
@tucotuco
tucotuco / gist:7900295
Created December 10, 2013 21:12
dev.sh logging
INFO 2013-12-10 21:10:00,053 appengine_config.py:31] /Users/tuco/Projects/VertNet/webapp/auth.txt
ERROR 2013-12-10 21:10:00,214 wsgi.py:262]
Traceback (most recent call last):
File "/Users/tuco/bin/google_appengine/google/appengine/runtime/wsgi.py", line 239, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/Users/tuco/bin/google_appengine/google/appengine/api/lib_config.py", line 353, in __getattr__
self._update_configs()
File "/Users/tuco/bin/google_appengine/google/appengine/api/lib_config.py", line 289, in _update_configs
self._registry.initialize()
File "/Users/tuco/bin/google_appengine/google/appengine/api/lib_config.py", line 164, in initialize
@tucotuco
tucotuco / vertnetportalsource.html
Created July 1, 2013 19:02
IE 8 view source on portal.vertnet.org 1 July 2013
<!DOCTYPE html>
<html lang="en">
<head>
<title></title
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="VertNet data portal">
<meta name="author" content="Vertnet project">
<link href="/css/docs.css" rel="stylesheet">
@tucotuco
tucotuco / has_tissue.py
Last active December 18, 2015 17:19
Darwin Core record tissue detector. Looking for tissue indicators in the Darwin Core term 'preparations'.
def has_tissue(rec):
if rec.has_key('preparations'):
tissuetokens = ["+t", "tiss", "blood", "dmso", "dna", "extract", "froz",
"forzen", "freez", "heart", "muscle", "higado", "kidney",
"liver", "lung", "nitrogen", "pectoral", "ri\x96on",
"kidney", "rnalater", "sample", "sangre", "toe", "spleen"]
for token in tissuetokens:
if token in rec['preparations'].lower():
return True
return False
@tucotuco
tucotuco / rank.py
Created June 18, 2013 20:09
DwC rank determiner.
def is_number(s):
try:
float(s)
return True
except ValueError:
return False
def valid_latlng(lat,lng):
# accepts lat and lng as strings.
if not is_number(lat):
@tucotuco
tucotuco / has_media.py
Created June 18, 2013 19:04
Darwin Core media detector.
def has_media(rec):
if rec.has_key('associatedmedia'):
return True
if rec.has_key('type'):
if rec['type'].lower()=='sound':
return True
if 'image' in rec['type'].lower():
return True
return False
if rec.has_key('basisofrecord'):
@tucotuco
tucotuco / record_type.py
Last active December 18, 2015 15:59
Darwin Core record type function
def record_type(rec):
if rec.has_key('type'):
if rec['type'].lower() == 'physicalobject':
return 'specimen'
return 'observation'
if rec.has_key('basisofrecord'):
if 'spec' in rec[basisofrecord].lower():
return 'specimen'
return 'observation'
return 'unknown'
@tucotuco
tucotuco / GeomancerTester3.html
Created February 7, 2013 16:59
First UI test from Tommy
<html>
<head>
<title>Geomancer Test Page</title>
<script src="http://www.desarrolloweb.com/articulos/ejemplos/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
<script>
function getFormat() {
var ua = $.browser;
if (ua.msie) {
return "&f=csv"
} else {