Skip to content

Instantly share code, notes, and snippets.

Ryan Baumann ryanfb

Block or report user

Report or block ryanfb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ryanfb /
Created Nov 26, 2019
Fusion Tables Migration Alternatives
  • Datasette on Heroku
  • Heroku Postgres
  • Google Bigtable - $.65/hr
  • Google BigQuery - $5/TB of queried data, $.02/GB/mo stored
  • Google Cloud Datastore - 1GB free, .18GB/month above
  • Google Cloud Firestore - similar to Datastore
  • Google Sheets
  • Google Cloud SQL (MySQL/PostgreSQL)
  • AWS DynamoDB - NoSQL, 25GB free, $0.25/1M read request units
  • AWS Athena - costs per TB scanned, reads data from S3 buckets
View pdftogt.rb
#!/usr/bin/env ruby
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
require 'nokogiri'
pdf_filename = ARGV[0]
xml_filename = File.basename(pdf_filename,'.pdf') + '.xml'
ryanfb / ancientgreekspeak.rb
Last active May 9, 2019
Ruby script for transliterating Ancient Greek to Apple phonemes for text-to-speech synthesis - updates at
View ancientgreekspeak.rb
#!/usr/bin/env ruby
require 'i18n'
Encoding.default_external = Encoding::UTF_8
# Usage: Takes Unicode Polytonic Greek on STDIN or as arguments, outputs
# phonetic pronunciation on STDOUT designed to be piped into the Mac `say` command.
# e.g.:
# echo 'ἄγω ἄξω ἤγαγον ἦχα ἤγμαι ἤχθην' | ./ancientgreekspeak.rb | say
ryanfb / test_a1.txt
Last active Aug 10, 2018
dhSegment MicroPasts train/val/test split
View test_a1.txt


Ryan Baumann

Duke Collaboratory for Classics Computing


ryanfb / georgeblood.m3u
Last active Aug 10, 2017
An M3U playlist of items in the Internet Archive 78rpm collection:
View georgeblood.m3u
This file has been truncated, but you can view the full file.!.%20Tam%20Za%20Vahom;%202.%20Horicka%20Zelena%20-%20Andrej%20Gellert.mp3;%20(2)%20Rain%20Song%20-%20Elizabeth%20Wheeler.mp3…%20Tramp%20Along%20the%20Highway%20-%20Nelson%20Eddy%20-%20Nathaniel%20Shilkret%20and%20Orchestra.mp3
ryanfb /
Created Feb 24, 2017
MIDI Synthesis / DeepBach notes
ryanfb / hdhomerun-screenshot.rb
Created Oct 1, 2016
Screenshot a random channel from your HDHomeRun device
View hdhomerun-screenshot.rb
#!/usr/bin/env ruby
require 'net/http'
require 'json'
# hdhomerun device ASDF found at
hdhomerun_discover = `hdhomerun_config discover | head -1`
hdhomerun_ip = hdhomerun_discover.split(' ').last
lineup = JSON.parse(Net::HTTP.get(URI("http://#{hdhomerun_ip}/lineup.json")))
ryanfb /
Last active Sep 26, 2016
Quick-and-Dirty Filtering of Pleiades Places by Modern Country with GDAL ogr2ogr

In this tutorial, I'll give a quick way to filter Pleiades places to those contained within a modern country's borders.

Install GDAL with brew install gdal (on a Mac) or download GDAL binaries for your platform.

Download a modern country's shapefile (for this example, Bulgaria) from GADM:

Download the latest Pleiades KMZ data dump. Unzip to KML with unzip pleiades-latest.kmz.

Use the top-level administrative boundary for Bulgaria to clip the resulting tmp/doc.kml file and save the result as GeoJSON:

ryanfb /
Last active Apr 4, 2018
DeepMask / SharpMask training notes


These are my public, unorganized notes on stumbling blocks I've run across setting up DeepMask / SharpMask for training:


An alternative (non-Facebook, Python instead of Torch) open-source implementation of DeepMask was previously available here:

Before the Facebook code was released, I started some work on Dockerizing this implementation which may also help others use it:

You can’t perform that action at this time.