Does anyone know of an efficient way of doing a weighted random
choice? (I don't even know what algorithms like this would be called.)
Preferably, something that doesn't grow exponentially with the number
of elements in the list, or the size of their respective values.
For example: Assume I have a
Hi all,
I've been working on creating 2D bounding box (envelope) classes to
describe spatial data. Variations of these are available in other
spatial libraries (e.g. Shapely), although I haven't found envelopes
specific to raster data that also specifies cell size. Could be I just
haven't fo
On 12/18/2010 2:06 AM, Peter Otten wrote:
I don't think /how/ you are trying it is stupid though I'm not so sure about
/what/ .
Thank you all for very helpful suggestions. It took me a while to chew
on this before I could respond. I learned a lot about descriptors and
their interactions wit
On Wed, 22 Dec 2010 23:31:39 +1100, Steven D'Aprano wrote:
> In this case, you need to sum the number of races for all the fixtures:
>
> num_races = sum(len(racetimes) for racetimes in FixtureDict.values())
Many thanks Steven for your explanation and final golden nugget of code.
On Wed, 22 Dec 20
On 12/22/2010 10:32 PM, Stefan Behnel wrote:
Karim, 22.12.2010 22:09:
Using lxml (except for the different import) will be fully compliant
with
the ET code.
Do I have to adapt it?
There are certain differences.
http://codespeak.net/lxml/compatibility.html
This page hasn't been changed for a
Karim, 22.12.2010 22:09:
Using lxml (except for the different import) will be fully compliant with
the ET code.
Do I have to adapt it?
There are certain differences.
http://codespeak.net/lxml/compatibility.html
This page hasn't been changed for ages, but it should still be mostly accurate.
Thanks Stefan for answering.
That's what I come up with.
Using lxml (except for the different import) will be fully compliant
with the ET code.
Do I have to adapt it?
I saw your fantastic benchmarks! Why the hell lxml is not integrated
into the stdlib.
I thought they put in it things which
Karim, 22.12.2010 19:28:
On 12/22/2010 07:07 PM, Karim wrote:
Is somebody has an example of the way to parse an xml file against a
"grammary" file.xsd.
I found this:
http://www.velocityreviews.com/forums/t695106-re-xml-parsing-with-python.html
Stefan is it still true the limitation of etree
On 12/22/2010 07:07 PM, Karim wrote:
Is somebody has an example of the way to parse an xml file against a
"grammary" file.xsd.
I found this:
http://www.velocityreviews.com/forums/t695106-re-xml-parsing-with-python.html
Stefan is it still true the limitation of etree in python 2.7.1 ?
Regar
Hi all,
Last few days ago,
I facing the same issue with my windows 7 64bit...
it work well with windows XP 32-bit...
FYI, I’m using python 2.6 amd64 bit as my core programming tools
currently, I’m start study/learn some arduino robotic and rewrite
Python-Arduino API
I just do a quick anatomy t
Hello all,
Is somebody has an example of the way to parse an xml file against a
"grammary" file.xsd.
The default parser is checking closing tags and attributes but I would
like to validate a XSD
file.
I use the module ElementTree.
Regards
Karim
__
On Wed, Dec 15, 2010 at 7:30 PM, Alan Gauld wrote:
> I also use split screen view in vim so that within vim I often have
> two or three buffers open at once all displayed in a split screen.
I know you prefer "default" settings, but one mapping I tend to stick
in my .vimrcs whereever I go:
nmap
On 12/22/2010 7:31 AM, Steven D'Aprano wrote:
Also note: len(dict.keys()) == len(dict.values()) == len(dict)
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.p
Garry Bettle wrote:
Howdy all,
Hope this message finds everyone well.
I have dictionary of keys and a string of values.
i.e.
8 Fixtures:
I assume each fixture is a key, e.g. Swin, HGrn, etc.
Swin1828 1844 1901 1916 1932 1948 2004 2019 2036 2052 2107 2122
HGrn1148 1204 1218 1232 12
Howdy all,
Hope this message finds everyone well.
I have dictionary of keys and a string of values.
i.e.
8 Fixtures:
Swin1828 1844 1901 1916 1932 1948 2004 2019 2036 2052 2107 2122
HGrn1148 1204 1218 1232 1247 1304 1319 1333 1351
Newc1142 1157 1212 1227 1242 1258 1312 1327 1344 140
Hi,
Sorry for the late reply, but thanks a lot for helping me. It's solved now.
Peter, the link you posted in another thread (or should I say 'query') was also
relevant AND funny (http://xkcd.com/327/)
Merry Christmas and Happy Coding! *)
Cheers!!
Albert-Jan
*) Including those who have to pa
Walter Prins, 21.12.2010 22:13:
On 21 December 2010 17:57, Alan Gauld wrote:
"Stefan Behnel" wrote
But I don't understand how uncompressing a file before parsing it can
be faster than parsing the original uncompressed file?
I didn't say "uncompressing a file *before* parsing it". I meant
un
17 matches
Mail list logo