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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
<script src="http://cmx.io/v/0.1/cmx.js"></script> | |
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style> | |
<body> | |
<div style="max-width:900px; -webkit-transform:rotate(0deg);"> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
<script src="http://cmx.io/v/0.1/cmx.js"></script> | |
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style> | |
<body> | |
<div style="max-width:900px; -webkit-transform:rotate(0deg);"> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> |
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
bundle exec cap develop deploy --trace | |
/home/vagrant/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/gems/1.9.1/gems/sshkit-1.1.0/lib/sshkit.rb:3: warning: already initialized constant StandardError | |
cap aborted! | |
cannot load such file -- deploy | |
/vagrant/Capfile:1:in `load' | |
/vagrant/Capfile:1:in `<top (required)>' | |
/home/vagrant/.rvm/gems/ruby-1.9.3-p448@global/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load' | |
/home/vagrant/.rvm/gems/ruby-1.9.3-p448@global/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load_rakefile' | |
/home/vagrant/.rvm/gems/ruby-1.9.3-p448@global/gems/rake-10.1.0/lib/rake/application.rb:637:in `raw_load_rakefile' | |
/home/vagrant/.rvm/gems/ruby-1.9.3-p448@global/gems/rake-10.1.0/lib/rake/application.rb:94:in `block in load_rakefile' |
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
1) DomEventBinder #hasMetaKey given the shift key is held down returns true: | |
TypeError: 'undefined' is not an object (evaluating 'this.domEventBinder.hasMetaKey') | |
at http://localhost:8001/browser/dist/browserified_tests.js:28197 | |
at callFn (http://localhost:8001/node_modules/mocha/mocha.js:4338) | |
at http://localhost:8001/node_modules/mocha/mocha.js:4331 | |
at http://localhost:8001/node_modules/mocha/mocha.js:4728 | |
at http://localhost:8001/node_modules/mocha/mocha.js:4819 | |
at next (http://localhost:8001/node_modules/mocha/mocha.js:4653) | |
at http://localhost:8001/node_modules/mocha/mocha.js:4663 | |
at next (http://localhost:8001/node_modules/mocha/mocha.js:4601) |
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
for i in *; do echo $i && git blame $i --line-porcelain | grep 'author ' | cut -b 8-25 | sort | uniq -c | sort -r | head -n 1; done |
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 roll | |
Random.rand(10) + 1 | |
end | |
# Monte Carlo-in it | |
(1...10000000).inject(0){ |avg,i| avg += (roll - avg).to_f/i } | |
(1...10000000).inject(0){ |avg,i| avg += ([roll, roll, roll, roll].max - avg).to_f/i } | |
# Closed form thx http://math.stackexchange.com/questions/150586/expected-value-of-max-of-iid-variables |
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
module JeremyHash | |
refine Hash do | |
def hash_collect | |
Hash[*(collect_concat {|k, v| yield k, v})] | |
end | |
end | |
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
class FunnelStrategy < ActiveRecord::Base | |
belongs_to :organization | |
STATES = State.new [ | |
:company_information, | |
:strategy_information, | |
:account_information, | |
:landing_page, | |
:email_1, |
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 Pack | |
attr_accessor :pieces | |
COLORS = [:blue, :green, :yellow, :red] | |
def initialize | |
@pieces = (1..6).map{|_| COLORS.sample } | |
end | |
def has_all? |
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
%matplotlib nbagg | |
from scipy import stats | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import collections as mc | |
x = [2000, 2001, 2007, 2008, 2013, 2014, 2015, 2016] | |
y = [5, 8, 14, 18, 38, 46, 63, 72] |
OlderNewer