Skip to content

Instantly share code, notes, and snippets.

View bjpcjp's full-sized avatar
💭
Fully caffeinated for your safety

brian piercy bjpcjp

💭
Fully caffeinated for your safety
View GitHub Profile
# source: http://multithreaded.stitchfix.com/blog/2016/01/13/market-watch/
# https://github.com/klarsen1/MarketMatching
# from terminal command line:
sudo apt-get install libcurl4-openssl-dev
# from R command line:
# install CausalImpact package:
install.packages("devtools")
import scrapy
class StackOverflowSpider(scrapy.Spider):
name = 'stackoverflow'
start_urls = ['http://stackoverflow.com/questions?sort=votes']
def parse(self, response):
for href in response.css('.question-summary h3 a::attr(href)'):
1) Make a download dir to store the node source and download it.
mkdir downloads
cd downloads
git clone https://github.com/joyent/node.git
Find the latest version
2) List all of the tags in the repository, and check out the most recent.
git tag
git checkout v0.9.9
@bjpcjp
bjpcjp / denominator-snippet.rb
Created September 12, 2012 01:24 — forked from rweald/denominator-snippet.rb
Code Snippets for Simple Linear Regression Using Ruby Blog Post
denominator = @xs.reduce(0) do |sum, x|
sum + ((x - x_mean) ** 2)
end