Skip to content

Instantly share code, notes, and snippets.

Avatar

Stuart Lynn stuartlynn

  • Two Sigma
  • Brooklyn
View GitHub Profile
@stuartlynn
stuartlynn / data.js
Created Aug 26, 2015
GeoJSON example for GDI
View data.js
var geojson = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
View data.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View usstates.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stuartlynn
stuartlynn / gist:51890ceeadda90102b5e
Created May 27, 2014
Language stats for project
View gist:51890ceeadda90102b5e
require 'mongo'
client = Mongo::MongoClient.new
db = client["ouroboros"]
stats = {}
total = db["galaxy_zoo_classifications"].count
done = 0
db["galaxy_zoo_classifications"].find.each do |classification|
@stuartlynn
stuartlynn / gist:d32e62cc4256c8526945
Created May 27, 2014
Planet hunters language stats
View gist:d32e62cc4256c8526945
select application_identifier, count(*), count(distinct zooniverse_user_id) from classifications where zooniverse_user_id is not null group by application_identifier
select application_identifier, count(*), count(distinct session_id) from classifications where zooniverse_user_id is null group by application_identifier
View gist:91668bf98c46c51aeb6c
import kplr
import json
import csv
import code
import numpy as np
import sys
from itertools import izip
View gist:650d44ec7b1deb3904e3
require 'pg'
require 'rmagick'
require 'pry'
require 'json'
require 'date'
client = PG.connect(dbname: "world")
no_rows = 20#40
no_colls = 20#40
View gist:675cf0dc10e085bff177
require 'json'
require 'pry'
require 'aws-sdk'
require 'bson'
AWS.config access_key_id: ENV['S3_ACCESS_ID'], secret_access_key: ENV['S3_SECRET_KEY']
s3 = AWS::S3.new
bucket = s3.buckets['zooniverse-static']
@stuartlynn
stuartlynn / gist:7dad3e6b01a12d2957cb
Created Oct 20, 2014
Planet hunter mini course analysis
View gist:7dad3e6b01a12d2957cb
{
"metadata": {
"name": "Minicourse Analysis"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
View gist:28e5bb8b294d68603a64
require 'pry'
require 'bson'
require 'json'
manifest = []
outfile = 'for_testing'
blank_images = []
["MRE11 TMAs.zip"].each do |zip_name|