diff --git a/.github/workflows/build_one.yml b/.github/workflows/build_one.yml index 1bd6b2c66..f1279badf 100644 --- a/.github/workflows/build_one.yml +++ b/.github/workflows/build_one.yml @@ -120,10 +120,14 @@ jobs: rmdir ./tmp git add ./doc/gallery/$DIR git commit -m "adding $DIR" +<<<<<<< HEAD echo "git status" git status echo "git push" git push -u origin HEAD:$BRANCHNAME +======= + git push --force "https://pyviz-developers:${{ secrets.GITHUB_TOKEN }}@github.com/holoviz-topics/examples.git" HEAD:$BRANCHNAME +>>>>>>> 5ee0184f (Rebase branch onto #200) git checkout local_branch_qpeori - name: clean up run: doit clean --clean-dep build:${{ inputs.project }} diff --git a/attractors/.projectignore b/attractors/.projectignore new file mode 100644 index 000000000..58e4feb1c --- /dev/null +++ b/attractors/.projectignore @@ -0,0 +1,18 @@ +# This file contains a list of match patterns that instructs +# anaconda-project to exclude certain files or directories when +# building a project archive. The file format is a simplfied +# version of Git's .gitignore file format. In fact, if the +# project is hosted in a Git repository, these patterns can be +# merged into the .gitignore file and this file removed. +# See the anaconda-project documentation for more details. + +# Python caching +*.pyc +*.pyd +*.pyo +__pycache__/ + +# Jupyter & Spyder stuff +.ipynb_checkpoints/ +.Trash-*/ +/.spyderproject diff --git a/attractors/attractors.ipynb b/attractors/attractors.ipynb index 4d53d9a75..e4e3be3ef 100644 --- a/attractors/attractors.ipynb +++ b/attractors/attractors.ipynb @@ -22,7 +22,7 @@ "\n", "At each time step, the equations define the location for the following time step, and the accumulated locations show the areas of the 2D plane most commonly visited by the imaginary particle. \n", "\n", - "It's easy to calculate these values in Python using [Numba](http://numba.pydata.org). First, we define the iterative attractor equation:" + "It's easy to calculate these values in Python using [Numba](https://numba.pydata.org). First, we define the iterative attractor equation:" ] }, { @@ -92,7 +92,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can now aggregate these 10,000,000 continuous coordinates into a discrete 2D rectangular grid with [Datashader](http://datashader.org), counting each time a point fell into that grid cell:" + "We can now aggregate these 10,000,000 continuous coordinates into a discrete 2D rectangular grid with [Datashader](https://datashader.org), counting each time a point fell into that grid cell:" ] }, { @@ -247,7 +247,7 @@ "\n", "## De Jong attractors\n", "\n", - "A variety of other sets of attractor equations have been proposed, such as these from [Peter de Jong](http://paulbourke.net/fractals/peterdejong):" + "A variety of other sets of attractor equations have been proposed, such as these from [Peter de Jong](https://paulbourke.net/fractals/peterdejong):" ] }, { @@ -270,7 +270,7 @@ "source": [ "## Svensson attractors\n", "\n", - "From [Johnny Svensson](http://paulbourke.net/fractals/peterdejong/):" + "From [Johnny Svensson](https://paulbourke.net/fractals/peterdejong/):" ] }, { @@ -293,7 +293,7 @@ "source": [ "## Bedhead Attractor\n", "\n", - "From [Ivan Emrich](https://www.deviantart.com/jaguarfacedman) and [Jason Rampe](https://softologyblog.wordpress.com/2017/03/04/2d-strange-attractors):" + "From [Ivan Emrich and Jason Rampe](https://softologyblog.wordpress.com/2017/03/04/2d-strange-attractors):" ] }, { @@ -375,7 +375,7 @@ "source": [ "## Gumowski-Mira Attractor\n", "\n", - "From [I. Gumowski and C. Mira](http://kgdawiec.bplaced.net/badania/pdf/cacs_2010.pdf), with code and parameters from [Jason Rampe](https://softologyblog.wordpress.com/2017/03/04/2d-strange-attractors) and [Lázaro Alonso](https://web.archive.org/web/20220128110321/https://lazarusa.github.io/Webpage/codepython2.html):" + "From [I. Gumowski and C. Mira](https://kgdawiec.bplaced.net/badania/pdf/cacs_2010.pdf), with code and parameters from [Jason Rampe](https://softologyblog.wordpress.com/2017/03/04/2d-strange-attractors) and [Lázaro Alonso](https://web.archive.org/web/20220128110321/https://lazarusa.github.io/Webpage/codepython2.html):" ] }, { diff --git a/attractors/attractors_panel.ipynb b/attractors/attractors_panel.ipynb index 83abae2ff..c583f89fc 100644 --- a/attractors/attractors_panel.ipynb +++ b/attractors/attractors_panel.ipynb @@ -19,7 +19,7 @@ "\n", "This dashboard code also functions as an example of how to build a Panel application for working with an arbitrarily large family of Python objects organized into a class hierarchy, without depending on the details of that structure and without that code depending on any GUI libraries. In this approach, each object defines its own parameters in a GUI-independent way, but then Panel can access this information and construct appropriate widgets to provide interactive control of the values. This approach can allow the same codebase be used in a GUI with full interactivity while also supporting non-GUI command-line, batch, or headless usage. New classes added to the .py file, even with entirely different parameters, will automatically be supported by this GUI code.\n", "\n", - "If you aren't familiar with Panel, you may wish to check out the much simpler [Clifford-only app](./clifford_panel.ipynb) first, to understand the basic structure of an app and of how to compute an attractor.\n", + "If you aren't familiar with Panel, you may wish to check out the much simpler [Clifford-only app](clifford_panel.ipynb) first, to understand the basic structure of an app and of how to compute an attractor.\n", "\n", "\n", "## Attractor definitions\n", @@ -165,11 +165,21 @@ "from panel.pane import LaTeX\n", "pn.extension('katex', sizing_mode='stretch_width')\n", "\n", + "pn.Param.margin = 0\n", + "pn.widgets.Button.param.width.default = 300" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ "class Attractors(pn.viewable.Viewer):\n", " attractor_type = param.Selector(objects=params.attractors, default=params.attractors[\"Clifford\"], precedence=0.9)\n", "\n", " parameters = param.Selector(objects=params.attractors, precedence=-0.5, readonly=True)\n", - "\n", + " \n", " plot_type = param.Selector(\n", " precedence=0.8, objects=['points', 'line'],\n", " doc=\"Type of aggregation to use\"\n", @@ -180,7 +190,7 @@ "\n", " @param.depends(\"parameters.param\", watch=True)\n", " def _update_from_parameters(self):\n", - " a = params.attractor(*self.attractor_type())\n", + " a = params.attractor(*self.parameters)\n", " if a is not self.attractor_type:\n", " self.param.update(attractor_type=a)\n", "\n", @@ -236,7 +246,7 @@ "outputs": [], "source": [ "logo = ''\n", - "text = \"\"\" *This [Panel](https://github.com/holoviz/panel) app lets you explore [strange attractors](attractors.ipynb) \n", + "text = \"\"\" *This [Panel](https://github.com/holoviz/panel) app lets you explore [strange attractors](https://examples.holoviz.org/gallery/attractors/attractors.html) \n", "-- fractal-like patterns that can emerge from the trajectory of a particle in 2D space.*\n", "\n", "*Here you can choose between different attractor families, selecting from predefined examples or \n", diff --git a/attractors/clifford_panel.ipynb b/attractors/clifford_panel.ipynb index f9e8ba148..a97919ecf 100644 --- a/attractors/clifford_panel.ipynb +++ b/attractors/clifford_panel.ipynb @@ -15,7 +15,7 @@ "src='./assets/clifford_screenshot.png'/>\n", "\n", "\n", - "[Clifford attractors](./attractors.py) are a type of iterative equation that traces the path of a particle through a 2D space using functions of sine and cosine terms that make interesting \"attractor\" patterns (covering only some portions of the possible space, in certain shapes). \n", + "[Clifford attractors](attractors.py) are a type of iterative equation that traces the path of a particle through a 2D space using functions of sine and cosine terms that make interesting \"attractor\" patterns (covering only some portions of the possible space, in certain shapes). \n", "\n", "Here we use Numpy and Pandas to calculate a dataframe consisting of millions of such locations, using [Numba](https://numba.pydata.org) to make generating them 50X faster than bare Python. We'll then plot the results as a static image using [Datashader](https://datashader.org), which renders arbitrarily large data into fixed-sized images." ] diff --git a/attractors/data/attractors.yml b/attractors/data/attractors.yml index 3ea681f94..622680e60 100644 --- a/attractors/data/attractors.yml +++ b/attractors/data/attractors.yml @@ -1,590 +1,75 @@ -- - Svensson - - fire - - 0 - - 0 - - 1.4 - - 1.56 - - 1.4 - - -6.56 -- - De_Jong - - bgyw - - 0 - - 0 - - -2.24 - - 0.43 - - -0.65 - - -2.43 -- - Bedhead - - viridis - - 1 - - 1 - - 0.06 - - 0.98 -- - Clifford - - kbc - - 0 - - 0 - - -1.9 - - -1.9 - - -1.9 - - -1.0 -- - Clifford - - viridis - - 0 - - 0 - - 0.75 - - 1.34 - - -1.93 - - 1.0 -- - Gumowski_Mira - - kbc - - 0.0 - - 0.5 - - 0.0 - - 0 - - 0.228 -- - De_Jong - - inferno - - 0 - - 0 - - 1.4 - - -2.3 - - 2.4 - - -2.1 -- - Fractal_Dream - - bmw - - 0.1 - - 0.1 - - -2.8276 - - 1.2813 - - 1.9655 - - 0.597 -- - Hopalong2 - - kgy - - 0 - - 0 - - 7.8 - - 0.13 - - 8.15 -- - Gumowski_Mira - - gray - - 0 - - 1 - - 0.008 - - 0.05 - - -0.45 -- - Gumowski_Mira - - fire - - 0 - - 1 - - 0.008 - - 0.05 - - -0.9 -- - Symmetric_Icon - - bmw - - 0.01 - - 0.01 - - -1.0 - - 0.1 - - -0.82 - - 0.0 - - 1.56 - - 3 -- - Symmetric_Icon - - bgy - - 0.01 - - 0.01 - - 2.0 - - 0.0 - - 1.0 - - 0.1 - - -1.86 - - 4 -- - Symmetric_Icon - - inferno - - 0.01 - - 0.01 - - 5.0 - - -1.0 - - 1.0 - - 0.188 - - -2.5 - - 5 -- - Gumowski_Mira - - kgy - - 0.1 - - 0.1 - - 0.008 - - 0.05 - - 0.16 -- - Gumowski_Mira - - bgyw - - 0.1 - - 0.1 - - 0.0 - - 0.5 - - -0.7509 -- - Symmetric_Icon - - viridis - - 0.01 - - 0.01 - - 1.8 - - 0.0 - - 1.0 - - 0.1 - - -1.93 - - 5 -- - Fractal_Dream - - bmy - - 0.1 - - 0.1 - - -1.9956 - - -1.4528 - - -2.6206 - - 0.8517 -- - Symmetric_Icon - - bmw - - 0.01 - - 0.01 - - 1.806 - - 0.0 - - 1.0 - - 0.0 - - -1.806 - - 5 -- - Gumowski_Mira - - bmy - - 0 - - 1 - - 0.0 - - 0.5 - - -0.22 -- - Symmetric_Icon - - viridis - - 0.01 - - 0.01 - - -2.0 - - 0.0 - - -0.5 - - 0.0 - - 2.6 - - 5 -- - Symmetric_Icon - - inferno - - 0.01 - - 0.01 - - 2.0 - - 0.2 - - 0.1 - - 0.0 - - -2.34 - - 5 -- - Gumowski_Mira - - bgy - - 0.1 - - 0.1 - - 0.0 - - 0.5 - - -0.75 -- - De_Jong - - fire - - 0 - - 0 - - 1.4 - - 1.56 - - 1.4 - - -6.56 -- - Svensson - - bgyw - - 0 - - 0 - - -1.78 - - 1.29 - - -0.09 - - -1.18 -- - Fractal_Dream - - bgy - - 0.1 - - 0.1 - - -0.966918 - - 2.879879 - - 0.765145 - - 0.744728 -- - Symmetric_Icon - - fire - - 0.01 - - 0.01 - - 3.0 - - -16.79 - - 1.0 - - 0.0 - - -2.05 - - 9 -- - Gumowski_Mira - - kgy - - 0.0 - - 0.5 - - 0.0 - - 0 - - -0.604 -- - Symmetric_Icon - - bgy - - 0.01 - - 0.01 - - -1.0 - - 0.1 - - -0.82 - - 0.12 - - 1.56 - - 3 -- - Clifford - - bmw - - 0 - - 0 - - -1.4 - - 1.6 - - 1.0 - - 0.7 -- - Hopalong2 - - kbc - - 0 - - 0 - - 9.7 - - 1.6 - - 7.9 -- - Gumowski_Mira - - inferno - - 0.0 - - 0.5 - - 0.0 - - 0 - - -0.623 -- - Clifford - - fire - - 0 - - 0 - - -1.7 - - 1.8 - - -1.9 - - -0.4 -- - Gumowski_Mira - - bmw - - 0 - - 0.5 - - 0.0 - - 0.05 - - -0.55 -- - De_Jong - - bgy - - 0 - - 0 - - -2.7 - - -0.09 - - -0.86 - - -2.2 -- - Bedhead - - kgy - - 1 - - 1 - - -0.81 - - -0.92 -- - Symmetric_Icon - - gray - - 0.01 - - 0.01 - - 5.0 - - 1.5 - - 1.0 - - 0.0 - - -2.7 - - 6 -- - Symmetric_Icon - - bmy - - 0.01 - - 0.01 - - -2.5 - - -0.1 - - 0.9 - - -0.15 - - 2.39 - - 16 -- - Gumowski_Mira - - kbc - - 0 - - 0.5 - - 0.008 - - 0.05 - - -0.7 -- - Gumowski_Mira - - viridis - - 0.5 - - 0 - - 0.0 - - 0.05 - - -0.2 -- - Clifford - - inferno - - 0 - - 0 - - -1.32 - - -1.65 - - 0.74 - - 1.81 -- - Symmetric_Icon - - bgyw - - 0.01 - - 0.01 - - -1.0 - - 0.03 - - -0.8 - - 0.0 - - 1.455 - - 3 -- - Svensson - - bmw - - 0 - - 0 - - 1.5 - - -1.8 - - 1.6 - - 0.9 -- - De_Jong - - bmw - - 0 - - 0 - - -0.827 - - -1.637 - - 1.659 - - -0.943 -- - Symmetric_Icon - - kbc - - 0.01 - - 0.01 - - 2.32 - - 0.0 - - 0.75 - - 0.0 - - -2.32 - - 5 -- - Gumowski_Mira - - viridis - - 0.0 - - 0.5 - - 0.0 - - 0 - - -0.002 -- - Hopalong1 - - bgy - - 0 - - 0 - - 2.0 - - 1.0 - - 0.0 -- - Fractal_Dream - - bgyw - - 0.1 - - 0.1 - - -1.1554 - - -2.3419 - - -1.9799 - - 2.1828 -- - Gumowski_Mira - - bgyw - - 0.5 - - 0.5 - - 0.0 - - 0.05 - - -0.23 -- - Hopalong2 - - gray - - 0 - - 0 - - 7.17 - - 8.44 - - 2.56 -- - Hopalong1 - - bmy - - 0 - - 0 - - 1.1 - - 0.5 - - 1.0 -- - Symmetric_Icon - - bgyw - - 0.01 - - 0.01 - - 10.0 - - -12.0 - - 1.0 - - 0.0 - - -2.195 - - 3 -- - De_Jong - - bmy - - 0 - - 0 - - 2.01 - - -2.53 - - 1.61 - - -0.33 -- - Symmetric_Icon - - bmy - - 0.01 - - 0.01 - - -2.5 - - 0.0 - - 0.9 - - 0.0 - - 2.5 - - 3 -- - De_Jong - - kbc - - 0 - - 0 - - -1.244 - - -1.251 - - -1.815 - - -1.908 -- - Gumowski_Mira - - bmw - - 0 - - 1 - - 0.008 - - 0.05 - - -0.496 -- - Gumowski_Mira - - fire - - 0.1 - - 0.1 - - 0.0 - - 0.5 - - -0.65 -- - Clifford - - bgy - - 0 - - 0 - - -1.3 - - -1.3 - - -1.8 - - -1.9 -- - Clifford - - bgy - - 0 - - 0 - - -1.6 - - 1.6 - - 0.7 - - -1.0 -- - Gumowski_Mira - - gray - - 0.0 - - 0.5 - - 0.0 - - 0 - - -0.578 -- - Clifford - - bmw - - 0 - - 0 - - -1.7 - - 1.5 - - -0.5 - - 0.7 -- - Hopalong1 - - bgyw - - 0 - - 0 - - 2.0 - - 0.05 - - 2.0 -- - Bedhead - - kbc - - 1 - - 1 - - -0.64 - - 0.76 -- - De_Jong - - viridis - - 0 - - 0 - - 1.7 - - 1.7 - - 0.6 - - 1.2 -- - Clifford - - gray - - 0 - - 0 - - 1.1 - - -1.32 - - -1.03 - - 1.54 -- - Gumowski_Mira - - bmy - - 0.5 - - 0.5 - - 0.009 - - 0.05 - - 0.32 -- - Gumowski_Mira - - bgy - - 0 - - 0.5 - - 0.0 - - 0.05 - - -0.31 -- - Svensson - - bmy - - 0 - - 0 - - -0.91 - - -1.29 - - -1.97 - - -1.56 -- - Gumowski_Mira - - inferno - - 0.5 - - 0.5 - - 0.0 - - 0.05 - - -0.22 -- - Symmetric_Icon - - kgy - - 0.01 - - 0.01 - - 1.0 - - -0.1 - - 0.167 - - 0.0 - - -2.08 - - 7 -- - Clifford - - bmy - - 0 - - 0 - - 1.7 - - 0.7 - - 1.4 - - 2.0 -- - Clifford - - bgyw - - 0 - - 0 - - 1.7 - - 1.7 - - 0.6 - - 1.2 -- - Clifford - - kgy - - 0 - - 0 - - 0.77 - - 1.99 - - -1.31 - - -1.45 -- - Bedhead - - inferno - - 1 - - 1 - - -0.67 - - 0.83 +- [Svensson, fire, 0, 0, 1.4, 1.56, 1.4, -6.56] +- [De_Jong, bgyw, 0, 0, -2.24, 0.43, -0.65, -2.43] +- [Bedhead, viridis, 1, 1, 0.06, 0.98] +- [Clifford, kbc, 0, 0, -1.9, -1.9, -1.9, -1.0] +- [Clifford, viridis, 0, 0, 0.75, 1.34, -1.93, 1.0] +- [Gumowski_Mira, kbc, 0.0, 0.5, 0.0, 0, 0.228] +- [De_Jong, inferno, 0, 0, 1.4, -2.3, 2.4, -2.1] +- [Fractal_Dream, bmw, 0.1, 0.1, -2.8276, 1.2813, 1.9655, 0.597] +- [Hopalong2, kgy, 0, 0, 7.8, 0.13, 8.15] +- [Gumowski_Mira, gray, 0, 1, 0.008, 0.05, -0.45] +- [Gumowski_Mira, fire, 0, 1, 0.008, 0.05, -0.9] +- [Symmetric_Icon, bmw, 0.01, 0.01, -1.0, 0.1, -0.82, 0.0, 1.56, 3] +- [Symmetric_Icon, bgy, 0.01, 0.01, 2.0, 0.0, 1.0, 0.1, -1.86, 4] +- [Symmetric_Icon, inferno, 0.01, 0.01, 5.0, -1.0, 1.0, 0.188, -2.5, 5] +- [Gumowski_Mira, kgy, 0.1, 0.1, 0.008, 0.05, 0.16] +- [Gumowski_Mira, bgyw, 0.1, 0.1, 0.0, 0.5, -0.7509] +- [Symmetric_Icon, viridis, 0.01, 0.01, 1.8, 0.0, 1.0, 0.1, -1.93, 5] +- [Fractal_Dream, bmy, 0.1, 0.1, -1.9956, -1.4528, -2.6206, 0.8517] +- [Symmetric_Icon, bmw, 0.01, 0.01, 1.806, 0.0, 1.0, 0.0, -1.806, 5] +- [Gumowski_Mira, bmy, 0, 1, 0.0, 0.5, -0.22] +- [Symmetric_Icon, viridis, 0.01, 0.01, -2.0, 0.0, -0.5, 0.0, 2.6, 5] +- [Symmetric_Icon, inferno, 0.01, 0.01, 2.0, 0.2, 0.1, 0.0, -2.34, 5] +- [Gumowski_Mira, bgy, 0.1, 0.1, 0.0, 0.5, -0.75] +- [De_Jong, fire, 0, 0, 1.4, 1.56, 1.4, -6.56] +- [Svensson, bgyw, 0, 0, -1.78, 1.29, -0.09, -1.18] +- [Fractal_Dream, bgy, 0.1, 0.1, -0.966918, 2.879879, 0.765145, 0.744728] +- [Symmetric_Icon, fire, 0.01, 0.01, 3.0, -16.79, 1.0, 0.0, -2.05, 9] +- [Gumowski_Mira, kgy, 0.0, 0.5, 0.0, 0, -0.604] +- [Symmetric_Icon, bgy, 0.01, 0.01, -1.0, 0.1, -0.82, 0.12, 1.56, 3] +- [Clifford, bmw, 0, 0, -1.4, 1.6, 1.0, 0.7] +- [Hopalong2, kbc, 0, 0, 9.7, 1.6, 7.9] +- [Gumowski_Mira, inferno, 0.0, 0.5, 0.0, 0, -0.623] +- [Clifford, fire, 0, 0, -1.7, 1.8, -1.9, -0.4] +- [Gumowski_Mira, bmw, 0, 0.5, 0.0, 0.05, -0.55] +- [De_Jong, bgy, 0, 0, -2.7, -0.09, -0.86, -2.2] +- [Bedhead, kgy, 1, 1, -0.81, -0.92] +- [Symmetric_Icon, gray, 0.01, 0.01, 5.0, 1.5, 1.0, 0.0, -2.7, 6] +- [Symmetric_Icon, bmy, 0.01, 0.01, -2.5, -0.1, 0.9, -0.15, 2.39, 16] +- [Gumowski_Mira, kbc, 0, 0.5, 0.008, 0.05, -0.7] +- [Gumowski_Mira, viridis, 0.5, 0, 0.0, 0.05, -0.2] +- [Clifford, inferno, 0, 0, -1.32, -1.65, 0.74, 1.81] +- [Symmetric_Icon, bgyw, 0.01, 0.01, -1.0, 0.03, -0.8, 0.0, 1.455, 3] +- [Svensson, bmw, 0, 0, 1.5, -1.8, 1.6, 0.9] +- [De_Jong, bmw, 0, 0, -0.827, -1.637, 1.659, -0.943] +- [Symmetric_Icon, kbc, 0.01, 0.01, 2.32, 0.0, 0.75, 0.0, -2.32, 5] +- [Gumowski_Mira, viridis, 0.0, 0.5, 0.0, 0, -0.002] +- [Hopalong1, bgy, 0, 0, 2.0, 1.0, 0.0] +- [Fractal_Dream, bgyw, 0.1, 0.1, -1.1554, -2.3419, -1.9799, 2.1828] +- [Hopalong1, bmw, 0, 0, 2.0, 0.05, 0.5] +- [Gumowski_Mira, bgyw, 0.5, 0.5, 0.0, 0.05, -0.23] +- [Hopalong2, gray, 0, 0, 7.17, 8.44, 2.56] +- [Hopalong1, bmy, 0, 0, 1.1, 0.5, 1.0] +- [Symmetric_Icon, bgyw, 0.01, 0.01, 10.0, -12.0, 1.0, 0.0, -2.195, 3] +- [De_Jong, bmy, 0, 0, 2.01, -2.53, 1.61, -0.33] +- [Symmetric_Icon, bmy, 0.01, 0.01, -2.5, 0.0, 0.9, 0.0, 2.5, 3] +- [De_Jong, kbc, 0, 0, -1.244, -1.251, -1.815, -1.908] +- [Gumowski_Mira, bmw, 0, 1, 0.008, 0.05, -0.496] +- [Gumowski_Mira, fire, 0.1, 0.1, 0.0, 0.5, -0.65] +- [Clifford, bgy, 0, 0, -1.3, -1.3, -1.8, -1.9] +- [Clifford, bgy, 0, 0, -1.6, 1.6, 0.7, -1.0] +- [Gumowski_Mira, gray, 0.0, 0.5, 0.0, 0, -0.578] +- [Clifford, bmw, 0, 0, -1.7, 1.5, -0.5, 0.7] +- [Hopalong1, bgyw, 0, 0, 2.0, 0.05, 2.0] +- [Bedhead, kbc, 1, 1, -0.64, 0.76] +- [De_Jong, viridis, 0, 0, 1.7, 1.7, 0.6, 1.2] +- [Clifford, gray, 0, 0, 1.1, -1.32, -1.03, 1.54] +- [Gumowski_Mira, bmy, 0.5, 0.5, 0.009, 0.05, 0.32] +- [Gumowski_Mira, bgy, 0, 0.5, 0.0, 0.05, -0.31] +- [Svensson, bmy, 0, 0, -0.91, -1.29, -1.97, -1.56] +- [Gumowski_Mira, inferno, 0.5, 0.5, 0.0, 0.05, -0.22] +- [Symmetric_Icon, kgy, 0.01, 0.01, 1.0, -0.1, 0.167, 0.0, -2.08, 7] +- [Clifford, bmy, 0, 0, 1.7, 0.7, 1.4, 2.0] +- [Clifford, bgyw, 0, 0, 1.7, 1.7, 0.6, 1.2] +- [Clifford, kgy, 0, 0, 0.77, 1.99, -1.31, -1.45] +- [Bedhead, inferno, 1, 1, -0.67, 0.83] diff --git a/attractors/index.ipynb b/attractors/index.ipynb index 3183cde19..0588f4224 100644 --- a/attractors/index.ipynb +++ b/attractors/index.ipynb @@ -2,6 +2,7 @@ "cells": [ { "cell_type": "markdown", + "id": "5d21eaeb-d85d-4671-88e5-d122c7484071", "metadata": {}, "source": [ "# Attractors\n", @@ -10,17 +11,10 @@ "\n", "1. [Visualizing Attractors](./attractors.ipynb): This notebook shows how to calculate and plot two-dimensional attractors of a variety of types, using code and parameters primarily from [Lázaro Alonso](https://web.archive.org/web/20220128110321/https://lazarusa.github.io/Webpage/codepython2.html), [François Pacull](https://aetperf.github.io/2018/08/29/Plotting-Hopalong-attractor-with-Datashader-and-Numba.html), [Jason Rampe](https://softologyblog.wordpress.com/2017/03/04/2d-strange-attractors), [Paul Bourke](https://paulbourke.net/fractals/), and [James A. Bednar](https://github.com/jbednar).\n", "\n", - "2. [Clifford Attractors App](./clifford_panel.ipynb): *Clifford attractors* are a type of iterative equation that traces the path of a particle through a 2D space using functions of sine and cosine terms that make interesting \"attractor\" patterns (covering only some portions of the possible space, in certain shapes). This notebook shows how to use [Datashader](https://datashader.org), [Numba](https://numba.pydata.org) and [Panel](https://panel.holoviz.org) to build a simple app to interact with such attractors.\n", + "2. [Clifford Attractors App](./clifford_panel.ipynb): *Clifford attractors* are a type of iterative equation that traces the path of a particle through a 2D space using functions of sine and cosine terms that make interesting \\\"attractor\\\" patterns (covering only some portions of the possible space, in certain shapes). This notebook shows how to use [Datashader](https://datashader.org), [Numba](https://numba.pydata.org) and [Panel](https://panel.holoviz.org) to build a simple app to interact with such attractors.\n", "\n", "3. [Strange Attractors App](./attractors_panel.ipynb): *Strange attractors* are a type of iterative equation that traces the path of a particle through a 2D space, forming interesting patterns in the trajectories. The patterns differ depending on which sets of equations are used and which parameter values are selected for those equations. This notebook demonstrates how to build a more complex [Panel](https://panel.holoviz.org) app that makes the parameter spaces easy to explore, allowing to select between the attractor families, to adjust the parameter values for that type of attractor, and see the results rendered using [Datashader](https://datashader.org).\n" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -43,5 +37,5 @@ } }, "nbformat": 4, - "nbformat_minor": 4 + "nbformat_minor": 5 } diff --git a/dodo.py b/dodo.py index 8b7835449..b332f1d7e 100644 --- a/dodo.py +++ b/dodo.py @@ -1652,7 +1652,10 @@ def has_test_command(name): def test_notebooks(name): notebooks = find_notebooks(name) notebooks = [str(nb) for nb in notebooks] +<<<<<<< HEAD env_vars = proj_env_vars(name) +======= +>>>>>>> 5ee0184f (Rebase branch onto #200) subprocess.run( [ 'pytest', @@ -1660,8 +1663,12 @@ def test_notebooks(name): '--nbval-cell-timeout=3600', f'--nbval-kernel-name={name}-kernel', ] + notebooks, +<<<<<<< HEAD env={**os.environ, **env_vars}, check=True, +======= + check=True +>>>>>>> 5ee0184f (Rebase branch onto #200) ) for name in all_project_names(root=''): @@ -2033,6 +2040,7 @@ def _clean_content(project): } +<<<<<<< HEAD def task_doc_move_project_notebooks(): """Move notebooks from the project dir to the project doc dir. @@ -2040,10 +2048,18 @@ def task_doc_move_project_notebooks(): """ def move_content(root='', name='all'): +======= +def task_doc_move_assets(): + """Copy the projects assets to doc/projname/assets/ + """ + + def move_assets(root='', name='all'): +>>>>>>> 5ee0184f (Rebase branch onto #200) projects = all_project_names(root) if name == 'all' else [name] for project in projects: _move_content(project) +<<<<<<< HEAD def _move_content(name): src_dir = pathlib.Path(name) dst_dir = pathlib.Path('doc', 'gallery', name) @@ -2051,18 +2067,49 @@ def _move_content(name): for nb in src_dir.glob('*.ipynb'): print(f'Moving notebook {nb}') shutil.copy2(nb, dst_dir / nb.name) +======= + def _move_assets(name): + # Copy all the files in ./projname/assets to ./doc/projname/assets/ + proj_assets_path = pathlib.Path(name, 'assets') + if proj_assets_path.exists(): + dest_assets_path = pathlib.Path('doc', name, 'assets') + if not dest_assets_path.exists(): + print(f'Creating dirs {dest_assets_path}') + os.makedirs(dest_assets_path) + print(f'Copying tree {proj_assets_path} to {dest_assets_path}') + shutil.copytree(proj_assets_path, dest_assets_path, dirs_exist_ok=True) +>>>>>>> 5ee0184f (Rebase branch onto #200) def clean_content(root='', name='all'): projects = all_project_names(root) if name == 'all' else [name] for project in projects: _clean_content(project) +<<<<<<< HEAD def _clean_content(project): path = pathlib.Path('doc', 'gallery', project) for nb in path.glob('*.ipynb'): print(f'Removing notebook {nb}') nb.unlink() remove_empty_dirs(path.parent) +======= + def _clean_assets(name): + doc_dir = pathlib.Path('doc') + proj_dir = doc_dir / name + if not proj_dir.exists(): + return + project_assets_dir = proj_dir / 'assets' + if not project_assets_dir.exists(): + return + for asset in project_assets_dir.iterdir(): + if asset.is_file(): + print(f'Removing asset {asset}') + asset.unlink() + elif asset.is_dir(): + print(f'Removing empty dir {asset}') + shutil.rmtree(asset) + project_assets_dir.rmdir() +>>>>>>> 5ee0184f (Rebase branch onto #200) return { 'actions': [move_content], diff --git a/nyc_taxi/.projectignore b/nyc_taxi/.projectignore new file mode 100644 index 000000000..58e4feb1c --- /dev/null +++ b/nyc_taxi/.projectignore @@ -0,0 +1,18 @@ +# This file contains a list of match patterns that instructs +# anaconda-project to exclude certain files or directories when +# building a project archive. The file format is a simplfied +# version of Git's .gitignore file format. In fact, if the +# project is hosted in a Git repository, these patterns can be +# merged into the .gitignore file and this file removed. +# See the anaconda-project documentation for more details. + +# Python caching +*.pyc +*.pyd +*.pyo +__pycache__/ + +# Jupyter & Spyder stuff +.ipynb_checkpoints/ +.Trash-*/ +/.spyderproject