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/sh | |
# | |
# img2pdf | |
# | |
# OS X bash script that turns a collection of images into an OCR'd PDF | |
# | |
# Adapted from http://apple.stackexchange.com/questions/128384/ocr-on-pdfs-in-os-x-with-free-open-source-tools, | |
# where it was in turn adapted from | |
# http://www.morethantechnical.com/2013/11/21/creating-a-searchable-pdf-with-opensource-tools-ghostscript-hocr2pdf-and-tesseract-ocr/ | |
# from http://www.ehow.com/how_6874571_merge-pdf-files-ghostscript.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
/* | |
d3.phylogram.js | |
Wrapper around a d3-based phylogram (tree where branch lengths are scaled) | |
Also includes a radial dendrogram visualization (branch lengths not scaled) | |
along with some helper methods for building angled-branch trees. | |
Copyright (c) 2013, Ken-ichi Ueda | |
All rights reserved. |
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
slug = ARGV[0] | |
open( "https://api.inaturalist.org/v1/places/#{slug}" ) do |f| | |
json = JSON.parse( f.read )["results"][0] | |
if !json | |
puts "No results" | |
exit! | |
end | |
if existing = Place.where( name: json["name"] ).exists? | |
puts "Already exists: #{existing}" | |
exit! |
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
#encoding: utf-8 | |
# | |
# Script to parse Esslinger's A Cumulative Checklist for the Lichen-forming, | |
# Lichenicolous and Allied Fungi of the Continental United States and Canada | |
# into machine-readable CSV. | |
# | |
# Esslinger's checklist (e.g. | |
# http://www.ndsu.edu/pubweb/~esslinge/chcklst/chcklst7.htm) is considered | |
# authoritative for North American lichens, but it's authored with MS Word and | |
# has incosistent formatting. This script attempts to smooth that out and |
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 requests | |
site = "https://www.inaturalist.org" | |
app_id = 'YOUR APP ID' | |
app_secret = 'YOUR APP SECRET' | |
username = 'YOUR USERNAME' | |
password = 'YOUR PASSWORD' | |
# Send a POST request to /oauth/token with the username and password | |
payload = { |
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
height: 800 |
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
require "rubygems" | |
require "rest_client" | |
require "digest" | |
require "base64" | |
site = "https://www.inaturalist.org" | |
app_id = 'YOUR_APP_ID' | |
redirect_uri = 'YOUR_REDIRECT_URL' # you can set this to some URL you control for testing | |
code_verifier = "supersecretverifier" |
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
{ scopeName = 'text.plain'; | |
foldingStartMarker = '/\*\*|\{\s*$'; | |
foldingStopMarker = '\*\*/|^\s*\}'; | |
patterns = ( | |
{ name = 'markup.bold'; | |
match = '^\s*(\*\s.*)$\n?'; | |
}, | |
{ name = 'comment'; | |
match = '^\s*(x\s.*)$\n?'; | |
}, |
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 Windshaft = require('lib/windshaft'); | |
var _ = require('underscore'); | |
var config = { | |
base_url: '/:table', | |
base_url_notable: '/', | |
grainstore: { | |
datasource: { | |
user:'kueda', | |
host: '127.0.0.1', | |
port: 5432, |
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
App.TaxonTileController = Ember.ObjectController.extend({ | |
defaultPhotoUrl: function() { | |
var guideTaxon = this.get('content') | |
var photos = guideTaxon.get('guidePhotos') | |
var photo = photos ? photos.get('lastObject') : null | |
var url = photo ? photo.get('url') : 'http://www.inaturalist.org/images/animals.jpg' | |
if (photo) { | |
console.log("[DEBUG] photo._data.attributes: ", photo._data.attributes) // this is an empty object | |
} | |
return url |
NewerOlder