View rm-docker.sh
docker images | awk '/<none/{print $3}' | xargs docker rmi
docker ps -f "status=exited" -q | xargs docker rm
View README.md
curl -fsSL https://gist.githubusercontent.com/satomacoto/b27dc3f871938d2614819bba3c589b45/raw/setup1.sh | bash
curl -fsSL https://gist.githubusercontent.com/satomacoto/b27dc3f871938d2614819bba3c589b45/raw/setup2.sh | bash
View how-to-install-miniconda-with-pyenv-on-fish.sh
pyenv install miniconda3-latest
pyenv local miniconda3-latest
conda create -n myenv anaconda
source (conda info --root)/etc/fish/conf.d/conda.fish
conda activate myenv
View Twitter API with Curl
# create an account, create an app
# @see https://apps.twitter.com/
# retrieve the access tokens
# @see https://dev.twitter.com/oauth/reference/post/oauth2/token
# create the file ~/twitter_api
nano ~/twitter_api
Authorization: OAuth oauth_consumer_key="XXXXXX", oauth_nonce="11111111", oauth_signature="XXXXXX", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1450728725", oauth_token="99999-XXXXXX", oauth_version="1.0"
View README.md
View graph.json
{"nodes":[{"name":"Myriel","group":1},{"name":"Napoleon","group":1},{"name":"Mlle.Baptistine","group":1},{"name":"Mme.Magloire","group":1},{"name":"CountessdeLo","group":1},{"name":"Geborand","group":1},{"name":"Champtercier","group":1},{"name":"Cravatte","group":1},{"name":"Count","group":1},{"name":"OldMan","group":1},{"name":"Labarre","group":2},{"name":"Valjean","group":2},{"name":"Marguerite","group":3},{"name":"Mme.deR","group":2},{"name":"Isabeau","group":2},{"name":"Gervais","group":2},{"name":"Tholomyes","group":3},{"name":"Listolier","group":3},{"name":"Fameuil","group":3},{"name":"Blacheville","group":3},{"name":"Favourite","group":3},{"name":"Dahlia","group":3},{"name":"Zephine","group":3},{"name":"Fantine","group":3},{"name":"Mme.Thenardier","group":4},{"name":"Thenardier","group":4},{"name":"Cosette","group":5},{"name":"Javert","group":4},{"name":"Fauchelevent","group":0},{"name":"Bamatabois","group":2},{"name":"Perpetue","group":3},{"name":"Simplice","group":2},{"name":"Scaufflaire","group":2},
View cross_val_regressor.py
# -*- coding: utf-8 -*-
from sklearn.base import BaseEstimator, RegressorMixin, TransformerMixin
from sklearn.cross_validation import cross_val_predict
class ThroughTransformer(BaseEstimator, TransformerMixin):
def fit(self, X, y=None, **fit_param):
return self
View README.md

Install pyenv

$ brew update
$ brew install pyenv

Check available versions and install

View pinv2regressor.py
class Pinv2Regressor:
def __init__(self, estimators, cv=5):
self.estimators = estimators
self.cv = cv
def fit(self, X, y, verbose=False):
preds = {}
for k, estimator in self.estimators.items():
if verbose:
print(k, estimator)
View tensoflow.sublime-project
{
"build_systems":
[
{
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"name": "Anaconda Python Builder",
"selector": "source.python",
"shell_cmd": "~/.virtualenvs/tensorflow/bin/python -u \"$file\""
}
],