First of all, you simply can't use this straight approach of primality
testing for very very big numbers. There are a number of algorithms, both
deterministic and random. Please Google for them (and don't forget to check
Wikipedia too). Study the random algorithms to check whether they can be
appli
Martin P. Hellwig, 08.03.2010 03:08:
I did read, two years or so ago, that AMD was looking in to something
that does just what you say on a cpu level, that is present itself as
one logical cpu but underneath there are multiple physical ones. I
wouldn't hold my breath though waiting for it.
Many
* Gabriel Genellina:
En Thu, 04 Mar 2010 20:52:04 -0300, Alf P. Steinbach
escribió:
Sorry, as with the places noted above, I can't understand what you're
trying to say here.
Regarding your posts, neither can I. All the time. Sorry, deciphering
your posts would force me to spend much more t
Thanks Geremy,
That has been an absolute bump... GOD i cant sit on my chair, it has
worked even on 512 bit number and with no time..
superb i would say.
lastly, i am using the code below to calculate Largest Prime factor of a number:
print
('''=
CHEN Guang, 08.03.2010 06:08:
Hi, if you are interested in C-Python mixed programming, please take a look at:
http://pythoidc.googlecode.com
PythoidC is the C language like the Python, by the Python and for the Python
It looks a bit dangerous to me to parse C header files only with regular
exp
On Mar 7, 5:46 pm, Steven D'Aprano wrote:
> Given that Counter supports negative counts, it looks to me that the
> behaviour of __add__ and __sub__ is fundamentally flawed. You should
> raise a bug report (feature enhancement) on the bug tracker.
It isn't a bug. I designed it that way.
There wer
Hi, if you are interested in C-Python mixed programming, please take a look at:
http://pythoidc.googlecode.com
PythoidC is the C language like the Python, by the Python and for the Python
import c
c.include(c.h.stdio)
c.include(c.h.stdlib)
'''Annotation is free!'''
int fib(int n):
if(n<=2
Income property is becoming more attractive to investors looking for a
better return on their money. With today's low interest rates, income-
producing properties such as apartments and duplexes can produce
exciting returns. As with any type of property, the value of income
property is what someone
On Mon, 08 Mar 2010 16:09:12 +1300, Gregory Ewing wrote:
> Given some known data/crc pairs, how feasible is it to figure out the
> polynomial being used to generate the crc?
Google is your friend:
http://www.woodmann.com/fravia/crctut1.htm
--
Steven
--
http://mail.python.org/mailman/listinf
On Mon, 08 Mar 2010 16:09:12 +1300, Gregory Ewing wrote:
> Given some known data/crc pairs, how feasible is it to figure out the
> polynomial being used to generate the crc?
Can you just ask the application developer what CRC is being used? Or
look at the source code? Disassemble the binary?
>
Ken,
Check out Zed Shaw's very cool Lamson project.
http://lamsonproject.org/
Malcolm
- Original message -
From: "Ken Seehart"
To: python-list@python.org
Date: Thu, 04 Mar 2010 21:33:26 -0800
Subject: IMAP mail filters tool
I'm thinking of possibly making a simple client-agnostic tool f
Pynguin is a python-based turtle graphics application.
It combines an editor, interactive interpreter, and
graphics display area.
It is meant to be an easy environment for introducing
some programming concepts to beginning programmers.
http://pynguin.googlecode.com/
This release c
Given some known data/crc pairs, how feasible is it to
figure out the polynomial being used to generate the crc?
In the case I'm looking at, it appears that the crc
size may be at least 24 bits, so just trying all possible
polynomials probably isn't doable.
An article I found hints at the possib
On 03/08/10 02:51, monkeys paw wrote:
On 3/7/2010 9:20 PM, Martin P. Hellwig wrote:
On 03/08/10 02:10, monkeys paw wrote:
I can xfer a file from a remote server using:
import urllib2 as u
x=u.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl')
for line in x:
print line
How can i write a
On 3/7/2010 9:20 PM, Martin P. Hellwig wrote:
On 03/08/10 02:10, monkeys paw wrote:
I can xfer a file from a remote server using:
import urllib2 as u
x=u.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl')
for line in x:
print line
How can i write a file to the remote server?
I tried:
x
I took a look at the 'this' module to see where the file is stored. This is
probably old news to some people, but was new to me.
print this.s
Gur Mra bs Clguba, ol Gvz Crgref
Ornhgvshy vf orggre guna htyl.
Rkcyvpvg vf orggre guna vzcyvpvg.
Fvzcyr vf orggre guna pbzcyrk.
Pbzcyrk vf orggre guna pbz
Is the best pratice way to detect internet connectivity under
Windows (using Python 2.6) simply to attempt to access a known
internet website using urllib or urlib2 wrapped in a try/except
construct?
Thank you,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
It would be highly appreciated if you could share this announcement
with your colleagues, students and individuals whose research is in
software engineering, software testing, software quality assurance,
software design and related areas.
Call for papers: SETP-10, USA, July 2010
The 2010 Internat
On 03/08/10 02:10, monkeys paw wrote:
I can xfer a file from a remote server using:
import urllib2 as u
x=u.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl')
for line in x:
print line
How can i write a file to the remote server?
I tried:
x = u.url.open('http://joemoney.net/somefile.txt
I can xfer a file from a remote server using:
import urllib2 as u
x=u.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl')
for line in x:
print line
How can i write a file to the remote server?
I tried:
x = u.url.open('http://joemoney.net/somefile.txt', 'w')
but that does not work
--
On 03/08/10 00:18, Paweł Banyś wrote:
Hello,
I have already read about Python and multiprocessing which allows using
many processors. The idea is to split a program into separate tasks and
run each of them on a separate processor. However I want to run a Python
program doing a single simple task
En Thu, 04 Mar 2010 20:52:04 -0300, Alf P. Steinbach
escribió:
Sorry, as with the places noted above, I can't understand what you're
trying to say here.
Regarding your posts, neither can I. All the time. Sorry, deciphering your
posts would force me to spend much more time than available
On Sun, 07 Mar 2010 22:21:27 +, Arnaud Delobelle wrote:
> Vlastimil Brom writes:
>
>> Hi all,
>> I'd like to ask about the possibility of negative "counts" in
>> collections.Counter (using Python 3.1); I believe, my usecase is rather
>> trivial, basically I have the word frequencies of two t
On Sun, 07 Mar 2010 09:33:22 +, Mark Lawrence wrote:
>> I was a little frightened of doing "import this" ("Hey, kid, run rm -
>> rf / and see what happens!"), but did, and the words are wise.
>>
>> Pete
>
> After reading the words of wisdom try "import this" a second time and
> watch what ha
On Mon, 08 Mar 2010 01:18:13 +0100, Paweł Banyś wrote:
> Hello,
>
> I have already read about Python and multiprocessing which allows using
> many processors. The idea is to split a program into separate tasks and
> run each of them on a separate processor. However I want to run a Python
> progra
Paweł Banyś wrote:
...
How can it be achieved?
Very carefully.
--
http://mail.python.org/mailman/listinfo/python-list
Am 08.03.10 01:18, schrieb Paweł Banyś:
Hello,
I have already read about Python and multiprocessing which allows using
many processors. The idea is to split a program into separate tasks and
run each of them on a separate processor. However I want to run a Python
program doing a single simple ta
Hello,
I have already read about Python and multiprocessing which allows using
many processors. The idea is to split a program into separate tasks and
run each of them on a separate processor. However I want to run a Python
program doing a single simple task on many processors so that their
cumula
I don't think there is any doubt about the value of relational
databases, particularly on the Internet. The issue in my mind is how
to leverage all the information that resides in the "deep web" using
strictly the relational database paradigm.
Because that paradigm imposes a tight and rigid coupli
Hi,
My computer OS is Win ME, and I am running a Py2.5 version. Gnuplot is
v4.2, Gnuplot_py is v1.8. However, whenever I give a command "python
test.py" to test Gnuplot_py, I sometimes get message "
#Gnuplot.for enjoyment
#press return to open a window
>..
>clear terminal
#t
any ideas?
--
http://mail.python.org/mailman/listinfo/python-list
Hi Cristian,
Christian Heimes wrote:
> News123 wrote:
>> Hi,
>>
>>
>> How can I kill my own process?
>>
>> Some multithreaded programs, that I have are unable to stop when ctrl-C
>> is pressed.
>> Some can't be stopped with sys.exit()
>
> You have to terminate the XMP-RPC server or the manager fi
News123 wrote:
> Hi,
>
>
> How can I kill my own process?
>
> Some multithreaded programs, that I have are unable to stop when ctrl-C
> is pressed.
> Some can't be stopped with sys.exit()
You have to terminate the XMP-RPC server or the manager first. Check the
docs!
You can terminate a Python
On 03/07/10 21:54, News123 wrote:
Hi Martin.
Hellwig wrote:
On 03/07/10 21:08, News123 wrote:
Hi,
How can I kill my own process?
Some multithreaded programs, that I have are unable to stop when ctrl-C
is pressed.
Some can't be stopped with sys.exit()
So I'd just like to terminate my own pro
Vlastimil Brom writes:
> Hi all,
> I'd like to ask about the possibility of negative "counts" in
> collections.Counter (using Python 3.1);
> I believe, my usecase is rather trivial, basically I have the word
> frequencies of two texts and I want do compare them (e.g. to see what
> was added and r
Hi Martin.
Hellwig wrote:
> On 03/07/10 21:08, News123 wrote:
>> Hi,
>>
>>
>> How can I kill my own process?
>>
>> Some multithreaded programs, that I have are unable to stop when ctrl-C
>> is pressed.
>> Some can't be stopped with sys.exit()
>>
>> So I'd just like to terminate my own program.
>>
>
My fix has certain problems:
News123 wrote:
> Hi,
>
>
> I have following program
>
> from multiprocessing.managers import BaseManager
> def myfunc(): return 3
> class MyManager(BaseManager): pass
> MyManager.register('myfunc',callable = myfunc)
> m = MyManager(address=('127.0.0.1', 5),authk
On 03/07/10 21:08, News123 wrote:
Hi,
How can I kill my own process?
Some multithreaded programs, that I have are unable to stop when ctrl-C
is pressed.
Some can't be stopped with sys.exit()
So I'd just like to terminate my own program.
Examples of non killable (not killable with CTRL-C) pr
Hi,
I have following program
from multiprocessing.managers import BaseManager
def myfunc(): return 3
class MyManager(BaseManager): pass
MyManager.register('myfunc',callable = myfunc)
m = MyManager(address=('127.0.0.1', 5),authkey='abracadabra')
server = m.get_server()
server.serve_forever(
Hi,
How can I kill my own process?
Some multithreaded programs, that I have are unable to stop when ctrl-C
is pressed.
Some can't be stopped with sys.exit()
So I'd just like to terminate my own program.
Examples of non killable (not killable with CTRL-C) programs:
- A program, that started an
Hi all,
I'd like to ask about the possibility of negative "counts" in
collections.Counter (using Python 3.1);
I believe, my usecase is rather trivial, basically I have the word
frequencies of two texts and I want do compare them (e.g. to see what
was added and removed between different versions of
Hello,
I'm writing a script that has to connect a bluetooth device
with a 3D application.
On my search for a bluetooth module i ran into this:
http://www.python.org/download/releases/2.4/notes/
where it says:
"The socket module now supports Bluetooth sockets,
if the system has "
Yet I can't find
On Sun, Mar 7, 2010 at 1:55 PM, Fahad Ahmad wrote:
> Dear All,
>
> i am writing my crytographic scheme in python, i am just a new user to it.
> I have written the complete code, the only point i am stuck it is that i am
> using 256 exponentiation which is normal in crytography but python just
> ha
vsoler wrote:
On 7 mar, 17:53, Steven D'Aprano wrote:
On Sun, 07 Mar 2010 08:23:13 -0800, vsoler wrote:
Hello,
My code snippet reads data from excel ranges. First row and first column
are column headers and row headers respectively. After reding the range
I build a dict.
'A'...
Dear All,
i am writing my crytographic scheme in python, i am just a new user to it.
I have written the complete code, the only point i am stuck it is that i am
using 256 exponentiation which is normal in crytography but python just hangs
on it.
g**x [where both g and x are 256 bit numbers ,
please clic it it will be usefull to you
http://123maza.com/78/healthyfitness/
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I need help. I am trying to follow examples from a book "Python
Scripting for Computational Science" and the examples are all plotted
using Gnuplot. When I run the programs I get error saying "importerror
Gnuplot module missing".
I have installed Gnuplot in C:\My Programs\gnuplot directory (ru
vsoler, 07.03.2010 16:05:
Hello,
My script starts like this:
book=readFromExcelRange('book')
house=readFromExcelRange('house')
table=readFromExcelRange('table')
read=readFromExcelRange('read')
...
But I would like to have something equivalent, like...
ranges=['book','house','table','read']
fo
On 7 mar, 17:53, Steven D'Aprano wrote:
> On Sun, 07 Mar 2010 08:23:13 -0800, vsoler wrote:
> > Hello,
>
> > My code snippet reads data from excel ranges. First row and first column
> > are column headers and row headers respectively. After reding the range
> > I build a dict.
>
> > ..
On Sun, 07 Mar 2010 08:23:13 -0800, vsoler wrote:
> Hello,
>
> My code snippet reads data from excel ranges. First row and first column
> are column headers and row headers respectively. After reding the range
> I build a dict.
>
> 'A'..'B'
> 'ab'3
vsoler wrote:
> Hello,
>
> My code snippet reads data from excel ranges. First row and first
> column are column headers and row headers respectively. After reding
> the range I build a dict.
>
> 'A'..'B'
> 'ab'35
> 'cd'7
On Sun, 07 Mar 2010 07:05:26 -0800, vsoler wrote:
> Hello,
>
> My script starts like this:
>
> book=readFromExcelRange('book')
> house=readFromExcelRange('house')
> table=readFromExcelRange('table')
> read=readFromExcelRange('read')
> ...
>
> But I would like to have something equivalent, like.
Hello,
My code snippet reads data from excel ranges. First row and first
column are column headers and row headers respectively. After reding
the range I build a dict.
'A'..'B'
'ab'35
'cd'72
'cd'9.
On 3/7/2010 10:59 AM, vsoler wrote:
Thank you for your help. Perhaps the solution you are suggesting is
not exactly what I was looking for, but helped anyway.
Oops, I was thinking list, not dict. Too fast, and not enough coffee!
-John
--
http://mail.python.org/mailman/listinfo/python-list
On 7 mar, 16:23, John Posner wrote:
> On 3/7/2010 10:05 AM, vsoler wrote:
>
>
>
> > Hello,
>
> > My script starts like this:
>
> > book=readFromExcelRange('book')
> > house=readFromExcelRange('house')
> > table=readFromExcelRange('table')
> > read=readFromExcelRange('read')
> > ...
>
> > But I wou
On 7 mar, 16:23, Andreas Waldenburger wrote:
> On Sun, 7 Mar 2010 07:05:26 -0800 (PST) vsoler
>
>
>
> wrote:
> > Hello,
>
> > My script starts like this:
>
> > book=readFromExcelRange('book')
> > house=readFromExcelRange('house')
> > table=readFromExcelRange('table')
> > read=readFromExcelRange('
On 3/7/2010 10:05 AM, vsoler wrote:
Hello,
My script starts like this:
book=readFromExcelRange('book')
house=readFromExcelRange('house')
table=readFromExcelRange('table')
read=readFromExcelRange('read')
...
But I would like to have something equivalent, like...
ranges=['book','house','table',
On Sun, 7 Mar 2010 07:05:26 -0800 (PST) vsoler
wrote:
> Hello,
>
> My script starts like this:
>
> book=readFromExcelRange('book')
> house=readFromExcelRange('house')
> table=readFromExcelRange('table')
> read=readFromExcelRange('read')
> ...
>
> But I would like to have something equivalent,
Alf and Steven Howe, please don't top post, it makes it all but
impossible to follow a thread. Darn!:)
Mark Lawrence.
Alf P. Steinbach wrote:
Since Mohamed is talking about compilation I think it's more likely he's
talking about an intermediate program represention based on quad tuples
like
Hello,
My script starts like this:
book=readFromExcelRange('book')
house=readFromExcelRange('house')
table=readFromExcelRange('table')
read=readFromExcelRange('read')
...
But I would like to have something equivalent, like...
ranges=['book','house','table','read']
for i in ranges:
var[i]=re
On 02:40 pm, ping.nsr@gmail.com wrote:
2010/3/7
On 06:53 am, ping.nsr@gmail.com wrote:
Hi,
I'm trying to find a way to create an asynchronous HTTP client so I
can get responses from web servers in a way like
async_http_open('http://example.com/', callback_func)
# immediately contin
mohamed issolah, 06.03.2010 14:07:
I want to create a compiler which transform a code like pascal code (that
what I do in C) to "quad"
In C, I use BISON and FLEX tools.
Hi,
please stop starting new threads for the same topic. Instead, reply to
responses you get.
Stefan
--
http://mail.pytho
2010/3/7
> On 06:53 am, ping.nsr@gmail.com wrote:
>
>> Hi,
>>
>> I'm trying to find a way to create an asynchronous HTTP client so I
>> can get responses from web servers in a way like
>>
>> async_http_open('http://example.com/', callback_func)
>> # immediately continues, and callback_func
On Mar 7, 4:32 am, Joan Miller wrote:
> I would to convert the first string to upper case. But this regular
> expression is not matching the first string between quotes.
>
Is using pyparsing overkill? Probably. But your time is valuable,
and pyparsing let's you knock this out in less time than i
Hi,
can anyone tell me how to return a time_struct from the timemodule in
my own C-Module?
Is that possible? I can just find one function in timefuncs.h, but it
doesnt return any PyObject.
Thanks in advance.
moerchendiser2k3
--
http://mail.python.org/mailman/listinfo/python-list
Joan Miller wrote:
I would to convert the first string to upper case. But this regular
expression is not matching the first string between quotes.
re.sub("'(?P\w+)': [^{]", "\gFOO", str)
Well, my first thought is that you're not using raw strings, so
you're not using the regexps and replace
On 03/07/2010 05:53 PM, Ping wrote:
> Hi,
>
> I'm trying to find a way to create an asynchronous HTTP client so I
> can get responses from web servers in a way like
>
> async_http_open('http://example.com/', callback_func)
> # immediately continues, and callback_func is called with response
>
On 06:53 am, ping.nsr@gmail.com wrote:
Hi,
I'm trying to find a way to create an asynchronous HTTP client so I
can get responses from web servers in a way like
async_http_open('http://example.com/', callback_func)
# immediately continues, and callback_func is called with response
as arg w
Joan Miller wrote:
> I would to convert the first string to upper case. But this regular
> expression is not matching the first string between quotes.
>
> re.sub("'(?P\w+)': [^{]", "\gFOO", str)
>
> # string to non-matching
> 'foo': {
>
> # strings to matching
> 'bar': 'bar2'
> 'bar': None
> '
Hi Joan,
Joan Miller wrote:
> I would to convert the first string to upper case. But this regular
> expression is not matching the first string between quotes.
>
> re.sub("'(?P\w+)': [^{]", "\gFOO", str)
>
> # string to non-matching
> 'foo': {
>
> # strings to matching
> 'bar': 'bar2'
> 'ba
Vinay Sajip wrote:
[...]
> Well, the logging package is available in Python and ready for use and
> pretty much battle tested, so why not use that? Are you planning to
> use third-party libraries in your Python work, or write everything
> yourself? If you are planning to use third party libraries,
I would to convert the first string to upper case. But this regular
expression is not matching the first string between quotes.
re.sub("'(?P\w+)': [^{]", "\gFOO", str)
# string to non-matching
'foo': {
# strings to matching
'bar': 'bar2'
'bar': None
'bar': 0
'bar': True
So, i.e., from the fir
Pete Emerson wrote:
On Mar 5, 6:10 pm, Andreas Waldenburger
wrote:
On Fri, 5 Mar 2010 17:22:14 -0800 (PST) Pete Emerson
wrote:
[snip]
data['one'] = {}
data['one']['two'] = 'three'
print data
{'one': {'two': 'three'}}
And through some research, I discovered collections.defaultdict (new
73 matches
Mail list logo