Speakers might have different preferences on how they want to Q&A session to be. Please ask them. Here go 3 examples:
If you have any problems, concerns, or questions, try to contact someone on the europython-volunteers
Telegram channel (http://bit.ly/28QF0FM).
Otherwise you can contact:
To moderate a Q&A section, please:
In [54]:
%%javascript
IPython.OutputArea.auto_scroll_threshold = 99999;
//increase max size of output area
In [55]:
import json
import datetime as dt
from operator import itemgetter
from IPython.display import display, HTML
from nbconvert.filters.markdown import markdown2html
In [56]:
talk_sessions = json.load(open('accepted_talks.json'))
talks_admin_url = 'https://ep2016.europython.eu/admin/conference/talk'
In [57]:
show = lambda s: display(HTML(s))
def ordinal(n):
if 10 <= n % 100 < 20:
return str(n) + 'th'
else:
return str(n) + {1 : 'st', 2 : 'nd', 3 : 'rd'}.get(n % 10, "th")
def talk_schedule(start, end):
input_format = "%Y-%m-%d %H:%M:%S"
output_format_day = "%A, %B"
output_format_time = "%H:%M"
output_date = lambda d: "{} {} at {}".format(d.strftime(output_format_day),
ordinal(int(d.strftime('%d'))),
d.strftime(output_format_time))
start_date = dt.datetime.strptime(start, input_format)
end_date = dt.datetime.strptime(end , input_format)
return output_date(start_date), output_date(end_date)
def show_talk(talk, show_duration=True, show_link_to_admin=True):
speakers = talk['speakers']
title = talk['title']
abstract = talk['abstract_long'][0]
room = talk.get('track_title', '').split(', ')[0]
timerange = talk.get('timerange', '').split(';')[0]
show('<h2>{}</h2>'.format(title))
if show_link_to_admin:
talk_admin_url = talks_admin_url + '/{}'.format(talk['id'])
show('<a href={0}>{0}</a>'.format(talk_admin_url))
if show_duration:
duration = '{} mins.'.format(talk['duration'])
else:
duration = ''
timerange = talk['timerange'].split(';')[0]
try:
start, end = talk_schedule(*timerange.split(', '))
except:
start, end = ('', '')
if start:
schedule = '<p>'
schedule += '{} in {}'.format(start, room)
if show_duration:
schedule += ' ({})'.format(duration)
schedule += '</p>'
show(schedule)
show('<h3><i>{}</i></h2>'.format(speakers))
show('<p>{}</p>'.format(markdown2html(abstract)))
show('<br/>')
In [58]:
#session_names = ['Keynotes', 'Talks', 'Trainings', 'Help desks',
# 'EuroPython sessions', 'Other sessions', 'Poster sessions']
from collections import OrderedDict
session_names = [('Keynote', 'Keynotes'),
('talk', 'Talks'),
('training', 'Tutorials'),
('poster', 'Posters'),
('helpdesk', 'Helpdesks'),
('EPS session', 'EuroPython Society Sessions'),
('Recruiting session', 'Recruiting'),
('interactive', 'Interactive sessions'),
('Reserved slot', 'TALKS'),
('Lightning talk', 'TALKS'),
('Closing session', 'Closing session'),
]
session_names = OrderedDict(session_names)
In [62]:
sessions_talks = OrderedDict()
# remove the IDs from the talks
for name, sess in talk_sessions.items():
sessions_talks[name] = [talk for tid, talk in sess.items()]
# add 'start' time for each talk
for name, talks in sessions_talks.items():
for talk in talks:
tr = talk['timerange']
if not tr:
talk['start'] = datetime.now()
else:
talk['start'] = datetime.strptime(tr.split(',')[0].strip(), "%Y-%m-%d %H:%M:%S")
# sort by
keys = ('start', 'track_title')
from operator import itemgetter
for sess, talks in sessions_talks.items():
sessions_talks[sess] = sorted(talks, key=itemgetter(*keys))
# get weekdays
for talktype, talks in sessions_talks.items():
In [21]:
for talktype, talks in sessions_talks.items():
session_name = 'Session {} {} {}'.format(datetime.weekday())
show('<h1>{}</h1>'.format('Session '))
talks = talk_sessions[key]
talks = [talks[talk_id] for talk_id in talks]
talks = sorted(talks, key=itemgetter('title'))
for talk in talks:
show_talk(talk, show_duration=False, show_link_to_admin=False)
Keynotes
20 years without a 'proper job'
Monday, July 18th at 09:15 in A1
Rachel Willmer
Have you ever wondered how you could be your own boss? If so, then this talk is for you.
Maybe you're working on a sideproject and wonder how you could make some money from it? Or maybe you have the idea for the next Facebook or Uber?
To be a coder in today's world of work is to have amazing opportunities to design the business life you want. You can work remotely; you can write books, or teach, or consult, with anyone anywhere.
You can have a crazy idea on Friday and have it running by Monday. Design your architecture to use cloud computing, so your tiny team can scale up your huge ideas.
Or keep it small, and just earn some extra money with a Wordpress plugin, or a training course.
It has been 21 years since I last had a 'real job' and a regular income.
I survived creating and running a company through the madness of the dotcom years. I made money from sideprojects, that I had started just for fun and for learning. I have freelanced without needing to use an agency to find the work.
And now I'm bootstrapping my current business to profitability. Listen to my stories and learn from my mistakes and successes.
A Million Children (and MicroPython)
Monday, July 18th at 13:45 in A1
Nicholas Tollervey
The BBC micro:bit is a small programmable device for children. A million of them have been handed out to the UK's 11 and 12 years olds. The Python Software Foundation was a partner in this moon-shot scheme and, thanks to the efforts of Damien George, MicroPython (a full reimplementation of Python 3) runs on the device.
My talk will tell the story of the project, describe Python's role in it and explain how the wider Python community can become involved. It may involve demonstrations, live coding and audience participation.
Come for the Language, Stay for the Community
Thursday, July 21st at 09:15 in A1
Naomi Ceder
Python is a powerful and flexible tool that many of us love and use in many ways. And yet, as wonderful as the language is, many would say that the community is even more attractive. This talk will focus on involvement in the Python community and what that means - in particular the many personal, social, and professional benefits that flow from involvement in a community like ours.
I will also discuss what the Python Software Foundation does, what its goals and purpose are, and how everyone in the community can take part in the PSF to help build even better Python communities. This will include specific explanations of the membership model and how active contributors (both in terms of code and community organisation) can and should become full voting members of the PSF.
I will also touch on our strengths, like our commitment to safe and inclusive spaces and our devotion to education, and also look at some of the challenges we face as a community going forward.
Inside the Hat: Python @ Walt Disney Animation Studios
Tuesday, July 19th at 09:15 in A1
Paul Hildebrandt
The Walt Disney Animation Studios has a long history of creating acclaimed animated films and continues to be an industry leader with regards to artistic achievements, storytelling excellence, and cutting-edge innovations. Since the 1923 release of Snow White they’ve been pushing forward technology in the art of movie making. This push continues in the modern day with classics such as Oscar winning box office hits "Big Hero 6" and “Frozen” and Oscar nominated hits “Wreck-It Ralph”, “Tangled”, “Bolt”, “Treasure Planet”, and “Dinosaur”.
One of the most common questions we get when attending PyCon is “Why are you here?” People seem confused that technology, especially Python is used in the making of animated films.
To dive into exactly where Python is used without context would be confusing so Paul will give the audience some background on the Walt Disney Animation Studios. He will talk about what we’ve done and what we are currently working on.
The main part of the talk is describing the production process whilst imparting this information he will interject where technology and specifically Python comes into play. He will describe the tools in each area and the tech stack used to create them.
He will then dive more deeply into the products he owns and discuss python in general at Disney.
This talk won't be recorded.
LIGO: The Dawn of Gravitational Wave Astronomy
Wednesday, July 20th at 09:15 in A1
Jameson Rollins
Scientists have been searching for the elusive gravitational wave for more than half a century. On September 14, 2015, the Laser Interferometer Gravitational-wave Observatory (LIGO) finally observed the gravitational wave signature from the merger of two black holes. This detection marks the dawn of a new age of gravitational wave astronomy, where we routinely hear the sounds emanating from deep within the most energetic events in the Universe. This talk will cover the events leading up to one of the most important discoveries of the last century, and the myriad of ways in which Python enabled the effort.
Scientist meets web dev: how Python became the language of data
Friday, July 22nd at 09:15 in A1 [PyData Track]
Gaël Varoquaux
Python started as a scripting language, but now it is the new trend everywhere and in particular for data science, the latest rage of computing. It didn't get there by chance: tools and concepts built by nerdy scientists and geek sysadmins provide foundations for what is said to be the sexiest job: data scientist.
In my talk I'll give a personal perspective, historical and technical, on the progress of the scientific Python ecosystem, from numerical physics to data mining. What made Python suitable for science; How could scipy grow to challenge commercial giants such as Matlab; Why the cultural gap between scientific Python and the broader Python community turned out to be a gold mine; How scikit-learn was born, what technical decisions enabled it to grow; And last but not least, how we are addressing a wider and wider public, lowering the bar and empowering people.
The talk will discuss low-level technical aspects, such as how the Python world makes it easy to move large chunks of number across code. It will touch upon current exciting developments in scikit-learn and joblib. But it will also talk about softer topics, such as project dynamics or documentation, as software's success is determined by people.
Talks
A Gentle Introduction to Neural Networks (with Python)
Friday, July 22nd at 10:30 in A1 [PyData Track]
Tariq Rashid
A gentle introduction to neural networks, and making your own with Python.
This session is deliberately designed to be accessible to everyone, including anyone with no expertise in mathematics, computer science or Python.
From this session you will have an intuitive understanding of what neural networks are and how they work. If you are more technically capable, you will see how you could make your own with Python and numpy.
Part 1 - Ideas:
- the search for AI, hard problems for computers easy fro humans
- learning from examples (simple classifier)
- biologically inspired neurons and networks
- training a neural network - the back propagation breakthrough
- matrix ways of working (good for computers)
Part 2 - Python:
- Python is easy, and everywhere
- Python notebooks
- the MNIST data set
- a very simple neural network class
- focus on concise and efficient matrix calculations with bumpy
- 97.5% accuracy recognising handwritten numbers - with just a few lines of code!
Part 3 - Q&A
A deep dive into the Pymongo MongoDB driver
Thursday, July 21st at 15:45 in Barria 2
Joe Drumgoole
The Pymongo driver is one of MongoDB’s most popular driver interfaces for
connecting to MongoDB. But developers rarely look under the cover to see
what’s happening inside the driver.
By having a deeper insight into how the driver constructs server requests
and responds, developers will be able to write more effective MongoDB
applications in Python.
We will look at :
-
Initial connection
A query
A simple write operation
A bulk write operation
How the driver responds when we have a node failure
We will also give insight into the driver’s approach to server selection
when connecting to a replicas set (a multi-node instance of MongoDB).
APIs and Microservices With Go
Tuesday, July 19th at 15:45 in A2
Vinicius Pacheco
This talk is about Go, software architecture and parallelism. How we went from legacy, complex and slow software to new, speed, resilient and maintainable software.
I'll start the talk showing the problemas and the challenges that my team had received. After that, I'll show the tests, tests of performance and the options that we did considering technologies and strategies of development. The difficulties and problems also will be show. Also I talk about:
- Goroutines
- Resilient patterns
- Go tools
- Architecture
- Web performance
How we leave of the Java ecosystem to new free ecosystem with microservices and how Go help us.
AWS lambda & Python
Gianluca Nieri
AWS Lambda is a compute service where you can upload your code to AWS Lambda and the service can run the code on your behalf using AWS infrastructure. Just write your code, upload it in the cloud and bind it to API calls, event triggers, or schedule it to be run whenever you want.
In this talk I will present you:
- Python SDK;
- Programming model (handler, context, logging, etc);
- API Gateway;
- DynamoDB;
- Creating a deployment package or PIP in the cloud!
Against the silos: usable encrypted email & the quest for privacy-aware services
Wednesday, July 20th at 14:30 in Jetbrains Room
Kali Kaneko
Technologies that allow for privacy in the communications, allowing the escape from the pervasive massive surveillance, have been there for some years now, but yet its use by the general public is far from widespread. The challenge, in our view, can be defined by one of making usable crypto. Usable for the end user, usable for the sysadmin and for the fellow application developer. In the quest for massive adoption of encryption technologies, we've been forging several python packages to solve different problems, always standing in the shoulders of giants.
We bring some tales from the trenches to share, from our humble experience trying to deploy clients and servers to provide Secured Encrypted Internet Tunnels and Encrypted Email. This includes interesting challenges dealing with key management, automatic and secure software updates, and processing of email while using stock cloud providers, while still being resistant to hostile environments.
We'll show a webmail email user agent based on this architecture, a promising future for decentralization and privacy.
We'll also talk about how to store locally encrypted data, and will present Soledad (Synchronization of Locally Encrypted Data Across Devices). Soledad is a library with server and client components that allows the development of different applications based on client-side, end-to-end and cloud-syncable encryption of private data. We'll play with some toy apps to showcase its features and potential.
Algorithmic Trading with Python
Thursday, July 21st at 14:30 in Barria 1
iztok kucan, Joris Peeters
Have you ever wondered what technologies are used in a systematic trading system that utilises computer models and accounts for the majority of trading on the stock market? This is a look behind the scenes at Winton Capital Management- one of Europe’s most successful systematic investment managers. In this talk, we’ll run through an overview of Winton’s trading infrastructure, including data management, signal generation and execution of orders on global exchanges. The talk will mainly focus on how Python gives researchers fine-grained control over the data and trading systems, without requiring them to interact directly with the underlying, highly-optimised technology.
An Introduction to Deep Learning
Friday, July 22nd at 11:15 in A1 [PyData Track]
Geoff French
In the last few years, deep neural networks have been used to generate state of the art results in image classification, segmentation and object detection. They have also successfully been used for speech recognition and textual analysis. In this talk, I will give an introduction to deep neural networks. I will cover how they work, how they are trained, and a little bit on how to get going. I will briefly discuss some of the recent exciting and amusing applications of deep learning. The talk will primarily focus on image processing.
Analyzing Data with Python & Docker
Thursday, July 21st at 10:30 in Barria 2
Andreas Dewes
Docker is a powerful tool for packaging software and services in containers and running them on a virtual infrastructure. Python is a very powerful language for data analysis. What happens if we combine the two? We get a very versatile and robust system for analyzing data at small and large scale!
I will show how we can make use of Python and Docker to build repeatable, robust data analysis workflows that can be used in many different contexts. I will explain the core ideas behind Docker and show how they can be useful in data analysis. I will then discuss an open-source Python library (Rouster) which uses the Python Docker-API to analyze data in containers and show several interesting use cases (possibly even a live-demo).
Outline:
- Why data analysis can be frustrating: Managing software, dependencies, data versions, workflows
- How Docker can help us to make data analysis easier & more reproducible
- Introducing Rouster: Building data analysis workflows with Python and Docker
- Examples of data analysis workflows: Business Intelligence, Scientific Data Analysis, Interactive Exploration of Data
- Future Directions & Outlook
Another pair of eyes: Reviewing code well
Thursday, July 21st at 14:00 in Barria 2
Adam Dangoor
Many of us have been taught to code, but we know that software engineering is so much more than that. Programmers can spend 5-6 hours per week on code review, but doing that is almost ignored as a skill, and instead it is often treated as a rote chore.
How many of us have seen poor reviews - those which upset people, don't catch bugs or block important features being merged? This talk explores the social and technical impacts of various code review practices as well as helpful tooling. The goal is to provide a structure to help improve how teams review code, and to introduce the costs and benefits of code review to anyone unfamiliar with the practice.
There are always trade-offs to be made - e.g. think how costly a security flaw in this code could be to your organisation - perhaps intense scrutiny is not necessary for prototypes soon to be thrown away. It is useful to consider the trade-offs in order to optimise for a particular problem domain. Perhaps right now it is more important to look for issues with maintainability, functionality or performance.
I talk about how some fantastic code reviews from mentors, colleagues and strangers have helped me become a better programmer and team member, as well as occasions where code review has been detrimental by slowing things down and causing arguments.
This is aimed at everyone from beginner to advanced programmers.
Asynchronous network requests in a web application
Thursday, July 21st at 10:30 in A1
Lauris Jullien
In the more and more popular SOA paradigm, it’s common for services to have to compose responses with resources from many different services. Everyone’s first idea will probably be to call each service synchronously with your favorite python HTTP library. This unfortunately doesn’t scale well and tens of successive network calls will make your endpoints painfully slow.
One solution is to parallelize these network calls. If you are already using an asynchronous web app (such as Tornado or Twisted), more asynchronous in your asynchronous shouldn’t be much of a challenge. But if you chose not to dive into the madness of chained Deferred calls, and used a standard prefork/threaded WSGI web server (such as Gunicorn or uWSGI) to run your Django/Flask/Pyramid application, you might find yourself wondering how to manage these asynchronous calls.
This talk will explore different solutions (running Twisted event loop, Co-Routines, Asyncio, …) and how well they play with the different parallelization models of WSGI web servers.
Automate, contribute, repeat.
Tuesday, July 19th at 12:00 in Jetbrains Room
Theo Crevon
Computers are never as convenient as when they work for us. If you agree with this motto, then Ansible, a deployment and automation tool written in Python, might come in handy.
At Ableton, Ansible is involved in every aspect of deployment and automation. From local machine setup, to vm creation and deployment in our self-hosted datacenter, to our services in the immensity of the cloud.
Because it is dead simple to use, can deal with any number of hosts in parallel and has robust compatibility with Unix as well as Windows systems, you will probably never have to write a shell script again.
Because it is written in Python and exposes a clean, extensible and easy to adapt design and architecture; contributing features to the project and fixing the bugs you might encounter during the journey is extremely easy.
At Ableton we love music and we love open-source. Ansible is an amazing tool which allows us to free more time for music by automating boring and repetitive tasks, and to contribute back to the open-source community with ease. Here's an opportunity to share our love for it, our experience with it, and our contributions to it with you.
Automate, contribute, repeat.
Behind Closed Doors: Managing Passwords in a Dangerous World
Monday, July 18th at 16:00 in A2
Noah Kantrowitz
Secrets come in many forms, passwords, keys, tokens. All crucial for the operation of an application, but each dangerous in its own way. In the past, many of us have pasted those secrets in to a text file and moved on, but in a world of config automation and ephemeral microservices these patterns are leaving our data at greater risk than ever before.
New tools, products, and libraries are being released all the time to try to cope with this massive rise in threats, both new and old-but-ignored. This talk will cover the major types of secrets in a normal web application, how to model their security properties, what tools are best for each situation, and how to use them with major web frameworks.
Beyond scraping, getting data from dynamic, heavily javascript driven, websites
Wednesday, July 20th at 11:15 in Barria 2
Anthon van der Neut
Scraping static websites can be done with urllib2
from the standard library, or with some slightly more sophisticated packages like requests
.
However as soon as JavaScript comes into play on the website you want to download information from, for things like logging in via openid or constructing the pages content, you almost always have to fall back to driving a real browser.
For web sites with variable content this is can be time consuming and cumbersome process.
This talk show how a to create a simple, evolving, client server architecture combining zeromq, selenium and beautifulsoup, which allows you to scrape data from sites like Sporcle, StackOverflow and KhanAcademy. Once the page analysis has been implemented regular "downloads" can easily be deployed without cluttering your desktop, your headless server and/or anonymously.
The described client server setup allows you to restart your changed analysis program without having to redo all the previous steps of logging in and stepping through instructions to get back to the page where you got "stuck" earlier on. This often decreases the time between entering a possible fix in your HTML analysis code en testing it, down to less than a second from a few tens of seconds in case you have to restart a browser.
Using such a setup you have time to focus on writing robust code instead of code that breaks with every little change the sites designers make.
Brainwaves for hackers 3
Wednesday, July 20th at 10:30 in Barria 2
Andreas Klostermann
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.
Build your Microservices with ZeroMQ
Wednesday, July 20th at 14:00 in A1
Floris Bruynooghe
Microservices is the popular term for the trend to build backend
architectures as a number of smaller independent processes. As an
evolution from the Service Oriented Architecture the core aims are to
create independent services which are easy to operate and even replace
while all of them together compose into providing the business logic
required for your application.
While it is rather common for microservices to choose JSON over HTTP
to communicate with each other, this is purely an implementation
choice. HTTP is a protocol using a strict request-response format,
this can become a little burdensome when needing to deal with
asynchronous requests and forces some architectural descisions to be
not as ideal as they could be. ZeroMQ has more flexible communication
patterns allowing for easier mapping of real-life interactions between
services. Coupled with an easy to use asynchronous user-level API and
very fast underlying communication on persistent TCP connections
ZeroMQ is a rather attractive transport to build your microservices
based applications in.
This talk will show how to use ZeroMQ within Python to build your
microservices. It will show the benefits of ZeroMQ's asynchronous
API, common usage patterns and how to handle backpressure.
Furthermore different communication patterns will be explored and the
impact this has on how to simplify the overall architecture using
these patterns.
Build your first OpenStack application with OpenStack PythonSDK
Tuesday, July 19th at 11:15 in Barria 2
Victoria Martinez de la Cruz
How many times you heard about OpenStack and all the cool things it is being used for? Most of the use cases are big players that need to handle huge amounts of data and automate complex infrastructures. But what about actually using it, for you as a developer, to deploy a simple app? In my case, at least, that has not be an usual topic of discussion when talking about OpenStack. In this talk I'll introduce the OpenStack Python SDK, a project relatively new in the OpenStack ecosystem, and show you step by step how to deploy your own web app using different components in OpenStack.
Building Service interfaces with OpenAPI / Swagger
Wednesday, July 20th at 12:00 in Barria 1
Stephan Jaensch
Implementing a service-oriented architecture (SOA) is a proven way to split up large monolithic codebases and to scale development when your organization grows to hundreds or thousands of engineers. I'm going to explore how to build and document your services with OpenAPI (formerly known as Swagger). I’ll discuss the benefits and why you should standardize on the API and protocols, but not on SDKs or client libraries. Find out how to make sure the caller as well as your service is conforming to the specification by using request and response validation, how to generate a beautiful HTML documentation for your API, and how you can effortlessly make calls to your services. I'll also discuss and tell you how to overcome challenges you might face, gathered from over a year of heavy usage at Yelp for hundreds of services. I'll present the OpenAPI tools and libraries available for the Python ecosystem for client and server development.
The OpenAPI initiative is a cross-vendor consortium focused on creating, evolving and promoting a vendor neutral description format. As an open governance structure under the Linux Foundation, its members include Google, IBM, Atlassian and PayPal.
Building a reasonably popular web application for the first time.
Wednesday, July 20th at 12:00 in A2
Erik Näslund
My name is Erik Näslund - I’m the co-founder and Head of Engineering at Hotjar.
I'd love to share the lessons learned when scaling a SaaS web application which grew much faster than any one us could have ever expected.
Words like “big” and “popular” carry very little meaning, so let me define how big Hotjar is right now using some numbers.
We onboard about 500 new users on a daily basis.
We process around 250 000 API requests every minute.
Our CDN delivers about 10 TB of data per day.
We have roughly 3 TB of data in our primary data store (PostgreSQL), another 1 TB in our Elasticsearch cluster, and a LOT more on Amazon S3.
These are the key things we wish we knew when we started. They would have made our life so much easier!
- Log and monitor from day one.
- Have a way to profile your API calls.
- Things will fail, be sure you know when they do.
- Have a way to keep secrets.
- Everything needs a limit (even if it's really big).
- Be wary of hitting data type limits.
- Don't get too attached to a framework.
- Choose components which allow language interoperability.
- Horizontally scalable everything.
- Plan for database downtime.
- Features are a great way to test things out before launching them to the public.
- Have a way to share settings between back end and front end.
- Have a way to enter maintenance mode.
- Require different quality of code for different parts of your application.
Building beautiful RESTful APIs using Flask
Friday, July 22nd at 14:00 in Barria 2
Michał Karzyński
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 micro-framework and Flask-Restplus. 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 which lists all defined endpoints, their query parameters and the format of input and output JSON objects. Swagger generates an interactive UI 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.
Buildout Django eta Fabric. Kasu praktikoa euskarazko tokiko hedabideetan
Wednesday, July 20th at 15:45 in Barria 1
Jatsu Argarate
Hainbat bezerorentzako neurrira egindako edukiak kudeatzeko plataforma bat garatu dugu Django Frameworka erabiliz. Guztia kudeatzeko eta erabilitako bertsioak kontrolatzeko zc.buildout erabiltzen dugu, baina plataforma hazten doa eta iada dozena bat instalazio ditugu hainbat zerbitzaritan zehar banatuta. Plataformaren oinarria berbera denez, instalazio guztietan eguneraketak argitaratzeko buildout eta fabric-en oinarritutako sistema erabiltzen dugu.
Hitzaldi honetan azalduko duguna.
CFFI: calling C from Python
Wednesday, July 20th at 12:00 in Barria 2
Armin Rigo
I will introduce CFFI, a way to call C libraries from Python.
http://cffi.readthedocs.org/
CFFI was designed in 2012 to get away from Python's C extension modules,
which require hand-written CPython-specific C code. CFFI is arguably
simpler to use: you call C from Python directly, instead of going
through an intermediate layer. It is not tied to CPython's internals,
and works natively on two different Python implementations: CPython and
PyPy. It could be ported to more implementations.
It is also a big success, according to the download statistics. Some
high-visibility projects like Cryptography have switched to it.
Part of the motivation for developing CFFI is that it is a minimal layer
that allows direct access to C from Python, with no fixed intermediate C
API. It shares ideas from Cython, ctypes, and LuaJIT's ffi, but the
non-dependence on any fixed C API is a central point.
It is a possible solution to a problem that hits notably PyPy --- the CPython C API. The CPython C API was great and, we can argue, it contributed a lot to
the present-day success of Python, together with tools built on top of
it like Cython and SWIG. However, it may be time to look
beyond it. This talk will thus present CFFI as such an example.
This independence is what lets CFFI work equally well on CPython and
on PyPy (and be very fast on the latter thanks to the JIT compiler).
Clean code in Python
Wednesday, July 20th at 15:45 in Barria 2
Mariano Anaya
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.
CloudABI: Capability based security on Linux/Unix
Tuesday, July 19th at 11:15 in Jetbrains Room
Alex Willmer
CloudABI is a new POSIX based computing environment that brings capability-based security to BSD, Linux, OSX et al.
Unlike traditional Unix, if a CloudABI process goes rogue it cannot execute random binaries, or read arbitrary files. This is achieved by removing open()
& any other API able to acquire global resources. Instead a CloudABI process must be granted capabilities to specific resources (e.g. directories, files, sockets) in the form of file descriptors. If a process only has a descriptor for /var/www
then it's incapable of affecting any file or folder outside that directory.
This talk will
- Review the security & reusability problems of Linux & Unix processes
- Introduce capability-based security
- Summarize the design of CloudABI - its benefits & trade-offs
- Demonstrate how to write Python software for CloudABI & run it
- Point out the pitfalls & gotchas to be aware of
- Discuss the current & future status of CloudABI
CloudABI began life on FreeBSD. It also runs DragonFly BSD, NetBSD, PC-BSD, Arch Linux, Debian, Ubuntu, & OS X. The API & ABI are kernel agnostic - a CloudABI binary can run on any supported kernel. The design is evolved from Capsicum, a library that allows processes to drop access to undesired syscalls at runtime. CloudABI applies this at build time to make testing & lock-down easier.
Conda - Easier Installs and Simpler Builds
Tuesday, July 19th at 14:30 in A1
Mike Müller
The BSD license conda
is a package installer for Python and other languages.
While it originates form the scientific Python community, it can be really useful for
all Python programmers.
Installation of Python packages has become much simpler over the last years.
The use of pip
and virtualenv
simplify the installation of Python packages a lot.
However, they are specific to Python. The Python-agnostic conda
has advantages
for packages with C or Fortran extension that are very common for scientific libraries.
conda
is cross-platform. According to different statistics, the most Python users work on Windows. Often is especially complicate to get extensions with many dependencies installer on this platform. conda
facilities the installation for Windows considerably.
This talk introduces the basic usage of conda
to install packages. This includes the basic commands for searching and installing of packages. Furthermore, the talk demonstrates the creation of environments for different Python versions and combinations of packages.
The building of a packages is simple. The talk shows how to build recipes that contain declarations of dependencies .
conda
can work together with pip
. This allows to use all packages from the Python Package Index ( PyPI). The talk explains the concept of channels that allow to get packages from different sources.
Create secure production environment using Docker
Monday, July 18th at 16:00 in Barria 1
Andrés Cidel
Docker is a relatively new technology platform that helps teams develop, deploy and scale applications with greater ease and speed. However, there are doubts about using Docker in production environments. One important reason is that containers don't provide the same security layer as hypervisors do.
The purpose of this talk is pointing out that using Docker in production is perfectly valid, not just for develop and CI environments.
We'll learn:
- How Docker works.
- Main risks.
- How create and maintain secure images.
- How defend containers.
- How delimit security risks in containers.
- Best practices for running containers.
Data Formats for Data Science
Thursday, July 21st at 10:30 in Jetbrains Room [PyData Track]
Valerio Maggio
The plain text is one of the simplest yet most intuitive format in which data could be stored.
It is easy to create, human and machine readable,
storage-friendly (i.e. highly compressible), and quite fast to process.
Textual data can also be easily structured; in fact to date the
CSV (Comma Separated Values) is the most common data format among data scientists.
However, this format is not properly suited in case data require any sort of internal
hierarchical structure, or if data are too big to fit in a single disk.
In these cases other formats must be considered, according to the shape of data, and the
specific constraints imposed by the context.
These formats may leverage general purpose solutions, e.g. [No]SQL databases, HDFS (Hadoop File System);
or may be specifically designed for scientific data, e.g. hdf5, ROOT, NetCDF.
In this talk, the strength and flaws of each solution will be discussed, focusing on their usage for scientific computations. The goal is to provide some practical guidelines for data scientists, derived from the the comparison of the different Pythonic solutions presented for the case study analysed. These will include
xarray
,
pyROOT
vs rootpy
, h5py
vs PyTables
, bcolz
, and blaze
.
Finally, few notes about the new trends for columnar databases (e.g. MonetDB) will be also presented, for very fast
in-memory analytics.
Datu bistaratze soluzioen garapena Smartcity proiektuetan
Wednesday, July 20th at 14:00 in Barria 1
Iker Martinez de Agirre Mendia
Mondragon Unibertsitateko inbestigazio taldea Smartcity-en aplikazio eta monitorizazioen inguruko proiektuetan lanean ari da, non herrialde ezberdinetako gune konkretuetan bizi diren pertsonen kontsumo energetikoa jaso eta aztertzen den. Proiektu hauetako bi CITyFiED eta ARROWHEAD dira.
Kontsumo hori eta horren harira ondorioztatutako aholku energetikoak erabiltzailearengana heltzeko, bistaratze soluzio bat garatu da, web orrialde bat alegia.
Erabiltzailean oinarritutako diseinua (User Centered Design) aplikatuz, gailu ezberdinetara moldatzen den (Responsive Web Design, Mobile-First) web bat sortu da, Django Web Framework tresnaren bitartez. REST API (Django Rest Framework) baten bidez, informazioa gordetzen den datu basea atzitzen da, kontsumoak eta beraien bilakaera bistaratze libreriak (D3.js) erabiliz irudikatuz. Horrez gain, Djangok eskaintzen dituen aukerak baliatuz, web orrialdea hizkuntza ezberdinetan bistaratu daiteke.
Laburbilduz, kontsumo energetikoaren datuak modu sinple eta argi batean bistaratzen dituen web orrialde bat sortu da Django erabiliz."
Deep Learning with Python & TensorFlow
Friday, July 22nd at 14:30 in Jetbrains Room [PyData Track]
Ian Lewis
Python has lots of scientific, data analysis, and machine learning libraries. But there are many problems when starting out on a machine learning project. Which library do you use? How do they compare to each other? How can you use a model that has been trained in your production application?
TensorFlow is a new Open-Source framework created at Google for building Deep Learning applications. Tensorflow allows you to construct easy to understand data flow graphs in Python which form a mathematical and logical pipeline. Creating data flow graphs allow easier visualization of complicated algorithms as well as running the training operations over multiple hardware GPUs in parallel.
In this talk I will discuss how you can use TensorFlow to create Deep Learning applications. I will discuss how it compares to other Python machine learning libraries like Theano or Chainer. Finally, I will discuss how trained TensorFlow models could be deployed into a production system using TensorFlow Serve.
Designing a Pythonic Interface
Tuesday, July 19th at 10:30 in A1
Honza Král
The json query language for elasticsearch, as well as its other APIs, can be very daunting to new users and can be a bit cumbersome when working with python. That is why we created elasticsearch-dsl - a sort of ORM for elasticsearch.
We will go through the design philosophy and obstacles found during the development - trying to make a more pythonic interface for elasticsearch while maintaining access to all of the features of the underlying query language.
The focus of the talk is more on the library and interface design than on elasticsearch and its query language itself, that is used only to demonstrate the principles.
Developing a real-time automated trading platform with Python
Monday, July 18th at 12:00 in Barria 2
Miguel Sánchez de León Peque
In OpenSistemas we have developed a general-purpose multi-agent system which is written in pure Python: osBrain. Agents communicate with each other using ZeroMQ, allowing the user to define different communication patterns based on their needs.
Based on this multi-agent system, we have also developed a broker-independent platform for real-time automated trading: osMarkets. This platform implements specialized agents:
- Feeder is an agent which receives real-time data from the broker.
- Router is an agent which receives data from feeders. It manages the historical data and distributes updates to all the subscribed agents in the network.
- Brain is the most common agent. It receives data from router or from other brains and processes them, sending the results to other brains or sending orders to be executed. Brains can make use of many useful packages avilable in the Python ecosystem: NumPy, SciPy, Numba, Theano...
- Trader is an agent which is designed to interact with the broker, just as the feeder, but to execute market orders.
While it is still in its earliest stages, we are developing a tool for real-time visualization of trading strategies using PyQtGraph. This tool acts as an agent in the multi-agent system.
Do I need to switch to Go(lang) ?
Wednesday, July 20th at 10:30 in Barria 1
Max Tepkeev
Nowadays, there is a lot of buzz about Go. It happened so that for the last 6 months I've been mostly programming Go, and frankly speaking I fell in love with this language.
We'll first do a quick review of the language. Go doesn't have some language constructs, for example classes and exceptions and at first it may seem hard to write proper Go code, but in practice the language is so easy that I will try to teach you the basics and most important concepts of the language. We'll further discuss differences and similarities in Go and Python and dive into the cool features of Go.
Finally we'll talk about why popularity of Go is raising so fast and try to answer the most important question: Do I need to switch to Go ?
Dynamic Class Generation in Python
Monday, July 18th at 12:00 in Jetbrains Room
Kyle Knapp
This talk is about the concept of dynamic class generation in python. The whole idea is writing code that generates classes and their functionality at runtime. You now may be asking yourself, “That sounds like a neat trick. Why would I ever generate my classes at runtime?” Here are a few reasons why:
• It can decrease the physical size of your code.
• It can improve the workflow in adding new functionality.
• It can improve reliability of your code.
One example where the power of this concept has really been leveraged is in boto3, the AWS SDK for Python. Dynamic class generation has allowed boto3 to become heavily data driven such that most of its classes and methods are generated based off JSON models representing aspects of an AWS service’s API. For example, to add support for a new AWS service API in boto3, just plop in a JSON file into the library with no additional Python code required.
Using lessons and techniques drawn from developing boto3, this talk will dive into the following topics related to dynamic class generation:
• The basics of dynamic class generation such as how to effectively dynamically generate classes.
• How to overcome some of the challenges of dynamic class generation.
• The tradeoffs in dynamically generating classes and discussion on when it is appropriate.
By the end of this talk, the hope is that you will have a better understanding of dynamic class generation and come away with helpful ideas for your next big project.
EITB Nahieran: askatu bideoak API honen bidez
Wednesday, July 20th at 14:30 in Barria 1
Mikel Larreategi
Iaz Raspberry PI bat erosi nuen eta ez nekien zer egin berarekin... Aurten Kodi softwarea erabiliz media-center bihurtu dut Raspberrya.
Kodirako 'tvalacarta' izeneko plugin bat zegoen berarekin EITB Nahieran ikusteko, baina ez zebilen. Saiatu nintzen EITB Nahieranen kodea funtzionarazten, eta asko kostata informazioa hiru era ezberdinetan ateratzea lortu nuen. Azkenean, funtzionamendua errazteko API bat prestatu dut EITB Nahieranen dagoen informazioa atzitzeko eta edozeinek erabili ahal dezan.
Effective Code Review
Tuesday, July 19th at 12:00 in A1
Dougal Matthews
Developers usually state that finding defects is the primary motivation for doing code reviews. However, research has shown that the main benefits of code reviews are; knowledge transfer, team awareness and finding alternative solutions.
Code reviews when done well are more than just finding defects; it should be a discussion and conversation with other developers about finding the best solutions. We will talk about re-framing code review to encourage open discussions.
This talk is for everyone that is already involved in regular code review and those hoping to start. I will talk through the code review process with the aim of making it a better and more useful experience for both the authors and the reviewers.
The talk will follow the following rough outline:
- Introduction
- Why do code reviews
- What are we aiming to get out of it
- Submitting code for review
- How can you help reviewers?
- What should you avoid doing?
- Removing ownership of the code
- Reviewing code
- How should you give feedback?
- What should you look for?
- How can you encourage people to review more?
- How to avoid and remove bike-shedding
- Code review tools and how they impact on the process.
- Wrap up and conclusion
Effectively test your webapp with Python and Selenium
Monday, July 18th at 16:30 in Barria 1
Andrei Coman
How often do you run your Selenium test suite? How fast do you get a result from it?
Would you like to answer with: "Whenever I feel like it" and "Well, about the time it takes me to finish a coffee" ? This talk will try to get you closer to these answers.
We will have a look at the lessons learned and the challenges my team faced maintaining a Selenium test suite against a long-lived Django web application.
We will go over the pros and cons of:
- test design approaches
- technologies we used (nose, py.test, LiveServerTestCase)
- reporting tools
Efficient Django
Monday, July 18th at 10:30 in Jetbrains Room
David Arcos
Does Django scale? How to manage traffic peaks? What happens when the database grows too big? How to find the bottlenecks?
We will overview the basics concepts on scalability and performance, and then see some tips and tricks. These statements will be backed up with experiments and numbers, to show the timing improvements.
Main topics:
- System architecture
- Database performance
- Queues and workers
- Profiling with django-debug-toolbar
- Caching queries and templates
- Dealing with a slow admin
- Optimizing the models
- Faster tests
Endor, ipuinak kontatzen zituen Nao robota.
Wednesday, July 20th at 16:15 in Barria 1
Leire Ozaeta
Aurkezpen honetan Nao robotaren Choreographe programazio ingurumenaren sarrera bat egiten da, pythonek errobotikan duen erabilpena erakutsiz. Aurkezpen guztia aurkezleak orain arte egindako lanean oinarritzen da. Lehenik eta behin, programa baten estruktura erakutsiko da. Ondoren, liburutegi bat nola gehitu erakutsiko da, liburutegiaren instalazioak ekar ditzakeen arazoak aztertuz. Azkenik, Naoaren gorputz jarreran zein diskurtsoaren naturaltasunean egindako aurrerapenak azalduko dira.
Honekin lortu nahi diren helburuak honako hauek dira:
- Choreographeko proiektu baten estruktura ezagutzea.
- Nao robot baten oinarrizko programa bat ikustea.
- Chorepgraphek ematen dituen programazio blokeak eraldatzen jakitea, python erabiliz.
- Choreographen eskaintzen diren tresnen bitartez, programan python liburutegi bat gehitzen ikastea.
Aurkezpen hau ulertzeko ez dago eskakizunik. Python pixka bat dakien edonork (“hello world” bat egiten jakitearekin balio du) ulertzeko mailan emango da eta ez da konplexutasun tekniko handiko azalpenik emango. Printzipioz python ezagutzen ez duen edonor ere aurkezpen ia osoa ulertzeko gai izango da, programazio ingurumen bezala ez baita kodean gehiegi sartzen, pythonekin hasteko aukera ona izanez.
Entendiendo Unicode
Tuesday, July 19th at 15:45 in Barria 1
Facundo Batista
La charla muestra de forma teórica/práctica qué son Unicode, las planillas de códigos, los caracteres, y las codificaciones, entra en detalle en las distintas codificaciones, para saber cómo usarlas, ejemplifica las reglas de oro para utilizar Unicode en nuestros programa, y termina mostrando algunas funciones útiles para el manejo de esa tecnología.
Ethical hacking with Python tools
Thursday, July 21st at 11:15 in Barria 2
Jose Manuel Ortega
Nowdays, Python is the language more used for developing tools within the field of security. Many of the tools can be found today as port scanner, vulnerability analysis, brute force attacks and hacking of passwords are written in python. The goal of the talk would show the tools available within the Python API and third-party modules for developing our own pentesting and security tools and finally show a pentesting tool integrating some of the modules.
The main topics of the talk could include:
1.Enter Python language as platform for developing security tools
Introduction about the main libraries we can use for introducing in development of security tools such as socket and requests.
2.Libraries for obtain servers information such as Shodan, pygeocoder,pythonwhois
Shodan is a search engine that lets you find specific computers (routers, servers, etc.) and get information about ports and services that are opened.
3.Analysis and metadata extraction in Python for images and documents
Show tools for scraping web data and obtain metadata information in documents and images
4.Port scanning with tools like python-nmap
With python-nmap module we can check ports open for a target ip or domain.
5.Check vulnerabilities in FTP and SSH servers
With libraries like ftplib and paramiko we can check if the server is vulnerable to ftp and ssh anonymous connections.
Exploring Python Bytecode
Wednesday, July 20th at 14:00 in Barria 2
Anjana Vakil
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!
Exploring our Python Interpreter
Tuesday, July 19th at 15:45 in Jetbrains Room
Stephane Wirtel
During my last CPython sprint, I started to contribute to the CPython code and I
wanted to understand the beast.
In this case, there is only one solution, trace the code from the beginning.
From the command line to the interpreter, we will take part to an adventure
- Overview of the structure of the project and the directories.
- From the Py_Main function to the interpreter.
- The used technics for the Lexer, Parser and the generation of the AST and of
course of the Bytecodes.
- We will see some bytecodes with the dis module.
- How does VM works, it's a stack machine.
- The interpreter and its main loop of the Virtual Machine.
The idea behind is just to show how CPython works for a new contributor to
CPython.
From the command line, we will learn that Python is a library and that we can
embed it in a C project. In fact we will see the Py_Main function to the ceval.c
file of the interpreter.
But there is no magic in the CPython code, we will travel in the lexer and the
parser of CPython, and why not, by the AST for one Python expression.
After the AST, we will visit the Compiler and the Bytecodes for the
interpreter.
Of course, we will learn there is the peepholer where some basic instructions
are optimised by the this component.
And of course, the interpreter, this virtual machine is really interesting for
the newbiew, because it's a big stack where the bytecodes are executed one by
one on the stack and the ceval.c file.
FAT Python: a new static optimizer for Python 3.6
Wednesday, July 20th at 10:30 in A1
Victor Stinner
(Almost) everything in Python is mutable which makes Python a language very difficult to optimize. Most optimizations rely on assumptions, for example that builtin functions are not replaced. Optimizing Python requires a trigger to disable optimization when an assumption is no more true. FAT Python exactly does that with guards checked at runtime. For example, an optimization relying on the builtin len() function is disabled when the function is replaced.
Guards allows to implement various optimizations. Examples: loop unrolling (duplicate the loop body), constant folding (propagates constants), copy builtins to constants, remove unused local variables, etc.
FAT Python implements guards and an optimizer rewriting the Abstract Syntax Tree (AST). The optimizer is implemented in Python so it's easy to enhance it and implement new optimizations.
FAT Python uses a static optimizer, it is less powerful than a JIT compiler like PyPy with tracing, but it was written to be integrated into CPython.
I wrote 3 PEP (509, 510, 511) targeting Python 3.6. Some changes to support FAT Python have already been merged into Python 3.6.
We will also see other pending patches to optimize CPython core, and the bytecode project which allows to modify bytecode, it also includes a peephole optimizer written in pure Python.
Links:
FBTFTP: Facebook's open source python3 framework for dynamic TFTP servers.
Monday, July 18th at 12:00 in Barria 1
Angelo Failla
TFTP was first standardized in '81 (same year I was born!) and one of its primary uses is in the early stage of network booting. TFTP is very simple to implement, and one of the reasons it is still in use is that its small footprint allows engineers to fit the code into very low resource, single board computers, system-on-a-chip implementations and mainboard chipsets, in the case of modern hardware.
It is therefore a crucial protocol deployed in almost every data center environment. It is used, together with DHCP, to chain load Network Boot Programs (NBPs), like Grub2 and iPXE. They allow machines to bootstrap themselves and install operating systems off of the network, downloading kernels and initrds via HTTP and starting them up.
At Facebook, we have been using the standard in.tftpd daemon for years, however, we started to reach its limitations.
Limitations that were partially due to our scale and the way TFTP was deployed in our infrastructure, but also to the protocol specifications based on requirements from the 80's.
To address those limitations we ended up writing our own framework for creating dynamic TFTP servers in Python3, and we decided to open source it.
I will take you thru the framework and the features it offers. I'll discuss the specific problems that motivated us to create it. We will look at practical examples of how touse it, along with a little code, to build your own server that are tailored to your own infra needs.
Fast Async Code with Cython and AsyncIO
Monday, July 18th at 11:15 in A1
Stefan Behnel
Python has recently seen a fresh development boost around asynchronous applications, triggered by the addition of the asyncio library and the new async/await language features in Python 3.5, but coming from a world of well established tools like Twisted and Tornado. The Cython compiler, which compiles Python code to C, has accompanied and influenced this development. It provides full language support for async/await under all Python versions starting from 2.6, as well as native interoperability with existing Python code and the new Python coroutines in Python 3.5.
Benchmarks show that, while fully compatible, Cython compiled coroutines perform about 2-3x better than the same code executed in Python, but they additionally allow to interface natively with external C/C++ code, release the GIL, do parallel computation, and much more. All of this extends the applicable zone for asynchronous applications dramatically and can lead to better responsiveness and lower latency also for mostly I/O bound applications.
This joined talk by an async I/O expert and one of the Cython core developers explains how to write code with async/await in Python and Cython, and shows how to benefit from the excellent low-level features that Cython provides on top of Python.
Game Theory to the Rescue When Hard Decisions Are to Be Made
Wednesday, July 20th at 14:00 in Jetbrains Room
Alexander Hendorf
Sometimes it's hard to decide when a something is really done or cannot be improved further.
Game theory can help you to make complicated decisions whenever you encounter flow problems.
Game theory is "the study of mathematical models of conflict and cooperation between intelligent rational decision-makers."
In our use case we had to match data for accounting: - the data was not always clean but we had some extra tools at hand and a complex system to make good guesses. Nevertheless it was hard to decide when to give up, some records were just not processable.
Finally we used Game theory to make the decision.
Get Instrumented!
Friday, July 22nd at 10:30 in Barria 2
Hynek Schlawack
Metrics are highly superior to logging in regards of understanding the past, presence, and future of your applications and systems. They are cheap to gather (just increment a number!) but setting up a metrics system to collect and store them is a major task.
You may have heard of statsd, Riemann, Graphite, InfluxDB, or OpenTSB. They all look promising but on a closer look it’s apparent that some of those solutions are straight-out flawed and others are hard to integrate with each other or even to get up and running.
Then came Prometheus and gave us independence of UDP, no complex math in your application, multi-dimensional data by adding labels to values (no more server names in your metric names!), baked in monitoring capabilities, integration with many common systems, and official clients for all major programming languages. In short: a unified way to gather, process, and present metrics.
This talk will:
- explain why you want to collect metrics,
- give an overview of the problems with existing solutions,
- try to convince you that Prometheus may be what you’ve been waiting for,
- teach how to impress your co-workers with beautiful graphs and intelligent monitoring by putting a fully instrumented Python application into production,
- and finally give you pointers on how to migrate an existing metrics infrastructure to Prometheus or how to integrate Prometheus therein.
Get in control of your workflows with Airflow
Wednesday, July 20th at 15:45 in Jetbrains Room
Christian Trebing
Whenever you work with data, sooner or later you stumble across the definition of your workflows. At what point should you process your customer's data? What subsequent steps are necessary? And what went wrong with your data processing last Saturday night?
At Blue Yonder we use Airflow (https://github.com/airbnb/airflow), an open source Python package from Airbnb to solve these problems. It can be extended with new functionality by developing plugins in Python, without the need to fork the repo. With Airflow, we define workflows as directed acyclic graphs and get a shiny UI for free. Airflow comes with some task operators which can be used out of the box to complete certain tasks. For more specific cases, tasks can be developed by the end user. Best of all: even the configuration is done completely in Python!
This talk will explain the concepts behind Airflow, demonstrating how to define your own workflows in Python code and how to extend the functionality with new task operators and UI blueprints. You'll also get to hear about our experiences using this tool in real-world scenarios.
Go for Python Programmers
Tuesday, July 19th at 14:30 in Barria 2
Shahriar Tajbakhsh
A side-by-side walkthrough of basic Go syntax and semantics compared to Python.
Grocker, a Python build chain for Docker
Thursday, July 21st at 14:00 in Barria 1
Fabien Bochu
At Polyconseil, we build Paris electric car sharing service: Autolib'. This system is based on many services developed using web technologies, Django and our own libraries to handle business logic.
Packaging is already a difficult problem, deploying large Python projects is even more difficult. When deploying on a live and user-centric system like Autolib', you cannot rely on Pip and external PyPI servers which might become unavailable and are beyond your control. In the beginning we used classic Debian packaging: it was a maintenance hell. It took hours to build our packages and update their metadata to match our Python packages. So we switched to Docker.
Docker allows us to have a unique item that is deployed in production systems: code updates are now atomic and deterministic! But before deploying the Docker image, you need to build it. That's where Grocker comes in.
Grocker is a Docker build chain for Python. It will transform your Python package into a self-contained Docker image which can be easily deployed in a Docker Infrastructure. Grocker also adds a Docker entry point to easily start your application.
Hacking ético con herramientas Python
Tuesday, July 19th at 12:00 in Barria 1
Jose Manuel Ortega
Python se ha convertido en el lenguaje más usado para desarrollar herramientas dentro del ámbito de la seguridad.
Muchas de las herramientas que podemos encontrar hoy en día como escáner de puertos, análisis de vulnerabilidades, ataques por fuerza bruta y hacking de passwords, se han escrito en este lenguaje ,además de ofrecer un ecosistema de herramientas para realizar pruebas de seguridad y de pentesting de aplicaciones.
Entre los puntos a tratar podríamos destacar:
- Introducir Python como lenguaje de desarrollo de herramientas de seguridad
- Introducir librerías para obtener información de nuestro objetivo como Shodan,pygeocoder,pygeoip
- Análisis y extracción de metadatos en Python en imágenes y documentos
- Análisis de puertos con herramientas como python-nmap
Handling GPS Data with Python
Friday, July 22nd at 11:15 in Barria 2
Florian Wilhelm
If you have ever happened to need to deal with GPS data in Python you may have felt a bit lost. There are many libraries at various states of maturity and scope. Finding a place to start and to actually work with the GPS data might not be as easy and obvious as you might expect from other Python domains.
Inspired from my own experiences of dealing with GPS data in Python, I want to give an overview of some useful libraries. From basic reading and writing GPS tracks in the GPS Exchange Format with the help of gpxpy to adding missing elevation information with srtm.py. Additionally, I will cover mapping and visualising tracks on OpenStreetmap with mplleaflet that even supports interactive plots in a Jupyter notebook.
Besides the tooling, I will also demonstrate and explain common algorithms like Douglas-Peucker to simplify a track and the famous Kalman filters for smoothing. For both algorithms I will give an intuition about how they work as well as their basic mathematical concepts. Especially the Kalman filter that is used for all kinds of sensor, not only GPS, has the reputation of being hard to understand. Still, its concept is really easy and quite comprehensible as I will also demonstrate by presenting an implementation in Python with the help of Numpy and Scipy. My presentation will make heavy use of the Jupyter notebook which is a wonderful tool perfectly suited for experimenting and learning.
High Performance Networking in Python
Tuesday, July 19th at 10:30 in Jetbrains Room
Yury Selivanov
The talk will start with an overview of async/await syntax introduced with PEP 492 in Python 3.5. We'll go through asynchronous context managers and iteration protocols it introduces. I'll briefly explain how the feature is implemented in CPython core.
Then we'll explore asyncio design. I'll briefly cover event loop, policies, transports, protocols and streams abstractions. I'll explain that event loops are pluggable, which really makes asyncio a universal framework.
We'll cover libuv - a high performance networking library that drives NodeJS. I'll highlight where it's similar to asyncio and how it's different.
In the final part of the talk I'll explain how to make an asyncio compatible event loop on top of libuv. I'll showcase Cython, which is an amazing tool for tasks like this.
Finally, I'll share some ideas on how we can further improve the performance of asyncio and networking in Python, and what are the challenges that we will face.
Objectives:
- Deeper understanding of async/await in Python and why it's important.
- Deeper understanding of asyncio architecture and protocols.
- How to improve asyncio performance by implementing custom event loops.
- Show that it's easy to integrate existing complex & low level libraries with Cython.
- Some perspective on how Python may evolve wrt networking.
How OpenStack makes Python better (and vice-versa)
Monday, July 18th at 11:15 in Barria 1
Thierry Carrez, Doug Hellmann
OpenStack is an open source stack that can be deployed on raw computing resources to privately or publicly present Infrastructure as a Service. It now consists of more than 4.5 million lines of code, 85% of which is Python. In this talk, Thierry Carrez and Doug Hellmann, both Python Software Foundation fellows and OpenStack Technical Committee members, will look at the symbiotic relationship between OpenStack and Python.
We'll go back in history and explain why OpenStack originally picked Python as its main language 6 years ago, and explore what does Python bring to OpenStack. We'll dive into examples of OpenStack pushing Python libraries to their limits and exposing new bugs. We'll look into the massive cloud-based continuous integration system that OpenStack uses and explain how it exposes bugs in Python libraries in the minutes after they are published to PyPI. We'll look into Python libraries that were created by the OpenStack community and libraries that the OpenStack community took over. Finally we'll expose a few best practices that Python developers can follow to get the most of this symbiotic relationship.
How to conquer the world
Friday, July 22nd at 12:00 in Jetbrains Room [PyData Track]
Rogier van der Geer
The popular board game of Risk has many fans around the world.
Using a Python-based simulation of the game, we try to answer several questions that went through the minds of many players;
- Which missions are easiest to attain?
- Does your starting position influence your chances?
- Which regions are easiest to defend?
During this talk we'll explain what genetic algorithms are and we'll explain an entertaining use-case: how to win at popular board games. During the talk we'll demo how object oriented patterns help with the design and implementation of these algorithms. We'll also demonstrate a library that allows users to push their own risk bots into a game and battle it out on.
How to improve your diet and save money with Python
Tuesday, July 19th at 11:15 in A2
Zuria Bauer
Process optimization in industry has become essential in order to maximize the resources available and reduce energy consumption.
Optimization problems become interesting when dealing with restrictions (linear or nonlinear) and integer variables (modeling the discrete decisions). Python ecosystem presents different libraries to solve optimization problems, some of them are CVXOpt, CVXPy, PulP, OpenOpt, or Pyomo.
Among them, Pyomo results interesting because:
- It can be used for Mathematical modeling in Python similarly to AMPL (and GAMS)
- It communicates with the main solvers used in this field such as GLPK, Gurobi, CPLEX, CBC and PICO
- It's free and open source Python library (BSD license), being developed by Sandia National Laboratories, USA.
- It supports Python 3 and it is easy to install.
The talk will be divided in three parts:
Introduction to Mathematical Programming/Optimization (15 min): visual introduction to optimization concepts including restrictions and non linearties (linear Programming, Nonlinear Programming, ILP, MIP, MINLP).
Introduction to the Pyomo sintax and a quick note for the installation (20 min): showing how to improve their diet and save money when ordering food in fast food restaurants.
Optimization problems in engineering (10 min): showing more advanced optimization examples that include decision variables.
I Hate You, NLP... ;)
Thursday, July 21st at 12:00 in Jetbrains Room [PyData Track]
Katharine Jarmul
Overview
This talk aims to introduce the audience to the wide array of tools available in Python focused on sentiment analysis. It will cover basic semantic mapping, emoticon mapping as well as some of the more recent developments in applying neural networks, machine learning and deep learning to natural language processing. Participants will also learn some of the pitfalls of the different approaches and see some hands-on code for sentiment analysis.
Outline
- NLP: then and now
- Why Emotions Are Hard
- Simple Analysis
- TextBlob (& other available libraries)
- Bag of Words
- Naive Bayes
- Complex Analysis
- Preprocessing with word2vec
- Metamind & RNLN
- Optimus & CNN
- TensorFlow
- Watson
- Live Demo
- Q&A
Implementación de un Identificador de Sonido en Python
Tuesday, July 19th at 14:00 in Barria 1
Cameron Macleod
El tema que nos ocupa es como implementar un identificador de sonido tipo Shazam usando técnicas DSP con ayuda de unas fantásticas bibliotecas. Los puntos a seguir serán, implementación, retos y pasos adicionales. El proyecto que nos ocupa se encuentra todavía en proceso de desarrollo (el código subido en GitHub) y fue inspirado después la conferencia, Over-the-Air Audio Identification en FOSDEM 2016.
La estructura básica del proyecto consiste en un clasificador y un reconocedor. El clasificador toma huellas del sonido y las procesa en una forma investigable para el reconocedor que usa estas huellas para la identificación y búsqueda de archivos almacenados con el fin de encontrar la semejanza mas probable. El reconocedor estará expuesto en un entorno API.
La conferencia intentará introducir el área de DSP a la audiencia y los conceptos que están detrás aplicaciones como Shazam. Explicaré todos las nociones incluidas en una manera sencilla.
Implementing Parallel Programming Design Patterns using EFL for Python
Tuesday, July 19th at 10:30 in Barria 2
Moshe Goldstein, Dr. David Dayan
Multi-core CPUs are abundant and utilizing them effectively requires programmers to parallelize CPU-intensive code. To facilitate this, we have developed EFL (Embedded Flexible Language), a deterministic parallel programming tool.
The parallel parts of a program are written as EFL-blocks, which are embedded into a sequential host language program. The sequential parts of the program are written in the host language, outside the EFL blocks.
EFL may be embedded in any host language by writing an appropriate EFL pre-compiler. At the moment, we implemented two versions of the EFL pre-compiler. Both pre-compilers translate EFL blocks into parallel Python code - one of them generates parallel code based on Python's Multiprocessing module, and the other one generates parallel code based on the DTM/MPI4PY Python module.
We will present the principles upon which EFL is built. We will show the implementation of Parallel Programming Design Patterns using EFL's parallel programming constructs (such as parallel assignments, parallel for-loops, etc.). Using our two EFL pre-compilers we will show their translation to Python parallel code according to the Multiprocessing module as well as the DTM/MPI4PY module. The differences between code versions produced by the EFL pre-compilers will be discussed.
For further information about the EFL project and our Flexible Computation Research Laboratory, visit http://flexcomp.jct.ac.il
Implementing a Sound Identifier in Python
Monday, July 18th at 16:30 in A2
Cameron Macleod
The talk will go over the journey of implementing a Shazam-style sound recogniser using DSP techniques and some fantastic libraries. It will cover implementation, challenges and further steps. The project is still a work in progress at the time of proposal and the code is available on GitHub. It was inspired by the Over-the-Air Audio Identification talk at FOSDEM 2016.
The basic structure of the project consists a classifier that fingerprints audio and stores it in a searchable form and a recogniser that fingerprints a smaller chunk of audio and then searches the stored records to find the most suitable fit for it. The recogniser will be exposed as an API to allow for different front-ends.
I will aim to introduce both the field of DSP and concepts behind applications like Shazam in a simple easy-to-understand manner. The audience will not need any prior experience in anything except Python.
Infrastructure as Code: "pip install" your environment
Wednesday, July 20th at 11:15 in Jetbrains Room
Sebastian Neubauer
Continuous Delivery, DevOps, Lean - all those movements have one thing in common: extending the process of software development along the whole value stream, ultimately to the customer. This simple requirement causes surprising serious difficulties on traditional operations workflows. All of a sudden, a single manual ticket to the operations team is a critical blocker in the delivery process. Therefore all parts of the infrastructure, storage, databases, identities, compute resources must be provided as a self service for the developers in order to be able to achieve this goal. What one may call "the cloud" (including self hosted ones like open stack) is such a successful model not least because they offer exactly this "ticket-less" self-service. But why should we wait for "the cloud" to offer what we really need? We are python developers, we are hackers!
In this talk I will show how to build your own infrastructure-as-a-service on the example of "Postgraas", an open source postgres-as-a-service I wrote in python just for fun. With a simple curl request you can get your very own database, just like RDS on AWS. You will learn how easy it is to create such a remarkably useful service with hardly three hundred lines of flask, docker and some glue-code, a project for a rainy Sunday. After the talk you will know how to amaze your colleagues by eliminating an annoying ticket or manual workflow with a simple flask app and some creativity.
Ingesting 35 million hotel images with python in the cloud.
Tuesday, July 19th at 16:15 in Barria 1
Alex Vinyals
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:
- Ingest all the input images that partners provide us.
- Detect and remove bad quality + duplicated images from reaching production.
- Resize all the generated images to optimise for mobile devices.
- Ensure the process scales and behaves in an incremental way.
- Ensure the whole process fits in a time constrained window.
Among the tools we used? Pillow, ImageHash, Kombu and Boto.
Introduction to aiohttp
Wednesday, July 20th at 10:30 in Jetbrains Room
Andrew Svetlov
aiohttp is asynchronous HTTP client and server library built on top of asyncio.
The library allows to write user friendly code which looks like well-known
linear one (requests library for client and Django/Flask/Pyramid for
server) but utilizes the power of non-blocking sockets and
supports websockets natively.
The intro describes basic programming patterns for both client
and server API as well as more advanced techniques.
Tips and tricks for writing asyncio-based code are included as well.
The main target of the talk is displaying an alternative to
people who want to avoid classic WSGI
frameworks (Django/Flask/Pyramid etc) limitations but found
Twisted and Tornado too cumbersome.
Dive into aiohttp usage with the library author.
Is that spam in my ham?
Monday, July 18th at 16:00 in Jetbrains Room
Lorena Mesa
Supervised learning, machine learning, classifiers, big data! What in the world are all of these things? As a beginning programmer the questions described as "machine learning" questions can be mystifying at best.
In this talk I will define the scope of a machine learning problem, identifying an email as ham or spam, from the perspective of a beginner (non master of all things "machine learning") and show how Python can help us simply learn how to classify a piece of email.
To begin we must ask, what is spam? How do I know it "when I see it"? From previous experience of course! We will provide human labeled examples of spam to our model for it to understand the likelihood of spam or ham. This approach, using examples and data we already know to determine the most likely label for a new example, uses the Naive Bayes classifier.
Our model will look at the words in the body of an email, finding the frequency of words in both spam and ham emails and the frequency of spam and ham. Once we know the prior likelihood of spam and what makes something spam, we can try applying a label to a new example.
Through this exercise we will see at a basic level what types of questions machine learning asks, learn to model "learning" with Python, and understand how learning can be measured.
It's not magic: descriptors exposed
Wednesday, July 20th at 14:30 in A1
Facundo Batista
This talk presents, using a detailed practical example, the Python Descriptos.
The behaviour of descriptors mechanisms is detailed, showing their power and flexibility.
Finally, as a bonus track and to complete the used practical example, class descriptors are explained.
Iteration, iteration, iteration
Friday, July 22nd at 16:15 in Barria 1
John Sutherland
There should be something for everyone in this whistle–stop tour of iteration in Python setting off from for
–loops, and riding cross–country to multiplexing coroutines!
See and hear the amazing sights and sounds of list comprehensions, and generators. Take in the amazing vistas from itertools
, and be amazed at the magnificent yield
!
We’ll take detours to higher–order functions, closures, and decorators. And cover the FP inspired builtins map
, filter
, and reduce
, as well as the epitome of Pythonic programming, enumerate
.
Jupyter for everything else
Friday, July 22nd at 10:30 in Barria 1
Mike BRIGHT
Sure you can do a chunk of scientific exploration and stuff in Jupyter in your choice of language supplemented with visuals and that's already awesome !
But let's head off the beaten track a little to look at other uses, especially command-line.
We'll look at some alternate uses of Jupyter ...
- Write command-line tutorials, cheat sheets in an easy to maintain format.
- Perform visualization tasks for command-line tools
- Write blog posts
- Create interactive presentations (thanks Damian !)
- Publish interactive books, articles and blog posts
- HTML/js/css experimentation
Keeping the Lights on with Python
Tuesday, July 19th at 12:00 in A2
Scott Reeve
We are using Python to help the National Grid in the UK to balance electricity production and usage. We do this by installing Python powered devices at customers sites that allow us to monitor and set control criteria to automatically turn on and off power consuming and producing devices when there is a mismatch between electricity supply and demand. These devices talk to our Python powered cloud based system using the 3g network, giving us near real-time monitoring of our customers assets.
Our entire infrastructure is written in Python, from our billing systems, data analytics systems and customer portal all the way through to our on site industrial system interfaces. In this talk we will be talking about how and why we have used Python, where we have had problems, as well as where in our system we would like to use Python and why we cannot. We will also be talking about what we are going to do next, moving our system from near real time monitoring to near real-time control, using Python for both system modelling and control. We will discuss how we are using Python to creating a system that monitors the balance between electricity supply and demand many times per second and is able to provide a corrective control based on the sum of the output of a dynamic set of our customer sites and the challenges that presents.
Kung Fu al amanecer con itertools
Tuesday, July 19th at 10:30 in Barria 1
Víctor Terrón
El módulo itertools es una de las piedras angulares de la programación avanzada en Python. Parte de la biblioteca estándar, nos ofrece un álgebra de iteradores que permite encadenar abstracciones de forma elegante, haciendo posibles soluciones sencillas a la par que más eficientes en su consumo de memoria.
El objetivo de esta charla es el de, ante todo, proporcionar consejos y lecciones claras que puedan aplicarse de forma inmediata. Ilustrándolo con numerosos ejemplos, los asistentes abandonarán la charla habiendo asimilado como mínimo varios conceptos que mejorarán indiscutible e irremediablemente su código. El énfasis se hará en mostrar casos específicos en los que una solución tradicional puede ser mejorada una y otra vez con funciones del módulo itertools.
Supongamos, por ejemplo, que queremos alternar indefinidamente entre dos valores: -1 y 1. El recién iniciado utilizaría una variable cuyo valor iría modificando a cada paso y el usuario medio quizás optaría por un generador infinito. Ambas soluciones dignas y honorables, pero que palidecen ante la maestría del artista marcial que que tan sólo necesita itertools.cycle()
. Porque el módulo itertools es así: una vez caído el velo de nuestros ojos y descubiertas funciones como repeat()
, takewhile()
, dropwhile()
o product()
, no hay marcha atrás. En esta charla vamos a aprender a reconocer cuándo pueden ser usadas, proporcionándonos en una única línea lo que para los meros mortales supone mucho más trabajo.
Kung Fu at Dawn with Itertools
Monday, July 18th at 11:15 in A2
Víctor Terrón
The itertools module is one of the cornerstones of advanced programming in Python. Part of the standard library, it provides an iterator algebra that allows us to elegantly chain abstractions, enabling solutions that are both simpler and more memory efficient.
The goal of this talk is to offer practical advice and clear lessons that can be immediately put into practice. Illustrating it with numerous examples, attendees will leave having assimilated at least several concepts that will improve their code undeniably and irremediably. Emphasis will be on showing specific cases where a traditional solution can be overhauled over and over with functions from the itertools module.
Let’s say, for example, that we want to alternate indefinitely between two values: -1 and 1. The novice would use a variable, updating its value at each step, and the average user would maybe opt for an endless generator. Both are worthy and honorable solutions, but they pale before the mastery of the martial artist who only needs itertools.cycle(). Because that is the nature of the itertools module: once the veil falls from our eyes and we come across functions such as repeat(), takewhile(), dropwhile() or product(), there is no return. In this talk we will learn to identify when they can be used, accomplishing with a single line of code what for the mere mortals takes much more effort.
Learn Python The Fun Way
Monday, July 18th at 16:30 in A1
Liana Bakradze
Programming is one of the most important 21st-century skills. It doesn't only provide promising career opportunities but teaches how to reason logically, systematically and creatively.
Code readability, rich standard library, straightforward syntax and other features make Python a great language for teaching beginners how to program. Python community is very supportive and friendly to newcomers and does awesome work to make Python available to everyone. Tons of different online and offline resources can help you to master Python programming. Problem solving is the classical way of learning how to code. But it can be boring for some people, especially for kids.
On the other hand, playing games is really effective way for us to learn and it's also the most fun. You can find different games designed to teach basics of programming, but most of them use special visual environments and don't teach real text based languages.
But is it possible to learn programming language like Python by playing a game?
In this talk I'll show you a few projects for different age and levels that allow you to achieve that. I'll pay attention on methods that are used to teach programming.
I also want to inspire you to help such projects and to suggest ideas how to do that.
Lessons Learned after 190 Million Lessons Served
Wednesday, July 20th at 16:15 in Jetbrains Room
Ricardo Bánffy
What we learned along the way - processes, organization, technology and people - from 0 to 11 million students, 40 thousand courses and 20 thousand teachers.
Machine Learning for dummies with Python
Monday, July 18th at 16:30 in Jetbrains Room
Javier Arias Losada
Have you heard that Machine Learning is the next big thing?
Are you a dummy in terms of Machine Learning, and think that is a topic for mathematicians with black-magic skills?
If your response to both questions is 'Yes', we are in the same position.
Still, thanks to the Web, Python and OpenSource libraries, we can overcome this situation and do some interesting stuff with Machine Learning.
Machine Learning: Power of Ensembles
Friday, July 22nd at 15:45 in A1 [PyData Track]
Bargava Subramanian
It is relatively easy to build a first-cut machine learning model. But what does it take to build a reasonably good model, or even a state-of-art model ?
Ensemble models. They are our best friends. They help us exploit the power of computing. Ensemble methods aren't new. They form the basis for some extremely powerful machine learning algorithms like random forests and gradient boosting machines. The key point about ensemble is that consensus from diverse models are more reliable than a single source. This talk will cover how we can combine model outputs from various base models(logistic regression, support vector machines, decision trees, neural networks, etc) to create a stronger/better model output.
This talk will cover various strategies to create ensemble models.
Using third-party Python libraries along with scikit-learn, this talk will demonstrate the following ensemble methodologies:
1) Bagging
2) Boosting
3) Stacking
Real-life examples from the enterprise world will be show-cased where ensemble models produced better results consistently when compared against single best-performing models.
There will also be emphasis on the following: Feature engineering, model selection, importance of bias-variance and generalization.
Creating better models is the critical component of building a good data science product.
A preliminary version of the slides is available here
Making robots walk with Python
Tuesday, July 19th at 14:00 in Jetbrains Room
Radomir Dopieralski
Making a robot walk is not easy, especially when all it has for brains is a small microcontroller which you have to program in C. During this talk you will see different ways in which such a robot can be controlled in Python, either by using remote control, with the Python program running on a stationary computer, by putting a small computer, such as a Raspberry Pi on it, or by programming it with Micropython, a version of the Python language designed for microcontrollers. I will also explain the basic problems with walking robots and how Python can be used to overcome them. Finally, I will show some of the robots I have built.
Managing Mocks
Thursday, July 21st at 15:45 in A2
Helen Sherwood-Taylor
Mocking is a valuable technique for writing tests but mocking effectively is often a stumbling block for many developers and can raise questions about its overall value as a technique.
The audience will have some familiarity with unit testing and may have tried mocking before, but some introduction will be provided for those who haven’t. We will look at some features and techniques of Python’s unittest.mock library and cover some useful tips and common scenarios, so this will be useful to those who have some experience mocking but would like to do so more effectively.
Summary of proposed content:
- A short introduction to what mocking is and why it is useful.
- Tour of Python’s mock library and how to make the most of it
- Creating and manipulating Mock objects
- Setting up return values and side effects to control test environment
- Inspecting mocks - different ways to examine a mock object and find out what happened during the test
- How and where to patch
- Common mocking situations - scenarios where mocking is particularly useful and/or tricky to get right. For example - date/time, filesystem, read only properties
- Some discussion of when mocking is and isn't helpful.
Focus will be mainly on Python's unittest.mock module but we will also have a brief look at some other useful libraries.
Metaclasses for fun and profit: Making a declarative GUI implementation
Wednesday, July 20th at 12:00 in A1
Anders Hammarquist
When overhauling the user interface of Autolabel's labeling printers,
we wanted a clean way to describe the layout of the settings widgets.
The structure we came up with was a declarative class layout that
leverages Python's metaclass concept to build the underlying GTK
widget structure.
I will present the implementation to hopefully inspire you to apply
metaclass techniques to problems that standard Python syntax can't
quite solve. If that fails, you will at least have a way to
declaratively construct GTK GUIs.
A short, non-exaustive, summary of concepts I will mention includes
metaclasses (obviously), class hierarchies, method resolution
order, super(), and anecdotes of dealing with GTK.
You may find some similarities with my talk on Python as a domain
specific language at Europython 2006
http://indico.cern.ch/event/44/session/41/contribution/35
MicroPython on the BBC micro:bit
Monday, July 18th at 14:15 in A1
Nicholas Tollervey
The BBC micro:bit is a small programmable device for children. A million of them have been handed out to the UK's 11 and 12 years olds. The Python Software Foundation was a partner in this moon-shot scheme and, thanks to the efforts of Damien George, MicroPython (a full reimplementation of Python 3) runs on the device. All the assets needed to recreate this project have been release under open-source licenses.
This practical demonstration shows what can be done with the device and how to program it. I'll provide advice on how best to introduce the device to children and teachers in your own locale.
The only prerequisite you need is a passion for Python, education and playing with a cool IoT gizmo. My goal is simply to give attendees enough information to have fun and make cool things with a micro:bit.
MiniBrew: Brewing beer with Python
Tuesday, July 19th at 14:30 in Jetbrains Room
Francisco Igual Herrero
The number one alcoholic drink in the world is undoubtedly beer. With the rise of craft beers, also homebrewing has become very popular in recent years, although it is still a complex and expensive hobby. Dutch startup MiniBrew intends to change that with their revolutionary beer brewing machine, which is controlled by a mobile app and communicates with a Python API backend.
In this talk Chesco will share his ideas and experiences in utilizing Python in the backend architecture for the MiniBrew project he and his team are working on at MiniBrew's development partner Elements Interactive.
As many IoT projects, the ingredients for MiniBrew are a device with a limited chipset and internet connection, a backend to store the data acting as the mastermind and a mobile app to allow end users to control the brewing process.
The fact that we want users to know in real-time how their beer brewing process is doing presented some challenges which required us to come up with a competitive architecture that would both give real-time status updates and not saturate the server with continuous calls.
Chesco discusses best practices and pitfalls in designing and developing IoT architecture by diving into the RabbitMQ message broker, the MQTT protocol and protocol buffers. He will focus on the REST API and CMS site written in Python, elaborating on high frequency data in the apps, scalability, full-session logging and overcoming common architectural challenges.
Modern OpenGL with Python
Wednesday, July 20th at 14:00 in A2
Roberto De Ioris
The OpenGL api is one of the oldest (and most used) graphics library in both the gaming and simulations world. In latest years the api has been extremely re-designed to support modern hardware features available in GPUs.
Can we build realtime graphics application with Python using OpenGL ? Well, obviously Yes !
The talk will introduce how 2D and 3D graphics works, which math is required for mastering them and why strong hardware cooperation and heavy optimizations have been required since the very beginning of gaming development history.
Once the theory is "almost" clear, we can start talking about OpenGL, which problems tries to solve and how it evolved in more than 20 years.
The last (and the biggest) part of the talk will show how to interface Python with OpenGL, how to draw simple 2D sprites and how to load and show 3D models using simple lighting models.
Warning: OpenGL shaders (the custom code you upload in the GPU) are written in GLSL, a pseudo-c dialect, so expect a bit of lower-level programming
Monkey-patching: a magic trick or a powerful tool?
Friday, July 22nd at 15:45 in Barria 1
Elizaveta Shashkova
Monkey-patching is a dynamic modification of a class or a module at runtime.
The Python gives developers a great opportunity to use monkey-patching almost everywhere. But should developers do it? Is it a magic trick or a powerful tool? In this talk we will try to give the answers to these questions and try to figure out pros and cons of using monkey-patching.
First of all we will learn what is monkey-patching in Python and consider some basic examples of using it.
Of course, monkey-patching may cause some problems in the code. We will consider bad ways to use it and try to learn different types of problems monkey-patching may lead to.
Despite of some bugs that may appear in a patched program, monkey-patching is used in a real life rather often. There are some reasons and motives to do it. We will consider the examples of using monkey-patching in real projects like gevent
, in some other libraries and in testing. Also we will learn some monkey-patch tricks that helps to solve real-life problems in the Python debugger which is a part of the PyCharm and the PyDev.
After that we will compare using of monkey-patching in Python to using it in an another dynamic language Ruby. Are there any differences between them? Is our reasoning correct for Ruby?
Finally we will conclude all our thoughts and examples and try to give the answer to the question from title.
Moving away from NodeJS to a pure python solution for assets
Wednesday, July 20th at 11:15 in A1
Alessandro Molina
When working with WebApplications it is common to rely on an asset management pipeline to compile scripts, minify css or preprocess images.
Most of the tools available today rely on JavaScript to perform those steps and always forced Python developers to rely on NodeJS to have grunt perform the pipeline tasks, coffee-script to compile their CoffeeScript or lessc to build their css. This causes longer setup times for projects newcomers, complex development environment, working with two package managers and dependencies that you use once a week but still need to be there.
The talk will showcase the DukPy project and focus on how it is possible to build a pure python asset pipeline relying on DukPy to run javascript tools and WebAssets framework to perform the most common tasks that usually Nodejs and tools like Grunt handle for us, greatly reducing the development environment complexity and making its setup as simple as ‘pip install’.
The talk aims at explaining the complexity of managing an asset transformation pipeline through tools like Grunt, especially during deploy, test suites or when a new development environment has to be created, and showcase how this complexity can be dodged by using tools like WebAssets and DukPy.
No more need to keep around two languages, two package management systems and manage your dependencies between them by youself. Just pip install your app and have it working.
Music transcription with Python
Thursday, July 21st at 14:00 in Jetbrains Room [PyData Track]
Anna Wszeborowska
Music transcription allows to convert an audio recording to musical notation through mathematical analysis. It is a very complex problem, especially for polyphonic music - currently existing solutions yield results with approx. 70% or less accuracy.
In the talk we will focus on transcribing a monophonic audio input and see how we can modify it on the fly.
To achieve that, we need to determine pitch and duration of each note, and then use these parameters to create a sequence of MIDI events. MIDI stands for Musical Instrument Digital Interface and it encodes commands used to generate sounds by musical hardware or software.
Let's see how to play around with sounds using Python and a handful of its powerful libraries. And let's do it in real-time!
NetworkX Visualization Powered by Bokeh
Friday, July 22nd at 16:15 in Jetbrains Room [PyData Track]
Björn Meier
During some work with social network analysis my favoured tool to study the networks was NetworkX. It provides a wide set of features and algorithms for network analysis, all in Python. But the functionality to visualize networks is not very strong and not to mention the missing interactive manipulation. However during the exploration of data: exporting, feeding an extra tool for visualization and then manipulating data manually was a tedious workflow.
As I also had the optional target of presenting networks in a browser, I improved this workflow by creating a Flask web application providing interfaces to my networks. On the browser side I created a javascript client based on D3.js. In retrospective the required programming effort in Python and also in Javascript was too much for such a task. And exactly this target, interactive visualization in a browser (and as bonus in a Jupyter Notebook), can be achieved quiet easy now with Bokeh.
The talk will be a step by step introduction, starting with the basic visualization of a network using Bokeh, NetworkX and a Jupyter Notebook. Next, how to create interactions with your network which will be used to change a network structure, e.g. a leaving person. As we want to see directly the impact of these changes in a network I will finally show how to update networks and visualize directly how the importance of the remaining people changes. And all this can be achieved with Python and maybe a bit of Javascript.
Nipy on functional brain MRI
Friday, July 22nd at 14:30 in A2
Alexandre Savio
This is an introductory talk to modern brain image analysis tools.
I will show how to use nipy tools to process one resting-state fMRI subject, perform intra-subject registration, ICA analysis to extract and visualize resting-state networks.
If the time allows me I will introduce how to perform non-linear registration to to atlas-based segmentation.
The outline of the talk:
- Present the COBRE dataset and show its characteristics.
- Use nibabel to open a NifTI file and see the matrix/volume parameters.
- Use nilearn.plotting to show the anatomical image.
- Use nipy to co-register the anatomical image to the fMRI image.
- Use nilearn to perform CanICA and plot ICA spatial segmentations.
If time allows:
- Present a brain anatomical atlas and its template.
- Present the tools needed for non-linear registration.
- Show the result of an atlas-based segmentation result.
- Use nilearn to calculate the resting-state functional connectivity matrix of the subject.
- Plot it with Bokeh.
OMG, Bokeh is better than ever!
Thursday, July 21st at 11:15 in Jetbrains Room [PyData Track]
Fabio Pliger
Bokeh is a unique library in its genre that lets users create beautiful and complex visualizations from Python (and other languages) to the browser without actually writing Javascript or HTML.
In the last year the Bokeh team have added a large number of unique features that are extremely powerful. Fully optimized websocket based server that enables performant python callbacks from actions on the browser, Javascript callbacks written in Python (YES!!), bokeh command that lets target different outputs from the same input, JS transforms from Python, high-level charts, Geo support, ...
Anyone interested in powerful and easy visualizations should take a look at it. :)
Operating on Encrypted Data with ZeroDB
Thursday, July 21st at 10:30 in A2
Michael Egorov
ZeroDB is an open-source end-to-end encrypted database that enables clients to operate on (search, sort, query, and share) encrypted data without exposing encryption keys or cleartext data to the database server. The familiar client-server architecture is unchanged, but query logic and encryption keys are pushed client-side. Since the server has no insight into the nature of the data, the risk of data being exposed via a server-side data breach is eliminated. Even if the server is successfully infiltrated, adversaries would not have access to the cleartext data and cannot derive anything useful out of disk or RAM snapshots.
ZeroDB provides end-to-end encryption while maintaining much of the functionality expected of a modern database, such as full-text search, sort, and range queries. Additionally, ZeroDB uses proxy re-encryption and/or delta key technology to enable secure, granular sharing of encrypted data without exposing keys to the server and without sharing the same encryption key between users of the database.
ZeroDB can be used by enterprises to securely outsource on-premise database and storage infrastructure to cloud environments. Enterprises can encrypt client-side and keep keys on-premise, so that they're only pushing encrypted data to the cloud.
Additionally, developers can easily write end-to-end encrypted applications with strong security and privacy guarantees.
Optimize Thyself
Friday, July 22nd at 16:15 in A2
Nejc Zupan
There's a ton of digital ink spent on the subject of productivity. Choosing the right tools, the right editor, the right plugins, the right OS, mapping keyboard shortcuts, using mouse gestures, the list goes on and on.
This is not what this talk is about! It's about everything else around your computer that can boost or kill your productivity. It's about efficient communication, getting things done, working less while doing more, sleeping good, keeping your blood sugar at optimal levels, and ultimately, staying healthy.
How should I know? I'm juggling my time between my lifetime addiction to windsurfing , being a father and running a successful Python shop. My working time is very limited and I need to make the most of it. In this talk I'll go through what works for me and point to research on the subject.
Peeking into Python’s C API
Friday, July 22nd at 14:30 in Barria 1
Sophia Davis
We all love Python. It’s so elegant and easy to use as a programming language that we forget about the giant, complicated C program executing our strings of white-space sensitive code. For many Python programmers, this side of Python is just a big black box. It works well, so thankfully we don’t need to go messing around inside... but what if you want to look into the inner workings of this powerful tool? One way to dive into the C-program-side of Python is by exploring the C API for writing Python bindings to native C libraries. In this talk I will explore the basics of this API as I recount my journey to make a simple C library callable from Python code, and allow C code to invoke objects defined in pure Python. Along the way, we will encounter some essential features of Python: reference counting, memory management, and the inner-workings of objects and modules.
Performant Python
Monday, July 18th at 10:30 in A1
Burkhard Kloss
Python is a great language. Easy to learn, friendly to use, widely used.
It is not, however, renowned for being fast. In a lot of situations that does not matter. Sometimes it really does. This talk will introduce you to some tools and techniques for making sure your Python code becomes fast enough – without turning into a maintenance nightmare. Fast code does not have to be unreadable - and when you're writing Python, it really pays of to think "pythonically".
That does mean using the included batteries, and utilising the ecosystem of tools around the language, too.
Warning: may contain small bits of other languages.
Predicting Oscar Winners & Box Office Hits with Scikit Learn
Thursday, July 21st at 15:45 in Jetbrains Room [PyData Track]
Deborah Hanus
We will walk through the most important steps in putting together an interesting data science project: ask a question, write a web scraper, and answer those questions using nothing but Python libraries and data from the Internet. To illustrate how these steps fit together, we walk through a data science project using IMDB data to predict what makes a winning Oscar movie.
What questions do we want to answer? We will briefly discuss how to ask a question that can be answered using only python, machine learning, and the Internet. Here we examine what attributes make movies successful.
How to collect data? We will discuss APIs, Python requests, BeautifulSoup, and some common hang-ups new scrapers run into. In this example, we will answer our questions using IMDB and related online sources.
How to analyze & present data? To predict what make a high-grossing, Oscar-winning movie, we will put the data into a pandas dataframe in an ipython notebook and we use machine learning algorithms available in sklearn.
To preview our findings, check out this trailer!
Profiling the unprofilable
Monday, July 18th at 10:30 in Barria 1
Dmitry Trofimov
Profile is the main way to find slow parts of your application, and it's often the first approach to performance optimisation. While there are quite a few profilers, many of them have limitations. In this talk we're going to learn about the new statistical profiler for Python called Vmprof that is actively being developed by the PyPy team. We'll see how it is implemented and how to use it effectively. We will apply it to an open source project, the Pydev.Debugger, a popular debugger used in IDE's such as Pydev and PyCharm, and with the help of Cython which we'll also dig into, we'll work on optimising the issues we find.
Whether it's a Python debugger, a Web Application or any other kind of Python development you're doing, you'll learn how to effectively profile and resolve many performance issues.
Protect your users with Circuit Breakers
Tuesday, July 19th at 14:00 in A2
Scott Triglia
The inevitability of failures is the bane of scaling any modern web service and can cause serious pain for end users! Lucky for us, there are techniques that can help protect your product handle failures in subsystems gracefully. This talk will dive into one of these in depth, the Circuit Breaker pattern, and explore the options it gives us for keeping our users safe.
We will be focusing on several real-world problems and how they can be addressed by circuit breakers. You should expect to leave the talk with details on simple circuit breakers as well as understanding how they can be adapted for more complex situations. We’ll also discuss some options for how to implement your circuit breaker in readable python.
Contrived FAQ time!
I don’t know what Circuit Breakers are, should I come?
Definitely! We’re going to start from scratch and work our way up. Only requirement is basic familiarity with backend services receiving and making HTTP requests.
I totally know what Circuit Breakers are, should I come?
Definitely! After the intro, the main meat of the talk will be working through a series of more advanced situations and talking about how we can alter the basic circuit breaker setup to address them.
I want real-world advice, not made up hypotheticals!
Well that’s not really a question, but you’ll be happy to know that the examples we’ll discuss come straight from my experience at Yelp. They should be very realistic and broadly applicable.
Pygame Zero
Monday, July 18th at 16:00 in A1
Daniel Pope
Pygame Zero is a new game engine for education, built on top of Pygame. It makes writing your first games extremely simple, while saving beginners from certain potential pitfalls. This talk will introduce Pygame Zero, walk through creating a simple game, and discuss the background for Python in education and the design philosophy behind Pygame Zero.
Pygame is a powerful set of libraries for graphics, sound, input and more. But it is just a library: each program needs to import and set up the libraries, implement a game loop and load resources among numerous other concerns. While seasoned Pythonistas have no trouble with this, teachers told us that they found it difficult to teach with Pygame. There is simply too much boilerplate involved, and getting students to reproduce the boilerplate perfectly before useful lessons can begin takes too much time out of a 40-minute lesson.
Pygame Zero is simple enough that a lesson can be broken down into bitesize steps where meaningful progress can be made with just a couple of lines of code at a time.
Pytest desde las trincheras
Tuesday, July 19th at 14:30 in Barria 1
Pau Ruŀlan Ferragut
Las metodologías de desarrollo que incorporan la escritura de pruebas desde el momento cero tienden a generar código más estable y fiable pero la realidad es que muchas veces no gozamos del privilegio ni del presupuesto para escribir tests para todas las características de nuestro producto. Pero si tenemos a nuestra disposición herramientas de testing que nos permitan eliminar los errores evitables como romper enlaces en la página de inicio nos quitaremos el miedo a hacer pases a producción y generaremos más valor al negocio.
La charla no tiene pretensión de ser ni una introducción al test driven development ni de las complejidades de qué es un buen o mal test. El objetivo es animar a todo aquel que todavía pruebe sus proyectos manualmente a intentar algún grado de automatización. Para ello la estructura será una presentación de pytest, exponer algunos plugins altamente recomendados y centrarse en el caso de uso de una página con presencia en ocho países donde automatizamos un montón de comprovaciones simples que nos permitieron reducir los errores evitables.
Python Descriptors for Better Data Structures
Monday, July 18th at 14:15 in Barria 2
Adrian Dziubek
I worked as a develper of a testing framework for a C++ server. The framework tested binary protocol implemented by the server. At the core there was a test runner in Twisted, sockets to communicate and lot of serialization code.
Most of the work however, involved testers preparing test cases. The data format was primitive structures -- hard to read and easy to break. Field order had to be entered manually. Worst of all the data was entered by hand.
At the time, I have already seen the better world -- models from Django. Have you ever wondered how those work? Step by step, I used the ideas from there to make the structures more friendly and on my way learned about descriptors.
I'll show in incremental steps, how I used:
- keyword arguments to lower signal to noise ratio,
- recursion to print usable data code snippets for regression testing,
- diff library to help testers find the differences,
- order of definition for sorting the fields,
- getattr and setattr as first step to extend primitive fields,
- wrappers for validating and serializing the content,
- descriptors to put the code in the right place.
I want to show how descrpitors work in Python and how they enable declarative style of programming. By the end of the talk I want you to understand magic behind field types used by object relational mappers like Django. I'll also mention few other examples of how descriptors are used.
Python and Async programming
Monday, July 18th at 14:15 in Jetbrains Room
Nicolas Lara
How does the experienced python programmer fair when faced with python's "new" way of doing async programing in for the first time? Do we all know how and when to use Futures, yield from, asyncio, coroutines, the async and await keywords, eventloops, and others?
A lot has changed in recent versions of Python when it comes to async programming, concurrency, and parallelism. We still have very different ways of approaching the problem in each version, but they are finally (as of python 3.4/3.5) converging to a standard.
This talk explores, from the perspective of an experienced python programmer with little to no experience in async programming, what the "one obvious way" to do async programming in Python is supposed to be. It does so but analysing examples of different categories of async problems we may want to solve and what the correct way to solve them with the latest versions of Python would be (along with the trade offs of different approaches).
The examples include generic CPU-bound problems, IO-bound problems, and "both-bound" problems; along with common tasks as building a simple server, scraping, deferring a web response, and traversing graphs.
When useful, I compare the solutions with the approach we would take in languages that have been design for- and are known to be good at async programming like Javascript and Go.
Python as the keystone of building and testing C++ applications
Monday, July 18th at 14:45 in A2
Alain Martin
At Ableton, we make Live, Push and Link, unique software and hardware for music creation and performance. Live is a C++ desktop application built from a 15-year old code base. Push is an instrument embedding a multicolor display which renders a Qt Quick scene powered by Qt. Link is a technology that keeps music devices in time and is available to app developers as LinkKit, an iOS SDK. "But what does all that have to do with Python?", you might ask.
This talk answers that question by explaining how our developers use Python to build and test C, C++ and Objective-C source code. Based on GYP, what we call "build-system" is a collection of Python scripts that simplify our workflows, and help us write better software. The three top-level scripts, "configure.py", "build.py" and "run.py", share a common design which makes them easy to use by developers, as well as easy to maintain and extend. This talk describes the essence of that design, so you can apply it to your own project.
Python in Astronomy
Thursday, July 21st at 10:30 in Barria 1
Sławomir Piasecki
For ages people have been watching the sky, and tried to learn something about all those mysterious lights. In ancient times, scientist used mostly their naked eyes to watch what happened in the night sky. Astronomy is one of the oldest fields in science.
Everything changed when Galileo invented his lunette. Thanks to thi, we were able to proof Copernicus’ new model of the solar system with the sun in the center.
The next big step in Astronomy was using computers. Where there are computers and Astronomy, there is a place for programming. For many years astronomers were mostly using Fortran and C/C++. Both are suited to numeric computation and scientific computing. Since they are structured programming language, that makes them very valuable for science.
Over the past decade, Python has started to be used by more and more people in astronomy. But is there a place in Astronomy for Python, as it is not as fast as Fortran or C/C++? In Python there is a module called AstroPy which helps astronomers in their work.
MatPlotLib is one of the most popular library use in astronomy. This tool helps created very sophisticated plots and graphs.
Finally I would like talk about some research I did using Python. For research, we decided to use AUTO. It is a hybrid of Fortran and Python, to compute bifurcation points in mathematical models. In Python we introduce mathematical model, ODE and initial parameters. Fortran does all the computation.
Python in Gravitational Waves Research Communities
Tuesday, July 19th at 12:00 in Barria 2
Elena Cuoco
On February 11th 2016 Ligo-Virgo collaboration gave the announce of the discovery of Gravitational Waves, just 100 years after the Einstein’s paper on their prediction.
After an introduction on Gravitational Waves, on Virgo Interferometric detector, I will go through the data analysis methods used in Gravitational Waves (GW) communities either for the detector characterization and data condition or for the signal detection pipelines, showing the use of python we make.
As practical example I will introduce a python notebook describing the GW event detected on 14 September 2015 and I will show a few of signal processing techniques.
Python, Data & Rock'n'Roll
Friday, July 22nd at 15:45 in Jetbrains Room [PyData Track]
Claudia Guirao Fernández
Have you ever wonder how David Bowie has evolved into the theme of his songs throughout their studio albums? Want to find out in what looks like Nirvana and Pink Floyd?
Approach to topics, evolution, correlations through the lyrics of some of the greatests rock bands of all times. We will talk about the different phases of this personal project, in which I approach to a passion through a scientific method.
This is a project that combine different techniques:
- Web crawling
- NoSQL
- Natural Language Processing
- Data visualization
RESTful API - Best Practises.
Friday, July 22nd at 14:30 in Barria 2
Malwina Nowakowska
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 practises 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 practises 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.
Raspberry Pi GPIO Zero
Thursday, July 21st at 14:30 in A1
Ben Nuttall
I work at the Raspberry Pi Foundation and regularly give workshops on physical computing with Python to kids and teachers and we always found the existing GPIO library difficult to teach with due to its broad scope and verbose nature. Although technically possible to do all sorts of projects, it had a difficult learning curve and even the most basic of examples required explanation of code and electronics concepts.
GPIO Zero is a new friendly API for physical computing with Raspberry Pi. Like PyGame Zero, it's a minimal boilerplate module that lets you dive straight in and build things with physical components. Simple interfaces are provided for everyday components with obvious features provided with guessable method names. The Pythonic API was designed for use in education, and was tried and tested with teachers. This talk is the story of how the library came about, how it was developed and I provide a close look at some of its cleverest features. The initial batch of work on the library was done by two people in different cities, with all features and changes discussed in length in a series of about 100 GitHub issues over 2 months, and additional features and expansions have been implemented since launch.
GPIO Zero is now the Foundation's recommended method of interfacing with physical components, and comes pre-installed in the Raspbian Jessie image.
Documentation is provided at http://gpiozero.readthedocs.org/
Real virtual environments without virtualenv
Thursday, July 21st at 16:15 in Jetbrains Room [PyData Track]
Mihai Iachimovschi
The process of developing using Python is very straightforward and easy. Still, each and every developer has his own style of developing and building his entire dev environment. Most of us use virtualenvs which are reliable and comfortable to use. But there are some issues. For instance, the repeatability and immutability of the built environment are not guaranteed.
Virtualenv does a lot of work that targets the direction of somehow isolated and independent environments. They are almost fully repeatable. In any team, we can hear the notorious expression "It works for me!".
For some time now, I am using Docker instead of virtualenv for building custom and really-virtual environments that are entirely isolated. The containers are immutable and consistent, so this workflow guarantees repeatability. Using such technique, not only enables the user to have unique and immutable environments, it also allows de developer to create full app architecture that can then be tested and deployed as is. So the production version will be in identical conditions as the one from the development environment. These features are not provided by virtualenv at all.
The goal of this exercise is to try to use totally different tooling for building the application from its first line of code until the production.
SQLAlchemy as the backbone of a Data Science company
Wednesday, July 20th at 11:15 in Barria 1
Peter Hoffmann
In times of NoSQL databases and Map Reduce Algorithms it's surprising how far
you can scale the relational data model. At Blue Yonder
we use SQLAlchemy in all stages of our data science workflows and handle tenth
of billions of records to feed our predictive algorithms. This talk will dive
into SQLAlchemy beyond the Object Relational Mapping (ORM) parts and conentrate
on the SQLAlchemy Core API and the Expression Language:
Database Abstraction: Statements are generated properly for different
database vendor and type without you having to think about it.
Security: Database input is escaped and sanitized prior to beeing commited
to the database. This prevents against common SQL injection attacks.
Composability and Reuse: Common building blocks of queries are expressed
as SQLAlchemy selectables and can be reuesd in other queries.
Testability: SQLAlchemy allows you to perform functional tests against a database
or mock out queries and connections.
Reflection: Reflection is a technique that allows you to generate a
SQLAlchemy repesentation from an existing database. You can reflect tables,
views, indexes, and foreign keys.
As a result of the usage of SQLAlchemy in Blue Yonder, we have implemented and
open sourced a SQLAlchemy dialect for the in memory, column-oriented database
system EXASolution
Scaling Microservices with Crossbar.io
Friday, July 22nd at 11:15 in Barria 1
Tobias Oberstein
Microservices offer an efficient way to only scale parts of your applications which are hotspots. Instead of running multiple instances of a monolithic application, with all the complexity and operational run-time overhead that entails, you can scale only the functionality which is a bottleneck. Today that increasingly means scaling out, not up.
We will go over open source technologies which allow the easy scaling out across distributed devices.
A live demo will allow the audience to participate with its devices (including mobile phones) in an application. (There will be prizes for the donors.)
The demo uses Crossbar.io, an open source router for the open Web Application Messaging Protocol (WAMP) written in Python. WAMP supports routed Remote Procedure Calls, and Crossbar.io uses these to implement various load-balancing strategies across endpoints which register a particular procedure.
WAMP has a first-class library for Python (Autobahn|Python), but is cross-language, with support for a total of 11 languages. This allows you to implement polyglot and heterogenos microservices applications, from Python to Node.js to C# right into the browser. Microservices can run anywhere, since the outgoing connections to the router which WAMP uses avoid NAT problems.
All software used is open source, and all demo code is provided on GitHub under the MIT license.
Server for IoT devices and Mobile devices using Wifi Network,
Friday, July 22nd at 14:00 in Barria 1
Joaquin Berenguer
The server is developed in Python 3.4, the information is stored in a MySQL 5.6 database.
All IoT devices, Mobile Devices and Windows or Linux Desktop are registered in the database.
All type of messages that are understood by every type of device, is also registered.
A map between which device could access which device is also stored in the database.
With this info, any mobile registered could send a message to a device. The message arrives to the server that resend the message to the IoT device, receive the answer and resend to the Mobile device.
The Mobile device and the IoT device, could be anywhere, as the server is public, have the registration of every device connected.
The mobile device application is developed using Kivy.
The application in the IoT device is developed in C.
The IoT device is a hardware device using ATSAMD21 from Atmel, and wifi is made using ESP8266. The security used is sha256, standard in Python. And the IoT device using the crypto device ATECC508A, that generate also sha256.
The server start a thread for every device connected, the communication between thread is made using queues.
During the presentation, the server is going to be presented, and IoT device is shown, no demo is going to be made.
A library to manage the database, is used for easy access to the database, and have database independence, also will be shown.
Prerequites: Python 3.4, sha256, threading, queue, mysql.connector, relational database.
Simplifying Computer Art in Python
Thursday, July 21st at 16:15 in A1
Catherine Holloway
Processing is a programming language originally developed by the MIT media lab with the goal of allowing artists, educators, and many others develop striking computer generated or assisted projects without requiring deep knowledge of software engineering or computer graphics. Like Processing, Python has become a favourite language of users from diverse backgrounds, such as web development, education, and science. Unlike Processing, python lacks a simple and easy to use library for drawing shapes. Python’s existing libraries for scientific computing and data analysis could be made even more awesome when combined with a simple drawing library.
VPython contains a module called visual that established a simple API and convention for drawing shapes, however it was written in C++, prior to the development of pyglet, and thus is not entirely cross-platform. In this talk, I will demonstrate my solution to this problem: a re-implementation of visual purely in Python called PygletHelper. Pyglet, an existing python library, provides a python interface to OpenGL. PygletHelper is built on pyglet but obscures all of the OpenGL calls, such that the user can draw simple geometric shapes to the screen and animate them without needing to know about computer graphics terminology, memory usage, or C data types.
I will also show some need visualizations of science and music in my talk, as well as the graphical glitches encountered implementing the library.
So you think your Python startup is worth $10 million...
Tuesday, July 19th at 16:15 in Jetbrains Room
Marc-Andre Lemburg
This talk is based on the speaker's experience running a Python focused software company for more than 15 years and a recent consulting project to support the valuation of a Python startup company in the due diligence phase.
For the valuation we had to come up with metrics, a catalog of criteria analyzing risks, potential and benefits of the startup's solution, as well as an estimate for how much effort it would take to reimplement the solution from scratch.
In the talk, I am going to show the metrics we used, how they can be applied to Python code, the importance of addressing risk factors, well designed code and data(base) structures.
By following some of the advice from this talk, you should be possible to improve the valuation of your startup or consulting business in preparation for investment rounds or an acquisition.
System Testing with pytest and docker-py
Wednesday, July 20th at 14:30 in Barria 2
Christie Wilson, Michael Tom-Wing
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.
TDD of Python microservices
Friday, July 22nd at 12:00 in Barria 1
Michał Bultrowicz
These will be my ideas on how to help a microservice-based (HTTP) project by integrating testing into the development process (TDD).
I'll approach the testing pyramid presented in Martin Fowler's "Microservice Testing" as well as the test variants in "Building Microservices" (O'Reilly) and I'll show a way of how they can be translated to real-life Python.
The main focus will be on "service tests" (aka. out-of-process component tests) and contract tests. They both can be run relatively fast on a development machine and can give fast feedback to the developer, preventing many kinds of problems.
Service tests run the whole application process without any internal modifications, but have to present the service with a fake "outside world". I'll show how to fake external HTTP services with Mountebank (similar to WireMock). Instead of faking other systems (like databases) we can quickly spin up the real deal as a Docker container from within the tests.
Contract tests check if the contract (interface) of your service with the outside world is kept, so no external services should be broken by the changes you are introducing. It can also work the other way around, proving that your collaborators are keeping their part of the deal. In both cases, Swagger (a RESTful API description scheme) and a few clever tricks can be used for significant advantage.
Testing the untestable: a beginner’s guide to mock objects
Friday, July 22nd at 15:45 in Barria 2
Andrew Burrows
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.
The Journey from Python Developer to Python Company Owner
Monday, July 18th at 12:00 in A2
Maciej Dziergwa
Ten years ago I became a big Python fan, but at the time there were no jobs for Python developers in Poland. So, I decided to start my own Python company. Today, ten years later, this company employs more than 100 Python developers in four cities.
There are a lot of Python enthusiasts in the world, many of them more skilled than I was at that time, but clearly not anyone can become a „Python business developer”. In this talk I would like to indicate main keys to success, factors and features that help a developer to find himself on an independent career path.
I will try to answear these questions:
How to create employee-friendly work environment for Python developers?
Which business model gives a chance to attract and keep more than 100 Python enthusiast?
I will also gladly share some lessons learned working with dozens of clients, dozens of Python frameworks, and lots, lots of great developers.
The Joy of Simulation: for Fun and Profit
Tuesday, July 19th at 11:15 in A1
vincent warmerdam
In this talk discusses some joyful exercises in simulation. I'll demonstrate it's usefulness but moreover I'll discuss the sheer joy you can experience.
I'll go over the following points (the short list):
- I'll show how you can avoid math by simulating; I'll calculate the probability that two people in the live room have the same birthday.
- I'll show how simulation can help you get better at many games. I'll start with simple card games and with the game of roulette. Most prominently I'll discuss how to determine the value of buying an asset in the game of monopoly (See blogpost: http://koaning.io/monopoly-simulations.html).
- I'll demonstrate how you can simulate Red Hot Chilli Pepper lyrics. Or any other band. Or legalese.
- I'll demonstrate the results of a scraping exercise which helped me to determine the value of investing in Lego Minifigures (See blogpost: http://koaning.io/lego-minifigs-stochastics-profit.html).
Depending on the level of the audience I might also discuss how biased simulation can help you solve optimisation problems or even introduce bayesian statistics via sampling. I'll gladly leave this decision to the EuroPython committee.
The Report Of Twisted’s Death
Monday, July 18th at 14:45 in Barria 2
Amber Brown
- Introduction (3 min)
- I’m Amber Brown, Twisted Release Manager
- 3 years contributing to the Twisted Project
- What is asynchronous I/O? (5 min)
- How can it be implemented? (5 min)
- The options (5 min)
- Twisted, Tornado, asyncio
- Asynchronous I/O on Python 3, in 2012 (2 min)
- Tornado was only just ported
- twisted, gevent, eventlet, etc were not ported
- asyncio (7 min)
- Designed as both a “common API” for async I/O frameworks, much like WSGI was for web servers
- Built using ideas from Twisted
- asyncio exists, so Twisted and Tornado can go away, right? (5 min)
- asyncio is an “async I/O thing”, and twisted/tornado are “async I/O things”, so Twisted and Tornado aren’t required now, right?
- Twisted’s Renaissance (5 min)
- 450,000 LoC, fifteen years of legacy, supports many many major protocols
- Twisted hits 50% on the port to Python 3
- Pressure from asyncio providing renewed competition
- The very existence of asyncio means we no longer need to have the “why is asynchronous I/O a good idea”
- But It’s Not Over Yet (5 min)
- Twisted does not implement nor use the asyncio standard APIs, Twisted needs help and developer support to do this
- Support on Windows is still subpar, as the asyncio IOCP proactor does not support UDP
- The Future (8 min)
- A Twisted You Can Use
- WSGI 2
- asyncio standardisation
- Questions (5 min)
The right way to write documentation
Tuesday, July 19th at 14:00 in Barria 2
Daniele Procida
There are right and wrong ways to write documentation; many projects get it wrong - especially the question of documentation structure. In fact, getting the structure right is not only easy, but makes it easier to get the content and style of the documentation right too.
For many project maintainers, writing documentation is a chore, and only half the battle: even more painful is trying to structure it. Even the best projects suffer because their documentation isn't up-to-scratch - and then, poor documentation structure can doom even even top-quality documentation content to rot and decay.
This talk is a practical guide to improving documentation. It won't repeat numerous excellent previous talks and guides on the available tools for documentation and how to use them, or even advise on good practices for the content of documentation.
It's devoted entirely to documentation structure, something that is easily missed, that most projects fail to get right, and that I've never seen made explicit elsewhere.
I'll use numerous practical examples as illustrations, showing what has been got right, what hasn't, and the transformations that can be wrought by applying good practices to documentation structure.
The good news is that there are quick and easy gains with long-lasting benefits. Once the right structure is in place, it will not only help contributors understand what needs to be written and how it needs to be written, it will help maintain its own structure.
The value of mindfulness and how it has arrived at Google
Friday, July 22nd at 16:15 in Barria 2
Ralph Heinkel
Mindfulness has proven to be a foundational skill that started as a pure buddhist practice. Nowadays mindfulness serves as the core technique of several western programs ranging from curing stress-induced medical problems to curricula for teaching successful business leadership, such as the Search Inside Yourself (SIY) program developed at Google in 2002.
Mind is the root of all things. Neuroscience shows that attention is a fundamental function of the mind. Being able to direct attention to the present moment - and keep it there while performing daily tasks - is a great tool to navigate through life and its challenges with more engagement, more happiness, and more resilience. Focusing attention in a relaxed way enables us to disconnect from the overall noise found in a high-speed environment and get things done without feeling too overwhelmed by them. But being effective is not only about checking off more tasks - it is about how we are in resonance with our environment, how we interact with others, and how we face the increasing complexity in our professional life.
The aim of this seminar is to provide a practical experience of mindfulness with a short introduction to how it can be applied in a technology driven world as experience by digital workers.
Things I wish I knew before starting using Python for Data Processing
Wednesday, July 20th at 12:00 in Jetbrains Room
Miguel Cabrera
In recent years of the ways people get introduced into Python is through its scientific stack. Most people that learned Python this way are not trained software developers and many times it is the first contact with a programming language.
Although this is not bad, it may lead to learn solely one aspect of the language while overlooking other idioms, standard and common libraries included in Python as well as some basic software development good practices. This may become a problem when a data science project is moved from an experimentation phase to an integration with technical environment.
In this talk I share some useful tricks, tools and techniques and as well as some software design and development principles that I find beneficial when working on a data processing / science project.
The talk is divided into two parts, one is Python centered, where I will talk about some powerful Python construct that are useful in data processing tasks. This include some parts collections module, generators and iterators among others. The other I will describe some general software development concepts including SOLID, DRY, and KISS that are important to understand the rationale behind software design decisions.
Towards More Secure Emailing
Tuesday, July 19th at 10:30 in A2
holger krekel, Kali Kaneko
Email has been declared dead several times but refuses to die. It remains the backbone of the web and remains the largest federated open social network to date. However, most people and organisations rely on a few big email operators which fund their operations through advertisements and user tracking. But is it neccessary to hand off email messaging operations to large operators? Is dealing with unsolicited email (SPAM) still too maintenance intensive to deploy it by yourself? Is handling secret keys to unlock encrypted mails still a nightmare? Are there somewhat secure email hosting solutions?
In recent years there have been renewed efforts to renovate the state of world wide email infrastructure with initiatives such as the "Dark Mail Alliance", "FreedomBox", "Mailpile", "Mail-in-a-box" and the "LEAP encryption access project". Some of them are using Python to provide security to users both from criminal, corporate and state level attacks and could use help from experienced python programmers.
The talk concludes with highlighting current ongoing research (Panoramix and NEXTLEAP) funded by the European Union over the next couple years. They try to ease and automate key management and provide "encryption by default" among other goals. After this talk you'll end up having a better understanding of how you can use existing technologies for yourself or your organisation and how you can possibly help to improve them and make life for users and activists safer world-wide.
Un vector por tu palabra
Tuesday, July 19th at 11:15 in Barria 1
Mai Giménez
“Dime con quien andas y te diré cómo eres” Este dicho es una de las ideas más revolucionarias en PLN. Podemos saber muchas cosas de una palabra por su contexto. No es lo mismo un adorable gato que un gato mecánico, pero por el contexto diferenciamos esta palabra polisémica.
Hasta ahora la mayor parte de los modelos representan una frase como una bolsa de palabras. Por ejemplo, si queremos representar este conjunto de frases: [“I love Python”, “I love NLP”, “Pyladies are cool”] tenemos un vocabulario de siete palabras: [“I”, “love”, “Python”, “NLP”, “Pyladies”, “are”, “cool”] esta representación crea un vector de tamaño del vocabulario para cada frase, y pone a 1 si la palabra aparece y a 0 en el caso contrario : [[1,1,1,0,0,0,0], [1,1,0,1,0,0,],[0,0,0,0,1,1,1]] ¡Pero,se pierde el contexto y los vectores pueden ser gigantes y con muchísimos 0s!
Recientemente, hemos encontrado una forma mucho mejor de representar las palabras: La representación distribuida -word2vec, por ejemplo-
En esta charla exploramos esta representación y cómo aplicarla en problemas de clasificación utilizando textos de redes sociales.
Navegaremos por el rico ecosistema científico en python, veremos cómo crear gráficas significativas y hablaremos de la importancia de escribir experimentos bien diseñados, replicables y con código elegante y por supuesto de la importancia de difundir el conocimiento. Debemos inspirar a la siguiente generación de científicos y científicas ¡Seamos extraordinarios!
Unveiling the Universe with python
Thursday, July 21st at 11:15 in Barria 1
Valeria Pettorino
Python is widely used in Cosmology, which is the study of the Universe and all forms of energy in it. A large amount of data has been recently obtained through space satellite missions, such as Planck, financed by ESA/NASA. Planck has observed the radiation emitted about 13 billion years ago (the Cosmic Microwave Background, CMB), which gives us information on the content and space-time geometry of the Universe. Many competitive theoretical models have been proposed that aim at describing the evolution of the species contained in the Universe: therefore, cosmologists need a method to identify which theoretical model better fits the data. In order to compare data with theoretical predictions, cosmologists use Bayesian statistics and Monte Carlo simulations. Among the tools developed for the analysis, the package ‘Monte Python’ is publicly available and uses python to perform Monte Carlo simulations: this allows to determine the theoretical model that maximizes the likelihood to obtain the observed data. Such model is now the standard cosmological model and reveals a Universe that is very different from what scientists had ever expected. A Universe in which the atoms we are made of, constitute only 5% of the total energy budget. The rest is the so-called ‘Dark Universe’.
I will illustrate the story of how cosmologists used python to analyse the data of the CMB and unveil the Dark Universe.
Using Service Discovery to build dynamic python applications
Wednesday, July 20th at 10:30 in A2
Alexys Jacob
This talk will showcase and compare three Service Discovery technologies and their usage to build a dynamic and distributed python application :
- consul
- etcd
- zookeeper
After a short introduction to service discovery, we will iterate and compare how we can address the concrete and somewhat complex design of our python application using each technology.
We'll then be able to discuss their strengths, weaknesses and python bindings and finally showcase the application in a demo.
All the source code will of course be made available for the audience to benefit and start from for their own use !
Using and abusing Python’s double-underscore methods and attributes
Thursday, July 21st at 12:00 in Barria 2
Anjana Vakil
The curious Python methods and attributes surrounded by double underscores ('__
') go by many names, including “special”, “dunder”, and “magic”. You probably use some of them, like __init__
, every day. But that’s just the tip of the iceberg!
In this talk, we’ll explore the weird and wonderful world of the double-underscore, and find out how dunders can be useful, silly, dangerous, and just fun! We’ll play pranks on Python’s builtin operators for arithmetic and comparison. We’ll make arbitrary objects behave like dictionaries and containers. We’ll reduce an object’s memory usage, and speed up tests for membership. We’ll even try some naughty function hacks that we should never use in real life!
You'll get the most out of this talk if you're already comfortable writing object-oriented Python code. If you already use special dunder magic in your own code, that's excellent! You’ll have a chance to share your tips & tricks with the rest of the audience at the end of the talk.
What Python can learn from Haskell packaging
Monday, July 18th at 11:15 in Jetbrains Room
Domen Kožar
Haskell community has been living in "Cabal hell" for decades, but Stack tool and Nix language have been a great game changer for Haskell in 2015.
Python packaging has evolved since they very beginning of distutils in 1999. We'll take a look what Haskell community has been doing in their playground and what they've done better or worse.
The talk is inspired by Peter Simons talk given at Nix conference: Peter Simons: Inside of the Nixpkgs Haskell Infrastructure
Outline:
- Cabal (packaging) interesting features overview
- Cabal file specification overview
- Interesting Cabal features not seen in Python packaging
- Lack of features (introduction into next section)
- Cabal hell
- Quick overview of Haskell community frustration over Cabal tooling
- Stack tool overview
- What problem Stack solves
- How Stack works
- Comparing Stack to pip requirements
- Using Nix language to automate packaging
- how packaging is automated for Haskell
- how it could be done for Python
What is the best full text search engine for Python?
Thursday, July 21st at 14:30 in Jetbrains Room [PyData Track]
Andrii Soldatenko
Nowadays we can see lot’s of benchmarks and performance tests of different web frameworks and Python tools. Regarding to search engines, it’s difficult to find useful information especially benchmarks or comparing between different search engines. It’s difficult to manage what search engine you should select for instance, ElasticSearch, Postgres Full Text Search or may be Sphinx or Whoosh. You face a difficult choice, that’s why I am pleased to share with you my acquired experience and benchmarks and focus on how to compare full text search engines for Python.
What's the point of Object Orientation?
Thursday, July 21st at 11:15 in A2
Iwan Vosloo
Object Orientation (OO) is often introduced in terms of how it is implemented by a specific language. However, understanding the theory underlying OO is not quite the same as understanding how OO concepts are supported by a particular language. It is insightful to understand the simple OO fundamentals and how these map to the particular implementation provided by Python.
In this talk I will first explain the very basics of OO from a language-neutral point of view with the aim of showing what OO can offer you and to give a glimpse of the simple mathematical theory underlying OO. I hope to give you enough information to help you distinguish between better and worse designs and to detect whether you’re using OO as it was intended. I will also very briefly show how these fundamentals map to Python.
This talk is for anyone: whether you’re new at Object Orientation, or a practitioner wondering whether OO is worth the effort you’ve spent trying to use it.
Wrestling Python into LLVM Intermediate Representation
Friday, July 22nd at 12:00 in Barria 2
Anna Herlihy
What is LLVM-IR?
The LLVM Compiler Infrastructure Project provides a transportable intermediate representation (LLVM-IR) that can be compiled and linked into multiple types of assembly code. What is great about LLVM-IR is that you can take any language and distill it into a form that can be run on many different machines. Once the code gets into IR it doesn’t matter what platform it was originally written on, and it doesn’t matter that Python can be slow. It doesn’t matter if you have weird CPUs - if they’re supported by LLVM it will run.
What is Tupleware?
TupleWare is an analytical framework built at Brown University that allows users to compile functions into distributed programs that are automatically deployed. TupleWare is unique because it uses LLVM-IR to be language and platform independent.
What is PyLLVM?
This is the heart of the talk. PyLLVM is a simple, easy to extend, one-pass static compiler that takes in the subset of Python most likely to be used by Tupleware. PyLLVM is based on an existing project called py2llvm that was abandoned around 2011.
This talk will go through some basic compiler design and talk about how some LLVM-IR features make our lives easier, and some much harder. It will cover types, scoping, memory management, and other implementation details. To conclude, it will compare PyLLVM to Numba, a Python-to-LLVM compiler from Continuum Analytics and touch on what the future has in store for PyLLVM.
Writing Python Native Extensions in Rust
Friday, July 22nd at 15:45 in A2
Maciej Kula
Python native extensions are often the way to go if we need performance. Customarily, these have been written in C, C++, Cython, or Fortran. However, writing new C, C++, or Fortran should be avoided (unless you are an expert): they are too error-prone and low-level. Even Cython can be dangerous if we want to approach C-level performance.
Fortunately, not all is lost. In this opinionated talk, I'm going to argue that Rust --- a new high-level, compiled language from Mozilla --- is the way to go. Like C or C++, it compiles to machine code, has no runtime, and can be called via the C calling conventions from other languages. Unlike C and C++, it is thoroughly modern: it's memory safe (despite not being garbage collected), has option and result types, pattern matching, functional elements (first-class functions, closures, map and filter), trait-based generics, and fantastic modern tooling.
With all this, it's very easy to use from Python using ctypes or cffi. To illustrate this, I'm going to show one simple and one fancy example of interfacing with Rust from Python, explaining features of the Rust code as I go along.
While it's rather ambitious to hope that you'll never write another line of C after my talk, I can at least hope that you'll give Rust a go.
Writing Redis in Python with asyncio
Thursday, July 21st at 14:30 in Barria 2
James Saryerwinnie
Python has been adding more and more async features to the language. Starting with asyncio in python 3.4 and including the new async/await keywords in python 3.5, it's difficult to understand how all these pieces fit together. More importantly, it's hard to envision how to use these new language features in a real world application. In this talk we're going to move beyond the basic examples of TCP echo servers and example servers that can add number together. Instead I'll show you a realistic asyncio application. This application is a port of redis, a popular data structure server, written in python using asyncio. In addition to basic topics such as handling simple redis commands (GET, SET, APPEND, etc), we'll look at notifications using pub/sub, how to implement the MONITOR command, and persistence. Come learn how to apply the asyncio library to real world applications.
Writing faster Python
Tuesday, July 19th at 14:00 in A1
Sebastian Witowski
Did you know that Python preallocates integers from -5 to 257 ? Reusing them 1000 times, instead of allocating memory for a bigger integer, can save you a couple of milliseconds of code’s execution time. If you want to learn more about this kind of optimizations then, … well, probably this presentation is not for you :) Instead of going into such small details, I will talk about more "sane" ideas for writing faster code.
After a very brief overview of how to optimize Python code (rule 1: don’t do this, rule 2: don’t do this yet, rule 3: ok, but what if I really want to do this ?), I will show simple and fast ways of measuring the execution time and finally, discuss examples of how some code structures could be improved.
You will see:
- What is the fastest way of removing duplicates from a list
- How much faster your code is when you reuse the built-in functions instead of trying to reinvent the wheel
- What is faster than the good ol’ for loop
- If the lookup is faster in a list or a set (and when it makes sense to use each)
- How the “It's better to beg for forgiveness than to ask for permission” rule works in practice
I will NOT go into details of "serious" optimization, like using different Python implementation or rewriting critical code in C, etc.
Writing unit tests for C code in Python
Thursday, July 21st at 12:00 in Barria 1
Alexander Steffen
There are many unit testing frameworks for C out there, but most of them require you to write your tests in C (or C++). While there might be good reasons to keep your implementation in C (for example execution speed or resource consumption), those hardly apply to the tests. So wouldn't it be nice to use all the power of Python and its unit testing capabilities also for your C code?
This talk will show you how to combine CFFI and pycparser to easily create Python unit tests for C code, without a single line of C anywhere in the test cases. It will also cover creating mock functions in Python, that can be used by the C code under test to hide external dependencies. Finally, we will look at some of the challenges you might face when trying to mix Python and C and what to do about them.
async/await in Python 3.5 and why it is awesome
Thursday, July 21st at 11:15 in A1
Yury Selivanov
The talk will start with a brief coverage of the story of asynchronous programming in Python -- Twisted, Tornado, Stackless Python & greenlets, eventlet, Tornado, asyncio & curio. We've come a really long road, and it's important to understand how we ended up with async/await.
Then I'll go over asyncio and curio, showing async/await by example, explaining that in reality it's a very easy to use language feature. You don't need to know all the details to be able to successfully use the new syntax, and even build new frameworks on top of it.
I'll then explain the async/await machinery in CPython, starting with generators and 'yield' expression, showing what is 'yield from' and finally, demonstrating how async/await is implemented in CPython. This will ensure that those who want to invent some new crazy ways of using async/await will have a starting point!
I'll end the talk with a story of how I came up with the idea. How I shared it with Guido van Rossum, Victor Stinner, and Andrew Svetlow. How the first version of the PEP was born, and how we managed to push it to Python 3.5 in under two months period. The goal is to make people understand that it's possible to change your programming language -- in fact, Python, as any other programming language, wants new features and capabilities to be relevant.
import community
Wednesday, July 20th at 16:15 in Barria 2
Fernando Masanori Ashikaga, Paola Katherine Pacheco, Kátia Nakamura
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." In last two years I was fortunate enough to take part in nine PyCon's in ten different countries: Namibia, UK, Japan, Brazil, Italy, Argentina, Uruguay, Germany, Canada and Spain. Some were not national conferences, but were EuroPython or PyConUS. I was coach in three Django Girls at PyCon Namibia, Argentina and Brazil. I always took note of experiences on how to improve diversity, that could be useful and replicable in my local community and would like to share at EuroPython. There are other reports that I 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.
re-Discovering Python's Regular Expressions
Tuesday, July 19th at 14:30 in A2
Ilia Kurenkov
Anyone who has used Python to search text for substring patterns has at least heard of the regular expression module. Many of us use it extensively for parsers and lexers, extracting information .
And yet we know surprisingly little about its inner workings, as Armin Ronacher demonstrated in his recent blog post, “Python's Hidden Regular Expression Gems”. Inspired by this, I want to dive deeper into Python’s re
module and share what I find with folks at EuroPython. My goal is that at the end of the day most of us walk away from this talk with a better understanding of this extremely useful module.
Here are a few examples of the kinds of things I would like to cover:
- A clear presentation of
re
’s overall structure.
- What actually happens behind the scenes when you “compile” a regular expression with
re.compile
?
- What are the speed implications of using a callable as the replacement argument to
re.sub
?
- re.MatchObject interface:
group
vs. groups
vs groupdict
To keep the talk entertaining as well as educational I plan to pepper it with whatever interesting and/or funny trivia I find about the module’s history and structure.
Prerequisites:
If you've ever used the re
module, you should be fine :)
Tutorials
(Machine-)Learning Chinese, with Python!
Thursday, July 21st at 14:00 in A4 [PyData Track]
Andreas Dewes
(Machine-)Learning Chinese, with Python!
Learning a new language is hard work. Especially if it is Chinese, which is a tonal language that is written using more than 10.000 different characters. Finding our way around in this linguistic labyrinth is a daunting task. But do not fear, for we have the power of Python at our side, and with its help we will machine-learn Chinese!
Mom scolds the horse
Chinese is a tonal language, which means that pronouncing a syllable differently will usually change its meaning. And while this can be very funny, it can also be rather embarrassing for language learners. So, to keep us from getting into linguistic trouble, we'll write a little Python tool that helps us to improve our pronunciation.
Seeing the trees and the forest, but still being lost
Reading the morning newspaper while having a nice cup of tea doesn't sound so complicated, does it? Well, if that newspaper is printed in Chinese we will have to know about 2.500 characters just to make it through the first pages. Again, machine-learning will come to our rescue!
Low-hanging fruits, high-flying dragons
Pronunciation and characters mastered, we'll still have to learn a large amount of words and phrases, so where to begin? To answer this, we'll make use of Bayesian techniques to identify the low-hanging fruits of the Chinese language.
Congratulations, you should now be fluent in Chinese (or at least Machine-Learning).
Blender: much visual, very 3d, many python.
Friday, July 22nd at 10:15 in A4
vincent warmerdam
In this short tutorial session you'll learn how easy it is to build 3d objects with python code in blender. We begin with constructing 3d objects with cubes and we finish by rendering a small video/gif with mini explosions! It is meant to be very beginner friendly and will be a fun exercise to show how flexible python can be.
These two blogposts of mine will give an impression of what people can do at the end of the day.
If customs allow it: I'll consider bringing an oculus rift such that people can walk in their own creations.
Efficient Python for High-Performance Parallel Computing
Tuesday, July 19th at 10:15 in A4
Michael McKerns
Many of the examples you often find on parallel Python focus on the mechanics of getting the parallel infrastructure working with your code, and not on actually building good portable parallel Python. This tutorial is intended to be a broad introduction to writing high-performance parallel Python that is well suited to both the beginner and the veteran developer. Parallel efficiency starts with the speed of the target code itself, so we will start with how to evolve code from for-loops to Python looping constructs and vector programming. We will also discuss tools and techniques to optimize your code for speed and memory performance.
The tutorial will overview working with the common parallel communication technologies (threading, multiprocessing, MPI) and introduce the use of parallel programming models such as blocking and non-blocking pipes, asynchronous and iterative conditional maps, and map-reduce. We will discuss strategies for extending parallel workflow to utilize hierarchical and heterogeneous computing, distributed parallel computing, and job schedulers. We then return our focus to the speeding up our target code by leveraging parallelism within compiled code using Cython.
At the end of the tutorial, participants should be able to write simple parallel Python scripts, make use of effective parallel programming techniques, and have a framework in place to leverage the power of Python in High-Performance Computing.
Faster Python Programs - Measure, don't Guess
Wednesday, July 20th at 10:15 in A4
Mike Müller
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.
Guide to make a real contribution to an open source project for novice
Friday, July 22nd at 14:00 in E
Tushar Gautam
Goal
You will be guided to make a real contribution to an open source project (coala). The skills you learn are generally applicable.
Prerequisite
- Eager to contribute to open source.
- Willingness to do great things in python
- GitHub account
- Git and Python installed
- A laptop
Overview
- Talk about version control (specifically Git). Basic stuffs like setup git and commands like
fork/clone, pull/fetch, push, commit/ammend, squash
etc. We'll be following learning by doing paradigm. Approx 15 minutes.
- Introduce people to coala in general, brief about its codebase and how to use Github to contribute to coala. Approx 15 minutes.
- Get started to write some code. We'll have bunch of unassigned issues, specifically created for
the purpose of workshop, show people how developers collaborate, cover git commands in more detail and the pull requests from attendees. Approx 1.30 hrs.
We'll also talk in brief about quality/testing tools like Travis Ci, CircleCi, Gitmate etc. In the meantime we'll start reviewing the PRs. Approx 20 minutes.
- Finally, reworking the code phase and get every attendees merge their contributions to master branch.
IPython in Depth
Monday, July 18th at 14:15 in E
Mike BRIGHT
We will run through the publicly available ipython-in-depth tutorial (or a publicly available fork) to discover many of the capabilities of Jupyter and IPython.
Please bring your own PC with Jupyter already installed.
See here for suggested installation methods:
http://jupyter.readthedocs.org/en/latest/install.html
Introduction to Data Wrangling
Thursday, July 21st at 10:15 in A4 [PyData Track]
Katharine Jarmul
Overview
In this tutorial, we'll be taking an exploratory look at how to perform data wrangling using Python. It's assumed the audience has a working understanding of Python and some basic data analysis exposure. Participants will leave the class with a better understanding of useful Python libraries for data analysis, as well as some hands-on scripts built throughout the tutorial. With these initial first steps, they should feel comfortable integrating data analysis into their current Python projects.
Outline
Introduction to Data Wrangling with Python
How to ask questions Where to find data
** Why Python?
Initial setup
IPython Notebook Getting the data
Importing data
Working with easy formats Working with hard formats
** APIs
Exploring data
Using pandas Asking simple questions
** Joining datasets
Analysing data
What is the data saying Standardization and normalization
** Making conlusion
Reporting your findings
Who is your audience Charting data
** Interactive charts and graphs
Next steps
Where to go from here Q&A
** "Homework"
Introduction to Deep Learning for Natural Language Processing
Wednesday, July 20th at 10:15 in E
Bargava Subramanian, Nischal HP, Raghotham Sripadraj
Ever wondered how Google Translate works so well? Do you know how the auto-captioning works on Youtube? How to mine the sentiments of tweets on twitter? And there's a host of successful natural language processing examples out there. What's the underlying theme? They all use Deep Learning.
This workshop introduces artificial neural networks and deep learning. The building blocks of neural networks are discussed in detail. Attendees are introduced to learning using ANN with backpropagation algorithm.
A preliminary model using multi-layer perceptron is implemented to get a feel for deep learning model structure and the library keras.
The state-of-art recurrent neural networks is introduced. Two approaches are shown - 0ne using Long Short-Term Memory models and another one leveraging Word2Vec. Some ways to overcome overfitting are explored.
We'll also show how GPU's affect the computation.
We'll also implement a RNN to do text-generation.
Ideal Background of the attendee
Some knowledge of machine learning.
- Bias and Variance
- Train, Validation, and Test sets
- Cross-validation
- hyperparameter optimization
- Measuring model accuracy
- Supervised and Unsupervised learning
- Overfitting
- Basic Python constructs
The repository for the tutorial is here
The repository has instructions on what packages to install and the data we would be using for the workshop.
Manage your Python packages professionally with devpi
Wednesday, July 20th at 14:00 in E
holger krekel
The devpi server can manage all your private python packages and documentation and you can use well-known python tools like pip, tox, twine and sphinx to work with it. It also serves as a caching proxy for pypi.python.org and indexes can be configured to work as an "overlay" where your private packages appear in addition to public python ones. The server provides a web interface which integrates search and sphinx-generated documentation. All of this will be demonstrated and learned through little exercises during the course.
The devpi client side provides help for creating users, indexes, uploading packages, documentation and performing package-defined tests. In the course you'll learn the basics of command line usage with devpi and how to use it to implement custom work flows.
More info on the devpi system at doc.devpi.net
NumPy with Cython
Wednesday, July 20th at 14:00 in A4
Stefan Behnel
The Cython compiler is an excellent and widely used tool for speeding up computational code and talking to native libraries. It translates Python code to C or C++ code and supports static type annotations to allow direct use of C/C++ data types, native functions and complex array types. The tight integration of all three languages makes it possible to freely mix Python features like generators and comprehensions with C/C++ features like native data types, pointer arithmetic or manually tuned memory management in the same code. Cython has direct support for NumPy arrays and other buffer objects, which allows for efficient and even parallel (OpenMP) processing of large arrays.
This tutorial by a Cython core developer introduces the Cython programming language and its compiler and leads the participants all the way from their first Python extension to an efficient integration with NumPy arrays.
Note that participants are expected to have a good understanding of the Python language, at least some basic knowledge about NumPy and C or C++, and are able to use a C compiler on their computers to build native CPython modules from sources (e.g. install source packages from PyPI that contain C extensions). No deep C programming knowledge is required, nor is any prior knowledge needed about writing extension modules for the CPython runtime. The Cython compiler handles most of these low-level issues itself.
OpenStack Cloud Native Deployment for Application Developers
Thursday, July 21st at 14:00 in E
David Flanders
Did you miss the first wave of job opportunities to be an OpenStack operator? Fear not, the second wave commeth! Learn the latest in Application Development atop OpenStack. Both DevOpps and AppDev are invited to this hands-on training. This training will provide an overview of the most popular Python SDKs and their use with OpenStack (and other clouds: why be locked in?).
By the end of the workshop you will have learned:
a.) The basic componets of an open collaborative cloud infrastructure,
b.) Simple architectures for building an application to scale accross several cloud compute nodes
c.) Cloud data storage techniques and how to auto-orchestrate your data and compute
d.) About the future upcoming application development paradigms: containers, 12 factor and mobile/IoT and much more.
The future is open, might as well get started.
The OpenStack foundation is now a not-for-profit organisation which is now 5 years of age and still innovatively growing. If you've not been to an OpenStack summit you are missing one of the best open events of the year. The OpenStack summit will be in Barcelona late October, hope to see you there.
Present-day Async Web development training: from Twisted to Tornado and AsyncIO
Tuesday, July 19th at 10:15 in E
Anton Caceres
Objective
Get hands-on experience with async Python frameworks, learn which tool works best for which task.
Description
This beginner-friendly workshop contains an overview, code tasks and a benchmark for production-ready Python async tools for the time being:
- AsyncIO
- Tornado
- Twisted
Workshop does not promote any particular framework; we practically try each option and develop personal preferences.
Plan
- Introduction to async web servers and frameworks (15 min)
- Formulating typical web tasks that need async design (10 min)
- for task in tasks: (1 h)
- implement with Twisted
- Tornado
- AsyncIO
- Take a realistic parallel requests use-case and use LAN to experiment (30 min)
- Discuss peculiarities of implementations (10 min)
- Run same task on different platforms with a benchmark (10 min)
- Integrate frameworks: (15 min)
- run Tornado on AsyncIO loop
- convert Future objects
- Q & A (10 min)
Practical part
We try different frameworks to implement typical web tasks: handling requests, fetching data from external APIs and proxying connections. In case of reliable LAN we will use laptops of each other as services to call asynchronously. This part is interactive, everyone is a creator of own service. Then we will put some service down and do error handling, try to integrate future objects of different frameworks, run a benchmark.
Pre-requirements
- Laptop with Python 3.4+
Productive Coding with PyCharm
Tuesday, July 19th at 14:00 in A4
Paul Everitt
PyCharm is a powerful development environment for Python and web programming, with many tools and features to boost productivity. This tutorial covers a broad selection of these features, in the context of hands-on development. The outline focuses on Python, but includes a treatment of the HTML/JS/CSS features PyCharm inherits from its IntelliJ/WebStorm foundation.
During this tutorial we'll also take a look on how good code practices can help the IDE to assist you on Python coding: writing docstrings, type hints with Python 3.5 latest standards, etc.
After this tutorial, attendees should part with a basic understanding of the myriad of PyCharm features: what they are, why they help, how to use them, and how to find more information.
Attendees should arrive at the tutorial with an installation of Python and and installation of the latest PyCharm. A list of required packages will be provide the week before, to help minimize the network impact of PyPI access. (An attempt will be made to run a local mirror.)
Property-based testing with Hypothesis
Monday, July 18th at 10:15 in A4
David MacIver
Hypothesis is a library for writing smarter tests.
Instead of hand-writing every example in your tests, you describe what sorts of examples you need and let it fill in the blanks. It uses this to actively go looking for bugs in your code.
It's proven very effective, and is being used by an ever growing number of open source projects (including pypy, cryptography, and mercurial), but people sometimes struggle to get started.
In this session we'll help you overcome that by going through a number of illustrative examples that will help you understand this style of testing better.
The first two hours will be spent on these, start with a discussion of the problem, a sample test to start you off, and then people will work through it at their own pace, with me there to answer questions and help people when they get stuck. After people have had some time on a given problem, I'll go over some possible tests for the example and why they are useful, and give people time to try anything they like out before moving on to the next problem.
For the final hour, people will work on testing some more substantial code. You should feel free to bring your own, but I will provide some interesting projects for people to work on for anyone who doesn't have anything specific.
At the end of this you should feel much more comfortable with the general concepts of property based testing, and be able to use Hypothesis effectively to test your own code.
Python for System Administrators
Tuesday, July 19th at 14:00 in E
Roberto Polli
Goal
Use python to replace sysadmin tools like awk, perl and gnuplot and:
- gather system data on different platforms (Linux, Windows, Mac);
- parse them efficiently (µ-benchmarks, defaultdict, re.compile, dstat plugins);
- basic statistics and data visualization (distributions, correlation, scatter);
- showcase of useful libraries (smtplib, ansible, mysql-utilities);
- plan test driven deployments with Ansible
Timings are in the draft slides
Methodology
The training is interactive, jupyter notebooks stubs here with sources and a Docker image.
Students will be driven performing the exercises and sharing their results. A couple of volunteers will be prepared to support the students.
Prerequisites
The training is multi-platform, though focused on Linux + Python2.7:
- Linux, Windows, Mac
Feel free to contact me for any issue or question!
So, what's all the fuss about Docker?
Friday, July 22nd at 14:00 in A4
Daniele Procida, Stefan Foulis
Ou cloud platform, Aldryn, is probably the world’s biggest host of Docker-powered Django websites.
We work with Docker every day, and also with less-technical users of the platform, so we have built up a good understanding of how to introduce and explain the technology for practical purposes, and of the numerous and multiple difficulties that users of it can stumble across.
We want to share that experience, and help people take advantage of Docker from a Python/Django perspective.
What does Docker offer you, the Django developer? Even if you already know a bit about Docker, you’re probably more familiar with it as a deployment tool, but in fact it offers some powerful advantages for the Python/Django developer too.
This is a hands-on workshop that also aims to clarify some key questions for the Django developer:
- Why is Docker such a big deal?
- What problems can Docker solve for me?
- How does it work?
- How can it enhance my development experience?
In the workshop we’ll help install and configure Docker on your laptop (Linux/OS X/Windows), to have it working in a clear and manageable way.
Then we’ll step through setting up a Django project with Docker.
If we have time, we’ll go on to show how Docker can help you move your project from development to deployment with minimum friction.
Test-driven code search and the art of writing implementation-agnostic tests
Monday, July 18th at 14:15 in A4
Alessandro Amici
This is the hands-on counterpart of the regular talk "Test-driven code search and reuse coming to Python with pytest-nodev", it is suggested to attend it first.
We will practice writing implementation-agnostic tests and using the test-driven reuse (TDR) development strategy, a natural extension of test-driven development (TDD), with pytest-nodev an Open Source test-driven search engine for Python code.
TDR aims to address the limits of usual keyword-based search by focusing on code behaviour and semantics instead. Developing a new feature in TDR starts with the developer writing the tests that will validate candidate implementations of the desired functionality. Before writing any functional code the tests are run against all functions and classes of all available projects. Any code passing the tests is presented to the developer as a candidate implementation for the feature.
Applications will include:
- test-driven code search of auxiliary functions and classes
- full code reuse by adding dependencies
- full code reuse by forking code samples
- partial code reuse by integrating features and identifying problem corner cases
- test-suite validation, identification of weak tests
- using implementation-agnostic tests to make regular test-suites more resilient to code refactoring.
The Stupid Python Workshop
Thursday, July 21st at 10:15 in E
Mark Smith
Spend time using and abusing advanced features of Python, for
fun, with little consideration of what is a good or bad idea.
Developers avoid using advanced language features because they don't want to
write code that is difficult to understand. Don't be one of those developers!
Come on an adventure to push Python syntax to its limits.
This workshop is aimed at intermediate Python developers. Attendees should be
comfortable with Python's syntax and should be intrigued or confused by:
magic methods; how @property
works; and what on Earth a metaclass is.
Attendees will learn how these things work, starting with the more
straightforward features. I'll introduce each concept assuming the attendees
have never used them before.
We'll be writing silly and bad things. We aim to understand how they work,
not whether they are a good idea, but in each case there will be a brief
discussion of what each feature was really designed for. The exact contents are
not confirmed, but should include some or all of the following:
- Override operators for more flexible syntax.
- Using
__new__
for fun and profit.
- Functions that behave differently depending on the values in the
caller's scope.
- Tacking extra methods on to classes we don't own.
- Abuse of the descriptor protocol.
- Messing with imports.
- Decorators that do things decorators were never meant to do.
- Write a metaclass and see if the world ends.
pytest - simple, rapid and fun testing with Python
Friday, July 22nd at 10:15 in E
Florian Bruhin
The py.test tool presents a rapid and simple way to write tests for your Python code. This training gives a quick introduction with exercises into some distinguishing features. We’ll do exercises where we get existing non-pytest test suites to run with pytest and discuss migration strategies. We’ll finish with discussing topics and questions of participants related to their own test suites and usages.
This is the planned outline:
(30 minutes) pytest feature walkthrough: automatic test discovery, assert statement, modular parametrizable fixtures, 150 plugins
(60 minutes) pytest fixture mechanism: dependency injection, declaring and using function/module/session scoped fixtures, using fixtures from fixture functions, parametrizing fixtures. Exercises.
(30 minutes): running nose/unittest/trial/Django suites with pytest. Discussing advantages and limitations. Exercise with a select existing real-life open source project.
(30 minutes): Strategies for a) migrating to pytest b) using “autouse” fixtures in conjunction with XUnit-based setup/tearodwn methods. Exercise.
(30 minutes): open space for questions and interactively solving pytest/unittest integration problems on real-life problems as time permits.
uWSGI: the full stack application server
Monday, July 18th at 10:15 in E
Alexys Jacob
Come and learn how to use the uWSGI application server stack with us.
We'll start from the basics to some more advanced usages :
- what is uWSGI and why it can help you
- what is the dynamic emperor mode and how it works
- 1: run a simple Flask web application
- 2: run a gevent based Flask web application
- 3: run an external daemon using uWSGI
- 4: create and run a task deferral application
Note : we will provide and open source the Flask web application code we'll start from and iterate from there
Posters
A case study of porting a Fortran77 Monte Carlo simulation code to python&numba
Robert Froeschl
The EDARA code is used at CERN (European Council for Nuclear Research) to assess the environmental impact of airborne releases of radioactivity. Its development has started in the 1990ies and the code is written in FORTRAN 77.
The EDARA code will be significantly upgraded in the next years to meet the future legal requirement of including additional age groups in the impact assessments, to have the capability of choosing among several different atmospheric dispersion models and to be interfaced from other software packages.
Therefore it has been decided to port the EDARA code to python and a prototype has been developed with the following characteristics:
- The numba just-in-time compiler has been used for the computationally demanding Monte Carlo simulation core routines. Closures over just-in-time compiled functions have been used to implement function pointer like features for the atmospheric dispersion model selection.
- The data analysis and reporting features have been implemented using the pandas library.
- implementation.
- An API is provided for scripting and interfacing from other codes.
This prototype demonstrates that the python/numba/pandas implementation leads to a much smaller and cleaner code base that the FORTRAN 77 implementation without incurring a significant performance penalty for the computationally demanding parts. It has substantially increased the flexibility and extensibility of the code and will ensure its long-term maintainability.
Flexible experimenting at large research instruments with NICOS
Georg Brandl
The research reactor FRM II at the Technical University of Munich provides intense neutron beams for use in fundamental and applied research. Scientists from all over the world apply for beam time to study problems from a range of scientific topics, mainly in physics, chemistry and biology. Research is carried out at one of over 20 instruments, large scale apparatus operated by German research institutions.
A neutron scattering instrument is a complex device which consists of dozens of single hardware components distributed over multiple computers. To conduct an experiment efficiently, all components have to be integrated in a single interface that allows the user simple but flexible control. The community of scientists is large and inhomogeneous, so that this software must be able to run routine measurements without a large learning curve. At the same time there are users who run experiments that are highly dynamic, which means that the system has to be adapted to new developments in a short time span.
In this poster I will introduce NICOS ("Network Instrument Control System"), a Python solution for this problem. The focus will be on how Python’s features are leveraged in the implementation and the user interface. In particular, there are some details and tricks that make it possible for relatively inexperienced scientists to directly use a Python shell for controlling experiments with a large set of features to make their beam time as comfortable as possible.
Plone, the premier Python CMS and intranet
Paul Roeland
Plone 5.1 brings more ways to integrate all that is needed for a modern website and intranet:
- rapid theming independent of the backend, so designers can do what they do best
- testable, standard ways of integrating JavaScript widgets and frameworks
- integrate best-of-breed search
- all with a solid, secure, Python backend
- flexibility and TTW rapid prototyping, combined with CI and controlled development techniques
Plone, now in its 15th year, has evolved together with Python. As shown in one of this year's keynotes at PyCon, the relationship is still going strong, and there is much we can learn from one another.
PyMICE - a library for analysis of IntelliCage™ data
Jakub Kowalski
Life sciences are suffering badly from a "research reproducibility crisis". One of possible countermeasures is automation of data acquisition and analysis.
Automated data acquisition systems facilitate standardization of conditions and measurements by minimization of human disturbance. One of such systems is IntelliCage™, dedicated for long-term behavioural experiments on cohorts of mice in social context.
The robustness of data analysis may be improved with automated data analysis workflows (ADAWs): computer programs analysing the data in batch mode. Also, the source code of such program is an unequivocal, formal specification of the performed analysis. The only drawback of such approach is a significant effort and technical knowledge necessary to define an ADAW.
Our goal was to simplify development of ADAWs and to shift the developer's focus from technical details (like data format) to the analysis itself. To meet the goal, we developed the PyMICE library (resource identifier: RRID:nlx_158570). The library provides an user-friendly and intuitive API to access IntelliCage data, encouraging development of ADAWs according to object-oriented and functional programming paradigms.
Acknowledgements
Project sponsored by Symfonia NCN grant: UMO-2013/08/W/NZ4/00691
To the Clouds: Service Orchestration and Cloud Deployment with Juju
Michael Foord
Juju is a devops tool for automated deployments, with full stack
service modelling and orchestration, in the cloud. Fully
controllable with Python through "charms".
Abstract
Do you deploy your Python services to Amazon EC2, or to Openstack,
or even to HP cloud, joyent or Azure? Do you want to - without being
tied into any one of them? What about local full stack deployments
with lxc or kvm containers?
Even if you're convinced you don't need "the cloud" because you
manage your own servers, amazing technologies like Private clouds
and MaaS, for dynamic server management on bare metal, may change
your mind.
Fed up with the cloud hype? Let me rehabilitate the buzzword! (A bit
anyway.)
A fully automated cloud deployment system is essential for rapid
scaling, but it's also invaluable for full stack testing on
continuous integration systems. Even better, your service deployment
and infrastructure can be managed with Python code? (Devops distilled)
Treat your servers as cattle not as pets, for service oriented
repeatable deployments on your choice of back-end. Learn how service
orchestration is a powerful new approach to deployment management,
and do it with Python! If any of this sounds interesting then Juju
maybe for you!
Using Python on the BBC micro:bit in informal learning environments
Corinne Welsh
This year, in an aspirational project led by the BBC, every 11 to 12-year-old child in the UK is being given a small programmable device. The BBC micro:bit has LEDs, input buttons, an accelerometer, a compass, input/output pins, power supply pins, and Bluetooth connectivity. It is supported by four different programming languages, one of which is Python.
Schools are central in delivering the project: the micro:bits are being distributed, through schools, to Year 7 pupils. However, the vision of the micro:bit project is that the devices are given directly to children. They are owned by the children themselves to do with as they wish.
I am involved in a six-month project based in a London borough library. The project's aim is to develop support to use Python, on the micro:bit, in the context of informal learning spaces. These include extra-curricular STEM clubs, libraries, and Saturday coding clubs.
My poster will be a reportage of the project. It will cover the challenges of introducing Python for the micro:bit and the benefits Python brings. I will also consider some wider issues, such as the role of gender, in the roll-out of the micro:bit.
Helpdesks
DOCtors are in!
Monday, July 18th at 10:30 in Help Desk
Paul Roeland
There's a whole community, and a wealth of experience, that aim to bring the science, the art, and the fun of documentation to a higher level. Come learn some best practices on how to keep your docs maintainable, testable, deployable and up to date.
"Give me your tired, your poor,
Your huddled docs yearning to breathe free,
The wretched refuse of your teeming shore.
Send these, the homeless, tempest-tost to me,
I lift my lamp beside the golden door!"
Elasticsearch and the Elastic Stack
Wednesday, July 20th at 10:30 in Help Desk
Honza Král
Elasticsearch and other parts of the Elastic stac (beats, logstash and kibana) are becoming more popular for many different use cases - from pure search all the way to log storage and analysis.
In case you have any questions, problems or suggestions, come talk to me.
Python and mongoDB
Tuesday, July 19th at 10:30 in Help Desk
Alexys Jacob
The Numberly DevOps team members will help and share their experience in using mongoDB on python applications.
Come with your code or design questions and we'll do our best to help you find the best answers and test them live !
The Numberly team has been running mongoDB in production for more than 5 years now and used it on various use cases, from simple web applications to real time analytics serving thousands transactions per second.
YAML is one of the more human friendly data serialisation formats
Friday, July 22nd at 10:30 in Help Desk
Anthon van der Neut
There are several human parsable data serialisation possibilities but there are only a handful that are human friendly. Arbitrarily human friendly means that:
- you can include comments in your format to explain things to other readers
- it means what you think that it means
- no need to quote things that are clear without
- visual nesting through indentation, not through lisp like ( (( (()()))) or
- easy to edit without breaking things (trailing comma's anyone).
YAML supports most of the above, but the "standard" YAML library would
- rearrange mapping (dictionary) entries on dumping making comparison using diff difficult
- drop comments when reading data to YAML, so dumping leads to data loss for humans
- was not updated for YAML 1.2 published in 2009
by upgrading the standard library to deal with these issues in the increasingly often used ruamel.yaml round-trip library, in-dept knowledge was built up both on how to effectively use YAML as well on how to do some unplanned for things in YAML.
Please stop by with any questions you have beginner, or advanced on how to make the use of YAML in you project not only more human-friendly, but also more developer friendly.
(You're also welcome if you don't understand how someone can like to work with JSON)
django CMS
Thursday, July 21st at 10:30 in Help Desk
Stefan Foulis
Chat with the core developers about how to extend django CMS or how to integrate your own apps seamlessly. Lets talk about your plugins, apphooks, toolbar extensions, content-creation wizards, menu extensions or anything else django CMS related.
We can brainstorm a hard-to-solve problem you've encountered. Maybe you have the nagging feeling there ought to be simpler way to solve something you've done in a project. We're also happy to discuss feedback or ideas for something that could be added to django CMS.
Bring your code. Lets chat!
EuroPython Society Sessions
EPS General Assembly
Thursday, July 21st at 14:30 in A2
Fabio Pliger, Marc-Andre Lemburg
This is where we give our reports and the EPS members can vote in a new EPS board.
EuroPython 2017: Help us build the next edition!
Thursday, July 21st at 14:00 in A2
Fabio Pliger, Marc-Andre Lemburg
We need help with organizing and running EuroPython 2017
In this session, we will explain how the EuroPython workgroup model works and where you could help.
Recruiting
Recruiting session
Tuesday, July 19th at 15:45 in A1
Fabio Pliger
The recruiting sponsors will present their companies and their job offers in short talks.
Interactive sessions
Managing technical debt
Monday, July 18th at 14:15 in Barria 1
Mircea Zetea
Technical debt lives among us regardless if we are in the services business or building products.
We discuss about it, we try to fix it or live with it, but can we actually prevent it?
My reason for discussing this openly is because once it is there you do not only deal with the technical debt itself but also with the interest you must pay.
My reason for discussing this openly is because once it is there you do not only deal with the technical debt itself but also with the interest you must pay. Comparing the two, probably the highest cost that we see is with the interest.
As our code base grows and our deadlines get tougher we tend to forget about the cost our project will have to pay for every functionality that we implement in a hurry, for which we “forget” about tests or for which we write in a comment “this needs to be refactored” or “this is a temporary solution. refactor later”.
What qualifies as debt? What qualifies as interest? How do we manage it? At what levels in our projects can we see the debt and the interest? Is it really unavoidable?
PSF Meeting
Wednesday, July 20th at 15:45 in A2
Naomi Ceder
EuroPython Meeting of the Python Software Foundation
Members and non-members are invited to this EuroPython meeting of the PSF! Please join us for some updates from the PSF board.
Planning for the worst
Thursday, July 21st at 15:45 in Barria 1
Alexys Jacob, Guillaume Gelin
This talk is about sharing our experience about how we handled production problems on all levels of our applications.
We'll begin with common problems, errors and failures and dig on to more obscure ones while sharing concrete tips, good practices and code to address them !
This talk will make you feel the warmth of not being alone facing a problem :)
Programming interviews and careers
Tuesday, July 19th at 15:45 in Barria 2
Iwan Gulenko
First we will talk about coding interviews: How to prepare and
what to expect. Then, we will cover software engineering resumes, typical coding
questions and tasks that companies usually give to candidates.
We end with a discussion on long-term career paths
of software engineers. The hypothesis is that true engineering careers
exist at maybe Google but normal firms unfortunately only allow growth by
forcing engineers into management.
The Router Game
Monday, July 18th at 16:00 in Barria 2
Roberto Polli
This interactive game teaches the basic of ip and ethernet protocol using just paper and pens, and become very popular with our interns and LUG meetings.
Participants are divided in teams, simulating simple network infrastructures (eg. computers connected by an hub and a switch).
Every player has a role: a PC or mobile phone, an HUB, a Switch, a Router, and must communicate with the others following the associate specification (eg. an hub should broadcast message to every neighbour, a switch should populate the mac address table, ...)
The team which is faster in exchanging messages wins.
TALKS
Reserved for 2nd Call for Proposals
Monday, July 18th at 12:00 in A1
To be announced
June 4th we will open a second Call for Proposals, limited to hot topics and most recent developments in software and technology. Read our blog post here: http://blog.europython.eu/post/143625007372/europython-2016-extra-hot-topics-call-for
Reserved for 2nd Call for Proposals
Friday, July 22nd at 10:30 in A2
To be announced
June 4th we will open a second Call for Proposals, limited to hot topics and most recent developments in software and technology. Read our blog post here: http://blog.europython.eu/post/143625007372/europython-2016-extra-hot-topics-call-for
Sponsored Talk
To be announced
Sponsored Talk
Sponsored Talk
Thursday, July 21st at 16:15 in A2
To be announced
Sponsored Talk
Sponsored talk
Friday, July 22nd at 12:00 in A2
To be announced
-
TALKS
The LightningTalkShow
Monday, July 18th at 17:15 in A1
Harald Armin Massa
At the LightningTalkShow, there is script, there are no trained actors. Just the regular attendants, delivering interesting, diverse or crazy presentation about all things Python and computer.
To encourage the delivery, the LightningTalkMan shall conduct this ceromny, finding words when Laptops do not find the projector; allways honouring the motto of the original Python: the show must go on.
Closing session
Closing Session
Friday, July 22nd at 17:30 in A1 [PyData Track]
To be announced
Closing Session
Content source: EuroPython/ep-tools
Similar notebooks: