Re: Data mining/pattern recogniton software in Python?

2012-03-23 Thread Grzegorz Staniak
On 24.03.2012, Jon Clements wroted: > It might also be worth checking out pandas[1] and scikits.statsmodels[2]. > > In terms of reading data in a loop I would probably go for a > producer-consumer model (possibly using a Queue[3]). Have the consumer > constantly try to get another reading, and

Re: Fetching data from a HTML file

2012-03-23 Thread Jon Clements
On Friday, 23 March 2012 13:52:05 UTC, Sangeet wrote: > Hi, > > I've got to fetch data from the snippet below and have been trying to match > the digits in this to specifically to specific groups. But I can't seem to > figure how to go about stripping the tags! :( > > Sum class="green">24511 a

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-03-23 Thread Dave Angel
On 03/23/2012 02:28 PM, Peter Otten wrote: Ethan Furman wrote: Nathan Rice wrote: Logo. It's turtles all the way down. +1 QOTW Surely you're joking, Mr Furman! Cracking safes was the best chapter. -- DaveA -- http://mail.python.org/mailman/listinfo/python-list

Re: Help needed to understand the error message

2012-03-23 Thread MRAB
On 24/03/2012 03:37, Aloke Ghosh wrote: Hi, I am learning Python and do not have programming experience. I was following an exercise from http://learnpythonthehardway.org/book/ex2.html and made a mistake in entry : *Print"I like typing this."* and got the following error message: *In [2]: Prin

Help needed to understand the error message

2012-03-23 Thread Aloke Ghosh
Hi, I am learning Python and do not have programming experience. I was following an exercise from http://learnpythonthehardway.org/book/ex2.html and made a mistake in entry : *Print"I like typing this."* and got the following error message: *In [2]: Print"I like typing this."* *-

Re: Stream programming

2012-03-23 Thread Steven D'Aprano
On Fri, 23 Mar 2012 17:00:23 +0100, Kiuhnm wrote: > I've been writing a little library for handling streams as an excuse for > doing a little OOP with Python. > > I don't share some of the views on readability expressed on this ng. > Indeed, I believe that a piece of code may very well start as c

Re: Data mining/pattern recogniton software in Python?

2012-03-23 Thread Jon Clements
On Friday, 23 March 2012 16:43:40 UTC, Grzegorz Staniak wrote: > Hello, > > I've been asked by a colleague for help in a small educational > project, which would involve the recognition of patterns in a live > feed of data points (readings from a measuring appliance), and then > a more general

Re: Documentation, assignment in expression.

2012-03-23 Thread Roy Smith
In article <4f6d0060$0$6634$9b4e6...@newsspool2.arcor-online.net>, Alexander Blinne wrote: > The last sentence "For example, in the current version of Python file > objects support the iterator protocol, so you can now write simply > (for line in file:)" ... In general, words like "current",

Re: Stream programming

2012-03-23 Thread Kiuhnm
On 3/24/2012 0:32, Ray Song wrote: On Fri, Mar 23, 2012 at 05:00:23PM +0100, Kiuhnm wrote: I've been writing a little library for handling streams as an excuse for doing a little OOP with Python. I don't share some of the views on readability expressed on this ng. Indeed, I believe that a piece

Re: Stream programming

2012-03-23 Thread Kiuhnm
On 3/23/2012 22:18, Nathan Rice wrote: I understand what you're trying to communicate, so I think you need to be a little more strict and explicit in your definitions. No, I don't think you understand what I meant. I don't agree. Sorry. You could just point out those inconsistencies that

Re: Stream programming

2012-03-23 Thread Kiuhnm
On 3/23/2012 22:12, Ethan Furman wrote: Kiuhnm wrote: On 3/23/2012 17:33, Nathan Rice wrote: Given the examples you pose here, it is clear that you are assuming that the streams are synchronized in discrete time. Since you do not provide any mechanism for temporal alignment of streams you are a

Re: Stream programming

2012-03-23 Thread Ray Song
On Fri, Mar 23, 2012 at 05:00:23PM +0100, Kiuhnm wrote: > I've been writing a little library for handling streams as an excuse for > doing a little OOP with Python. > > I don't share some of the views on readability expressed on this ng. > Indeed, I believe that a piece of code may very well start

Documentation, assignment in expression.

2012-03-23 Thread Alexander Blinne
Hi, I think this section of the docs needs some kind of rewrite: While it is great to discuss the reasons for not allowing an assignment in an expression, I feel that the given example is some kind of outdate

Escape from /dev/null

2012-03-23 Thread Mentifex
Reddit has just published a note about http://www.spotify.com/us/devnull/ which purports to be "a programmer competition that is going to blow your mind." It says that "You will need at least a couple of years experience coding JavaScript and/or Python to have fun and be really good at it to clea

Re: passing context into BaseHTTPRequestHandler

2012-03-23 Thread Steve Howell
On Mar 23, 12:19 pm, Bernhard Herzog wrote: > Steve Howell writes: > > I have a use case where I'm running BaseHTTPServer.HTTPServer, and I > > want to configure the request handler with some context.  I've gotten > > the code to work, but it feels overly heavy.  I am wondering if > > anybody cou

Re: Stream programming

2012-03-23 Thread Ethan Furman
Kiuhnm wrote: On 3/23/2012 17:33, Nathan Rice wrote: Given the examples you pose here, it is clear that you are assuming that the streams are synchronized in discrete time. Since you do not provide any mechanism for temporal alignment of streams you are also assuming every stream will have an e

Re: Stream programming

2012-03-23 Thread Nathan Rice
>>  I understand what >> you're trying to communicate, so I think you need to be a little more >> strict and explicit in your definitions. > > > No, I don't think you understand what I meant. I don't agree. Sorry. > Yes. I thought that streams as an alternative to functional programming were > wi

Re: Stream programming

2012-03-23 Thread Kiuhnm
On 3/23/2012 20:23, Nathan Rice wrote: I will use "<=>" to mean "is equivalent to". That's not part of the DSL. A flow has one or more streams: 1 stream: [1,2,3] 2 streams: [1,3,5] | [2,4,6] Two flows can be concatenated: [1,2,3] + [4,5,6]<=>[1,2,3,4,5,6] [0] + ([1

Re: Stream programming

2012-03-23 Thread Kiuhnm
On 3/23/2012 17:33, Nathan Rice wrote: I will use "<=>" to mean "is equivalent to". That's not part of the DSL. A flow has one or more streams: 1 stream: [1,2,3] 2 streams: [1,3,5] | [2,4,6] Two flows can be concatenated: [1,2,3] + [4,5,6]<=> [1,2,3,4,5,6] [0] + ([1,2] | [3,4]) +

Re: Stream programming

2012-03-23 Thread Nathan Rice
>>>  I will use "<=>" to mean "is equivalent to". That's not part of the DSL. >>>  A flow has one or more streams: >>>   1 stream: >>>     [1,2,3] >>>   2 streams: >>>     [1,3,5] | [2,4,6] >>>  Two flows can be concatenated: >>>   [1,2,3] + [4,5,6]<=>  [1,2,3,4,5,6] >>>   [0] + ([1,2] | [3,4]) + [

Re: passing context into BaseHTTPRequestHandler

2012-03-23 Thread Bernhard Herzog
Steve Howell writes: > I have a use case where I'm running BaseHTTPServer.HTTPServer, and I > want to configure the request handler with some context. I've gotten > the code to work, but it feels overly heavy. I am wondering if > anybody could suggest an easier idiom for this. > > This is a bri

passing context into BaseHTTPRequestHandler

2012-03-23 Thread Steve Howell
I have a use case where I'm running BaseHTTPServer.HTTPServer, and I want to configure the request handler with some context. I've gotten the code to work, but it feels overly heavy. I am wondering if anybody could suggest an easier idiom for this. This is a brief sketch of the code: class

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-03-23 Thread Peter Otten
Ethan Furman wrote: > Nathan Rice wrote: >> Logo. It's turtles all the way down. > > +1 QOTW Surely you're joking, Mr Furman! -- http://mail.python.org/mailman/listinfo/python-list

Re: Stream programming

2012-03-23 Thread MRAB
On 23/03/2012 16:33, Nathan Rice wrote: I will use "<=>" to mean "is equivalent to". That's not part of the DSL. A flow has one or more streams: 1 stream: [1,2,3] 2 streams: [1,3,5] | [2,4,6] Two flows can be concatenated: [1,2,3] + [4,5,6]<=> [1,2,3,4,5,6] [0] + ([1,2]

Re: Good web-development Python book

2012-03-23 Thread Colton Myers
> Oooops! Sent my previous e-mail too soon! Didn't mean to. > > Another try. > > Hello, > > I'm trying to brush up on my Python and would like to learn how to > make web-apps. I was hoping to get a good book on learning how to > make web-applications using Python (as opposed to something like PH

Re: Good web-development Python book

2012-03-23 Thread Ethan Furman
Chris Rebert wrote: On Fri, Mar 23, 2012 at 10:13 AM, Dennis Lee Bieber wrote: On Fri, 23 Mar 2012 09:30:24 -0700, Chris Rebert declaimed the following in gmane.comp.python.general: On Fri, Mar 23, 2012 at 9:16 AM, Yves S. Garret ** wrote: make web-applications using Python (as oppose

Re: Good web-development Python book

2012-03-23 Thread Chris Rebert
On Fri, Mar 23, 2012 at 10:13 AM, Dennis Lee Bieber wrote: > On Fri, 23 Mar 2012 09:30:24 -0700, Chris Rebert > declaimed the following in gmane.comp.python.general: > >> On Fri, Mar 23, 2012 at 9:16 AM, Yves S. Garret >> wrote: >         >> > make web-applications using Python (as opposed to so

Re: Data mining/pattern recogniton software in Python?

2012-03-23 Thread Nelle Varoquaux
Hello, There are two steps in using a supervised learning algorithm: fitting the classifier on data labeled, and predicting on new data. If you are looking to fit with incoming data, you are looking for online algorithms: algorithms that take chunks of data to fit the classifier on the fly. scikit

Data mining/pattern recogniton software in Python?

2012-03-23 Thread Grzegorz Staniak
Hello, I've been asked by a colleague for help in a small educational project, which would involve the recognition of patterns in a live feed of data points (readings from a measuring appliance), and then a more general search for patterns on archival data. The language of preference is Python,

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-03-23 Thread Ethan Furman
Nathan Rice wrote: Logo. It's turtles all the way down. +1 QOTW -- http://mail.python.org/mailman/listinfo/python-list

Re: Stream programming

2012-03-23 Thread Nathan Rice
> I will use "<=>" to mean "is equivalent to". That's not part of the DSL. > A flow has one or more streams: >  1 stream: >    [1,2,3] >  2 streams: >    [1,3,5] | [2,4,6] > Two flows can be concatenated: >  [1,2,3] + [4,5,6] <=> [1,2,3,4,5,6] >  [0] + ([1,2] | [3,4]) + [10] <=> [0,1,2,10] | [0,3,4

Re: Good web-development Python book

2012-03-23 Thread Chris Rebert
On Fri, Mar 23, 2012 at 9:16 AM, Yves S. Garret wrote: > Oooops!  Sent my previous e-mail too soon!  Didn't mean to. > > Another try. > > Hello, > >   I'm trying to brush up on my Python and would like to learn how to > make web-apps.  I was hoping to get a good book on learning how to > make web-

Good web-development Python book

2012-03-23 Thread Yves S. Garret
Oooops! Sent my previous e-mail too soon! Didn't mean to. Another try. Hello, I'm trying to brush up on my Python and would like to learn how to make web-apps. I was hoping to get a good book on learning how to make web-applications using Python (as opposed to something like PHP) without a

Good web-development Python book

2012-03-23 Thread Yves S. Garret
Hello, I'm trying to brush up on my Python and would like to -- http://mail.python.org/mailman/listinfo/python-list

Re: Stream programming

2012-03-23 Thread Kiuhnm
On 3/23/2012 17:00, Kiuhnm wrote: I've been writing a little library for handling streams as an excuse for doing a little OOP with Python. I don't share some of the views on readability expressed on this ng. Indeed, I believe that a piece of code may very well start as complete gibberish and bec

Stream programming

2012-03-23 Thread Kiuhnm
I've been writing a little library for handling streams as an excuse for doing a little OOP with Python. I don't share some of the views on readability expressed on this ng. Indeed, I believe that a piece of code may very well start as complete gibberish and become a pleasure to read after som

Re: Fetching data from a HTML file

2012-03-23 Thread Daniel Fetchinson
On 3/23/12, Sangeet wrote: > Hi, > > I've got to fetch data from the snippet below and have been trying to match > the digits in this to specifically to specific groups. But I can't seem to > figure how to go about stripping the tags! :( > > Sum class="green">24511 align='center'>02561.496 > [min]

RE: Number of languages known [was Re: Python is readable] - somewhat OT

2012-03-23 Thread Prasad, Ramit
> Logo. It's turtles all the way down. I had forgotten all about that, I should add that to my resume! I wonder what kind of job I could get writing primarily in Logo? Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713

RE: Number of languages known [was Re: Python is readable] - somewhat OT

2012-03-23 Thread Prasad, Ramit
> I confess--I've never learned LilyPond, Modula-2, or LPC! I mean, of > course they're on my resume, just to get by HR screening, but that's > just between you and me... You mean, you, him, this mailing list, and anyone that looks on the archives... Ramit Ramit Prasad | JPMorgan Chase Investm

RE: Fetching data from a HTML file

2012-03-23 Thread Prasad, Ramit
> Actually, I'm working on ROBOT Framework, and haven't been able to figure > out how to read data from HTML tables. Reading from the source, is the best > (read rudimentary) way I could come up with. Any suggestions are welcome! > I've got to fetch data from the snippet below and have been trying

Re: Python classes: Simplify?

2012-03-23 Thread Steven Lehar
Many thanks to all who responded to my "Python Classes: Simplify?" thread. There seem to be several good reasons for this particular syntactical choice, I am all the wiser for your kind explanations. My faith in the simplicity and elegance of this beautiful language is reinforced. Thanks all! --

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-03-23 Thread Nathan Rice
Logo. It's turtles all the way down. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python classes: Simplify?

2012-03-23 Thread Jean-Michel Pichavant
Steven Lehar wrote: It seems to me that the Python class system is needlessly confusing. Am I missing something? For example in the class Complex given in the documentation *class Complex:* *def __init__(self, realpart, imagpart):* *self.r = realpart* *self.i = imagpart* *

Re: Fetching data from a HTML file

2012-03-23 Thread Simon Yan
On Fri, Mar 23, 2012 at 9:52 PM, Sangeet wrote: > Hi, > > I've got to fetch data from the snippet below and have been trying to > match the digits in this to specifically to specific groups. But I can't > seem to figure how to go about stripping the tags! :( > > Sum class="green">24511 align='cen

Fetching data from a HTML file

2012-03-23 Thread Sangeet
Hi, I've got to fetch data from the snippet below and have been trying to match the digits in this to specifically to specific groups. But I can't seem to figure how to go about stripping the tags! :( Sum2451102561.496 [min] Actually, I'm working on ROBOT Framework, and haven't been able to

Re: Accessing the files by last modified time

2012-03-23 Thread Sangeet
On Thursday, 22 March 2012 17:19:23 UTC+5:30, Chris Rebert wrote: > On Thu, Mar 22, 2012 at 4:33 AM, Sangeet wrote: > > Hi > > > > I am new to the python programming language. > > > > I've been trying to write a script that would access the last modified file > > in one of my directories. I'm us

Re: Accessing the files by last modified time

2012-03-23 Thread Sangeet
On Thursday, 22 March 2012 17:34:43 UTC+5:30, Tim Williams wrote: > On Mar 22, 7:33 am, Sangeet wrote: > > Hi > > > > I am new to the python programming language. > > > > I've been trying to write a script that would access the last modified file > > in one of my directories. I'm using Win XP. >

Templated rich-text egg

2012-03-23 Thread Alec Taylor
Good morning, We've all seen document templates in a variety of systems, such as PowerPoint, MailChimp and Google Docs. I would like to utilise the same sorts of capabilities on my website. The following features I require: • Create a library of document templates • Allow others to pick a docume

Re: Python is readable

2012-03-23 Thread Steven Lehar
Reply to Steve Howell >>> Do you think we'll always have a huge number of incompatible programming languages? I agree with you that it's a fact of life in 2012, but will it be a fact of life in 2062? <<< We can only HOPE so! When I first learned unix / sh / csh / tcsh / bash ...etc... it irked

contextlib.nested deprecated

2012-03-23 Thread Thomas Rachel
Hi, I understand why contextlib.nested is deprecated. But if I write a program for an old python version w/o the multiple form of with, I have (nearly) no other choice. In order to avoid the following construct to fail: with nested(open("f1"), open("f2")) as (f1, f2): (f1 wouldn't be cl

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-03-23 Thread Chris Angelico
On Fri, Mar 23, 2012 at 7:04 PM, Steve Howell wrote: > If you're that adept at learning languages, then I recommend learning > Ruby just for kicks, but you're not missing *that* much, trust me. > I'd skip past Ruby and learn CoffeeScript. Sure. When I have some spare time... lessee, I think I hav

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-03-23 Thread Steve Howell
On Mar 22, 6:11 pm, Steven D'Aprano wrote: > On Fri, 23 Mar 2012 06:14:46 +1100, Chris Angelico wrote: > > On Fri, Mar 23, 2012 at 4:44 AM, Steven D'Aprano > > wrote: > >> The typical developer knows three, maybe four languages moderately > >> well, if you include SQL and regexes as languages, an

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-03-23 Thread Steve Howell
On Mar 23, 12:05 am, Chris Angelico wrote: > On Fri, Mar 23, 2012 at 1:48 PM, Steve Howell wrote: > > On Mar 22, 6:11 pm, Steven D'Aprano > +comp.lang.pyt...@pearwood.info> wrote: > >> In any case, I'm not talking about the best developers. I'm talking about > >> the typical developer, who by de

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-03-23 Thread Chris Angelico
On Fri, Mar 23, 2012 at 1:48 PM, Steve Howell wrote: > On Mar 22, 6:11 pm, Steven D'Aprano +comp.lang.pyt...@pearwood.info> wrote: >> In any case, I'm not talking about the best developers. I'm talking about >> the typical developer, who by definition is just average. They probably >> know reason

Re: Python is readable

2012-03-23 Thread Steve Howell
On Mar 22, 9:43 pm, MRAB wrote: > On 23/03/2012 04:16, Steve Howell wrote: > > > > > > > > > On Mar 22, 8:20 pm, rusi  wrote: > >>  On Mar 23, 7:42 am, Steve Howell  wrote: > > >>  >  Do you think we'll always have a huge number of incompatible > >>  >  programming languages?  I agree with you tha