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
<a href="http://desconf.org/"><img alt="EU VOU na desconf!" src="http://posterous.com/getfile/files.posterous.com/desconf/3B6GXqJJ1yeidq4ctDCK2jaHfp8JICDwXLP1puzqhmTKCHl7hsy8g3IJBkmP/image001.png" width="150" height="168"></a> |
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
[ | |
["1298302885", "1100"], | |
["1298907685"], | |
["1299512485", "1100"], | |
["1300117285", "1000"], | |
["1300722085", "1100"], | |
["1301326885", "1100"], | |
["1301931685"], | |
["1302536485", "1100"], | |
["1303141285", "1000"], |
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
; Weekly Coding Challenge 22 @ ThoughtWorks Brazil | |
; | |
; For a given set, find all subsets which the sum | |
; of its members is the closest smaller value to a | |
; given number | |
; | |
(ns tw.wcc | |
(:use [clojure.contrib.combinatorics])) |
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
var connStr = process.env.MONGOHQ_URL; | |
var config = { | |
name: 'database_name', | |
host: 'localhost', | |
port: 27017, | |
opts: {auto_reconnect: true} | |
}; | |
if (connStr) { | |
var url = require('url'); |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(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
# http://redis.io/commands/rpoplpush | |
module Resque | |
def self.move_queue(source, destination) | |
r = Resque.redis | |
r.llen("queue:#{source}").times do | |
r.rpoplpush("queue:#{source}", "queue:#{destination}") | |
end | |
end | |
end |
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
entries.each do |e| | |
begin | |
do_stuff(e) | |
rescue => error | |
$redis.lpush("failed_strip", e.id) # will create the list and/or append the value | |
end | |
# counting | |
puts "failed: " + $redis.llen("failed_strip") |
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
........ ........ | |
........ ........ | |
........ how . big ........ | |
........ ........ | |
........ ----- ----- ........ | |
........ I . |____ ........ | |
........ I | ........ | |
........ ----- ----- ........ | |
........ ........ | |
........ the conclusion...? ........ |
- https://2014.spaceappschallenge.org/challenge/climate-and-my-neighborhood/
- http://data.nasa.gov/
- http://aws.typepad.com/aws/2013/11/process-earth-science-data-on-aws-with-nasa-nex.html
- https://portal.nccs.nasa.gov/portal_home/published/NEX.html
- https://portal.nccs.nasa.gov/portal_home/published/NEX-DCP30_Tech_Note_v0.pdf
- https://nex.nasa.gov/nex/projects/1348/
- https://nex.nasa.gov/nex/projects/1348/wiki/general_data_access_and_apis/