On Nov 5, 7:40 am, sandipm [EMAIL PROTECTED] wrote:
I did fair amount of programming in python but never used c/c++ as
mentioned below.
any good tutorials for using C/C++ to optimize python codebase for
performance?
how widely do they use such kind of mixed coding practices?
[...]
Since you
On Oct 29, 11:26 am, Dick Moores [EMAIL PROTECTED] wrote:
Windows XP Pro, Python 2.5.1
import msvcrt
while True:
if msvcrt.kbhit():
key = msvcrt.getch()
if key == 'Enter'
do something
Is there a way to catch the pressing of the 'Enter' key?
Yes there is.
Jon Harrop wrote:
Filip Wasilewski wrote:
Jon Harrop wrote:
Filip Wasilewski wrote:
Jon, both Python and Matlab implementations discussed here use the
lifting scheme, while yours is a classic convolution based approach.
I've done both in OCaml. The results are basically the same
Jon Harrop wrote:
Filip Wasilewski wrote:
Jon, both Python and Matlab implementations discussed here use the
lifting scheme, while yours is a classic convolution based approach.
I've done both in OCaml. The results are basically the same.
Have you tried taking advantage of the 50
Jon Harrop wrote:
Filip Wasilewski wrote:
Besides of that this code is irrelevant to the original one and your
further conclusions may not be perfectly correct. Please learn first
about the topic of your benchmark and different variants of wavelet
transform, namely difference between
Jon Harrop wrote:
[...]
I first wrote an OCaml translation of the Python and wrote my own
little slice implementation. I have since looked up a C++ solution and
translated that into OCaml instead:
let rec d4_aux a n =
let n2 = n lsr 1 in
let tmp = Array.make n 0. in
for i=0 to n2-2
sturlamolden wrote:
[...]
Here is the correct explanation:
The factorization of the polyphase matrix is not unique. There are
several valid factorizations. Our implementations corresponds to
different factorizations of the analysis and synthesis poyphase
matrices, and both are in a sence
sturlamolden wrote:
Actually, there was a typo in the original code. I used d1[l-1] where I
should have used d1[l+1]. Arrgh. Here is the corrected version, the
Matlab code must be changed similarly. It has no relevance for the
performance timings though.
def D4_Transform(x, s1=None,
robert wrote:
I have an integer array with values limited to range(a,b) like:
ia=array([1,2,3,3,3,4,...2,0,1])
and want to speedly count the frequencies of the integers into get a density
matrix.
Is this possible without looping?
See numpy.bincount (for integers = 0) if you mean 'without
sturlamolden wrote:
Boris wrote:
Hi, is there any alternative software for Matlab? Although Matlab is
powerful popular among mathematical engineering guys, it still
costs too much not publicly open. So I wonder if there's similar
software/lang that is open with comparable
robert wrote:
I'd like to use multiple CPU cores for selected time consuming Python
computations (incl. numpy/scipy) in a frictionless manner.
Interprocess communication is tedious and out of question, so I thought about
simply using a more Python interpreter instances (Py_NewInterpreter)
Milos Prudek wrote:
A better solution would be to extract cookies from headers in the
request method and return them with response (see the code below). I
Full solution! Wow! Thank you very much. I certainly do not deserve such
kindness. Thanks a lot Filip!
Glad to help. All in all this is
Milos Prudek wrote:
Overload the _parse_response method of Transport in your
BasicAuthTransport and extract headers from raw response. See the
source of xmlrpclib.py in the standard library for details.
Thank you.
I am a bit of a false beginner in Python. I have written only short
Jerry Hill wrote:
Hello all,
I have a piece of code I could use some help optimizing. What I'm
attempting to do is periodically grab a screenshot, and search for 2D
patterns of black pixels in it. I don't care about any color other
than black. Here's some simple code that simulates my
Milos Prudek wrote:
I perform a XML-RPC call by calling xmlrpclibBasicAuth which in turn calls
xmlrpclib. This call of course sends a HTTP request with correct HTTP
headers. The response is correctly parsed by xmlrpclib, and I get my desired
values.
However, I also need to get the raw HTTP
Kevin D. Smith wrote:
I've written a simple Python extension for UNIX, but I need to get it
working on Windows now. I'm having some difficulties figuring out how
to do this. I've seen web pages that say that MS Visual Studio is
required, and other that say that's not true, that MinGW will
Jarek Zgoda wrote:
Filip Wasilewski napisa³(a):
There is an easy way to build Python extensions on Windows with MinGW
and it works fine for me. Just follow these steps:
It was brougt to my attention that mingw-compiled extensions for Python
2.4 use other malloc() that Python 2.4
Steven D'Aprano wrote:
On Sat, 24 Jun 2006 05:36:17 -0700, Filip Wasilewski wrote:
Steven D'Aprano wrote:
On Fri, 23 Jun 2006 02:17:39 -0700, Filip Wasilewski wrote:
[EMAIL PROTECTED] wrote:
Logically, I should be able to enter x[-2:-0] to get the last and next
to last
Steven D'Aprano wrote:
On Fri, 23 Jun 2006 02:17:39 -0700, Filip Wasilewski wrote:
[EMAIL PROTECTED] wrote:
Logically, I should be able to enter x[-2:-0] to get the last and next to
last characters. However, since Python doesn't distinguish between
positive and negative zero
[EMAIL PROTECTED] wrote:
Logically, I should be able to enter x[-2:-0] to get the last and next to
last characters. However, since Python doesn't distinguish between positive
and negative zero, this doesn't work. Instead, I have to enter x[-2:].
Hooray! Logically there is no such thing as
sonjaa wrote:
Hi
last week I posted a problem with running out of memory when changing
values in NumPy arrays. Since then I have tried many different
approaches and
work-arounds but to no avail.
[...]
Based on the numpy-discussion this seems to be fixed in the SVN now(?).
Anyway, you can
[EMAIL PROTECTED] wrote:
Hi all
I am trying to create a lighweight tcp proxy server.
[...]
There is a bunch of nice recipies in the Python Cookbook on port
forwarding. In the [1] and [2] case it should be fairly simple to add
an extra authentication step with pyOpenSSL.
[1]
22 matches
Mail list logo