From 393da30d0c2e1eedbd7be1d06a4a355cc0f78142 Mon Sep 17 00:00:00 2001 From: radoskov <radoslav.skoviera@cvut.cz> Date: Sat, 22 Feb 2025 10:40:03 +0100 Subject: [PATCH] Another instructions update --- src/pge_lectures/00_intro.ipynb | 51 ++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/src/pge_lectures/00_intro.ipynb b/src/pge_lectures/00_intro.ipynb index 2516b25..a485879 100644 --- a/src/pge_lectures/00_intro.ipynb +++ b/src/pge_lectures/00_intro.ipynb @@ -4,6 +4,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ + "# PGE Interactive Lectures Introduction\n", + "\n", "For those who don't know, this is what is called a \"Jupyter notebook\". It is kind of like a web page that a mixes code and markdown formatted text. It is divided into \"cells\". Each cell can be either text cell (using markdown format) or code cell, containing executable Python code. When executed, the text cells simply render the formatted text. However, the code cells will actually run the code and print the result below that cell. \n", "\n", "Important to keep in mind is that actual Python \"kernel\" is running in the background. Whatever you run, \"stays\" in the kernel (until it is stopped or restarted). For example, if you run a cell defining a variable `a = 3`, you can then use the variable in another cell, e.g., `b = a + 5` (without redefining it in that cell). However, the order of the cells in the document does not matter. What matters is the order in which you execute the cells. Therefore, if you run the cell containing `b = a + 5` before the cell containing `a = 3`, it will throw an error stating that variable `a` does not exist. Likewise, if you execute another cell with `a = 7`, it will rewrite the value of `a` and thus `b = a + 5` will result in `b` having a different value. \n", @@ -18,26 +20,11 @@ }, { "cell_type": "markdown", - "metadata": {}, - "source": [ - "## How to read this \"book\"\n", - "\n", - "Lessons contain code that you can change and execute to help you understand the lesson. Try to play around with the code and see what happens. This is the best way to understand it. If you mess-up the code too much, you can always `git checkout <path_to_modified_file>` to revert it to the original state (since this is a git repo). Or you can re-clone a fresh copy of the repo.\n", - "\n", - "Don't forget to pull new updates / lessons. \n", - "\n", - "If you need some help with *git*:\n", - "\n", - "[What is git?](https://www.atlassian.com/git/tutorials/what-is-git)\n", - "\n", - "[git cheatsheet](https://www.atlassian.com/git/tutorials/atlassian-git-cheatsheet)\n", - "\n", - "[beginner git cookbook](https://stevenbitner.github.io/posts/git-primer/)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, + "metadata": { + "vscode": { + "languageId": "plaintext" + } + }, "source": [ "## How to run this book \n", "\n", @@ -79,6 +66,30 @@ "python -m pge_lectures -l\n", "```" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## How to read this \"book\"\n", + "\n", + "Lessons contain code that you can change and execute to help you understand the lesson. Try to play around with the code and see what happens. This is the best way to understand it. If you mess-up the code too much, you can always `git checkout <path_to_modified_file>` to revert it to the original state (since this is a git repo). Or you can re-clone a fresh copy of the repo.\n", + "\n", + "Don't forget to pull new updates / lessons: `git pull`\n", + "Be wary that pulling updates will only work if you have a *clean* repository (no local changes). Use `git status` to check your local changes.\n", + "\n", + "If you have any local changes, you can either use `git checkout` to revert individual files you changed to their original state or use `git reset --hard` to revert all local changes at once. Alternatively, you can also use `git stash` to store your changes, then `git pull` and `git stash pop` to recover your changes.\n", + "\n", + "You can also simply download a zip of the (updated) repo if you wish to avoid using *git*. However, then you lose the ability to easily revert changes or pull updates. (you will have to always download a copy of the repo)\n", + "\n", + "If you need some help with *git*:\n", + "\n", + "[What is git?](https://www.atlassian.com/git/tutorials/what-is-git)\n", + "\n", + "[git cheatsheet](https://www.atlassian.com/git/tutorials/atlassian-git-cheatsheet)\n", + "\n", + "[beginner git cookbook](https://stevenbitner.github.io/posts/git-primer/)" + ] } ], "metadata": { -- GitLab