Get Lanyrd on your mobile (iPhone, Android and more) - check it out here

Sessions at PyCon US 2012 matching your filters

Your current filters are…

Clear

Friday 9th March 2012

  • Extracting musical information from sound

    by Adrian Holovaty

    Music Information Retrieval technology has gotten good enough that you extract musical metadata from your sound files with some degree of accuracy. Find out how to use Python (along with third-party APIs) to determine everything from the key/tempo of a song to the pitch/timbre of individual notes. Then we'll do some amusing analysis of popular tunes.

    Music Information Retrieval technology has gotten good enough that you extract musical metadata from your sound files with some degree of accuracy. Find out how to use Python (along with third-party APIs) to determine everything from the key/tempo of a song to the pitch/timbre of individual notes. Then we'll do some amusing analysis of popular tunes.

    Getting basic data about sounds.
    Visualizing waveforms.
    Parsing musical information at the level of song.
    Detecting individual notes ("segments").
    What fun can we have?

    At 11:30am to 12:10pm, Friday 9th March

    In E2, Santa Clara Convention Center

    Coverage video

  • Stepping Through CPython

    by Larry Hastings

    Ever wondered how CPython actually works internally? This talk will show you. We start with a simple Python program, then slowly step through CPython, showing in exhaustive detail what happens when it runs that program. Along the way we'll examine the design and implementation of various major CPython subsystems and see how they fit together. The audience should be conversant in C and Python.

    The goal of the talk is to sufficiently familiarize the audience with CPython's internal structure such that a programmer versed in C and Python but having never dealt with an interpreter would be able to comfortably dive in and start hacking on CPython.

    The program examined will be simple but deliberately designed to exercise most of CPython's runtime behavior. This will include loading modules implemented in C and in Python, loading bytecode cached on disk, and a cross-section of bytecodes. (For example, I only need to examine one of the BINARY_* math operands, I don't need to walk through every single one.)

    Areas I expect to examine:

    • built-in modules, including ones that are automatically loaded before your program starts bytecode, including
    • the various implementations of the inner loop (switch statement, labels-as-values)
    • the peephole optimizer
    • on-disk format
    • marshal
    • the magic version number
    • mention lnotab but probably skip the gory details the stack machine
    • unwinding the stack after an exception (and producing tracebacks)
    • contrast CPython's approach with Stackless All the possible fields of PyObject, an overview of fields in PyType built-in types
    • the implementations of a few key internal types
    • list, dict, tuple, str, byte, int, bool, None
    • though not to the level of detail that Hettinger or Rhodes did in past talks
    • interned values the GIL and reference counting
    • weakrefs
    • garbage collection
    • Py_TRASHCAN CPython's small-block and arena allocators
    • The parser, though I don't want to spend a lot of time on it (runtime is where the fun is ;)
    • Internal utility functions like PyArg_Parse

    I'll be giving the talk based on CPython 3.2.

    At 12:10pm to 12:55pm, Friday 9th March

    In E2, Santa Clara Convention Center

    Coverage video

  • Code Generation in Python: Dismantling Jinja

    by Armin Ronacher

    For many DSLs such as templating languages it's important to use code generation to achieve acceptable performance in Python. The current version of Jinja went through many different iterations to end up where it is currently. This talk walks through the design of Jinja2's compiler infrastructure and why it works the way it works and how one can use newer Python features for better results.

    Why Code Generation?
    It seems like the general consensus for code generation in many dynamic language communities is: eval is evil, do not use it. However if done properly code generation solves a lot of problems easily, securely and with much better performance than an interpreter written on top of an interpreted language like Python.

    Code generation is what powers most template languages in Python, what powers object relational mappers and more. It is also an excellent tool to simplify debugging.

    Why Codegen is no Silver Bullet
    Just because you generate code does not mean you're faster than an interpreter written in Python. This part of the talk focuses on why compiling Django templates to Python bytecode does not automatically make it fast.

    Design of Jinja2
    Jinja2 underwent multiple design iterations, most of which were made to either improve performance or debug-ability. The internals however are largely undocumented and confusing unless you're familiar with the code. In it however are a few gems hidden and interesting tricks to make code generation work in the best possible way.

    Python's Support for Code Generation
    Over the years Python's support for code generation was steadily improved with different ways to access the abstract syntax tree and to compiling it back to bytecode. This section highlights some alternative ways to do code generation that are not yet fully implemented in Jinja2 but are otherwise widely used.

    At 2:00pm to 2:40pm, Friday 9th March

    In E2, Santa Clara Convention Center

  • Apache Cassandra and Python

    by Jeremiah Jordan

    Using Apache Cassandra from Python is easy to do. This talk will cover setting up and using a local development instance of Cassandra from Python. It will cover using the low level thrift interface, as well as using the higher level pycassa library.

    • Very brief intro to Apache Cassandra
    • What is Apache Cassandra and where do I get it?
    • Using the Cassandra CLI to setup a keyspace (table) to hold our data
    • Installing the Cassandra thrift API module
    • Using Cassandra from the thrift API
    • Connecting
    • Writing
    • Reading
    • Batch operations
    • Installing the pycassa module
    • Using Cassandra from the pycassa module
    • Connecting
    • Reading
    • Writing
    • Batch operations
    • Indexing in Cassandra
    • Automatic vs Rolling your own
    • Using Composite Columns
    • Setting them up from the CLI
    • How to using them from pycassa
    • Lessons learned

    At 2:40pm to 3:20pm, Friday 9th March

    In E2, Santa Clara Convention Center

  • Putting Python in PostgreSQL

    by Frank Wiles

    PostgreSQL is pretty powerful all on it's own, but did you know you can use Python as a stored procedure language? Not only does using a familiar language make development easier, but you get the power of the standard library and PyPi to boot. Come learn the ins and outs of putting Python in your DB.

    Pushing logic in your database can be a blessing or a curse. While these techniques aren't appropriate for most users in most situations, it's good to know what kind of power you have at your disposal with PL/Python if the need ever arises.

    Learn about how to: - Use triggers to off load data processing tasks - Fire off email and log alerts based on what is happening in your tables - Create more granular and detailed constraints such as verifying email address or credit card checksums at the database level - Replace batch jobs with in database triggers - Learn when and when NOT to use these techniques - Debugging techniques - Security concerns

    At 3:20pm to 4:05pm, Friday 9th March

    In E2, Santa Clara Convention Center

  • pandas: Powerful data analysis tools for Python

    by Wes McKinney

    pandas is a Python library providing fast, expressive data structures for working with structured or relational data sets. In addition to being used for general purpose data manipulation and data analysis, it has also been designed to enable Python to become a competitive statistical computing platform. In this talk, I will discuss the library's features and show a variety of topical examples.

    At 5:20pm to 6:00pm, Friday 9th March

    In E2, Santa Clara Convention Center

    Coverage video

