Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.094 X-Spam-Evidence: '*H*': 0.82; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:question': 0.10; '24,': 0.16; 'kern': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'underlying': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'interpret': 0.24; 'source': 0.25; 'somewhere': 0.26; 'header:X-Complaints-To:1': 0.27; 'header :In-Reply-To:1': 0.27; 'chris': 0.29; 'unix': 0.29; 'robert': 0.30; 'work.': 0.31; 'usually': 0.31; '(on': 0.31; 'probably': 0.32; 'fri,': 0.33; 'there': 0.35; 'subject:Simple': 0.36; 'sometimes': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'referred': 0.60; 'numbers': 0.61; 'received:62': 0.63; 'such': 0.63; 'our': 0.64; 'world': 0.66; 'due': 0.66; 'believe': 0.68; 'secure': 0.71; 'actually,': 0.84; 'eco': 0.84; 'nicely.': 0.84; 'terrible': 0.84; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Robert Kern Subject: Re: Simple algorithm question - how to reorder a sequence economically Date: Wed, 12 Jun 2013 14:14:43 +0100 References: <519f4661$0$6599$c3e8da3$5496439d@news.astraweb.com> <0065152b-16ac-4ce9-8e99-3d0b8e88a31f@fv8g2000vbb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 62.254.187.240 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371042900 news.xs4all.nl 15918 [2001:888:2000:d::a6]:43438 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:47799 On 2013-05-24 14:43, Chris Angelico wrote: > On Fri, May 24, 2013 at 11:23 PM, Peter Brooks > wrote: >> Actually, thinking about >> it, there is probably a source of non-algorithmically-derived 'random' >> numbers somewhere on the net that would do the job nicely. > > True entropy is usually provided by a source such as /dev/random (on > Unix systems). It's sometimes referred to as "cryptographic" > randomness, due to its necessity in secure encryption work. There are > various ways to get this in a cross-platform way. os.random() and os.urandom(), particularly. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco