Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #66565

Re: random.sample with large weighted sample-sets? [SOLVED]

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python.list@tim.thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.038
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; 'missed': 0.12; '-tkc': 0.16; 'ah,': 0.16; 'bisect': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'reedy': 0.16; 'subject:sample': 0.16; 'wrote:': 0.18; 'header:In- Reply-To:1': 0.27; 'sense': 0.34; 'subject:with': 0.35; 'offered': 0.35; 'charset:us-ascii': 0.36; 'thanks': 0.36; 'subject:]': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'hand': 0.80; 'received:50.22': 0.84
Date Sun, 16 Feb 2014 13:58:04 -0600
From Tim Chase <python.list@tim.thechases.com>
To python-list@python.org
Subject Re: random.sample with large weighted sample-sets? [SOLVED]
In-Reply-To <ldr4ls$q4u$1@ger.gmane.org>
References <20140215224145.68c82eb4@bigbox.christie.dr> <ldpve4$tnk$1@ger.gmane.org> <20140216082250.7aecebb4@bigbox.christie.dr> <ldr4ls$q4u$1@ger.gmane.org>
X-Mailer Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - boston.accountservergroup.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - tim.thechases.com
X-Get-Message-Sender-Via boston.accountservergroup.com: authenticated_id: tim@thechases.com
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.7071.1392580651.18130.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1392580651 news.xs4all.nl 2915 [2001:888:2000:d::a6]:55278
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:66565

Show key headers only | View raw


On 2014-02-16 14:47, Terry Reedy wrote:
> > 2) the data has to be sorted for bisect to work  
> 
> cumulative sums are automatically sorted.

Ah, that they were *cumulative* was the key that I missed in my
understanding.  It makes sense now and works like a charm.

Thanks to all who offered a hand in this thread.

-tkc


Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: random.sample with large weighted sample-sets? [SOLVED] Tim Chase <python.list@tim.thechases.com> - 2014-02-16 13:58 -0600

csiph-web