On 26/07/2020 14:07, Mike Dewhirst wrote:
I think your best bet is to make a formal business case to your IT
people and explain what's in it for them. If they hold all the cards
you defeat them at your peril.
The issue is that the IT department thinks that installing the full
power of Python
At work my only Internet access is via a locked-down PC. The IT
department are not willing to install Python on it [1]. Ideally I would
download packages and their dependencies from PyPi using "pip download"
at the command line. Any better solutions than downloading the package
in a browser, fi
I have a program where I am currently using a
concurrent.futures.ThreadPoolExecutor to run multiple tasks
concurrently. These tasks are typically I/O bound, involving access to
local databases and remote REST APIs. However, these tasks could
themselves be split into subtasks, which would also b
On 08/05/2014 21:44, Ian Kelly wrote:
> On May 8, 2014 12:57 PM, "Andrew McLean" <mailto:li...@andros.org.uk>> wrote:
> > So far so good. However, I thought this would be an opportunity to
> > explore concurrent.futures and to see whether it offered any b
On 08/05/2014 21:44, Ian Kelly wrote:
> I don't think it needs to be "messy". Something like this should do
> the trick, I think:
>
> from concurrent.futures import *
> from itertools import islice
>
> def batched_pool_runner(f, iterable, pool, batch_size):
> it = iter(iterable)
> # Submit the
On 08/05/2014 20:06, Chris Angelico wrote:
> On Fri, May 9, 2014 at 4:55 AM, Andrew McLean wrote:
>> Because of latency in the DNS lookup this could
>> benefit from multithreading.
> Before you go too far down roads that are starting to look
> problematic: A DNS lookup is a
I have a problem that would benefit from a multithreaded implementation
and having trouble understanding how to approach it using
concurrent.futures.
The details don't really matter, but it will probably help to be
explicit. I have a large CSV file that contains a lot of fields, amongst
them one c
On 24/10/2011 08:03, Chris Angelico wrote:
On Mon, Oct 24, 2011 at 4:18 PM, Jason Swails wrote:
my_csv = csv.writer(open('temp.1.csv', 'wb'))
Have you confirmed, or can you confirm, whether or not the file gets
closed automatically when the writer gets destructed? If so, all you
need to do is
I understand that Python Tools for Visual Studio doesn't work with VS
Express, but does work with the (free) VS 2010 Shell. Does anyone know
if you can install VS Express and VS Shell on the same machine?
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
> Andrew McLean <[EMAIL PROTECTED]> writes:
>> I would like to write a web (http) proxy which I can instrument to
>> automatically extract information from certain web sites as I browse
>> them. Specifically, I would want to process URLs that match
I would like to write a web (http) proxy which I can instrument to
automatically extract information from certain web sites as I browse
them. Specifically, I would want to process URLs that match a particular
regexp. For those URLs I would have code that parsed the content and
logged some of it
[EMAIL PROTECTED] wrote:
> In the particular case, I have to read an attribute from any one of
> the elements, which one doesn't matter because this attribute value is
> same across all elements in the set.
Someone else pointed out that there might be better data structures. If
performance was no
I want to script the benchmarking of some compression algorithms on a
Windows box. The algorithms are all embodied in command line
executables, such as gzip and bzip2. I would like to measure three things:
1. size of compressed file
2. elapsed time (clock or preferably CPU)
3. memory used
The f
Where you would use varargin and nargin in Matlab, you would use the
*args mechanism in Python.
Try calling
def t1(*args):
print args
print len(args)
with different argument lists
Where you would use varargout and nargout in Matlab you would use tuple
unpacking in Python.
Pla
Robert Kern wrote:
> I would suggest, in order:
>
> 1) Look on the relevant mailing list for people talking about using ZODB
> with Python 2.5.
Been there, didn't find anything. Except that recently released versions
of Zope (2.9.5 and 2.10.0) aren't compatible with Python 2.5. [Being
pedantic
I'm going to have to delay upgrading to Python 2.5 until all the
libraries I use support it. One key library for me is ZODB. I've Googled
and can't find any information on the developers' plans. Does anyone
have any information that might help?
- Andrew
--
http://mail.python.org/mailman/list
Steve Holden wrote:
> If that *isn't* satisfactory then a modest investment in Adobe
> Acrobat/Distiller plus the use of Python's scripting facilities to
> direct the conversion would be preferable to spending a huge amount of
> time writing a hand-crafted solution.
An alternative to Adobe Dist
John Machin wrote:
> You can fix that. The beauty of open source is that you can grab it
> (Windows: c:\python2?\lib\csv.py (typically)) and hack it about till it
> suits your needs. Go fer it!
Unfortunately the bits I should change are in _csv.c and, as I'm not
very proficient at C, that wouldn'
John Machin wrote:
> A better workaround IMHO is to strip each *field* after it is received
> from the csv reader. In fact, it is very rare that leading or trailing
> space in CSV fields is of any significance at all. Multiple spaces
> ditto. Just do this all the time:
>
> row = [' '.join(x.split(
I have a bunch of csv files that have the following characteristics:
- field delimiter is a comma
- all fields quoted with double quotes
- lines terminated by a *space* followed by a newline
What surprised me was that the csv reader included the trailing space in
the final field value returned,
Roy Smith wrote:
>
> As I remember, you didn't need the whitespace either. IIRC, your example
> above could have been written as:
>
> PROGRAMKWDS
> REALREAL,WRITE
> WRITE=1.0
> REAL=2.0
> WRITE(*,*)WRITE,REAL
> END
>
It's stranger than that. FORTRAN 77 is in
John Machin wrote:
> A quick silly question: what is the problem that you are trying to
> solve?
A fair question :-)
The problem may seem a bit strange, but here it is:
I have the ability to query a database in a legacy system and extract
records which match a particular pattern. Specifically,
Carl Banks wrote:
> Andrew McLean wrote:
>> I have a list of strings, A. I want to find a set of strings B such that
>> for any "a in A" there exists "b in B" such that b is a sub-string of a.
>
> B=A?
>
>> But I also want to minimise T = sum_j
This really an algorithm question more that a Python question, but it
would be implemented in Python
I have a list of strings, A. I want to find a set of strings B such that
for any "a in A" there exists "b in B" such that b is a sub-string of a.
But I also want to minimise T = sum_j t_j wh
Bernhard,
Levenberg-Marquardt is a good solution when you want to solve a general
non-linear least-squares problem. As Robert said, the OPs problem is
linear and Robert's solution exploits that. Using LM here is unnecessary
and I suspect a fair bit less efficient (i.e. slower).
- Andrew
[EMA
Dan Sommers wrote:
> On Sun, 25 Jun 2006 21:10:31 +0100,
> Andrew McLean <[EMAIL PROTECTED]> wrote:
>
>> I'm looking at putting some e-mail contact addresses on a web site,
>> and wanted to make it difficult for spammers to harvest them.
>
> [ ... ]
>
&g
I'm looking at putting some e-mail contact addresses on a web site, and
wanted to make it difficult for spammers to harvest them.
I found some Python code that I can call within my application.
http://www.zapyon.de/spam-me-not/
It works exactly as expected. However, I am concerned that the tech
ines, the first line being a header containing
field names specific to that record with the second line containing the
corresponding data.
It would help of you let us know which (if any) was correct.
--
Andrew McLean
--
http://mail.python.org/mailman/listinfo/python-list
ot; % (len(detail), detail)
You could wrap this up into a class which returns (header, detail) pairs
and does better error handling, but the above code should illustrate the
basics.
--
Andrew McLean
--
http://mail.python.org/mailman/listinfo/python-list
rage performance across different benchmarks of
different Fortran compilers on the same platform can be as much a factor
of two. Variation of individual benchmarks as much as a factor of three.
Some of you might be surprised at how many different Fortran compilers
are available!
--
Andrew McLean
--
In article <[EMAIL PROTECTED]>, John
Machin <[EMAIL PROTECTED]> writes
Andrew McLean wrote:
In case anyone is interested, here is the latest.
def insCost(tokenList, indx, pos):
"""The cost of inserting a specific token at a specific
normalised position al
okens into the dynamic programming method, but I think
I got there! At least my test cases seem to work!
#
# First attempt at a fuzzy compare of two addresses using a form of Edit
Distance algorithm on tokens
# v0.5
# Andrew McLean, 23 January 2005
#
# The main routine editDistance takes two lis
ns. Then work with a metric based on the
differences between the sequences. The simple case would look at
deleting tokens and perhaps concatenating tokens to make a match.
--
Andrew McLean
--
http://mail.python.org/mailman/listinfo/python-list
DT8 3EL
THE PRESBYTERY, SHORTMOOR, BEAMINSTER, DORSET DT8 3EL
The Pinnacles, White Sheet Hill, BEAMINSTER, DORSET, DT8 3SF
PINNACLES, WHITESHEET HILL, BEAMINSTER, DORSET DT8 3SF
The challenge is to fix some of the false negatives above without
introducing false positives!
Any pointers gratef
In article <[EMAIL PROTECTED]>,
Fredrik Lundh <[EMAIL PROTECTED]> writes
Andrew McLean wrote:
I have a requirement to drive a Windows GUI program from a Python
Script. The program was originally a DOS program written in Turbo
Pascal, and was recently translated to Delphi. I do
ed, The "AutoIT Windows Spy" I found here:
http://www.hiddensoft.com/AutoIt/
looks like it will be useful.
Any pointers gratefully received.
Regards,
Andrew McLean
--
http://mail.python.org/mailman/listinfo/python-list
36 matches
Mail list logo