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
function touchHandler(event) | |
+ { | |
+ var touches = event.changedTouches, | |
+ first = touches[0], | |
+ type = ""; | |
+ switch (event.type) | |
+ { | |
+ case "touchstart": | |
+ type = "mousedown"; | |
+ break; |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; | |
div{ | |
width: 200px |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: red; | |
min-height: 100%; |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; | |
h1{ | |
color: red; |
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 'sinatra' | |
require 'pg' | |
require 'json' | |
require 'uri' | |
hash = URI.parse(ENV['HEROKU_POSTGRESQL_WHITE_URL'] || "http://localhost:5432/geo") | |
Client = PG.connect(hash.host, hash.port, nil , nil , hash.path.gsub("/",""), hash.user, hash.password) | |
# Client = Mysql2::Client.new(:host => "localhost", :username => "root") |
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 '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| |
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
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 |
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 kplr | |
import json | |
import csv | |
import code | |
import numpy as np | |
import sys | |
from itertools import izip | |
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 'pg' | |
require 'rmagick' | |
require 'pry' | |
require 'json' | |
require 'date' | |
client = PG.connect(dbname: "world") | |
no_rows = 20#40 | |
no_colls = 20#40 |
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 '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'] |
OlderNewer