{"id":16730440,"url":"https://github.com/oschulz/julia-course","last_synced_at":"2025-04-10T11:12:59.805Z","repository":{"id":52843338,"uuid":"234584476","full_name":"oschulz/julia-course","owner":"oschulz","description":"Introductory Julia Course","archived":false,"fork":false,"pushed_at":"2023-12-06T00:03:14.000Z","size":31834,"stargazers_count":15,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-06T10:41:48.464Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oschulz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-01-17T16:05:45.000Z","updated_at":"2024-12-15T09:48:05.000Z","dependencies_parsed_at":"2023-12-06T01:34:59.910Z","dependency_job_id":null,"html_url":"https://github.com/oschulz/julia-course","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oschulz%2Fjulia-course","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oschulz%2Fjulia-course/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oschulz%2Fjulia-course/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oschulz%2Fjulia-course/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oschulz","download_url":"https://codeload.github.com/oschulz/julia-course/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208565,"owners_count":21065202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T23:33:30.843Z","updated_at":"2025-04-10T11:12:59.779Z","avatar_url":"https://github.com/oschulz.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction to Julia\n\nThis course currently constists of\n\n* [`\"julia-course-slides.ipynb\"`](julia-course-slides.ipynb): Slides as as Jupyter notebook\n\n* [`\"julia-course-example.ipynb\"`](julia-course-example.ipynb): A practical example as a Jupyter notebook\n\nYou need both Julia and a way to run Jupyter notebooks to run this course.\n\n\n## Installing Julia and either Jupyter or nteract\n\n### Installing Julia\n\nJulia is easy to install:\n\n* [Download Julia](https://julialang.org/downloads/).\n\n* Extract the archive resp. run the installer.\n\n* You may want to add the Julia \"bin\" directory to your `$PATH\"`\n\nWe highly recommend using Julia v1.9 to run the code in this course.\n\n\n### Installing Jupyter\n\nIf you have a working Jupyter installation, it should detect the Jupyter Julia kernel (see below on how to install it) automatically.\n\nYou can also start Jupyter via Julia: This can either use existing installations of Jupyter, or install both internally by creating an internal Conda installation within `$HOME/.julia/conda`. On Linux, Julia will by default to use the Jupyter installation associated with the `jupyter` executable on your `$PATH`. On OS-X and Windows, both IJulia will by default always create a Julia-internal Conda installation (see above). To change this behavior, set the environment variable [`$JUPYTER`](https://github.com/JuliaLang/IJulia.jl#installation). For details, see the [IJulia.jl](https://github.com/JuliaLang/IJulia.jl#installation)documentation.\n\nNote: This course doesn't call on any Python packages from Julia. If you *do* call Python from Julia though (e.g. indirectly via packages like PyPlot.jl and UltraNest.jl or directly via PyCall.jl), the same default behavior occurs (the system's Python3 is used on Linux, a Julia-internal Conda environment on OS-X and Windows). To change this, set the [`$PYTHON`](https://github.com/JuliaPy/PyCall.jl#specifying-the-python-version) environment variable. For details, see the [PyCall.jl](https://github.com/JuliaPy/PyCall.jl#specifying-the-python-version) and [PyPlot.jl](https://github.com/JuliaPy/PyPlot.jl) documentation.\n\nIf you want to use a standalone Jupyter/Python installation with Julia, we recommend [installing Anaconda](https://www.anaconda.com/distribution/).\n\n\n### Jupyter alternative: Installing nteract\n\nOn local systems, you can use the [nteract](https://nteract.io/) deskop application to run Jupyter notebooks, instead of using a Jupyter server. Like Jupyter, nteract should detect the Jupyter Julia kernel (see below) automatically.\n\n\n### Environment variables\n\nYou may want/need to set the following environment variables:\n\n* `$PATH`: Include the Julia `bin`-directory in your binary search path, see above.\nIf you intend to use Jupyter, you will probably want to include the directory containing the `jupyter` binary to your `PATH` as well.\n\n* [`$JULIA_NUM_THREADS`](https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_NUM_THREADS-1): Number of threads to use for Julia multi-threading\n\n* [`$JULIA_DEPOT_PATH`](https://julialang.github.io/Pkg.jl/v1/glossary/) and [`JULIA_PKG_DEVDIR`](https://julialang.github.io/Pkg.jl/v1/managing-packages/#Developing-packages-1): If you want Julia to install packages in another location than `$HOME/.julia`.\n\nSee the Julia manual for a description of [other Julia-specific environment variables](https://docs.julialang.org/en/v1/manual/environment-variables/).\n\n\n### Installing the Jupyter Julia kernel\n\nFirst install the [IJulia Jupyter Julia kernel](https://github.com/JuliaLang/IJulia.jl), [Interact.JL](https://github.com/JuliaGizmos/Interact.jl) and [WebIO.jl](https://github.com/JuliaGizmos/WebIO.jl) in your *default* Julia project environment via\n\n```shell\njulia -e 'using Pkg; Pkg.add([\"IJulia\", \"Interact\", \"WebIO\"]); Pkg.build(\"IJulia\")'\n```\n\nAlso run\n\n```shell\njulia -e 'using WebIO; WebIO.install_jupyter_nbextension()'\n```\n\nto install a Jupyter extension that [WebIO.jl](https://github.com/JuliaGizmos/WebIO.jl) (used by Interact.jl) requires to function.\n\nTo configure Julia to use multiple threads when run as a Jupyter kernel, use\n\n```shell\njulia -e 'using IJulia; IJulia.installkernel(\"Julia\", \"--project=@.\", \"--threads=auto\")'\n```\n\nOn Julia versions *older than v1.6*, you need to use\n\n```shell\njulia -e 'using IJulia; IJulia.installkernel(\"Julia\", \"--project=@.\", env=Dict(\"JULIA_NUM_THREADS\"=\u003e\"4\"))'\n```\n\ninstead.\n\n\n## Setting up this course\n\nDownload this course via `Git` and change into the \"julia-course\" directory:\n\n```shell\ngit clone https://github.com/oschulz/julia-course.git\ncd julia-course\n```\n\nJulia has a very powerful [package management system](https://julialang.github.io/Pkg.jl/v1/) that allows for using different versions of packages for different projects, layered package environments, etc. Run the shell command\n\n```shell\njulia --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.precompile()'\n```\n\nto instantiate the [Julia project environment](https://docs.julialang.org/en/v1/manual/code-loading/#Project-environments-1) defined by the files \"Project.toml\" and \"Manifest.toml\" in the \"julia-course\" directory.\n\nNote that the \"IJulia\" package should always be installed in the *default environment* (see above) and *not* in individual project environments, to avoid version conflicts (since the Jupyter kernel will always try to load the same one).\n\nOptional: To make this environment provided with this course your default Julia environment, typically located in `\"$HOME/user/.julia/environments/v1.6\"`,\nsimply copy the files `\"Project.toml\"` and `\"Manifest.toml\"` there, and then add IJulia (see above).\n\n\n## Using the Jupyter notebooks\n\nFirst ensure that you have the \"IJulia\" package installed, which provides the Jupyter Julia kernel. Test by running (should not report an error)\n\n```shell\njulia -e 'using IJulia'\n```\n\nIf you do *not* have a Jupyter installation on your `$PATH`, you may want to start [Jupyter via Julia](https://julialang.github.io/IJulia.jl/stable/manual/running/) or (on a desktop system) use [nteract](https://nteract.io/).\n\nIf you *do* have a Jupyter installation on your `$PATH` (preferred), you can usually just start a [Jupyter notebook server](https://jupyter-notebook.readthedocs.io/en/stable/) using\n\n```shell\njupyter notebook\n```\n\nWhen using a Jupyter installation on your local system, your web browser will usually be started automatically and be pointed to the Jupyter notebook server instance. However, when using a software container or when starting Jupyter on a remote system using SSH port forwarding (and in some other cases), Jupyter will complain that it can't start a web browser. In these cases, run\n\n```shell\njupyter notebook --no-browser\n```\n\nJupyter will print the URL to point your web browser too. That URL should include an authorization token (unless you configured Jupyter for [password-based access](https://jupyter-notebook.readthedocs.io/en/stable/security.html#alternatives-to-token-authentication)).\n\nDepending on where and how you run Jupyter - especially if you run in a Docker container - you may need to specify a non-standard port number and/or IP address to bind to, or allow Jupyter to run in a root user account. In such cases, additional options will be required, e.g.:\n\n```shell\njupyter notebook --no-browser --ip 0.0.0.0 --port 8888 --allow-root\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foschulz%2Fjulia-course","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foschulz%2Fjulia-course","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foschulz%2Fjulia-course/lists"}