Tim Wintle wrote:
> [..] under the hood, cpython does something like this (in psudo-code)
>
> itterator = xrange(imax)
> while 1:
> next_attribute = itterator.next
> try:
> i = next_attribute()
> except:
> break
> a = a + 10
There is one thing that strikes me here: The code claims
In message , Astan Chee
wrote:
> What I'm trying to do (and wondering if its possible) is to make sure
> that any children (and any descendants) of this process is killed when
> the main java process is killed (or dies).
> How do I do this in windows, linux and OSX?
A linux-specific solution cou
In message <4c801218$0$1622$742ec...@news.sonic.net>, John Nagle wrote:
> The problem is that I want errorlog to commit its message to
> the table used for error logging, but don't want to commit
> whatever the caller was doing - that may well revert.
Any particular reason you’re using a database
can you pls help me to make a database program in python? It is a Quiz system
which is database driven. The program has a choices which add question, edit,
delete, list, take a quiz, quiz results, and exit. in take a quiz
choice,questions should be randomly displayed and the result and name of t
can you pls help me to make a database program in python? It is a Quiz system
which is database driven. The program has a choices which add question, edit,
delete, list, take a quiz, quiz results, and exit. in take a quiz
choice,questions should be randomly displayed and the result and name of t
Terry Reedy writes:
> On 9/1/2010 8:11 PM, John Bokma wrote:
[...]
Uhm, O(1) /is/ constant time, see page 45 of Introduction to Algorithms,
2nd edition.
>
> Given that the Wikipedia article references that section also, I
> wonder if it really disagrees with the definition above.
In si
On Sep 2, 2:19 pm, John Nagle wrote:
> On 9/2/2010 1:29 AM, sarvi wrote:
>
> > When I think about it these restrictions below seem a very reasonable
> > tradeoff for performance.
>
> Yes.
>
> > And I can use this for just the modules/sections that are performance
> > critical.
>
> Not quit
I would expect MySQLdb to rollback on a control-C, but it doesn't
seem to have done so. I have a program which does a thousand or
so INSERT operations in one transaction on an InnoDB table.
I kill it with a control-C on Windows, and it aborts. But
it looks like some of the INSERT operatio
In message , MRAB
wrote:
> On 02/09/2010 08:49, Lawrence D'Oliveiro wrote:
>> In message, MRAB
>> wrote:
>>
>>> You should open the files in binary mode, not text mode, ie file(path,
>>> "rb"). Text mode is the default. Not a problem on *nix because the line
>>> ending is newline.
>>
>> We used t
On Sep 2, 4:25 pm, Chris Rebert wrote:
> On Thu, Sep 2, 2010 at 4:19 PM, cerr wrote:
> > On Sep 1, 5:04 pm, Chris Rebert wrote:
> >> On Wed, Sep 1, 2010 at 8:58 AM, cerr wrote:
> >> > Hi There,
>
> >> > I would like to create an scp handle and download a file from a
> >> > client. I have follow
I've tried to see the page and the code GSPC it's wrong i has used ^DJI,
and when you download the page code use a xml parser localize the table
element and read it. I can't access from the browser to the next page it
doesn't appear as a link.
El , Virgil Stokes escribió:
On 09/02/2010 08:
On 03/09/2010 00:56, Virgil Stokes wrote:
On 09/02/2010 08:15 PM, Hidura wrote:
But what kind of data you want to download?, because the financial
time it's basicly html code and you can work very well with a parser
2010/9/2, Virgil Stokes:
Has anyone written code or worked with Python softwar
On 3/09/2010 1:22 AM, Ian Hobson wrote:
Hi All,
I am attempting to create a Windows Service in Python.
I have the framework (from Mark Hammond and Andy Robinason's book)
running - see below. It starts fine - but it will not stop. :(
net stop "Python Service"
and using the services GUI both le
On 09/02/2010 08:15 PM, Hidura wrote:
But what kind of data you want to download?, because the financial
time it's basicly html code and you can work very well with a parser
2010/9/2, Virgil Stokes:
Has anyone written code or worked with Python software for downloading
financial time ser
On Thu, Sep 2, 2010 at 4:19 PM, cerr wrote:
> On Sep 1, 5:04 pm, Chris Rebert wrote:
>> On Wed, Sep 1, 2010 at 8:58 AM, cerr wrote:
>> > Hi There,
>>
>> > I would like to create an scp handle and download a file from a
>> > client. I have following code:
>>
>> > but what i'm getting is this and
Yes, you are right of course. But it is not really a contest. And if
you could improve algorithm or implementation on "your Python version
running under your OS on your hardware" it may as well improve
performance for other people under other OS's.
On Sep 2, 3:14 pm, Terry Reedy wrote:
> On 9/1/
On Sep 1, 5:04 pm, Chris Rebert wrote:
> On Wed, Sep 1, 2010 at 8:58 AM, cerr wrote:
> > Hi There,
>
> > I would like to create an scp handle and download a file from a
> > client. I have following code:
>
> > but what i'm getting is this and no file is downloaded...:
> > /opt/lampp/cgi-bin/atta
John Nagle writes:
> I have a system which does error logging to its database:
>
> db = MySQLdb.connect(...) # get database connection
> ...
> errorlog(db, "Message")
>
> The problem is that I want errorlog to commit its message to
> the table used for error logging, but don't
On Aug 29, 7:18 pm, Alain Ketterlin
wrote:
> In general, if you have a program that produces something just to
> remove/ignore it five lines later, you have a problem. In your case:
>
> 1) are you sure you need to append to list(*) at every iteration? When
> do you *really* need to? And...
>
> 2)
On Thu, Sep 2, 2010 at 12:58 PM, Aahz wrote:
> In article ,
> Astan Chee wrote:
>>Chris Rebert wrote:
>>>
>>> import os
>>> import psutil # http://code.google.com/p/psutil/
>>>
>>> # your piece of code goes here
>>>
>>> myself = os.getpid()
>>> for proc in psutil.process_iter():
>>
>>Is there a
On 9/2/2010 8:55 AM, Tim Wintle wrote:
On Thu, 2010-09-02 at 12:02 +0200, Michael Kreim wrote:
Hi,
I was comparing the speed of a simple loop program between Matlab and
Python.
Unfortunately my Python Code was much slower and I do not understand why.
The main reason is that, under the hood
On 02/09/2010 23:01, Nally Kaunda-Bukenya wrote:
Dear all, kindly help me with this code;
This script is supposed to calculate Rvi for each row by first summing
the product of #fields (Ai*Rv) and dividing by another field (Tot) such
that Rvi=sum(Ai*Rv)/Tot. First it's acting like I need another
p
On 9/1/2010 9:08 PM, Dmitry Chichkov wrote:
Given: a large list (10,000,000) of floating point numbers;
Task: fastest python code that finds k (small, e.g. 10) smallest
items, preferably with item indexes;
Limitations: in python, using only standard libraries (numpy& scipy
is Ok);
I've tried se
On 02/09/2010 21:37, Baba wrote:
level: beginner
exercise source:
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/assignments/pset4.pdf
Problem 4
Can my code be optimised?
I think my approach is correct but
Dear all, kindly help me with this code;
This script is supposed to calculate Rvi for each row by first summing the
product of #fields (Ai*Rv) and dividing by another field (Tot) such that
Rvi=sum(Ai*Rv)/Tot. First it's acting like I need another parenthesis and it
doesn't seem to work at all
On 9/1/2010 8:11 PM, John Bokma wrote:
Terry Reedy writes:
On 9/1/2010 5:40 PM, John Bokma wrote:
[..]
Yes, I switched, because 'constant time' is a comprehensible claim
that can be refuted and because that is how some will interpret O(1)
(see below for proof;-).
You make it now sound as
On 9/2/2010 1:29 AM, sarvi wrote:
When I think about it these restrictions below seem a very reasonable
tradeoff for performance.
Yes.
And I can use this for just the modules/sections that are performance
critical.
Not quite. Neither Shed Skin nor RPython let you call from
restricted
I have a system which does error logging to its database:
db = MySQLdb.connect(...) # get database connection
...
errorlog(db, "Message")
The problem is that I want errorlog to commit its message to
the table used for error logging, but don't want to commit
whatever the
On 9/1/2010 10:57 PM, ru...@yahoo.com wrote:
So while you may "think" most people rarely read
the docs for basic language features and objects
(I presume you don't mean to restrict your statement
to only sets), I and most people I know *do* read
them. And when read them I expect them, as any go
level: beginner
exercise source:
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/assignments/pset4.pdf
Problem 4
Can my code be optimised?
I think my approach is correct but i am hesitant about the initial max
On Sep 2, 5:55 am, Tim Wintle wrote:
> On Thu, 2010-09-02 at 12:02 +0200, Michael Kreim wrote:
> > Hi,
>
> > I was comparing the speed of a simple loop program between Matlab and
> > Python.
> > Unfortunately my Python Code was much slower and I do not understand why.
>
> The main reason is that,
In article ,
Astan Chee wrote:
>Chris Rebert wrote:
>>
>> import os
>> import psutil # http://code.google.com/p/psutil/
>>
>> # your piece of code goes here
>>
>> myself = os.getpid()
>> for proc in psutil.process_iter():
>
>Is there a way to do this without psutil or installing any external
On Sep 2, 2:38 pm, Ian wrote:
> On 02/09/2010 20:06, Edward Kozlowski wrote:
>
>
>
> > On Sep 2, 10:22 am, Ian Hobson wrote:
> >> Hi All,
>
> >> I am attempting to create a Windows Service in Python.
>
> >> I have the framework (from Mark Hammond and Andy Robinason's book)
> >> running - see be
On 02/09/2010 20:06, Edward Kozlowski wrote:
On Sep 2, 10:22 am, Ian Hobson wrote:
Hi All,
I am attempting to create a Windows Service in Python.
I have the framework (from Mark Hammond and Andy Robinason's book)
running - see below. It starts fine - but it will not stop. :(
net stop "Pytho
On Thursday 02 September 2010, it occurred to ipatrol6...@yahoo.com to
exclaim:
> Correct in that regard. In Python 3.x, strings are by default considered
> UTF-8. Wheras ASCII isn't a problem because it's fixed-width, UTF-8 will
> give you a different character depending on the last byte value. T
Philip Bloom wrote:
> Uh.
> Try:
> Imax=10
> a=0
> i=0
> While(i a= a+10
> i=i+1
> print a
> I suspect you will find it is way faster than using range or xrange for
> large numbers and map far more closely in the final result to what you
> are doing on matlab's side. At
On Sep 2, 10:22 am, Ian Hobson wrote:
> Hi All,
>
> I am attempting to create a Windows Service in Python.
>
> I have the framework (from Mark Hammond and Andy Robinason's book)
> running - see below. It starts fine - but it will not stop. :(
>
> net stop "Python Service"
>
> and using the service
On 02/09/2010 19:34, Victor Subervi wrote:
for some reason running the command through python *omits* this one
data!! The only difference is that a flag in spreadsheets (Temp) is
set to 1. Why on earth doesn't it work in python??
Some ideas to follow up. (These are only guesses).
1) One of t
On Wed, Sep 1, 2010 at 9:26 AM, Shashwat Anand wrote:
>
>
> On Wed, Sep 1, 2010 at 6:45 PM, Matt Saxton wrote:
>
>> On Wed, 1 Sep 2010 09:00:03 -0400
>> Victor Subervi wrote:
>>
>> > Hi;
>> > I have this code:
>> >
>> > cursor.execute('describe products;')
>> > cols = [item[0] for item in cu
On 02/09/2010 18:03, David wrote:
Il Thu, 02 Sep 2010 16:22:04 +0100, Ian Hobson ha scritto:
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
You may try to give a WaitHint parameter to ReportServiceStatus call,
otherwise the Service Manager will expect the service is stopped istan
Hi;
I have this code:
print 'select * from spreadsheets s join products p on p.Item=s.Item
join productsCategories pc on p.ID=pc.ProductsID join categories c on
pc.CategoryID=c.ID where s.Client="%s" order by c.Category, c.Parent' %
(client,)
cursor.execute('select * from spreadsheets s jo
Correct in that regard. In Python 3.x, strings are by default considered UTF-8.
Wheras ASCII isn't a problem because it's fixed-width, UTF-8 will give you a
different character depending on the last byte value. Therefore handling any
kind of data that is not UTF-8 will need you to open it with '
But what kind of data you want to download?, because the financial
time it's basicly html code and you can work very well with a parser
2010/9/2, Virgil Stokes :
> Has anyone written code or worked with Python software for downloading
> financial time series data (e.g. from Yahoo financial)? If
Well for one, if you're writing with pywin32, you certainly don't need the
shbang line. #! /usr/bin/env is purely a POSIX thing.
--
http://mail.python.org/mailman/listinfo/python-list
Uh.
Try:
Imax=10
a=0
i=0
While(imailto:python-list-bounces+pbloom=crystald@python.org] On Behalf Of
Nobody
Sent: Thursday, September 02, 2010 9:05 AM
To: python-list@python.org
Subject: Re: Speed-up for loops
On Thu, 02 Sep 2010 12:02:40 +0200, Michael Kreim wrote:
> I was comparin
Has anyone written code or worked with Python software for downloading
financial time series data (e.g. from Yahoo financial)? If yes, would you
please contact me.
--Thanks,
V. Stokes
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 02 Sep 2010 19:02:35 +0200
Peter Otten <__pete...@web.de> wrote:
> You could try to monkey-patch pydoc:
I suppose so. Not a comfortable solution of course. It's bad enough
when you get too familiar with the internals of a module but even worse
when you need to get familiar with the inter
On Thu, 2010-09-02 at 16:13 +0200, Roland Koebler wrote:
> Hi,
>
> > Are there any ways to speed up the for/xrange loop?
> You can use psyco.
Assuming you've got a 32-bit machine.
--
http://mail.python.org/mailman/listinfo/python-list
D'Arcy J.M. Cain wrote:
> I have a small problem with the cgitb module. I know that I can
> basically write my own version but it seems kind of silly to rewrite
> something that does 99% what I want. Here is an excerpt from the
> output of an exception.
>
> 1520 (current_job['j
Il Thu, 02 Sep 2010 16:22:04 +0100, Ian Hobson ha scritto:
> self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
You may try to give a WaitHint parameter to ReportServiceStatus call,
otherwise the Service Manager will expect the service is stopped istantly.
self.ReportServiceStatus(win32
On 02/09/2010 08:49, Lawrence D'Oliveiro wrote:
In message, MRAB
wrote:
You should open the files in binary mode, not text mode, ie file(path,
"rb"). Text mode is the default. Not a problem on *nix because the line
ending is newline.
We used to pride ourselves on not having to worry about tex
On Thu, 02 Sep 2010 12:02:40 +0200, Michael Kreim wrote:
> I was comparing the speed of a simple loop program between Matlab and
> Python.
> imax = 10
> a = 0
> for i in xrange(imax):
> a = a + 10
> print a
> Are there any ways to speed up the for/xrange loop?
Sure; the above can
I have a small problem with the cgitb module. I know that I can
basically write my own version but it seems kind of silly to rewrite
something that does 99% what I want. Here is an excerpt from the
output of an exception.
1520 (current_job['job_id'], job['_SELECT_']))
1521
15
On Wed, 01 Sep 2010 23:57:21 -0700, swapnil wrote:
> I could not find any documentation for variables os.path.sep and
> os.path.altsep. Although the first is pretty straightforward can
> anyone explain the purpose of the second variable? Is it even useful?
The purpose is so that you can do e.g.:
On Thu, 02 Sep 2010 13:12:07 +1000, Astan Chee wrote:
> I have a piece of code that looks like this:
>
> import subprocess
> retcode = subprocess.call(["java","test","string"])
> print "Exited with retcode " + str(retcode)
>
> What I'm trying to do (and wondering if its possible) is to make sure
wheres pythonmonks wrote:
This should be trivial:
I am looking to extract the first non-None element in a list, and
"None" otherwise. Here's one implementation:
x = reduce(lambda x,y: x or y, [None,None,1,None,2,None], None)
print x
1
I thought maybe a generator expression would be better,
Hi All,
I am attempting to create a Windows Service in Python.
I have the framework (from Mark Hammond and Andy Robinason's book)
running - see below. It starts fine - but it will not stop. :(
net stop "Python Service"
and using the services GUI both leave the services showing it as "stoppin
On Sep 2, 2:48 pm, wheres pythonmonks
wrote:
> This should be trivial:
>
> I am looking to extract the first non-None element in a list, and
> "None" otherwise. Here's one implementation:
>
> >>> x = reduce(lambda x,y: x or y, [None,None,1,None,2,None], None)
> >>> print x
>
> 1
>
> I thought may
On Sep 2, 1:45 pm, Neal Becker wrote:
> I'm interested in using argparse to parse a string formatted as:
>
> my_prog --option1=1,10,37
>
> That is, a list of comma delimited values. I guess nargs almost does it,
> but expects options to be space-delimited.
>
> What would be the easiest approach?
Hi,
> Are there any ways to speed up the for/xrange loop?
You can use psyco.
The following example should be about 4-times as fast as your example:
import psyco
psyco.full()
def f():
imax = 10
a = 0
for i in xrange(imax):
a += 10
print a
f()
regards,
Ro
Peter wrote:
>> But this can be expensive memory wise. Is there a way to concatenate
>> generator expressions?
>
> itertools.chain()
>
Aha!
import itertools
>>> x = itertools.chain( (x for x in [None,None] if x is not None), [ None ]
>>> ).next()
>>> print x
None
>>> x = itertools.chain( (x fo
Michael Kreim writes:
> Are there any ways to speed up the for/xrange loop?
> Or do I have to live with the fact that Matlab beats Python in this
> example?
To a point, yes. However, there are things you can do to make your
Python code go faster. One has been pointed out by Peter.
Another is
wheres pythonmonks wrote:
> I am looking to extract the first non-None element in a list, and
> "None" otherwise. Here's one implementation:
>
x = reduce(lambda x,y: x or y, [None,None,1,None,2,None], None)
print x
> 1
>
> I thought maybe a generator expression would be better, to pre
This should be trivial:
I am looking to extract the first non-None element in a list, and
"None" otherwise. Here's one implementation:
>>> x = reduce(lambda x,y: x or y, [None,None,1,None,2,None], None)
>>> print x
1
I thought maybe a generator expression would be better, to prevent
iterating
Tim Wintle, 02.09.2010 14:55:
If you really need to optimise it then you can convert that module to
cython by adding a cdef, and then compile it:
cdef int i
for i in xrange(imax):
a = a + 10
print a
or you can write it in C it'll run a lot faster.
Just to get the context right here: a C
I'm trying to get a qt program a little faster by looking at the most
expensive functions.
To find out which functions are most important I wanted to profile the
application using cProfile module.
Unfortunately this runs through the complete code in 1 go without
waiting until all threads (or in w
On Thu, 2010-09-02 at 12:02 +0200, Michael Kreim wrote:
> Hi,
>
> I was comparing the speed of a simple loop program between Matlab and
> Python.
> Unfortunately my Python Code was much slower and I do not understand why.
The main reason is that, under the hood, cpython does something like
this
On Sep 2, 12:46 am, Tim Arnold wrote:
> Hi,
> I have a set of strings that are *basically* comma separated, but with
> the exception that if a comma occur insides curly braces it is not a
> delimiter. Here's an example:
>
> [code=one, caption={My Analysis for \textbf{t}, Version 1}, continued]
>
On Sep 2, 12:46 am, Tim Arnold wrote:
> Hi,
> I have a set of strings that are *basically* comma separated, but with
> the exception that if a comma occur insides curly braces it is not a
> delimiter. Here's an example:
>
> [code=one, caption={My Analysis for \textbf{t}, Version 1}, continued]
>
Neal Becker wrote:
> Peter Otten wrote:
>
> import argparse
> def csv(value):
>> ... return map(int, value.split(","))
>> ...
> p = argparse.ArgumentParser()
> p.add_argument("--option1", type=csv) and None
> p.parse_args(["--option1=1,10,37"])
>
> Thanks! But, why the '
Hello everyone,
Before I pose my question, I should mention that I'm still pretty unfamiliar
with proper terminology for string encoding, so I might get some of it
wrong. Please bear with me.
I'm writing a program that accepts arguments from the command line. Some of
my users are using Windows wi
Peter Otten wrote:
import argparse
def csv(value):
> ... return map(int, value.split(","))
> ...
p = argparse.ArgumentParser()
p.add_argument("--option1", type=csv) and None
p.parse_args(["--option1=1,10,37"])
Thanks! But, why the 'and None'?
--
http://mail.python.
Neal Becker wrote:
> I'm interested in using argparse to parse a string formatted as:
>
> my_prog --option1=1,10,37
>
> That is, a list of comma delimited values. I guess nargs almost does it,
> but expects options to be space-delimited.
>
> What would be the easiest approach?
>>> import argp
I'm interested in using argparse to parse a string formatted as:
my_prog --option1=1,10,37
That is, a list of comma delimited values. I guess nargs almost does it,
but expects options to be space-delimited.
What would be the easiest approach?
--
http://mail.python.org/mailman/listinfo/python
Michael Kreim wrote:
> Peter Otten wrote:
>> Move it into a function; this turns a and i into local variables.
>>
>> def f():
>> imax = 10
>> a = 0
>> for i in xrange(imax):
>> a = a + 10
>> print a
>> f()
>
> Wow. It is still slower than Matlab, but your suggesti
Peter Otten wrote:
Move it into a function; this turns a and i into local variables.
def f():
imax = 10
a = 0
for i in xrange(imax):
a = a + 10
print a
f()
Wow. It is still slower than Matlab, but your suggestion speeds up the
code by ca 50%.
But I do not under
It seems to work perfectly
thanks a lot
Bussiere
Google Fan boy
On Thu, Sep 2, 2010 at 7:32 AM, alex23 wrote:
> bussiere bussiere wrote:
>> it's just as it seems :
>> i want to know how does ti works to get back an object from a string in
>> python :
>> pickle.loads("""b'\x80\x03]q\x00(K\x00K
Michael Kreim wrote:
> I was comparing the speed of a simple loop program between Matlab and
> Python.
>
> My Codes:
> $ cat addition.py
> imax = 10
> a = 0
> for i in xrange(imax):
> a = a + 10
> print a
> Are there any ways to speed up the for/xrange loop?
Move it into a function
I GOT $5000 FROM PAYPAL BY SIMPLE HACK At http://happyandeasy.co.cc
Due to high security risks, i have hidden the PayPal Form link in an
image. in that website On RIGHT SIDE Below search box , click on
image and enter your PAYPAL id And Your name.
--
http://mail.python.org/mailman/listinfo/pyth
On Sep 2, 12:25 pm, Vlastimil Brom wrote:
> 2010/9/2 swapnil :> I could not find any documentation
> for variables os.path.sep and
> > os.path.altsep. Although the first is pretty straightforward can
> > anyone explain the purpose of the second variable? Is it even useful?
> > According to issueh
Hi,
I was comparing the speed of a simple loop program between Matlab and
Python.
My Codes:
$ cat addition.py
imax = 10
a = 0
for i in xrange(imax):
a = a + 10
print a
$ cat addition.m
imax = 1e9;
a = 0;
for i=0:imax-1
a = a + 10;
end
disp(a);
exit;
The results look like this
www.127760.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
By the way, improving n-ARG-smallest (that returns indexes as well as
values) is actually more desirable than just regular n-smallest:
== Result ==
1.38639092445 nargsmallest
3.1569879055 nargsmallest_numpy_argsort
1.29344892502 nargsmallest_numpy_argmin
Note that numpy array constructor eats aro
Uh. I'm sorry about the confusion. Last three items are just O(N)
baselines. Python min(), Numpy argmin(), Numpy asarray().
I'll update the code. Thanks!
> A lot of the following doesn't run or returns incorrect results.
> To give but one example:
>
> > def nargsmallest_numpy_argmin(iter, k):
> >
When I think about it these restrictions below seem a very reasonable
tradeoff for performance.
And I can use this for just the modules/sections that are performance
critical.
Essentially, the PyPy interpreter can have a restricted mode that
enforces these restriction.
This will help write such RP
Arnaud Delobelle wrote:
> I get:
>
> 1.46s for _heapq.nsmallest
> 0.85s for nsmallest_slott_bisect2 (version I posted)
>
> I am a bit surprised that mine is so slow compared with yours. I'll
> do more tests later!
Strange. I see a significant difference only for python3 (on 64bit Linux)
$ pyt
Dennis Lee Bieber writes:
>> GC's for large systems ... copy the live objects to a new contiguous heap
> That sounds suspiciously like the original Macintosh OS, with its
> "handles"... IE, double-indirection.
Nah, a double indirection on every access would be a terrible
performance hit.
On 9/1/10, lkcl wrote:
> i apologise for having to contact so many people but this is fairly
> urgent, and i'm running out of time and options. i'm a free software
> programmer, and i need some paid work - preferably python - fairly
> urgently, so that i can pay for food and keep paying rent, an
Hi John,
On 2010-08-11 20:24, John Nagle wrote:
>Perl has a function which will take a remote directory page, in
> the form that most web sites return for a file directory, and
> parse it into a useful form:
>
> http://www.xav.com/perl/site/lib/File/Listing.html
>
> This is especially
On Thu, Sep 2, 2010 at 12:29 AM, Anand Sadasivam
wrote:
> Hi All,
>
> Is python is the safest language is my question. I feel its good language,
> but however java has good occupancy. About four years back I did few python
> programs and worked with some of add-on product over ZOPE and Plone.
The
In message , MRAB
wrote:
> You should open the files in binary mode, not text mode, ie file(path,
> "rb"). Text mode is the default. Not a problem on *nix because the line
> ending is newline.
We used to pride ourselves on not having to worry about text versus binary
I/O modes on *nix, but I’m
On Sep 2, 7:59 am, Peter Otten <__pete...@web.de> wrote:
> Dmitry Chichkov wrote:
> > Given: a large list (10,000,000) of floating point numbers;
> > Task: fastest python code that finds k (small, e.g. 10) smallest
> > items, preferably with item indexes;
> > Limitations: in python, using only stan
Dear Peter, that did wonders!! thanks so much for the code fix; I will check
back with you later for the meaning of some functions you used.
Many thanks to all those good people who gave me pointers: Rami, Mathew, Bob,
Best wishes for now:)
From: "python-list
Hi All,
Is python is the safest language is my question. I feel its good language,
but however java has good occupancy. About four years back I did few python
programs and worked with some of add-on product over ZOPE and Plone.
The suggestion to me is mostly welcome.
Regards,
--
Anand.S
anand.s
2010/9/2 swapnil :
> I could not find any documentation for variables os.path.sep and
> os.path.altsep. Although the first is pretty straightforward can
> anyone explain the purpose of the second variable? Is it even useful?
> According to issue http://bugs.python.org/issue709428, os.path.altsep
>
Dmitry Chichkov wrote:
> Code:
A lot of the following doesn't run or returns incorrect results.
To give but one example:
> def nargsmallest_numpy_argmin(iter, k):
> distances = N.asarray(iter)
> mins = []
Could you please provide an up-to-date version?
Peter
PS: for an easy way to en
Dmitry Chichkov wrote:
> Given: a large list (10,000,000) of floating point numbers;
> Task: fastest python code that finds k (small, e.g. 10) smallest
> items, preferably with item indexes;
> Limitations: in python, using only standard libraries (numpy & scipy
> is Ok);
>
> I've tried several me
I could not find any documentation for variables os.path.sep and
os.path.altsep. Although the first is pretty straightforward can
anyone explain the purpose of the second variable? Is it even useful?
According to issue http://bugs.python.org/issue709428, os.path.altsep
was 'None' till a long time a
98 matches
Mail list logo