Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

A collaborative robot UR16e from Universal Robots. Source
Auledas / Wikimedia Commons CC BY-SA 4.0

A collaborative robot UR16e from Universal Robots. Source Auledas / Wikimedia Commons CC BY-SA 4.0

Before we begin with the class:

Intro i RobotLabben ved Morten

Test

(20 min)

Accept the assignment

E: Group name and picture

Coding environment continued

Submission from the editor

  1. Find an assignment you have already accepted and which is not locked, or accept a new one, e.g., the next homework. Open its repository on GitHub.

  2. Copy the address of your repository:

  3. Open a terminal in your editor. In the terminal, change your directory to your code folder. For example:

    cd Desktop/uni/26WS/indprog/code
  4. Get a copy of your repository on your computer using the address you copied before. This copy is also called clone:

    git clone REPOSITORY_ADDRESS

    For example:

    git clone https://github.com/indprog/indprog-global-venture-calculator-geko-st
  5. Open the folder you have cloned.

  6. Make your changes in the files. For experimenting, change a file in src folder.

  7. After modification you will see that the Source Control icon octicon:git-branch-16 in the left panel has a number of changes[1].

    Click the Source Control icon octicon:git-branch-16.

  8. (optional)You will see a list of all the files that have been modified. Check carefully, whether you have modified the correct files:

  9. (optional)You can also get an overview of your changes by clicking on the file name:

  10. Write a short message that summarizes your changes, for example:

  11. Click octicon:arrow-up-16 Commit & Push to send your changes to your repository on the cloud.

    This will be also automatically a submission like you have done using the GitHub website.

  12. You can check whether you have submitted or not by visiting your cloud repository or .

Downloading the notebooks from ThinkPython

In the next step we will run notebooks, so download them first.

  1. Visit Think Python GitHub repository

  2. Clone it like we have done in Submission from the editor into your code folder.

    Alternatively you can download the notebooks as a ZIP file.

    Click Code -> Download ZIP.

    You can also this tutorial.

    Then Unzip the downloaded file and move the files in your code folder.

The used notebook files are in chapters folder.

Running notebooks in your editor

  1. Install Jupyter plugin for your editor:

    codium --install-extension ms-toolsai.jupyter
  2. In your editor, open the folder with the notebooks and find the notebook folder in the Explorer:

  3. Click the notebook you want to open.

  4. On the cell you want to run, click octicon:triangle-circle-16 to run the cell. You can also use the keyboard shortcut CtrlEnter. If the cell prints an output, then you will see an output as follows[2].

  5. (On Windows) You will be prompted whether you want to give your editor network access. Click Allow

  6. You will be asked to install ipykernel package. Click Install.

    It will take some time to install.

  7. After running you get the output below the cell:

E: Reflection

Footnotes
  1. You also see a M in the file name in the Explorer, which indicates that the file has been modified. And a colorful circle octicon:circle-16 on the right of the folder, which has changes compared to the last commit.

  2. In the particular case (ThinkPython notebook), you won’t see an output if you run the notebook for the second time, because the script checks whether the file is downloaded and does not download it again, if the file exists.