First  |  Prev |  Next  |  Last
Pages: 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
ctypes: delay conversion from c_char_p to string
On Apr 21, 2010, at 6:29 PM, Brendan Miller wrote: Here's the method I was using. Note that tmp_char_ptr is of type c_void_p. This should avoid the memory leak, assuming I am interpreting the semantics of the cast correctly. Is there a cleaner way to do this with ctypes? def get_prop_string(se... 23 Apr 2010 17:30
Hi, friends. I wanna ask if there is a function which is ableto take a list as argument and then return its top-k maximums?
On Fri, 23 Apr 2010 00:07:18 +1000 Xavier Ho <contact(a)xavierho.com> wrote: print (sorted (l, reverse=True)[:k]) You don't really need to reverse sort there: True but... numbers = [1, 4, 5, 3, 7, 8] sorted(numbers)[3:] [5, 7, 8] Now try returning the top two or four numbers. -- ... 23 Apr 2010 17:30
Hi, friends. I wanna ask if there is a function which is able to take a list as argument and then return its top-k maximums?
2010/4/22 Jo Chan <csjcg2(a)gmail.com>: Hi,friends.  I wanna ask if there is a function which is able to take a list as argument and then return its top-k maximums? I only know about max which is poorly a top-1 maximum function, now I want more yet I am lazy enough that don't want to write one by myself. ... 23 Apr 2010 20:49
urllib2 times out accessing SSL URL on OS X
Hi, I am trying to connect to an HTTPS URL using urllib2.urlopen() (in fact, the Suds SOAP client, which internally uses urlopen) on Mac OS X Snow Leopard, with Python 2.6 built from source. The website has a certificate (for *.domain.com), issued by Go Daddy Secure Certification Authority. It is definitely va... 23 Apr 2010 01:22
Carol Newman
http://www.ristorantealpirata.com/home.php -- Zachary Burns (407)590-4814 Aim - Zac256FL Production Engineer Zindagi Games ... 20 Apr 2010 18:28
any modules having a function to partition a list by predicate provided?
i know it's not very hard to get that solution. just by implementing simple function like below. def partition(target, predicate): """ split a list into two partitions with a predicate provided. any better ideas? :) """ true = [] f... 20 Apr 2010 15:49
ANN: Oktest 0.2.1 released - a new style testing library.
Hi, I released Oktest 0.2.1. homepage: http://packages.python.org/Oktest/ download: http://pypi.python.org/pypi/Oktest/ repository: http://bitbucket.org/kwatch/oktest/ Oktest is a new-style testing library for Python. from oktest import ok ok (x) > 0 # same as assert_(x > 0) ... 20 Apr 2010 15:49
problems creating and adding class instances to a list:
I am trying to create a list of consisting of multiple instances of the same class, The Problems i am having is that i seem to be accessing the same memory.. How should i solve this Python problem ? Here is some sample code demonstraing my problem (same memory) : from copy import copy as cp class ctest(): ... 20 Apr 2010 15:49
scipy error undefined symbol: lsame_
I installed scipy (and all the required libraries) and the following error appears when i tried run a simple example which uses the optimize package of scipy. I tried also numpy alone and it works ( at least for printing numpy.array([10,20,10])) error: Traceback (most recent call last): File "main_test.p... 20 Apr 2010 15:49
"ssl" module doesn't validate that domain of certificate iscorrect
On 04:51 pm, nagle(a)animats.com wrote: I'm converting some code from M2Crypto to the new "ssl" module, and I've found what looks like a security hole. The "ssl" module will validate the certificate chain, but it doesn't check that the certificate is valid for the domain. Here's the basic code: ... 20 Apr 2010 15:49
First  |  Prev |  Next  |  Last
Pages: 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150