Designing interfaces so that other code can interact with ours (whether our code is a library, framework, application, website...) is a very common and clearly crucial activity, but it's fraught with dangers -- there's a lot stuff we all keep doing wrong time after time. This talk shows some common categories of API design errors encountered in the wild, with tips on how to avoid them when you design your next API.
Goals: to show you how to focus resources and attention to help avoid mistakes in API design. Prereqs: experience designing and developing software, esp. software which needs to interact w/other existing software.
In a world of many programming languages, the popularity of Python continues to grow without bound. We examine what makes it special and how it influences the way we program:
by Jon Åslund
This is a story about how Spotify started, how we evolved, where we are today and how Python has always been a big part of our success. Where do we use it? Where do we not use it? Learn about the Unix way and the Debian way of maintaining a healthy love for Python, while two-timing with other languages such as Java and C++.
by Péter Szabó
Stackless Python and the greenlet package for CPython are two different implementations of coroutine support for Python. (Coroutines are fundamental building blocks of I/O frameworks like gevent, Eventlet, Concurrence and Syncless to conveniently handle thousands of socket connections at a time without creating threads.) Stackless and greenlet implement a different interface. However, each is powerful enough so that it can be used to emulate the other one. In this talk we explore the differences and discuss design decisions and testing strategies of the emulations we have implemented.
by Yann Le Du
In Electron Paramagnetic Resonance Imaging, we are faced with a deconvolution problem that has a strong impact on the image actually reconstructed. Faced with the need of mapping the distribution of organic matter in Terrestrial and Martian rock samples for applications in exobiology, we needed to see how to extract a maximum amount of information from our data : our approach uses reservoir computing artificial neural networks coupled to a particle swarm algorithm that evolves the reservoirs’ weights.
The code runs on the Hybrid Processing Units for Science (HPU4Science) cluster located at the Laboratoire de Chimie de la Matière Condensée de Paris (LCMCP). The cluster is composed of a central data storage machine and a heterogeneous ensemble of 6 decentralized nodes. Each node is equipped with a Core2 Quad or i7 CPU and 3-7 NVIDIA Graphical Processing Units (GPUs) including the GF110 series. Each of the 28 GPUs independently explores a different parameter space sphere of the same problem. Our application shows a sustained real performance of 15.6 TFLOPS. The HPU4Science cluster cost $36,090 resulting in a 432.3 MFLOPS/$ cost performance.
That talk is meant to demonstrate on a practical case how consumer grade computer hardware coupled to a very popular computer language can be used to tackle a difficult yet very elementary scientific problem : how do you go from formulating the problem, to choosing the right hardware and software, and all the way to programming the algorithms using the appropriate development tools and methodologies (notably Literate Programming). On the math side, the talk requires a basic understanding of matrix algebra and of the discretization process involved when computing integrals.
Gevent (http://gevent.org) is a coroutine-based library that enables you to write highly-concurrent network and web applications. Learn in detail what Gevent is, what it does and how it does it.
I will introduce a coroutine-based approach to network programming, explain it benefits and pitfalls.We will walk through the Gevent API, including the most recent additions, and understand how it is implemented. I will make a quick overview of the most interesting 3rd party add-on and applications after that.
Django is an excellent web development platform with an extensive developers community. It may be the most popular Python web framework nowadays. However, the exisiting django based CMS products are not as feature complete as other comparable solutions (Drupal, Plone, Alfresco, ModX, etc.).
The Merengue project tries to fill this gap. It is financed by the University of Málaga (Spain) and takes advantage of existing code and knowledge from other projects (Plone, Drupal, Pinax, django-cms, feincms, LFC, etc.)
What was my motivation for working with Python after two years of PHP? There is so much you can do. Functions are objects you can pass around, you can decompile functions to see how they work internally, you can alias a bound method to a global function and it will just work. You can change import semantics, override the method resolution order, you can write metaclasses, you can hook into the CPython interpreter API and much more.
Five years later I came to the conclusion that this is really not what Python is about and that a lot of what I did was interesting but not necessarily a good idea. This talk is a 45 minute recompilation of things I really shouldn't have done in the first place. Expect a bunch of neat and interesting hacks that showcase the possibilities of the language.
At ep.io we built a Python hosting platform from the ground up, designed to run large numbers of web applications on a small number of physical machines both securely and in a reasonably scalable way. This talk will show you how we built our infrastructure - using Redis, eventlet, PostgreSQL and more - and what lessons we learnt from our first few thousand deploys.
See how we split services into multiple processes and greenthreads; the pains of building a cooperatively-multitasking PTY module; how Redis isn't the answer to everything, but is still very useful; how to persuade third-party software to work securely in a shared environment; and how important it is to have good logging, especially when you have more than five servers.
by Wesley Chun
All of us are familiar with using open source tools to develop software applications with, but instead of writing code, it is also possible to create the manuscript of a book in very much the same way. These days, authors have many choices in terms of the tools which are available to aid them in writing a book. Gone are the times when the only option is using a proprietary word processor, so why not try it using open source tools? It's especially attractive to those who develop software using open source tools as well those who are writing books about open source tools. Both code and the written word are created in plain text files. These files are easily archived using some version control system. They can be shared easily via e-mail and can also be backed up in the same manner. In the end, the final product is shipped to the customer: in the case of software, it's distribution via CD or DVD, or perhaps a release for installation on a server, and for a book, it's delivering a manuscript to the publisher, perhaps in a format such as HTML or PDF®.
Upon some reflection, writing a book is, in many ways, similar to writing an application: you create text or code which is saved to a file (or files--typically one but could be more) file in some format, proprietary or otherwise. Additions, changes, or deletions are made to the file(s), which is then updated when the file is (re)saved. Backups need to be made, some versioning may be required to keep track of multiple files during the course of development, and finally, the resulting file(s) have to be delivered, as described above. Because of all the similarities described, we assert that it is possible to use a development environment utilizing Python and other open source tools to not only write application with, but also be able to create the entire manuscript for a book as well! While this entire concept should not really be mind-blowing, it does represent a trend seemingly growing in popularity in the open source world.
In particular, we highlight the following requirements that are necessary when creating a manuscript, especially with co-authors:
In this talk, we highlight one particular case study, the development of Addison Wesley's 2009 publication, "Python Web Development with Django", as well as provide some insight into other projects created using similar tools. Open source software has radically affected how applications are built today, and this phenomenon has the ability to affect the book publishing world in the same way.
by Claudio Desideri
In this talk I'm going to explain the main features and possibility that Panda3D gives us when we want to create a game from scratch. Then, I'll explain how the engine is structured and how it works conceptually going also through code examples and some practical operations.
It's meant for beginners who have also never worked with realtime graphics and the only prerequisite is a bit of python knoweledge including how to write a simple program and how to run it. The goal is to create a simple realtime application that take care of user input and reacts depending on it.
PostgreSQL (or “Postgres”) is an immensely powerful, incredibly extensible relational database, released under a permissive open source licence that is similar to that of CPython. PL/Python is one of PostgreSQL's standard server-side procedural languages, through which Python stored functions can be defined that can be called directly from SQL, quite seamlessly.
Play to the strengths of Postgres, by writing application business logic within the database in either Python 2 or Python 3. Enforce advanced business rules using Python, including constraints on both tables and database level datatypes (“domains”). By pushing the logic tier into the database, you can potentially greatly increasing your application's scalability by minimising the number of database roundtrips.
Includes case studies and topical coverage of PL/Python related enhancements in upcoming 9.1 release, and recent 9.0 release. The talk only assumes a very basic understanding of databases.
by Antonio Cuni and Armin Rigo
A teaser for the full tutorial on Tuesday: http://lanyrd.com/2011/europytho...
A teaser for the full tutorial on Tuesday: http://lanyrd.com/2011/europytho...
The PSF recently adopted a diversity statement. While some argue that we should do this just because it's "the right thing to do", others question why we, as a technical community, should even worry about diversity. This talk addresses the diversity question, not in moralistic or ethical terms, but in pragmatic ones. Studies on creativity and productivity demonstrate the potential benefits of diversity for the Python community. Making Python the best language it can be is not merely helped by increasing diversity, but may be dependent on diversity.
20th–26th June 2011