Scientific computing with Python

A Ph.D. course at the Dipartimento di matematica e fisica “Niccolò Tartaglia”, Facoltà di scienze matematiche, fisiche e naturali, Università Cattolica del Sacro Cuore - sede di Brescia

Instructor: Marco Della Vedova - marco.dellavedova@unicatt.it - homepage

Schedule: June 4-6-7, 2018 - 14:00-18:00

Venue: Lab. Buon Pastore, via Musei 41, Brescia, Italy

Course aims

Python is frequently used for high-performance scientific applications. It is widely used in academia and scientific projects because it is easy to write, easy to read, and performs well. The course aims to give an overview on the vast field of modern Python 3 tools and libraries (e.g., numpy and scipy modules) for scientific research.

Course content

Get prepared

It is recommended to use your own laptop, even if it will be possible to use computers in the lab. I suggest to pre-install on your machine some software, in particular:

There are many ways to install the above, depending on your operating system. Arguably, the easiest way is to follow the instructions for the miniconda installation, (installer here). Then, install all the modules listed in the requirements.txt file with commands like

conda install numpy

Alternately, you can use the default Python package manager pip, which has a convenient command to install a bundle of modules:

pip install -r requirements.txt

Detailed schedule

TimeProgramResources
Mon. 04/06/18 - Getting started with Python
14:00 - 15:45 Introduction
IDEs: PyCharm, Spyder, Jupyter notebook
Python3: all you need to know
Input/Output
15:45 - 16:00 Break
16:00 - 17:45 Hands-on exercises
(input files: commedia.txt, paradiselost.txt)
Solutions
1. sublist.py
2. subsetsum.py
3. letter_count.py
4. skyline.py
Wed. 06/06/18 - Python for science
14:00 - 15:45 Package dependency with pip and Conda
Creating and manipulating numerical data with Numpy
Data visualization with matplotlib
Scipy: library of scientific algorithms
15:45 - 16:00 Break
16:00 - 17:45 Hands-on exercises Solutions
1. html - ipynb
3. html - ipynb
Thu. 07/06/18 - Selected topics
14:00 - 15:45 Data analysis and statistics with pandas
Machine learning with scikit-learn
High-performance computing and multiprocessing
Using Fortran and C code in Python
Pandas example: html - ipynb
Scikit-learn example: html - ipynb
Fortran example: html - ipynb
C example: html - ipynb
15:45 - 16:00 Break
16:00 - 17:45 Solving PDEs with FEniCS
with Dott.ssa Giulia Bevilacqua - giulia.bevilacqua@polimi.it
poisson.py
linearelasticity.py
hyperelasticity.py
hyperelasticity2.py