Re: [Tutor] Code optmisation

2008-04-07 Thread Eric Walstad
Hi Yogi On Fri, Apr 4, 2008 at 10:05 PM, yogi <[EMAIL PROTECTED]> wrote: > Hi , >Here is my first usable Python code. > The code works. Woohoo! congratulations. > Here is what I'm trying to do. > I have two huge text files. After some processing, One is 12M (file A) and > the other

Re: [Tutor] Code optmisation

2008-04-07 Thread Kent Johnson
yogi wrote: Some small optimizations inline, more important comments after the code. > #/bin/python > import sys, os, csv, re > x = 0 #Define Zero for now > var = 100 #Taking the variation > # This programme finds the SNPs from the

Re: [Tutor] Code optmisation

2008-04-05 Thread W W
On Sat, Apr 5, 2008 at 2:44 AM, Alan Gauld <[EMAIL PROTECTED]> wrote: > "yogi" <[EMAIL PROTECTED]> wrote > > Question 2: If I have convert this code into a function. > > Should I ? > > Only if you have a need to reuse it in a bigger context > or of you want to parameterize it. You could maybe

Re: [Tutor] Code optmisation

2008-04-05 Thread Alan Gauld
"yogi" <[EMAIL PROTECTED]> wrote > #/bin/python > import sys, os, csv, re > x = 0 #Define Zero for now > var = 100 #Taking the variation > # This programme finds the SNPs from the range passed > # csv splits columns and this file is t

[Tutor] Code optmisation

2008-04-04 Thread yogi
Hi , Here is my first usable Python code. The code works. Here is what I'm trying to do. I have two huge text files. After some processing, One is 12M (file A) and the other 1M (file B) . The files have columns which are of interest to me. I 'm trying to match entries of column [0] on fi