Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Archive for August, 2007

    Elegantly converting Python list into another list with changed items

    30th August 2007

    I just had a small problem with my Python script:

    1. I have a list of tuples, called records_cache; each tuple looks like this:
    (note: for copy-pasting, click the PLAIN TEXT box headers)

    1. (ensembl_transcript_id, ensembl_gene_id, chrom_start, chrom_end, utr_start, utr_end, sequence, strand)

    2. I need to INSERT only some of those values into MySQL table, using the MySQLdb executemany() method. The values I need are utr_start, utr_end, ensembl_gene_id (in exactly this order).

    To do this, I need to create another list of tuples, but with shorter 3-item tuples. Let us call the new list genes_update.

    Here is the elegant, though probably not the most efficient, solution:
    Read the rest of this entry »

    Share

    Posted in Programming, Python | 1 Comment »

    Singularity prophecy

    29th August 2007

    Found this video via BlindSpot:

    At the end of the video, when future supercomputers are described, it hinted me at two distinct long-living ideas: that of singularity (in the sense of a breakthrough leading to the immediate exponential growth and even probable abrupt mankind transformation), and that of Artificial Intelligence. The video suggests that this will happen somewhere between 2013 and 2049, which is hard to believe.

    Information overload is definitely a feature of the modern world. There’s still space for further overload, but what will be the result? Psychotic workers, or super-intelligent and hyper-efficient “infohumans”?

    China, India and their bordering states (sorry, no offence here – just to shorten the list) were long known to constitute the largest mono-national parts of world population. It’s clear that after fairly recent joining of the Asian states into a superstate cooperation commonwealth, half of the world’s population already resides in that commonwealth. This projection for the future seems the strongest of all shown in the movie.

    I would strongly doubt the “largest English-speaking country in 10 years” to be China. Imagine: you live in a 1+ billion people country, and you are financially stable (we all know that China is the fastest growing world’s economy); why would you need to learn English, which is so different from your native language? Chinese language is the way – so start learning it as soon as you can :) (BTW, seen somewhere that the number of Japanese blogs, as expected, became larger than the number of English blogs. Now waiting for Chinese blogs? )

    Share

    Posted in Life, Society | No Comments »

    Fast food of the future?

    28th August 2007

    Watch this:

    If it’s convenient and well-designed, I wouldn’t mind visiting such a fast food once in a while. Though it’s hard to imagine having breakfast there every day: too dull, I suspect. But have to try first to be sure.

    Some more videos of delivery and disposal:
    Read the rest of this entry »

    Share

    Posted in Life, Links, Misc, Society | No Comments »

    Elections soon: parties spam the inbox

    20th August 2007

    Out of roughly 100 spam messages, accumulated in the one of webmaster@-type mailboxes, there were two about the forthcoming parliamentary elections in Ukraine. Both seemed to have originated from the same political party: they have links back to their website, and also their contact emails. One had apologies inside, saying “We don’t use the money of others, thus we had to contact you the way we did” (approx. translation from Ukrainian).

    I do not yet know (and might never know for sure, actually), if this is a true spam-campaign, or a “black PR”. Though “black PR” scenario seems highly unlikely – the party didn’t get into the parliament during two previous parliamentary elections, and has a negligible expected electorate percent (I’d say below 0.2%).

    If it’s not “black PR”, then we’re seeing a new trend leading us to the truly “electronic government”.

    We now only need some web-resource to become sufficiently popular and conduct law-enforced elections on-line – of course, with IP blocking to disallow repeated voting, and other pseudo-secure whistles :) :)

    I wonder if other countries have the experience of true (non-fake, non-black-PR) political unsolicited bulk mailings.

    Anybody? Examples, study references? :)

    Share

    Posted in Society | No Comments »

    Linux package management: use aptitude, if your distro has it

    19th August 2007

    Found Aptitude vs Apt-Get post. Worth reading – both the post and the comments – if you are looking for a Linux distro or want a better package management tool.

    Share

    Posted in *nix, Links | 1 Comment »

    Compare and choose Linux distributions

    17th August 2007

    If you are considering an installation of a Linux or Unix-like system, then the Compare distros is a good place to visit. As a Slackware user, I find some evaluation methods a bit controversial, but still the resource is very good, and I’m currently perusing it in order to identify the system I might want to install on my older computer. Currently the candidates are (in no specific order) Kubuntu, Debian, Gentoo, and probably ALTLinux.

    For the sheer simplicity of choosing a Linux distribution, the polishlinux.org also has Distro chooser. After answering the questions, I got this list:

    1. Fedora
    2. openSUSE
    3. Ubuntu Linux
    4. Debian GNU/Linux
    5. Mandriva Linux

    As one can see, out of 3-4 distributions I’m currently considering, this list of 5 gave an overlap of 2 distributions (Ubuntu, if we assume that Kubuntu is roughly the same, and Debian). I’d say the Distro chooser, being somewhat simplistic, gave a close match to my own list (except for the not-so-well-known-by-me Fedora, openSUSE; Mandriva, based on my current knowledge, is a kind of superseded by Ubuntu’s ease of use).

    There’s another wizard-like Linux Distribution Chooser. This one is pretty and thus fun to complete. (Thanks to the authors for adding some JS-based questions which do not require page reload – this definitely adds to the comprehended speed of answering questions; I’d say the proportion of JS-based and POSTed responses is nearly perfect.) This time, I got 6 recommendations:

    1. Fedora
    2. Kubuntu
    3. ArchLinux
    4. Debian
    5. openSUSE
    6. Mandriva

    Again, I have Kubuntu and Debian in the list. It’s more interesting though, that Fedora, openSUSE and Mandriva are repeated from the previous list! Well, it might be due to the short-list nature of really popular Linux distros. But Fedora appears on top in both cases, Mandriva appears at the bottom, and Debian/openSUSE are not decided :) Based on these results I’m going to have a closer look at Fedora, might have missed my perfect match :)

    If even after these wizards/tests/tables you do not feel the complete satisfaction of a (converted?) believer, there’s also yet another Linux Distributions Chooser. It’s short and simple, and gave me only Mandriva and SUSE (without specifying which exactly SUSE flavour).

    When you are done choosing Linux distro, and your mother tongue isn’t English, it would be wise to look for already localized distros. For example, I’m using DeepStyle Slackware-based linux, which differs mostly in Ukrainian (Cyrillic) support and some add-on packages/enhancements. There are also many other examples, much more known and popular. Taking a localized distro, you save time and do not lose anything.

    Finally, if you are a Linux newbie but do want to learn the ins and outs of Linux, you may try Slackware-based Topologilinux (which also runs within windows). Slackware is not usually considered an option for newbies, but based on my impressions Topologilinux is quite friendly and easy to install/configure, at the same time providing more than enough space for experiments. The whole OS is in a single file, so after initial installation you may backup the ‘tlinux’ folder for the case that you experiment too much and kill Topolinux – then just unroll the backup in place :)

    Really finally, over the period of the last 2-3 years linux distros became so user-friendly, that migration from any other OS shouldn’t be too complicated. And, based on my blog’s statistics, Linux + MacOS X (BSD-based, if I remember correctly) already make up ~35-40% of all the visitors’ OSes :)

    Share

    Posted in *nix, Links | 1 Comment »

    Installing Linux onto an older computer

    17th August 2007

    As a primer and a generally good guide, read Linux on old hardware. Pay special attention to kernel arguments (“cheat codes”): those do come handy often with older hardware.

    From personal experience, have to say the following:
    Read the rest of this entry »

    Share

    Posted in *nix, Links | No Comments »