Re: help need to write a python spell checker

2010-05-18 Thread Nigel Rowe
On Fri, 14 May 2010 18:19, harry k wrote in comp.lang.python
mailman.205.1273907726.32709.python-l...@python.org:

 Write a spell checking tool that will identify all misspelled word in
a text file using a provided dictionary.
 
snip/
  
 Extend the spell-checking tool so that the program will also print out
a list of possible correct spellings for the words.
 

I'm happy to do you homework for you, cost is us$1000 per hour.  Email
to your professor automatically on receipt.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: A different take on finding primes

2009-11-18 Thread Nigel Rowe
On Tue, 17 Nov 2009 05:21, Tobiah wrote in comp.lang.python
okgmm.17283$et3.3...@newsfe17.iad:

 
 Let me
 be clear, given 2min, how many primes can you find, they need not be
in
 order or consecutive.
 
 Do they have to go from low to high?   :( )

1) google list of prime numbers
2) see Prime numbers list in the results (number 3 in the results) 
3) click link that leads to www.prime-numbers.org

I found 455042511 prime numbers in approx 15 seconds.

Is that what you wanted?

-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) fisheggs (stop) name
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: hello! I am a spammer

2007-10-02 Thread Nigel Rowe
On Wed, 3 Oct 2007 11:17, panguohua wrote in comp.lang.python 
 more information for making money with your blog
snip /

Wow! Truth in advertising!

-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) fisheggs (stop) name
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python with

2007-09-17 Thread Nigel Rowe
On Tue, 18 Sep 2007 00:26, Grant Edwards wrote in comp.lang.python
[EMAIL PROTECTED]:

 On 2007-09-17, Laurent Pointal [EMAIL PROTECTED] wrote:
 
 Note3: Its funny to see how Python users tries to change the
language, 
 does this occure with C, C++, Java, C# ?
 
 Yes.  I remember somebody I worked with once who write a C
 program using a whole pile of macros to make it look like BASIC:
 
 #define IF  if (
 #define THEN ) {
 #define ELSE } else {
 #define ENDIF }
 
 and so on...
 

and latin speaking perl programmers use Lingua::Romana::Perligata
http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata.html

Totaly insane.  Oh, wait, they're perl programmers.

-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) fisheggs (stop) name
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Do other Python GUI toolkits require this?

2007-04-19 Thread Nigel Rowe
On Thu, 19 Apr 2007 19:11, Antoon Pardon wrote in comp.lang.python:
 On 2007-04-19, Michael Bentley [EMAIL PROTECTED] wrote:

snip type=various irrelevances to my comment below /

 The learning curve is rather steep IMO, but worth it.
 
 Just a throw in remark, that  you may ignore if you wish, but a steep
 learning curve means that the subject is easily familiarized and that
 the learning period is short.
 
 You seem to use it as if it is the opposite.
 

Who says the axes are labeled familiarity and learning period?   I
just assume they are labeled (y-axis) Effort and (x-axis) Knowledge
(or skill or ).  

Which means that something with a 'steep learning curve' requires a lot
of effort to achieve a small amount of knowledge (or skill or ...).

-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wx Browser-objekt for python on Linux

