What customers say ...
Very good introduction to the programming language.
Matthias Enderle, freelancer programmer about the German version of the course "Python for Programmers" more...
I really liked the training. It matched the expectations of a student. This training is amazing.
Deepti about the tutorial "Iterators, Generators and Decorators at EuroPython 2014" more...
Mr. Müller explained very well and exhasutively. Alle question were answered. The learned material will definitely speed up my daily work. Thank you very much!
Martin Siemann, German Aerospace Stuttgart about the course "Python für Programmierer und Python für Wissenschaftler und Ingenieure" more...
Very nice course, got many useful suggestions.
Dr.-Ing. Ralf Wieland, Institut für Landschaftssystemanalyse, Leibniz-Zentrum für Agrarlandschaftsforschung e.V. about the German version of the course "Python for Scientists and Engineers" more...
Course curriculum and delivery absolutely goal-oriented very understandable. Highly recommended!!!
Ralf Dörksen, Sangross about the course "Introduction to Django" more...
Faster Python Programs - Measure, don't Guess
Dates for Open Courses
Course available as open and in-house training. Currently no dates for open courses. Please ask us at email@example.com
Optimization can often help to make Python programs faster or use less memory. Developing a strategy, establishing solid measuring and visualization techniques as well as knowing about algorithmic basics and datastructures are the foundation for a successful optimization. The tutorial will cover these topics. Examples will give you a hands-on experience on how to approach efficiently.
Programmers with good basic Python knowledge. No previous knowledge in the field of optimization is required.
This tutorial will help you to get the most out of your optimization work. You will learn useful techniques for details combined with an overall strategy for the big picture.
Python is a great language. But it can be slow compared to other languages for certain types of tasks. If applied appropriately, optimization may reduce program runtime or memory consumption considerably. But this often comes at a price. Optimization can be time consuming and the optimized program may be more complicated. This, in turn, means more maintenance effort. How do you find out if it is worthwhile to optimize your program? Where should you start? This tutorial will help you to answer these questions. You will learn how to find an optimization strategy based on quantitative and objective criteria. You will experience that one's gut feeling what to optimize is often wrong.
The solution to this problem is: „Measure, Measure, and Measure!“. You will learn how to measure program run times as well as profile CPU and memory. There are great tools available. You will learn how to use some of them. Measuring is not easy because, by definition, as soon as you start to measure, you influence your system. Keeping this impact as small as possible is important. Therefore, we will cover different measuring techniques.
Furthermore, we will look at algorithmic improvements. You will see that the right data structure for the job can make a big difference. Finally, you will learn about different caching techniques.
- How Fast is Fast Enough? (5 min)
- Optimization Guidelines and Strategy (10 min)
- Measuring run time
- time, timeit, decorators for timing (5 min)
- Wall Clock vs. CPU Time (2 min)
- Profiling CPU Usage
- cProfile (10 min)
- A Picture is Worth a Thousand Words
- SnakeViz (10 min)
- Going Line-by-Line (5 min)
- Exercise (15 min)
- Profiling Memory Usage
- Pympler (5 min)
- Memory Usage Line-by-Line with memory_profiler (5 min)
- Roll your own (5 min)
- Exercise (10 min)
- Algorithms and Anti-patterns
- String Concatenation (3 min)
- List and Generator Comprehensions (5 min)
- Think Global buy Local (5 min)
- Exercise (5 min)
- The Right Data Structure
- Use built-in Data Types (2 min)
- list vs. set (3 min)
- list vs. deque (5 min)
- dict vs. defaultdict (5 min)
- Big-O notation and Data Structures (5 min)
- O(1) vs. O(n) vs. O(n) (5 min)
- Exercise (15 min)
- Reuse before You Recalculate (5 min)
- Deterministic caching (5 min)
- Non-deterministic caching (5 min)
- Least Recently Used Cache (5 min)
- Memcached (5 min)
- Exercise (10 min)
You will need Python 2.7 or 3.5 installed on your laptop. Python 2.6 or 3.3/3.4 should also work. Python 3.x is strongly preferred.
I will use an IPython Notebook for the tutorial because it makes a very good teaching tool. You are welcome to use the setup you prefer, i.e editor, IDE, REPL. If you also like to use an IPython Notebook, I recommend conda for easy installation. Similarly to virtualenv, conda allows creating isolated environments but allows binary installs for all platforms.
There are two ways to install IPython via conda:
- Use Minconda. This is a small install and (after you installed it) you can use the command conda to create an environment: conda create -n bilbao2016 python=3.5` Now you can change into this environment: ``source activate bilbao2016. The prompt should change to (bilbao2016). Now you can install IPython: conda install IPython.
- Install Anaconda and you are ready to go if you don't mind installing lots of packages from the scientific field.
The second option also gives you conda and you can create more environments just as with Miniconda (see 1.).
Working witch conda environments
After creating a new environment, the system might still work with some stale settings. Even when the command which tells you that you are using an executable from your environment, this might actually not be the case. If you see strange behavior using a command line tool in your environment, use hash -r and try again. Please install pip inside this environment:
conda install pip
You can install these with pip (in the active conda environment):
Using the package manager of your OS should be the best option.
0.5 days, July (day not fixed yet), 2016,
The participants can follow all steps directly on their computers. There are exercises at the end of each unit providing ample opportunity to apply the freshly learned knowledge.
Every participant receives comprehensive printed materials that cover the whole course content as wells as all source codes.
You need to register at EuroPython 2016.
The Python Academy is sponsor of PyCon US 2017.
The Python Academy is sponsor of PythonCamp Köln 2017.
The Python Academy is sponsor of Django Girls Leipzig 2016
The Python Academy is sponsor of PyCon DE 2016.
The Python Academy is sponsor of PyCon Ireland 2016.
The Python Academy is sponsor of EuroSciPy 2016.
The Python Academy is sponsor of PyCon US 2016.
The Python Academy is sponsor of PyData Berlin 2016.
The Python Academy is sponsor of PyCon Sweden 2016.
The Python Academy is sponsor of Python Unconference 2015.
The Python Academy is sponsor of EuroSciPy 2015.
The Python Academy is sponsor of EuroPython 2015.
The Python Academy is sponsor of PyData Berlin 2015.
The Python Academy is sponsor of PyCon Montréal 2015.
The Python Academy is sponsor of Python BarCamp Köln 2015.
The Python Academy is sponsor of Chemnitzer Linux-Tage 2015.
The Python Academy is sponsor of Django Girls Wroclaw 2015.
The Python Academy is sponsor of PyCon Ireland 2014.
The Python Academy is sponsor of EuroSciPy 2014.
The Python Academy is sponsor of PyData London 2014.
The Python Academy is sponsor of EuroPython 2014.
The Python Academy is sponsor of PyCon 2014 Montréal.
The Python Academy is sponsor of Python BarCamp Köln 2014.
The Python Academy is sponsor of PyConDE 2013.
The Python Academy is sponsor of EuroPython 2013.
The Python Academy is sponsor of PyCon US 2013.
The Python Academy is sponsor of EuroSciPy 2013.
The Python Academy is sponsor of PyConPL 2012.
The next open cousers
Python Academy sponsors EuroPython conference 2013
Python Academy sponsors EuroSciPy conference 2013
Python Academy sponsors Python BarCamp in Cologne
Next Meeting of Leipzig Python User Group, November 12, 2013
Introduction to Django, November 11 - 13, 2013
Professional Testing with Python, November 25 - 27, 2013
Advanced Django, January 13 - 15, 2014
Python Academy sponsors PyCon US conference 2013
Python Academy founder receives PSF Community Service Award