Skip to content

Instantly share code, notes, and snippets.

@Akiyah
Akiyah / jsdoit.css
Created January 24, 2015 04:47
2015-01-24 1st
* {
margin: 0;
padding: 0;
border: 0;
}
body {
background: #ddd;
font: 30px sans-serif;
}
set.seed(0) # 同じ値を再現できるようにしておく
data <- c(
rep( 100000, 10),
rep( 10000, 100),
rep( 1000, 1000),
rep( 100, 10000),
rep( 0, 100000 - 11110)
)
u <- c()
for (i in 1:10000) {
j <- sample(data, 10000)
u <- c(u, mean(j))
}
sqrt(var(u)) #=> 10.06759
quantile(u, c(0.05, 0.95))
#=> 5% 95%
Xzibit = Object clone do(
dawg = method(what,
"yo dawg" print.
what print.
"clone" print.
self
).
so_you_can = method(
"so you can print" print.
Xzibit = Object clone do(
dawg = method(what,
"yo dawg" print.
what print.
"clone" print.
self
).
so_you_can = method(
"so you can print" print.
@Akiyah
Akiyah / README
Last active September 7, 2015 17:27
とけたら天才!分裂する●を追い出せ!
●をクリックすると消えて右と下に分裂する。
左上6マスの白いブロックから●を追い出せ。
参考
バナッハ‐タルスキの密室: 『数学者シャーロック・ホームズ』増補・改題
http://www.amazon.co.jp/dp/4535787409
# http://r-statistics-fan.hatenablog.com/entry/2014/09/22/210455
is.sosu <- function(x){ #素数判定の自作関数作成。(2は判定できない)
sum(x %% 2:sqrt(x) == 0) == 0
}
NUMS <- c(1,3,7,9)
result <- list()
@Akiyah
Akiyah / gist:9636973
Last active November 30, 2015 00:05
スターバックスでトールサイズのタンブラーにショートサイズのホットコーヒーを入れてもらった記録をグラフにしてみた(2014-03-19)
data <- c(
404,468,449,435,421,438,432,453,400,425,486,410,401,
423,458,422,406,458,397,453,452,395,425,
361,466,368,460,363,509,414,439,
437,
385,442,406,402,371,429,402,453,389,413,412,481,
385,406,402,422,414,484,
441,434,408,392,447,388,362,418,429,437,415,387,401,406,441,393,395,419,407,417,444,395,429,371,413,458,410,420,404,416,391,422,385,398,403,405,392,397,483,533,433,440,391,422,472,378,400,508,401,445,414,446,416,389,400,550,453,394,413,379,426,457,368,426,403,415,418,448,416,464,408,443,371,432,438,404,398,393,389
)
@Akiyah
Akiyah / README
Created April 10, 2013 16:15
jsPDFの練習(htmlの例)
jsPDF - Create PDFs with HTML5 JavaScript Library
http://jspdf.com/
の練習
htmlをpdfにしてみます
@Akiyah
Akiyah / jsdoit.css
Created May 1, 2013 10:53
forked: Verlet-JS サンプル
body {
background: #000;
}