2006-07-08 Thread Nigel Rowe
spooky wrote:

 Hey,
 
 Try looking at the wx.HtmlWindow demo
 
 Thank you...I know wx.HtmlWindow but that object can not parse
 Javascript code :((
 
 I need a cross-platform object that can parse js-scripts :(
 
 Can someone help me??
 
 Bye,
 
 Spooky

http://wxmozilla.sourceforge.net/ exists to embed mozilla in wxwindows,
but I have no idea how well it does it, nor its current status.


-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Calling python functions from C

2006-05-12 Thread Nigel Rowe
[EMAIL PROTECTED] wrote:

 I am a newbie to Python. I want to call python functions from C. I
 looked for examples but I couldn't get any simple one. Lets say my
 python code is :
 def add(a,b)
  return (a+b)
 
 I want to call add from C. Could anybody please help me? Thanks in
 advance.
 
 R.

You might look at elmer http://elmer.sourceforge.net/

Quote:
What is elmer?
Elmer is a tool which embeds a Python module into a C, C++, or Tcl   
application. The embedded Python module is used just as if it was 
written in the same language as the application itself, without 
requiring any knowledge of the Python/C API. 

Elmer generates glue code that embeds an interpreter for one type of 
language into an extension for another. Elmer allows function calls and  
various data types, both native and custom, to pass transparently
between the two languages. 
 

-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Xah's Edu Corner: Criticism vs Constructive Criticism

2006-04-26 Thread Nigel Rowe
Ari Johnson wrote:

 Xah Lee [EMAIL PROTECTED] writes:

snip/


Xah
[EMAIL PROTECTED]
  ? http://xahlee.org/
 
 (This isn't constructive criticism, but just a question:) Are you the
 sum of your web page?

Yes he is, the total value is zero.

-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: define loop statement?

2006-02-18 Thread Nigel Rowe
Felipe Almeida Lessa wrote:

 Em Sáb, 2006-02-18 às 20:04 +, Jeffrey Schwab escreveu:
 if __name__ == '__main__':
 loop = Loop(10)
 while loop:
 print OK
 
 Maybe:
 
 while Loop(10)():
 print OK
 
 Looks rather ugly but requires one less line ;-).
 
Doesn't work.  You get a NEW Loop(10) instance on each pass through the
'while'.  This is just an expensive way to make an endless loop.

-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Straight line detection

2005-10-14 Thread Nigel Rowe
Tim Roberts wrote:

 PyPK [EMAIL PROTECTED] wrote:

Does anyone know of a simple implementation of a straight line
detection algorithm something like hough or anything simpler.So
something like if we have a 2D arary of pixel elements representing a
particular Image. How can we identify lines in this Image.
for example:

ary =
[[1,1,1,1,1],
 [1,1,0,0,0],
 [1,0,1,0,0],
 [1,0,0,1,0],
 [1,0,0,0,1]]
So if 'ary' represents pxl of an image which has a horizontal line(row
0),a vertical line(col 0) and a diagonal line(diagonal of ary). then
basically I want identify any horizontal or vertical or diagonal line
anywhere in the pxl array.
 
 If all you want is horizontal, vertical, or 45 degree diagonal, it's
 pretty easy to do that just be checking all of the possibilities.
 
 But what if your array is:
 
  [[1,1,1,1,1],
   [1,1,1,1,1],
   [1,1,1,1,1],
   [1,1,1,1,1],
   [1,1,1,1,1]]
 
 Would you say there were 12 lines there?

Actually I'd say 24.

5 vertical, 
5 horizontal, 
7 diagonal downward to the right (lengths 2,3,4,5,4,3,2)
7 diagonal downward to the left (lengths 2,3,4,5,4,3,2)

-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python based unacceptable language filter

2005-10-02 Thread Nigel Rowe
David Pratt wrote:

 Hi.  Is anyone aware of any python based unacceptable language filter
 code to scan and detect bad language in text from uploads etc.
 
 Many thanks.
 David

You might be able to adapt languagetool. 
http://www.danielnaber.de/languagetool/features.html

Later versions have been ported to Java, but the old python version of
languagetool is at http://tkltrans.sourceforge.net/#r03

His thesis paper is at
http://www.danielnaber.de/languagetool/download/style_and_grammar_checker.pdf

Mind you, given the poor language skills of many native english speakers
(not to mention those for whom english is a second language) relying on
automated filters to enforce 'good' language seems a trifle extreme.  This
post for example would probably not pass.

Cheers,
Nigel

PS. For the humour impaired, this g*d d*mm post was a f*cking joke, OK! :-)

Mind you, the links are real.

-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Database of non standard library modules...

2005-08-19 Thread Nigel Rowe
Steve Holden wrote:

 Robert Kern wrote:
 Jon Hewer wrote:
 
Is there an online database of non standard library modules for Python?
 
 
 http://cheeseshop.python.org/pypi
 
 While cheeseshop might resonate with the Monty Python fans I have to say
 I think the name sucks in terms of explaining what to expect. If I ask
 someone where I can find a piece of code and the direct me to the cheese
 shop, I might look for another language.
 
 regards
   Steve

To be fair, it's really the Python Package Index, it just happens to be
stored on a machine called cheeseshop.


-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Thaughts from an (almost) Lurker.

2005-07-31 Thread Nigel Rowe
Benji York wrote:

 Paddy wrote:
 Sometimes when reading c.l.p.  I mentally stand off from what I have
 been reading and get an odd feeling that 'WE ARE BEING TESTED'. That
 someone else is purposefully posting a near repetitive post, or obvious
 flame bait etc - not for the usual reasons, but to track the dynamics
 af the replies.
 
 Never attribute to malice that which can be adequately explained by
 stupidity.
 --
 Benji York

And its corollary, sufficiently advanced cluelessness 
is indistinguishable from malice.

-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: unittest vs py.test?

2005-03-31 Thread Nigel Rowe
Roy Smith wrote:

 I've used the standard unittest (pyunit) module on a few projects in the
 past and have always thought it basicly worked fine but was just a little
 too complicated for what it did.
 
 I'm starting a new project now and I'm thinking of trying py.test
 (http://codespeak.net/py/current/doc/test.html).  It looks pretty cool
 from
 the docs.  Is there anybody out there who has used both packages and can
 give a comparative review?

Have you seen Grig Gheorghiu's 3 part comparison of unittest, and py.test?

http://agiletesting.blogspot.com/2005/01/python-unit-testing-part-1-unittest.html
http://agiletesting.blogspot.com/2005/01/python-unit-testing-part-2-doctest.html
http://agiletesting.blogspot.com/2005/01/python-unit-testing-part-3-pytest-tool.html

-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Persistent objects

2004-12-12 Thread Nigel Rowe
Paul Rubin wrote:

 I've had this recurring half-baked desire for long enough that I
 thought I'd post about it, even though I don't have any concrete
 proposals and the whole idea is fraught with hazards.
 
 Basically I wish there was a way to have persistent in-memory objects
 in a Python app, maybe a multi-process one.
snip

Maybe POSH (http://poshmodule.sourceforge.net/) is what you want.

From the About POSH

Python Object Sharing, or POSH for short, is an extension module to Python
that allows objects to be placed in shared memory. Objects in shared memory
can be accessed transparently, and most types of objects, including
instances of user-defined classes, can be shared. POSH allows concurrent
processes to communicate simply by assigning objects to shared container
objects.

-- 
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
-- 
http://mail.python.org/mailman/listinfo/python-list