List of videos

Sebastian Buczyński - Refactoring legacy Django app using OOP
Refactoring legacy Django app using OOP [EuroPython 2021 - Talk - 2021-07-28 - Optiver] [Online] By Sebastian Buczyński Every year we can hear rumours about the demise of Object-Oriented Programming. As usual, they are greatly exaggerated. In 2021 OOP still has a lot to offer. The problem is a shortage of good quality materials that would show where it shines and how a Pythonista can leverage it without writing code that looks like Java from the 00s. I'll show you how you can refactor legacy code in a Django app and tame complex logic living there. Value for attendees: see refactoring possible directions and get to know 3 OOP stereotypes Level of attendees: intermediate & advanced Expected knowledge: Experience with building web apps, at least superficial knowledge about Django This talk is an introduction to 3 out of 8 OOP Stereotypes, i.e. Controller, Interfacer and Information Holder. They'll be introduced using a real-life legacy project refactoring. For the purpose of this talk, I'll be using code from this repo: https://github.com/Enforcer/django-refactor License: This video is licensed under the CC BY-NC-SA 4.0 license: https://creativecommons.org/licenses/by-nc-sa/4.0/ Please see our speaker release agreement for details: https://ep2021.europython.eu/events/speaker-release-agreement/
Watch
Stefan Behnel, David Woods - Fast native data structures: C/C++ from Python
Fast native data structures: C/C++ from Python [EuroPython 2021 - Talk - 2021-07-28 - Brian] [Online] By Stefan Behnel, David Woods Python has very fast and thoroughly optimised data structures: lists, dicts, sets and the collections module make it easy to write simple code that performs well. The flip-side shows when it comes to processing very large amounts of simple data, especially numbers or strings. For these, the object overhead of Python's objects is very large in comparison to the low-level languages C and C++ that benefit directly from bare metal CPU performance as well as from GIL-free multi-threading and parallel computation. This talk will show how compiling your Python code with Cython (https://cython.org/) enables you to make direct use of fast and memory efficient native data types and data structures. Cython provides very efficient ways to access the internals of Python data structures, process data from NumPy arrays, and use data structures from native C libraries or the C++ STL standard library as replacements for the high-level Python collections. You will learn how you can implement high-level Python interfaces that enable fast data processing underneath, without sacrificing the integration with regular Python features and libraries to allow for easy direct data manipulation from Python code. License: This video is licensed under the CC BY-NC-SA 4.0 license: https://creativecommons.org/licenses/by-nc-sa/4.0/ Please see our speaker release agreement for details: https://ep2021.europython.eu/events/speaker-release-agreement/
Watch
Irina Grechikhina - Sentry as a way not to be afraid
Sentry as a way not to be afraid [EuroPython 2021 - Talk - 2021-07-28 - Ni] [Online] By Irina Grechikhina Sentry is an open-source error tracking software. It allows you to know exactly what's going on with your web application in real-time and get detailed reports about occurred errors. Lot's of web developers used to rely only on app logs and generic monitoring software, but it's not enough. Multiple production servers, overwhelmed logging, lack of information about request content in case of error hinders problem investigation and produces permanent developer fear of changes. Sentry could ease the whole process and make you: stay calm during deployment, be sure your application works properly, solve problems before users report about it. During my talk, I will compare Sentry to ordinary logging, show how to use Sentry, explain how to read Sentry reports and demonstrate that its deployment is very easy. The whole demo will be done using Sentry hosted on my laptop. I will describe the problems I have faced up during sentry.io usage and explain why I prefer self-hosting. Also, I will share a link to my Github with docker-compose and ansible files to deploy your self-hosted Sentry, run through the whole idea and demonstrate that everything is clear and easy. Then I will show how to adjust the first project in Sentry and connect it to a working application in both backend and frontend parts. For each backend and frontend cases, there will be its separate part with examples when Sentry is useful and cannot be replaced by other tools and recommendations on how to make Sentry as effective as possible. My talk will be useful for web developers of any level who wants to ease the process of problem investigation and finds application logs not handy. License: This video is licensed under the CC BY-NC-SA 4.0 license: https://creativecommons.org/licenses/by-nc-sa/4.0/ Please see our speaker release agreement for details: https://ep2021.europython.eu/events/speaker-release-agreement/
Watch
Chiin-Rui Tan, Sara Nunnington - How Scientific Computing is advancing the world of Football
How Scientific Computing is advancing the world of Football [EuroPython 2021 - Talk - 2021-07-28 - Parrot [Data Science]] [Online] By Chiin-Rui Tan, Sara Nunnington In the ultra-competitive sporting world, the value of data and computing has been on the rise. When the difference between winning and losing, success and failure hinges on the smallest of margins, being able to calculate and implement optimal, timely decisions is literally game-changing, and potentially life-changing. Football, or Soccer to others, as the most popular sport in the world, perfectly illustrates the importance of computational data-empowered decisions, both on and off the pitch. This talk, accessible to beginner Pythonistas with intermediate football knowledge, provides the audience with an overview of popular applications of Python Scientific Computing & Data Science within the ecosystem of typically well-funded clubs, but emphasising the opportunities available to democratise such enabling tech more inclusively, and benefiting a more diverse base. Example takeaways are real-world use-cases involving spatio-temporal tracking & event data, Computer Vision/video AI, tactical analysis, and player insights. This talk ultimately supports the audience discovering this fast-growing domain and the role Python has and continues to play in advancing it globally. License: This video is licensed under the CC BY-NC-SA 4.0 license: https://creativecommons.org/licenses/by-nc-sa/4.0/ Please see our speaker release agreement for details: https://ep2021.europython.eu/events/speaker-release-agreement/
Watch
Mauro Pelucchi - Data Ingestion and Big Data
Data Ingestion and Big Data [EuroPython 2021 - Interactive session - 2021-07-28 - Argument-Clinic [Interactive]] [Online] By Mauro Pelucchi Web scraping, crawling and API are the first step to retrieve information to use for analysis and to start a new business. In this tutorial I'll show you how to use python to set up scraping and crawling processes, how to simulate users navigation and browser behavior with a ghost browser and how to hook up and use data APIs. I will also try to explain the technical and ethical aspects that we have to consider when we approach these kinds of challenges. License: This video is licensed under the CC BY-NC-SA 4.0 license: https://creativecommons.org/licenses/by-nc-sa/4.0/ Please see our speaker release agreement for details: https://ep2021.europython.eu/events/speaker-release-agreement/
Watch
Antonis Christofides - Why you always had trouble understanding metaclasses
Why you always had trouble understanding metaclasses [EuroPython 2021 - Talk - 2021-07-28 - Optiver] [Online] By Antonis Christofides "Smart people sometimes like to show off their smarts by demonstrating their mental juggling abilities. After all, if you can reliably remember that r is the lower-cased version of the url with the host and scheme removed, then you must clearly be very smart. One difference between a smart programmer and a professional programmer is that the professional understands that clarity is king." — Robert C. Martin, "Clean Code", p.25 Robert C. Martin says it’s hard to mentally translate one name (e.g. “r”) to another, and you can avoid it by using a better name (e.g. “urlPath”). But the problem is not just lost brainpower; it can also be misunderstanding. I’ve seen experienced Python programmers trying to teach Python “metaclasses” by explaining that a metaclass is the class of a class—which it isn’t. Metaclasses have a reputation of being difficult, but they actually become easy once you use the right term for them. Bad terminology can be far more damaging than just confusing people. In April 2021, the European Commission published a proposal for an Artificial Intelligence Act, which they proudly advertise as the “first ever legal framework on AI”. It has provisions such as prohibiting "an AI system that deploys subliminal techniques beyond a person’s consciousness in order to materially distort a person’s behaviour in a manner that causes or is likely to cause that person or another person physical or psychological harm.” What do they mean with "AI system"? Well, more or less... statistics. None of this would happen if we didn't use misleading terms such as "artificial intelligence". While I do get to metaclasses, the main part of this talk is a tour of bad names. The talk is suitable for all audiences, beginners and advanced alike. License: This video is licensed under the CC BY-NC-SA 4.0 license: https://creativecommons.org/licenses/by-nc-sa/4.0/ Please see our speaker release agreement for details: https://ep2021.europython.eu/events/speaker-release-agreement/
Watch
Markus Holtermann - An Introduction to Kubernetes
An Introduction to Kubernetes ☸️ [EuroPython 2021 - Talk - 2021-07-28 - Brian] [Online] By Markus Holtermann Every other job opening for an IT position mentions Kubernetes. But unless you’ve worked with Kubernetes or seen it in action, you probably only have a vague idea of what it is, what it does and can do, or how to use it. And that’s understandable. It’s this big, abstract, software, that is supposed to “solve all the problems”. In this talk I’ll go through some of the concepts Kubernetes has. We’ll approach these by deploying a Django application, with the intent, that next time somebody asks you, “Do you know Kubernetes?”, you can confidently answer “Yes!”. License: This video is licensed under the CC BY-NC-SA 4.0 license: https://creativecommons.org/licenses/by-nc-sa/4.0/ Please see our speaker release agreement for details: https://ep2021.europython.eu/events/speaker-release-agreement/
Watch
Kracekumar - Type Check your Django app
Type Check your Django app [EuroPython 2021 - Talk - 2021-07-28 - Ni] [Online] By Kracekumar Python 3 introduced type hints and it's optional to use. The decision to use the type-hints in the python community is in two different camps - Embrace and skeptical. Adding type-hints has practical problems. One such example is the working of type-checker, mypy, and CPython interpreter. mypy behaves like a statically typed language (strict with type declaration and modification) whereas Python run-time is lenient. Example a: int = 23 a = 'Django' Mypy will complain about the above code whereas Python run-time will not complain. In this talk, I'll cover the following topics: - how to add type-hints to Django project - views, models, and queryset. - Tools to help to add type-hints. - Adding type-hints to user-defined code. - Current limitation of the type-hints. - Tuning mypy to suit your needs - strict and lenient checking. All the example code snippets will run on Python 3.9.4+. References: - Type Hints: https://docs.python.org/3/library/typing.html - Mypy - http://mypy-lang.org/ - Django: https://www.djangoproject.com/ - Django Stubs - https://github.com/TypedDjango/django-stubs - Django Restframeowrk - https://www.django-rest-framework.org/ - Django Restframework stubs - https://github.com/typeddjango/djangorestframework-stubs License: This video is licensed under the CC BY-NC-SA 4.0 license: https://creativecommons.org/licenses/by-nc-sa/4.0/ Please see our speaker release agreement for details: https://ep2021.europython.eu/events/speaker-release-agreement/
Watch
Sylvain Marié - Powerful tests and reproducible benchmarks with `pytest-cases`
Powerful tests and reproducible benchmarks with `pytest-cases` [EuroPython 2021 - Talk - 2021-07-28 - Parrot [Data Science]] [Online] By Sylvain Marié pytest is undoubtedly the most popular test framework for python. Its fixture and parametrization mechanisms, as well as its detailed hook API and vibrant plugin ecosystem make it a must-know for any developer wishing to create quality software. Some key limitations in its engine and API, however, prevent users from truly unleashing their testing scenarii. Creating tests with complex parametrization is complicated, and users trying to explore this direction may loose the legendary elegance and maintainability of pytest tests on the way. pytest-cases extends pytest so that users can manage their parameters the same way they manage tests: as python functions. This separates test cases from test functions in an elegant way, encouraging developers to add more cases without decreasing readability. With this new paradigm it becomes ridiculously simple to create tests where several "kind" of parameters coexist nicely: datasets come both from files, databases and simulations ; distinct algorithms can be evaluated and compared, with possible variants ; etc. Fixtures can be leveraged by any of these, in an intuitive manner. Finally pytest-cases can also be used in combination with pytest-harvest to generate scientific results tables in a reproducible manner. Reproducible research projects may therefore wish to use it to replace an "ad-hoc" benchmark engine. That way, adding datasets and algorithms in the benchmark becomes as easy as creating new python functions. This presentation is for python developers and data scientists at ease with python, with basic experience of pytest. License: This video is licensed under the CC BY-NC-SA 4.0 license: https://creativecommons.org/licenses/by-nc-sa/4.0/ Please see our speaker release agreement for details: https://ep2021.europython.eu/events/speaker-release-agreement/
Watch