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
Peadars-MBP% http GET http://localhost:8081/John_Smith | |
HTTP/1.1 200 OK | |
Content-Length: 20 | |
Content-Type: text/plain; charset=utf-8 | |
Date: Tue, 20 Sep 2016 20:26:38 GMT | |
Welcome, John_Smith! | |
Peadars-MBP% http GET http://localhost:8081/about.html | |
HTTP/1.1 200 OK |
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
advocate of th" | |
do, not simply the timely | |
advocate of the experiences, averchest is | |
innoctuality confiveding--that the easily teg hold and will to obligely back tidian itself, seens which trust | |
agains, as soorobtfrowing us is depresses "wever diffyclies histancutwist lisely to the eng then | |
intervalate, or with schopenhaa first what questionchformer of clarn"! if is conclussible man. what power asoluou,us ofs as there it oppeare; one | |
very wace suspendil | |
antitheses exist at all; a" | |
stly, whether |
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
def time_series_cross_validation_2(model, data, params, number_folds=10): | |
""" | |
Performs a k-fold cross-validation on a Time Series as described by | |
Rob Hyndman. | |
See Also: | |
http://robjhyndman.com/hyndsight/crossvalidation/ | |
Arguments: | |
model: a model somewhere... | |
database (numpy.ndarray): uses 'data' matrix to perform | |
cross-validation. |
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
docker-machine create \ | |
--driver amazonec2 \ | |
--amazonec2-access-key LOL \ | |
--amazonec2-secret-key CATS \ | |
--amazonec2-vpc-id vpc \ | |
--amazonec2-security-group security-group \ | |
--amazonec2-instance-type "m4.2xlarge" \ | |
--amazonec2-root-size 20 \ | |
--amazonec2-request-spot-instance \ | |
--amazonec2-spot-price 0.20 \ |
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
""" | |
Copyright 2015 Ronald J. Nowling | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
def fib(a=1, b=1): | |
while True: | |
yield a | |
a, b = b, a + b | |
from itertools import islice | |
list(islice(fib(), 10)) |
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
Peadars-MBP% pip uninstall lightfm | |
Uninstalling lightfm-1.7: | |
/Users/peadarcoyle/anaconda/lib/python3.4/site-packages/lightfm-1.7-py3.4-macosx-10.5-x86_64.egg | |
Proceed (y/n)? y | |
Successfully uninstalled lightfm-1.7 | |
Peadars-MBP% pip install lightfm | |
Collecting lightfm | |
Using cached lightfm-1.7.tar.gz | |
Requirement already satisfied (use --upgrade to upgrade): numpy in ./anaconda/lib/python3.4/site-packages (from lightfm) | |
Building wheels for collected packages: lightfm |
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
iex> Enum.map([1, 2, 3], fn x -> x * 3 end) | |
[3, 6, 9] | |
iex> Enum.map(%{1 => 2, 3 => 4}, fn {k, v} -> k * v end) | |
[2, 12] |