Skip to content

Instantly share code, notes, and snippets.

@taroyabuki
taroyabuki / makepdf.sh
Last active May 20, 2021 17:39
(ad hoc)『解釈可能な機械学習/Interpretable Machine Learning』日本語訳のPDF版を作る.(要Docker)
# usage:
# wget https://gist.githubusercontent.com/taroyabuki/ecb0da01ab85e0a0524383b97d17ae0f/raw/dc962ef5e8b13bfc2aa7b1bcea2edba7918cfd10/makepdf.sh
# docker run -it -e ROOT=TRUE -v $(pwd):/home/rstudio/work rocker/verse bash /home/rstudio/work/makepdf.sh
cd /home/rstudio/work
git clone -b japanese https://github.com/hacarus/interpretable-ml-book-ja.git
cd interpretable-ml-book-ja
@taroyabuki
taroyabuki / japan-population-1872-2017.csv
Last active September 4, 2020 13:53
日本の人口(1872--2017) 出典:日本統計年鑑 (1920年は国勢調査人口を採用)
year population
1872 34806
1873 34985
1874 35154
1875 35316
1876 35555
1877 35870
1878 36166
1879 36464
1880 36649
@taroyabuki
taroyabuki / students-life.csv
Created December 9, 2019 01:32
ある学生の生活
experiment weather lecture goout
T rainy F F
T sunny T T
T rainy T F
F rainy T F
F sunny T T
@taroyabuki
taroyabuki / japan-prefectures.csv
Last active January 27, 2020 15:52
日本の都道府県(漢字,ローマ字)
北海道 Hokkaido
青森 Aomori
岩手 Iwate
宮城 Miyagi
秋田 Akita
山形 Yamagata
福島 Fukushima
茨城 Ibaraki
栃木 Tochigi
群馬 Gumma
@taroyabuki
taroyabuki / 2019-romaji-prefecture-min-wage.csv
Created December 6, 2019 08:01
2019年都道府県別最低賃金(県名が漢字のデータ:https://gist.github.com/taroyabuki/39329ae29cbc95520e093d5c7fade6bb
Hokkaido 861
Aomori 790
Iwate 790
Miyagi 824
Akita 790
Yamagata 790
Fukushima 798
Ibaraki 849
Tochigi 853
Gumma 835
@taroyabuki
taroyabuki / 2019-kanji-prefecture-min-wage.csv
Last active December 6, 2019 08:02
2019年都道府県別最低賃金(県名がローマ字のデータ:https://gist.github.com/taroyabuki/3a95f24a7a84dafd030918dedb9485c1
北海道 861
青森 790
岩手 790
宮城 824
秋田 790
山形 790
福島 798
茨城 849
栃木 853
群馬 835
@taroyabuki
taroyabuki / VennDiagram.m
Created December 23, 2017 13:58
I rewrote the code published in http://mathworld.wolfram.com/VennDiagram.html to work with the latest version of Mathematica.
VennDiagram[n_, ineqs_: {}] := Module[{i, r = .6, R = 1, v, x, y, f},
v = Table[Circle[r {Cos[#], Sin[#]} &[2 Pi (i - 1)/n], R], {i, n}];
{
If[ineqs == {}, {},
f = And @@ (v /. Circle[{xx_, yy_}, rr_] :> (x - xx)^2 + (y - yy)^2 < rr^2)[[ineqs]];
RegionPlot[ImplicitRegion[f,
{x, y}], Axes -> False,
DisplayFunction -> Identity][[1]]
],
v
@taroyabuki
taroyabuki / 100weightchars.md
Last active November 9, 2017 09:52
Twitterで0.5文字とカウントされる文字の一覧(参考:https://developer.twitter.com/en/docs/developer-utilities/twitter-text

� � � � � � � � �

map = Import["http://mathforum.org/wagon/fall97/images/5colormap.gif"];
matrix = MorphologicalComponents[map];
vars = Flatten[Map[{p[#], q[#]} &, Rest[Union[Flatten[matrix]]]]];
f[r_] := Map[If[Length[Union[#]] > 2, Sort[Select[#, Positive]], Nothing] &,
Partition[r, 4, 1]];
neighbours = Union[Flatten[Map[f, Join[matrix, Transpose[matrix]]], 1]];
@taroyabuki
taroyabuki / MyCos.java
Created February 9, 2016 16:28
(インテルCPUの)三角関数は不要 http://blog.unfindable.net/archives/8991
/*
<dependencies>
<dependency>
<groupId>org.apfloat</groupId>
<artifactId>apfloat</artifactId>
<version>1.8.2</version>
</dependency>
</dependencies>
*/
import org.apfloat.*;