This is a workshop for E-Science students at the University of the Witwatersrand, covering an introduction to Python. In particular, this workshop is given over two days, with lectures to explain concepts and labs to obtain practice and familiarity.
The goal here is to allow participants of the workshop to have a solid foundation in programming, and be in the position to program what they want, or to be able to figure out how to do that.
We will be covering Python in this workshop. Python is one of many programming languages, and is extensively used in machine learning and data science. Most postgraduate computer science courses also use Python. It is a language that has relatively simple syntax, and great support/libraries.
Simon Rosen & Abdel Njupoun.
For the workshop attendees, if you have any questions with regard to the workshop you can contact Simon Rosen at: [email protected].
- Please note that due to the volume of emails, emails from non attendees of the workshop are unlikely to be responded to.
The workshop will be over 3 days, and the schedule will be as follows:
TBC
Please ask questions at any point -- the goal of this workshop is to get everyone to properly understand Python, so if you do not understand something, please make us aware of that.
- Basic Intro to Python
- Goal is to introduce (almost) everything that you need to use Python. This will be somewhat surface level, but the exercises will solidify the concepts.
- Loops
- More Advanced Concepts
- Common Libraries
- Numpy
- Pandas
- Plotting
- Common Libraries
- Brief introduction to Pytorch and more libraries.
- Trying to solve actual problems.
Installing Anaconda and getting Python to run. Anaconda is already installed in the lab computers. If you want to install it on your own machine, you can go to https://www.anaconda.com/products/distribution, download the installer and follow the steps. You can also follow the steps listed in this video (https://www.youtube.com/watch?v=uOwCiZKj2rg&t=492s) or blog post (https://medium.com/@GalarnykMichael/install-python-anaconda-on-windows-2020-f8e188f9a63d).
Jupyter Notebook is an interactive development environment for Python, which is commonly used in data science. It provides you with cells, in which you can write and execute code.
This is what we will be using in this workshop, but, generally, you can also write code in .py
files and run it either using the python
program in a terminal or an IDE like VsCode or PyCharm.
Some getting started resources:
- https://realpython.com/jupyter-notebook-introduction/
- https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/
The workshop was slightly modified from a workshop prepared by Michael Beukman, with help from Simon Rosen. It was based off a previous workshop given by Michael, as well as the workshop given in previous years by Ruan Pretorius and Sheena Philip.
Feel free to look at the following resources for more information:
- W3Schools: https://www.w3schools.com/python
- LearnPython: https://www.learnpython.org/
- GeeksForGeeks: https://www.geeksforgeeks.org/python-programming-language/
- RealPython: https://realpython.com/
- Official Python Page: https://docs.python.org/3/ (Official docs but not very easy to read)
- NumPy Official
- Absolute Beginners Guide: https://numpy.org/doc/stable/user/absolute_beginners.html
- User Guide: https://numpy.org/doc/stable/user/index.html
- Reference: https://numpy.org/doc/stable/reference/index.html
- W3Schools: https://www.w3schools.com/python/numpy/
- GeeksForGeeks: https://www.geeksforgeeks.org/numpy-tutorial/
- RealPython: https://realpython.com/numpy-tutorial/
- An additional Python Course: http://ucl-cs-grad.github.io/scipython/lectures.html
- Machine Learning Mastery: https://www.machinelearningmastery.com/
- Pandas Official Site (https://pandas.pydata.org/)
- User Guide: https://pandas.pydata.org/docs/user_guide/index.html
- Getting Started: https://pandas.pydata.org/docs/getting_started/index.html
- W3Schools: https://www.w3schools.com/python/pandas/default.asp
- GeeksForGeeks: https://www.geeksforgeeks.org/pandas-tutorial/
- Matplotlib Official Site (https://matplotlib.org)