Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    Archive for August, 2011

    Python performance: set vs list

    15th August 2011

    Sometimes there is a need to be sure that no identifier is processed twice – for example, when parsing a file into a database, with file potentially containing duplicate records. An obvious solution is to properly wrap the DB insertion code into try…except block, and process duplicate primary ID exceptions. Another, sometimes more desired solution is to maintain a set/list of processed IDs internally, and check against that list prior to attempting the insertion of anything. So is it a set or a list?

    There are already quite a few internet resources discussing “python set vs list”, but probably the simplest while elegant way to test that is below.
    Read the rest of this entry »

    Share

    Posted in Notepad, Programming, Python | 1 Comment »

    Phusion Passenger Apache users guide

    14th August 2011

    Phusion Passenger Apache users guide

    Also as a PDF.

    Share

    Posted in Links, Notepad, Software | No Comments »

    HandBrake profile for Nokia E71 default player

    13th August 2011

    Inspired by video encoding with handbrake.

    HandBrake is a very high-quality piece of software – next time you need recoding something into H.264/MPEG-4 (using MKV or MP4 containers) – try HandBrake. It easily saturated all my CPU cores – which I failed to achieve with ffmpeg, which even with threads=8 was only saturating 2 cores.

    Attached to this post are 2 profiles for recoding movies for Nokia E71. The “_best” profile has exhaustive motion detection, otherwise is identical to the base profile.
    E71.plist
    E71_best.plist

    Related:

    Share

    Posted in Links, Misc, Movies, Notepad | No Comments »