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.

wyoung 2019-03-27 19:59 trunk
Commit f52d63e37bf8d2ec66fd36d5b62342193b2b42753e7535ef41e1681a040e361d
--- www/image-format-vs-repo-size.ipynb
+++ www/image-format-vs-repo-size.ipynb
@@ -8,11 +8,11 @@
88
"\n",
99
"## Prerequisites\n",
1010
"\n",
1111
"This notebook was developed with [JupyterLab][jl]. To follow in my footsteps, install that and the needed Python packages:\n",
1212
"\n",
13
- " $ sudo pip install jupyterlab matplotlib pandas wand\n",
13
+ " $ pip install jupyterlab matplotlib pandas wand\n",
1414
"\n",
1515
"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",
1616
"\n",
1717
"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",
1818
"\n",
@@ -150,11 +150,10 @@
150150
"# first 3 rows: the initial empty repo state (boring) and the repo DB\n",
151151
"# size as it \"settles\" in its first few checkins.\n",
152152
"data = pd.concat(repo_sizes, axis=1).drop(range(3))\n",
153153
"\n",
154154
"mpl.rcParams['figure.figsize'] = (6, 4)\n",
155
- "#plt.rcParams['axes.facecolor'] = 'white'\n",
156155
"ax = data.plot(kind = 'bar', colormap = 'coolwarm',\n",
157156
" grid = False, width = 0.8,\n",
158157
" edgecolor = 'white', linewidth = 2)\n",
159158
"ax.axes.set_xlabel('Checkin index')\n",
160159
"ax.axes.set_ylabel('Repo size (MiB)')\n",
161160
--- 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
--- www/image-format-vs-repo-size.md
+++ www/image-format-vs-repo-size.md
@@ -77,12 +77,13 @@
7777
7878
7979
8080
## Demonstration
8181
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:
8485
8586
1. Create an empty Fossil repository; save its initial size.
8687
8788
2. Use [ImageMagick][im] via [Wand][wp] to generate a JPEG file of a
8889
particular size — currently 256 px² — filled with Gaussian noise to
@@ -107,14 +108,15 @@
107108
value in the second cell of the notebook. Want to try more image
108109
formats? You can put anything ImageMagick can recognize into the
109110
`formats` list. Want to find the break-even point for images like those
110111
in your own respository? Easily done with a small amount of code.
111112
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/
116118
117119
118120
## Results
119121
120122
Running the notebook gives a bar chart something like⁴ this:
121123
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button