Skip to content

Instantly share code, notes, and snippets.

Marten Veldthuis marten

Block or report user

Report or block marten

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
View README.md
View README.md
View subjects.csv
uuid location:1 location:2 metadata:size metadata:cuteness
1 https://placekitten.com/200/300.jpg https://placekitten.com/200/100.jpg small cute
2 https://placekitten.com/400/900.jpg https://placekitten.com/500/100.jpg large cute
@marten
marten / data.rb
Last active Oct 26, 2017
Timelapse code (Processing.org and Ruby) for AutumnWatch 2017
View data.rb
require 'csv'
require 'active_support/all'
require 'json'
require 'pry'
output = []
puts "Loading subject info"
subjects = CSV.read("subjects.csv", headers: true)
subjects = subjects.map {|row|
View time-spent.rb
require 'csv'
require 'json'
require 'time'
users = {}
CSV.new(ARGF, headers: true).each do |row|
STDERR.print '.'
user_id = row["user_id"]
metadata = JSON.parse(row["metadata"])
View upload_external_src_gorongoza.rb
require 'csv'
#prod
project = Project.find(593)
zoo_user = User.find(1)
subject_set = SubjectSet.find(681)
#staging
# project = Project.find(450)
# zoo_user = User.find(27)
View upload_external_src_gorongoza.rb
require 'csv'
#prod
project = Project.find(593)
zoo_user = User.find(1)
subject_set = SubjectSet.find(681)
#staging
# project = Project.find(450)
# zoo_user = User.find(27)
View upload_external_src_gorongoza.rb
require 'csv'
#prod
project = Project.find(593)
zoo_user = User.find(1)
subject_set = SubjectSet.find(681)
#staging
# project = Project.find(450)
# zoo_user = User.find(27)
View hhmi-23k.csv
We can't make this file beautiful and searchable because it's too large.
FileName,Gorongosa_id,camera,year,season,month,DateUTC,TimeUTC,time_period,distance_water,distance_human,vegetation_edu,ESId
http://zooniverse-export.s3-website-us-east-1.amazonaws.com/21484_1000_D09_Season%201_Set%201_EK001729.JPG,21484_1000_D09_Season 1_Set 1_EK001729,D09,2013,DryWet Oct-Dec,Dec,12/6/2013,12:07:57 PM,Day 0623-1709,3077.7,0.01,Mixed Savanna and Woodland,
http://zooniverse-export.s3-website-us-east-1.amazonaws.com/21484_1000_D09_Season%201_Set%201_EK001805.JPG,21484_1000_D09_Season 1_Set 1_EK001805,D09,2013,DryWet Oct-Dec,Dec,12/6/2013,12:06:43 PM,Day 0623-1709,3077.7,0.01,Mixed Savanna and Woodland,
http://zooniverse-export.s3-website-us-east-1.amazonaws.com/21484_1000_D09_Season%201_Set%201_EK001725.JPG,21484_1000_D09_Season 1_Set 1_EK001725,D09,2013,DryWet Oct-Dec,Dec,12/6/2013,12:04:55 PM,Day 0623-1709,3077.7,0.01,Mixed Savanna and Woodland,
View upload_external_src_gorongoza.rb
require 'csv'
#prod
project = Project.find(593)
zoo_user = User.find(1)
subject_set = SubjectSet.find(681)
#staging
# project = Project.find(450)
# zoo_user = User.find(27)
You can’t perform that action at this time.