JSON
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
| require 'spec_helper' | |
| describe "schedule" do | |
| describe "file" do | |
| it "should be present and named correctly" do | |
| expect { | |
| File.exists?("#{Rails.root}/config/schedule.rb") | |
| }.to be_true | |
| 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
| from matplotlib import use | |
| from pylab import * | |
| from scipy.stats import beta, norm, uniform | |
| from random import random | |
| from numpy import * | |
| import numpy as np | |
| import os | |
| # Input data |
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
| from pylab import * | |
| from scipy.stats import beta, norm, uniform | |
| from random import random | |
| from numpy import * | |
| import numpy as np | |
| import os | |
| # Input data | |
| prior_params = [ (1, 1), (1,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
| # SSL self signed localhost for rails start to finish, no red warnings. | |
| # 0) Unless present, create `~/.ssl/` | |
| $ mkdir ~/.ssl | |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ openssl genrsa -des3 -out ~/.ssl/localhost.orig.key 2048 |
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
| -- check for exact matches | |
| WITH index_cols_ord as ( | |
| SELECT attrelid, attnum, attname | |
| FROM pg_attribute | |
| JOIN pg_index ON indexrelid = attrelid | |
| WHERE indkey[0] > 0 | |
| ORDER BY attrelid, attnum | |
| ), | |
| index_col_list AS ( | |
| SELECT attrelid, |
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
| -- check for containment | |
| -- i.e. index A contains index B | |
| -- and both share the same first column | |
| -- but they are NOT identical | |
| WITH index_cols_ord as ( | |
| SELECT attrelid, attnum, attname | |
| FROM pg_attribute | |
| JOIN pg_index ON indexrelid = attrelid | |
| WHERE indkey[0] > 0 |
The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
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
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| import math | |
| def calc_ab(alpha_a, beta_a, alpha_b, beta_b): | |
| ''' | |
| See http://www.evanmiller.org/bayesian-ab-testing.html | |
| αA is one plus the number of successes for A |
This is the source for the scripts discussed in https://robots.thoughtbot.com/improving-user-experience-with-shell-scripts
Both scripts are in the bin/ directory of the repo that contains all the markdown documents for blog posts.
Users run bin/server and everything is automatically set up for them to view a local preview of the blog.
bin/server-setup is a dependency of bin/server and is never run directly by users.
Maitre-d is the name of the "blog engine" discussed in the article.