「どりらん」です
%%tsumiki
:Markdown:
### 共著
:Markdown::
#### PythonユーザのためのJupyter[実践]入門
* Jupyterのつかいかた
* pandasの基礎
* データの可視化
**Matplotlibの豆腐で困ってる人は本書を読むように!**
* クラウド上のJupyter
* R, RubyでJupyter
* スライド, ipywidgetsなど
:HTML::
<img src="./static/images/jupyterbook.jpg" width=300 />
2年ぶり2回目
%%tsumiki
:Markdown:
### fin-py
:Markdown::
* Python x 金融のコミュニティ
* PyConJP 2016をきっかけに発足
##### ポスターセッションやります
* Felicaを使った社内決済システム
* 年金最適化(iDeco, 確定拠出年金)
* Djangoによる仮想通貨税金計算サービス
* 株価のバックテスト
:HTML::
<img src="./static/images/finpy_600x600.png" width=300 />
%%tsumiki
:Markdown:
#### こまったこと
:Markdown::
* よのなかのアスペクト比がどんどん横長に
* 文章をヨコにずらーっと並べると読みくい
* 段組みしたい
:Markdown::
* この辺がスッカスカ
* ここのデッドスペースを
* 活用したい
%%tsumiki
:Markdown:
#### こうしたい
##### The Zen of Python, by Tim Peters
:Markdown::
* Beautiful is better than ugly.
* Explicit is better than implicit.
* Simple is better than complex.
* Complex is better than complicated.
* Flat is better than nested.
* Sparse is better than dense.
* Readability counts.
* Special cases aren't special enough to break the rules.
* Although practicality beats purity.
* Errors should never pass silently.
* Unless explicitly silenced.
* In the face of ambiguity, refuse the temptation to guess.
:Markdown::
* There should be one-- and preferably only one --obvious way to do it.
* Although that way may not be obvious at first unless you're Dutch.
* Now is better than never.
* Although never is often better than *right* now.
* If the implementation is hard to explain, it's a bad idea.
* If the implementation is easy to explain, it may be a good idea.
* Namespaces are one honking great idea -- let's do more of those!
pip install tsumiki
:Markdown:
これ以降の行がMarkdownと解釈される
:HTML:
これ以降の行がHTMLと解釈される
:Markdown::
2列に段組みされる
:Markdown:::
3列に段組みされる
cellの行頭にcell magic
%%tsumiki
:Markdown:
# Main Title1
:Markdown::
* col1
* Markdown
:HTML::
<font color="red">col2</font></br>
<font color="green">HTML</font>
:Markdown:
## Subtitle
:Markdown:::
* col1
:Markdown:::
* col2
:Markdown:::
* col3
%%tsumiki
:Markdown:
# Main Title1
:Markdown::
* col1
* Markdown
:HTML::
<font color="red">col2</font></br>
<font color="green">HTML</font>
:Markdown:
## Subtitle
:Markdown:::
* col1
:Markdown:::
* col2
:Markdown:::
* col3
today = datetime.date.today()
tenki = [["23区", "晴れ"], ["練馬区", "ゲリラ豪雨"]]
%%tsumiki -r
:Markdown:
### {{ today }}日の天気は
{% for loc, weather in tenki %}
{{ loc }}は{{ weather }}
{% endfor %}
23区は晴れ
練馬区はゲリラ豪雨
df1 = pd.DataFrame(np.random.rand(4, 4))
df2 = pd.DataFrame(np.random.rand(4, 4))
df1_html = df1.to_html()
df2_html = df2.to_html()
%%tsumiki -r
:HTML::
{{ df1_html }}
:HTML::
{{ df2_html }}
0 | 1 | 2 | 3 | |
---|---|---|---|---|
0 | 0.583013 | 0.567258 | 0.461982 | 0.653951 |
1 | 0.450467 | 0.151624 | 0.980366 | 0.162875 |
2 | 0.268900 | 0.349285 | 0.075972 | 0.746079 |
3 | 0.041969 | 0.207476 | 0.506395 | 0.065837 |
0 | 1 | 2 | 3 | |
---|---|---|---|---|
0 | 0.918477 | 0.080903 | 0.206347 | 0.851236 |
1 | 0.455218 | 0.733040 | 0.368003 | 0.817496 |
2 | 0.597250 | 0.407499 | 0.096031 | 0.013872 |
3 | 0.664662 | 0.228819 | 0.215262 | 0.430530 |
svg_data = StringIO()
fig, ax = plt.subplots()
ax.plot(df1)
fig.savefig(svg_data, format="SVG")
plt.close(fig)
svg_data.seek(0)
plot_data = svg_data.read()
%%tsumiki -r
:Markdown:
##### DataFrameとMatplotlibのグラフ
:HTML::
{{ df1_html }}
:HTML::
{{ plot_data }}
0 | 1 | 2 | 3 | |
---|---|---|---|---|
0 | 0.583013 | 0.567258 | 0.461982 | 0.653951 |
1 | 0.450467 | 0.151624 | 0.980366 | 0.162875 |
2 | 0.268900 | 0.349285 | 0.075972 | 0.746079 |
3 | 0.041969 | 0.207476 | 0.506395 | 0.065837 |