Aims The aim of this lab is to help setup and install python and various other tools
Using PyEnv for installation of python versions Using Pip to install packages Setup VSCode to edit and run python files Why do I need PyEnv? At present the version of python installed in our linux labs are
Aims The aim of this lab is to introduce the process of test driven development (TDD) and develop some simple tests, we will use the following steps.
Project Setup Test Setup Test Driven Design of a Simple RGBA class using Version control Storing Pixels It is common to store image pixel data using a single unsigned int32_t data type. In C/C++ this is quite simple, however in python these things are a little harder as we don’t have the same data types. For our example we are going to use a single integer value called pixel to store our RGBA values but we will need to encode them using some logic.
Aims The aim of this lab is to investigate Object Orientation in python
The principles of S.O.L.I.D Classes in Python OO Design principles SOLID Is A mnemonic to remember the first five principles of Object Oriented design
Aims The aim of this lab is to introduce the process of test driven development (TDD) and develop some simple tests, we will use the following steps.
Project Setup Version Control Setup Test Setup Test Driven Design of a Simple RGBA class Storing Pixels It is common to store image pixel data using a single unsigned int32_t data type. In C/C++ this is quite simple, however in python these things are a little harder as we don’t have the same data types. For our example we are going to use a single integer value called pixel to store our RGBA values but we will need to encode them using some logic.
What is Computational Thinking? The idea of computational thinking is allow us to look at problems and determine the best way for a computer to solve this (and related problems). This is basically a way of re-framing the problem / domain so it can be computationally processed.
What is Computational Thinking? The idea of computational thinking is allow us to look at problems and determine the best way for a computer to solve this (and related problems). This is basically a way of re-framing the problem / domain so it can be computationally processed.
Simple Programs with Python In this session we will look at writing some simple stand alone programs in Python. We will cover the following topics:
#!/ __main__ sys.argv The first thing to note is that Python is an interpreted language, this means that you can run Python code directly from the command line. This is done by typing python followed by the name of the file containing the Python code. For example to run a file called hello.py you would type:
Introduction In Lab1 we introduced the PyEnv tool to allow us to install various versions of python either locally or globally.
In the following examples we will explore how we can setup and install specific ML libraries into a Virtual Environment using the global PyEnv python.
Overview In this session we will look at how to pass arguments to a Python program from the command line. We will cover the following topics:
sys.argv argparse click What are command line arguments? Command line arguments are values that are passed to a program when it is run from the command line. These values can be used to control the behavior of the program, for example by specifying input files, output files, or other options.