Increasing memory on a raspberry PI

As a fun side project, I have a co-located raspberry pi. It works exceptionally well and it's quite usefull for light tasks such as a znc bouncer and for doing HTTP redirects.

However, I noticed "free" reported only 448MB ...

Continue reading

boosting generic queries with Django Haystack / SOLR

More Django/Haystack/SOLR fun today: boosting a specific field on a generic query. Now, that would seem trivial using the "boost" option on a searchfield, but it isn't. It turns out this option only works if you explicitly ...

Continue reading

Prefix substring matching for django haystack / solr

If you're using django haystack with SOLR (both fantastic products) and you want your queries to also match partially against words, e.g. search "foo" will match "foo", "foobar", "food", then the following might be a solution.

SOLR supports ...

Continue reading

A python classproperty

In rare occassions I need a property on a classmethod. Until now I've only needed getter-access (setting properties on classes dynamically is scary anyway). Here's my implementation:

def classproperty(f):
    """
        E.g.
        >>> class foo(object):
        ...    @classproperty
        ...    def name ...
Continue reading