Skip to content

Instantly share code, notes, and snippets.

@ysaito8015
ysaito8015 / brew-cask-upgrade.sh
Last active April 2, 2017 20:43 — forked from n0ts/brew-cask-upgrade.sh
brew cask upgrade
#!/bin/bash [0/0]
set -Ceu
for c in $(brew cask list); do
info=$(brew cask info $c)
installed_ver=$(echo "$info" |awk 'NR==1' |cut -d" " -f 2)
current_ver=$(echo "$info" |awk 'NR==3' | cut -d" " -f 1 | rev |cut -d"/" -f 1| rev)
if [ "$current_ver" == "latest" ]; then
echo "$c is installed '$installed_ver', current is '$current_ver'"
echo -n "upgrade?[y/n]>"
@ysaito8015
ysaito8015 / file0.txt
Created September 20, 2017 17:45
Ubuntu 16.04 へ Oracle 11g Express Edition を入れてみた ref: http://qiita.com/ysaito8015@github/items/1b9b6c528671f6593f1f
sudo aptitude install alien libaio1 unixodbc unzip
@ysaito8015
ysaito8015 / Vagrantfile
Created October 19, 2017 17:38
Vagrantfile coreos for jupyter-notebook
# -*- mode: ruby -*-
# # vi: set ft=ruby :
require 'fileutils'
Vagrant.require_version ">= 1.6.0"
# Make sure the vagrant-ignition plugin is installed
required_plugins = %w(vagrant-ignition)
@ysaito8015
ysaito8015 / file0.txt
Created December 1, 2017 15:43
v0.4 から v0.6 への移行時に、注意したこと ref: https://qiita.com/ysaito8015@github/items/04d7b33791d47037a169
ModelFrame(A ~ B + C, dataframe)
@ysaito8015
ysaito8015 / file0.txt
Last active May 30, 2019 16:10
Heroku Container Registry & Runtime とは(Heroku Dev Center の私家訳) ref: https://qiita.com/ysaito8015@github/items/0d2d32a553d0414a700e
$ heroku container:login
export CONDA_JL_VERSON="3"
/paht/to/miniconda/bin/conda update --all -y
export CONDA_JL_HOME="/path/to/miniconda/envs/conda_jl"
make: clang++: Command not found
make: *** [bin/cmdstan/stanc.o] Error 127
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\begin{aligned}
\vec{y} &\sim \text{Normal}(\vec{\mu},\sigma^2\bf{I})\\
\vec{\mu} &= \bf{X}\vec{\beta}
\end{aligned}
@ysaito8015
ysaito8015 / x_means.py
Created March 6, 2018 07:48 — forked from yasaichi/x_means.py
Implementation of X-means clustering in Python
"""
以下の論文で提案された改良x-means法の実装
クラスター数を自動決定するk-meansアルゴリズムの拡張について
http://www.rd.dnc.ac.jp/~tunenori/doc/xmeans_euc.pdf
"""
import numpy as np
from scipy import stats
from sklearn.cluster import KMeans