homebrewでインストール
$ brew update| import argparse | |
| import math | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from matplotlib import animation | |
| def pdf_gamma(x, k, lambda_): | |
| return (math.pow(lambda_, k)/math.gamma(k)) * math.pow(x, k-1) * math.exp(-lambda_*x) | |
| def plot_gamma(ax, alpha, gamma, title): |
| import argparse | |
| import math | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| def plot_exp_pdf(ax, lambda_): | |
| def exp(lam, x): | |
| if (x >= 0): | |
| return lam * np.exp(-lam * x) | |
| return 0 |
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "math/rand" | |
| ) | |
| var ( | |
| Seed int64 |
| import os | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| def plot(f, points): | |
| n = int(f.split('_')[1].split('.')[0]) | |
| size = 100 | |
| scores = np.loadtxt("tmp/{}".format(f), delimiter=",").reshape(size, size) | |
| xs = np.linspace(-2.5, 2.5, size, endpoint=False) |
| Generative programming in Go. | |
| こちらのエントリ http://blog.monochromegane.com/blog/2015/03/04/argen/ で紹介した `argen` をつくって得られた go generate まわりの知見を発表します。 | |
| # What | |
| argenの簡単な紹介を通してGo言語でのGenerative programmingとは何かを説明します。 | |
| # Why |