Archive for the ‘Python’ Category

Struggling with MySQL performance problems under Linux

Posted on October 28th, 2011 in programming, Python | 7 Comments »

As I don’t develop C# application at work anymore, I was finally allowed to switch from Windows to Linux. So I grabbed the 64-bit version of Mint Debian Xfce, installed it and moved my Thunderbird profile and my Python projects. After installing new Python virtual environment I launched the tests for our biggest project using Twisted. Tests passed, but it seemed to me that they run way too long. So I launched Windows once again and compared the time. Under Windows XP tests run for about 40 seconds and under Linux – for over 200 seconds. So I wondered how the hell was this possible, Linux can’t be 5 times slower than Windows.
Read the rest of this entry »

Reading Metastock files

Posted on August 6th, 2008 in programming, Python, Stock exchange | 16 Comments »

Note: a free tool converting Metastock data to text files is available.

The source code is available on GitHub: git://github.com/themech/ms2txt.git.

Last week I decided to check how my trading system performs while playing on different foreign indexes. First I had to download the test data. I found a web page offering the quotations I was interested in – luckily it wasn’t expensive.The problem was (of course it occurred after I had paid) that the data was available only in Metastock format. Of course I use my own software (just as every other programmer 😉 ) that helps me to play stocks and futures and I don’t have Metastock. So I decided I would give it a try and I wrote a tiny program that reads Metastock files and generates text files with quotes. I used my beloved Python. You can find the source here.

Read the rest of this entry »