Rodrigo Girão Serrão
Rodrigo has always been fascinated by problem solving and that is why he picked up programming – so that he could solve more problems. He also loves sharing knowledge, and that is why he spends so much time writing articles in his blog mathspp.com/blog, writing on Twitter @mathsppblog, and giving workshops and courses. You can also find his past talks on https://mathspp.com/talks.
His main areas of scientific interest are mathematics (numerical analysis in particular) and programming in general (with a preference for the Python and APL languages), but Rodrigo also enjoys reading fantasy books, watching silly comedy movies and eating chocolate.
Sessions
In this hands-on tutorial we will reinvent the wheel!
We'll reinvent the wheel and implement the module itertools
in plain Python.
We'll do that because it's fun, but also because that will teach us a lot about Python:
- the difference between iterables and iterators;
- what the built-ins
iter
andnext
do; - how Python handles iterations and
for
loops under the hood; - what the iterator protocol is;
- how the dunder methods
__iter__
and__next__
play a part in all this; and - we'll also learn about the functions inside
itertools
, a module with plenty of useful tools for your day-to-day iterations.
To prepare for the tutorial, please
- have Python 3.12+ installed (ideally);
- clone this GitHub repository https://github.com/mathspp/the-little-book-of-itertools; and
- install the requirements (it's just pytest
).
In this hands-on tutorial we will reinvent the wheel!
We'll reinvent the wheel and implement the module itertools
in plain Python.
We'll do that because it's fun, but also because that will teach us a lot about Python:
- the difference between iterables and iterators;
- what the built-ins
iter
andnext
do; - how Python handles iterations and
for
loops under the hood; - what the iterator protocol is;
- how the dunder methods
__iter__
and__next__
play a part in all this; and - we'll also learn about the functions inside
itertools
, a module with plenty of useful tools for your day-to-day iterations.
To prepare for the tutorial, please
- have Python 3.12+ installed (ideally);
- clone this GitHub repository https://github.com/mathspp/the-little-book-of-itertools; and
- install the requirements (it's just pytest
).
How do you create an animation?
What if you want to morph a circle into a figure eight?
As it turns out, all you need is two or three functions and a loop!
In this live-coded talk, we'll go over the basic concepts and code needed to create an animation from first principles.
Because the talk presents the ideas and the code from first principles, you will be able to take the key concepts and build your own animations after!
We'll start simple and build from there:
- How can you draw a circle if all you can do is colour single pixels?
- How can you animate the process of drawing a circle?
- How can you animate the process of drawing something other than a circle?
- How can you animate the process of morphing two figures?
- How do you add colour to your animations?
This visually appealing talk will show you all of the code without skipping a single line and by the time we're done you'll be jumping in your seat to create your own animations!