Re: [Tutor] Interpolation function

2010-03-25 Thread Steven D'Aprano
On Fri, 26 Mar 2010 07:41:35 am Armstrong, Richard J. wrote: > Hello all, > > > > Does anyone have a suggestion for a good interpolation function in > numpy or scipy. I have an earthquake time history with a time step of > 0.005 sec and want to convert it to a time history with a time step > of say

Re: [Tutor] help with loops

2010-03-25 Thread Walter Prins
So, am I right that for each X value in file 2, you want to look up to see if you can find a corresponding line in file 1 where the value from file 2 falls between the X and Y value from file 1, and if found, then output the original line from file 2 and the 6th column from the found line from file

[Tutor] Interpolation function

2010-03-25 Thread Armstrong, Richard J.
Hello all, Does anyone have a suggestion for a good interpolation function in numpy or scipy. I have an earthquake time history with a time step of 0.005 sec and want to convert it to a time history with a time step of say 0.01. The interpolation function numpy.interp is too "coarse" and modifi

Re: [Tutor] help with loops

2010-03-25 Thread bob gailer
On 3/25/2010 11:34 AM, kumar s wrote: Dear group: I need some tips/help from experts. I have two files tab-delimted. One file is 4K lines. The other files is 40K lines. I want to search contents of a file to other and print those lines that satisfy. File 1: chr X Y chr1

Re: [Tutor] a bug I cannot solve myself ;-)

2010-03-25 Thread bob gailer
On 3/25/2010 5:39 AM, spir ☣ wrote: Hello, I'm writing a kind of language simulation. Here, an expression like "a#3.b" maps to a NamedData node, with an attribute terms=[('.','a'),('#',3),('.'''b')]. (The lang uses '#' instead of "[...]" for item indexing.) When this node is "run", the source

Re: [Tutor] KeyError: '61.135.168.82' with dictionary.

2010-03-25 Thread Andreas Kostyrka
Am Donnerstag, 25. März 2010 13:31:07 schrieb Hugo Arts: > On Thu, Mar 25, 2010 at 12:24 PM, Ray Parrish wrote: > > As you can see, it is tossing a key error on the same ip address that was > > used in the interactive code successfully, > > > > I can not figure out what to change to make the scrip

[Tutor] help with loops

2010-03-25 Thread kumar s
Dear group: I need some tips/help from experts. I have two files tab-delimted. One file is 4K lines. The other files is 40K lines. I want to search contents of a file to other and print those lines that satisfy. File 1: chr X Y chr18337733 8337767 NM_001042682_cds_0_0_

Re: [Tutor] KeyError: '61.135.168.82' with dictionary.

2010-03-25 Thread Hugo Arts
On Thu, Mar 25, 2010 at 12:24 PM, Ray Parrish wrote: > > As you can see, it is tossing a key error on the same ip address that was > used in the interactive code successfully, > > I can not figure out what to change to make the script work. Does someone > know why this happens? > It's impossible

[Tutor] KeyError: '61.135.168.82' with dictionary.

2010-03-25 Thread Ray Parrish
Hello, The following code works interactively, but when ran from a script, I get the errors, after the second code block, which is the code from the script. >>> lineList = [] >>> thisIPAddress = '61.135.168.82' >>> date = "2010 3 12" >>> dates = {date:{thisIPAddress:lineList}} >>> dates[date]

[Tutor] Sending mail

2010-03-25 Thread Timo
Hello, I was wondering what the best way is to send an email through my program? I want the user to send an email with an attachment. I do have a webspace, should I use the smtplib module if my webhost supports it (I have to ask though), or should I put a script on my space and communicate with t

Re: [Tutor] a bug I cannot solve myself ;-)

2010-03-25 Thread Andre Engels
2010/3/25 spir ☣ : > Hello, > > > I'm writing a kind of language simulation. Here, an expression like "a#3.b" > maps to a NamedData node, with an attribute > terms=[('.','a'),('#',3),('.'''b')]. > (The lang uses '#' instead of "[...]" for item indexing.) > When this node is "run", the source code

[Tutor] a bug I cannot solve myself ;-)

2010-03-25 Thread spir ☣
Hello, I'm writing a kind of language simulation. Here, an expression like "a#3.b" maps to a NamedData node, with an attribute terms=[('.','a'),('#',3),('.'''b')]. (The lang uses '#' instead of "[...]" for item indexing.) When this node is "run", the source code maps to a name lookup operation i