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
# -*- coding: utf-8 -*- | |
import os | |
import StringIO | |
import hashlib | |
try: | |
from boto.s3.connection import S3Connection | |
from boto.s3.key import Key | |
except ImportError: | |
raise ImproperlyConfigured, "Could not load Boto's S3 bindings." |
This article is now published on my website: Prefer Subshells for Context.
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
""" | |
Non-Negative Garotte implementation with the scikit-learn | |
""" | |
# Author: Alexandre Gramfort <[email protected]> | |
# Jaques Grobler (__main__ script) <[email protected]> | |
# | |
# License: BSD Style. | |
import numpy as np |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Mathieu Blondel, May 2012 | |
# License: BSD 3 clause | |
import numpy as np | |
def euclidean_distances(X, Y=None, Y_norm_squared=None, squared=False): | |
XX = np.sum(X * X, axis=1)[:, np.newaxis] | |
YY = np.sum(Y ** 2, axis=1)[np.newaxis, :] | |
distances = np.dot(X, Y.T) | |
distances *= -2 |
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
1) Download nssm from http://nssm.cc/download/?page=download and extract nssm.exe, for example to %windir%\system32\ | |
2) Install your service: | |
nssm.exe install my-node-service c:\programs\nodejes\node.exe c:\my\server.js | |
3) Start it using net start: | |
net start my-node-service |
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
#Setup | |
rm(list = ls(all = TRUE)) | |
setwd('path.to/cv.ts') | |
#Load Packages | |
require(forecast) | |
require(doParallel) | |
source('R/cv.ts.R') | |
source('R/forecast functions.R') |