Skip to content

VEZY/julia_course

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Julia course: from total beginner to power user

This repository is a collection of resources to teach everything about the Julia programming language.

These resources are used in the Julia: from total beginner to power user Youtube playlist.

Direct links to the notebooks

You can use the notebooks either by using the direct links provided here, or by downloading/cloning the repository (see below).

To use the direct link, open julia, then type using Pluto, and execute the line of code provided below. If you need to install Pluto first, see below.

  1. Variables and basic types in Julia

    Variables and basic types: link to video

    Pluto.run(notebook = "https://raw.githubusercontent.com/VEZY/julia_course/main/content/1-variables_and_basic_types.jl")
  2. Arrays

    Arrays: link to video

    Pluto.run(notebook = "https://raw.githubusercontent.com/VEZY/julia_course/main/content/2-arrays.jl")
  3. Tuples

    Tuples: link to video

    Pluto.run(notebook = "https://raw.githubusercontent.com/VEZY/julia_course/main/content/3-tuples.jl")
  4. Dictionaries

    Dictionaries: link to video

    Pluto.run(notebook = "https://raw.githubusercontent.com/VEZY/julia_course/main/content/4-dictionnaries.jl")
  5. Basic operators

    Basic operators: link to video

    Pluto.run(notebook = "https://raw.githubusercontent.com/VEZY/julia_course/main/content/5-basic_operators.jl")
  6. String operators

    String operators: link to video

    Pluto.run(notebook = "https://raw.githubusercontent.com/VEZY/julia_course/main/content/6-string_operators.jl")
  7. Compound expressions (begin and let)

    begin and let: link to video

    Pluto.run(notebook = "https://raw.githubusercontent.com/VEZY/julia_course/main/content/7-compound_expressions.jl")
  8. Conditional statements (if...else...)

    Conditional statements: link to video

    Pluto.run(notebook = "https://raw.githubusercontent.com/VEZY/julia_course/main/content/8-conditional_statements.jl")
  9. For loops (eachindex, enumerate, variable scope...)

    For loops: link to video

    Pluto.run(notebook = "https://raw.githubusercontent.com/VEZY/julia_course/main/content/9-for_loops.jl")
  10. Functions (short and long forms, do syntax, anonymous functions...)

    Functions: link to video

    Pluto.run(notebook = "https://raw.githubusercontent.com/VEZY/julia_course/main/content/10-functions.jl")

Usage

Pluto

Most of the resources are Pluto reactive notebooks. You know when a julia script (a .jl file) is a notebook when it starts with "### A Pluto.jl notebook ###". In this case, use Pluto to execute the file.

Install Pluto

To install Pluto, enter the package manager mode in Julia by pressing ] in the REPL, and then execute the following code:

add Pluto

Then, each time you want to use Pluto, type the following command in the REPL (in julia mode):

using Pluto

Open a notebook

There are different ways to open a notebook, but it's always using the same function: Pluto.run().

The most simple way is to just run it:

using Pluto
Pluto.run()

Then you'll have to navigate manually to your notebook.

A second way is to open a notebook by passing its path, e.g.:

Pluto.run(notebook = "1-variables_and_basic_types.jl")

And a third way is by using a notebook directly from the internet by passing its link, e.g.:

Pluto.run(notebook = "https://raw.githubusercontent.com/VEZY/julia_course/main/content/1-variables_and_basic_types.jl")

Watch this video if you need more details about how to use Pluto.

Download and instantiate

If you want to use the resources from this repository locally, the best way is to download a local copy (or clone it if you know GIT). To do so, click on the green button in this page called "Code":

And choose "Download ZIP":

Then, unzip the file, and open the directory in VS Code, or just open Julia in a command prompt / terminal in this repository and use e.g.:

using Pluto
Pluto.run(notebook = "1-variables_and_basic_types.jl")

The resources are numbered, and their titles correspond to the Youtube videos they relate to.

Acknowledgements

This repository uses the template provided by the Computational Thinking course (computationalthinking.mit.edu)

Build the website

From PlutoPages/Website maintenance.md

Open this repository in VS Code, and install the recommended extensions.

To start running the development server, open the VS Code command palette (press Cmd+Shift+P), and search for Tasks: Run Task, then PlutoPages: run development server. The first run can take some time, as it builds up the notebook outputs cache. Leave it running.

This will start two things in parallel: the PlutoPages.jl notebook (which generates the website), and a static file server (with Deno_jll). It will open two tabs in your browser: one is the generation dashboard (PlutoPages), the other is the current site preview (Deno_jll).

Whenever you edit a file, PlutoPages will automatically regenerate! Refresh your browser tab. If it does not pick up the change, go to the generation dashboard and click the "Read input files again" button.

This workflow is recommended for writing static content, styles, and for site maintenance. But for writing Pluto notebooks, it's best to prepare the notebook first, and then run the site (because it re-runs the entire notebook on any change).

About

Julia course: from total beginner to power user!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published