Number of responses by zip code from the USGS' site from the 2010-11-05 3.2 quake near Piedmont, CA, USA, via Yahoo! Pipes.
This file contains hidden or 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
/** | |
* Original author: David Eads (https://github.com/eads) | |
* | |
* Wrap D3 charting components in a simple Backbone view interface | |
* | |
* Provides a redrawing path, data sync, and fallback for non-d3 browsers. | |
* | |
* Views that extend ChartView should implement their own "draw" function and go to work. | |
* | |
* var collection = new Backbone.Collection([ ["Maria", 33], ["Heather", 29] ]); |
This file contains hidden or 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
class DocumentUploader < CarrierWave::Uploader::Base | |
include CarrierWave::RMagick | |
# Store on Amazon S3 using Fog | |
storage :fog | |
# Directory where uploaded files will be stored. | |
def store_dir | |
"documents/#{model.id}" | |
end |
This file contains hidden or 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
def isWin(board): | |
""" | |
GIven a board checks if it is in a winning state. | |
Arguments: | |
board: a list containing X,O or -. | |
Return Value: | |
True if board in winning state. Else False | |
""" |