{ "cells": [ { "cell_type": "markdown", "id": "4c35bfc5", "metadata": {}, "source": [ "# Short primer on Jupyter" ] }, { "cell_type": "markdown", "id": "d9b1d4ec", "metadata": {}, "source": [ "This course lives in Jupyter notebooks. Jupyter is a platform to perform computational work through your webbrowser. You can read more about it [here](https://jupyter.readthedocs.io/en/latest/content-quickstart.html). The most important component of Jupyter is the notebook interface. Notebooks are documents which mix text with code, which makes it an ideal tool for teaching. Every notebook is connected to a specific _kernel_, which determines the programming language behind the code blocks, and the interpreter which runs that code. In this code, we'll be using Bash, python and R kernels. When you create a new notebook, you can choose the kernel you want. This very notebook is connected to a Bash kernel." ] }, { "cell_type": "markdown", "id": "ea9babc1", "metadata": {}, "source": [ "Notebooks are introduced in more depth as we move through the course. But Jupyter also has three further components.\n", "\n", "First, there is a file browser, which you can see as the starting view when you for example run this repository on a local computer and execute `jupyter notebook` inside this repository. The file browser allows you to view, rename and move files around. New files and folders can be created with the \"New\" button on the top right." ] }, { "cell_type": "markdown", "id": "4682ee7a", "metadata": {}, "source": [ "Second, there is a text editor, for simple text files. If you create a new text file, or click on an existing text file, this text editor is opened and you can edit the file.\n" ] }, { "cell_type": "markdown", "id": "62c27d55", "metadata": {}, "source": [ "\n", "Third, there is a terminal, which you can start by clicking on \"New\" on the top right of the file browser, and then selecting a terminal window. Terminals allow you to work with the command line to run commands in Bash or other languages. We'll make little use of that here and there, but it might be useful if you have some experience with command lines." ] }, { "cell_type": "markdown", "id": "74904c8b", "metadata": {}, "source": [ "As a little exercise to get started, you can try these things:\n", "\n", "1. Create a new folder in the file browser and name it \"test\"\n", "2. Go into the folder by clicking on it and create a new text file in it, named \"hello.txt\".\n", "3. Put a bit of content into the file, save it and close it.\n", "4. Open a terminal window and try to view the contents of the file by executing `cat test/hello.txt`.\n", "\n", "If you have done things right, you should be able to execute the following piece of code from within this notebook, by putting your curser inside the next code cell and typing Ctrl-Enter and then seeing the contents of the file you've created." ] }, { "cell_type": "code", "execution_count": null, "id": "6cccc54d", "metadata": {}, "outputs": [], "source": [ "cat test/hello.txt" ] } ], "metadata": { "kernelspec": { "display_name": "Bash", "language": "bash", "name": "bash" }, "language_info": { "codemirror_mode": "shell", "file_extension": ".sh", "mimetype": "text/x-sh", "name": "bash" } }, "nbformat": 4, "nbformat_minor": 5 }