Popular recipes tagged "meta:loc=311"http://code.activestate.com/recipes/tags/meta:loc=311/2013-10-29T16:48:22-07:00ActiveState Code RecipesSortedCollection (Python) 2010-09-01T02:12:33-07:00Raymond Hettingerhttp://code.activestate.com/recipes/users/178123/http://code.activestate.com/recipes/577197-sortedcollection/ <p style="color: grey"> Python recipe 577197 by <a href="/recipes/users/178123/">Raymond Hettinger</a> (<a href="/recipes/tags/bisect/">bisect</a>, <a href="/recipes/tags/collection/">collection</a>, <a href="/recipes/tags/sorted/">sorted</a>). Revision 9. </p> <p>Wraps bisect.bisect() in an easy to use class that supports key-functions and straight-forward search methods.</p> monty hall problem (Python) 2010-08-25T20:02:17-07:00markcannolihttp://code.activestate.com/recipes/users/4174766/http://code.activestate.com/recipes/577374-monty-hall-problem/ <p style="color: grey"> Python recipe 577374 by <a href="/recipes/users/4174766/">markcannoli</a> (<a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/statistics/">statistics</a>). </p> <p>Monty_Hall is a gameshow host that proves that it is statistically better to switch when offered the chance after getting additional knowledge in a fair game. The caveat is "statistically better", which means any single trial can have unsupporting results. But "statistically better" is exactly where the fist-fights at bars and family reunions start, so no matter the single trial outcomes.</p> Whitespace Assembler (Python) 2011-07-17T19:48:14-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/577108-whitespace-assembler/ <p style="color: grey"> Python recipe 577108 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/assembler/">assembler</a>, <a href="/recipes/tags/whitespace/">whitespace</a>). Revision 3. </p> <p>Compiles a program from "Assembly" folder into "Program" folder.</p> <p>Can be executed directly by double-click or on the command line.</p> <p>Give name of *.WSA file without extension (example: stack_calc).</p> Asynchronous pipe communication using asyncore (Python) 2013-10-29T16:48:22-07:00Glenn Eychanerhttp://code.activestate.com/recipes/users/4172294/http://code.activestate.com/recipes/576967-asynchronous-pipe-communication-using-asyncore/ <p style="color: grey"> Python recipe 576967 by <a href="/recipes/users/4172294/">Glenn Eychaner</a> (<a href="/recipes/tags/async/">async</a>, <a href="/recipes/tags/asyncore/">asyncore</a>, <a href="/recipes/tags/i_o/">i_o</a>, <a href="/recipes/tags/pipe/">pipe</a>). Revision 9. </p> <p>Extends file_dispatcher to provide extra functionality for reading from and writing to pipes. Uses the observer pattern (<a href="http://code.activestate.com/recipes/576962/">recipe 576962</a>) to provide notification of new data and closed pipes.</p>