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
# 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") |
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
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)'): |
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
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 |
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
denominator = @xs.reduce(0) do |sum, x| | |
sum + ((x - x_mean) ** 2) | |
end |
NewerOlder