Date and time in Python scripts
7th September 2007
Here’s an excellent description of various methods to handle date and time in Python scripts.
Posted in Links, Notepad, Programming, Python | No Comments »
7th September 2007
Here’s an excellent description of various methods to handle date and time in Python scripts.
Posted in Links, Notepad, Programming, Python | No Comments »
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)
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 »
Posted in Programming, Python | 1 Comment »
12th August 2007
Today, after starting ./configure to make one of the programs, I noticed this in the logs:
I don’t know what is that intended to mean, but this is definitely funny: configure script, able to detect if the Force is with Skywalker…
Posted in Humour, Programming | No Comments »
12th August 2007
Posted in Links, Programming, Python | No Comments »
12th August 2007
To iterate through all the files within the specified directory (folder), with ability to use wildcards (*, ?, and [ ]-style ranges), use the following code snippet:
Read the rest of this entry »
Posted in Programming, Python | 39 Comments »
10th August 2007
Today I was looking for some simple but convenient source-code editor. I came across this post, and decided to try Geany. I’m using Slackware 11 at the moment, and as there were no packages available, I downloaded Geany source to compile and install.
However, the ‘configure’ script failed. When trying to compile ‘conftest.c’ with gcc, the following error was produced:
libc.so: file format not recognized; treating as linker script
(Note 1: in the error above, I removed all the paths which were prepended to the actual error message.)
(Note 2: I suspect that this error is the result of incomplete/failed/erroneous update of glibc slackware package I attempted a while ago. Will have to fix that more properly than described below.)
Here’s the solution which helped me to install Geany successfully:
Read the rest of this entry »
Posted in *nix, Programming, Software | 4 Comments »
8th July 2007
This helped me, maybe it will help you: How to convert between utf8 and cp1251 without iconv
Read the rest of this entry »
Posted in Links, PHP, Programming, Web | No Comments »