Skip to content

Instantly share code, notes, and snippets.

View tylerritchie's full-sized avatar

Tyler Ritchie tylerritchie

View GitHub Profile
@tylerritchie
tylerritchie / naeb
Last active April 3, 2021 02:35 — forked from Oreotrephes/naeb
require(rvest)
require(httr)
setwd('~/p/species-scrape')
output_file_name<-'output.txt'
error_urls_file_name<-'error_urls.txt'
for(i in 6174:45000){ #or 1, or whatever
url <- paste0("http://naeb.brit.org/uses/",i) #
message("Scraping ", url)
tryCatch({
# RETRY() will default to 3 retries and add some jitter to the retries as well
require 'formula'
class Sphinx < Formula
homepage 'http://www.sphinxsearch.com'
url 'http://sphinxsearch.com/files/sphinx-2.1.9-release.tar.gz'
sha1 '2ddd945eb0a7de532a7aaed2e933ac05b978cff2'
head 'http://sphinxsearch.googlecode.com/svn/trunk/'
bottle do
available.packages<-function (contriburl = contrib.url(getOption("repos"), type),
method, fields = NULL, type = getOption("pkgType"), filters = NULL)
{
requiredFields <- c(tools:::.get_standard_repository_db_fields(),
"File")
if (is.null(fields))
fields <- requiredFields
else {
stopifnot(is.character(fields))
fields <- unique(c(requiredFields, fields))
defined? foo
#=> nil
if false
foo = 1
end
defined? foo
# => "local-variable"
foo
[{name:"Calvin",email:"spaceman.spiff@gross.club"},
{name:"Ender Wiggin",email:"ender@battle.edu"},
{name:"Guybrush Threepwood",email:"mightypirate@grogmail.com"},
{name:"Arya Stark",email:"needle@mail.wi.wes"},
{name:"Hermione Granger",email:"hg@spew.org.uk"},
{name:"Matilda Wormwood",email:"m.wormwood@crunchem.edu"},
{name:"Lando Calrissian",email:"calrissian@cloud.ci"},
{name:"Dana Scully",email:"dana.scully@fbi.gov"}]
require 'formula'
class Proj47 < Formula
homepage 'http://trac.osgeo.org/proj/'
url 'http://download.osgeo.org/proj/proj-4.7.0.tar.gz'
sha1 'bfe59b8dc1ea0c57e1426c37ff2b238fea66acd7'
# The datum grid files are required to support datum shifting
resource 'datumgrid' do
url 'http://download.osgeo.org/proj/proj-datumgrid-1.5.zip'
@tylerritchie
tylerritchie / TKPro_info.md
Created February 12, 2011 19:29
Documentation for GPS Tracking Key Pro GPSBabel style file

GPS Tracking Key Pro from Land Air Sea, text format (.txt)

This format can...

  • Read tracks

Read-only support for the text format exported by Land Air Sea's (Windows only) Past-Track software. This may also work for importing text formatted files from Victoria GPS Tracking, GPS Tracking Key and Land Air Sea's other devices.

Implementation

@tylerritchie
tylerritchie / trackkeypro.style
Created February 5, 2011 04:17
GPSBabel style file for Land Air Sea GPS Tracking Key Pro
# Format: GPS Tracking Key Pro text file
# Author: Tyler Ritchie
# Date: 2011.02.04
DESCRIPTION GPS Tracking Key Pro text
EXTENSION txt
ENCODING LATIN1
DATUM WGS 84
@tylerritchie
tylerritchie / ktpro2unicsv.py
Created February 4, 2011 06:34
For converting from Key Track Pro to GPS Babel universal csv format
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ktpro2kml.py v0.01
Version by Tyler Ritchie: http://tylerritchie.com
License: http://creativecommons.org/licenses/BSD/
"""
from datetime import datetime
import os