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
#!/bin/sh | |
mkdir /tmp/ruby-build-patch | |
cd /tmp/ruby-build-patch | |
# download the patches | |
git clone git@github.com:skaes/rvm-patchsets.git | |
# download and rename the ruby-build version definition | |
wget https://raw.github.com/sstephenson/ruby-build/master/share/ruby-build/2.1.2 |
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
from numpy import * | |
from scipy.stats import beta | |
class BetaBandit(object): | |
def __init__(self, num_options=2, prior=(1.0,1.0)): | |
self.trials = zeros(shape=(num_options,), dtype=int) | |
self.successes = zeros(shape=(num_options,), dtype=int) | |
self.num_options = num_options | |
self.prior = prior |
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
class Player | |
constructor: (@node, @src) -> | |
@init() | |
init: -> | |
@node.src = @src | |
@node.play() | |
event: (type) -> | |
Bacon.fromEventTarget(@node, type).map ".currentTarget" |
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
begin | |
require 'launchy' | |
class Mechanize::Page | |
def open_in_browser | |
if body | |
file = File.new("/tmp/#{Time.now.to_i}.html", 'w') | |
file.write body | |
Launchy.open "file://#{file.path}" | |
system "sleep 2 && rm #{file.path} &" |
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
<!doctype html> | |
<html ng-app="sampleKinveyApp"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bootstrap, from Twitter</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<!-- Le styles --> |