List of videos

Anjana Vakil - Exploring Python Bytecode

Anjana Vakil - Exploring Python Bytecode [EuroPython 2016] [20 July 2016] [Bilbao, Euskadi, Spain] (https://ep2016.europython.eu//conference/talks/exploring-python-bytecode) Do you ever wonder how your Python code looks to the interpreter? What those `.pyc` files are? Why one program outperforms another, even if the code is similar? Then let’s dive into Python bytecode! Bytecode is the "intermediate language" that expresses your source code as machine instructions the interpreter can understand. In this talk we’ll see what role it plays in executing Python programs, learn to read it with the `dis` module, and analyze it to better understand a program’s performance. ----- Do you ever wonder what your simple, beautiful Python code looks like to the interpreter? Are you starting to get curious about those `.pyc` files that always pop up in your project, and you always ignore? Would you like to start investigating your Python code's performance, and learn why some programs you write run faster than others, even if the code looks more or less the same? Have you simply fallen so completely in love with Python that you're ready to peer deep inside its soul? If you, like me, answered "yes" to any of these questions, join me in an illuminating adventure into the world of Python bytecode! Bytecode is the "intermediate language" that expresses your Python source code as machine instructions the interpreter (specifically CPython, the "standard" interpreter) can understand. Together we'll investigate what that means, and what role bytecode plays in the execution of a Python program. We'll discover how we simple humans can read this machine language using the `dis` module, and inspect the bytecode for some simple programs. We'll learn the meaning of a few instructions that often appear in our bytecode, and we'll find out how to learn the rest. Finally, we'll use bytecode to understand why a piece of Python code runs faster if we put it inside of a function. When you go home, you'll be able to use bytecode to get a deeper understanding of your Python code and its performance. The adventure simply starts here; where it ends is up to you!

Watch
Andreas Klostermann - Brainwaves for Hackers 3.0

Andreas Klostermann - Brainwaves for Hackers 3.0 [EuroPython 2016] [20 July 2016] [Bilbao, Euskadi, Spain] (https://ep2016.europython.eu//conference/talks/brainwaves-for-hackers-3) This talk is about using our **Python** skills to explore the **secrets of our brains**. Using the Neurosky Mindwave as a bluetooth connected EEG device, I'll talk about new experiments I have performed inside the Jupyter notebook, for example "Evoked Response Potentials" and more about "Neuro Feedback" training. ----- Electroencephalography **(EEG)** measures potential waves originating within the brain. Billions of brain cells fire inside your brain, each sending out a minuscule wave. The summed potential waves can be measured, even with quite cheap and **portable devices**. Being the third major version of this talk, I'll talk briefly about the Neurosky Mindwave and the Muse headset. I have also developed more interactive Jupyter experiments, which I'll demonstrate in the talk. For example **Evoked Response Potentials (ERP)** can be demonstrated with relatively simple means. Also I'll talk some more about experiments with **Neuro Feedback**.

Watch
Christie Wilson/Michael Tom-Wing - System Testing with pytest and docker-py

Christie Wilson/Michael Tom-Wing - System Testing with pytest and docker-py [EuroPython 2016] [20 July 2016] [Bilbao, Euskadi, Spain] (https://ep2016.europython.eu//conference/talks/system-testing-with-pytest-and-docker-py) System tests are an invaluable tool for verifying correctness of large scale online services. This talk will discuss best practices and tooling (pytest and docker-py) for writing maintainable system tests. Demonware has used System tests to verify online services for some of the biggest AAA video game launches as well as internal operational tools. Many folks who write software are familiar with unit testing, but far fewer with system testing. ----- System testing a microservice architecture is challenging. As we move away from monolithic architectures, system testing becomes more important but also more complicated. In the video game industry, if a game doesn’t work properly immediately after launch, it will heavily impact game success. We have found system testing to be an important tool for pre launch testing of game services and operational tools, to guarantee quality of these services at launch. We want to share with you best practices for system testing: when to write system tests, what to test and what not to, and common pitfalls to avoid. Using python’s pytest tool and docker-py for setting up services and their dependencies has made it easier than ever to write complex but maintainable system tests and we’ll share with you how we’ve made use of them. Developers (senior and junior) and ops folks can walk away from this talk with practical tips they can use to apply system testing to their software.

Watch
Mariano Anaya - Clean code in Python

Mariano Anaya - Clean code in Python [EuroPython 2016] [20 July 2016] [Bilbao, Euskadi, Spain] (https://ep2016.europython.eu//conference/talks/clean-code-in-python) Introduction to the clean code principles applied to Python code. Let's honor the readable nature of the Python syntax so anyone can maintain our code: "readability counts". This talk introduces general concepts of code quality and how they apply for Python. We analyse technical debt, refactoring, and unit testing in the context of a project striving for a better code base. ----- Introduction to the clean code principles tailored for Python projects. The goal is to achieve better code quality and a more maintainable code base. Python has a nature of being clear, and easy to follow, so let's take advantage of it in our own code, in order to enforce the principle "readability counts" by writing pythonic code. This talk introduces general concepts of code quality for Python developers, analyzing technical debt, with examples on how to achieve a more legible, maintainable and clean code base, by refactoring, writing unit tests and having good coding guidelines for the project. If you are giving your first steps with Python, you will gain insight on best practices for writing good software from the start. If you are a experienced developer, the ideas should work as food for thought, helping with recommendations for code reviews, best practices, etc.

Watch
Fernando Masanori Ashikaga/Paola Katherine Pacheco/Kátia Nakamura - import community

Fernando Masanori Ashikaga/Paola Katherine Pacheco/Kátia Nakamura - import community [EuroPython 2016] [20 July 2016] [Bilbao, Euskadi, Spain] (https://ep2016.europython.eu//conference/talks/import-community) One of the biggest differences, in the Python community, is its effort to improve diversity. The authors will share experiences on diversity obtained from ten different countries: Namibia, UK, Japan, Brazil, Italy, Argentina, Uruguay, Germany, Canada and Spain. There are other reports, that also we would like to share, which are only beautiful stories of how Python reaches the most distant people and places you may never have imagined. ----- One of the biggest differences, in the Python community, in relation to other communities, is its effort to improve diversity. There is even a Diversity Statement at PSF: "We have created this diversity statement because we believe that a diverse Python community is stronger and more vibrant. A diverse community where people treat each other with respect has more potential contributors and more sources for ideas." The authors will share experiences on diversity obtained from ten different countries: Namibia, UK, Japan, Brazil, Italy, Argentina, Uruguay, Germany, Canada and Spain. There are other reports that we also would like to share, which are only beautiful stories of how Python reaches the most distant people and places you may never have imagined.

Watch
Alex Vinyals - Ingesting 35 million hotel images with python in the cloud.

Alex Vinyals - Ingesting 35 million hotel images with python in the cloud. [EuroPython 2016] [19 July 2016] [Bilbao, Euskadi, Spain] (https://ep2016.europython.eu//conference/talks/ingesting-35-million-hotel-images-with-python-in-the-cloud) This talk covers the distributed architecture that Skyscanner built to solve the data challenges involved in the generation of images of all hotels in the world. Putting together a distributed system in Python, based on queues, surfing on the AWS Cloud. ----- Our goal? To build an incremental image processing pipeline that discards poor quality and duplicated images, scaling the final images to several sizes to optimise for mobile devices. Among the challenges: 1. Ingest all the input images that partners provide us. 2. Detect and remove bad quality + duplicated images from reaching production. 3. Resize all the generated images to optimise for mobile devices. 4. Ensure the process scales and behaves in an incremental way. 5. Ensure the whole process fits in a time constrained window. Among the tools we used? Pillow, ImageHash, Kombu and Boto.

Watch
Michał Karzyński - Building beautiful RESTful APIs using Flask

Michał Karzyński - Building beautiful RESTful APIs using Flask [EuroPython 2016] [22 July 2016] [Bilbao, Euskadi, Spain] (https://ep2016.europython.eu//conference/talks/building-beautiful-restful-apis-using-flask-1) This talk demonstrates a technique for developing RESTful APIs using Flask and Flask-Restplus. These tools automate common API tasks such as: validating input, serializing output, routing requests to methods, and turning Python exceptions into HTTP responses. The final API comes with a Swagger interactive UI, which documents all endpoints and makes testing easy. The described tools tools provide just enough syntactic sugar to make your code readable, scalable and easy to maintain. ----- Modern software is powered by APIs. User facing apps may run in the browser or on mobile platforms, but they almost universally rely on data stored in the cloud. More often then not apps use a RESTful API to exchange data with the server. In my talk I will demonstrate a technique for developing RESTful APIs using the [Flask][1] micro-framework and [Flask-Restplus][2]. These powerful tools automate most common tasks associated with API development: validating input, serializing output, routing requests to methods, and turning Python exceptions into machine-readable HTTP responses. A Flask-Restplus API is fully documented by [Swagger][3] which lists all defined endpoints, their query parameters and the format of input and output JSON objects. Swagger generates an [interactive UI][4] for selecting options and easily testing queries. Flask and Flask-Restplus provide just enough syntactic sugar to make your code readable, scalable and easy to maintain. My presentation will give an overview of the features of Flask and Flask-Restplus; I will describe how easy it is to get started and discuss some best practices for building complex APIs using this approach. I will wrap up by briefly mentioning other components of the Flask ecosystem, which give this micro-framework power to match fully- loaded systems such as Django. [1]: http://flask.pocoo.org/ [2]: http://flask-restplus.readthedocs.org/en/latest/ [3]: http://swagger.io/ [4]: http://petstore.swagger.io/#/pet

Watch
Malwina Nowakowska - RESTful API - Best Practices.

Malwina Nowakowska - RESTful API - Best Practices. [EuroPython 2016] [22 July 2016] [Bilbao, Euskadi, Spain] (https://ep2016.europython.eu//conference/talks/restful-api-best-practises) It is important to understand from the beginning how model API should look like. Do not repeat your friends’ mistakes and make developers upset! There are some simple rules that can make your API cooler - clean, safe and efficient. Based on both bad and good examples of REST APIs (I had to deal with) we will learn about best practices. ----- Nowadays building and integrating with Representational State Transfer web services is a very common thing. It seems that creating RESTful API is trivial - nothing could be more wrong. In my previous projects I had to integrate with lots of APIs. Unfortunately only some of them were easy to work with. Most of the APIs did not follow the main rules of model API. It is really important to understand how model REST API should look like. To make developers happy we will learn best practices of creating REST API from the beginning. We will start with quick introduction what REST is, why principle of REST is so amazing, talk about identifires and explain some key terms. We will discuss about architectall constraints and properties. Mistakes and best practices are based on my experience of developing and maintaining the projects. After this talk you will be able to create model RESTful API developers will be happy to work with.

Watch
Andrew Burrows - Testing the untestable: a beginner’s guide to mock objects

Andrew Burrows - Testing the untestable: a beginner’s guide to mock objects [EuroPython 2016] [22 July 2016] [Bilbao, Euskadi, Spain] (https://ep2016.europython.eu//conference/talks/testing-the-untestable-a-beginners-guide-to-mock-objects) In this session you will learn your way around Python 3’s unittest.mock package through examples. You’ll learn about the Mock class, sentinels and patching. You will see the benefits that mocks can bring and learn to avoid the pitfalls. Along the way I’ll fill you in on some of the bewildering terminology surrounding mocks such as “SUT”, “Stub”, “Double”, “Dummy” , “mockist” and more and I’ll give a brief plug for my own mockextras package that can enhance your mock experience. ----- Mock objects can be a powerful tool to write easy, reliable tests for the most difficult to test code. In this session you will learn your way around Python 3’s unittest.mock package starting at the simplest examples and working through progressively more problematic code. You’ll learn about the Mock class, sentinels and patching and how and when to use each of them. You will see the benefits that mocks can bring and learn to avoid the pitfalls. Along the way I’ll fill you in on some of the bewildering terminology surrounding mocks such as “SUT”, “Stub”, “Double”, “Dummy” , “mockist” and more and I’ll give a brief plug for my own mockextras package that can enhance your mock experience.

Watch