https://github.com/springmt/jupyter_notebook_sample
https://github.com/springmt/jupyter_notebook_sample
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/springmt/jupyter_notebook_sample
- Owner: SpringMT
- Created: 2023-09-08T08:49:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-14T06:05:09.000Z (over 2 years ago)
- Last Synced: 2025-02-12T11:52:17.884Z (12 months ago)
- Language: Jupyter Notebook
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jupyter-notebook-sample
## ryeで管理
```
rye init
rye add jupyter
rye sync
```
## jupyter notebook起動
```
rye run jupyter notebook
```
## nbstripoutの設定
### install
```
rye add nbstripout
rye sync
```
### commit hook
commit hookの設定は各自で実施しなければならない。
下記コマンドを実行する。
```
rye run nbstripout --install
```
そうすると gitのconfigに下記が設定される
```
[filter "nbstripout"]
clean = \"/Users/springmt/jupyter_notebook_sample/.venv/bin/python\" -m nbstripout
smudge = cat
[diff "ipynb"]
textconv = \"/Users/springmt/jupyter_notebook_sample/.venv/bin/python\" -m nbstripout -t
```
この状態でcommitする。
この状態でcommitすると差分はこんな感じ
https://github.com/SpringMT/jupyter_notebook_sample/compare/73778a45a5a74f5e1f9c4437c629ba7b3e449fd6...46f2614d1c563522a55be7c32c9e8ee4c784ddb8