Get Your Weekly Dose of Python
Welcome to issue 72 of Python Weekly. I would like to thank our sponsor this week, Google, for their support. Be sure to check out and take advantage of their great offering. 


From Our Sponsor

Get started for free building Python applications on Google App Engine
We support Python 2.5 and 2.7 allowing you to take take advantage of the many libraries, tools, and frameworks that professional developers use to build world-class web applications.


Articles, Tutorials and Talks

Python provides great built-in types like dict, list, tuple and set; there are also array, collections, heapq modules in the standard library; this article is an overview of external lesser known packages with fast C/C++ based data structures usable from Python.
 
Django, Bottle, Flask, .. you name it, are python web frameworks that require a SECRET_KEY in their configurable settings.  When attacking a python web framework, the attacker, knowing your SECRET_KEY from the source code can easily escalate the LFR attack to the RCE, this is at least true in the set of web frameworks that I had examined. The common problem is that they use pickle for serializing and unserializing the signed cookie.
 
Association analysis is the task of finding interesting relationships in large data sets. There hidden relationships are then expressed as a collection of association rules and frequent item sets.  This post presents one of the most traditional tools in data mining to find interesting relationships in a large set of data.  
 
How do you register for notifications when the current thread has died? In this post, the author describes a solution that he came up to answer this question.
 
This post is about some features of the Python language which can be considered advanced -- in the sense that not every language has them, and also in the sense that they are more useful in more complicated programs or libraries, but not in the sense of being particularly specialized, or particularly complicated.
 
This talk provides an introduction to pyOpenCL, python interface to the Open Computing Language. OpenCL is a framework to execute parallel programs across heterogeneous platforms consisting of of both CPUs and GPUs. OpenCL programs consists of kernels which are distributed and executed in parallel over processing units.
 
For all the many strengths of Python, people often express frustration in finding, building, and installing third party packages. This pain can be especially acute with scientific and analytical libraries, which are often a mix of Python with compiled, platform-dependent C, C++, or Fortran code. Conda, a package and environment management system, is trying to solve these problems. The primary use case of conda is for managing packages and their dependencies in a platform independent fashion.
 
This post is a collection of some useful shortcuts and tools in Python.
 
Nose's tagline is "nose extends unittest to make testing easier". It's is a fairly well known python unit test framework, and can run doctests, unittests, and "no boilerplate" tests. This post has several examples, and covers fixtures, test discovery, asserts, running options, and running unittests and doctests.
 
Whoever said scraping web pages can't be fun never tried it using Python decorators and generators! In this post, we'll use this mini-framework to fetch all the upcoming comic book releases from one of the online comic book stores.
 
This is the author's latest experiment with servos, lasers, and Python using a pyMCU to take an image (gif, jpg, or otherwise) and convert it into a light graffiti automatically.  
 
 
 
 
Interesting Projects, Tools and Libraries

A python library for statically defining and dynamically loading configuration. Configuration keys are defined statically, and configuration can be reloaded at any time. This allows you to discover missing configuration values immediately, and reload configuration changes without needing a reference to the configuration in every object.
 
A radio with django/python backend with songs from Soundcloud.
 
Pantera is a tool to test the resilience of cloud applications. It's based on EC2 instances, and process management. It's able to destroy, stop and reboot instances, and also able to kill process locally and remotely.
 
A traffic monitoring prototype powered by a raspberry-pi that leverages on techniques such as the detection of signals as Bluetooth. Namely, signals spread by vehicles passing on the roadway are revealed by the battery powered boxes installed on the roadside. The server side the traces are gathered and analyzed by a python back-end developed with the web2py web framework. 
 
This is a pure-Python implementation of a Python bytecode execution virtual machine.
 
Dowser is a CherryPy application that displays sparklines of Python object counts, and allows you to trace their referents. This helps you track memory usage and leaks in any Python program, but especially CherryPy sites.
 
The Microsoft translator provides an API that you can use for automated translation. It currently supports about 39 languages. auto-translate is a python auto translation script that uses Microsoft Translator API.
 
A python expression to MongoDB query translator. PQL uses the builtin python ast module for parsing and analysis of python expressions. It is resilient to code injections as it doesn't evaluate the code.

A REST Web API framework that's as dangerous as you want it to be. It is powered by MongoDB.

An OAuth 2.0 module for web2py framework.
 
Expose the Django shell as an SSH server.
 

Books

This free online book is a fantastic resource to learn to program, and do it by learning to program arcade games. It is packed with lot of great content.
 
In this book, you'll learn the "Pythonic" way to accomplish common tasks. Each idiom comes with a detailed description, example code showing the "wrong" way to do it, and code for the idiomatic, "Pythonic" alternative.
 

Python Jobs of the Week

We are looking for a Senior Python Developer that understands the future of cloud and can create products that technologists can't wait to get their hands on. You will be developing everything from the back-end API to front-end UI implementations. You will be working with like-minded engineers who are always learning and exploring new and better things. You will have a personal stake and pride in what you build, sharing your ideas to build a great team and company.
 
In this role, you will be the voice of AWS to System Operators / Administrators. You will design and implement tools and features to enable System Operators / Adminstrators to harness the power of AWS cloud computing. You will build sample applications that demonstrate best practices for using Amazon Web Services. You will have strong development skills and be interested in releasing open source software. Experience contributing to open source Python frameworks a plus.
 
You would join the founding team to build out the product and architecture, also growing your own team of amazing coders. This position is an exciting opportunity if you have a strong interest in developing and scaling a complex content management site. This is an innovative startup environment where you will make a fundamental impact on the success of the company.
 
We are hungry for creative engineers who see the production of the most evocative buying and selling experience as their destiny. Your endeavours will cover everything from the API powering the mobile platform, to illuminating visualizations for operations, deep science for affording the unseen and unknown to our users, to magical metrics that go to improving the platform and experience.
 

Upcoming Events and Webinars

DC Python Meetup February 2013 - Washington, DC
There will be following talks
  • Paul Everitt from Agendaless.com will present on the Pyramid Web Application Framework.
  • Valerie Coffman from feastie.com present on technical problems, business case(s), high level implementation details and challenges faced using Python in her startup business.
Come work on Python projects, get programming help, help others, and hang out. Bring your own project or work on one of the suggested projects
 
The first Pyladies Toronto meetup will be held in a workshop style format. We'll become acquainted with the Python programming language, and with one another!
 


Get Your Weekly Dose of Python