Fossil SCM
Added Jupyter nbviewer link for www/image-format-vs-repo-size.ipynb, and made a few small edits to the notebook after seeing it in that viewer.
Commit
f52d63e37bf8d2ec66fd36d5b62342193b2b42753e7535ef41e1681a040e361d
Parent
41e5237acd2eb2b…
2 files changed
+1
-2
+8
-6
| --- www/image-format-vs-repo-size.ipynb | ||
| +++ www/image-format-vs-repo-size.ipynb | ||
| @@ -8,11 +8,11 @@ | ||
| 8 | 8 | "\n", |
| 9 | 9 | "## Prerequisites\n", |
| 10 | 10 | "\n", |
| 11 | 11 | "This notebook was developed with [JupyterLab][jl]. To follow in my footsteps, install that and the needed Python packages:\n", |
| 12 | 12 | "\n", |
| 13 | - " $ sudo pip install jupyterlab matplotlib pandas wand\n", | |
| 13 | + " $ pip install jupyterlab matplotlib pandas wand\n", | |
| 14 | 14 | "\n", |
| 15 | 15 | "In principle, it should also work with [Anaconda Navigator][an], but because [Wand][wp] is not currently in the Anaconda base package set, you may run into difficulties making it work, as we did on macOS. These problems might not occur on Windows or Linux.\n", |
| 16 | 16 | "\n", |
| 17 | 17 | "This notebook uses the Python 2 kernel because macOS does not include Python 3, and we don't want to make adding that a prerequisite for those re-running this experiement on their own macOS systems. The code was written with Python 3 syntax changes in mind, but we haven't yet successfully tried it in a Python 3 Jupyter kernel.\n", |
| 18 | 18 | "\n", |
| @@ -150,11 +150,10 @@ | ||
| 150 | 150 | "# first 3 rows: the initial empty repo state (boring) and the repo DB\n", |
| 151 | 151 | "# size as it \"settles\" in its first few checkins.\n", |
| 152 | 152 | "data = pd.concat(repo_sizes, axis=1).drop(range(3))\n", |
| 153 | 153 | "\n", |
| 154 | 154 | "mpl.rcParams['figure.figsize'] = (6, 4)\n", |
| 155 | - "#plt.rcParams['axes.facecolor'] = 'white'\n", | |
| 156 | 155 | "ax = data.plot(kind = 'bar', colormap = 'coolwarm',\n", |
| 157 | 156 | " grid = False, width = 0.8,\n", |
| 158 | 157 | " edgecolor = 'white', linewidth = 2)\n", |
| 159 | 158 | "ax.axes.set_xlabel('Checkin index')\n", |
| 160 | 159 | "ax.axes.set_ylabel('Repo size (MiB)')\n", |
| 161 | 160 |
| --- www/image-format-vs-repo-size.ipynb | |
| +++ www/image-format-vs-repo-size.ipynb | |
| @@ -8,11 +8,11 @@ | |
| 8 | "\n", |
| 9 | "## Prerequisites\n", |
| 10 | "\n", |
| 11 | "This notebook was developed with [JupyterLab][jl]. To follow in my footsteps, install that and the needed Python packages:\n", |
| 12 | "\n", |
| 13 | " $ sudo pip install jupyterlab matplotlib pandas wand\n", |
| 14 | "\n", |
| 15 | "In principle, it should also work with [Anaconda Navigator][an], but because [Wand][wp] is not currently in the Anaconda base package set, you may run into difficulties making it work, as we did on macOS. These problems might not occur on Windows or Linux.\n", |
| 16 | "\n", |
| 17 | "This notebook uses the Python 2 kernel because macOS does not include Python 3, and we don't want to make adding that a prerequisite for those re-running this experiement on their own macOS systems. The code was written with Python 3 syntax changes in mind, but we haven't yet successfully tried it in a Python 3 Jupyter kernel.\n", |
| 18 | "\n", |
| @@ -150,11 +150,10 @@ | |
| 150 | "# first 3 rows: the initial empty repo state (boring) and the repo DB\n", |
| 151 | "# size as it \"settles\" in its first few checkins.\n", |
| 152 | "data = pd.concat(repo_sizes, axis=1).drop(range(3))\n", |
| 153 | "\n", |
| 154 | "mpl.rcParams['figure.figsize'] = (6, 4)\n", |
| 155 | "#plt.rcParams['axes.facecolor'] = 'white'\n", |
| 156 | "ax = data.plot(kind = 'bar', colormap = 'coolwarm',\n", |
| 157 | " grid = False, width = 0.8,\n", |
| 158 | " edgecolor = 'white', linewidth = 2)\n", |
| 159 | "ax.axes.set_xlabel('Checkin index')\n", |
| 160 | "ax.axes.set_ylabel('Repo size (MiB)')\n", |
| 161 |
| --- www/image-format-vs-repo-size.ipynb | |
| +++ www/image-format-vs-repo-size.ipynb | |
| @@ -8,11 +8,11 @@ | |
| 8 | "\n", |
| 9 | "## Prerequisites\n", |
| 10 | "\n", |
| 11 | "This notebook was developed with [JupyterLab][jl]. To follow in my footsteps, install that and the needed Python packages:\n", |
| 12 | "\n", |
| 13 | " $ pip install jupyterlab matplotlib pandas wand\n", |
| 14 | "\n", |
| 15 | "In principle, it should also work with [Anaconda Navigator][an], but because [Wand][wp] is not currently in the Anaconda base package set, you may run into difficulties making it work, as we did on macOS. These problems might not occur on Windows or Linux.\n", |
| 16 | "\n", |
| 17 | "This notebook uses the Python 2 kernel because macOS does not include Python 3, and we don't want to make adding that a prerequisite for those re-running this experiement on their own macOS systems. The code was written with Python 3 syntax changes in mind, but we haven't yet successfully tried it in a Python 3 Jupyter kernel.\n", |
| 18 | "\n", |
| @@ -150,11 +150,10 @@ | |
| 150 | "# first 3 rows: the initial empty repo state (boring) and the repo DB\n", |
| 151 | "# size as it \"settles\" in its first few checkins.\n", |
| 152 | "data = pd.concat(repo_sizes, axis=1).drop(range(3))\n", |
| 153 | "\n", |
| 154 | "mpl.rcParams['figure.figsize'] = (6, 4)\n", |
| 155 | "ax = data.plot(kind = 'bar', colormap = 'coolwarm',\n", |
| 156 | " grid = False, width = 0.8,\n", |
| 157 | " edgecolor = 'white', linewidth = 2)\n", |
| 158 | "ax.axes.set_xlabel('Checkin index')\n", |
| 159 | "ax.axes.set_ylabel('Repo size (MiB)')\n", |
| 160 |
+8
-6
| --- www/image-format-vs-repo-size.md | ||
| +++ www/image-format-vs-repo-size.md | ||
| @@ -77,12 +77,13 @@ | ||
| 77 | 77 | |
| 78 | 78 | |
| 79 | 79 | |
| 80 | 80 | ## Demonstration |
| 81 | 81 | |
| 82 | -The companion [`image-format-vs-repo-size.ipynb` file][nb] is a | |
| 83 | -[Jupyter][jp] notebook implementing the following experiment: | |
| 82 | +The companion `image-format-vs-repo-size.ipynb` file ([download][nbd], | |
| 83 | +[preview][nbp]) is a [Jupyter][jp] notebook implementing the following | |
| 84 | +experiment: | |
| 84 | 85 | |
| 85 | 86 | 1. Create an empty Fossil repository; save its initial size. |
| 86 | 87 | |
| 87 | 88 | 2. Use [ImageMagick][im] via [Wand][wp] to generate a JPEG file of a |
| 88 | 89 | particular size — currently 256 px² — filled with Gaussian noise to |
| @@ -107,14 +108,15 @@ | ||
| 107 | 108 | value in the second cell of the notebook. Want to try more image |
| 108 | 109 | formats? You can put anything ImageMagick can recognize into the |
| 109 | 110 | `formats` list. Want to find the break-even point for images like those |
| 110 | 111 | in your own respository? Easily done with a small amount of code. |
| 111 | 112 | |
| 112 | -[im]: https://www.imagemagick.org/ | |
| 113 | -[jp]: https://jupyter.org/ | |
| 114 | -[nb]: ./image-format-vs-repo-size.ipynb | |
| 115 | -[wp]: http://wand-py.org/ | |
| 113 | +[im]: https://www.imagemagick.org/ | |
| 114 | +[jp]: https://jupyter.org/ | |
| 115 | +[nbd]: ./image-format-vs-repo-size.ipynb | |
| 116 | +[nbp]: https://nbviewer.jupyter.org/urls/fossil-scm.org/fossil/doc/trunk/www/image-format-vs-repo-size.ipynb | |
| 117 | +[wp]: http://wand-py.org/ | |
| 116 | 118 | |
| 117 | 119 | |
| 118 | 120 | ## Results |
| 119 | 121 | |
| 120 | 122 | Running the notebook gives a bar chart something like⁴ this: |
| 121 | 123 |
| --- www/image-format-vs-repo-size.md | |
| +++ www/image-format-vs-repo-size.md | |
| @@ -77,12 +77,13 @@ | |
| 77 | |
| 78 | |
| 79 | |
| 80 | ## Demonstration |
| 81 | |
| 82 | The companion [`image-format-vs-repo-size.ipynb` file][nb] is a |
| 83 | [Jupyter][jp] notebook implementing the following experiment: |
| 84 | |
| 85 | 1. Create an empty Fossil repository; save its initial size. |
| 86 | |
| 87 | 2. Use [ImageMagick][im] via [Wand][wp] to generate a JPEG file of a |
| 88 | particular size — currently 256 px² — filled with Gaussian noise to |
| @@ -107,14 +108,15 @@ | |
| 107 | value in the second cell of the notebook. Want to try more image |
| 108 | formats? You can put anything ImageMagick can recognize into the |
| 109 | `formats` list. Want to find the break-even point for images like those |
| 110 | in your own respository? Easily done with a small amount of code. |
| 111 | |
| 112 | [im]: https://www.imagemagick.org/ |
| 113 | [jp]: https://jupyter.org/ |
| 114 | [nb]: ./image-format-vs-repo-size.ipynb |
| 115 | [wp]: http://wand-py.org/ |
| 116 | |
| 117 | |
| 118 | ## Results |
| 119 | |
| 120 | Running the notebook gives a bar chart something like⁴ this: |
| 121 |
| --- www/image-format-vs-repo-size.md | |
| +++ www/image-format-vs-repo-size.md | |
| @@ -77,12 +77,13 @@ | |
| 77 | |
| 78 | |
| 79 | |
| 80 | ## Demonstration |
| 81 | |
| 82 | The companion `image-format-vs-repo-size.ipynb` file ([download][nbd], |
| 83 | [preview][nbp]) is a [Jupyter][jp] notebook implementing the following |
| 84 | experiment: |
| 85 | |
| 86 | 1. Create an empty Fossil repository; save its initial size. |
| 87 | |
| 88 | 2. Use [ImageMagick][im] via [Wand][wp] to generate a JPEG file of a |
| 89 | particular size — currently 256 px² — filled with Gaussian noise to |
| @@ -107,14 +108,15 @@ | |
| 108 | value in the second cell of the notebook. Want to try more image |
| 109 | formats? You can put anything ImageMagick can recognize into the |
| 110 | `formats` list. Want to find the break-even point for images like those |
| 111 | in your own respository? Easily done with a small amount of code. |
| 112 | |
| 113 | [im]: https://www.imagemagick.org/ |
| 114 | [jp]: https://jupyter.org/ |
| 115 | [nbd]: ./image-format-vs-repo-size.ipynb |
| 116 | [nbp]: https://nbviewer.jupyter.org/urls/fossil-scm.org/fossil/doc/trunk/www/image-format-vs-repo-size.ipynb |
| 117 | [wp]: http://wand-py.org/ |
| 118 | |
| 119 | |
| 120 | ## Results |
| 121 | |
| 122 | Running the notebook gives a bar chart something like⁴ this: |
| 123 |