Python Programming for Scientific Engineering (15, 16, 17 June 2022)
Lecturer
Dr. Stefano Michieletto
Dept. of Management and Engineering - DTG
e-mail: stefano.michieletto@unipd.it
Dr. Mattia Guidolin
Dept. of Management and Engineering - DTG
e-mail: mattia.guidolin@unipd.it
Topics
The course is designed to be beginner-friendly, starting from the Python programming basics and focusing on how it can be used for scientific data manipulation and analysis.
This introduction to Python for Scientific Engineering will kickstart your learning of Python, as well as programming in general.
Basic Python skills can help you process and analyze tons of data quickly and effectively.
Upon its completion, you will be able to write your own Python scripts and perform hands-on data analysis using NumPy and Pandas, the two most popular Python open-source libraries for data analysis.
Syllabus (tentative)
1. Python Language Basics.
We will start from the very beginning, introducing the basic concepts of Python programming. On the first day of the course, we will dive into key concepts, including variables and operators, control flow, functions, and built-in data structures.
2. Introduction to NumPy.
We will learn about NumPy, a fundamental Python package for mathematical and statistical operations. We will also get started with data exploration.
3. Data Manipulation with Pandas
We will then jump into Pandas, a library created to facilitate working with data. We will use Pandas and NumPy to supercharge your analysis.
4. Data Visualization with Matplotlib
We will not have a lot of time for this topic, but we must understand how to use data visualization to explore data, the core skill in data analysis.
5. Guided project
In the latest hours of the course, we will apply the acquired skills to explore real data.
Timetable
The course will be held on the days of 15, 16, and 17 June 2022 with the following timetable:
8:30-10:30 lecture
10:30-12:30 hands-on
13:30-15:30 lecture
15:30-17:30 hands-on
Classrooms
Wednesday 15/06: morning Sala 1 Viale Margherita (old building), afternoon VM10 (new building)
Thursday 16/06: VM13 (new building)
Friday 17/06: VM13 (new building)
Lectures format
In person lessons.
Admission
Please send an e-mail to the lecturer and register on Moodle.
Examination
To complete the course and get your grade, you will need to complete all the exercises proposed in the hands-on sessions. Although you are warmly invited to work on the exercises during the three days of the course, you can also hand them over in the following weeks but before the end of July.
SETUP YOUR DEVELOPMENT ENVIRONMENT: GITHUB, AND GOOGLE COLABORATORY
Setting up your development environment and being ready for the first lecture is a matter of a few minutes:
- step 1. Register for an account on GitHub. You are not required to use the unipd email.
- step 2. Get the test assignment and create a test repository
- 2.a Go to the link of the test assignment https://classroom.github.com/a/_aYNVhC9
- 2.b Authorize GitHub Classroom
- 2.c Find your email address (if you are not on the list skip to 2.d and let us know)
- 2.d Accept the assignment
- 2.e Refresh the page, access your assignment, and accept the invitation
- 2.f Now you have a personal copy of the assignment files (the copy is called repository) and you can modify the test_notebook (step 3)
All the materials and hands-on exercises will be distributed as GitHub classroom assignments.
- step 3. Open your notebook on google colab.
- 3.a go to web page: https://colab.research.google.com/
- 3.b select GitHub and wait for authorization from GitHub
- 3.c write your GitHub username
- 3.d select the test repository created in step 2 (if you don't see the repository go back to step 3.c and write the organization name, i.e. python-prog-scientific-eng-aa-2021-22 )
- 3.e select the test_notebook.ipynb notebook (and wait for GitHub authorization)
- 3.f now you are ready to modify the notebook and run the Hello World example
- 3.g when you are done save a copy of your file back to the Github repository
- 3.h the notebook in GitHub repository has been modified to reflect your changes
Python Language Basics
Lecture: https://classroom.github.com/a/wQMUOSLk
Assignment: https://classroom.github.com/a/2QuZAww0
Data Structures
Lecture: https://classroom.github.com/a/J7H7cb_f
Assignment: https://classroom.github.com/a/XRwiQkV8
Dictionary
Lecture: https://classroom.github.com/a/LlI83ew4
Assignment: this one is free! :D
Functions
Lecture: https://classroom.github.com/a/Stz8NaH5
Assignment: https://classroom.github.com/a/c_tfo6kN
NumPy
Lecture: https://classroom.github.com/a/OJbW6rvP
Assignment: https://classroom.github.com/a/ghtExSsf
Matplotlib
Lecture: https://classroom.github.com/a/qP45DeSr
Assignment: https://classroom.github.com/a/aIHJQ_jE
Pandas
Lecture: https://classroom.github.com/a/mZc-L90V
Assignment: https://classroom.github.com/a/1LsolxBr
Guided Project
Notebooks: https://classroom.github.com/a/GUJ-Gz0l