Author Archives: kpd

Rate limiting with django-ratelimit

I was playing around with James Socol’s django-ratelimit tonight. It provides a decorator to rate-limit view functions. Very nice! I wanted to use it for login blocking, and some minor changes helped this out. My forked version of django-ratelimit is … Continue reading

Posted in Django, Python | Leave a comment

Custom Tag to Render Avatar in Django Userena

Here is a simple custom tag to render a users avatar (‘mugshot’) when using Django Userena. It optionally takes width and or height in pixels. Place the following code in /templatetags/ your_app/     templatetags/ from django import template … Continue reading

Posted in Django, Python | Leave a comment

Mothballed Software

We all probably have mothballed software – projects that didn’t go very far. This was one of mine, a rowing game!

Posted in programming, rowing | Leave a comment

Django Image Field Overwrite with ImageKit

I’m using django-imagekit on a new site. I was having a problem that when a user uploaded a new image for the object, the system would not overwrite the existing image file, but instead would create a new file with … Continue reading

Posted in Django, Python | Leave a comment

TiddlyWiki with Firefox 15

TiddlyWiki saves (and exports) stopped working with the Firefox upgrade to 15. After trying a few changes to prefs.js, I found the post Will Firefox 16 support TiddlyWiki on the Mozilla site. It had a link to a Firefox extension … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Custom Sort in Google Apps Spreadsheet

I use a Google Docs spreadsheet to track my personal projects. Only, I’m not aware of a way to save sort options in a Google Docs spreadsheet. The solution is to create a script. The following script will add a … Continue reading

Posted in Uncategorized | Leave a comment

SimpleJson Error with django under google app engine

Since moving over to 64 bit windows 7, I’ve had this error when starting up: "…] zipimporter('C:\\python25\\lib\\site- packages\\simplejson-2.0.9-py2.5-win.egg', 'simplejson\\') … … SetGlobals() … … File "C:\Program Files\Google\google_appengine\google\appengine\dist\", line 268, in _getitem__ info = _zipfile_cache[self._archive].getinfo(filename) File "C:\Python25\lib\", line 462, … Continue reading

Posted in Python | Leave a comment

Rynsc on Windows 7 Under Cygwin

Getting rid of permission denied errors in rsync under Windows 7 Continue reading

Posted in programming | Leave a comment

Review of Ergometer Testing for Rowers

This is a review of a new ebook I purchased from Row Perfect called Ergometer Testing for Rowers by Walter Martindale. The ebook is 10 pages of content plus a font and back sheet. Sections: Introduction Basic Physiology for Coaches … Continue reading

Posted in indoor-rowing, rowing | 1 Comment

Sequence from every Nth Item of another Sequence

The phrase ‘every Nth item‘ may be off here, but it is close enough what I want to do (reduce a data set for charting purposes). # data = sequence of data items # nth = you want every nth … Continue reading

Posted in programming, Python | 12 Comments