Skip to content

Instantly share code, notes, and snippets.

View vbrown608's full-sized avatar

Vivian Brown vbrown608

  • San Francisco, CA
View GitHub Profile
@rnagle
rnagle / ChartView.js
Created March 7, 2014 19:17
ChartView.js
/**
* 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] ]);
@willkoehler
willkoehler / document_uploader.rb
Created February 11, 2014 15:14
Carrier uploader for documents that creates thumbnails from images and PDFs
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
@SudhagarS
SudhagarS / tictactoe.py
Created October 23, 2012 22:17
Tic Tac Toe AI implemented in Python using MiniMax algorithm.
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
"""
@johan
johan / README.md
Created November 6, 2011 22:37 — forked from johan/README.md
Bay Area earthquake responses by zip code