Skip to content

Instantly share code, notes, and snippets.


brian piercy bjpcjp

View GitHub Profile
import scrapy
class StackOverflowSpider(scrapy.Spider):
name = 'stackoverflow'
start_urls = ['']
def parse(self, response):
for href in response.css('.question-summary h3 a::attr(href)'):
View nodejs setup on Dreamhost VPS
1) Make a download dir to store the node source and download it.
mkdir downloads
cd downloads
git clone
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 / denominator-snippet.rb
Created Sep 12, 2012 — forked from rweald/denominator-snippet.rb
Code Snippets for Simple Linear Regression Using Ruby Blog Post
View denominator-snippet.rb
denominator = @xs.reduce(0) do |sum, x|
sum + ((x - x_mean) ** 2)