Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Archive for the 'Programming' Category

    Using Python in a Java project

    17th May 2011

    If you are a Python zealot, and Java doesn’t feel right, but the project you are working on is a Java project – try

    • Jython – Python for the Java platform, compile your python scripts into Java bytecode
    • Groovy – not Python, but still a scripting language which compiles to jars
    Share

    Posted in Links, Movies, Programming, Python | No Comments »

    Introduction to Python for bioinformatics

    25th February 2011

    This overview presentation is two years old, but still a highly valuable resource: modules and tools mentioned are alive and useful.
    I think this is the second presentation by Giovanni I’m embedding (first one being about GNU/make for bioinformatics).

    Share

    Posted in Bioinformatics, Links, Python, Software | No Comments »

    How to easily install any PyPi/easy_install python module on Debian

    16th February 2011

    Imagine you need to install pycassa (which uses easy_install). Here are the 2 (at maximum) very simple steps to have it properly debianized and installed on your Debian/Ubuntu:

    • if you don’t have the python-stdeb package: sudo aptitude install python-stdeb
    • pypi-install pycassa

    That’s it.

    Refer to stdeb readme for more information. You will need that if there are dependencies – which might not be resolved automatically by stdeb.

    Before stdeb, it wasn’t exactly trivial to make a .deb from python module.

    Share

    Posted in *nix, how-to, Notepad, Python, Software | 1 Comment »

    DreamPie: the ultimate Python shell

    11th August 2010

    DreamPie: the Python shell you’ve always dreamt about!

    • Type your code in the lower pane of the window. To execute, press Ctrl+Enter. One-liners can be executed by simply pressing Enter; If you don’t want them executed, press Space and then Enter.

    • Use Ctrl+Up and Ctrl+Down to navigate between code segments you’ve already executed. You can write a few letters before pressing Ctrl+Up, and DreamPie will only search through code segments starting with those letters.

    • Press Tab or Ctrl+Space to show a list of completions to the current expression. It will also complete file names!

    • Your results are stored in variables named _0, _1, and so on.

    • Type a function name and press the space key and DreamPie will automatically add parentheses for you!

    Share

    Posted in Links, Programming, Python | No Comments »

    Good online Python book with code examples

    1st March 2010

    Building Skills in Python: A Programmer’s Introduction to Python by Steven F. Lott (© 2002, 2005, 2007, 2008 Steven F. Lott).

    Share

    Posted in Links, Programming, Python | No Comments »

    R script to filter probesets with log-expression values below the lowest spike-in

    27th January 2010

    Sometimes there is a need to remove all the probesets, which have expression values below the minimal spike-in intensity on the Affymetrix microarray. The reasoning behind this procedure is simple: minimal-expression spike-ins represent the bottom margin of microarray sensitivity, and anything below that margin cannot be reliably quantified – which also means that both fold-change and p-value of expression variance will be unreliable for these probesets.

    Here’s a simple R script to do just that. It is abundantly commented, and also contains an optional (commented out) fragment which allows the removal of more low-variance, low-intensity probesets.

    Read the rest of this entry »

    Share

    Posted in Bioinformatics, Programming, Science | No Comments »

    Cloud-based bruteforcing, slowloris, and Golang: links

    13th November 2009

    A nice report on the cost of bruteforcing variable-length and variable-complexity passwords using cloud computing services (e.g. Amazon’s EC). There’s a kind of a tutorial in their previous post.

    Slow DoS attack with just 1 computer against a number of web servers, including Apache: slowloris. There is a solution for Apache, packaged for RedHat and also available for Debian.

    Finally, there’s Go programming language. The most inspiring promise to me personally is the ease of execution parallelization with language’s built-in syntactic constructs. That is something highly desired. Also, I like that it is a compiled language. However, it might be 10%-20% slower than pure C. Let’s see how it grows.

    Share

    Posted in Links, Misc, Programming, Security, Web | No Comments »