diff --git a/.ipynb_checkpoints/01 - Julia_from_IPython-checkpoint.ipynb b/.ipynb_checkpoints/01 - Julia_from_IPython-checkpoint.ipynb deleted file mode 100644 index bf232c8..0000000 --- a/.ipynb_checkpoints/01 - Julia_from_IPython-checkpoint.ipynb +++ /dev/null @@ -1,109 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "8b4b2ab7", - "metadata": {}, - "source": [ - "Load the Julia magic extension" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "4d4cbc68", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The julia.magic extension is already loaded. To reload it, use:\n", - " %reload_ext julia.magic\n" - ] - } - ], - "source": [ - "%load_ext julia.magic" - ] - }, - { - "cell_type": "markdown", - "id": "f578aa1c", - "metadata": {}, - "source": [ - "Excute some code written in ''Julia''" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "6fdc193d", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "x = 10 ⇒ x² = 100\n" - ] - } - ], - "source": [ - "%%julia\n", - "x = 10\n", - "y = x^2\n", - "println(\"x = $(x) ⇒ x² = $(y)\")" - ] - }, - { - "cell_type": "markdown", - "id": "66b2da7a", - "metadata": {}, - "source": [ - "Variables defined in Julia can be accessed from Python" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "ae1c4b46", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "x = 10 ⇒ x² = 100\n" - ] - } - ], - "source": [ - "x = %julia x\n", - "y = %julia y\n", - "print(f'x = {x} ⇒ x² = {y}')" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.2" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/.ipynb_checkpoints/01-Julia-dream-PyHEP2021-checkpoint.ipynb b/.ipynb_checkpoints/01-Julia-dream-PyHEP2021-checkpoint.ipynb deleted file mode 100644 index 195e2c6..0000000 --- a/.ipynb_checkpoints/01-Julia-dream-PyHEP2021-checkpoint.ipynb +++ /dev/null @@ -1,834 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "bda53ff3-7ee5-4f17-824b-6a979ef10ed6", - "metadata": {}, - "source": [ - "_Next cell is used to modify display setting for a presentation style._" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "a26ab57b-021a-438d-896a-8662e22a44ab", - "metadata": { - "jupyter": { - "source_hidden": true - }, - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "

Presentation mode. Clear the output of this cell to exit the mode.

\n", - "

Use j (next) and k (previous) keys to navigate between cells.

\n", - "\n" - ], - "text/plain": [ - "HTML{String}(\"\\n\\n

Presentation mode. Clear the output of this cell to exit the mode.

\\n

Use j (next) and k (previous) keys to navigate between cells.

\\n\\n\")" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "singleCellDisplay = false\n", - "editor_font_size = 25\n", - "code_output_font_size = 25\n", - "markdown_output_font_size = 25\n", - "markdown_list_font_size = 25\n", - "HTML(\"\"\"\n", - "\n", - "\n", - "

Presentation mode. Clear the output of this cell to exit the mode.

\n", - "

Use j (next) and k (previous) keys to navigate between cells.

\n", - "\n", - "\"\"\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "57c90a10-c8b4-47f8-8bb8-9bbf14058c66", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "id": "2ba91127-2e73-4bb4-bc2c-6ee77392c36e", - "metadata": { - "tags": [] - }, - "source": [ - "# PyHEP 2021 \n", - "\n", - "\n", - "----------\n", - "\n", - "


\n", - "\n", - "\n", - "
\n", - "
\n", - " \n", - "

Julia, a HEP dream comes true

\n", - " \n", - " Philippe Gras (Université Paris-Saclay, CEA/Irfu)\n", - "
\n", - "\n", - "
July 9th, 2021
\n", - "
" - ] - }, - { - "cell_type": "markdown", - "id": "527db46a-1650-4a50-8351-67222923a458", - "metadata": {}, - "source": [ - "# Introduction\n", - "\n", - "## Julia is a new __programming language__\n", - "## I've discovered it while making a survey of programming language for the projet of CUPID neutrinoless double-beta decay experiment, in last April\n", - " * It's a new programming language for me\n", - " * I've learned it for this talk and it was as fast as learning Python (actually faster because of their similarities)\n", - " \n", - "## I will present Julia to you in the perspective of using it for HEP applications" - ] - }, - { - "cell_type": "markdown", - "id": "demographic-nicaragua", - "metadata": { - "tags": [] - }, - "source": [ - "# High performance computing is important for HEP\n", - "\n", - "
\n", - "
\n", - "
From E Sexton-Kennedy 2018 J. Phys.: Conf. Ser. 1085 022006
\n", - " THS06*s: Tera CPUs $\\times$ s


\n", - "
\n", - "
\n", - "
\"CMS
\n", - "
\n", - "\n", - " * Computing plays a central role in the research done at LHC\n", - " + Theoretical predictions: simulation of the proton-proton collision\n", - " + Simulation of the detector response\n", - " + Reconstruction of the phyics events\n", - " + Analysis of reconstructed events to perform measurements and new physics search." - ] - }, - { - "cell_type": "markdown", - "id": "21a5c5fa-eeeb-459e-8e07-f1306c3d2304", - "metadata": {}, - "source": [ - "# Analysis of the reconstructed events\n", - " * Behind an LHC experiment result publication there are tens of thousands of computing jobs that have run on the worldwide computing grid. Both ATLAS and CMS reached their 1000th papers in June 2020.\n", - " * C++ is widely used and the performance it offers is essential\n", - " * Research code: developped by the main authors of the prepared publication\n", - " * Python is attractive becasue of its easy/fast code writing it offers and the library ecosystem that comes with it and we are many to use it. But it does not meet the performance provided by C++\n", - " + Used in conjunction of C++\n", - " + Huge development under way to leverage the performance of Python in terms of code running speed\n", - " * __More attracive would be a Programming language that offers at the same time the C++ and Python pros__" - ] - }, - { - "cell_type": "markdown", - "id": "62d38060-8798-42e1-9a0b-2af3e7b8a1c7", - "metadata": {}, - "source": [ - "# Julia solving the two-language problem\n", - "-----\n", - "\n", - "
\n", - " \n", - " \n", - " \n", - "
Fast/easy coding fastFast running
Python C/C++
\n", - " => Mixing languages and Go back-and-forth between them\n", - "
\n", - "\n", - "
\n", - "\n", - "* J. Bezanson, A. Edelman, S. Karpinski, and V. B. Shah tackled the problem in 2009 aiming to design a programing langue that providess both Fast/easy coding __AND__ Fast running\n", - " + Birth of Julia, release 0.1 in __2013__ \n", - " + This breakthrough was recognized by awards attributed to the authors\n", - " - [James H. Wilkinson Prize in Numerical Analysis and Scientific in 2019](https://www.ll.mit.edu/news/wilkinson-prize-goes-developers-flexible-julia-programming-language) \n", - " - [IEEE Computer Society Sidney Fernbach Award in 2019](https://www.computer.org/press-room/2019-news/2019-ieee-fernbach-award-edelman)\n", - "* In 12 years since its conceptualisation, Julia has been improved from release to release and has aggratated many package developpers\n", - " \n", - "
\n", - "

Nowadays, Julia is a mature language, with a wide ecosystem

\n", - "
\n", - "\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "legendary-sampling", - "metadata": {}, - "source": [ - "# Loops\n", - "\n", - "
\n", - "\"A\n", - "
" - ] - }, - { - "cell_type": "markdown", - "id": "outside-apartment", - "metadata": {}, - "source": [ - "# HEP data analysis is a looping game\n", - "\n", - "HEP enjoys loop: we loop on physics events to loop on particles/physics objects. We often perform particle matching and clustering and for this we loop on events to loop on objects to loop on objects.\n", - "\n", - "```julia\n", - "for event in billions_of_lhc_events\n", - " for tens_or_hundreds_of_objects in event\n", - " for tens_or_hundres_of_objects_to_match in event\n", - " ...\n", - " end\n", - " end\n", - "end\n", - "```\n", - "\n", - " * The outter loops hides several loops: datasets > files\n", - " * This is repeated several times for each analysis.\n", - "

⇒ Lines of code executed billions of times even for a Kleenex code, written specially for a publication.

" - ] - }, - { - "cell_type": "markdown", - "id": "c7f88121", - "metadata": {}, - "source": [ - "## Python dislikes loop\n", - "\n", - " * A master rule for high-performance code in Python is to avoid writing loop in Python \n", - " + ⇒ push the loop to underlying compiled libraries. Approach of the `numpy` vectorisation.\n", - " \n", - "Let's run a simple loop\n", - " \n", - "[Simple loop in Python](Python-code.ipynb#simple-loop)" - ] - }, - { - "cell_type": "markdown", - "id": "7e87ebd7-31da-4d23-a15f-ea90dc553b6f", - "metadata": {}, - "source": [ - "| Python |\n", - "|--------|\n", - "| 90 ms |" - ] - }, - { - "cell_type": "markdown", - "id": "de449e8a-809f-49ed-92cb-4ef01554d1bf", - "metadata": {}, - "source": [ - "## In C++. Code in `simple-loop.cc`:\n", - "\n", - "```cpp\n", - "#include \n", - "#include x\n", - "\n", - "int main(){\n", - " struct timeval t0, t1;\n", - " gettimeofday(&t0, 0);\n", - " \n", - " double a = 0.;\n", - " for(unsigned i = 0; i <= 1000000; ++i) a += 1.0/i;\n", - " std::cout << \"Computation Result: \" << a << \"\\n\";\n", - " \n", - " gettimeofday(&t1, 0);\n", - " std::cerr << \"Duration: \" << (t1.tv_sec-t0.tv_sec)\n", - " + 1.e-6*(t1.tv_usec-t0.tv_usec)\n", - "\t << \" seconds\\n\";\n", - " return 0;\n", - "}\n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "b914e148-86e3-4de0-9155-1849c66603f4", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Computation Result: 14.3927\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Duration: 0.003847 seconds\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Computation Result: 14.3927\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Duration: 0.001713 seconds\n" - ] - } - ], - "source": [ - "run(`g++ -Wall -o simple-loop simple-loop.cc`)\n", - "run(`./simple-loop`)\n", - ";\n", - "run(`g++ -O3 -Wall -o simple-loop simple-loop.cc`)\n", - "run(`./simple-loop`)\n", - ";" - ] - }, - { - "cell_type": "markdown", - "id": "261eaf0d-85c3-4cbe-ad23-be8031148137", - "metadata": {}, - "source": [ - "| Python | C++ |\n", - "|--------|-------|\n", - "| 90 ms | 1.5 ms |" - ] - }, - { - "cell_type": "markdown", - "id": "d235f987-a157-4bb7-9aea-609edd9126e8", - "metadata": {}, - "source": [ - "## How is doing Julia?" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "ebf7c4e9-0851-486e-8a7c-944b212b67b0", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " 0.001671 seconds (1 allocation: 16 bytes)\n" - ] - }, - { - "data": { - "text/plain": [ - "14.392726722864989" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "#\n", - "# Julia\n", - "#\n", - "function f()\n", - " a = 0.0\n", - " for i in 1:1_000_000 # ✨ Note the underscores that improves legibility\n", - " a = a + 1.0/i\n", - " end\n", - " return a\n", - "end\n", - "f()\n", - "@time b = f()" - ] - }, - { - "cell_type": "markdown", - "id": "c91f2f0f-e963-43fd-bf54-85e021e0dcf7", - "metadata": {}, - "source": [ - "| Python | C++ | Julia |\n", - "|--------|--------|--------|\n", - "| 90ms | 1.5 ms | 1.6 ms |" - ] - }, - { - "cell_type": "markdown", - "id": "084c9d64-9eff-4aeb-a8c6-51a4906f8fec", - "metadata": {}, - "source": [ - "# Ease of programming\n", - "\n", - "## The goal is not only running performance. We want also fast and easy coding\n", - "\n", - " * You have already seen in the previous example that the code syntax and grammar is similar to Pythons. No ''std::map>''..., no compilation step." - ] - }, - { - "cell_type": "markdown", - "id": "e2572361-9b37-4891-9592-5b050a4029e8", - "metadata": {}, - "source": [ - "# Programming in a community" - ] - }, - { - "cell_type": "markdown", - "id": "behavioral-mining", - "metadata": {}, - "source": [ - "## Googling programming\n", - "\n", - "Internet search engine and stack overflow play is an essential ingredient in nowadays programming workflow.\n", - "\n", - "Julia is already widespread enough, to find all the information on the Internet.
\n", - "\n", - "Go to [DuckDuckGo](https://www.duckduckgo.com) or your prefered search engine and make a try.\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "fd0ced5b-6eee-426a-9b4c-035dea81a0cc", - "metadata": {}, - "source": [ - "# Ecosystem\n", - "\n", - "* Large set of libraries and active developement\n", - " + Julia is firstly used by scientific community ⇒ oriented to our needs\n", - "* I did the following game during the wokshop: I've looked for a Julia equivalent each time a speaker mention a Python library (apart from HEP specific ones).\n", - " + Caveat: I've not checked that it covers all the features of the Python package\n", - " + The results of this survey shows the large activity around Julia\n", - "\n", - "cmd (Olivier Mattelaer) ✓
\n", - "FreeCAD interface (Christophe Delaere) ❌ [In discussion](https://forum.freecadweb.org/viewtopic.php?f=8&t=42400&sid=77306c4ad6e62533dfbf06909b06c0c8&start=10)
\n", - "Telegram bot (Matias Senge) ✓ https://github.com/Arkoniak/Telegram.jl
\n", - "DataFrames (Vincenzo Eduardo Padulano) ✓
\n", - "Spark (Vicenzo and Andr F.) ✓ https://github.com/dfdx/Spark.jl
\n", - "Dask (Vincenzo E. P., Graham Markal) ✓
\n", - "Batch computing (Vincenzo E. P.) ✓ https://docs.julialang.org/en/v1/manual/parallel-computing/, https://github.com/JuliaParallel, https://juliagpu.org/
\n", - "Apache Parquet (Andre Frankenthal) ✓
\n", - "Jupyter/Binder/SWAN ✓
\n", - "Bokeh (Bruno Alves) ✓ https://github.com/samuelcolvin/Bokeh.jl
\n", - "CUDA (Graham Markall) ✓ https://juliagpu.org/cuda/
\n", - "Hypothesis (Santam Roy Choudhury, property testing) ❌ ([besised an unmaintained QuickCheck projet](https://quickcheckjl.readthedocs.io/))
\n", - "Virtualenv (Henry Schneider, Packaging talk) ✓ [built in the std package manager](https://pkgdocs.julialang.org/v1/environments/)
\n", - "Unit test tools (Henry Schneider, Packaging talk) ✓ [std package](https://docs.julialang.org/en/v1/stdlib/Test/) and more: [Coverage](https://github.com/JuliaCI/Coverage.jl), [FactCheck](https://github.com/JuliaAttic/FactCheck.jl)
\n", - "JIT/Numba (Graham Markal, Henry Schneider) ✓ [Intrisic to the language](https://docs.julialang.org/en/v1/#man-introduction)
\n", - "Machine learning ✓ [Flux](https://fluxml.ai/), [JuliaML](https://juliaml.github.io/),   TensorFlow( )[TensorFlow](https://github.com/malmaud/TensorFlow.jl)
\n", - "  GPyTorch/Gaussian Process ML (Irina Espejo Morales [talk](https://indico.cern.ch/event/1019958/timetable/#14-active-learning-for-level-s)) [GPML](https://github.com/JuliaGaussianProcesses/GPMLj.jl)\n", - "\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "450cbd31-e8e9-438b-b287-6571acd700d8", - "metadata": {}, - "source": [ - "# Data format support\n", - "\n", - "* Non-HEP format\n", - " + HDF5 and Parquet are fully supported (also CSV and Excel, less relevant our data size)\n", - "* ROOT\n", - " + Missing a solid and performant library to read ROOT file and with xroot support.\n", - " + Two packages developped by users.\n", - " - [UpROOT.jl](https://github.com/JuliaPy/PyCall.jl) from Oliver Schulz. A wrapper to [uproot](https://github.com/scikit-hep/uproot3) \n", - " - [UnROOT.jl](https://github.com/tamasgal/UnROOT.jl) from Tamas Gal and Jerry Ling. Port of uproot in Julia. Can read KM3Net data and tree of simple type and/or vector of simple type like CMS NanoAOD. Johannes Schumann mentionned yesterday in his [talk](https://indico.cern.ch/event/1019958/timetable/#9-python-based-tools-and-frame)" - ] - }, - { - "cell_type": "markdown", - "id": "c3db8c57", - "metadata": {}, - "source": [ - "# Advanced tools\n", - "\n", - "## IDE\n", - " * Emacs and vim support\n", - " * Atom and VScode support. Many features. Code can be run and debugged with the IDE, with support for plots.\n", - "\n", - "## Notebooks\n", - " * Jupyter\n", - " * [Pluto](https://github.com/fonsp/Pluto.jlhttps://github.com/fonsp/Pluto.jl). A new generation notebook with automatic update of cells.\n", - " * Debugger: Debugger, Rebugger, Juno debugger (for Atom IDE)\n", - " \n", - " \n", - "## Package installation\n", - " * Python made it easy with conda and pip. It's even easier in Julia\n", - " + A standard library part of the Julia installation\n", - " + Give instructions to the user, when he or she try to import a missing package. Try it:" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "43a3c214-d79b-499f-ae17-54f2dce639b5", - "metadata": {}, - "outputs": [ - { - "ename": "LoadError", - "evalue": "ArgumentError: Package Blink not found in current path:\n- Run `import Pkg; Pkg.add(\"Blink\")` to install the Blink package.\n", - "output_type": "error", - "traceback": [ - "ArgumentError: Package Blink not found in current path:\n- Run `import Pkg; Pkg.add(\"Blink\")` to install the Blink package.\n", - "", - "Stacktrace:", - " [1] require(into::Module, mod::Symbol)", - " @ Base ./loading.jl:871", - " [2] eval", - " @ ./boot.jl:360 [inlined]", - " [3] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)", - " @ Base ./loading.jl:1094" - ] - } - ], - "source": [ - "import Blink" - ] - }, - { - "cell_type": "markdown", - "id": "427c5e02-ad4e-4da5-b889-00e9fa4d3d63", - "metadata": {}, - "source": [ - "💡 Dedicated command mode for package handling in the REPL (interactive terminal application equivalent ipython):\n", - "```julia-repl\n", - "julia> ]\n", - "(@v1.6) pkg> add Grady\n", - "(@v1.6) pkg> [Backspace]\n", - "julia>\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "d62ddb94", - "metadata": {}, - "source": [ - "# Interoperability\n", - "\n", - "
\n", - "
\n", - "\"Plug adaptors\" by dogwelder is licensed under CC BY-NC 2.0
\n", - " \"Credits: Karen V Bryan is licensed under CC BY-ND 2.0\n", - "
\n", - "
\n", - "\n", - "* Python, C, Fortran code: direct call from Julia and Jupyter Julia kernels\n", - "* C++ code: call via a wrapper. Lacking a tool for automatic generation of wrapper like swig. Project for direct-call (ala cppyy) on hold and not working for recent versions of Julia.\n", - "\n", - "The other way around\n", - "\n", - "* Python code can call Julia as well" - ] - }, - { - "cell_type": "markdown", - "id": "27bc2a1b-7fe5-4942-884c-1b1741f7a73f", - "metadata": {}, - "source": [ - "# Calling Python from Julia\n", - "\n", - "As simple as calling Julia code" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "461e51f3-647b-4566-891c-6840c5d577da", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.7071067811865475" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Enable Python call:\n", - "using PyCall\n", - "\n", - "# Inport a python module:\n", - "math = pyimport(\"math\")\n", - "\n", - "# Use it as a Julia module:\n", - "math.sin(math.pi / 4)" - ] - }, - { - "cell_type": "markdown", - "id": "ce6da619", - "metadata": {}, - "source": [ - "# Calling C from Julia" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "03fbd939", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\"/bin/bash\"" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "path = ccall(:getenv, Cstring, (Cstring,), \"SHELL\")\n", - "unsafe_string(path)" - ] - }, - { - "cell_type": "markdown", - "id": "8eaf62ef", - "metadata": {}, - "source": [ - "For C, you will typically write a wrapper in ''Julia'' to handle errors, like:" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "497fec73", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "getenv (generic function with 1 method)" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "function getenv(var::AbstractString)\n", - " val = ccall(:getenv, Cstring, (Cstring,), var)\n", - " if val == C_NULL\n", - " error(\"getenv: undefined variable: \", var)\n", - " end\n", - " return unsafe_string(val)\n", - "end" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "409d2d27", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "pgras\n" - ] - }, - { - "ename": "LoadError", - "evalue": "getenv: undefined variable: SMOKE", - "output_type": "error", - "traceback": [ - "getenv: undefined variable: SMOKE", - "", - "Stacktrace:", - " [1] error(::String, ::String)", - " @ Base ./error.jl:42", - " [2] getenv(var::String)", - " @ Main ./In[7]:4", - " [3] top-level scope", - " @ In[8]:2", - " [4] eval", - " @ ./boot.jl:360 [inlined]", - " [5] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)", - " @ Base ./loading.jl:1094" - ] - } - ], - "source": [ - "println(getenv(\"USER\"))\n", - "println(getenv(\"SMOKE\")) # ⇒ will through an exception unless you have SMOKE in your environment " - ] - }, - { - "cell_type": "markdown", - "id": "8c1bcc56", - "metadata": {}, - "source": [ - "# Calling Julia from python\n", - "\n", - "```python\n", - "$ python3 -m pip install julia # install PyJulia\n", - "... # you may need `--user` after `install`\n", - "\n", - "$ python3\n", - ">>> import julia\n", - ">>> julia.install() # install PyCall.jl etc.\n", - ">>> from julia import Base # short demo\n", - ">>> Base.sind(90)\n", - "1.0\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "d8eec976", - "metadata": {}, - "source": [ - "# Embedding Julia code in a Python notebook\n", - "\n", - "\"Calling\n", - " " - ] - }, - { - "cell_type": "markdown", - "id": "b272d46e-3395-454b-bfa6-21f0aef9487d", - "metadata": {}, - "source": [ - "# Let's use Julia for HEP example\n", - "\n", - "## CMS dimuon analysis \n", - "\n", - " > ⚡ It's an extremely simple analysis, way far from usual LHC analysis\n", - "\n", - " > Let's go,\n", - " \n", - " * [Dimuon spectrum in Julia](dimu/diMuon-bin-jl.ipynb)\n", - " " - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "08cb8517", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "id": "13e38ba4-d873-4919-821f-fb4502890444", - "metadata": {}, - "source": [ - "# Conclusions\n", - "\n", - "* Julia offers the code running performance of C++, with the same programming language the ease of programming of Python, and a large Ecosystem\n", - "* Julia is the ideal language for our usage\n", - "* It's now mature enough to be used for HEP\n", - " + It's the right time to catch the Julia's train\n", - " + Needs developers to provides tools, especially for ROOT I/O and a ROOT binding\n", - " + Needs to be advertised to users. Most of the Physicist does not know it.\n", - "\n", - "\n", - "_Thanks to Jim Pivarski for the tricks to turn out a notebook in a presentations and the nice tutorial he gave on the subject_" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Julia 1.6.1", - "language": "julia", - "name": "julia-1.6" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.6.1" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/.ipynb_checkpoints/Julia-dream-PyHEP2021-checkpoint.ipynb b/.ipynb_checkpoints/Julia-dream-PyHEP2021-checkpoint.ipynb deleted file mode 100644 index 2e8db91..0000000 --- a/.ipynb_checkpoints/Julia-dream-PyHEP2021-checkpoint.ipynb +++ /dev/null @@ -1,723 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "8acf72d6-fc3e-439c-9a3f-4db4c942cbac", - "metadata": { - "jupyter": { - "source_hidden": true - }, - "scrolled": true, - "tags": [] - }, - "outputs": [], - "source": [ - "singleCellDisplay = true\n", - "editor_font_size = 25\n", - "code_output_font_size = 25\n", - "markdown_output_font_size = 30\n", - "markdown_list_font_size = 25\n", - "HTML(\"\"\"\n", - "\n", - "\n", - "

Presentation mode. Clear the output of this cell to exit the mode.

\n", - "

Use j (next) and k (previous) keys to navigate between cells.

\n", - "\n", - "\"\"\")" - ] - }, - { - "cell_type": "markdown", - "id": "2ba91127-2e73-4bb4-bc2c-6ee77392c36e", - "metadata": { - "tags": [] - }, - "source": [ - "# PyHEP 2021 \n", - "----------\n", - "\n", - "
\n", - "\n", - "


\n", - "\n", - "\n", - "
\n", - "
\n", - " \n", - "

Julia, a HEP dream comes true

\n", - " \n", - " Philippe Gras (Université Paris-Saclay, CEA/Irfu)\n", - "
\n", - "\n", - "
July 9th, 2021
\n", - "
" - ] - }, - { - "cell_type": "markdown", - "id": "527db46a-1650-4a50-8351-67222923a458", - "metadata": {}, - "source": [ - "# Introduction" - ] - }, - { - "cell_type": "markdown", - "id": "demographic-nicaragua", - "metadata": {}, - "source": [ - "# High performance computing is important for HEP\n", - "\n", - "
\n", - "
\n", - "
From E Sexton-Kennedy 2018 J. Phys.: Conf. Ser. 1085 022006
\n", - " THS06*s: Tera CPUs $\\times$ s


\n", - "
\n", - "
\n", - "
\"CMS
\n", - "
\n", - "\n", - " * Computing plays a central role in the research done at LHC\n", - " + Theoretical predictions: simulation of the proton-proton collision\n", - " + Simulation of the detector response\n", - " + Reconstruction of the phyics events\n", - " + Analysis of reconstructed events to perform measurements and new physics search." - ] - }, - { - "cell_type": "markdown", - "id": "21a5c5fa-eeeb-459e-8e07-f1306c3d2304", - "metadata": {}, - "source": [ - "# Analysis of the reconstructed events \n", - " * Behind an LHC experiment result publication there are tens of thousands of computing jobs that have run on the worldwide computing grid. Both ATLAS and CMS reached their 1000th papers in June 2020.\n", - " * C++ is widely used and the performance it offers is essential\n", - " * Research code: developped by the main authors of the prepared publication\n", - " * Python is attractive becasue of its easy/fast code writing it offers and the library ecosystem that comes with it and we are many to use it. But it does not meet the performance provided by C++\n", - " + Used in conjunction of C++\n", - " + Huge developmen under way to leverage the performance of Python in terms of code running speed\n", - " * __More attracive would be a Programming language that offers at the same time the C++ and Python pros__" - ] - }, - { - "cell_type": "markdown", - "id": "62d38060-8798-42e1-9a0b-2af3e7b8a1c7", - "metadata": {}, - "source": [ - "# Julia solving the two-language problem\n", - "-----\n", - "\n", - "
\n", - " \n", - " \n", - " \n", - "
Fast/easy coding fastFast running
Python C/C++
\n", - " => Mixing languages and Go back-and-forth between them\n", - "
\n", - "\n", - "
\n", - "\n", - "* J. Bezanson, A. Edelman, S. Karpinski, and V. B. Shah tackled the problem in 2009 aiming to design a programing langue that providess both Fast/easy coding __AND__ Fast running\n", - " + Birth of Julia, release 0.1 in __2013__ \n", - " + This breakthrough was recognized by awards attributed to the authors\n", - " - [James H. Wilkinson Prize in Numerical Analysis and Scientific in 2019](https://www.ll.mit.edu/news/wilkinson-prize-goes-developers-flexible-julia-programming-language) \n", - " - [IEEE Computer Society Sidney Fernbach Award in 2019](https://www.computer.org/press-room/2019-news/2019-ieee-fernbach-award-edelman)\n", - "* In 12 years since its conceptualisation, Julia has been improved from release to release and has aggratated many package developpers\n", - " \n", - "
\n", - "

Nowadays, Julia is a mature language, with a wide ecosystem

\n", - "
\n", - "\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "legendary-sampling", - "metadata": {}, - "source": [ - "# Loops\n", - "\n", - "
\n", - "\"A\n", - "
" - ] - }, - { - "cell_type": "markdown", - "id": "outside-apartment", - "metadata": {}, - "source": [ - "# HEP data analysis is a looping game\n", - "\n", - "HEP enjoys loop: we loop on physics events to loop on particles/physics objects. We often perform particle matching and clustering and for this we loop on events to loop on objects to loop on objects.\n", - "\n", - "```julia\n", - "for event in billions_of_lhc_events\n", - " for tens_or_hundreds_of_objects in event\n", - " for tens_or_hundres_of_objects_to_match in event\n", - " ...\n", - " end\n", - " end\n", - "end\n", - "```\n", - "\n", - " * The outter loops hides several loops: datasets > files\n", - " * This is repeated several times for each analysis.\n", - "

⇒ Lines of code executed billions of times even for a Kleenex code, written specially for a publication.

" - ] - }, - { - "cell_type": "markdown", - "id": "c7f88121", - "metadata": {}, - "source": [ - "# Python dislikes loop\n", - "\n", - " * A master rule for high-performance code in Python is to avoid writing loop in Python \n", - " + ⇒ push the loop to underlying compiled libraries. Approach of the `numpy` vectorisation.\n", - " \n", - "Let's run a simple loop\n", - " \n", - "[Simple loop in Python](Python-code.ipynb#simple-loop)" - ] - }, - { - "cell_type": "markdown", - "id": "7e87ebd7-31da-4d23-a15f-ea90dc553b6f", - "metadata": {}, - "source": [ - "| Python |\n", - "|--------|\n", - "| 90 ms |" - ] - }, - { - "cell_type": "markdown", - "id": "de449e8a-809f-49ed-92cb-4ef01554d1bf", - "metadata": {}, - "source": [ - "In C++. Code in `simple-loop.cc`:\n", - "\n", - "```cpp\n", - "#include \n", - "#include x\n", - "\n", - "int main(){\n", - " struct timeval t0, t1;\n", - " gettimeofday(&t0, 0);\n", - " double a = 0.;\n", - " for(unsigned i = 0; i <= 1000000; ++i) a += 1.0/i;\n", - " std::cout << \"Computation Result: \" << a << \"\\n\";\n", - " gettimeofday(&t1, 0);\n", - " std::cerr << \"Duration: \" << (t1.tv_sec-t0.tv_sec)\n", - " + 1.e-6*(t1.tv_usec-t0.tv_usec)\n", - "\t << \" seconds\\n\";\n", - " return 0;\n", - "}\n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": 97, - "id": "b914e148-86e3-4de0-9155-1849c66603f4", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Computation Result: 14.3927\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Duration: 0.003699 seconds\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Computation Result: 14.3927\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Duration: 0.001569 seconds\n" - ] - } - ], - "source": [ - "run(`g++ -Wall -o simple-loop simple-loop.cc`)\n", - "run(`./simple-loop`)\n", - ";\n", - "run(`g++ -O3 -Wall -o simple-loop simple-loop.cc`)\n", - "run(`./simple-loop`)\n", - ";" - ] - }, - { - "cell_type": "markdown", - "id": "261eaf0d-85c3-4cbe-ad23-be8031148137", - "metadata": {}, - "source": [ - "| Python | C++ |\n", - "|--------|-------|\n", - "| 90 ms | 1.5 ms |" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "1492b430-f3ce-4eef-a32a-e33761accb7b", - "metadata": {}, - "outputs": [], - "source": [ - "# Loop" - ] - }, - { - "cell_type": "code", - "execution_count": 96, - "id": "ebf7c4e9-0851-486e-8a7c-944b212b67b0", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " 0.001673 seconds\n" - ] - }, - { - "data": { - "text/plain": [ - "14.392726722864989" - ] - }, - "execution_count": 96, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "#\n", - "# Julia\n", - "#\n", - "function f()\n", - " a = 0.0\n", - " for i in 1:1_000_000 # ✨ Note the underscores that improves legibility\n", - " a = a + 1.0/i\n", - " end\n", - " return a\n", - "end\n", - "@time f()" - ] - }, - { - "cell_type": "markdown", - "id": "c91f2f0f-e963-43fd-bf54-85e021e0dcf7", - "metadata": {}, - "source": [ - "| Python | C++ | Julia |\n", - "|--------|--------|--------|\n", - "| 90ms | 1.5 ms | 1.6 ms |" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "608925e8-c4dd-49e4-a237-a5f77b4cae87", - "metadata": {}, - "outputs": [ - { - "ename": "LoadError", - "evalue": "syntax: cannot juxtapose string literal", - "output_type": "error", - "traceback": [ - "syntax: cannot juxtapose string literal", - "", - "Stacktrace:", - " [1] top-level scope", - " @ In[12]:1", - " [2] eval", - " @ ./boot.jl:360 [inlined]", - " [3] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)", - " @ Base ./loading.jl:1094" - ] - } - ], - "source": [ - "\"\"\"int main(){\n", - " struct timeval t0, t1;\n", - " gettimeofday(&t0, 0);\n", - " double a = 0.;\n", - " for(unsigned i = 0; i <= 1000000; ++i) a += 1.0/i;\n", - " std::cout << \"Computation Result: \" << a << \"\\n\";\n", - " gettimeofday(&t1, 0);\n", - " std::cerr << \"Duration: \" << (t1.tv_sec-t0.tv_sec)\n", - " + 1.e-6*(t1.tv_usec-t0.tv_usec)\n", - "\t << \" seconds\\n\";\n", - " return 0;\n", - "}\"\"\"" - ] - }, - { - "cell_type": "markdown", - "id": "behavioral-mining", - "metadata": {}, - "source": [ - "## Googling programming\n", - "\n", - "Internet search engine and stack overflow play is an essential ingredient in nowadays programming workflow.\n", - "\n", - "Julia is already widespread enough, to find all the information on the Internet.
\n", - "\n", - "Go to [DuckDuckGo](https://duckduckgo) or your prefered search engine and make a try.\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "ec1a273d-5abc-4134-84bb-24aa2d4308f3", - "metadata": {}, - "source": [ - " ⇒ ~16 ms In Julia\n", - " \n", - " Switch to Python notebook to see in Python" - ] - }, - { - "cell_type": "markdown", - "id": "2a5f5ff5-735b-419d-9e09-aa99d9803f45", - "metadata": {}, - "source": [ - "# As easy and sweat as Python\n", - "\n", - "... help to add package\n" - ] - }, - { - "cell_type": "markdown", - "id": "fd0ced5b-6eee-426a-9b4c-035dea81a0cc", - "metadata": {}, - "source": [ - "# Ecosystem\n", - "\n", - "* Large set of libraries and active developement\n", - "* Firstly used by scientific community ⇒ oriented to our needs\n", - "\n", - "* I did the following game during the wokshop: I've looked for a Julia equivalent each time a speaker mention a Python library (apart from HEP specific ones).\n", - " + Caveat: I've not checked that it covers all the features of the Python package\n", - " + The results of this survey shows the large activity around Julia\n", - "\n", - "cmd (Olivier M.) ✓
\n", - "FreeCAD interface (Christophe D.) ❌ [In discussion](https://forum.freecadweb.org/viewtopic.php?f=8&t=42400&sid=77306c4ad6e62533dfbf06909b06c0c8&start=10)
\n", - "Telegram bot (Matias Senge) ✓ https://github.com/Arkoniak/Telegram.jl
\n", - "DataFrames (Vincenzo Eduardo Padulano) ✓
\n", - "Spark (Vicenzo and Andr F.) ✓ https://github.com/dfdx/Spark.jl
\n", - "Dask (Vincenzo E. P., Graham Markal) ✓
\n", - "Batch computing (Vincenzo E. P.) ✓ https://docs.julialang.org/en/v1/manual/parallel-computing/, https://github.com/JuliaParallel, https://juliagpu.org/
\n", - "Apache Parquet (Andre Frankenthal) ✓
\n", - "Jupyter/Binder/SWAN ✓
\n", - "Bokeh (Bruno Alves) ✓ https://github.com/samuelcolvin/Bokeh.jl
\n", - "CUDA (Graham Markall) ✓ https://juliagpu.org/cuda/
\n", - "Hypothesis (, property testing) ❌ ([besised an unmaintained QuickCheck projet](https://quickcheckjl.readthedocs.io/))
\n", - "Virtualenv (Henry Schneider, Packaging talk) ✓ [built in the std package manager](https://pkgdocs.julialang.org/v1/environments/)
\n", - "Unit test tools (Henry Schneider, Packaging talk) ✓ [std package](https://docs.julialang.org/en/v1/stdlib/Test/) and more: [Coverage](https://github.com/JuliaCI/Coverage.jl), [FactCheck](https://github.com/JuliaAttic/FactCheck.jl)
\n", - "JIT/Numba (Graham Markal, Henry Schneider) ✓ [Intrisic to the language](https://docs.julialang.org/en/v1/#man-introduction)
\n", - "Machine learning ✓ [Flux](https://fluxml.ai/), [JuliaML](https://juliaml.github.io/),   TensorFlow( )[TensorFlow](https://github.com/malmaud/TensorFlow.jl)
\n", - "  GPyTorch/Gaussian Process ML (Irina Espejo Morales [talk](https://indico.cern.ch/event/1019958/timetable/#14-active-learning-for-level-s)) [GPML](https://github.com/JuliaGaussianProcesses/GPMLj.jl)\n", - "\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "450cbd31-e8e9-438b-b287-6571acd700d8", - "metadata": {}, - "source": [ - "# Data format support\n", - "\n", - "* Non-HEP format\n", - "+ HFD5 and Parquet are fully supported (also CSV and Excel, less relevant our data size)\n", - "\n", - "* ROOT\n", - " + Missing a solid and performant library to read ROOT file\n", - " + Two packages developped by users.\n", - " - [UpROOT.jl](https://github.com/JuliaPy/PyCall.jl) from Oliver Schulz. A wrapper to [uproot](https://github.com/scikit-hep/uproot3) \n", - " - [UnROOT.jl](https://github.com/tamasgal/UnROOT.jl) from and Jerry Ling. Port of uproot in Julia. Can read KM3Net data and tree of simple type and/or vector of simple type like CMS NanoAOD. Johannes Schumann mentionned yesterday in his [talk](https://indico.cern.ch/event/1019958/timetable/#9-python-based-tools-and-frame)" - ] - }, - { - "cell_type": "markdown", - "id": "c3db8c57", - "metadata": {}, - "source": [ - "# Advanced tools\n", - "\n", - "## IDE\n", - " * Emacs and vim support\n", - " * Atom and VScode support. Many features. Code can be run and debugged with the IDE, with support for plots.\n", - "\n", - "## Notebooks\n", - " * Jupyter\n", - " * [Pluto](https://github.com/fonsp/Pluto.jlhttps://github.com/fonsp/Pluto.jl). A new generation notebook with automatic update of cells.\n", - " * Debugger: Debugger, Rebugger, Juno debugger (for Atom IDE)\n", - " \n", - " \n", - "## Package installation\n", - " * Python made it easy with conda and pip. It's even easier in Julia\n", - " + A standard library part of the Julia installation\n", - " + Give instructions to the user, when he or she try to import a missing package. Try it:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "43a3c214-d79b-499f-ae17-54f2dce639b5", - "metadata": {}, - "outputs": [], - "source": [ - "import Gradfy" - ] - }, - { - "cell_type": "markdown", - "id": "427c5e02-ad4e-4da5-b889-00e9fa4d3d63", - "metadata": {}, - "source": [ - "💡 Dedicated command mode for package handling in the REPL (interactive terminal application equivalent ipython):\n", - "```julia-repl\n", - "julia> ]\n", - "(@v1.6) pkg> add Grady\n", - "(@v1.6) pkg> [Backspace]\n", - "julia>\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "d62ddb94", - "metadata": {}, - "source": [ - "# Interoperability\n", - "\n", - "
\n", - "
\n", - "\"scared plugs\" by dogwelder is licensed under CC BY-NC 2.0
\n", - " \"UK to US plug adaptor and UK to European plug adaptor\" by Karen V Bryan is licensed under CC BY-ND 2.0\n", - "
\n", - "
\n", - "\n", - "* Python, C, Fortran code: direct call from Julia and Jupyter Julia kernels\n", - "* C++ code: call via a wrapper (as for call of C++ from Python). Project for direct-call on hold.\n", - "\n", - "The other way around\n", - "\n", - "* Python code " - ] - }, - { - "cell_type": "markdown", - "id": "8c1bcc56", - "metadata": {}, - "source": [ - "# Calling Julia from python\n", - "\n", - "```python\n", - "$ python3 -m pip install julia # install PyJulia\n", - "... # you may need `--user` after `install`\n", - "\n", - "$ python3\n", - ">>> import julia\n", - ">>> julia.install() # install PyCall.jl etc.\n", - ">>> from julia import Base # short demo\n", - ">>> Base.sind(90)\n", - "1.0\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "d8eec976", - "metadata": {}, - "source": [ - "# Embedding Julia code in a Python notebook\n", - "\n", - "\"Calling\n", - " " - ] - }, - { - "cell_type": "markdown", - "id": "27bc2a1b-7fe5-4942-884c-1b1741f7a73f", - "metadata": {}, - "source": [ - "# Calling Python from Julia\n", - "\n", - "As simple as calling Julia code" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "461e51f3-647b-4566-891c-6840c5d577da", - "metadata": {}, - "outputs": [], - "source": [ - "# Enable Python call:\n", - "using PyCall\n", - "\n", - "# Inport a python module:\n", - "math = pyimport(\"math\")\n", - "\n", - "# Use it as a Julia module:\n", - "math.sin(math.pi / 4)" - ] - }, - { - "cell_type": "markdown", - "id": "ce6da619", - "metadata": {}, - "source": [ - "# Calling C from Julia" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "03fbd939", - "metadata": {}, - "outputs": [], - "source": [ - "path = ccall(:getenv, Cstring, (Cstring,), \"SHELL\")\n", - "unsafe_string(path)" - ] - }, - { - "cell_type": "markdown", - "id": "8eaf62ef", - "metadata": {}, - "source": [ - "For C, you will typically write a wrapper in ''Julia'' to handle errors, like:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "497fec73", - "metadata": {}, - "outputs": [], - "source": [ - "function getenv(var::AbstractString)\n", - " val = ccall(:getenv, Cstring, (Cstring,), var)\n", - " if val == C_NULL\n", - " error(\"getenv: undefined variable: \", var)\n", - " end\n", - " return unsafe_string(val)\n", - "end" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "409d2d27", - "metadata": {}, - "outputs": [], - "source": [ - "println(getenv(\"USER\"))\n", - "println(getenv(\"SMOKE\")) # ⇒ will through an exception unless you have SMOKE in your environment " - ] - }, - { - "cell_type": "markdown", - "id": "b272d46e-3395-454b-bfa6-21f0aef9487d", - "metadata": {}, - "source": [ - "# Let's use Julia for HEP example\n", - "\n", - "## CMS dimuon analysis \n", - "\n", - " > ⚡ It's an extremely simple analysis, way far from usual LHC analysis\n", - "\n", - " > Let's go,\n", - " \n", - " * [Dimuon spectrum in Julia](dimu/diMuon-bin-jl.ipynb)\n", - " * [Dimuon spectrum in Python](dimu/diMuon-bin-py.ipynb)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "08cb8517", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "id": "13e38ba4-d873-4919-821f-fb4502890444", - "metadata": {}, - "source": [ - "# Conclusions\n", - "....\n", - "\n", - "_Thanks to Jim Pivarski for the tricks to turn out a notebook in a presentations and the nice tutorial he gave on the subject_" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Julia 1.6.1", - "language": "julia", - "name": "julia-1.6" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.6.1" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/.ipynb_checkpoints/Julia_from_IPython-checkpoint.ipynb b/.ipynb_checkpoints/Julia_from_IPython-checkpoint.ipynb deleted file mode 100644 index 4a5b03c..0000000 --- a/.ipynb_checkpoints/Julia_from_IPython-checkpoint.ipynb +++ /dev/null @@ -1,117 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "8b4b2ab7", - "metadata": {}, - "source": [ - "Load the Julia magic extension" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "4d4cbc68", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The julia.magic extension is already loaded. To reload it, use:\n", - " %reload_ext julia.magic\n" - ] - } - ], - "source": [ - "%load_ext julia.magic" - ] - }, - { - "cell_type": "markdown", - "id": "f578aa1c", - "metadata": {}, - "source": [ - "Excute some code written in ''Julia''" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "6fdc193d", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "x = 10 ⇒ x² = 100\n" - ] - } - ], - "source": [ - "%%julia\n", - "x = 10\n", - "y = x^2\n", - "println(\"x = $(x) ⇒ x² = $(y)\")" - ] - }, - { - "cell_type": "markdown", - "id": "66b2da7a", - "metadata": {}, - "source": [ - "Variables defined in Julia can be accessed from Python" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "ae1c4b46", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "x = 10 ⇒ x² = 100\n" - ] - } - ], - "source": [ - "x = %julia x\n", - "y = %julia y\n", - "print(f'x = {x} ⇒ x² = {y}')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "241206ff-31f4-4ca2-a93a-783831585db7", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.2" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/.ipynb_checkpoints/Python-code-checkpoint.ipynb b/.ipynb_checkpoints/Python-code-checkpoint.ipynb deleted file mode 100644 index ceaf032..0000000 --- a/.ipynb_checkpoints/Python-code-checkpoint.ipynb +++ /dev/null @@ -1,72 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "c3908552-6dee-4767-830a-274c61bf7ee1", - "metadata": {}, - "source": [ - "\n", - " \n", - "# Simple loop example" - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "id": "17ea0d9f-5134-418d-a057-65bfc5bba7a4", - "metadata": {}, - "outputs": [], - "source": [ - "def f():\n", - " a = 0.\n", - " for i in range(1, 1000*1000 +1):\n", - " a = a + 1.0/i\n", - " print(i)\n", - " return a" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "id": "83dc3089-0828-44a1-a257-27e14f1c01e6", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1000000\n", - "14.392726722864989\n", - "CPU times: user 91.5 ms, sys: 511 µs, total: 92.1 ms\n", - "Wall time: 90.3 ms\n" - ] - } - ], - "source": [ - "%%time\n", - "print(f())\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.2" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/01-Julia-dream-PyHEP2021.ipynb b/01-Julia-dream-PyHEP2021.ipynb index 9e8b80d..8ae234d 100644 --- a/01-Julia-dream-PyHEP2021.ipynb +++ b/01-Julia-dream-PyHEP2021.ipynb @@ -10,7 +10,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 1, "id": "a26ab57b-021a-438d-896a-8662e22a44ab", "metadata": { "jupyter": { @@ -30,17 +30,18 @@ " /* resize the markdown output */\n", " div.jp-MarkdownOutput { font-size: 25px; }\n", " div.jp-MarkdownOutput li { font-size: 25px; }\n", - "\n", - "# /* Shadow around markdown output cells */\n", - "# div.jp-MarkdownOutput { box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);}\n", - "# div.jp-MarkdownOutput {\n", - "# padding: 10px 10px 50px 50px;\n", - "# }\n", + " .jp.RenderedHTMLCommon table { font-size: 25px important;}\n", + " div.text_cell_render { font-size: 25px; \n", + " line-height: 35px;}\n", + " div.text_cell_render li { font-size: 25px; }\n", + " div.text_cell_render table { font-size: 25px;}\n", "\n", " /* Frame around markdown output cells */\n", - " div.jp-MarkdownOutput { border-style: solid; border-color: #a6a6a6;}\n", - " div.jp-MarkdownOutput {\n", - " padding: 10px 10px 50px 50px;\n", + " div.jp-MarkdownOutput { border-style: solid; border-color: #a6a6a6;\n", + " padding: 10px 10px 50px 50px;\n", + " }\n", + " div.text_cell_render { border-style: solid; border-color: #a6a6a6;\n", + " padding: 10px 10px 50px 50px;\n", " }\n", "\n", "\n", @@ -50,10 +51,10 @@ "\n" ], "text/plain": [ - "HTML{String}(\"\\n\\n

Presentation mode. Clear the output of this cell to exit the mode.

\\n

Use j (next) and k (previous) keys to navigate between cells.

\\n\\n\")" + "HTML{String}(\"\\n\\n

Presentation mode. Clear the output of this cell to exit the mode.

\\n

Use j (next) and k (previous) keys to navigate between cells.

\\n\\n\")" ] }, - "execution_count": 12, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -78,17 +79,18 @@ " /* resize the markdown output */\n", " div.jp-MarkdownOutput { font-size: $(markdown_output_font_size)px; }\n", " div.jp-MarkdownOutput li { font-size: $(markdown_list_font_size)px; }\n", - "\n", - "# /* Shadow around markdown output cells */\n", - "# div.jp-MarkdownOutput { box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);}\n", - "# div.jp-MarkdownOutput {\n", - "# padding: 10px 10px 50px 50px;\n", - "# }\n", + " .jp.RenderedHTMLCommon table { font-size: $(markdown_output_font_size)px important;}\n", + " div.text_cell_render { font-size: $(markdown_output_font_size)px; \n", + " line-height: 35px;}\n", + " div.text_cell_render li { font-size: $(markdown_list_font_size)px; }\n", + " div.text_cell_render table { font-size: $(markdown_output_font_size)px;}\n", "\n", " /* Frame around markdown output cells */\n", - " div.jp-MarkdownOutput { border-style: solid; border-color: #a6a6a6;}\n", - " div.jp-MarkdownOutput {\n", - " padding: 10px 10px 50px 50px;\n", + " div.jp-MarkdownOutput { border-style: solid; border-color: #a6a6a6;\n", + " padding: 10px 10px 50px 50px;\n", + " }\n", + " div.text_cell_render { border-style: solid; border-color: #a6a6a6;\n", + " padding: 10px 10px 50px 50px;\n", " }\n", "\n", "\n", @@ -99,14 +101,6 @@ "\"\"\")" ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "57c90a10-c8b4-47f8-8bb8-9bbf14058c66", - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "markdown", "id": "2ba91127-2e73-4bb4-bc2c-6ee77392c36e", @@ -119,19 +113,19 @@ "\n", "----------\n", "\n", - "


\n", + "


\n", "\n", "\n", - "
\n", + "
\n", "
\n", " \n", - "

Julia, a HEP dream comes true

\n", + "

Julia, a HEP dream comes true

\n", " \n", - " Philippe Gras (Université Paris-Saclay, CEA/Irfu)\n", + "Philippe Gras (Université Paris-Saclay, CEA/Irfu)\n", "
\n", "\n", "
July 9th, 2021
\n", - "
" + "
" ] }, { @@ -141,12 +135,12 @@ "source": [ "# Introduction\n", "\n", - "## Julia is a new __programming language__\n", - "## I've discovered it while making a survey of programming language for the projet of CUPID neutrinoless double-beta decay experiment, in last April\n", - " * It's a new programming language for me\n", - " * I've learned it for this talk and it was as fast as learning Python (actually faster because of their similarities)\n", + "* Julia is a new __programming language__\n", + "* I've discovered it while making a survey of programming language for the projet of CUPID neutrinoless double-beta decay experiment, in last April\n", + " + It's a new programming language for me\n", + " + I've learned it for this talk and it was as fast as learning Python (actually faster because of their similarities)\n", " \n", - "## I will present Julia to you in the perspective of using it for HEP applications" + "* I will present Julia to you in the perspective of using it for HEP applications" ] }, { @@ -160,8 +154,8 @@ "\n", "
\n", "
\n", - "
From E Sexton-Kennedy 2018 J. Phys.: Conf. Ser. 1085 022006
\n", - " THS06*s: Tera CPUs $\\times$ s


\n", + "
From E Sexton-Kennedy 2018 J. Phys.: Conf. Ser. 1085 022006
\n", + " THS06*s: Tera CPUs $\\times$ s


\n", "
\n", "
\n", "
\"CMS
\n", @@ -198,14 +192,14 @@ "-----\n", "\n", "
\n", - " \n", - " \n", - " \n", - "
Fast/easy coding fastFast running
Python C/C++
\n", - " => Mixing languages and Go back-and-forth between them\n", + " \n", + " \n", + " \n", + "
Fast/easy coding fastFast running
Python C/C++
\n", + " ⇒ Mixing languages and Go back-and-forth between them\n", "
\n", "\n", - "
\n", + "
\n", "\n", "* J. Bezanson, A. Edelman, S. Karpinski, and V. B. Shah tackled the problem in 2009 aiming to design a programing langue that providess both Fast/easy coding __AND__ Fast running\n", " + Birth of Julia, release 0.1 in __2013__ \n", @@ -316,7 +310,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 2, "id": "b914e148-86e3-4de0-9155-1849c66603f4", "metadata": {}, "outputs": [ @@ -331,7 +325,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "Duration: 0.003672 seconds\n" + "Duration: 0.003079 seconds\n" ] }, { @@ -345,7 +339,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "Duration: 0.001677 seconds\n" + "Duration: 0.001654 seconds\n" ] } ], @@ -378,7 +372,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 3, "id": "ebf7c4e9-0851-486e-8a7c-944b212b67b0", "metadata": { "tags": [] @@ -388,7 +382,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " 0.001672 seconds (1 allocation: 16 bytes)\n" + " 0.001584 seconds (1 allocation: 16 bytes)\n" ] }, { @@ -397,7 +391,7 @@ "14.392726722864989" ] }, - "execution_count": 14, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -456,7 +450,7 @@ "\n", "Internet search engine and stack overflow play is an essential ingredient in nowadays programming workflow.\n", "\n", - "Julia is already widespread enough, to find all the information on the Internet.
\n", + "Julia is already widespread enough, to find all the information on the Internet.
\n", "\n", "Go to [DuckDuckGo](https://www.duckduckgo.com) or your prefered search engine and make a try.\n", "\n" @@ -475,30 +469,24 @@ " + Caveat: I've not checked that it covers all the features of the Python package\n", " + The results of this survey shows the large activity around Julia\n", "\n", - "cmd (Olivier Mattelaer) ✓
\n", - "FreeCAD interface (Christophe Delaere) ❌ [In discussion](https://forum.freecadweb.org/viewtopic.php?f=8&t=42400&sid=77306c4ad6e62533dfbf06909b06c0c8&start=10)
\n", - "Telegram bot (Matias Senge) ✓ https://github.com/Arkoniak/Telegram.jl
\n", - "DataFrames (Vincenzo Eduardo Padulano) ✓
\n", - "Spark (Vicenzo and Andr F.) ✓ https://github.com/dfdx/Spark.jl
\n", - "Dask (Vincenzo E. P., Graham Markal) ✓
\n", - "Batch computing (Vincenzo E. P.) ✓ https://docs.julialang.org/en/v1/manual/parallel-computing/, https://github.com/JuliaParallel, https://juliagpu.org/
\n", - "Apache Parquet (Andre Frankenthal) ✓
\n", - "Jupyter/Binder/SWAN ✓
\n", - "Bokeh (Bruno Alves) ✓ https://github.com/samuelcolvin/Bokeh.jl
\n", - "CUDA (Graham Markall) ✓ https://juliagpu.org/cuda/
\n", - "Hypothesis (Santam Roy Choudhury, property testing) ❌ ([besised an unmaintained QuickCheck projet](https://quickcheckjl.readthedocs.io/))
\n", - "Virtualenv (Henry Schneider, Packaging talk) ✓ [built in the std package manager](https://pkgdocs.julialang.org/v1/environments/)
\n", - "Unit test tools (Henry Schneider, Packaging talk) ✓ [std package](https://docs.julialang.org/en/v1/stdlib/Test/) and more: [Coverage](https://github.com/JuliaCI/Coverage.jl), [FactCheck](https://github.com/JuliaAttic/FactCheck.jl)
\n", - "JIT/Numba (Graham Markal, Henry Schneider) ✓ [Intrisic to the language](https://docs.julialang.org/en/v1/#man-introduction)
\n", - "Machine learning ✓ [Flux](https://fluxml.ai/), [JuliaML](https://juliaml.github.io/),   TensorFlow( )[TensorFlow](https://github.com/malmaud/TensorFlow.jl)
\n", - "  GPyTorch/Gaussian Process ML (Irina Espejo Morales [talk](https://indico.cern.ch/event/1019958/timetable/#14-active-learning-for-level-s)) [GPML](https://github.com/JuliaGaussianProcesses/GPMLj.jl)\n", - "\n", - "\n" + "cmd (Olivier Mattelaer) ✓
\n", + "FreeCAD interface (Christophe Delaere) ❌ [In discussion](https://forum.freecadweb.org/viewtopic.php?f=8&t=42400&sid=77306c4ad6e62533dfbf06909b06c0c8&start=10)
\n", + "Telegram bot (Matias Senge) ✓ https://github.com/Arkoniak/Telegram.jl
\n", + "DataFrames (Vincenzo Eduardo Padulano) ✓
\n", + "Spark (Vicenzo and Andr F.) ✓ https://github.com/dfdx/Spark.jl
\n", + "Dask (Vincenzo E. P., Graham Markal) ✓
\n", + "Batch computing (Vincenzo E. P.) ✓ https://docs.julialang.org/en/v1/manual/parallel-computing/, https://github.com/JuliaParallel, https://juliagpu.org/
\n", + "Apache Parquet (Andre Frankenthal) ✓
\n", + "Jupyter/Binder/SWAN ✓
\n", + "Bokeh (Bruno Alves) ✓ https://github.com/samuelcolvin/Bokeh.jl
\n", + "CUDA (Graham Markall) ✓ https://juliagpu.org/cuda/
\n", + "Hypothesis (Santam Roy Choudhury, property testing) ❌ ([besised an unmaintained QuickCheck projet](https://quickcheckjl.readthedocs.io/))
\n", + "Virtualenv (Henry Schneider, Packaging talk) ✓ [built in the std package manager](https://pkgdocs.julialang.org/v1/environments/)
\n", + "Unit test tools (Henry Schneider, Packaging talk) ✓ [std package](https://docs.julialang.org/en/v1/stdlib/Test/) and more: [Coverage](https://github.com/JuliaCI/Coverage.jl), [FactCheck](https://github.com/JuliaAttic/FactCheck.jl)
\n", + "JIT/Numba (Graham Markal, Henry Schneider) ✓ [Intrisic to the language](https://docs.julialang.org/en/v1/#man-introduction)
\n", + "Machine learning ✓ [Flux](https://fluxml.ai/), [JuliaML](https://juliaml.github.io/),
\n", + "  TensorFlow(Matthew Feickert)[TensorFlow](https://github.com/malmaud/TensorFlow.jl)
\n", + "  GPyTorch/Gaussian Process ML (Irina Espejo Morales [talk](https://indico.cern.ch/event/1019958/timetable/#14-active-learning-for-level-s)) [GPML](https://github.com/JuliaGaussianProcesses/GPMLj.jl)" ] }, { @@ -575,7 +563,7 @@ "💡 Dedicated command mode for package handling in the REPL (interactive terminal application equivalent ipython):\n", "```julia-repl\n", "julia> ]\n", - "(@v1.6) pkg> add Grady\n", + "(@v1.6) pkg> add Blink\n", "(@v1.6) pkg> [Backspace]\n", "julia>\n", "```" @@ -591,7 +579,7 @@ "
\n", "
\n", "\"Plug adaptors\" by dogwelder is licensed under CC BY-NC 2.0
\n", - " \"Credits: Karen V Bryan is licensed under CC BY-ND 2.0\n", + " Credits: Karen V Bryan is licensed under CC BY-ND 2.0\n", "
\n", "
\n", "\n", @@ -600,7 +588,8 @@ "\n", "The other way around\n", "\n", - "* Python code can call Julia as well" + "* Python code can call Julia as well\n", + "* C/C++ code can call Julia code" ] }, { @@ -781,7 +770,7 @@ "id": "b272d46e-3395-454b-bfa6-21f0aef9487d", "metadata": {}, "source": [ - "# Let's use Julia for HEP example\n", + "# Let's use Julia for a HEP example\n", "\n", "## CMS dimuon analysis \n", "\n", @@ -793,14 +782,6 @@ " " ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "08cb8517", - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "markdown", "id": "13e38ba4-d873-4919-821f-fb4502890444", @@ -816,7 +797,7 @@ " + Needs to be advertised to users. Most of the Physicist does not know it.\n", "\n", "\n", - "_Thanks to Jim Pivarski for the tricks to turn out a notebook in a presentations and the nice tutorial he gave on the subject_" + "_Thanks to Jim Pivarski for the tricks to turn a notebook into a presentations and the nice tutorial he gave on the subject_" ] } ], diff --git a/Julia_from_IPython.ipynb b/Julia_from_IPython.ipynb index 1d07133..b27a2c1 100644 --- a/Julia_from_IPython.ipynb +++ b/Julia_from_IPython.ipynb @@ -24,6 +24,13 @@ } ], "source": [ + "#Two first lines disable the compilation cache\n", + "#and are currently needed when the used python \n", + "#executable is statically linked.\n", + "#See https://pyjulia.readthedocs.io/en/latest/troubleshooting.html\n", + "from julia import Julia\n", + "jl = Julia(compiled_modules=False)\n", + "\n", "%load_ext julia.magic" ] }, @@ -32,7 +39,7 @@ "id": "f578aa1c", "metadata": {}, "source": [ - "Excute some code written in ''Julia''" + "Execute some code written in ''Julia''" ] }, { diff --git a/Manifest.toml b/Manifest.toml new file mode 120000 index 0000000..cd772f6 --- /dev/null +++ b/Manifest.toml @@ -0,0 +1 @@ +binder/Manifest.toml \ No newline at end of file diff --git a/Python-code.ipynb b/Python-code.ipynb index 594f42d..635c1e7 100644 --- a/Python-code.ipynb +++ b/Python-code.ipynb @@ -39,8 +39,8 @@ "output_type": "stream", "text": [ "14.392726722864989\n", - "CPU times: user 103 ms, sys: 986 µs, total: 104 ms\n", - "Wall time: 102 ms\n" + "CPU times: user 82 ms, sys: 2.67 ms, total: 84.7 ms\n", + "Wall time: 84.1 ms\n" ] } ], diff --git a/README.md b/README.md new file mode 100644 index 0000000..bfe02d5 --- /dev/null +++ b/README.md @@ -0,0 +1,491 @@ +[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/grasph/PyHEP2021-Talk/HEAD?urlpath=lab/tree/01-Julia-dream-PyHEP2021.ipynb) + +# Talk presented at [PyHEP2021](https://indico.cern.ch/event/1019958/timetable/#11-julia-a-hep-dream-comes-tru) + +__Abstract__: Execution speed is critical for code developed for high energy physics (HEP) research. HEP experiments are typically highly demanding in terms on computing power. The LHC experiments uses a computing grid, the Worldwide LHC computing grid, with one million computer cores to process their data. In this talk we will investigate the potential of the Julia programming language for HEP data analysis. Julia is a high-level and high-performance programming language that provides at the same time, ease of code development similar to Python and running performance similar to C, C++, and Fortran. It offers the same level of abstraction as Python, an interpreter-like experience based on a similar technique as the interpreter of ROOT, and a Jupyter notebook kernel. Results of performance measurements specific to HEP applications with a comparison with Python and C++ will also be presented. + + +The presentation was written as a Jupyter(lab) notebook. For an interactive presentation, click on the binder badge above or [here](https://mybinder.org/v2/gh/grasph/PyHEP2021-Talk/HEAD?urlpath=lab/tree/01-Julia-dream-PyHEP2021.ipynb). The static version follows. The presentation notebook (01-Julia-dream-PyHEP2021.ipynb) and the accompagning ones can be downloaded from this repository. + +

PyHEP 2021                                                

+ + +


+ + +
+
+ +

Julia, a HEP dream comes true

+ +Philippe Gras (Université Paris-Saclay, CEA/Irfu) +
+





+
July 9th, 2021
+
+ +--- + +# Introduction + +* Julia is a new __programming language__ +* I've discovered it while making a survey of programming language for the projet of CUPID neutrinoless double-beta decay experiment, in last April + + It's a new programming language for me + + I've learned it for this talk and it was as fast as learning Python (actually faster because of their similarities) + +* I will present Julia to you in the perspective of using it for HEP applications + +--- + +# High performance computing is important for HEP + +
+ +
CMS computing needs
+
+ + * Computing plays a central role in the research done at LHC + + Theoretical predictions: simulation of the proton-proton collisions + + Simulation of the detector response + + Reconstruction of the phyics events + + Analysis of reconstructed events to perform measurements and new physics search. + +--- + +# Analysis of the reconstructed events + * Behind an LHC experiment result publication there are tens of thousands of computing jobs that have run on the worldwide computing grid. Both ATLAS and CMS reached their 1000th papers in June 2020. + * C++ is widely used and the performance it offers is essential + * Research code: developped by the main authors of the prepared publication + * Python is attractive becasue of its easy/fast code writing it offers and the library ecosystem that comes with it and we are many to use it. But it does not meet the performance provided by C++ + + Used in conjunction of C++ + + Huge development under way to leverage the performance of Python in terms of code running speed + * __More attracive would be a Programming language that offers at the same time the C++ and Python pros__ + +--- + +# Julia solving the two-language problem + +
+ + + +
Fast/easy coding fastFast running
Python C/C++
+ ⇒ Mixing languages and Go back-and-forth between them +
+ +
+ +* J. Bezanson, A. Edelman, S. Karpinski, and V. B. Shah tackled the problem in 2009 aiming to design a programing langue that providess both Fast/easy coding __AND__ Fast running + + Birth of Julia, release 0.1 in __2013__ + + This breakthrough was recognized by awards attributed to the authors + - [James H. Wilkinson Prize in Numerical Analysis and Scientific in 2019](https://www.ll.mit.edu/news/wilkinson-prize-goes-developers-flexible-julia-programming-language) + - [IEEE Computer Society Sidney Fernbach Award in 2019](https://www.computer.org/press-room/2019-news/2019-ieee-fernbach-award-edelman) +* In 12 years since its conceptualisation, Julia has been improved from release to release and has aggratated many package developpers + +* Julia for HEP: [Performance of Julia for High Energy Physics Analyses, Marcel Stanitzki & Jan Strube](https://link.springer.com/article/10.1007/s41781-021-00053-3) + + + +
+

Nowadays, Julia is a mature language, with a wide ecosystem

+
+
+ +--- + +# Loops + +
+A python loop +
+ +--- + +# HEP data analysis is a looping game + +HEP enjoys loop: we loop on physics events to loop on particles/physics objects. We often perform particle matching and clustering and for this we loop on events to loop on objects to loop on objects. + +```julia +for event in billions_of_lhc_events + for tens_or_hundreds_of_objects in event + for tens_or_hundres_of_objects_to_match in event + ... + end + end +end +``` + + * The outter loops hides several loops: datasets > files + * This is repeated several times for each analysis. +

⇒ Lines of code executed billions of times even for a Kleenex code, written specially for a publication.

+ +--- + +## Python dislikes loop + + * A master rule for high-performance code in Python is to avoid writing loop in Python + + ⇒ push the loop to underlying compiled libraries. Approach of the `numpy` vectorisation. + +Let's run a simple loop + +[Simple loop in Python](Python-code.ipynb#simple-loop) + +| Python | +|--------| +| 90 ms | + +--- + +## In C++. Code in `simple-loop.cc`: + +```cpp +#include +#include x + +int main(){ + struct timeval t0, t1; + gettimeofday(&t0, 0); + + double a = 0.; + for(unsigned i = 0; i <= 1000000; ++i) a += 1.0/i; + std::cout << "Computation Result: " << a << "\n"; + + gettimeofday(&t1, 0); + std::cerr << "Duration: " << (t1.tv_sec-t0.tv_sec) + + 1.e-6*(t1.tv_usec-t0.tv_usec) + << " seconds\n"; + return 0; +} +``` + + +```julia +run(`g++ -Wall -o simple-loop simple-loop.cc`) +run(`./simple-loop`) +; +run(`g++ -O3 -Wall -o simple-loop simple-loop.cc`) +run(`./simple-loop`) +; +``` + + Computation Result: 14.3927 + + + Duration: 0.003335 seconds + + + Computation Result: 14.3927 + + + Duration: 0.001558 seconds + + +| Python | C++ | +|--------|-------| +| 90 ms | 1.5 ms | + +## How is doing Julia? + +```julia +# +# Julia +# +function f() + a = 0.0 + for i in 1:1_000_000 # ✨ Note the underscores that improves legibility + a = a + 1.0/i + end + return a +end +f() +@time b = f() +``` + + 0.001533 seconds (1 allocation: 16 bytes) + + + + + + 14.392726722864989 + + + +| Python | C++ | Julia | +|--------|--------|--------| +| 90ms | 1.5 ms | 1.6 ms | + +--- + +# Ease of programming + +## The goal is not only running performance. We want also fast and easy coding + + * You have already seen in the previous example that the code syntax and grammar is similar to Pythons. No ''std::map>''..., no compilation step. + +# Programming in a community + +## Googling programming + +Internet search engine and stack overflow play is an essential ingredient in nowadays programming workflow. + +Julia is already widespread enough, to find all the information on the Internet.
+ +Go to [DuckDuckGo](https://www.duckduckgo.com) or your prefered search engine and make a try. + +--- + +# Ecosystem + +* Large set of libraries and active developement + + Julia is firstly used by scientific community ⇒ oriented to our needs +* I did the following game during the wokshop: I've looked for a Julia equivalent each time a speaker mention a Python library (apart from HEP specific ones). + + Caveat: I've not checked that it covers all the features of the Python package + + The results of this survey shows the large activity around Julia + +cmd (Olivier Mattelaer) ✓
+FreeCAD interface (Christophe Delaere) ❌ [In discussion](https://forum.freecadweb.org/viewtopic.php?f=8&t=42400&sid=77306c4ad6e62533dfbf06909b06c0c8&start=10)
+Telegram bot (Matias Senge) ✓ https://github.com/Arkoniak/Telegram.jl
+DataFrames (Vincenzo Eduardo Padulano) ✓
+Spark (Vicenzo and Andr F.) ✓ https://github.com/dfdx/Spark.jl
+Dask (Vincenzo E. P., Graham Markal) ✓
+Batch computing (Vincenzo E. P.) ✓ https://docs.julialang.org/en/v1/manual/parallel-computing/, https://github.com/JuliaParallel, https://juliagpu.org/
+Apache Parquet (Andre Frankenthal) ✓
+Jupyter/Binder/SWAN ✓
+Bokeh (Bruno Alves) ✓ https://github.com/samuelcolvin/Bokeh.jl
+CUDA (Graham Markall) ✓ https://juliagpu.org/cuda/
+Hypothesis (Santam Roy Choudhury, property testing) ❌ ([besised an unmaintained QuickCheck projet](https://quickcheckjl.readthedocs.io/))
+Virtualenv (Henry Schneider, Packaging talk) ✓ [built in the std package manager](https://pkgdocs.julialang.org/v1/environments/)
+Unit test tools (Henry Schneider, Packaging talk) ✓ [std package](https://docs.julialang.org/en/v1/stdlib/Test/) and more: [Coverage](https://github.com/JuliaCI/Coverage.jl), [FactCheck](https://github.com/JuliaAttic/FactCheck.jl)
+JIT/Numba (Graham Markal, Henry Schneider) ✓ [Intrisic to the language](https://docs.julialang.org/en/v1/#man-introduction)
+Machine learning ✓ [Flux](https://fluxml.ai/), [JuliaML](https://juliaml.github.io/),
+  TensorFlow(Matthew Feickert)[TensorFlow](https://github.com/malmaud/TensorFlow.jl)
+  GPyTorch/Gaussian Process ML (Irina Espejo Morales [talk](https://indico.cern.ch/event/1019958/timetable/#14-active-learning-for-level-s)) [GPML](https://github.com/JuliaGaussianProcesses/GPMLj.jl) + +# Data format support + +* Non-HEP format + + HDF5 and Parquet are fully supported (also CSV and Excel, less relevant our data size) +* ROOT + + Missing a solid and performant library to read ROOT file and with xroot support. + + Two packages developped by users. + - [UpROOT.jl](https://github.com/JuliaPy/PyCall.jl) from Oliver Schulz. A wrapper to [uproot](https://github.com/scikit-hep/uproot3) + - [UnROOT.jl](https://github.com/tamasgal/UnROOT.jl) from Tamas Gal and Jerry Ling. Port of uproot in Julia. Can read KM3Net data and tree of simple type and/or vector of simple type like CMS NanoAOD. Johannes Schumann mentionned yesterday in his [talk](https://indico.cern.ch/event/1019958/timetable/#9-python-based-tools-and-frame) + +--- + +# Advanced tools + +## IDE + * Emacs and vim support + * Atom and VScode support. Many features. Code can be run and debugged with the IDE, with support for plots. + +## Notebooks + * Jupyter + * [Pluto](https://github.com/fonsp/Pluto.jlhttps://github.com/fonsp/Pluto.jl). A new generation notebook with automatic update of cells. + * Debugger: Debugger, Rebugger, Juno debugger (for Atom IDE) + + +## Package installation + * Python made it easy with conda and pip. It's even easier in Julia + + A standard library part of the Julia installation + + Give instructions to the user, when he or she try to import a missing package. Try it: + + +```julia +import Blink +``` + + + ArgumentError: Package Blink not found in current path: + - Run `import Pkg; Pkg.add("Blink")` to install the Blink package. + + + + + Stacktrace: + + [1] require(into::Module, mod::Symbol) + + @ Base ./loading.jl:871 + + [2] eval + + @ ./boot.jl:360 [inlined] + + [3] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String) + + @ Base ./loading.jl:1094 + + +💡 Dedicated command mode for package handling in the REPL (interactive terminal application equivalent ipython): +```julia-repl +julia> ] +(@v1.6) pkg> add Blink +(@v1.6) pkg> [Backspace] +julia> +``` + +--- + +# Interoperability + +
+
+"Plug adaptors" by dogwelder is licensed under CC BY-NC 2.0
+ Credits: Karen V Bryan is licensed under CC BY-ND 2.0 +
+
+ +* Python, C, Fortran code: direct call from Julia and Jupyter Julia kernels +* C++ code: call via a wrapper. Lacking a tool for automatic generation of wrapper like swig. Project for direct-call (ala cppyy) on hold and not working for recent versions of Julia. + +The other way around + +* Python code can call Julia as well + +# Calling Python from Julia + +As simple as calling Julia code + + +```julia +# Enable Python call: +using PyCall + +# Inport a python module: +math = pyimport("math") + +# Use it as a Julia module: +math.sin(math.pi / 4) +``` + + + + + 0.7071067811865475 + + + +# Calling C from Julia + + +```julia +path = ccall(:getenv, Cstring, (Cstring,), "SHELL") +unsafe_string(path) +``` + + + + + "/bin/bash" + + + +For C, you will typically write a wrapper in ''Julia'' to handle errors, like: + + +```julia +function getenv(var::AbstractString) + val = ccall(:getenv, Cstring, (Cstring,), var) + if val == C_NULL + error("getenv: undefined variable: ", var) + end + return unsafe_string(val) +end +``` + + + + + getenv (generic function with 1 method) + + + + +```julia +println(getenv("USER")) +println(getenv("SMOKE")) # ⇒ will through an exception unless you have SMOKE in your environment +``` + + pgras + + + + getenv: undefined variable: SMOKE + + + + Stacktrace: + + [1] error(::String, ::String) + + @ Base ./error.jl:42 + + [2] getenv(var::String) + + @ Main ./In[13]:4 + + [3] top-level scope + + @ In[14]:2 + + [4] eval + + @ ./boot.jl:360 [inlined] + + [5] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String) + + @ Base ./loading.jl:1094 + +--- + +# Calling Julia from python + +```python +$ python3 -m pip install julia # install PyJulia +... # you may need `--user` after `install` + +$ python3 +>>> import julia +>>> julia.install() # install PyCall.jl etc. +>>> from julia import Base # short demo +>>> Base.sind(90) +1.0 +``` + +--- + +# Embedding Julia code in a Python notebook + +Calling julia code from IPython + +--- + +# Let's use Julia for a HEP example + +## CMS dimuon analysis + + > ⚡ It's an extremely simple analysis, way far from usual LHC analysis + + > Let's go, + + * [Dimuon spectrum in Julia](dimu/diMuon-bin-jl.ipynb) + +--- + +# Conclusions + +* Julia offers the code running performance of C++, with the same programming language the ease of programming of Python, and a large Ecosystem +* Julia is the ideal language for our usage +* It's now mature enough to be used for HEP + + It's the right time to catch the Julia's train + + Needs developers to provides tools, especially for ROOT I/O and a ROOT binding + + Needs to be advertised to users. Most of the Physicist does not know it. + + +_Thanks to Jim Pivarski for the tricks to turn a notebook into a presentations and the nice tutorial he gave on the subject_ diff --git a/binder/Manifest.toml b/binder/Manifest.toml new file mode 100644 index 0000000..10aaaca --- /dev/null +++ b/binder/Manifest.toml @@ -0,0 +1,573 @@ +# This file is machine-generated - editing it directly is not advised + +[[AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "485ee0867925449198280d4af84bdb46a2a404d0" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.0.1" + +[[Adapt]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "84918055d15b3114ede17ac6a7182f68870c16f7" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.3.1" + +[[ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" + +[[Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[AxisAlgorithms]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] +git-tree-sha1 = "a4d07a1c313392a77042855df46c5f534076fab9" +uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" +version = "1.0.0" + +[[Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[CategoricalArrays]] +deps = ["DataAPI", "Future", "JSON", "Missings", "Printf", "RecipesBase", "Statistics", "StructTypes", "Unicode"] +git-tree-sha1 = "1562002780515d2573a4fb0c3715e4e57481075e" +uuid = "324d7699-5711-5eae-9e2f-1d82baa6b597" +version = "0.10.0" + +[[ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "dcc25ff085cf548bc8befad5ce048391a7c07d40" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "0.10.11" + +[[ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "024fe24d83e4a5bf5fc80501a314ce0d1aa35597" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.11.0" + +[[Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.8" + +[[Compat]] +deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] +git-tree-sha1 = "dc7dedc2c2aa9faf59a55c622760a25cbefbe941" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "3.31.0" + +[[CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" + +[[Compose]] +deps = ["Base64", "Colors", "DataStructures", "Dates", "IterTools", "JSON", "LinearAlgebra", "Measures", "Printf", "Random", "Requires", "Statistics", "UUIDs"] +git-tree-sha1 = "c6461fc7c35a4bb8d00905df7adafcff1fe3a6bc" +uuid = "a81c6b42-2e10-5240-aca2-a61377ecd94b" +version = "0.9.2" + +[[Conda]] +deps = ["JSON", "VersionParsing"] +git-tree-sha1 = "299304989a5e6473d985212c28928899c74e9421" +uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" +version = "1.5.2" + +[[Contour]] +deps = ["StaticArrays"] +git-tree-sha1 = "9f02045d934dc030edad45944ea80dbd1f0ebea7" +uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" +version = "0.5.7" + +[[CoupledFields]] +deps = ["LinearAlgebra", "Statistics", "StatsBase"] +git-tree-sha1 = "6c9671364c68c1158ac2524ac881536195b7e7bc" +uuid = "7ad07ef1-bdf2-5661-9d2b-286fd4296dac" +version = "0.2.0" + +[[DataAPI]] +git-tree-sha1 = "ee400abb2298bd13bfc3df1c412ed228061a2385" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.7.0" + +[[DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "4437b64df1e0adccc3e5d1adbc3ac741095e4677" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.9" + +[[Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[Distances]] +deps = ["LinearAlgebra", "Statistics", "StatsAPI"] +git-tree-sha1 = "abe4ad222b26af3337262b8afb28fab8d215e9f8" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.3" + +[[Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[Distributions]] +deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"] +git-tree-sha1 = "a837fdf80f333415b69684ba8e8ae6ba76de6aaa" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.24.18" + +[[DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "a32185f5428d3986f47c2ab78b1f216d5e6cc96f" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.8.5" + +[[Downloads]] +deps = ["ArgTools", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" + +[[FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] +git-tree-sha1 = "f985af3b9f4e278b1d24434cbb546d6092fca661" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.4.3" + +[[FFTW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3676abafff7e4ff07bbd2c42b3d8201f31653dcc" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.9+8" + +[[FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[FillArrays]] +deps = ["LinearAlgebra", "Random", "SparseArrays"] +git-tree-sha1 = "693210145367e7685d8604aee33d9bfb85db8b31" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "0.11.9" + +[[FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.4" + +[[Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[Gadfly]] +deps = ["Base64", "CategoricalArrays", "Colors", "Compose", "Contour", "CoupledFields", "DataAPI", "DataStructures", "Dates", "Distributions", "DocStringExtensions", "Hexagons", "IndirectArrays", "IterTools", "JSON", "Juno", "KernelDensity", "LinearAlgebra", "Loess", "Measures", "Printf", "REPL", "Random", "Requires", "Showoff", "Statistics"] +git-tree-sha1 = "96da4818e4d481a29aa7d66aac1eb778432fb89a" +uuid = "c91e804a-d5a3-530f-b6f0-dfbca275c004" +version = "1.3.3" + +[[Grisu]] +git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" +uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" +version = "1.0.2" + +[[Hexagons]] +deps = ["Test"] +git-tree-sha1 = "de4a6f9e7c4710ced6838ca906f81905f7385fd6" +uuid = "a1b4810d-1bce-5fbd-ac56-80944d57a21f" +version = "0.2.0" + +[[IJulia]] +deps = ["Base64", "Conda", "Dates", "InteractiveUtils", "JSON", "Libdl", "Markdown", "MbedTLS", "Pkg", "Printf", "REPL", "Random", "SoftGlobalScope", "Test", "UUIDs", "ZMQ"] +git-tree-sha1 = "d8b9c31196e1dd92181cd0f5760ca2d2ffb4ac0f" +uuid = "7073ff75-c697-5162-941a-fcdaad2a7d2a" +version = "1.23.2" + +[[IndirectArrays]] +git-tree-sha1 = "c2a145a145dc03a7620af1444e0264ef907bd44f" +uuid = "9b13fd28-a010-5f03-acff-a1bbcff69959" +version = "0.5.1" + +[[IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2018.0.3+2" + +[[InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[Interpolations]] +deps = ["AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] +git-tree-sha1 = "1470c80592cf1f0a35566ee5e93c5f8221ebc33a" +uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +version = "0.13.3" + +[[IterTools]] +git-tree-sha1 = "05110a2ab1fc5f932622ffea2a003221f4782c18" +uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" +version = "1.3.0" + +[[JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.3.0" + +[[JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "81690084b6198a2e1da36fcfda16eeca9f9f24e4" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.1" + +[[Juno]] +deps = ["Base64", "Logging", "Media", "Profile"] +git-tree-sha1 = "07cb43290a840908a771552911a6274bc6c072c7" +uuid = "e5e0dc1b-0480-54bc-9374-aad01c23163d" +version = "0.8.4" + +[[KernelDensity]] +deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] +git-tree-sha1 = "591e8dc09ad18386189610acafb970032c519707" +uuid = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b" +version = "0.6.3" + +[[LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" + +[[LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" + +[[LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" + +[[Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[LinearAlgebra]] +deps = ["Libdl"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[Loess]] +deps = ["Distances", "LinearAlgebra", "Statistics"] +git-tree-sha1 = "b5254a86cf65944c68ed938e575f5c81d5dfe4cb" +uuid = "4345ca2d-374a-55d4-8d30-97f9976e7612" +version = "0.5.3" + +[[LogExpFunctions]] +deps = ["DocStringExtensions", "LinearAlgebra"] +git-tree-sha1 = "7bd5f6565d80b6bf753738d2bc40a5dfea072070" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.2.5" + +[[Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] +git-tree-sha1 = "c253236b0ed414624b083e6b72bfe891fbd2c7af" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2021.1.1+1" + +[[MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "6a8a2a625ab0dea913aba95c11370589e0239ff0" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.6" + +[[Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "Random", "Sockets"] +git-tree-sha1 = "1c38e51c3d08ef2278062ebceade0e46cefc96fe" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.0.3" + +[[MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" + +[[Measures]] +git-tree-sha1 = "e498ddeee6f9fdb4551ce855a46f54dbd900245f" +uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" +version = "0.3.1" + +[[Media]] +deps = ["MacroTools", "Test"] +git-tree-sha1 = "75a54abd10709c01f1b86b84ec225d26e840ed58" +uuid = "e89f7d12-3494-54d1-8411-f7d8b9ae1f27" +version = "0.5.0" + +[[Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "4ea90bd5d3985ae1f9a908bd4500ae88921c5ce7" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.0.0" + +[[Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" + +[[NBInclude]] +deps = ["JSON", "SoftGlobalScope"] +git-tree-sha1 = "32bb996dc3f767b69fe9241033858b3f974741ec" +uuid = "0db19996-df87-5ea3-a455-e3a50d440464" +version = "2.2.0" + +[[NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" + +[[OffsetArrays]] +deps = ["Adapt"] +git-tree-sha1 = "2bf78c5fd7fa56d2bbf1efbadd45c1b8789e6f57" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.10.2" + +[[OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[OrderedCollections]] +git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.4.1" + +[[PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "4dd403333bcf0909341cfe57ec115152f937d7d8" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.1" + +[[Parsers]] +deps = ["Dates"] +git-tree-sha1 = "c8abc88faa3f7a3950832ac5d6e690881590d6dc" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "1.1.0" + +[[Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" + +[[Preferences]] +deps = ["TOML"] +git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.2.2" + +[[Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[Profile]] +deps = ["Printf"] +uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" + +[[PyCall]] +deps = ["Conda", "Dates", "Libdl", "LinearAlgebra", "MacroTools", "Serialization", "VersionParsing"] +git-tree-sha1 = "169bb8ea6b1b143c5cf57df6d34d022a7b60c6db" +uuid = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" +version = "1.92.3" + +[[QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "12fbe86da16df6679be7521dfb39fbc861e1dc7b" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.4.1" + +[[REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[Random]] +deps = ["Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[Ratios]] +git-tree-sha1 = "37d210f612d70f3f7d57d488cb3b6eff56ad4e41" +uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" +version = "0.4.0" + +[[RecipesBase]] +git-tree-sha1 = "b3fb709f3c97bfc6e948be68beeecb55a0b340ae" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.1.1" + +[[Reexport]] +git-tree-sha1 = "5f6c21241f0f655da3952fd60aa18477cf96c220" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.1.0" + +[[Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "4036a3bd08ac7e968e27c203d45f5fff15020621" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.1.3" + +[[Rmath]] +deps = ["Random", "Rmath_jll"] +git-tree-sha1 = "bf3188feca147ce108c76ad82c2792c57abe7b1f" +uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" +version = "0.7.0" + +[[Rmath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "68db32dff12bb6127bac73c209881191bf0efbb7" +uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" +version = "0.3.0+0" + +[[SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" + +[[Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[Showoff]] +deps = ["Dates", "Grisu"] +git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de" +uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" +version = "1.0.3" + +[[Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[SoftGlobalScope]] +deps = ["REPL"] +git-tree-sha1 = "986ec2b6162ccb95de5892ed17832f95badf770c" +uuid = "b85f4697-e234-5449-a836-ec8e2f98b302" +version = "1.1.0" + +[[SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.0.1" + +[[SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[SpecialFunctions]] +deps = ["ChainRulesCore", "LogExpFunctions", "OpenSpecFun_jll"] +git-tree-sha1 = "a50550fa3164a8c46747e62063b4d774ac1bcf49" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "1.5.1" + +[[StaticArrays]] +deps = ["LinearAlgebra", "Random", "Statistics"] +git-tree-sha1 = "a43a7b58a6e7dc933b2fa2e0ca653ccf8bb8fd0e" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.2.6" + +[[Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[StatsAPI]] +git-tree-sha1 = "1958272568dc176a1d881acb797beb909c785510" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.0.0" + +[[StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "2f6792d523d7448bbe2fec99eca9218f06cc746d" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.33.8" + +[[StatsFuns]] +deps = ["LogExpFunctions", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "30cd8c360c54081f806b1ee14d2eecbef3c04c49" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "0.9.8" + +[[StructTypes]] +deps = ["Dates", "UUIDs"] +git-tree-sha1 = "e36adc471280e8b346ea24c5c87ba0571204be7a" +uuid = "856f2bd8-1eba-4b0a-8007-ebc267875bd4" +version = "1.7.2" + +[[SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" + +[[Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" + +[[Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[VersionParsing]] +git-tree-sha1 = "80229be1f670524750d905f8fc8148e5a8c4537f" +uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" +version = "1.2.0" + +[[WoodburyMatrices]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "59e2ad8fd1591ea019a5259bd012d7aee15f995c" +uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" +version = "0.5.3" + +[[ZMQ]] +deps = ["FileWatching", "Sockets", "ZeroMQ_jll"] +git-tree-sha1 = "fc68e8a3719166950a0f3e390a14c7302c48f8de" +uuid = "c2297ded-f4af-51ae-bb23-16f91089e4e1" +version = "1.2.1" + +[[ZeroMQ_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "libsodium_jll"] +git-tree-sha1 = "fe5c65a526f066fb3000da137d5785d9649a8a47" +uuid = "8f1865be-045e-5c20-9c9f-bfbfb0764568" +version = "4.3.4+0" + +[[Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" + +[[libsodium_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "848ab3d00fe39d6fbc2a8641048f8f272af1c51e" +uuid = "a9144af2-ca23-56d9-984f-0d03f7b5ccf8" +version = "1.0.20+0" + +[[nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" + +[[p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/binder/Pipfile b/binder/Pipfile new file mode 100644 index 0000000..e11c458 --- /dev/null +++ b/binder/Pipfile @@ -0,0 +1,13 @@ +[[source]] +url = "https://pypi.python.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +julia = "*" +jupyter = "*" + +[dev-packages] + +[requires] +python_version = "3.9" diff --git a/binder/Pipfile.lock b/binder/Pipfile.lock new file mode 100644 index 0000000..5403954 --- /dev/null +++ b/binder/Pipfile.lock @@ -0,0 +1,656 @@ +{ + "_meta": { + "hash": { + "sha256": "6a2d7d86cc509ad6c9fe6bcdf817b08029afea16d063cd185b0e10081172a70a" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.9" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.python.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "argon2-cffi": { + "hashes": [ + "sha256:05a8ac07c7026542377e38389638a8a1e9b78f1cd8439cd7493b39f08dd75fbf", + "sha256:0bf066bc049332489bb2d75f69216416329d9dc65deee127152caeb16e5ce7d5", + "sha256:18dee20e25e4be86680b178b35ccfc5d495ebd5792cd00781548d50880fee5c5", + "sha256:36320372133a003374ef4275fbfce78b7ab581440dfca9f9471be3dd9a522428", + "sha256:392c3c2ef91d12da510cfb6f9bae52512a4552573a9e27600bdb800e05905d2b", + "sha256:3aa804c0e52f208973845e8b10c70d8957c9e5a666f702793256242e9167c4e0", + "sha256:57358570592c46c420300ec94f2ff3b32cbccd10d38bdc12dc6979c4a8484fbc", + "sha256:6678bb047373f52bcff02db8afab0d2a77d83bde61cfecea7c5c62e2335cb203", + "sha256:6ea92c980586931a816d61e4faf6c192b4abce89aa767ff6581e6ddc985ed003", + "sha256:77e909cc756ef81d6abb60524d259d959bab384832f0c651ed7dcb6e5ccdbb78", + "sha256:7d455c802727710e9dfa69b74ccaab04568386ca17b0ad36350b622cd34606fe", + "sha256:8282b84ceb46b5b75c3a882b28856b8cd7e647ac71995e71b6705ec06fc232c3", + "sha256:8a84934bd818e14a17943de8099d41160da4a336bcc699bb4c394bbb9b94bd32", + "sha256:9bee3212ba4f560af397b6d7146848c32a800652301843df06b9e8f68f0f7361", + "sha256:9dfd5197852530294ecb5795c97a823839258dfd5eb9420233c7cfedec2058f2", + "sha256:b160416adc0f012fb1f12588a5e6954889510f82f698e23ed4f4fa57f12a0647", + "sha256:b94042e5dcaa5d08cf104a54bfae614be502c6f44c9c89ad1535b2ebdaacbd4c", + "sha256:ba7209b608945b889457f949cc04c8e762bed4fe3fec88ae9a6b7765ae82e496", + "sha256:cc0e028b209a5483b6846053d5fd7165f460a1f14774d79e632e75e7ae64b82b", + "sha256:d8029b2d3e4b4cea770e9e5a0104dd8fa185c1724a0f01528ae4826a6d25f97d", + "sha256:da7f0445b71db6d3a72462e04f36544b0de871289b0bc8a7cc87c0f5ec7079fa", + "sha256:e2db6e85c057c16d0bd3b4d2b04f270a7467c147381e8fd73cbbe5bc719832be" + ], + "version": "==20.1.0" + }, + "async-generator": { + "hashes": [ + "sha256:01c7bf666359b4967d2cda0000cc2e4af16a0ae098cbffcb8472fb9e8ad6585b", + "sha256:6ebb3d106c12920aaae42ccb6f787ef5eefdcdd166ea3d628fa8476abe712144" + ], + "version": "==1.10" + }, + "attrs": { + "hashes": [ + "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1", + "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb" + ], + "version": "==21.2.0" + }, + "backcall": { + "hashes": [ + "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e", + "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255" + ], + "version": "==0.2.0" + }, + "bleach": { + "hashes": [ + "sha256:6123ddc1052673e52bab52cdc955bcb57a015264a1c57d37bea2f6b817af0125", + "sha256:98b3170739e5e83dd9dc19633f074727ad848cbedb6026708c8ac2d3b697a433" + ], + "version": "==3.3.0" + }, + "cffi": { + "hashes": [ + "sha256:06c54a68935738d206570b20da5ef2b6b6d92b38ef3ec45c5422c0ebaf338d4d", + "sha256:0c0591bee64e438883b0c92a7bed78f6290d40bf02e54c5bf0978eaf36061771", + "sha256:19ca0dbdeda3b2615421d54bef8985f72af6e0c47082a8d26122adac81a95872", + "sha256:22b9c3c320171c108e903d61a3723b51e37aaa8c81255b5e7ce102775bd01e2c", + "sha256:26bb2549b72708c833f5abe62b756176022a7b9a7f689b571e74c8478ead51dc", + "sha256:33791e8a2dc2953f28b8d8d300dde42dd929ac28f974c4b4c6272cb2955cb762", + "sha256:3c8d896becff2fa653dc4438b54a5a25a971d1f4110b32bd3068db3722c80202", + "sha256:4373612d59c404baeb7cbd788a18b2b2a8331abcc84c3ba40051fcd18b17a4d5", + "sha256:487d63e1454627c8e47dd230025780e91869cfba4c753a74fda196a1f6ad6548", + "sha256:4922cd707b25e623b902c86188aca466d3620892db76c0bdd7b99a3d5e61d35f", + "sha256:55af55e32ae468e9946f741a5d51f9896da6b9bf0bbdd326843fec05c730eb20", + "sha256:5d4b68e216fc65e9fe4f524c177b54964af043dde734807586cf5435af84045c", + "sha256:64fda793737bc4037521d4899be780534b9aea552eb673b9833b01f945904c2e", + "sha256:6d6169cb3c6c2ad50db5b868db6491a790300ade1ed5d1da29289d73bbe40b56", + "sha256:7bcac9a2b4fdbed2c16fa5681356d7121ecabf041f18d97ed5b8e0dd38a80224", + "sha256:80b06212075346b5546b0417b9f2bf467fea3bfe7352f781ffc05a8ab24ba14a", + "sha256:818014c754cd3dba7229c0f5884396264d51ffb87ec86e927ef0be140bfdb0d2", + "sha256:8eb687582ed7cd8c4bdbff3df6c0da443eb89c3c72e6e5dcdd9c81729712791a", + "sha256:99f27fefe34c37ba9875f224a8f36e31d744d8083e00f520f133cab79ad5e819", + "sha256:9f3e33c28cd39d1b655ed1ba7247133b6f7fc16fa16887b120c0c670e35ce346", + "sha256:a8661b2ce9694ca01c529bfa204dbb144b275a31685a075ce123f12331be790b", + "sha256:a9da7010cec5a12193d1af9872a00888f396aba3dc79186604a09ea3ee7c029e", + "sha256:b315d709717a99f4b27b59b021e6207c64620790ca3e0bde636a6c7f14618abb", + "sha256:ba6f2b3f452e150945d58f4badd92310449876c4c954836cfb1803bdd7b422f0", + "sha256:c33d18eb6e6bc36f09d793c0dc58b0211fccc6ae5149b808da4a62660678b156", + "sha256:c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd", + "sha256:c9e005e9bd57bc987764c32a1bee4364c44fdc11a3cc20a40b93b444984f2b87", + "sha256:d2ad4d668a5c0645d281dcd17aff2be3212bc109b33814bbb15c4939f44181cc", + "sha256:d950695ae4381ecd856bcaf2b1e866720e4ab9a1498cba61c602e56630ca7195", + "sha256:e22dcb48709fc51a7b58a927391b23ab37eb3737a98ac4338e2448bef8559b33", + "sha256:e8c6a99be100371dbb046880e7a282152aa5d6127ae01783e37662ef73850d8f", + "sha256:e9dc245e3ac69c92ee4c167fbdd7428ec1956d4e754223124991ef29eb57a09d", + "sha256:eb687a11f0a7a1839719edd80f41e459cc5366857ecbed383ff376c4e3cc6afd", + "sha256:eb9e2a346c5238a30a746893f23a9535e700f8192a68c07c0258e7ece6ff3728", + "sha256:ed38b924ce794e505647f7c331b22a693bee1538fdf46b0222c4717b42f744e7", + "sha256:f0c5d1acbfca6ebdd6b1e3eded8d261affb6ddcf2186205518f1428b8569bb99", + "sha256:f10afb1004f102c7868ebfe91c28f4a712227fe4cb24974350ace1f90e1febbf", + "sha256:f174135f5609428cc6e1b9090f9268f5c8935fddb1b25ccb8255a2d50de6789e", + "sha256:f3ebe6e73c319340830a9b2825d32eb6d8475c1dac020b4f0aa774ee3b898d1c", + "sha256:fd4305f86f53dfd8cd3522269ed7fc34856a8ee3709a5e28b2836b2db9d4cd69" + ], + "version": "==1.14.6" + }, + "debugpy": { + "hashes": [ + "sha256:028fd23004a4f86e37767efa1c285ee74ee2c5cd9b02f9dff62be0ce17429ad9", + "sha256:04b6730cc4149d3fd947e351e8a2cf18cd31fd4c8ba46872921dd54c4eee2acc", + "sha256:062b87923f78636217617c8de2c16c9846612f30d12f3b51c0eb194739963003", + "sha256:068db6d85b69500f76fb28ac2b8d6dcedb6d9e405fbffb39489651eb56e793f0", + "sha256:0777fff5d8ce086383bbb6017ab7a4300f29c02565aa72a4533f0c815898d44b", + "sha256:0ba4dd246588740f17725841be08c7368c1f2df706bb65dd85998c5809809c8e", + "sha256:0c017a26a489cf6c57fd9a51ec33718275d15cbb19cc29097e7efb0492a1def4", + "sha256:1478532ed5d29626cf2acbe58213a22ce6d86af9b57716d2e4824a5ae750418b", + "sha256:1b7929baf506d897d170adbb9a99b83b6453acb2d7b10780eb46cb697522529c", + "sha256:231851bec777e210cebb247b8a57ae35d4bc213b190b05d95556e52a0a765ccf", + "sha256:29252f8253b1cbd5a4786d41d0d44835bd8152f910af109a48eebf1d0b66a40c", + "sha256:2a8246403058457e8f777853af52a61402cf8596d6b9442de1112038495b5603", + "sha256:313bcd88d40a65a6a9032ecd3aa83099f759839ec80677bac70285aa025112ba", + "sha256:33ce42e58977d811d974a1f30352d2822a0f2e7160f0e6211753da3027fcf442", + "sha256:37d06369b46d2013768494cf18e0568834d89ba52698a695358d12411ac9cf65", + "sha256:4558ac356f3a6d46d3b3fb92bf4c053b87fd3903cf4022f10425e811c62a0514", + "sha256:54109c9cbce8e96986a943812de8536d001130bce27d1a370b0c39bc7d6ef619", + "sha256:5f7aeae9c8d7b77d8bad23d82723585949d4ef32fc4eb769e28f1d33319a28b0", + "sha256:61c6c77b3ea3098dfd78f2ff4ce27565145a293af995f817f2475d02a2145b6d", + "sha256:63acc9e755c1ae426c223b0596ac098b773a633091121c997086b7bd50faa1e0", + "sha256:68905f3bc59b7d903724e040f80bd89c9d649d67473f09d6912908a4c46f971e", + "sha256:709bc213b0b31665e00a3547cb92b2760b948b6473dbd56fe0a5ff1fa1202e80", + "sha256:71ab9068e87a28cfbb7a7db041a946ac5493d45d0c61280021af038e14a64232", + "sha256:71f634cf1eb52c825a000300e031c52e789337754237745a4d31560ce0041c9c", + "sha256:72c3cb415cdf42c7ff26ee2aebe3095bc136ed3065d1f60d76feebe47b1980a6", + "sha256:7a1df03e909e8b3f9eb45e2d3495e290df8fe9df1b903957b144125635b5ecf6", + "sha256:7cd804d531e6c932ffb87766746bca111c9470b6c7877340df9ed3edd66d7c7c", + "sha256:813075f9ff6795187417109fff11819b23a92169b98b56837d2a9c06eb81f15e", + "sha256:81cfd83a911b454c36b677d0bc722c35acd978e1856d5550e71c1226af9c143c", + "sha256:8ca653751aa728cf620c8fddc9c6200511fcc2e7d0a6ed615d246fdca1df5201", + "sha256:8e26ce355631f80f044bf0c97fd2d8db0b83b43b6fa8abac956108e58c79f522", + "sha256:8e3002cfb2ebf570f19fd060950e459a071630f6767f7e44804ac5a67ef57baf", + "sha256:91ff6c5ea619a0a3bfdc49587d2f05198c1849d8888632f96d2f855e4e88a21a", + "sha256:98c76193a924baddfbffd329a03d9d5722b0ea86a777db40263f257555ab0dba", + "sha256:996439d56a0a2f38ea2c0a4d88874a56815585120a3dedd03422b1e3678875f1", + "sha256:9b4304cc2ddedcefdc7ac0d6499a246aff6c981b58bfbd89f4103c0584e200e5", + "sha256:9c3cb1f0324dcaf5e1dcc64013dbe959112724c8f58a558fc804741a54a90f14", + "sha256:9c858b3bc1a28b30d06df0bdb02a7a5e7a146f986b0d5e4c438cc1940d121bce", + "sha256:a24d65a295875d6f7b063bbc100240523537aff3380d33c1205819ebf213e340", + "sha256:a332717a0778d55ca4629fb0b4a016affa06151a9822af940552497a77aac7ce", + "sha256:a696ac566adc8b6aca3e7eb3bd2bd7b71d61f4721f42bf2e504f4166769ea4d3", + "sha256:b3e2d0256736e77acfa1c05c35ed0f7b00a17a7d7da45e47d0705c5a2fc31256", + "sha256:bcdffa215de49033aac273facbc4c2413a137b6e2b6694ac7ae04a88f38e4eba", + "sha256:bd307ceabb2b17328e84cc0416bd6c0181de78d4f920510017f4fc7590afc2d9", + "sha256:c28a4a74082bf7c06553e5002ad505d4119d0b4425a70570368082bcb222d8f2", + "sha256:cd3e74f465bb71122481c27688cf09a3dd13fae18df30abfd51e513811fc7873", + "sha256:d1254de50f25623df4ff90512f4dd5734874438680f6ad284daa9af1c622f504", + "sha256:d15b0be81c9a448346ed0a7c19d9c88f60ccfb53f66e5e4ec99320d9dcd4fe4e", + "sha256:d53e7b8dba67b390b43d891fd5459c49499fb274748ced89cada1f7dad95c414", + "sha256:d678f48f2fd14716839e7e5b560eacbebddb0cc95832998dd020010e20a1cd9e", + "sha256:dd1f907b2ea8b57dd26c315bd5c907a147f9b5f28ffec092c2572cab6d57e332", + "sha256:de28c434abb8179b05afaa8a0447fff36980f397ef6c64a6c825a26c5258b67f", + "sha256:de92459af4b0079437fae79f10469488ef1566942028847e4bac780e079a5a88", + "sha256:e658b89c9e3eab39bbbe56d3e086ffc0b3266817788cb5aa6669f194620b3951", + "sha256:e6f344db72fa9773ab52a1f527bb1b517e8426a13611a68aae5db587d1996bc1", + "sha256:fab455f6c811f98f3d669b23eb99623200929eef9c0a8a8f1052aeba89346f93" + ], + "version": "==1.3.0" + }, + "decorator": { + "hashes": [ + "sha256:6e5c199c16f7a9f0e3a61a4a54b3d27e7dad0dbdde92b944426cb20914376323", + "sha256:72ecfba4320a893c53f9706bebb2d55c270c1e51a28789361aa93e4a21319ed5" + ], + "version": "==5.0.9" + }, + "defusedxml": { + "hashes": [ + "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69", + "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61" + ], + "version": "==0.7.1" + }, + "entrypoints": { + "hashes": [ + "sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19", + "sha256:c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451" + ], + "version": "==0.3" + }, + "ipykernel": { + "hashes": [ + "sha256:9a8576cb70a70cc8c63b0b6671e5f4767917071204653a5934e9b2c8680cec74", + "sha256:a4f51c53c7be3f93d75c25839183fa2dfa24908fc650dfd023b276c7a080dc73" + ], + "version": "==6.0.1" + }, + "ipython": { + "hashes": [ + "sha256:54bbd1fe3882457aaf28ae060a5ccdef97f212a741754e420028d4ec5c2291dc", + "sha256:aa21412f2b04ad1a652e30564fff6b4de04726ce875eab222c8430edc6db383a" + ], + "version": "==7.25.0" + }, + "ipython-genutils": { + "hashes": [ + "sha256:72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8", + "sha256:eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8" + ], + "version": "==0.2.0" + }, + "ipywidgets": { + "hashes": [ + "sha256:9f1a43e620530f9e570e4a493677d25f08310118d315b00e25a18f12913c41f0", + "sha256:e6513cfdaf5878de30f32d57f6dc2474da395a2a2991b94d487406c0ab7f55ca" + ], + "version": "==7.6.3" + }, + "jedi": { + "hashes": [ + "sha256:18456d83f65f400ab0c2d3319e48520420ef43b23a086fdc05dff34132f0fb93", + "sha256:92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707" + ], + "version": "==0.18.0" + }, + "jinja2": { + "hashes": [ + "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4", + "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4" + ], + "version": "==3.0.1" + }, + "jsonschema": { + "hashes": [ + "sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163", + "sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" + ], + "version": "==3.2.0" + }, + "julia": { + "hashes": [ + "sha256:378d0377f75bb0e3bfc4cce19a56d3bf5a9a7be38e370e3a7cf3359bf4cd0378", + "sha256:9ca85aa655806a5cdf588b70d2e0644c53c418bb22ee2b6565a72d9f9611f4cc" + ], + "index": "pypi", + "version": "==0.5.6" + }, + "jupyter": { + "hashes": [ + "sha256:3e1f86076bbb7c8c207829390305a2b1fe836d471ed54be66a3b8c41e7f46cc7", + "sha256:5b290f93b98ffbc21c0c7e749f054b3267782166d72fa5e3ed1ed4eaf34a2b78", + "sha256:d9dc4b3318f310e34c82951ea5d6683f67bed7def4b259fafbfe4f1beb1d8e5f" + ], + "index": "pypi", + "version": "==1.0.0" + }, + "jupyter-client": { + "hashes": [ + "sha256:9715152067e3f7ea3b56f341c9a0f9715c8c7cc316ee0eb13c3c84f5ca0065f5", + "sha256:e2ab61d79fbf8b56734a4c2499f19830fbd7f6fefb3e87868ef0545cb3c17eb9" + ], + "version": "==6.2.0" + }, + "jupyter-console": { + "hashes": [ + "sha256:242248e1685039cd8bff2c2ecb7ce6c1546eb50ee3b08519729e6e881aec19c7", + "sha256:7799c4ea951e0e96ba8260575423cb323ea5a03fcf5503560fa3e15748869e27" + ], + "version": "==6.4.0" + }, + "jupyter-core": { + "hashes": [ + "sha256:79025cb3225efcd36847d0840f3fc672c0abd7afd0de83ba8a1d3837619122b4", + "sha256:8c6c0cac5c1b563622ad49321d5ec47017bd18b94facb381c6973a0486395f8e" + ], + "version": "==4.7.1" + }, + "jupyterlab-pygments": { + "hashes": [ + "sha256:abfb880fd1561987efaefcb2d2ac75145d2a5d0139b1876d5be806e32f630008", + "sha256:cfcda0873626150932f438eccf0f8bf22bfa92345b814890ab360d666b254146" + ], + "version": "==0.1.2" + }, + "jupyterlab-widgets": { + "hashes": [ + "sha256:5c1a29a84d3069208cb506b10609175b249b6486d6b1cbae8fcde2a11584fb78", + "sha256:caeaf3e6103180e654e7d8d2b81b7d645e59e432487c1d35a41d6d3ee56b3fef" + ], + "markers": "python_version >= '3.6'", + "version": "==1.0.0" + }, + "markupsafe": { + "hashes": [ + "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298", + "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64", + "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b", + "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567", + "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff", + "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74", + "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35", + "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26", + "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7", + "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75", + "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f", + "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135", + "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8", + "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a", + "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914", + "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18", + "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8", + "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2", + "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d", + "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b", + "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f", + "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb", + "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833", + "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415", + "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902", + "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9", + "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d", + "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066", + "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f", + "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5", + "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94", + "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509", + "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51", + "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872" + ], + "version": "==2.0.1" + }, + "matplotlib-inline": { + "hashes": [ + "sha256:5cf1176f554abb4fa98cb362aa2b55c500147e4bdbb07e3fda359143e1da0811", + "sha256:f41d5ff73c9f5385775d5c0bc13b424535c8402fe70ea8210f93e11f3683993e" + ], + "version": "==0.1.2" + }, + "mistune": { + "hashes": [ + "sha256:59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e", + "sha256:88a1051873018da288eee8538d476dffe1262495144b33ecb586c4ab266bb8d4" + ], + "version": "==0.8.4" + }, + "nbclient": { + "hashes": [ + "sha256:db17271330c68c8c88d46d72349e24c147bb6f34ec82d8481a8f025c4d26589c", + "sha256:e79437364a2376892b3f46bedbf9b444e5396cfb1bc366a472c37b48e9551500" + ], + "version": "==0.5.3" + }, + "nbconvert": { + "hashes": [ + "sha256:37cd92ff2ae6a268e62075ff8b16129e0be4939c4dfcee53dc77cc8a7e06c684", + "sha256:d22a8ff202644d31db254d24d52c3a96c82156623fcd7c7f987bba2612303ec9" + ], + "version": "==6.1.0" + }, + "nbformat": { + "hashes": [ + "sha256:b516788ad70771c6250977c1374fcca6edebe6126fd2adb5a69aa5c2356fd1c8", + "sha256:eb8447edd7127d043361bc17f2f5a807626bc8e878c7709a1c647abda28a9171" + ], + "version": "==5.1.3" + }, + "nest-asyncio": { + "hashes": [ + "sha256:76d6e972265063fe92a90b9cc4fb82616e07d586b346ed9d2c89a4187acea39c", + "sha256:afc5a1c515210a23c461932765691ad39e8eba6551c055ac8d5546e69250d0aa" + ], + "version": "==1.5.1" + }, + "notebook": { + "hashes": [ + "sha256:9c4625e2a2aa49d6eae4ce20cbc3d8976db19267e32d2a304880e0c10bf8aef9", + "sha256:f7f0a71a999c7967d9418272ae4c3378a220bd28330fbfb49860e46cf8a5838a" + ], + "version": "==6.4.0" + }, + "packaging": { + "hashes": [ + "sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7", + "sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14" + ], + "version": "==21.0" + }, + "pandocfilters": { + "hashes": [ + "sha256:bc63fbb50534b4b1f8ebe1860889289e8af94a23bff7445259592df25a3906eb" + ], + "version": "==1.4.3" + }, + "parso": { + "hashes": [ + "sha256:12b83492c6239ce32ff5eed6d3639d6a536170723c6f3f1506869f1ace413398", + "sha256:a8c4922db71e4fdb90e0d0bc6e50f9b273d3397925e5e60a717e719201778d22" + ], + "version": "==0.8.2" + }, + "pexpect": { + "hashes": [ + "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937", + "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" + ], + "markers": "sys_platform != 'win32'", + "version": "==4.8.0" + }, + "pickleshare": { + "hashes": [ + "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca", + "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56" + ], + "version": "==0.7.5" + }, + "prometheus-client": { + "hashes": [ + "sha256:3a8baade6cb80bcfe43297e33e7623f3118d660d41387593758e2fb1ea173a86", + "sha256:b014bc76815eb1399da8ce5fc84b7717a3e63652b0c0f8804092c9363acab1b2" + ], + "version": "==0.11.0" + }, + "prompt-toolkit": { + "hashes": [ + "sha256:08360ee3a3148bdb5163621709ee322ec34fc4375099afa4bbf751e9b7b7fa4f", + "sha256:7089d8d2938043508aa9420ec18ce0922885304cddae87fb96eebca942299f88" + ], + "version": "==3.0.19" + }, + "ptyprocess": { + "hashes": [ + "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", + "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + ], + "version": "==0.7.0" + }, + "pycparser": { + "hashes": [ + "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0", + "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705" + ], + "version": "==2.20" + }, + "pygments": { + "hashes": [ + "sha256:a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f", + "sha256:d66e804411278594d764fc69ec36ec13d9ae9147193a1740cd34d272ca383b8e" + ], + "version": "==2.9.0" + }, + "pyparsing": { + "hashes": [ + "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", + "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" + ], + "version": "==2.4.7" + }, + "pyrsistent": { + "hashes": [ + "sha256:097b96f129dd36a8c9e33594e7ebb151b1515eb52cceb08474c10a5479e799f2", + "sha256:2aaf19dc8ce517a8653746d98e962ef480ff34b6bc563fc067be6401ffb457c7", + "sha256:404e1f1d254d314d55adb8d87f4f465c8693d6f902f67eb6ef5b4526dc58e6ea", + "sha256:48578680353f41dca1ca3dc48629fb77dfc745128b56fc01096b2530c13fd426", + "sha256:4916c10896721e472ee12c95cdc2891ce5890898d2f9907b1b4ae0f53588b710", + "sha256:527be2bfa8dc80f6f8ddd65242ba476a6c4fb4e3aedbf281dfbac1b1ed4165b1", + "sha256:58a70d93fb79dc585b21f9d72487b929a6fe58da0754fa4cb9f279bb92369396", + "sha256:5e4395bbf841693eaebaa5bb5c8f5cdbb1d139e07c975c682ec4e4f8126e03d2", + "sha256:6b5eed00e597b5b5773b4ca30bd48a5774ef1e96f2a45d105db5b4ebb4bca680", + "sha256:73ff61b1411e3fb0ba144b8f08d6749749775fe89688093e1efef9839d2dcc35", + "sha256:772e94c2c6864f2cd2ffbe58bb3bdefbe2a32afa0acb1a77e472aac831f83427", + "sha256:773c781216f8c2900b42a7b638d5b517bb134ae1acbebe4d1e8f1f41ea60eb4b", + "sha256:a0c772d791c38bbc77be659af29bb14c38ced151433592e326361610250c605b", + "sha256:b29b869cf58412ca5738d23691e96d8aff535e17390128a1a52717c9a109da4f", + "sha256:c1a9ff320fa699337e05edcaae79ef8c2880b52720bc031b219e5b5008ebbdef", + "sha256:cd3caef37a415fd0dae6148a1b6957a8c5f275a62cca02e18474608cb263640c", + "sha256:d5ec194c9c573aafaceebf05fc400656722793dac57f254cd4741f3c27ae57b4", + "sha256:da6e5e818d18459fa46fac0a4a4e543507fe1110e808101277c5a2b5bab0cd2d", + "sha256:e79d94ca58fcafef6395f6352383fa1a76922268fa02caa2272fff501c2fdc78", + "sha256:f3ef98d7b76da5eb19c37fda834d50262ff9167c65658d1d8f974d2e4d90676b", + "sha256:f4c8cabb46ff8e5d61f56a037974228e978f26bfefce4f61a4b1ac0ba7a2ab72" + ], + "version": "==0.18.0" + }, + "python-dateutil": { + "hashes": [ + "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", + "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" + ], + "version": "==2.8.1" + }, + "pyzmq": { + "hashes": [ + "sha256:089b974ec04d663b8685ac90e86bfe0e4da9d911ff3cf52cb765ff22408b102d", + "sha256:0ea7f4237991b0f745a4432c63e888450840bf8cb6c48b93fb7d62864f455529", + "sha256:0f0f27eaab9ba7b92d73d71c51d1a04464a1da6097a252d007922103253d2313", + "sha256:12ffcf33db6ba7c0e5aaf901e65517f5e2b719367b80bcbfad692f546a297c7a", + "sha256:1389b615917d4196962a9b469e947ba862a8ec6f5094a47da5e7a8d404bc07a4", + "sha256:18dd2ca4540c476558099891c129e6f94109971d110b549db2a9775c817cedbd", + "sha256:24fb5bb641f0b2aa25fc3832f4b6fc62430f14a7d328229fe994b2bcdc07c93a", + "sha256:285514956c08c7830da9d94e01f5414661a987831bd9f95e4d89cc8aaae8da10", + "sha256:41049cff5265e9cd75606aa2c90a76b9c80b98d8fe70ee08cf4af3cedb113358", + "sha256:461ed80d741692d9457ab820b1cc057ba9c37c394e67b647b639f623c8b321f6", + "sha256:4b8fb1b3174b56fd020e4b10232b1764e52cf7f3babcfb460c5253bdc48adad0", + "sha256:4c4fe69c7dc0d13d4ae180ad650bb900854367f3349d3c16f0569f6c6447f698", + "sha256:4e9b9a2f6944acdaf57316436c1acdcb30b8df76726bcf570ad9342bc5001654", + "sha256:6355f81947e1fe6e7bb9e123aeb3067264391d3ebe8402709f824ef8673fa6f3", + "sha256:68be16107f41563b9f67d93dff1c9f5587e0f76aa8fd91dc04c83d813bcdab1f", + "sha256:68e2c4505992ab5b89f976f89a9135742b18d60068f761bef994a6805f1cae0c", + "sha256:7040d6dd85ea65703904d023d7f57fab793d7ffee9ba9e14f3b897f34ff2415d", + "sha256:734ea6565c71fc2d03d5b8c7d0d7519c96bb5567e0396da1b563c24a4ac66f0c", + "sha256:9ee48413a2d3cd867fd836737b4c89c24cea1150a37f4856d82d20293fa7519f", + "sha256:a1c77796f395804d6002ff56a6a8168c1f98579896897ad7e35665a9b4a9eec5", + "sha256:b2f707b52e09098a7770503e39294ca6e22ae5138ffa1dd36248b6436d23d78e", + "sha256:bf80b2cec42d96117248b99d3c86e263a00469c840a778e6cb52d916f4fdf82c", + "sha256:c4674004ed64685a38bee222cd75afa769424ec603f9329f0dd4777138337f48", + "sha256:c6a81c9e6754465d09a87e3acd74d9bb1f0039b2d785c6899622f0afdb41d760", + "sha256:c6d0c32532a0519997e1ded767e184ebb8543bdb351f8eff8570bd461e874efc", + "sha256:c8fff75af4c7af92dce9f81fa2a83ed009c3e1f33ee8b5222db2ef80b94e242e", + "sha256:cb9f9fe1305ef69b65794655fd89b2209b11bff3e837de981820a8aa051ef914", + "sha256:d3ecfee2ee8d91ab2e08d2d8e89302c729b244e302bbc39c5b5dde42306ff003", + "sha256:d5e5be93e1714a59a535bbbc086b9e4fd2448c7547c5288548f6fd86353cad9e", + "sha256:de5806be66c9108e4dcdaced084e8ceae14100aa559e2d57b4f0cceb98c462de", + "sha256:f49755684a963731479ff3035d45a8185545b4c9f662d368bd349c419839886d", + "sha256:fc712a90401bcbf3fa25747f189d6dcfccbecc32712701cad25c6355589dac57" + ], + "version": "==22.1.0" + }, + "qtconsole": { + "hashes": [ + "sha256:73994105b0369bb99f4164df4a131010f3c7b33a7b5169c37366358d8744675b", + "sha256:bbc34bca14f65535afcb401bc74b752bac955e5313001ba640383f7e5857dc49" + ], + "version": "==5.1.1" + }, + "qtpy": { + "hashes": [ + "sha256:2db72c44b55d0fe1407be8fba35c838ad0d6d3bb81f23007886dc1fc0f459c8d", + "sha256:fa0b8363b363e89b2a6f49eddc162a04c0699ae95e109a6be3bb145a913190ea" + ], + "version": "==1.9.0" + }, + "send2trash": { + "hashes": [ + "sha256:17730aa0a33ab82ed6ca76be3bb25f0433d0014f1ccf63c979bab13a5b9db2b2", + "sha256:c20fee8c09378231b3907df9c215ec9766a84ee20053d99fbad854fe8bd42159" + ], + "version": "==1.7.1" + }, + "six": { + "hashes": [ + "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", + "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" + ], + "version": "==1.16.0" + }, + "terminado": { + "hashes": [ + "sha256:89d5dac2f4e2b39758a0ff9a3b643707c95a020a6df36e70583b88297cd59cbe", + "sha256:c89ace5bffd0e7268bdcf22526830eb787fd146ff9d78691a0528386f92b9ae3" + ], + "version": "==0.10.1" + }, + "testpath": { + "hashes": [ + "sha256:1acf7a0bcd3004ae8357409fc33751e16d37ccc650921da1094a86581ad1e417", + "sha256:8044f9a0bab6567fc644a3593164e872543bb44225b0e24846e2c89237937589" + ], + "version": "==0.5.0" + }, + "tornado": { + "hashes": [ + "sha256:0a00ff4561e2929a2c37ce706cb8233b7907e0cdc22eab98888aca5dd3775feb", + "sha256:0d321a39c36e5f2c4ff12b4ed58d41390460f798422c4504e09eb5678e09998c", + "sha256:1e8225a1070cd8eec59a996c43229fe8f95689cb16e552d130b9793cb570a288", + "sha256:20241b3cb4f425e971cb0a8e4ffc9b0a861530ae3c52f2b0434e6c1b57e9fd95", + "sha256:25ad220258349a12ae87ede08a7b04aca51237721f63b1808d39bdb4b2164558", + "sha256:33892118b165401f291070100d6d09359ca74addda679b60390b09f8ef325ffe", + "sha256:33c6e81d7bd55b468d2e793517c909b139960b6c790a60b7991b9b6b76fb9791", + "sha256:3447475585bae2e77ecb832fc0300c3695516a47d46cefa0528181a34c5b9d3d", + "sha256:34ca2dac9e4d7afb0bed4677512e36a52f09caa6fded70b4e3e1c89dbd92c326", + "sha256:3e63498f680547ed24d2c71e6497f24bca791aca2fe116dbc2bd0ac7f191691b", + "sha256:548430be2740e327b3fe0201abe471f314741efcb0067ec4f2d7dcfb4825f3e4", + "sha256:6196a5c39286cc37c024cd78834fb9345e464525d8991c21e908cc046d1cc02c", + "sha256:61b32d06ae8a036a6607805e6720ef00a3c98207038444ba7fd3d169cd998910", + "sha256:6286efab1ed6e74b7028327365cf7346b1d777d63ab30e21a0f4d5b275fc17d5", + "sha256:65d98939f1a2e74b58839f8c4dab3b6b3c1ce84972ae712be02845e65391ac7c", + "sha256:66324e4e1beede9ac79e60f88de548da58b1f8ab4b2f1354d8375774f997e6c0", + "sha256:6c77c9937962577a6a76917845d06af6ab9197702a42e1346d8ae2e76b5e3675", + "sha256:70dec29e8ac485dbf57481baee40781c63e381bebea080991893cd297742b8fd", + "sha256:7250a3fa399f08ec9cb3f7b1b987955d17e044f1ade821b32e5f435130250d7f", + "sha256:748290bf9112b581c525e6e6d3820621ff020ed95af6f17fedef416b27ed564c", + "sha256:7da13da6f985aab7f6f28debab00c67ff9cbacd588e8477034c0652ac141feea", + "sha256:8f959b26f2634a091bb42241c3ed8d3cedb506e7c27b8dd5c7b9f745318ddbb6", + "sha256:9de9e5188a782be6b1ce866e8a51bc76a0fbaa0e16613823fc38e4fc2556ad05", + "sha256:a48900ecea1cbb71b8c71c620dee15b62f85f7c14189bdeee54966fbd9a0c5bd", + "sha256:b87936fd2c317b6ee08a5741ea06b9d11a6074ef4cc42e031bc6403f82a32575", + "sha256:c77da1263aa361938476f04c4b6c8916001b90b2c2fdd92d8d535e1af48fba5a", + "sha256:cb5ec8eead331e3bb4ce8066cf06d2dfef1bfb1b2a73082dfe8a161301b76e37", + "sha256:cc0ee35043162abbf717b7df924597ade8e5395e7b66d18270116f8745ceb795", + "sha256:d14d30e7f46a0476efb0deb5b61343b1526f73ebb5ed84f23dc794bdb88f9d9f", + "sha256:d371e811d6b156d82aa5f9a4e08b58debf97c302a35714f6f45e35139c332e32", + "sha256:d3d20ea5782ba63ed13bc2b8c291a053c8d807a8fa927d941bd718468f7b950c", + "sha256:d3f7594930c423fd9f5d1a76bee85a2c36fd8b4b16921cae7e965f22575e9c01", + "sha256:dcef026f608f678c118779cd6591c8af6e9b4155c44e0d1bc0c87c036fb8c8c4", + "sha256:e0791ac58d91ac58f694d8d2957884df8e4e2f6687cdf367ef7eb7497f79eaa2", + "sha256:e385b637ac3acaae8022e7e47dfa7b83d3620e432e3ecb9a3f7f58f150e50921", + "sha256:e519d64089b0876c7b467274468709dadf11e41d65f63bba207e04217f47c085", + "sha256:e7229e60ac41a1202444497ddde70a48d33909e484f96eb0da9baf8dc68541df", + "sha256:ed3ad863b1b40cd1d4bd21e7498329ccaece75db5a5bf58cd3c9f130843e7102", + "sha256:f0ba29bafd8e7e22920567ce0d232c26d4d47c8b5cf4ed7b562b5db39fa199c5", + "sha256:fa2ba70284fa42c2a5ecb35e322e68823288a4251f9ba9cc77be04ae15eada68", + "sha256:fba85b6cd9c39be262fcd23865652920832b61583de2a2ca907dbd8e8a8c81e5" + ], + "version": "==6.1" + }, + "traitlets": { + "hashes": [ + "sha256:178f4ce988f69189f7e523337a3e11d91c786ded9360174a3d9ca83e79bc5396", + "sha256:69ff3f9d5351f31a7ad80443c2674b7099df13cc41fc5fa6e2f6d3b0330b0426" + ], + "version": "==5.0.5" + }, + "wcwidth": { + "hashes": [ + "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784", + "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83" + ], + "version": "==0.2.5" + }, + "webencodings": { + "hashes": [ + "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78", + "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + ], + "version": "==0.5.1" + }, + "widgetsnbextension": { + "hashes": [ + "sha256:079f87d87270bce047512400efd70238820751a11d2d8cb137a5a5bdbaf255c7", + "sha256:bd314f8ceb488571a5ffea6cc5b9fc6cba0adaf88a9d2386b93a489751938bcd" + ], + "version": "==3.5.1" + } + }, + "develop": {} +} diff --git a/binder/Project.toml b/binder/Project.toml new file mode 100644 index 0000000..d15d26d --- /dev/null +++ b/binder/Project.toml @@ -0,0 +1,5 @@ +[deps] +Gadfly = "c91e804a-d5a3-530f-b6f0-dfbca275c004" +IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" +NBInclude = "0db19996-df87-5ea3-a455-e3a50d440464" +PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" diff --git a/binder/postBuild b/binder/postBuild new file mode 100755 index 0000000..c35ea52 --- /dev/null +++ b/binder/postBuild @@ -0,0 +1,7 @@ +#!/bin/bash + +#Install Python part of PyCall +pip install julia==0.5.6 +python -c "import julia; julia.install()" + + diff --git a/dimu/.ipynb_checkpoints/diMuon-TTree-py-checkpoint.ipynb b/dimu/.ipynb_checkpoints/diMuon-TTree-py-checkpoint.ipynb deleted file mode 100644 index 7f0337b..0000000 --- a/dimu/.ipynb_checkpoints/diMuon-TTree-py-checkpoint.ipynb +++ /dev/null @@ -1,211 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "473d7730", - "metadata": {}, - "source": [ - "We will use ROOT and numpy." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "occasional-sensitivity", - "metadata": {}, - "outputs": [], - "source": [ - "import ROOT as R\n", - "#import numpy as np" - ] - }, - { - "cell_type": "markdown", - "id": "5adf7d10", - "metadata": {}, - "source": [ - "### Input file" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "e680c730", - "metadata": {}, - "outputs": [], - "source": [ - "fname = \"Run2012BC_DoubleMuParked_Muons.root\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "amazing-hearts", - "metadata": {}, - "outputs": [], - "source": [ - "f = TTFile(\"fname\")" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "interim-paradise", - "metadata": {}, - "outputs": [], - "source": [ - "tree = f.Events" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fossil-footwear", - "metadata": { - "deletable": false, - "editable": false, - "run_control": { - "frozen": true - }, - "scrolled": false - }, - "outputs": [], - "source": [ - "tree.Print()" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "racial-outline", - "metadata": {}, - "outputs": [], - "source": [ - "def select(event):\n", - " return event.nMuon == 2 \\\n", - " and event.Muon_charge[0] != event.Muon_charge[1]\n", - " \n", - "def dimu_mass(event):\n", - " p = [ R.Math.PtEtaPhiMVector(event.Muon_pt[i], event.Muon_eta[i], \n", - " event.Muon_phi[i], event.Muon_mass[i]) for i in range(2) ]\n", - " return (p[0] + p[1]).M()\n", - " " - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "subjective-turkey", - "metadata": {}, - "outputs": [], - "source": [ - "bins = 30000 # Number of bins in the histogram\n", - "low = 0.25 # Lower edge of the histogram\n", - "up = 300.0 # Upper edge of the histogram\n", - "hmass = R.TH1D(\"hmass\", \"Dimuon mass\", bins, low, up)" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "adult-mambo", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "CPU times: user 4h 53min 40s, sys: 50.9 s, total: 4h 54min 31s\n", - "Wall time: 4h 54min 20s\n" - ] - } - ], - "source": [ - "%%time\n", - "for e in tree:\n", - " if select(e):\n", - " hmass.Fill(dimu_mass(e))" - ] - }, - { - "cell_type": "markdown", - "id": "superb-homework", - "metadata": {}, - "source": [ - "CPU times: user 4h 53min 40s, sys: 50.9 s, total: 4h 54min 31s\n", - "Wall time: 4h 54min 20s" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "cathedral-disposal", - "metadata": {}, - "outputs": [], - "source": [ - "R.gStyle.SetOptStat(0)\n", - "R.gStyle.SetTextFont(42)\n", - "c = R.TCanvas(\"c\", \"\", 800, 700)\n", - "c.SetLogx()\n", - "c.SetLogy();" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "sustained-substance", - "metadata": {}, - "outputs": [], - "source": [ - "label = ROOT.TLatex()\n", - "label.SetTextAlign(22)\n", - "label.DrawLatex(0.55, 3.0e4, \"#eta\")\n", - "label.DrawLatex(0.77, 7.0e4, \"#rho,#omega\")\n", - "label.DrawLatex(1.20, 4.0e4, \"#phi\")\n", - "label.DrawLatex(4.40, 1.0e5, \"J/#psi\")\n", - "label.DrawLatex(4.60, 1.0e4, \"#psi'\")\n", - "label.DrawLatex(12.0, 2.0e4, \"Y(1,2,3S)\")\n", - "label.DrawLatex(91.0, 1.5e4, \"Z\")\n", - "label.SetNDC(True)\n", - "label.SetTextAlign(11)\n", - "label.SetTextSize(0.04)\n", - "label.DrawLatex(0.10, 0.92, \"#bf{CMS Open Data}\")\n", - "label.SetTextAlign(31)\n", - "label.DrawLatex(0.90, 0.92, \"#sqrt{s} = 8 TeV, L_{int} = 11.6 fb^{-1}\");" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "cooked-superintendent", - "metadata": {}, - "outputs": [], - "source": [ - "%%time\n", - "#%jsroot on\n", - "c.Draw()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.2" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/dimu/.ipynb_checkpoints/diMuon-bin-jl-checkpoint.ipynb b/dimu/.ipynb_checkpoints/diMuon-bin-jl-checkpoint.ipynb deleted file mode 100644 index 3309daa..0000000 --- a/dimu/.ipynb_checkpoints/diMuon-bin-jl-checkpoint.ipynb +++ /dev/null @@ -1,276 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "7f392f56-ce7e-44e0-877d-c044392970dc", - "metadata": {}, - "source": [ - "# CMS Dimuon spectrum analyis in Julia\n", - "\n", - "Analysis running time: 25.6 s on my Laptop (i7-8550U CPU @ 1.80GHz, 4 cores, 8 GByte RAM, with SSD). The Python version took 4h54mn. RDataframe with Cling or Numba takes takes less time, but still long than Julia.\n" - ] - }, - { - "cell_type": "markdown", - "id": "1beb0e7a-ad3c-4f5d-acba-701fe0b2feb8", - "metadata": {}, - "source": [ - "# Analysis of the di-muon spectrum using data from the CMS detector\n", - "\n", - "This analysis takes data from the CMS experiment recorded in 2012 during Run B and C and extracts the di-muon spectrum. The di-muon spectrum is computed from the data by calculating the invariant mass of muon pairs with opposite charge. In the resulting plot, you are able to rediscover particle resonances in a wide energy range from the [eta meson](https://en.wikipedia.org/wiki/Eta_meson) at about 548 MeV up to the [Z boson](https://en.wikipedia.org/wiki/W_and_Z_bosons) at about 91 GeV.\n", - "\n", - "The analysis code opens an interactive plot, which allows to zoom and navigate in the spectrum. Note that the bump at 30 GeV is not a resonance but an effect of the data taking due to the used trigger. The technical description of the dataset can be found in the respective record linked below.\n", - "\n", - "The result of this analysis can be compared with [an official result of the CMS collaboration using data taken in 2010](https://cds.cern.ch/record/1456510), see the plot below:\n", - "\n", - "![](http://cds.cern.ch/record/1456510/files/pictures_samples_dimuonSpectrum_40pb-1_mod-combined.png)" - ] - }, - { - "cell_type": "markdown", - "id": "77ca9f8c-191b-40b2-a304-cd4ff56d0398", - "metadata": {}, - "source": [ - "# Dataset description\n", - "\n", - "The dataset consists of the following columns.\n", - "\n", - "| Column name | Data type | Description |\n", - "|-------------|-----------|-------------|\n", - "| `nMuon` | `unsigned int` | Number of muons in this event |\n", - "| `Muon_pt` | `float[nMuon]` | Transverse momentum of the muons (stored as an array of size `nMuon`) |\n", - "| `Muon_eta` | `float[nMuon]` | Pseudorapidity of the muons |\n", - "| `Muon_phi` | `float[nMuon]` | Azimuth of the muons |\n", - "| `Muon_mass` | `float[nMuon]` | Mass of the muons |\n", - "| `Muon_charge` | `int[nMuon]` | Charge of the muons (either 1 or -1) |" - ] - }, - { - "cell_type": "markdown", - "id": "2e2264ef", - "metadata": {}, - "source": [ - "## Some utilities we will need\n", - "\n", - "Define four-momentum and histogram tools" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "1586f179-4745-40a9-9b0a-39181b5dc3f0", - "metadata": {}, - "outputs": [], - "source": [ - "using NBInclude\n", - "@nbinclude(\"JuliaUtils.ipynb\")" - ] - }, - { - "cell_type": "markdown", - "id": "33185ba2-9f9e-4f0a-8d5d-b8942602163c", - "metadata": {}, - "source": [ - "## Download the data file\n", - "\n", - "To run this example, you need to download the file from [here](https://cernbox.cern.ch/index.php/s/pUf8RIQAGOELXVG) and save it with the name ``Muons.bin`` in the dimu directory containing this notebook. The file is 3.3GByte large." - ] - }, - { - "cell_type": "markdown", - "id": "de9d0bed", - "metadata": {}, - "source": [ - "## Function to read the data" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "id": "adopted-rwanda", - "metadata": {}, - "outputs": [], - "source": [ - "function read(func, fname, maxevents = -1)\n", - " ievt = fill(zero(Int32), (1))\n", - " nMuon = fill(zero(Int32), (1))\n", - " arr_size = 100\n", - " Muon = fill((; pt=zero(Float32), eta=zero(Float32), phi=zero(Float32), mass=zero(Float32), charge=zero(Int32)), (arr_size))\n", - " evtcnt = 0\n", - " open(fname) do io\n", - " while !eof(io) && (maxevents < 0 || evtcnt < maxevents)\n", - " n = read!(io, ievt)\n", - " if ievt[1] != evtcnt \n", - " error(\"Error while reading the file. $(ievt[1]) != $evtcnt\")\n", - " end\n", - " read!(io, nMuon)\n", - " if nMuon[1] > length(Muon)\n", - " resize!(Muon, nMuon[1])\n", - " end\n", - " Muon_ = @view(Muon[1:nMuon[1]])\n", - " read!(io, Muon_)\n", - " func(Muon_)\n", - " evtcnt = evtcnt + 1\n", - " end\n", - " end\n", - "end\n", - ";" - ] - }, - { - "cell_type": "markdown", - "id": "de45313d", - "metadata": {}, - "source": [ - "## The dimuon analysis\n", - "\n", - "We loop on the events. The input file contains the muon collection of the event \n", - "that we retrieve with the `read` method. Below the function that peforms this loop." - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "duplicate-treaty", - "metadata": {}, - "outputs": [], - "source": [ - "function ana()\n", - " bins = 30_000 # Number of bins in the histogram\n", - " low = 0.25 # Lower edge of the histogram\n", - " up = 300.0 # Upper edge of the histogram\n", - " h = H1{Float64}(Axis(bins, low, up))\n", - " nPairs = 0\n", - " read(\"Muons.bin\", -1) do muons\n", - " length(muons) == 2 || return\n", - " muons[1].charge != muons[2].charge || return\n", - " dimuon_mass = m(ptetaphim(muons[1].pt, muons[1].eta, muons[1].phi, muons[1].mass)\n", - " + ptetaphim(muons[2].pt, muons[2].eta, muons[2].phi, muons[2].mass))\n", - " hfill!(h, dimuon_mass)\n", - " end\n", - " return h\n", - "end\n", - ";" - ] - }, - { - "cell_type": "markdown", - "id": "opening-husband", - "metadata": {}, - "source": [ - " \n", - "### Notice the `do` construct in the above 💡\n", - "\n", - "The first parameter of the `read` method is a function and was omitted in the code above. The `do` operator constructs a lambda function that is passed as first parameter of the function.\n", - "\n", - "In Julia,\n", - "\n", - "```julia\n", - "map(v) do x\n", - " 2x\n", - "end```\n", - "\n", - "is equivalent to\n", - "\n", - "```julia\n", - "map(x->2x, v)\n", - "```\n", - "that will be implemented in Python as:\n", - "\n", - "```python\n", - "map(lambda: x->2x, v)\n", - "````\n", - "\n", - "and in modern c++\n", - "\n", - "```c++\n", - "map([](auto x){return 2*x;}, v)\n", - "```\n", - "\n", - "It provides a neat construct by moving the lambda function definition out of the parenthesis. It's used in place of the ''with'' Python constructs: ``with open(\"file\") as io`` ⇒ ``open(\"file\") do io``" - ] - }, - { - "cell_type": "markdown", - "id": "9af64a7c", - "metadata": {}, - "source": [ - "Let's time the analysis that took 4h 54min in Python on the same laptop I'm using now." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "independent-timeline", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "@time h=ana();" - ] - }, - { - "cell_type": "markdown", - "id": "7c9632ca-be11-4583-a3c5-a3ef31549938", - "metadata": {}, - "source": [ - "# Let's make the plot\n", - "\n", - "Julia has many plotting packages. The Gadfly package provides a common front-end to the different packages allowing easy switch from one package to another and promoting interface standardisation." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "small-faith", - "metadata": { - "code_folding": [], - "run_control": { - "marked": false - } - }, - "outputs": [], - "source": [ - "import Gadfly as gf\n", - "p = gf.plot(x=xedges(h), y=vcat(h.sumw[2:end-1], [h.sumw[end-1]]), gf.Geom.step, \n", - " gf.Scale.x_log10(minvalue=0.25, maxvalue=300.), gf.Scale.y_log10,\n", - " gf.Guide.xlabel(\"Dimuon mass\"), gf.Guide.ylabel(\"Event count\"))" - ] - }, - { - "cell_type": "markdown", - "id": "9218d655", - "metadata": {}, - "source": [ - "## Dataframe\n", - "\n", - "⚡ Julia support also DataFrame and an equivalent of Dask, so the analysis could also have been done with DataFrames. ⚡" - ] - }, - { - "cell_type": "markdown", - "id": "77470d07-7005-4bbb-a5fe-99be0e3d3423", - "metadata": {}, - "source": [ - "[back to the presentation](01-Julia-dream-PyHEP2021.ipynb)" - ] - } - ], - "metadata": { - "celltoolbar": "Edit Metadata", - "kernelspec": { - "display_name": "Julia 1.6.1", - "language": "julia", - "name": "julia-1.6" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.6.1" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/dimu/JuliaUtils.ipynb b/dimu/JuliaUtils.ipynb index 4549542..01679d6 100644 --- a/dimu/JuliaUtils.ipynb +++ b/dimu/JuliaUtils.ipynb @@ -18,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "ae8e82d5-65cb-48ac-9204-89d38a36d472", "metadata": { "code_folding": [], @@ -28,7 +28,18 @@ "scrolled": true, "tags": [] }, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "+ (generic function with 191 methods)" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "struct P4{T}\n", " px::T\n", @@ -52,7 +63,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "7c976e69-af24-4546-989e-4c2ce5793b4e", "metadata": {}, "outputs": [], @@ -62,7 +73,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 3, "id": "e476f511-9809-44d6-8181-5e23696291f5", "metadata": { "scrolled": true @@ -122,7 +133,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "id": "768e9e14-4aa7-44d1-aec8-2c10962e48e4", "metadata": {}, "outputs": [], @@ -150,6 +161,7 @@ " ibin = binOf(h.xaxis, x)\n", " h.sumw[ibin] += w\n", " h.sumw2[ibin] += w*w\n", + " h.entries += 1.\n", "end\n", " \n", "\"\"\"\n", diff --git a/dimu/diMuon-TTree-py.ipynb b/dimu/diMuon-TTree-py.ipynb deleted file mode 100644 index 7f0337b..0000000 --- a/dimu/diMuon-TTree-py.ipynb +++ /dev/null @@ -1,211 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "473d7730", - "metadata": {}, - "source": [ - "We will use ROOT and numpy." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "occasional-sensitivity", - "metadata": {}, - "outputs": [], - "source": [ - "import ROOT as R\n", - "#import numpy as np" - ] - }, - { - "cell_type": "markdown", - "id": "5adf7d10", - "metadata": {}, - "source": [ - "### Input file" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "e680c730", - "metadata": {}, - "outputs": [], - "source": [ - "fname = \"Run2012BC_DoubleMuParked_Muons.root\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "amazing-hearts", - "metadata": {}, - "outputs": [], - "source": [ - "f = TTFile(\"fname\")" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "interim-paradise", - "metadata": {}, - "outputs": [], - "source": [ - "tree = f.Events" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fossil-footwear", - "metadata": { - "deletable": false, - "editable": false, - "run_control": { - "frozen": true - }, - "scrolled": false - }, - "outputs": [], - "source": [ - "tree.Print()" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "racial-outline", - "metadata": {}, - "outputs": [], - "source": [ - "def select(event):\n", - " return event.nMuon == 2 \\\n", - " and event.Muon_charge[0] != event.Muon_charge[1]\n", - " \n", - "def dimu_mass(event):\n", - " p = [ R.Math.PtEtaPhiMVector(event.Muon_pt[i], event.Muon_eta[i], \n", - " event.Muon_phi[i], event.Muon_mass[i]) for i in range(2) ]\n", - " return (p[0] + p[1]).M()\n", - " " - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "subjective-turkey", - "metadata": {}, - "outputs": [], - "source": [ - "bins = 30000 # Number of bins in the histogram\n", - "low = 0.25 # Lower edge of the histogram\n", - "up = 300.0 # Upper edge of the histogram\n", - "hmass = R.TH1D(\"hmass\", \"Dimuon mass\", bins, low, up)" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "adult-mambo", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "CPU times: user 4h 53min 40s, sys: 50.9 s, total: 4h 54min 31s\n", - "Wall time: 4h 54min 20s\n" - ] - } - ], - "source": [ - "%%time\n", - "for e in tree:\n", - " if select(e):\n", - " hmass.Fill(dimu_mass(e))" - ] - }, - { - "cell_type": "markdown", - "id": "superb-homework", - "metadata": {}, - "source": [ - "CPU times: user 4h 53min 40s, sys: 50.9 s, total: 4h 54min 31s\n", - "Wall time: 4h 54min 20s" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "cathedral-disposal", - "metadata": {}, - "outputs": [], - "source": [ - "R.gStyle.SetOptStat(0)\n", - "R.gStyle.SetTextFont(42)\n", - "c = R.TCanvas(\"c\", \"\", 800, 700)\n", - "c.SetLogx()\n", - "c.SetLogy();" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "sustained-substance", - "metadata": {}, - "outputs": [], - "source": [ - "label = ROOT.TLatex()\n", - "label.SetTextAlign(22)\n", - "label.DrawLatex(0.55, 3.0e4, \"#eta\")\n", - "label.DrawLatex(0.77, 7.0e4, \"#rho,#omega\")\n", - "label.DrawLatex(1.20, 4.0e4, \"#phi\")\n", - "label.DrawLatex(4.40, 1.0e5, \"J/#psi\")\n", - "label.DrawLatex(4.60, 1.0e4, \"#psi'\")\n", - "label.DrawLatex(12.0, 2.0e4, \"Y(1,2,3S)\")\n", - "label.DrawLatex(91.0, 1.5e4, \"Z\")\n", - "label.SetNDC(True)\n", - "label.SetTextAlign(11)\n", - "label.SetTextSize(0.04)\n", - "label.DrawLatex(0.10, 0.92, \"#bf{CMS Open Data}\")\n", - "label.SetTextAlign(31)\n", - "label.DrawLatex(0.90, 0.92, \"#sqrt{s} = 8 TeV, L_{int} = 11.6 fb^{-1}\");" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "cooked-superintendent", - "metadata": {}, - "outputs": [], - "source": [ - "%%time\n", - "#%jsroot on\n", - "c.Draw()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.2" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/dimu/diMuon-bin-jl.ipynb b/dimu/diMuon-bin-jl.ipynb index 64ea8d5..8a7ce41 100644 --- a/dimu/diMuon-bin-jl.ipynb +++ b/dimu/diMuon-bin-jl.ipynb @@ -57,7 +57,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 1, "id": "1586f179-4745-40a9-9b0a-39181b5dc3f0", "metadata": {}, "outputs": [], @@ -73,7 +73,17 @@ "source": [ "## Download the data file\n", "\n", - "To run this example, you need to download the file from [here](https://cernbox.cern.ch/index.php/s/pUf8RIQAGOELXVG) and save it with the name ``Muons.bin`` in the dimu directory containing this notebook. The file is 3.3GByte large." + "To run this example, we need to download the CMS data file from [here](https://zenodo.org/record/5091596/files/Muons.bin?download=1) and save it with the name ``Muons.bin`` in the dimu directory containing this notebook. The file is 3.3 GByte big." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "3368a5f0-2f28-4355-b42c-2dee3aa507fc", + "metadata": {}, + "outputs": [], + "source": [ + "run(`wget --progress dot:giga -O Muons.bin \"https://zenodo.org/record/5091596/files/Muons.bin?download=1\"`)" ] }, { @@ -86,7 +96,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 3, "id": "adopted-rwanda", "metadata": {}, "outputs": [], @@ -130,7 +140,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 4, "id": "duplicate-treaty", "metadata": {}, "outputs": [], @@ -195,12 +205,12 @@ "id": "9af64a7c", "metadata": {}, "source": [ - "Let's time the analysis that took 4h 54min in Python on the same laptop I'm using now." + "Let's time the analysis that took 4h 54min in Python on the same laptop I'm using now. The file contains 61.5 million events." ] }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 5, "id": "independent-timeline", "metadata": { "tags": [] @@ -210,7 +220,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " 34.546842 seconds (326.23 M allocations: 6.696 GiB, 3.05% gc time)\n" + " 23.193814 seconds (326.23 M allocations: 6.696 GiB, 2.71% gc time, 0.02% compilation time)\n" ] } ], @@ -230,7 +240,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 6, "id": "small-faith", "metadata": { "code_folding": [], @@ -258,15 +268,15 @@ " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " Dimuon mass\n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " 10-1\n", @@ -293,61 +303,61 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", + " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", + " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -355,45 +365,45 @@ " \n", " \n", " \n", - " \n", - " \n", + " \n", + " \n", " \n", " 100\n", " \n", " \n", - " \n", + " \n", " \n", " 101\n", " \n", " \n", - " \n", + " \n", " \n", " 102\n", " \n", " \n", - " \n", + " \n", " \n", " 103\n", " \n", " \n", - " \n", + " \n", " \n", " 104\n", " \n", " \n", - " \n", + " \n", " \n", " 105\n", " \n", " \n", - " \n", + " \n", " \n", " 106\n", " \n", " \n", " \n", - " \n", - " \n", + " \n", + " \n", " \n", " Event count\n", " \n", @@ -401,7 +411,7 @@ " \n", "\n", "\n", - " \n", + " \n", " \n", " \n", "\n", @@ -419,21 +429,21 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-d76dd2bc\">\n", + " id=\"img-69b82557\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " Dimuon mass\n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " 10-6\n", @@ -960,842 +970,842 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", + " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", + " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", + " \n", + " \n", " \n", " h,j,k,l,arrows,drag to pan\n", " \n", " \n", - " \n", + " \n", " \n", " i,o,+,-,scroll,shift-drag to zoom\n", " \n", " \n", - " \n", + " \n", " \n", " r,dbl-click to reset\n", " \n", " \n", - " \n", + " \n", " \n", " c for coordinates\n", " \n", " \n", - " \n", + " \n", " \n", " ? for help\n", " \n", @@ -1803,9 +1813,9 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " ?\n", " \n", @@ -1814,775 +1824,775 @@ " \n", " \n", " \n", - " \n", - " \n", + " \n", + " \n", " \n", " 10-7\n", " \n", " \n", - " \n", + " \n", " \n", " 10-6\n", " \n", " \n", - " \n", + " \n", " \n", " 10-5\n", " \n", " \n", - " \n", + " \n", " \n", " 10-4\n", " \n", " \n", - " \n", + " \n", " \n", " 10-3\n", " \n", " \n", - " \n", + " \n", " \n", " 10-2\n", " \n", " \n", - " \n", + " \n", " \n", " 10-1\n", " \n", " \n", - " \n", + " \n", " \n", " 100\n", " \n", " \n", - " \n", + " \n", " \n", " 101\n", " \n", " \n", - " \n", + " \n", " \n", " 102\n", " \n", " \n", - " \n", + " \n", " \n", " 103\n", " \n", " \n", - " \n", + " \n", " \n", " 104\n", " \n", " \n", - " \n", + " \n", " \n", " 105\n", " \n", " \n", - " \n", + " \n", " \n", " 106\n", " \n", " \n", - " \n", + " \n", " \n", " 107\n", " \n", " \n", - " \n", + " \n", " \n", " 108\n", " \n", " \n", - " \n", + " \n", " \n", " 109\n", " \n", " \n", - " \n", + " \n", " \n", " 1010\n", " \n", " \n", - " \n", + " \n", " \n", " 1011\n", " \n", " \n", - " \n", + " \n", " \n", " 1012\n", " \n", " \n", - " \n", + " \n", " \n", " 1013\n", " \n", " \n", - " \n", + " \n", " \n", " 10-6.0\n", " \n", " \n", - " \n", + " \n", " \n", " 10-5.5\n", " \n", " \n", - " \n", + " \n", " \n", " 10-5.0\n", " \n", " \n", - " \n", + " \n", " \n", " 10-4.5\n", " \n", " \n", - " \n", + " \n", " \n", " 10-4.0\n", " \n", " \n", - " \n", + " \n", " \n", " 10-3.5\n", " \n", " \n", - " \n", + " \n", " \n", " 10-3.0\n", " \n", " \n", - " \n", + " \n", " \n", " 10-2.5\n", " \n", " \n", - " \n", + " \n", " \n", " 10-2.0\n", " \n", " \n", - " \n", + " \n", " \n", " 10-1.5\n", " \n", " \n", - " \n", + " \n", " \n", " 10-1.0\n", " \n", " \n", - " \n", + " \n", " \n", " 10-0.5\n", " \n", " \n", - " \n", + " \n", " \n", " 100.0\n", " \n", " \n", - " \n", + " \n", " \n", " 100.5\n", " \n", " \n", - " \n", + " \n", " \n", " 101.0\n", " \n", " \n", - " \n", + " \n", " \n", " 101.5\n", " \n", " \n", - " \n", + " \n", " \n", " 102.0\n", " \n", " \n", - " \n", + " \n", " \n", " 102.5\n", " \n", " \n", - " \n", + " \n", " \n", " 103.0\n", " \n", " \n", - " \n", + " \n", " \n", " 103.5\n", " \n", " \n", - " \n", + " \n", " \n", " 104.0\n", " \n", " \n", - " \n", + " \n", " \n", " 104.5\n", " \n", " \n", - " \n", + " \n", " \n", " 105.0\n", " \n", " \n", - " \n", + " \n", " \n", " 105.5\n", " \n", " \n", - " \n", + " \n", " \n", " 106.0\n", " \n", " \n", - " \n", + " \n", " \n", " 106.5\n", " \n", " \n", - " \n", + " \n", " \n", " 107.0\n", " \n", " \n", - " \n", + " \n", " \n", " 107.5\n", " \n", " \n", - " \n", + " \n", " \n", " 108.0\n", " \n", " \n", - " \n", + " \n", " \n", " 108.5\n", " \n", " \n", - " \n", + " \n", " \n", " 109.0\n", " \n", " \n", - " \n", + " \n", " \n", " 109.5\n", " \n", " \n", - " \n", + " \n", " \n", " 1010.0\n", " \n", " \n", - " \n", + " \n", " \n", " 1010.5\n", " \n", " \n", - " \n", + " \n", " \n", " 1011.0\n", " \n", " \n", - " \n", + " \n", " \n", " 1011.5\n", " \n", " \n", - " \n", + " \n", " \n", " 1012.0\n", " \n", " \n", - " \n", + " \n", " \n", " 10-10\n", " \n", " \n", - " \n", + " \n", " \n", " 100\n", " \n", " \n", - " \n", + " \n", " \n", " 1010\n", " \n", " \n", - " \n", + " \n", " \n", " 1020\n", " \n", " \n", - " \n", + " \n", " \n", " 10-6.0\n", " \n", " \n", - " \n", + " \n", " \n", " 10-5.8\n", " \n", " \n", - " \n", + " \n", " \n", " 10-5.6\n", " \n", " \n", - " \n", + " \n", " \n", " 10-5.4\n", " \n", " \n", - " \n", + " \n", " \n", " 10-5.2\n", " \n", " \n", - " \n", + " \n", " \n", " 10-5.0\n", " \n", " \n", - " \n", + " \n", " \n", " 10-4.8\n", " \n", " \n", - " \n", + " \n", " \n", " 10-4.6\n", " \n", " \n", - " \n", + " \n", " \n", " 10-4.4\n", " \n", " \n", - " \n", + " \n", " \n", " 10-4.2\n", " \n", " \n", - " \n", + " \n", " \n", " 10-4.0\n", " \n", " \n", - " \n", + " \n", " \n", " 10-3.8\n", " \n", " \n", - " \n", + " \n", " \n", " 10-3.6\n", " \n", " \n", - " \n", + " \n", " \n", " 10-3.4\n", " \n", " \n", - " \n", + " \n", " \n", " 10-3.2\n", " \n", " \n", - " \n", + " \n", " \n", " 10-3.0\n", " \n", " \n", - " \n", + " \n", " \n", " 10-2.8\n", " \n", " \n", - " \n", + " \n", " \n", " 10-2.6\n", " \n", " \n", - " \n", + " \n", " \n", " 10-2.4\n", " \n", " \n", - " \n", + " \n", " \n", " 10-2.2\n", " \n", " \n", - " \n", + " \n", " \n", " 10-2.0\n", " \n", " \n", - " \n", + " \n", " \n", " 10-1.8\n", " \n", " \n", - " \n", + " \n", " \n", " 10-1.6\n", " \n", " \n", - " \n", + " \n", " \n", " 10-1.4\n", " \n", " \n", - " \n", + " \n", " \n", " 10-1.2\n", " \n", " \n", - " \n", + " \n", " \n", " 10-1.0\n", " \n", " \n", - " \n", + " \n", " \n", " 10-0.8\n", " \n", " \n", - " \n", + " \n", " \n", " 10-0.6\n", " \n", " \n", - " \n", + " \n", " \n", " 10-0.4\n", " \n", " \n", - " \n", + " \n", " \n", " 10-0.2\n", " \n", " \n", - " \n", + " \n", " \n", " 100.0\n", " \n", " \n", - " \n", + " \n", " \n", " 100.2\n", " \n", " \n", - " \n", + " \n", " \n", " 100.4\n", " \n", " \n", - " \n", + " \n", " \n", " 100.6\n", " \n", " \n", - " \n", + " \n", " \n", " 100.8\n", " \n", " \n", - " \n", + " \n", " \n", " 101.0\n", " \n", " \n", - " \n", + " \n", " \n", " 101.2\n", " \n", " \n", - " \n", + " \n", " \n", " 101.4\n", " \n", " \n", - " \n", + " \n", " \n", " 101.6\n", " \n", " \n", - " \n", + " \n", " \n", " 101.8\n", " \n", " \n", - " \n", + " \n", " \n", " 102.0\n", " \n", " \n", - " \n", + " \n", " \n", " 102.2\n", " \n", " \n", - " \n", + " \n", " \n", " 102.4\n", " \n", " \n", - " \n", + " \n", " \n", " 102.6\n", " \n", " \n", - " \n", + " \n", " \n", " 102.8\n", " \n", " \n", - " \n", + " \n", " \n", " 103.0\n", " \n", " \n", - " \n", + " \n", " \n", " 103.2\n", " \n", " \n", - " \n", + " \n", " \n", " 103.4\n", " \n", " \n", - " \n", + " \n", " \n", " 103.6\n", " \n", " \n", - " \n", + " \n", " \n", " 103.8\n", " \n", " \n", - " \n", + " \n", " \n", " 104.0\n", " \n", " \n", - " \n", + " \n", " \n", " 104.2\n", " \n", " \n", - " \n", + " \n", " \n", " 104.4\n", " \n", " \n", - " \n", + " \n", " \n", " 104.6\n", " \n", " \n", - " \n", + " \n", " \n", " 104.8\n", " \n", " \n", - " \n", + " \n", " \n", " 105.0\n", " \n", " \n", - " \n", + " \n", " \n", " 105.2\n", " \n", " \n", - " \n", + " \n", " \n", " 105.4\n", " \n", " \n", - " \n", + " \n", " \n", " 105.6\n", " \n", " \n", - " \n", + " \n", " \n", " 105.8\n", " \n", " \n", - " \n", + " \n", " \n", " 106.0\n", " \n", " \n", - " \n", + " \n", " \n", " 106.2\n", " \n", " \n", - " \n", + " \n", " \n", " 106.4\n", " \n", " \n", - " \n", + " \n", " \n", " 106.6\n", " \n", " \n", - " \n", + " \n", " \n", " 106.8\n", " \n", " \n", - " \n", + " \n", " \n", " 107.0\n", " \n", " \n", - " \n", + " \n", " \n", " 107.2\n", " \n", " \n", - " \n", + " \n", " \n", " 107.4\n", " \n", " \n", - " \n", + " \n", " \n", " 107.6\n", " \n", " \n", - " \n", + " \n", " \n", " 107.8\n", " \n", " \n", - " \n", + " \n", " \n", " 108.0\n", " \n", " \n", - " \n", + " \n", " \n", " 108.2\n", " \n", " \n", - " \n", + " \n", " \n", " 108.4\n", " \n", " \n", - " \n", + " \n", " \n", " 108.6\n", " \n", " \n", - " \n", + " \n", " \n", " 108.8\n", " \n", " \n", - " \n", + " \n", " \n", " 109.0\n", " \n", " \n", - " \n", + " \n", " \n", " 109.2\n", " \n", " \n", - " \n", + " \n", " \n", " 109.4\n", " \n", " \n", - " \n", + " \n", " \n", " 109.6\n", " \n", " \n", - " \n", + " \n", " \n", " 109.8\n", " \n", " \n", - " \n", + " \n", " \n", " 1010.0\n", " \n", " \n", - " \n", + " \n", " \n", " 1010.2\n", " \n", " \n", - " \n", + " \n", " \n", " 1010.4\n", " \n", " \n", - " \n", + " \n", " \n", " 1010.6\n", " \n", " \n", - " \n", + " \n", " \n", " 1010.8\n", " \n", " \n", - " \n", + " \n", " \n", " 1011.0\n", " \n", " \n", - " \n", + " \n", " \n", " 1011.2\n", " \n", " \n", - " \n", + " \n", " \n", " 1011.4\n", " \n", " \n", - " \n", + " \n", " \n", " 1011.6\n", " \n", " \n", - " \n", + " \n", " \n", " 1011.8\n", " \n", " \n", - " \n", + " \n", " \n", " 1012.0\n", " \n", " \n", " \n", - " \n", - " \n", + " \n", + " \n", " \n", " Event count\n", " \n", @@ -2590,7 +2600,7 @@ " \n", "\n", "\n", - " \n", + " \n", " \n", " \n", "\n", @@ -3704,22 +3714,22 @@ " factory(glob.Snap, glob.Gadfly);\n", " }\n", "})(window, function (Snap, Gadfly) {\n", - " var fig = Snap(\"#img-d76dd2bc\");\n", - "fig.select(\"#img-d76dd2bc-5\")\n", + " var fig = Snap(\"#img-69b82557\");\n", + "fig.select(\"#img-69b82557-5\")\n", " .init_gadfly();\n", - "fig.select(\"#img-d76dd2bc-8\")\n", + "fig.select(\"#img-69b82557-8\")\n", " .plotroot().data(\"unfocused_ygrid_color\", \"#D0D0E0\")\n", ";\n", - "fig.select(\"#img-d76dd2bc-8\")\n", + "fig.select(\"#img-69b82557-8\")\n", " .plotroot().data(\"focused_ygrid_color\", \"#A0A0A0\")\n", ";\n", - "fig.select(\"#img-d76dd2bc-162\")\n", + "fig.select(\"#img-69b82557-162\")\n", " .plotroot().data(\"unfocused_xgrid_color\", \"#D0D0E0\")\n", ";\n", - "fig.select(\"#img-d76dd2bc-162\")\n", + "fig.select(\"#img-69b82557-162\")\n", " .plotroot().data(\"focused_xgrid_color\", \"#A0A0A0\")\n", ";\n", - "fig.select(\"#img-d76dd2bc-286\")\n", + "fig.select(\"#img-69b82557-286\")\n", " .mouseenter(Gadfly.helpscreen_visible)\n", ".mouseleave(Gadfly.helpscreen_hidden)\n", ";\n", @@ -3731,7 +3741,7 @@ "Plot(...)" ] }, - "execution_count": 18, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -3763,7 +3773,6 @@ } ], "metadata": { - "celltoolbar": "Edit Metadata", "kernelspec": { "display_name": "Julia 1.6.1", "language": "julia", diff --git a/simple-loop b/simple-loop deleted file mode 100755 index 1b0545c..0000000 Binary files a/simple-loop and /dev/null differ