Skip to content

Commit

Permalink
Add notebooks (#11)
Browse files Browse the repository at this point in the history
* add notebooks

* update _toc.yml

* update poetry files

* update deploy flow

* add notebooks

* update notebook
  • Loading branch information
shunk031 authored Aug 27, 2023
1 parent 61c37ed commit b1da850
Show file tree
Hide file tree
Showing 13 changed files with 1,809 additions and 13 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,18 @@ jobs:

- name: Install dependencies
run: |
pip install poetry
poetry export --without-hashes -f requirements.txt --output requirements.txt
pip install -r requirements.txt
make setup
# Check external links in the book
- name: Check external links
run: |
jupyter-book build . --builder linkcheck
make check
# Build the book
- name: Build the book
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
jupyter-book build .
make build
# Push the book's HTML to github-pages
- name: GitHub Pages action
Expand Down
10 changes: 5 additions & 5 deletions _config.yml → .jupyter_book/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ execute:
execute_notebooks: off

# Define the name of the latex output file for PDF builds
latex:
latex_documents:
targetname: book.tex
# latex:
# latex_documents:
# targetname: book.tex

# Add a bibtex file so that we can create citations
bibtex_bibfiles:
- references.bib
# bibtex_bibfiles:
# - references.bib

launch_buttons:
colab_url: "https://colab.research.google.com"
Expand Down
7 changes: 7 additions & 0 deletions _toc.yml → .jupyter_book/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,10 @@ parts:
- caption: 受講者特典
chapters:
- file: materials/figures/README.md
- file: materials/notebooks/activation-functions
- file: materials/notebooks/linear-regression
- file: materials/notebooks/normal-distribution
- file: materials/notebooks/noise-scheduler
- file: materials/notebooks/diffusion-process
- file: materials/notebooks/distribution-shift
- file: materials/notebooks/latent-data
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CONFIG_PATH := .jupyter_book/_config.yml
TOC_PATH := .jupyter_book/_toc.yml

setup:
@pip install -U pip poetry
@poetry export --without-hashes -f requirements.txt --output requirements.txt
@pip install -r requirements.txt

build:
@jupyter-book build --config $(CONFIG_PATH) --toc $(TOC_PATH) --all .

check:
@jupyter-book build --config $(CONFIG_PATH) --toc $(TOC_PATH) --builder linkcheck .
1 change: 1 addition & 0 deletions materials/notebooks/activation-functions.ipynb

Large diffs are not rendered by default.

897 changes: 897 additions & 0 deletions materials/notebooks/diffusion-process.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions materials/notebooks/distribution-shift.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions materials/notebooks/latent-data.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions materials/notebooks/linear-regression.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions materials/notebooks/noise-scheduler.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions materials/notebooks/normal-distribution.ipynb

Large diffs are not rendered by default.

873 changes: 870 additions & 3 deletions poetry.lock

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ sphinxext-opengraph = "^0.8.2"
sphinxcontrib-external-link = {git = "https://github.com/attakei-lab/sphinxcontrib-external-link.git", branch = "main"}


[tool.poetry.group.dev.dependencies]
jupyterlab = "^4.0.5"
seaborn = "^0.12.2"
jupyterlab-code-formatter = "^2.2.1"
black = "^23.7.0"
isort = "^5.12.0"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit b1da850

Please sign in to comment.