Skip to main content Skip to navigation

Labs

Running the code for Labs 1-7

There are two ways to run the code, either locally or remotely.

Locally

If you are using your own personal computer, you will need the following things:
  • VSCode (can be found here)
  • Python 3 (can be found here)
If you are using the DCS system, these have already been installed for you.
If you want to run the code locally, you will need a few extensions for VSCode. This will allow VSCode to fully understand the .ipynb files. This can be done through the following commands in your terminal:
code --install-extension ms-python.python

code --install-extension ms-python.vscode-pylance

code --install-extension ms-toolsai.jupyter

code --install-extension ms-toolsai.jupyter-keymap

code --install-extension ms-toolsai.jupyter-renderers
Once this is all done, you can then open VSCode using the following command in your terminal:
code <~/path/to/your/directory>
The first time you run the python code blocks, VSCode may ask you to select a version of Python (especially if you have multiple version installed). In this case, select the highest version of Python 3 available.
The DCS machines can be accessed at any time remotely using VNC. Instructions on how to do this can be found here.

Remotely

If you don't want the hassle of installing VSCode and you have a Google account, you can use Colab. You will need to download the files to your machine, then upload them to Colab individually. You can then save them to Google Drive, or download them to run on your local machine.

Files and Datasets

All the files required for these labs can be found on the right hand side. We are also keeping a collection of datasets that are utilised in the labs, and that might be interesting for further use. These can be found here.

Running the code for Labs 8 & 9

For Labs 8 and 9, we will be using a program called Processing. This uses a slightly customised version of Java, so all the techniques used in other Java modules can be used when working with Processing. Unlike the previous labs, there is no way to run without using a DCS machine, instructions on how to do this can be found here.

Processing on DCS System

To run Processing on the DCS system, all you need to do is open the start menu and type in "processing". This should come up with an option called "Run processing". Click on this and it should boot up the library.

Processing on your machine

To run Processing on your own machine, simply download and install the program, which can be found here. We will be using Processing 3 on the DCS machines and when marking, so make sure you download the latest version of Processing 3.

Contacts

Let us know you agree to cookies