11 Feb 2016
Foreign visitors: to download the Novation Remote SL template for the Roland JX-3P with the Organix MIDI Upgrade, see the link at the bottom of this post. Zu meinem letzten Geburtstag habe ich mir selbst einen Roland JX-3P geschenkt, inklusive einem DT200-Programmer (ein PG-200 Klon). Der JX-3P ist ein 6-stimmiger analoger Polysynth von 1983 und […]
11 Feb 2016 8:42pm GMT
13 Jan 2016
PythonCamp 2016 Kostenloser Wissensaustausch rund um Python (The following is an announcement for a Python "Un-Conference" in Cologne, Germany and therefor directed at a German-speaking audience.) Liebe Python-Fans, es ist wieder soweit: Am Freitag, den 15. Januar öffnen wir die Online-Anmeldung für Teilnehmer des PythonCamps 2016! Die nunmehr siebte Ausgabe des PythonCamps wird erneut durch […]
13 Jan 2016 3:00pm GMT
02 Nov 2015
I'll vote for Mary Dunbar tomorrow in the Cleveland Heights election.
- She actually replies to my emails! And it ain't just me. You'll see she engages with people often, online and in person. She's the only candidate that showed up at Heights chicken coop tour, for example, and she wasn't even in support of the legislation.
- She's passionate about improving our city's walkability and bike infrastructure. This is one of the last advantages Cleveland Heights has. We need to guard this with our lives. You may not think that bicycling and pedestrian access is that big of a deal, but you are wrong times infinity. Getting people out of their cars and walking around instead has myriad positive effects.
- She doesn't promise anything grandiose. It's so tempting to make grand sweeping statements and wild accusations or big promises or irresponsible rhetoric. You don't see that coming from her.
- Last point - this town skews too far into the progressive Democrat direction. We need an intelligent critique to prevent groupthink.
02 Nov 2015 5:14pm GMT
06 Aug 2015
Lots of problems look a little like this:
The Y-axis measures success at whatever problem you're trying to solve.
You start at the farthest left point on the curve and you can move left or right a little bit every time you work on the problem.
After you make it to the top of the first hill, the only way to make it to the top of the second hill is by going down first.
In jujitsu, if I'm lucky enough to get to mount, my instinct is to camp out there. Maybe I can submit the other guy by sweating on him. I'm in a relatively safe position now, so I don't want to take risks. In other words, I'm at the local optimum.
If I go for a submission like an arm bar, given my current skill level, my opponent will probably escape the mount, and I'll be in a worse position afterward.
So in a self-defense situation, it might be smart to camp. The failure penalty is high!
But in class, because the cost of failure is so low (really, I just don't get to feel like a badass when I tap out) I am wasting an opportunity to learn (and move to the right along the curve)!
06 Aug 2015 7:43pm GMT
22 Jul 2014
Here's a checklist for participants of my training session Interactive experiments in sound synthesis with Nsound, numpy and matplotlib at EuroPython 2014 in Berlin. Have/bring a laptop with Linux (preferred), Windows, or OS X and good headphones. An external audio interface may help with audio performance but is not essential. Download and install my virtual […]
22 Jul 2014 2:01pm GMT
These instructions detail how to create a working environment for participants of my training session Interactive experiments in sound synthesis with Nsound, numpy and matplotlib at EuroPython 2014 in Berlin who do not want to or cannot use the virtual machine appliance I created for the course. These instructions are geared to Linux users, though […]
22 Jul 2014 2:00pm GMT
19 Jul 2014
I have created a virtual machine for virtualbox for the participants of my training session Interactive experiments in sound synthesis with Nsound, numpy and matplotlib at EuroPython 2014 in Berlin. It provides a ready to run Manjaro Linux System with an XFCE desktop and all the software necessary to follow the course. Update (2014-07-22): if you […]
19 Jul 2014 5:49pm GMT
20 Apr 2014
Some frameworks (e.g. Ruby on Rails) give you support for these alternatives out-of-the-box, but in the land of less opinionated software things can require a bit more work. Since I am personally a fan of the Pyramid web framework, I've used the pyramid_webassets and pyramid_fanstatic packages in the past to provide this support. However, these packages are so powerful and comprehensive that they can also tend to be somewhat involved in regards to configuration, so I recently decided to roll my own Pyramid add-on: pyramid_assetmutator
Although definitely not as "feature-full" as the packages I have mentioned earlier, as of this writing it provides the following:
- Support for piping (a.k.a "mutating") assets through pretty much any command you like (its core functionality is quite rudimentary).
- The ability to specify whether to have your assets "mutated" during each request, or on each "application boot" (typically best for prod setups).
- A unified Python 2/3 codebase.
20 Apr 2014 1:07am GMT
03 Apr 2014
Here's a nifty little Lua script for the Geanylua plug-in for the Geany text editor to select a Python code block in Geany with Lua. When the script is activated, it will select the block corresponding to the current code folding level of the line the cursor is on in the active document. E.g. if you place the cursor in the body of a Python function on a line that is on the same indentation level as the first line of the body of the function, it will select the whole function. Also, if the cursor is on the opening line of a block, e.g. a line starting with class, def, if, etc., the script will select the block started by this line.
03 Apr 2014 11:09pm GMT
10 Mar 2014
For two years now, I've been letting my hens free range around in a fenced-in section in my back yard during the day. They love it.
Went out to check for eggs today after work and found one of my girls had been killed in the coop.
Head bitten off. No other signs of predation. Internet forums say this was likely a possum or a raccoon.
Going to set up a live trap tonight. And some wire snares.
I raised these girls since they were a day old. Can't really remember the last time I was this angry and sad.
10 Mar 2014 11:01pm GMT
18 Feb 2014
Welcome, my Nephew Here is a little song I wrote for my nephew, who was born two weeks ago, to welcome him into this world and hopefully give him some comfort while he rests from the tiring all-day business of processing his mother's milk. It is thus called Benjamins Schlaflied (Benjamin's Lullaby) and I play […]
18 Feb 2014 7:30pm GMT
11 Feb 2014
Some months ago I finally caught up with modern development practices and switched to Git for new software projects. Though I host my own projects on my own server with the help of Trac and gitosis, one thing I do like about GitHub though, are Gists. Like many good ideas this one makes one wonder, why nobody came up with it before. It is also very easy to include Gists in your blog, which is what I'm starting with this post. Recently, on the German mailing list of the pyCologne User Group, someone was pointing out Python's poor performance at an implementation of the fibonacci series using recursion and showed some Scala code that profited from a few added type declarations. I showed that a similar performance gain could be achieved using Cython, with very few changes to the original pure Python code. I created a small shell function to automate the process of compiling a Cython source file with the --embed option and turning it it into a binary. The function then runs the resulting binary, so you can use this function to run a *.pyx file directly. Read full article...
11 Feb 2014 7:43pm GMT
02 Jan 2014
Ticketing / workflow / bugtracker systems are always nasty. Github's is pretty good. Maybe the best of what's out there. But it ain't perfect.
Here's what I like:
- It's ready to go immediately once you start your github repo.
- You can link a commit to an issue by mentioning the issue number in the commit.
- Labels let you store a TON of metadata.
And what I dislike:
- No obvious way to tell if somebody is actively working on an issue. More generally, no "status" field exists on an issue.
- No obvious way to do a query like "label X or label Y".
- No command-line interface.
- Since github doesn't include a built-in mailing list, github issues often get used for support requests. Then when somebody explains "here's how to do … ", the issue gets closed, and that helpful expensive-to-write documentation is hidden away. The solution here is for github to host a mailing list for every repository.
02 Jan 2014 4:09pm GMT
08 Dec 2013
You don't need many tools to start gardening. You can dig holes with a stick or a sharp rock. You can start seeds in tin cans. You can use all sorts of stuff to carry water. You really only need dirt, sun, and seeds. So don't run out and buy a bunch of stuff!
But when you realize you've got the gardening bug bad, there's a few tools that really help. First off, you need some rubber boots. Otherwise, you're going to track mud everywhere. That's going to make your significant other very annoyed!
I bought these boots in 2006. They've held up very well over the last seven years. They're waterproof, thick enough to block thorns, easy to hose off, and the sole is thick enough that I can push on a shovel with them.
They're made here in Illinois, USA, by Boss Manufacturing Company. They've been around since 1893!
You can order them on Amazon. You can't order them direct from the company.
Note: I will get some commission if you order the boots from the link below, so if you hate me, you should not click on that link.
08 Dec 2013 4:50pm GMT
16 Nov 2013
I just wrote this up on my biz site.
I hope it helps somebody out!
16 Nov 2013 9:43pm GMT
10 Nov 2013
One of the less known features introduced in TurboGears 2.3 are application wrappers.
Application wrappers are much like controller wrappers (available since 2.2), but instead of wrapping controllers they actually wrap the whole application providing an easier way to implement what in plain WSGI is done through middlewares.
The advantage of application wrappers over middlewares is that they have full access to TurboGears stack, they can access the current request, the database, session and caches as the application itself would do.
The great part is that, as they run between TGApp and TGController, they can also replace the TurboGears Context and the TurboGears Response providing a great way to hijack requests, responses or even replace entire features of the framework like the cache layer. A very similar concept is available in other frameworks like Pyramid Tweens.
A very simple application wrapper that intercepts exceptions and logs them without messing with the standard TurboGears error handling might look like:
class ErrorLoggingWrapper(object): def __init__(self, handler, config): self.handler = handler self.config = config def __call__(self, controller, environ, context): path = context.request.path try: return self.handler(controller, environ, context) except: log.exception('Error while handling %s', path) raise
The wrapper can then be enabled calling
Now that we have an application wrapper able to log exceptions we can decide for example to add another one that suppresses exceptions and prints "Something went wrong!", as it is possible to specify the order of execution for application wrappers we can register a SuppressErrorsWrapper that should execute after the ErrorLoggingWrapper:
from webob import Response class SuppressErrorsWrapper(object): def __init__(self, handler, config): self.handler = handler self.config = config def __call__(self, controller, environ, context): try: return self.handler(controller, environ, context) except: return Response('Oh! Oh! Something went wrong!', status=500, content_type='text/plain')
Then it can be registered after the ErrorLoggingWrapper using:
While applications wrappers are a powerful feature, most of their power comes from the new response management refactoring that makes possible to access the current context and replace the outgoing response while working with high level objects instead of having to manually cope with WSGI.
10 Nov 2013 1:16pm GMT