From 65e88dff8e3650e59bd1e6ce7ef453cf279d52da Mon Sep 17 00:00:00 2001 From: Gelieza K Date: Mon, 31 Jul 2023 15:13:50 +0200 Subject: [PATCH 01/10] Add the basic template to generate webpage --- .github/workflows/CI.yml | 64 + Project.toml | 10 + README.md | 7 + docs/.gitignore | 3 + docs/Project.toml | 3 + docs/make.jl | 62 + docs/src/assets/custom.css | 4 + .../assets/iframeResizer.contentWindow.min.js | 9 + docs/src/assets/iframeResizer.min.js | 8 + docs/src/assets/logo.png | Bin 0 -> 5448 bytes docs/src/index.md | 7 + docs/src/matrix_matrix.md | 31 + docs/src/notebook-hello.md | 32 + docs/src/notebook-output/index.html | 15362 ++++++++++++++ docs/src/notebook-output/matrix_matrix.html | 16559 ++++++++++++++++ docs/src/notebook-output/notebook-hello.html | 15362 ++++++++++++++ .../src/notebooks}/Project.toml | 0 .../notebooks}/figures/fig_matmu_intro.svg | 0 .../src/notebooks}/figures/fig_matmul_0.png | Bin .../src/notebooks}/figures/fig_matmul_1.png | Bin .../src/notebooks}/figures/fig_matmul_1.svg | 0 .../src/notebooks}/figures/fig_matmul_2.png | Bin .../notebooks}/figures/fig_matmul_dist.svg | 0 .../notebooks}/figures/fig_matmul_intro_0.png | Bin .../notebooks}/figures/fig_matmul_intro_2.png | Bin .../notebooks}/figures/fig_matmul_intro_3.png | Bin .../notebooks}/figures/fig_matmul_intro_4.png | Bin .../figures/fig_matmul_intro_algs.png | Bin .../figures/fig_matmul_intro_algs_1.png | Bin .../figures/fig_matmul_intro_q_1.png | Bin .../figures/fig_matmul_intro_q_2.png | Bin .../figures/fig_matmul_intro_q_3.png | Bin .../figures/fig_matmul_machines.png | Bin .../figures/fig_matmul_machines.svg | 0 .../figures/fig_matmul_machines_1.png | Bin .../figures/fig_matmul_machines_2.png | Bin .../figures/fig_matmul_machines_3.png | Bin .../src/notebooks}/matrix_matrix.ipynb | 0 docs/src/notebooks/notebook-hello.ipynb | 187 + src/XM_40017.jl | 5 + test/runtests.jl | 0 41 files changed, 47715 insertions(+) create mode 100644 .github/workflows/CI.yml create mode 100644 Project.toml create mode 100644 README.md create mode 100644 docs/.gitignore create mode 100644 docs/Project.toml create mode 100644 docs/make.jl create mode 100644 docs/src/assets/custom.css create mode 100644 docs/src/assets/iframeResizer.contentWindow.min.js create mode 100644 docs/src/assets/iframeResizer.min.js create mode 100644 docs/src/assets/logo.png create mode 100644 docs/src/index.md create mode 100644 docs/src/matrix_matrix.md create mode 100644 docs/src/notebook-hello.md create mode 100644 docs/src/notebook-output/index.html create mode 100644 docs/src/notebook-output/matrix_matrix.html create mode 100644 docs/src/notebook-output/notebook-hello.html rename {notebooks => docs/src/notebooks}/Project.toml (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmu_intro.svg (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_0.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_1.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_1.svg (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_2.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_dist.svg (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_intro_0.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_intro_2.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_intro_3.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_intro_4.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_intro_algs.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_intro_algs_1.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_intro_q_1.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_intro_q_2.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_intro_q_3.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_machines.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_machines.svg (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_machines_1.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_machines_2.png (100%) rename {notebooks => docs/src/notebooks}/figures/fig_matmul_machines_3.png (100%) rename {notebooks => docs/src/notebooks}/matrix_matrix.ipynb (100%) create mode 100644 docs/src/notebooks/notebook-hello.ipynb create mode 100644 src/XM_40017.jl create mode 100644 test/runtests.jl diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..da4fd1c --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,64 @@ +name: CI +on: + push: + branches: + - main + tags: ['*'] + pull_request: +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1.9' + os: + - ubuntu-latest + arch: + - x64 + steps: + - uses: actions/checkout@v3 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: julia-actions/cache@v1 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + docs: + name: Documentation + runs-on: ubuntu-latest + permissions: + contents: write + statuses: write + steps: + - uses: actions/checkout@v3 + - uses: julia-actions/setup-julia@v1 + with: + version: '1' + - name: Set up Python + uses: actions/setup-python@v4.7.0 + with: + python-version: '3.9' + - name: Install nbconvert + run: | + python -m pip install jupyter nbconvert + - name: Configure doc environment + run: | + julia --project=docs/ -e ' + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate()' + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-docdeploy@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + diff --git a/Project.toml b/Project.toml new file mode 100644 index 0000000..b867aab --- /dev/null +++ b/Project.toml @@ -0,0 +1,10 @@ +name = "XM_40017" +uuid = "bac2549d-7fb4-47a9-ab16-d1e9b77d8fc7" +authors = ["Francesc Verdugo "] +version = "0.1.0" + +[extras] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[targets] +test = ["Test"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..866c17f --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# XM_40017 +Jupyter notebook scripts for the course Programming Large-Scale Parallel Systems (XM_40017) at Vrije Universiteit Amsterdam. + +- [**Go to webpage**](https://fverdugo.github.io/XM_40017/dev) + +## Run webpage locally +In XM_40017 folder, call `using LiveServer; servedocs(skip_dir=joinpath("docs","src","notebook-output"))` in terminal. diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..b71a83f --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,3 @@ +build/ +site/ +Manifest.toml diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..27946c2 --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,3 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +XM_40017 = "bac2549d-7fb4-47a9-ab16-d1e9b77d8fc7" diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..98a529e --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,62 @@ +using XM_40017 +using Documenter + +# Convert to html using nbconvert +function convert_notebook_to_html(notebook_path; output_name = "index", output_dir = "./docs/src/notebook-output", theme = "dark") + command_jup = "jupyter" + command_nbc = "nbconvert" + output_format = "--to=html" + theme = "--theme=$theme" + output = "--output=$output_name" + output_dir = "--output-dir=$output_dir" + infile = notebook_path + run(`$command_jup $command_nbc $output_format $output $output_dir $theme $infile`) +end + +# Resize iframes using IframeResizer +function modify_notebook_html( html_name ) + content = open( html_name, "r" ) do html_file + read( html_file, String ) + end + content = replace(content, + r"(]*>[\s\S]*?<\/script>\K)" => + s"\1\n\t\n"; + count = 1 + ) + content = replace_colors(content) + open( html_name, "w" ) do html_file + write( html_file, content ) + end + return nothing +end + +# Replace colors to match Documenter.jl +function replace_colors(content) + content = replace( content, "--jp-layout-color0: #111111;" => "--jp-layout-color0: #1f2424;") + content = replace(content, "--md-grey-900: #212121;" => "--md-grey-900: #282f2f;") + return content +end + +convert_notebook_to_html("docs/src/notebooks/matrix_matrix.ipynb", output_name = "matrix_matrix") +modify_notebook_html("docs/src/notebook-output/matrix_matrix.html") + +convert_notebook_to_html("docs/src/notebooks/notebook-hello.ipynb", output_name = "notebook-hello") +modify_notebook_html("docs/src/notebook-output/notebook-hello.html") + +makedocs(; + modules=[XM_40017], + authors="Francesc Verdugo ", + repo="https://github.com/fverdugo/XM_40017/blob/{commit}{path}#{line}", + sitename="XM_40017", + format=Documenter.HTML(; + assets = ["assets/iframeResizer.min.js", "assets/custom.css"], + prettyurls=get(ENV, "CI", "false") == "true", + canonical="https://fverdugo.github.io/XM_40017", + edit_link="main",), + pages=["Home" => "index.md","Hello World" => "notebook-hello.md", "Notebooks"=>["Matrix Multiplication"=>"matrix_matrix.md"]], +) + +deploydocs(; + repo="github.com/fverdugo/XM_40017", + devbranch="main", +) diff --git a/docs/src/assets/custom.css b/docs/src/assets/custom.css new file mode 100644 index 0000000..4c72061 --- /dev/null +++ b/docs/src/assets/custom.css @@ -0,0 +1,4 @@ +#documenter .docs-sidebar .docs-logo > img, +html.theme--documenter-dark #documenter .docs-sidebar .docs-logo > img { + max-height: 8em; +} diff --git a/docs/src/assets/iframeResizer.contentWindow.min.js b/docs/src/assets/iframeResizer.contentWindow.min.js new file mode 100644 index 0000000..48809cc --- /dev/null +++ b/docs/src/assets/iframeResizer.contentWindow.min.js @@ -0,0 +1,9 @@ +/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v4.3.5 - 2023-03-08 + * Desc: Include this file in any page being loaded into an iframe + * to force the iframe to resize to the content size. + * Requires: iframeResizer.min.js on host page. + * Copyright: (c) 2023 David J. Bradshaw - dave@bradshaw.net + * License: MIT + */ +!function(a){if("undefined"!=typeof window){var r=!0,P="",u=0,c="",s=null,D="",d=!1,j={resize:1,click:1},l=128,q=!0,f=1,n="bodyOffset",m=n,H=!0,W="",h={},g=32,B=null,p=!1,v=!1,y="[iFrameSizer]",J=y.length,w="",U={max:1,min:1,bodyScroll:1,documentElementScroll:1},b="child",V=!0,X=window.parent,T="*",E=0,i=!1,Y=null,O=16,S=1,K="scroll",M=K,Q=window,G=function(){x("onMessage function not defined")},Z=function(){},$=function(){},_={height:function(){return x("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return x("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},te=!1;try{var ne=Object.create({},{passive:{get:function(){te=!0}}});window.addEventListener("test",ae,ne),window.removeEventListener("test",ae,ne)}catch(e){}var oe,o,I,ie,N,A,C={bodyOffset:function(){return document.body.offsetHeight+ye("marginTop")+ye("marginBottom")},offset:function(){return C.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return _.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,e(C))},min:function(){return Math.min.apply(null,e(C))},grow:function(){return C.max()},lowestElement:function(){return Math.max(C.bodyOffset()||C.documentElementOffset(),we("bottom",Te()))},taggedElement:function(){return be("bottom","data-iframe-height")}},z={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return _.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(z.bodyScroll(),z.documentElementScroll())},max:function(){return Math.max.apply(null,e(z))},min:function(){return Math.min.apply(null,e(z))},rightMostElement:function(){return we("right",Te())},taggedElement:function(){return be("right","data-iframe-width")}},re=(oe=Ee,N=null,A=0,function(){var e=Date.now(),t=O-(e-(A=A||e));return o=this,I=arguments,t<=0||Ok[r]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}}function h(e,n){null===i&&(i=setTimeout(function(){i=null,e()},n))}function e(){"hidden"!==document.visibilityState&&(O("document","Trigger event: Visibility change"),h(function(){b("Tab Visible","resize")},16))}function b(i,t){Object.keys(k).forEach(function(e){var n;k[n=e]&&"parent"===k[n].resizeFrom&&k[n].autoResize&&!k[n].firstRun&&A(i,t,k[e].iframe,e)})}function y(){F(window,"message",w),F(window,"resize",function(){var e;O("window","Trigger event: "+(e="resize")),h(function(){b("Window "+e,"resize")},16)}),F(document,"visibilitychange",e),F(document,"-webkit-visibilitychange",e)}function n(){function t(e,n){if(n){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected + +``` + diff --git a/docs/src/notebook-hello.md b/docs/src/notebook-hello.md new file mode 100644 index 0000000..cf3bb30 --- /dev/null +++ b/docs/src/notebook-hello.md @@ -0,0 +1,32 @@ + +```@meta +EditURL = "https://github.com/fverdugo/XM_40017/blob/main/docs/src/notebooks/notebook-hello.ipynb" +``` + +```@raw html +
+
Tip
+
+
    +
  • + Download this notebook and run it locally on your machine [recommended]. Click here. +
  • +
  • + You can also run this notebook in the cloud using Binder. Click here + . +
  • +
+
+
+``` + +```@raw html + + +``` + diff --git a/docs/src/notebook-output/index.html b/docs/src/notebook-output/index.html new file mode 100644 index 0000000..af2a4fb --- /dev/null +++ b/docs/src/notebook-output/index.html @@ -0,0 +1,15362 @@ + + + + + +notebook + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/notebook-output/matrix_matrix.html b/docs/src/notebook-output/matrix_matrix.html new file mode 100644 index 0000000..c4fedfe --- /dev/null +++ b/docs/src/notebook-output/matrix_matrix.html @@ -0,0 +1,16559 @@ + + + + + +matrix_matrix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/notebook-output/notebook-hello.html b/docs/src/notebook-output/notebook-hello.html new file mode 100644 index 0000000..a007c0e --- /dev/null +++ b/docs/src/notebook-output/notebook-hello.html @@ -0,0 +1,15362 @@ + + + + + +notebook-hello + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/notebooks/Project.toml b/docs/src/notebooks/Project.toml similarity index 100% rename from notebooks/Project.toml rename to docs/src/notebooks/Project.toml diff --git a/notebooks/figures/fig_matmu_intro.svg b/docs/src/notebooks/figures/fig_matmu_intro.svg similarity index 100% rename from notebooks/figures/fig_matmu_intro.svg rename to docs/src/notebooks/figures/fig_matmu_intro.svg diff --git a/notebooks/figures/fig_matmul_0.png b/docs/src/notebooks/figures/fig_matmul_0.png similarity index 100% rename from notebooks/figures/fig_matmul_0.png rename to docs/src/notebooks/figures/fig_matmul_0.png diff --git a/notebooks/figures/fig_matmul_1.png b/docs/src/notebooks/figures/fig_matmul_1.png similarity index 100% rename from notebooks/figures/fig_matmul_1.png rename to docs/src/notebooks/figures/fig_matmul_1.png diff --git a/notebooks/figures/fig_matmul_1.svg b/docs/src/notebooks/figures/fig_matmul_1.svg similarity index 100% rename from notebooks/figures/fig_matmul_1.svg rename to docs/src/notebooks/figures/fig_matmul_1.svg diff --git a/notebooks/figures/fig_matmul_2.png b/docs/src/notebooks/figures/fig_matmul_2.png similarity index 100% rename from notebooks/figures/fig_matmul_2.png rename to docs/src/notebooks/figures/fig_matmul_2.png diff --git a/notebooks/figures/fig_matmul_dist.svg b/docs/src/notebooks/figures/fig_matmul_dist.svg similarity index 100% rename from notebooks/figures/fig_matmul_dist.svg rename to docs/src/notebooks/figures/fig_matmul_dist.svg diff --git a/notebooks/figures/fig_matmul_intro_0.png b/docs/src/notebooks/figures/fig_matmul_intro_0.png similarity index 100% rename from notebooks/figures/fig_matmul_intro_0.png rename to docs/src/notebooks/figures/fig_matmul_intro_0.png diff --git a/notebooks/figures/fig_matmul_intro_2.png b/docs/src/notebooks/figures/fig_matmul_intro_2.png similarity index 100% rename from notebooks/figures/fig_matmul_intro_2.png rename to docs/src/notebooks/figures/fig_matmul_intro_2.png diff --git a/notebooks/figures/fig_matmul_intro_3.png b/docs/src/notebooks/figures/fig_matmul_intro_3.png similarity index 100% rename from notebooks/figures/fig_matmul_intro_3.png rename to docs/src/notebooks/figures/fig_matmul_intro_3.png diff --git a/notebooks/figures/fig_matmul_intro_4.png b/docs/src/notebooks/figures/fig_matmul_intro_4.png similarity index 100% rename from notebooks/figures/fig_matmul_intro_4.png rename to docs/src/notebooks/figures/fig_matmul_intro_4.png diff --git a/notebooks/figures/fig_matmul_intro_algs.png b/docs/src/notebooks/figures/fig_matmul_intro_algs.png similarity index 100% rename from notebooks/figures/fig_matmul_intro_algs.png rename to docs/src/notebooks/figures/fig_matmul_intro_algs.png diff --git a/notebooks/figures/fig_matmul_intro_algs_1.png b/docs/src/notebooks/figures/fig_matmul_intro_algs_1.png similarity index 100% rename from notebooks/figures/fig_matmul_intro_algs_1.png rename to docs/src/notebooks/figures/fig_matmul_intro_algs_1.png diff --git a/notebooks/figures/fig_matmul_intro_q_1.png b/docs/src/notebooks/figures/fig_matmul_intro_q_1.png similarity index 100% rename from notebooks/figures/fig_matmul_intro_q_1.png rename to docs/src/notebooks/figures/fig_matmul_intro_q_1.png diff --git a/notebooks/figures/fig_matmul_intro_q_2.png b/docs/src/notebooks/figures/fig_matmul_intro_q_2.png similarity index 100% rename from notebooks/figures/fig_matmul_intro_q_2.png rename to docs/src/notebooks/figures/fig_matmul_intro_q_2.png diff --git a/notebooks/figures/fig_matmul_intro_q_3.png b/docs/src/notebooks/figures/fig_matmul_intro_q_3.png similarity index 100% rename from notebooks/figures/fig_matmul_intro_q_3.png rename to docs/src/notebooks/figures/fig_matmul_intro_q_3.png diff --git a/notebooks/figures/fig_matmul_machines.png b/docs/src/notebooks/figures/fig_matmul_machines.png similarity index 100% rename from notebooks/figures/fig_matmul_machines.png rename to docs/src/notebooks/figures/fig_matmul_machines.png diff --git a/notebooks/figures/fig_matmul_machines.svg b/docs/src/notebooks/figures/fig_matmul_machines.svg similarity index 100% rename from notebooks/figures/fig_matmul_machines.svg rename to docs/src/notebooks/figures/fig_matmul_machines.svg diff --git a/notebooks/figures/fig_matmul_machines_1.png b/docs/src/notebooks/figures/fig_matmul_machines_1.png similarity index 100% rename from notebooks/figures/fig_matmul_machines_1.png rename to docs/src/notebooks/figures/fig_matmul_machines_1.png diff --git a/notebooks/figures/fig_matmul_machines_2.png b/docs/src/notebooks/figures/fig_matmul_machines_2.png similarity index 100% rename from notebooks/figures/fig_matmul_machines_2.png rename to docs/src/notebooks/figures/fig_matmul_machines_2.png diff --git a/notebooks/figures/fig_matmul_machines_3.png b/docs/src/notebooks/figures/fig_matmul_machines_3.png similarity index 100% rename from notebooks/figures/fig_matmul_machines_3.png rename to docs/src/notebooks/figures/fig_matmul_machines_3.png diff --git a/notebooks/matrix_matrix.ipynb b/docs/src/notebooks/matrix_matrix.ipynb similarity index 100% rename from notebooks/matrix_matrix.ipynb rename to docs/src/notebooks/matrix_matrix.ipynb diff --git a/docs/src/notebooks/notebook-hello.ipynb b/docs/src/notebooks/notebook-hello.ipynb new file mode 100644 index 0000000..9f81b61 --- /dev/null +++ b/docs/src/notebooks/notebook-hello.ipynb @@ -0,0 +1,187 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "babf8079", + "metadata": {}, + "source": [ + "# Hello, world!" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f71f2545", + "metadata": {}, + "outputs": [], + "source": [ + "] add Distributed" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4d6b67b6", + "metadata": {}, + "outputs": [], + "source": [ + "] add https://github.com/fverdugo/W2bYx4.git" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "815d977e", + "metadata": {}, + "outputs": [], + "source": [ + "using W2bYx4" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2cf68b65", + "metadata": {}, + "outputs": [], + "source": [ + "W2bYx4.greet()" + ] + }, + { + "cell_type": "markdown", + "id": "81236a40", + "metadata": {}, + "source": [ + "This is an attached picture:" + ] + }, + { + "attachments": { + "logo.png": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAN0AAADdCAYAAAA/xHcaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAuIwAALiMBeKU/dgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAABTFSURBVHic7d15fBRlmgfwX1Vf6dzk4j4CqOAip4IozoiiogKKyqCgyKWIeIBCgro7M7s7uu6uH2d2jo/HjsfoCDi646iMN4EBDPcVRW7CkXSn0+lO0t3p9FVV+wfqB1Ek6Treequf7z8KprseU/2rqq563+cV8AOGTH91gCBipiLgegjoBwVlAMQf+llCyLdkCGiEgloByoeA8sYXK+YePfOHhNP/MPSu13IUSf5PBbgXgMOwUgmxpiQE4XlXTmz5jhcXRL/5y29DN2zWn3pKKWU1gOFMyiPEogRgV0KWJh1YNc/z9Z+BsdP+4g47ousBXMy0OkKsa7doE8fVvD6rTQSAsLPtGVDgCNHTcFlW/gMAhCHTXx0AG/aBvsMRoreEaBMHibAJd4ICR4gRnJIkzxQBZSLrSgjJFIIgXC8C6M+6EEIyhqKUiwBKWNdBSAYpE0EjTQgxko0CR4jBKHSEGIxCR4jBKHSEGIxCR4jBKHSEGIxCR4jBKHSEGIxCR4jBKHSEGMzOugBWnHbA7ZSR55bhsClIpASE20VEEyJSEuvqiJVZNnSiAPTvmkD/rin0K02ivDSJfmUJ9OySQr5bgc2mnPW1SUlAKCrgZMCBY34HahsdOO534LDv1D8JUcNSoetVnMKl57Vj7HntGH1eDIXZclrv47ApKM5TUJwXx/B+8e/8t0BYxI6jWdh0yI3dx7JwuIFCSDpHGDLj1bMf8jlQXpbE5FFtmDQqgu6FKcO3f9TnwOqdOVi9IxfeFksdw4hOuAxdjkvBlIvDmDyqDRf1iZ/7BQaQFWD7kSy8tz0XH+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ezAimGBQxbAxB19GihQaHTGesmOEQ9rZtFUeh0ZIZ2b0Q9rdsiUuh09Hjdp8wbmxJtaNkAmEKnk2tbDuCSyEnWZRANadXqnkKnA5ecwiPUpdlytFrUhUKng9mNW9Ez3sK6DKIDLZYvo9BpzGwLEBJtabFQJ4VOY0u85lpql2hP7ZLUFDoNDW3z4MZmcy0qT7Rng4zlnvSH9VHoNCJAQWV9FbVgyBBjwsdxZehIWq+l0GlkSnAvhkY9rMsgBqqoS2+qFoVOA9lyAg+ZZD1rYpzeiRbM9O/o9OsodBq4x7cZZckI6zIIAwt81Sjt5L6n0KnUM96Cu/zbWZdBGMmREljU0LlGUxQ6lZZ61sJFXZoz2tRgDYZ0oqUihU6F0ZETmNB6iHUZhDFRUVBZ91mH71xT6NIkKjIq69awLoOYxPCoBxOb93foZyl0aZoW2IPzY+mPSiDW86hnHdxy8pw/R6FLQ74U6/SXZ2J9XZNhzO7AuFu7AbVYTnEqit92v4J1GcSEYuK5I0WhS0Otqwi1riLWZRBO0eUlIQaj0BFiMAodIQaj0BFiMAodIQYTAWrMSIiBJBECGllXQUimEACfCAW1rAshJFMoQK0oQPmQdSGEZA7hAxFQ3gBw7lGahBC1EqJNWCl+sWLuUQV4gXU1hFif8lzN67NqRQDIT2ZXANjGuCJCLEsAdrlyE49//e+nXHD7Sz2com21AoxgVxohlrRDEm2T9/35Li9w2sPxA6vmeZy58XEQhN8BoL7ghKiXAJT/ceXGf/JN4IDTznSnu2jGy/1liDMEQbgeilIOoCto9Aoh5yID8AE4CgUfinZxRc3rs773SO7/ASo4P8zLykOMAAAAAElFTkSuQmCC" + } + }, + "cell_type": "markdown", + "id": "7c2e8d25", + "metadata": {}, + "source": [ + "\n", + "
\n", + "\n", + "
\n" + ] + }, + { + "attachments": { + "logo.png": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAN0AAADdCAYAAAA/xHcaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAuIwAALiMBeKU/dgAAABl0RVh0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bVgyBBjwsdxZehIWq+l0GlkSnAvhkY9rMsgBqqoS2+qFoVOA9lyAg+ZZD1rYpzeiRbM9O/o9OsodBq4x7cZZckI6zIIAwt81Sjt5L6n0KnUM96Cu/zbWZdBGMmREljU0LlGUxQ6lZZ61sJFXZoz2tRgDYZ0oqUihU6F0ZETmNB6iHUZhDFRUVBZ91mH71xT6NIkKjIq69awLoOYxPCoBxOb93foZyl0aZoW2IPzY+mPSiDW86hnHdxy8pw/R6FLQ74U6/SXZ2J9XZNhzO7AuFu7AbVYTnEqit92v4J1GcSEYuK5I0WhS0Otqwi1riLWZRBO0eUlIQaj0BFiMAodIQaj0BFiMAodIQYTAWrMSIiBJBECGllXQUimEACfCAW1rAshJFMoQK0oQPmQdSGEZA7hAxFQ3gBw7lGahBC1EqJNWCl+sWLuUQV4gXU1hFif8lzN67NqRQDIT2ZXANjGuCJCLEsAdrlyE49//e+nXHD7Sz2com21AoxgVxohlrRDEm2T9/35Li9w2sPxA6vmeZy58XEQhN8BoL7ghKiXAJT/ceXGf/JN4IDTznSnu2jGy/1liDMEQbgeilIOoCto9Aoh5yID8AE4CgUfinZxRc3rs773SO7/ASo4P8zLykOMAAAAAElFTkSuQmCC" + } + }, + "cell_type": "markdown", + "id": "d0f1685d", + "metadata": {}, + "source": [ + "Another attached picture with markdown syntax `![]()`: \n", + "\n", + "\n", + "![logo.png](attachment:logo.png)" + ] + }, + { + "cell_type": "markdown", + "id": "7f4de0d2", + "metadata": {}, + "source": [ + "A picture embedded with Base64: \n", + "\n", + "\n", + "\n", + "
\n", + "\n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "0d36cf9e", + "metadata": {}, + "source": [ + "This is a linked picture:" + ] + }, + { + "cell_type": "markdown", + "id": "0b541664", + "metadata": {}, + "source": [ + "
\n", + "\n", + "
\n" + ] + }, + { + "cell_type": "markdown", + "id": "cae7f8ac", + "metadata": {}, + "source": [ + "```julia\n", + "julia> 1 + 1\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6603cd99", + "metadata": {}, + "outputs": [], + "source": [ + "1+1" + ] + }, + { + "cell_type": "markdown", + "id": "c3b59ed4", + "metadata": {}, + "source": [ + "
\n", + "Warning: Make sure that the file \"hello.jl\" is located in the current working directory of your Julia session.\n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "5b3e3d68", + "metadata": {}, + "source": [ + "
\n", + "Tip: Avoid calling Julia code from the terminal\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b7267f6e", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Julia 1.9.1", + "language": "julia", + "name": "julia-1.9" + }, + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.9.1" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/src/XM_40017.jl b/src/XM_40017.jl new file mode 100644 index 0000000..fbf0303 --- /dev/null +++ b/src/XM_40017.jl @@ -0,0 +1,5 @@ +module XM_40017 + +greet() = print("Hello World!") + +end # module XM_40017 diff --git a/test/runtests.jl b/test/runtests.jl new file mode 100644 index 0000000..e69de29 From ee7a9c75d9dfc2724e721f5fbada46061bb9dc88 Mon Sep 17 00:00:00 2001 From: Gelieza K Date: Mon, 31 Jul 2023 17:19:18 +0200 Subject: [PATCH 02/10] Build md files automatically in make.jl --- docs/make.jl | 61 +- docs/src/matrix_matrix.md | 29 +- docs/src/notebook-hello.md | 28 +- docs/src/notebook-output/index.html | 15362 ------------------ docs/src/notebook-output/matrix_matrix.html | 2 +- docs/src/notebooks/matrix_matrix.ipynb | 2 +- 6 files changed, 85 insertions(+), 15399 deletions(-) delete mode 100644 docs/src/notebook-output/index.html diff --git a/docs/make.jl b/docs/make.jl index 98a529e..d5a8c7a 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,5 +1,52 @@ using XM_40017 using Documenter +using Glob + +const md_nb_template = """ +```@meta +EditURL = "https://github.com/fverdugo/XM_40017/blob/main/docs/src/notebooks/SCRIPT_NAME.ipynb" +``` + +```@raw html +
+
Tip
+
+
    +
  • + Download this notebook and run it locally on your machine [recommended]. Click here. +
  • +
  • + You can also run this notebook in the cloud using Binder. Click here + . +
  • +
+
+
+``` + +```@raw html + + +``` +""" + +# Write markdown file that includes notebook html +function create_md_nb_file( notebook_path ) + global md_nb_template; + script_file = splitpath(notebook_path)[end] + script_name = splitext(script_file)[1] + content = replace( md_nb_template, "SCRIPT_NAME" => script_name) + md_path = joinpath(@__DIR__, "src", script_name * ".md" ) + open(md_path, "w") do md_file + write(md_file, content) + end + return md_path +end # Convert to html using nbconvert function convert_notebook_to_html(notebook_path; output_name = "index", output_dir = "./docs/src/notebook-output", theme = "dark") @@ -37,11 +84,15 @@ function replace_colors(content) return content end -convert_notebook_to_html("docs/src/notebooks/matrix_matrix.ipynb", output_name = "matrix_matrix") -modify_notebook_html("docs/src/notebook-output/matrix_matrix.html") - -convert_notebook_to_html("docs/src/notebooks/notebook-hello.ipynb", output_name = "notebook-hello") -modify_notebook_html("docs/src/notebook-output/notebook-hello.html") +# Loop over notebooks and generate html and markdown +notebook_files = glob("*.ipynb", "docs/src/notebooks/") +for filepath in notebook_files + create_md_nb_file(filepath) + filename_with_ext = splitpath(filepath)[end] + filename = splitext(filename_with_ext)[1] + convert_notebook_to_html(filepath, output_name = filename) + modify_notebook_html("docs/src/notebook-output/$(filename).html") +end makedocs(; modules=[XM_40017], diff --git a/docs/src/matrix_matrix.md b/docs/src/matrix_matrix.md index 1d9edcc..6fc6208 100644 --- a/docs/src/matrix_matrix.md +++ b/docs/src/matrix_matrix.md @@ -1,22 +1,22 @@ ```@meta -EditURL = "https://github.com/fverdugo/XM_40017/blob/main/notebooks/notebook.ipynb" +EditURL = "https://github.com/fverdugo/XM_40017/blob/main/docs/src/notebooks/matrix_matrix.ipynb" ``` ```@raw html
-
Tip
-
-
    -
  • - Download this notebook and run it locally on your machine [recommended]. Click here. -
  • -
  • - You can also run this notebook in the cloud using Binder. Click here - . -
  • -
-
-
+
Tip
+
+
    +
  • + Download this notebook and run it locally on your machine [recommended]. Click here. +
  • +
  • + You can also run this notebook in the cloud using Binder. Click here + . +
  • +
+
+ ``` ```@raw html @@ -28,4 +28,3 @@ EditURL = "https://github.com/fverdugo/XM_40017/blob/main/notebooks/notebook.ipy }); ``` - diff --git a/docs/src/notebook-hello.md b/docs/src/notebook-hello.md index cf3bb30..cdcaea3 100644 --- a/docs/src/notebook-hello.md +++ b/docs/src/notebook-hello.md @@ -1,23 +1,22 @@ - ```@meta EditURL = "https://github.com/fverdugo/XM_40017/blob/main/docs/src/notebooks/notebook-hello.ipynb" ``` ```@raw html
-
Tip
-
-
    -
  • - Download this notebook and run it locally on your machine [recommended]. Click here. -
  • -
  • - You can also run this notebook in the cloud using Binder. Click here - . -
  • -
-
-
+
Tip
+
+
    +
  • + Download this notebook and run it locally on your machine [recommended]. Click here. +
  • +
  • + You can also run this notebook in the cloud using Binder. Click here + . +
  • +
+
+ ``` ```@raw html @@ -29,4 +28,3 @@ EditURL = "https://github.com/fverdugo/XM_40017/blob/main/docs/src/notebooks/not }); ``` - diff --git a/docs/src/notebook-output/index.html b/docs/src/notebook-output/index.html deleted file mode 100644 index af2a4fb..0000000 --- a/docs/src/notebook-output/index.html +++ /dev/null @@ -1,15362 +0,0 @@ - - - - - -notebook - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/src/notebook-output/matrix_matrix.html b/docs/src/notebook-output/matrix_matrix.html index c4fedfe..3138a69 100644 --- a/docs/src/notebook-output/matrix_matrix.html +++ b/docs/src/notebook-output/matrix_matrix.html @@ -15130,7 +15130,7 @@ body[data-format='mobile'] .jp-OutputArea-child .jp-OutputArea-output { \n", + "\n", + " a) 3N\n", + " b) 2N + 2\n", + " c) 2N + 1\n", + " d) N² + 1" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "id": "e78cbc7b", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "It's not correct. Keep trying! 💪\n" + ] + } + ], "source": [ - "# TODO multiple choice" + "answer = \"x\" # replace x with a, b, c, or d \n", + "alg_1_comm_overhead_check(answer)" ] }, { @@ -517,17 +618,30 @@ "source": [ "
\n", "Question: How many operations are done in a worker? \n", - "
" + "\n", + "\n", + " a) O(N)\n", + " b) O(N²)\n", + " c) O(N³)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "id": "fcc9b903", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "It's not correct. Keep trying! 💪\n" + ] + } + ], "source": [ - "# TODO multiple choice" + "answer = \"x\" # replace x with a, b, or c\n", + "alg_1_comp_check(answer)" ] }, { @@ -599,12 +713,20 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "id": "cdb46cd8", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "It's not correct. Keep trying! 💪\n" + ] + } + ], "source": [ - "answer = \"x\" \n", + "answer = \"x\" # replace x with a, b, c, or d \n", "alg_2_deps_check(answer)" ] }, @@ -759,12 +881,20 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "id": "1bf8feff", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "🥳 Well done! \n" + ] + } + ], "source": [ - "answer = \"x\"\n", + "answer = \"x\" # replace x with a, b, c, or d \n", "alg_2_complex_check(answer)" ] }, @@ -816,17 +946,32 @@ "source": [ "
\n", "Question: Which are the data dependencies of the computations done by the worker in charge of computing the range of rows C[rows,:] ? \n", - "
\n" + "\n", + "\n", + "\n", + " a) A[rows,:] and B[:,rows] \n", + " b) the whole matrix A and B[:,rows]\n", + " c) A[rows,:] and the whole matrix B\n", + " d) the whole matrices A and B" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 21, "id": "2825385a", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "It's not correct. Keep trying! 💪\n" + ] + } + ], "source": [ - "# TODO multiple choice and checker" + "answer = \"x\" # replace x with a, b, c, or d \n", + "alg_3_deps_check(answer)" ] }, { @@ -877,17 +1022,31 @@ "\n", "
\n", "Question: Which is the complexity of the communication and computations done by a worker in algorithm 3?\n", - "
" + "\n", + "\n", + " a) O(N²) communication and O(N³) computation\n", + " b) O(N²) communication and O(N³/P) computation\n", + " c) O(N²) communication and O(N²) computation\n", + " d) O(N²/P) communication and O(N³/P) computation" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 25, "id": "50b8bf53", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "It's not correct. Keep trying! 💪\n" + ] + } + ], "source": [ - "# TODO multiple choice and checker function" + "answer = \"x\" # replace x with a, b, c, or d \n", + "alg_3_complex_check(answer)" ] }, { @@ -1137,7 +1296,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Julia 1.9.0", + "display_name": "Julia 1.9.1", "language": "julia", "name": "julia-1.9" }, @@ -1145,7 +1304,7 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.9.0" + "version": "1.9.1" } }, "nbformat": 4, From 13ee7880e74d5959efaac402be09ec5f6d3f1a56 Mon Sep 17 00:00:00 2001 From: Gelieza K Date: Fri, 4 Aug 2023 17:01:07 +0200 Subject: [PATCH 06/10] Automatically convert images to base64 --- docs/make.jl | 21 +- docs/reformat_attached_images.jl | 17 + docs/src/julia_distributed_test.md | 30 + docs/src/notebook-output/julia_Jacobi.html | 16 +- .../notebook-output/julia_distributed.html | 6 +- .../julia_distributed_test.html | 16868 ++++++++++++++++ docs/src/notebook-output/julia_intro.html | 2 +- docs/src/notebook-output/matrix_matrix.html | 355 +- docs/src/notebook-output/notebook-hello.html | 2 +- .../notebook-output/sol_matrix_matrix.html | 15182 ++++++++++++++ docs/src/notebooks/julia_distributed.ipynb | 10 +- .../notebooks/julia_distributed_test.ipynb | 1269 ++ docs/src/notebooks/julia_intro.ipynb | 2 +- docs/src/notebooks/julia_jacobi.ipynb | 16 +- docs/src/notebooks/matrix_matrix.ipynb | 35 +- docs/src/notebooks/notebook-hello.ipynb | 4 +- docs/src/notebooks/sol_matrix_matrix.ipynb | 60 + docs/src/sol_matrix_matrix.md | 30 + 18 files changed, 33825 insertions(+), 100 deletions(-) create mode 100644 docs/reformat_attached_images.jl create mode 100644 docs/src/julia_distributed_test.md create mode 100644 docs/src/notebook-output/julia_distributed_test.html create mode 100644 docs/src/notebook-output/sol_matrix_matrix.html create mode 100644 docs/src/notebooks/julia_distributed_test.ipynb create mode 100644 docs/src/notebooks/sol_matrix_matrix.ipynb create mode 100644 docs/src/sol_matrix_matrix.md diff --git a/docs/make.jl b/docs/make.jl index 3e9743f..20c3d6e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -35,12 +35,28 @@ EditURL = "https://github.com/fverdugo/XM_40017/blob/main/docs/src/notebooks/SCR ``` """ +function convert_embedded_img_to_base64(notebook_path) + doc = open(io->read(io, String), notebook_path) + # Regex matching: extract filename and base64 code + regex = r"attachments\\\":\s*\{\s*\\\"(?.*).png\\\":\s*\{\s*\\\"image/png\\\":\s*\\\"(?.*)\\\"" + res = eachmatch(regex, doc) + matches = collect(res) + # Replace img src with base64 code + for m in matches + filename = m[:filename] + base64 = m[:base64code] + doc = replace(doc, "attachment:$filename.png" => "data:image/png;base64,$base64") + end + + write(notebook_path, doc); +end + # Write markdown file that includes notebook html function create_md_nb_file( notebook_path ) global md_nb_template; script_file = splitpath(notebook_path)[end] script_name = splitext(script_file)[1] - content = replace( md_nb_template, "SCRIPT_NAME" => script_name) + content = replace(md_nb_template, "SCRIPT_NAME" => script_name) md_path = joinpath(@__DIR__, "src", script_name * ".md" ) open(md_path, "w") do md_file write(md_file, content) @@ -87,6 +103,7 @@ end # Loop over notebooks and generate html and markdown notebook_files = glob("*.ipynb", "docs/src/notebooks/") for filepath in notebook_files + convert_embedded_img_to_base64(filepath) create_md_nb_file(filepath) filename_with_ext = splitpath(filepath)[end] filename = splitext(filename_with_ext)[1] @@ -109,7 +126,7 @@ makedocs(; "Julia Basics" => "julia_basics.md", "Julia Asynchronous" => "julia_async.md", "Julia Distributed" => "julia_distributed.md", - "Matrix Multiplication"=>"matrix_matrix.md", + "Matrix Multiplication"=>["Matrix Multiplication" => "matrix_matrix.md", "Solutions" => "sol_matrix_matrix.md"], "Jacobi/SOR" => "julia_jacobi.md" ]], ) diff --git a/docs/reformat_attached_images.jl b/docs/reformat_attached_images.jl new file mode 100644 index 0000000..72ede58 --- /dev/null +++ b/docs/reformat_attached_images.jl @@ -0,0 +1,17 @@ + +function convert_embedded_img_to_base64(notebook_path) + doc = open(io->read(io, String), notebook_path) + # Regex matching: extract filename and base64 code + regex = r"attachments\\\":\s*\{\s*\\\"(?.*).png\\\":\s*\{\s*\\\"image/png\\\":\s*\\\"(?.*)\\\"" + res = eachmatch(regex, doc) + matches = collect(res) + # Replace img src with base64 code + for m in matches + global doc; + filename = m[:filename] + base64 = m[:base64code] + doc = replace(doc, "attachment:$filename.png" => "data:image/png;base64,$base64") + end + + write(notebook_path, doc); +end \ No newline at end of file diff --git a/docs/src/julia_distributed_test.md b/docs/src/julia_distributed_test.md new file mode 100644 index 0000000..35655b0 --- /dev/null +++ b/docs/src/julia_distributed_test.md @@ -0,0 +1,30 @@ +```@meta +EditURL = "https://github.com/fverdugo/XM_40017/blob/main/docs/src/notebooks/julia_distributed_test.ipynb" +``` + +```@raw html +
+
Tip
+
+
    +
  • + Download this notebook and run it locally on your machine [recommended]. Click here. +
  • +
  • + You can also run this notebook in the cloud using Binder. Click here + . +
  • +
+
+
+``` + +```@raw html + + +``` diff --git a/docs/src/notebook-output/julia_Jacobi.html b/docs/src/notebook-output/julia_Jacobi.html index a82876f..58d3ef6 100644 --- a/docs/src/notebook-output/julia_Jacobi.html +++ b/docs/src/notebook-output/julia_Jacobi.html @@ -15185,7 +15185,7 @@ body[data-format='mobile'] .jp-OutputArea-child .jp-OutputArea-output {