Optimizing Python Code for Better Performance
22 May 2023
19 May 2023
For-profit: 500 CHF
Next course(s):
10 Nov 2023 | Streamed | |
17 May 2024 | Streamed |
Overview
Python is an open-source and general-purpose scripting language which runs on all major operating systems. It was designed to be easily read and written with comparatively simple syntax. Over the recent years Python has become a programming language of choice for bioinformatics and data analysis, and in particular for applications that make use of machine learning or deep learning. However, the flexibility of the python language can come at the cost of lower performance when compared to compiled languages such as C++. This 1-day course will introduce modules and recipes to monitor python code, detect computational bottlenecks and substantially speedup python code.
Topics that will be covered in this course include:
- Monitoring CPU and RAM usage of python code
- Speed-up of python code using numpy, cython, or numba
- Additional speed-up using simple parallelization recipes
Audience
This course is addressed to life scientists, bioinformaticians and researchers who are familiar with writing Python code and core Python elements and would like to write more efficient code in order to crunch more data faster.
Learning outcomes
At the end of this course, participants are expected to:
- Monitor and identify computational bottlenecks in their python code
- Summarize and perform quality control on their data
- Re-implement specific functions using cython or numba
- Test and evaluate the impact of their optimization strategy
Prerequisites
Knowledge / competencies
The course is targeted to life scientists, bioinformaticians, and researchers who are already familiar with the Python programming language. Competences and knowledge levels required correspond to those taught in courses such as: First Steps with Python in Life Sciences. Test your skills with Python and statistics with the quiz here, before registering. We recommend 4 out of 6 correct answers.
A few days before the course, registered participants will receive a small "warm-up" jupyter notebook to go through. This will be in order to help them get a quick refresher on their python know-how and check that all libraries are working properly.
Technical
You are required to use your own laptop, with a recent Python 3 version. Please make sure you have install Anaconda, Jupyter notebook and the needed Python librairies on your personal laptop before the start of the course. You can find all the information for the prerequisiste installation here.
Application
Registration fees for academics are 100 CHF and 500 CHF for for-profit companies. While participants are registered on a first come, first served basis, exceptions may be made to ensure diversity and equity, which may increase the time before your registration is confirmed.
Applications will close as soon as the places will be filled up. Deadline for free-of-charge cancellation is set to 19/05/2023. Cancellation after this date will not be reimbursed. Please note that participation in SIB courses is subject to our general conditions.
You will be informed by email of your registration confirmation. Upon reception of the confirmation email, participants will be asked to confirm attendance by paying the fees within 5 days.
Venue and Time
This course will be streamed using Zoom.
The course will start at 9:00 and end around 17:00.
Precise information will be provided to the participants in due time.
Additional information
Coordination: Diana Marek, SIB Training Group.
We will recommend 0.25 ECTS credits for this course (given a passed exam at the end of the course).
You are welcome to register to the SIB courses mailing list to be informed of all future courses and workshops, as well as all important deadlines using the form here.
Please note that participation in SIB courses is subject to our general conditions.
SIB abides by the ELIXIR Code of Conduct. Participants of SIB courses are also required to abide by the same code.
For more information, please contact training@sib.swiss.