Programming a Perceptron in Python

At HSR, I’m currently enrolled in a course about neural networks and machine learning. One of the simplest forms of a neural network model is the perceptron. Background Information A perceptron classifier is a simple model of a neuron. It has different inputs ($x_1$…$x_n$) with different weights ($w_1$…$w_n$). $$s = sum_{i=0}^n w_i cdot x_i$$ The […]

Read More

The Story of Pillow

On March 4, 2013 I got an email from the Python Software Foundation On March 4, 2013 I got an email from the Python Software Foundation (PSF): This email notification is being sent to you to inform you of the PSF Board’s decision to fund the facilitation of a Python 3 compatible release of the […]

Read More

d3.js and X-Requested-With

Most JavaScript frameworks set the X-Requested-With HTTP Header to XMLHttpRequest when sending non-cross-domain XHR requests. Many web frameworks like Django or Flask use this to detect AJAX requests. Because of issues with X-Requested-With and cross-domain XHR requests, d3.js does not set that header by default. Therefore Django’s request.is_ajax() and Flask’s request.is_xhr() break. In order to […]

Read More

Pillow Python 3

PIL is on its way to Python 3 via Pillow. Support from Brian Crowell and others has been merged into master here: https://github.com/python-imaging/Pillow/pull/35 And work continues toward a pre PyCon 2013 release! Please help if you can: Ubuntu users, read through https://github.com/python-imaging/Pillow/issues/18 and provide assistance with testing this Ubuntu package: https://launchpad.net/~pythoneers/+archive/ppa. Git experts, please comment […]

Read More

Pillow 1-7-8

Pillow is the friendly PIL fork. Initially just a packaging fork, now considering image code bug fixes and Python 3 support. To be friendly, we attempt to track changes against upstream tickets in PIL. Pillow 1.7.8 is out! Read about it here: http://pypi.python.org/pypi/Pillow/1.7.8 Features It’s PIL (Python Imaging Library) It installs on all modern systems […]

Read More

Recompile Vim with Python/Ruby Support on Arch Linux

Update 2014-08-21: The vim packages in Arch Linux have been reorganized: https://www.archlinux.org/news/reorganization-of-vim-packages/. The standard vim package should now contain Python support, so the recompile is not necessary anymore. For my vim configuration, I need a version of Vim that was built with Python and Ruby support. Unfortunately, the default version of Vim that is installed […]

Read More

Looking For Projects

With pythonpackages.com winding down, I am now actively seeking projects for Q4 2012 and beyond. I am good at: Deploying Plone sites: http://blog.aclark.net/2012/10/03/plone-4-3-alpha-1-in-production/ Maintaining and releasing Python packages: http://pypi.python.org/pypi?%3Aaction=search&term=aclark&submit=search Cat herding volunteers: http://lists.plone.org/pipermail/plone-com/Week-of-Mon-20120903/000039.html Writing documentation: http://docs.pythonpackages.com/en/latest/index.html Writing narrative text: http://www.packtpub.com/plone-33-site-administration/book Writing Python code: https://github.com/aclark4life Also, I’ve put together a list of projects I am involved […]

Read More

PythonPackages: One Year Later

We are rolling up on the one year anniversary of pythonpackages.com (in October). This is an exciting milestone (for me at least) because I’ve had a tremendous amount of fun building the site, not to mention how much I learned about GitHub, PyPI, Pyramid, Stripe, Redis, Bootstrap, and more. We are hovering around 200 signups […]

Read More

Virtualenv Quickstart Guide

I was searching for a nice virtualenv quickstart guide today, but couldn’t find one that I liked. Either they were outdated and still relied on easy_install, or they were too complicated. So here’s my own. Why use virtualenv? Virtualenv (http://www.virtualenv.org/) basically provides you with a full Python environment (and/or versions) inside a single folder. This […]

Read More