Click on the map to add points. See the console for lat/long output.
View pandas.py
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
# Unique values in a dataframe column | |
df['column_name'].unique() | |
# Grab dataframe rows where column = value | |
df = df.loc[df.column == 'some_value'] | |
# Grab dataframe rows where column value is present in a list | |
value_list = ['value1', 'value2', 'value3'] | |
df = df.loc[:,df.columns.isin(valuelist)] | |
# or grab rows where a value is not present in a list |
View index.html
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"> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script src="http://www.webglearth.com/v2/api.js"></script> | |
<script> | |
function map() { | |
var options = { zoom: 1.5, position: [47.19537,8.524404] }; | |
var earth = new WE.map('earth_div', options); |
View batch.sh
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
# This requires the use of GhostScript | |
# On macOS, the easiest way to get started is install with Homebrew | |
# brew install ghostscript | |
# | |
# This file should live in the directory that contains the PDFs. From | |
# the command line, just running `bash batch.sh` will compress the PDFs | |
# and fix any issues that might be present with JPEG2000 images. The | |
# compression process should preserve the OCR and will likely reduce the | |
# size of the PDF as well. | |
# |
View asc_crawler.py
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 tweepy | |
# OAuth is the preferred method for authenticating to Twitter | |
# Consumer keys are under the application's Details page at | |
# http://dev.twitter.com/apps | |
consumer_key = "" | |
consumer_secret = "" | |
# Access tokens are found on your applications' Details page | |
# at http://dev.twitter.com/apps. |
View multiserver.js
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 http = require('http'); | |
function handler(req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello world\n'); | |
} | |
http.createServer(handler).listen(3000, '127.0.0.1'); | |
http.createServer(handler).listen(3001, 'localhost'); | |
http.createServer(handler).listen(3002, '127.0.0.1'); // ifconfig | |
http.createServer(handler).listen(3003, 'host.example.com'); // echo $HOSTNAME |
View gdal.sh
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
# Install subversion | |
sudo apt-get -y install subversion | |
# Install g++ | |
sudo apt-get -y install g++ | |
# Install Hierarchical Data Format library | |
sudo apt-get -y install libhdf4-alt-dev | |
# Get trunk of gdal |
View geojson_convert.sh
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
# Bulk convert shapefiles to geojson | |
function shp2geojson() { | |
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp" | |
} | |
for var in *.shp; do shp2geojson ${var%\.*}; done |
View keybase.md
Keybase proof
I hereby claim:
- I am hepplerj on github.
- I am jaheppler (https://keybase.io/jaheppler) on keybase.
- I have a public key ASDXbDTSmWJiyDZ6URLp6rKUdG-84IRsPjYEJWYog7YOcgo
To claim this, I am signing this object:
View scc-tracts.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.