Saturday 10th March 2012

  • The Email Package: Past, Present, and Future

    by R. David Murray

    The email package in the Python Standard library has had a somewhat rocky transition into the Python3 era, and still doesn't handle non-ASCII easily. That is about to change. This talk will compare how things worked in Python2 (the past), how things work now (in Python3.2), and how things will work much better in the future (hopefully Python3.3).

    The email package in Python2 was given the internal version number '4'. The email package in Python3 bumped that to '5'. We're now working on version '6', hoping that it will be in shippable state for the Python 3.3 release.

    An email message, to the user, consists of a few headers (from, to, subject, date), some text (possibly rich-formatted html), and possibly some attachments. An email message sent over the Internet is a sequence of bytes formatted according to a very complex set of rules designed to make accurate interchange possible and backward compatibility with older software likely.

    The email package tries to bridge the gap between the ideal user representation and the network format.
    In the past, it has pretty much settled for providing basic tools that an application can use to do the translation itself. Using those tools to do anything non-trivial (such as using non-ASCII characters!) required understanding far more about the relevant email RFCs than any application developer should have to deal with. Now that Python3 makes working with unicode a fundamental, easy to use part of the language, it makes sense to have the email package provide an easy to use way of manipulating non-ASCII text in email messages. This talk will compare the old way of doing things with the new way. In doing so it will provide an introduction to the new capabilities of the email package, as well as providing a brief tutorial on how these facilities can be used to create, manipulate, receive, and transmit complex email messages.

    At 4:15pm to 4:55pm, Saturday 10th March

    In E2, Santa Clara Convention Center

    Coverage video

  • Mailman 3

    by Barry Warsaw

    Mailman 3 has been in development for several years. This is an evolution of the ever popular mailing list management system that runs thousands of mailing lists around the world. This talk describes how the code has been modernized and how the architectural deficiencies of Mailman 2 have been addressed using REST and other technologies. This is a spinoff from the AOSA chapter on Mailman 3.

    GNU Mailman has been around since the early 1990's. The current major version 2.1 is used at thousands of sites around the world, to host countless number of mailing lists, both public and private. Newsletter/announce style lists as well as discussion lists, and everything in between are hosted on Mailman systems. If you participate in open source, you almost certainly use Mailman whether you know it or not. You might even occasionally curse some of Mailman's mis-features such as password reminders, or multiple domain hosting limitations. Or you might have struggled with integrating Mailman into your own larger web site design.

    Mailman 3 is an initiative to address the biggest of the old architectural faults by bringing the code base into modern Python best practices, integrating a SQL database backend, and providing an administrative REST interface to the system for controlling it and making it easier to integrate into third party systems. This talk will outline some of these changes, always with an emphasis on the larger applicability of the solutions employed, and their lessons for the general Python programming public.

    At 4:55pm to 5:30pm, Saturday 10th March

    In E2, Santa Clara Convention Center

    Coverage video

