Popular recipes tagged "meta:loc=221"http://code.activestate.com/recipes/tags/meta:loc=221/2014-08-18T05:01:04-07:00ActiveState Code Recipes2D Fluid Simulation using FHP LGCA (Python) 2014-08-18T05:01:04-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578924-2d-fluid-simulation-using-fhp-lgca/ <p style="color: grey"> Python recipe 578924 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/physics/">physics</a>, <a href="/recipes/tags/simulation/">simulation</a>). </p> <p>2D Fluid Simulation using FHP LGCA (Lattice Gas Cellular Automata)</p> <p>Simulates fluid flow in a circular channel.</p> <p>It works really slow but I think it can be a lot faster if it modified for NumPy and possibly Py2Exe.</p> <p>But my main goal was to provide easy to understand code (not performance) anyway. </p> DUAL 4 Bit Vertical Coloured Analogue Bar Graph Generator DEMO... (Python) 2011-05-04T17:58:08-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577685-dual-4-bit-vertical-coloured-analogue-bar-graph-ge/ <p style="color: grey"> Python recipe 577685 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/analogue/">analogue</a>, <a href="/recipes/tags/anim/">anim</a>, <a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/bargraph/">bargraph</a>, <a href="/recipes/tags/color/">color</a>, <a href="/recipes/tags/colour/">colour</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/display/">display</a>, <a href="/recipes/tags/linux/">linux</a>). </p> <p>This is a two channel version of the "Four Bit Vertical Coloured Analogue Bar Graph Generator DEMO...".</p> <p>These are DUAL LED style "VU" meters in the vertical plane...</p> <p>This is for standard Python 3.x.x.</p> <p>It has different overload beeps for each channel, and has all the unwanted code has been removed.</p> <p>It demonstrates how to obtain multichannel ability, (it is possible to add more channels).</p> <p>Enjoy finding simple solutions to often very difficult problems...</p> <p>Bazza...</p> Mini-commands using subprocess (Python) 2006-09-26T07:38:58-07:00Anandhttp://code.activestate.com/recipes/users/760763/http://code.activestate.com/recipes/498137-mini-commands-using-subprocess/ <p style="color: grey"> Python recipe 498137 by <a href="/recipes/users/760763/">Anand</a> (<a href="/recipes/tags/sysadmin/">sysadmin</a>). Revision 2. </p> <p>A set of template classes which allows to develop custom "mini-command" classes which allow to execute any system command and customize the execution using template strings.</p> Easily creating dialog boxes from XRC files (Python) 2006-07-06T14:39:56-07:00Walker Halehttp://code.activestate.com/recipes/users/2928779/http://code.activestate.com/recipes/496868-easily-creating-dialog-boxes-from-xrc-files/ <p style="color: grey"> Python recipe 496868 by <a href="/recipes/users/2928779/">Walker Hale</a> (<a href="/recipes/tags/ui/">ui</a>). </p> <p>This module allows creating and running a custom dialog box with a single function call. The custom dialog box must first be defined in an external XRC file. Editors like XRCed and wxGlade allow easily designing custom dialog boxes. You can then invoke the dialog box even if your application has no other GUI.</p> Enumerate printer job information (Python) 2004-09-24T00:18:14-07:00Eric Koomehttp://code.activestate.com/recipes/users/171968/http://code.activestate.com/recipes/305690-enumerate-printer-job-information/ <p style="color: grey"> Python recipe 305690 by <a href="/recipes/users/171968/">Eric Koome</a> (<a href="/recipes/tags/network/">network</a>). </p> <p>This script enumerates printer jobs from a specified default printer. This information includes Jobid, Document name, username of person submitting the job etc and if you are lucky would be able to get the spool file (SPL file format) from the printer. It could be used as a printer monitor for job accounting.</p> Unit-safe measured quantities (Python) 2004-02-23T12:12:29-08:00George Sakkishttp://code.activestate.com/recipes/users/2591466/http://code.activestate.com/recipes/270589-unit-safe-measured-quantities/ <p style="color: grey"> Python recipe 270589 by <a href="/recipes/users/2591466/">George Sakkis</a> (<a href="/recipes/tags/oop/">oop</a>). </p> <p>Programs that deal with measured quantities usually make an implicit assumption of the measurement unit, a practice which is error prone, inflexible and cumbersome. This metaclass solution takes the burden of dealing with measurement units from the user, by associating each quantity to a unit of some measure. Operations on instances of these measures are unit-safe; moreover, unit conversions take place implicitly.</p> Trees and more trees, part II (Python) 2003-05-23T10:48:25-07:00Gonçalo Rodrigueshttp://code.activestate.com/recipes/users/140909/http://code.activestate.com/recipes/201423-trees-and-more-trees-part-ii/ <p style="color: grey"> Python recipe 201423 by <a href="/recipes/users/140909/">Gonçalo Rodrigues</a> . </p> <p>We revisit our own recipe <a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/136529" rel="nofollow">http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/136529</a> for generalized trees, expanding on the functionality via some metaclass trickery.</p>