Popular recipes tagged "scope" but not "sound"http://code.activestate.com/recipes/tags/scope-sound/2013-06-19T19:06:50-07:00ActiveState Code RecipesBash Script For An Oscilloscope... (Bash) 2013-06-19T19:06:50-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578570-bash-script-for-an-oscilloscope/ <p style="color: grey"> Bash recipe 578570 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/anim/">anim</a>, <a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/audioscope/">audioscope</a>, <a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/oscilloscope/">oscilloscope</a>, <a href="/recipes/tags/scope/">scope</a>, <a href="/recipes/tags/script/">script</a>, <a href="/recipes/tags/sound_exchange/">sound_exchange</a>, <a href="/recipes/tags/sox/">sox</a>, <a href="/recipes/tags/terminal/">terminal</a>). </p> <p>This code is the latest as of 19-06-2013. It is an AudioScope designed around a Macbook Pro 13" of which only has ONE microphone input. It works under Linux variants too. Read the code for much more info.</p> <p>It was my way of learning Bash scripting.</p> <p>It is resident here at this site:-</p> <p><a href="http://www.unix.com/shell-programming-scripting/212939-start-simple-audio-scope-shell-script.html" rel="nofollow">http://www.unix.com/shell-programming-scripting/212939-start-simple-audio-scope-shell-script.html</a></p> <p>It started off as a fun idea and is now becoming a very serious project.</p> <p>As it stands this is fully working but it is uncalibrated and this is where it will stay on this site.</p> <p>As the above site is the host then all future uploads will be there...</p> <p>To do list...</p> <p>DC input. [1] DC polarity. [1] 2 more Internal sync modes. External triggering. Zoom facility - if possible in text mode. Vertical calibration. [2] Frequency measurement. {3] (Others.)</p> <p>[1] I have simple HW built as an idea but yet to prove it... [2] Preliminary HW built but not yet used. Calibration SW and circuit(s) to be built into script as it progresses. [3] I already have a working script but not completely satisfied at it at this point...</p> <p>I am noing to say much else except that it has already been given a 5 star rating on the above UNIX site...</p> <p>As it stands this code is entirely Public Domian and you may do with it as you please...</p> <p>Enjoy something completely different using Bash scripting...</p> <p>Finally the code defaults to a DEMO mode which requires no HW access at all but everything is still functional...</p> <p>__Thoroughly__ read the code for more information...</p> <p>As a circuit is inside the script then it is best viewed in plan text mode.</p> <p>Bazza, G0LCU.</p> Decorator to expose local variables of a function after execution (Python) 2010-07-07T22:01:23-07:00Pietro Berkeshttp://code.activestate.com/recipes/users/4174299/http://code.activestate.com/recipes/577283-decorator-to-expose-local-variables-of-a-function-/ <p style="color: grey"> Python recipe 577283 by <a href="/recipes/users/4174299/">Pietro Berkes</a> (<a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/function/">function</a>, <a href="/recipes/tags/inner/">inner</a>, <a href="/recipes/tags/local/">local</a>, <a href="/recipes/tags/scope/">scope</a>, <a href="/recipes/tags/variables/">variables</a>). Revision 2. </p> <p>Decorator to expose the local variables defined in the inner scope of a function. At the exit of the decorated function (regular exit or exceptions), the local dictionary is copied to a read-only property, <code>locals</code>.</p> <p>The main implementation is based on injecting bytecode into the original function, and requires the lightweight module <code>byteplay</code> (available <a href="http://code.google.com/p/byteplay/">here</a>). See below for an alternative implementation that only uses the standard library.</p> Decorator to expose local variables of a function after execution [alternative implementation] (Python) 2010-07-08T09:44:28-07:00Andrea Maffezzolihttp://code.activestate.com/recipes/users/4171157/http://code.activestate.com/recipes/577295-decorator-to-expose-local-variables-of-a-function-/ <p style="color: grey"> Python recipe 577295 by <a href="/recipes/users/4171157/">Andrea Maffezzoli</a> (<a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/function/">function</a>, <a href="/recipes/tags/inner/">inner</a>, <a href="/recipes/tags/local/">local</a>, <a href="/recipes/tags/scope/">scope</a>, <a href="/recipes/tags/variables/">variables</a>). Revision 6. </p> <p>Please note that the present is a fork of the <a href="http://code.activestate.com/recipes/577283/">recipe 577283</a> "Decorator to expose local variables of a function after execution" of Pietro Berkes, available at <a href="http://code.activestate.com/recipes/577283-decorator-to-expose-local-variables-of-a-function-/" rel="nofollow">http://code.activestate.com/recipes/577283-decorator-to-expose-local-variables-of-a-function-/</a> , and aiming only to report the alternative implementation "persistent_locals2", whose I'm co-author with Pietro Berkes, and which was submitted together to the original recipe. Refer to the latter for an exhaustive description and discussion.</p>