Sunday 11th March 2012

  • Writing GIMP Plug-ins in Python

    by Akkana Peck

    Learn how to write Python plug-ins for GIMP, the GNU Image Manipulation Program. With PyGIMP, you can automate simple image processing tasks in just a few lines of PyGIMP, develop elaborate plug-ins that do low-level pixel manipulation, or anything in between.

    Much of the power of GIMP, the GNU Image Manipulation program, comes from its plug-in architecture. Most of the functions you use in GIMP, including everything in the Filters menu, are plug-ins.

    In this session, you'll learn how to write GIMP plug-ins in Python using the PyGIMP package. Python is rapidly becoming the language of choice for GIMP plug-ins because of its flexibility and clean API. You'll see how Python's access to raw pixel data in an image gives it a huge advantage over GIMP's other scripting language, Script-fu, and how you can use Python-GTK and Python's wealth of other libraries to create user interfaces far beyond GIMP's usual plug-in dialogs.

    Basic Python knowledge is assumed, and familiarity with GIMP at a user level is helpful, but you don't need advanced knowledge of either one to write useful GIMP plug-ins.

    At 12:00pm to 12:30pm, Sunday 11th March

    In E2, Santa Clara Convention Center

    Coverage video

  • Diversity in practice: How the Boston Python Meetup grew to 1000 people and over 15% women

    by Asheesh Laroia and Jessica McKellar

    How do you bring more women into programming communities with long-term, measurable results? In this talk we'll analyze our successful effort, the Boston Python Workshop, which brought over 200 women into Boston's Python community this year. We'll talk about lessons learned running the workshop, the dramatic effect it has had on the local user group, and how to run a workshop in your city.

    The Boston Python Workshop is a project-driven introduction to Python for women and their friends. It has run 6 times with the Boston Python Meetup in the last 12 months, bringing over 200 women into the local Python community. By being fully integrated into the main user group, the workshop has helped the Meetup grow to over 2**10 members and consistently draw over 15% women at its events. We'll talk about lessons learned running the workshop, the dramatic effect it has had on the Boston Python Meetup, and what it takes to run an outreach event in your city.

    At 2:10pm to 2:55pm, Sunday 11th March

    In E2, Santa Clara Convention Center