Popular recipes tagged "meta:loc=129"http://code.activestate.com/recipes/tags/meta:loc=129/2015-09-21T20:49:41-07:00ActiveState Code RecipesHANGMAN! (Python) 2015-09-21T20:49:41-07:00Burak Tandoganhttp://code.activestate.com/recipes/users/4191373/http://code.activestate.com/recipes/578984-hangman/ <p style="color: grey"> Python recipe 578984 by <a href="/recipes/users/4191373/">Burak Tandogan</a> (<a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/hangman/">hangman</a>, <a href="/recipes/tags/python/">python</a>). Revision 9. </p> <p>Classic Hangman on console, check how hang the man with codes! Click 'download' and left click the .py file, have fun!</p> TicTacToe (Python) 2014-12-14T16:23:44-08:00Malcolm Jeremy Lewishttp://code.activestate.com/recipes/users/4191332/http://code.activestate.com/recipes/578980-tictactoe/ <p style="color: grey"> Python recipe 578980 by <a href="/recipes/users/4191332/">Malcolm Jeremy Lewis</a> (<a href="/recipes/tags/tic/">tic</a>). </p> <p>A simple TicTacToe script including AI (Artificial Intelligence)</p> How to stream an mp3 file using vlc.py, with a simple TKinter GUI. (Python) 2013-06-09T12:52:30-07:00Anton Vredegoorhttp://code.activestate.com/recipes/users/2667360/http://code.activestate.com/recipes/578556-how-to-stream-an-mp3-file-using-vlcpy-with-a-simpl/ <p style="color: grey"> Python recipe 578556 by <a href="/recipes/users/2667360/">Anton Vredegoor</a> (<a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/streaming/">streaming</a>, <a href="/recipes/tags/tkinter/">tkinter</a>, <a href="/recipes/tags/vlc/">vlc</a>). </p> <p>This script can be used to stream an existing mp3 file to multiple computers. It has a simple Tkinter GUI with only one button to start/stop the stream, and a slider to indicate or change the position.</p> Browser history data structure (Python) 2009-12-25T17:26:57-08:00George Sakkishttp://code.activestate.com/recipes/users/2591466/http://code.activestate.com/recipes/576991-browser-history-data-structure/ <p style="color: grey"> Python recipe 576991 by <a href="/recipes/users/2591466/">George Sakkis</a> (<a href="/recipes/tags/datastructures/">datastructures</a>, <a href="/recipes/tags/datastuctures/">datastuctures</a>). Revision 6. </p> <p>The <code>BrowserHistory</code> class encapsulates the history of moving from location to location, as in Web browsing context; the recipe is not restricted to Web browsing though. See docstrings for more details and usage.</p> <p>The current implementation requires Python 2.6.</p> Memoize decorator with O(1) length-limited LRU cache, supports mutable types (Python) 2006-09-17T15:03:25-07:00Neil Torontohttp://code.activestate.com/recipes/users/3007936/http://code.activestate.com/recipes/498110-memoize-decorator-with-o1-length-limited-lru-cache/ <p style="color: grey"> Python recipe 498110 by <a href="/recipes/users/3007936/">Neil Toronto</a> (<a href="/recipes/tags/algorithms/">algorithms</a>). </p> <p>There are quite a few memoize decorators floating around, but none that met all my requirements. Here's my attempt. It draws from Bengt Richter's O(1) length-limited LRU cache (<a href="http://mail.python.org/pipermail/python-list/2002-October/125872.html" rel="nofollow">http://mail.python.org/pipermail/python-list/2002-October/125872.html</a>) and a simplification of Daniel Brodie's Simple Decorators recipe (<a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/437086%29." rel="nofollow">http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/437086).</a></p> Qt + Twisted (threadedselectreactor) (Python) 2006-01-17T19:37:28-08:00Jonathan Kolyerhttp://code.activestate.com/recipes/users/452108/http://code.activestate.com/recipes/466305-qt-twisted-threadedselectreactor/ <p style="color: grey"> Python recipe 466305 by <a href="/recipes/users/452108/">Jonathan Kolyer</a> (<a href="/recipes/tags/network/">network</a>). </p> <p>Starting with the recipe "Network Ping Pong using Twisted Prespective Broker" (181905), this recipe integrates Qt using the threadedselectreactor. An alternative to qtreactor, this recipe allows dispatching messages over the perspective broker while running the Qt event loop. It basically shows how to use reactor.interleave(aFunction) within the context of Qt.</p> Install J2c Auth Id. (Tcl) 2005-10-18T22:46:55-07:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/442452-install-j2c-auth-id/ <p style="color: grey"> Tcl recipe 442452 by <a href="/recipes/users/1220635/">Patrick Finnegan</a> (<a href="/recipes/tags/websphere/">websphere</a>). </p> <p>Installs a J2C Authorization ID.</p> Extracting a low resolution grid from a high resolution grid (Python) 2005-05-23T15:28:15-07:00Gerry Wienerhttp://code.activestate.com/recipes/users/825001/http://code.activestate.com/recipes/414084-extracting-a-low-resolution-grid-from-a-high-resol/ <p style="color: grey"> Python recipe 414084 by <a href="/recipes/users/825001/">Gerry Wiener</a> (<a href="/recipes/tags/graphics/">graphics</a>). Revision 3. </p> <p>This recipe illustrates how to extract a low resolution grid from a high resolution grid using the Numeric package. It presents an inefficient but straightforward solution and then a more efficient solution that employs the functionality in Numeric.</p> Pulling stuff out of the internet archive (wayback machine) (Python) 2004-07-12T07:42:28-07:00David Fraserhttp://code.activestate.com/recipes/users/166597/http://code.activestate.com/recipes/286224-pulling-stuff-out-of-the-internet-archive-wayback-/ <p style="color: grey"> Python recipe 286224 by <a href="/recipes/users/166597/">David Fraser</a> (<a href="/recipes/tags/web/">web</a>). </p> <p>I used this when trying to retrieve a site I could not access via the wayback machine (<a href="http://archive.org" rel="nofollow">archive.org</a>). Might require some tweaking to get it to work...</p> Reading the System information (Python) 2004-01-12T21:58:26-08:00Nishit Guptahttp://code.activestate.com/recipes/users/1571205/http://code.activestate.com/recipes/265858-reading-the-system-information/ <p style="color: grey"> Python recipe 265858 by <a href="/recipes/users/1571205/">Nishit Gupta</a> (<a href="/recipes/tags/programs/">programs</a>). </p> <p>Reading the System information and Softwares installed in Windows NT/XP/2000/9x</p> Use try/except to handle unexpected input from raw_input. (Python) 2001-12-10T20:10:09-08:00philip nunezhttp://code.activestate.com/recipes/users/136492/http://code.activestate.com/recipes/101853-use-tryexcept-to-handle-unexpected-input-from-raw_/ <p style="color: grey"> Python recipe 101853 by <a href="/recipes/users/136492/">philip nunez</a> (<a href="/recipes/tags/ui/">ui</a>). </p> <p>Minesweeper expects the user to enter properly bounded integers for moves. Should the user enter something unexpected, the resulting exception can be caught and handled in some way other than exiting.</p>