Skip to content

Instantly share code, notes, and snippets.

View tacmasi's full-sized avatar

tacmasi tacmasi

View GitHub Profile
@tacmasi
tacmasi / mmt_graph.dot
Last active July 8, 2019 03:01
政府調達時の支払を国債を発行して行った場合について、 Wrayによる記述を元にグラフを描く(参考: L.Randall Wray(2015) 'Modern Money Theory’ 2nd edition, pp.95-96)
//※要:graphviz
//$ dot -Tpng mmt_graph.dot -o mmt_graph.png
// #ref: https://twitter.com/tacmasi/status/1131576218304753664
digraph mmt {
graph[label = "国債発行による政府調達時の金融資産・負債の発生, 実物資産(製品)の移動\n参考: L.Randall Wray(2015) 'Modern Money Theory, 2nd edition',pp.95-96. 作成:tacmasi",
rankdir = TB,
labelloc = b,
bgcolor = "#343434",
fontsize = 12,
fontcolor = white,
@tacmasi
tacmasi / file1.txt
Last active January 13, 2018 17:09
カナは全角に,英数字は半角に(gawk) ref: https://qiita.com/tacmasi/items/f57d9a5252e0765ab2ad
$ gawk -V
GNU Awk 4.1.4, API: 1.1 (GNU MPFR 3.1.5, GNU MP 6.1.2)
(略)
$ echo "
|すき家|茨城県|すき家 イオンモール下妻店|
|すき家|岡山県|すき家 53号岡山IC店|
|すき家|岡山県|すき家 イオンモール津山店|
|すき家|沖縄県|すき家 イオン那覇店|
|すき家|岩手県|すき家 イオンモール盛岡南店|
@tacmasi
tacmasi / file1.txt
Last active January 10, 2018 11:41
内閣府Webサイトから四半期名目GDPをgetする( Bash & awk ) ref: https://qiita.com/tacmasi/items/8ef36aea5bb0ea3dadd9
$ ./gdpget.sh
(略)
nominalgdp.csvへ名目GDPデータを保存しました
$ head -3 nominalgdp.csv
time,国内総生産(支出側),民間最終消費支出,家計消費,持家帰属家賃を除く家計消費,民間住宅,民間企業設備,民間在庫変動,政府最終消費支出,公的固定資本形成,純輸出,輸出,輸入
1994/1-3.,12796.3,6829.3,6215.9,5617.9,984.4,2312.5,-480.9,1358.4,1191.5,-113.7,714.8,1249.3
4-6.,12571.1,6713.6,6447.8,5747.1,320.7,1545.6,820.6,2182.0,672.2,31.8,284.6,1981.7
$ tail -3 nominalgdp.csv
@tacmasi
tacmasi / file0.txt
Last active January 9, 2018 11:34
バッテリー状況確認(Debian) ref: https://qiita.com/tacmasi/items/9229731c25de99e05c45
$ cat /etc/debian_version
9.3
$ ls /sys/class/power_supply/
AC BAT0
$ cat /sys/class/power_supply/BAT0/
alarm cycle_count status
capacity device/ subsystem/
capacity_level manufacturer technology
@tacmasi
tacmasi / bash
Created January 8, 2018 12:12
Juliaのインストール(on Debian9.3) ref: https://qiita.com/tacmasi/items/46c3c37ff6285d8930e6
cd /tmp
wget https://julialangnightlies-s3.julialang.org/bin/linux/x64/julia-latest-linux64.tar.gz
tar zxvf julia-latest-linux64.tar.gz
su
mv julia-cce56c8797 /opt/julia
ln -s /opt/julia/bin/julia /usr/local/bin/julia
exit
julia
_