Fun with PostGIS, or, how Kanye sees the world.
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
<html> | |
<body> | |
<div id="hierarchy"></div> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.7.2/mustache.min.js"></script> | |
<script type="text/template" id="recursive-partial"> | |
<ul> | |
{{#phyla}} |
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
"buildTaxonHierarchy": function(data) { | |
var occurrenceTree = {"phyla": []}; | |
// Some preproccessing | |
data.records.forEach(function(d) { | |
d.rank = (d.rnk) ? taxaBrowser.rankMap(d.rnk) : "Unknown"; | |
d.itallics = (d.rnk < 6) ? "itallics" : ""; | |
d.old_name = (d.tna.split(" ")[0] != d.idt) ? d.tna : ""; | |
d.display_name1 = (d.tna === (d.idt + " " + d.ids)) ? d.tna : d.idt; | |
d.display_name2 = (d.tna === (d.idt + " " + d.ids)) ? d.tna : d.ids; |
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
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
#content { | |
margin:2%; | |
padding:20px; | |
border:2px solid #d0d0d0; | |
border-radius: 5px; | |
} |
Following the syntax of this tutorial C-a
= Control + a
Command | Description |
---|---|
screen |
Start screen |
C-a c |
Create a new window |
C-a n |
Switch to next window |
C-a p |
Switch to previous window |
sudo su
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
pip install MySQL-python
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
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
var test = { | |
a: function() { | |
console.log("function a"); | |
}, | |
b: function(a) { | |
console.log(a*a); | |
}, | |
c: function() { |
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
/* Largely borrowed from the excellent Turf.js | |
https://github.com/Turfjs/turf-distance/blob/master/index.js */ | |
function distance(a, b) { | |
function toRadians(degree) { | |
return degree * Math.PI / 180; | |
} | |
var R = 57.2957795, | |
dLat = toRadians(b.lat - a.lat), | |
dLon = toRadians(b.lng - a.lng); |
Terms of Use: By using X, you acknowledge and agree that X and all of the data contained in X belongs exclusively to X Inc. and is protected by copyright and other law. X is provided solely for the personal, non-commercial use of current and prospective Aetna members and providers. Use of any robot, spider or other intelligent agent to copy content from X, extract any portion of it or otherwise cause X to be burdened with unwarranted high access or transaction activity is strictly prohibited. Aetna reserves all rights to take appropriate civil, criminal or injunctive action to enforce these terms of use.
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 | |
cd ~ | |
curl "http://www.kyngchaos.com/files/software/frameworks/GDAL_Complete-1.11.dmg" -o "GDAL_Complete-1.11.dmg" | |
hdiutil mount GDAL_Complete-1.11.dmg | |
sudo installer -pkg /Volumes/GDAL\ Complete/NumPy.pkg -target / | |
sudo installer -pkg /Volumes/GDAL\ Complete/GDAL\ Complete.pkg -target / | |
diskutil unmount /Volumes/GDAL\ Complete | |
rm GDAL_Complete-1.11.dmg |
OlderNewer