Top-rated recipes tagged "linux"http://code.activestate.com/recipes/tags/linux/top/2017-05-13T12:12:30-07:00ActiveState Code RecipesA DEMO to show how to write text into the Python terminal Title Bar... (Python)
2013-09-17T17:55:53-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578662-a-demo-to-show-how-to-write-text-into-the-python-t/
<p style="color: grey">
Python
recipe 578662
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/bar/">bar</a>, <a href="/recipes/tags/cygwin/">cygwin</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/title/">title</a>, <a href="/recipes/tags/title_bar/">title_bar</a>).
</p>
<p>This DEMO is show how to write some text of your choice into the Title Bar of the Python terminal window.</p>
<p>Firstly it imports "time" just for this demo so that a simple time delay can be generated.
Next the Python terminal window is written to for the 5 seconds of delay; see code.
And finally the Title Bar is restored to normal...</p>
<p>A snapshot image can be seen here:-</p>
<p><a href="http://wisecracker.host22.com/public/Title_Bar.jpg" rel="nofollow">http://wisecracker.host22.com/public/Title_Bar.jpg</a></p>
<p>Bazza...</p>
"raw_input" For All Versions Of Python... (Python)
2011-08-10T16:52:04-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577836-raw_input-for-all-versions-of-python/
<p style="color: grey">
Python
recipe 577836
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/input/">input</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/raw_input/">raw_input</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>The code says it all... ;o)</p>
<p>Put the two lines in any Python code and have universal KB input...</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<p>Bazza, G0LCU...</p>
Unix tee-like functionality via a Python class (Python)
2017-03-31T14:30:30-07:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580767-unix-tee-like-functionality-via-a-python-class/
<p style="color: grey">
Python
recipe 580767
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/cli/">cli</a>, <a href="/recipes/tags/command/">command</a>, <a href="/recipes/tags/commandline/">commandline</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/tee/">tee</a>, <a href="/recipes/tags/unix/">unix</a>, <a href="/recipes/tags/utilities/">utilities</a>, <a href="/recipes/tags/windows/">windows</a>).
</p>
<p>The Unix tee commmand, when used in a command pipeline, allows you to capture the output of the preceding command to a file or files, while still sending it on to standard output (stdout) for further processing via other commands in a pipeline, or to print it, etc.</p>
<p>This recipe shows how to implement simple tee-like functionality via a Python class. I do not aim to exactly replicate the functionality of the Unix tee, only something similar.</p>
<p>More details and sample output here:</p>
<p><a href="https://jugad2.blogspot.in/2017/03/a-python-class-like-unix-tee-command.html" rel="nofollow">https://jugad2.blogspot.in/2017/03/a-python-class-like-unix-tee-command.html</a></p>
Simple command-line alarm clock in Python (Python)
2015-10-25T18:27:27-07:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/579117-simple-command-line-alarm-clock-in-python/
<p style="color: grey">
Python
recipe 579117
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/alarm/">alarm</a>, <a href="/recipes/tags/clock/">clock</a>, <a href="/recipes/tags/commandline/">commandline</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/time/">time</a>, <a href="/recipes/tags/unix/">unix</a>, <a href="/recipes/tags/windows/">windows</a>).
</p>
<p>This recipe shows how to create a simple alarm clock in Python, that can be run from the command line in a terminal. It lets you specify the alarm time in minutes as a command line argument, and prints a wake-up message and beeps a few times, after that time arrives. You can use 0 for the minutes to test it immediately, including to adjust the volume using your speaker controls.</p>
A DEMO To Show How To Expand A Standard Python Terminal On The Fly... (Python)
2012-12-17T12:47:14-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578383-a-demo-to-show-how-to-expand-a-standard-python-ter/
<p style="color: grey">
Python
recipe 578383
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/campimeter/">campimeter</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/size/">size</a>, <a href="/recipes/tags/terminal/">terminal</a>, <a href="/recipes/tags/window/">window</a>).
</p>
<p>This code shows how to open up a default Terminal running Python to tha maximum allowed on the _desktop_. I decided on writing code to do a crude emulation of a Campimeter. Anyone who has worn spectacles for a long time has had this test done at the optician's. Originally written for a Macbook Pro, OSX 10.7.5 but also tested on Debian Linux 6.0.x. READ the code for more information!!! This code WILL alter the size of the Terminal window AND changes the colours too, although it is very easy to return back to the default state it is NOT included in the code... I EXPECT professionals to know how to doo that.</p>
<p>Before running Python inside the Terminal ensure the Terminal window is at the uppermost left hand corner of your desktop...</p>
<p>I needed the maximised Python Terminal for something else but this was the easiest way to demonstrate ho to do it through Python...</p>
<p>Written so that kids can understand what is going on...</p>
<p>Enjoy finding simple solutions to often very difficult problems... ;o)</p>
<p>Bazza, G0LCU...</p>
Seven Bit Colored Analogue Bar Graph Generator DEMO... (Python)
2011-03-17T22:14:52-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577612-seven-bit-colored-analogue-bar-graph-generator-dem/
<p style="color: grey">
Python
recipe 577612
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>).
Revision 3.
</p>
<p>..For STANDARD Python 2.6 and above...</p>
<p>This code will display a horizontal full colour analogue "VU" style meter. It displays green for normal, yellow
for warning and red for danger with a critical error beep near the end of full scale, at value 120+.</p>
<p>This version is for Python 2.6 and above and only for the Linux, (*nix?), platform.</p>
<p>It is an "at a glance" display that is in colour rather than having to read say a digitally generated number.</p>
<p>A Python 3.x version can be found here:-</p>
<p><a href="http://www.linuxformat.com/forums/viewtopic.php?t=13443" rel="nofollow">http://www.linuxformat.com/forums/viewtopic.php?t=13443</a></p>
<p>This has uses "for at a glance" voltmeters, ammeters, data-loggers, anemometers etc, etc...</p>
<p>Watch for wordwrapping etc...</p>
<p>NOTE:- This is Public Domain and you may do with it as you please.</p>
<p>73...</p>
<p>Bazza, G0LCU...</p>
<p>Team AMIGA...</p>
A white noise generator to sooth baby to sleep. (Bash)
2017-05-13T12:12:30-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/580801-a-white-noise-generator-to-sooth-baby-to-sleep/
<p style="color: grey">
Bash
recipe 580801
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/alarm/">alarm</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/baby_alarm/">baby_alarm</a>, <a href="/recipes/tags/cygwin/">cygwin</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/noise/">noise</a>, <a href="/recipes/tags/sleep/">sleep</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/whitenoise/">whitenoise</a>).
</p>
<p>This is a simple BASH, DASH and SH script to sooth a newborn baby to sleep for a laptop with a builtin mic. Develeoped around an Apple MacBook Pro.</p>
<p>Usage:- [./]shush.sh <time in seconds from 18 to 2700> [sensitivity [Hh|Mm|Ll]]<CR></p>
<p>If time is omitted it defaults to 2 bursts of 9 seconds each and if sensitivity is omitted defaults to [M]edium.</p>
<p>It uses Quicktime Player for Apple OSX 10.12.4 minimum /dev/dsp for CygWin and some Linux flavours and arecored for Linux ALSA machines for baby awake detector.</p>
<p>Upon the two arguments the white noise generator runs for approximately the time given in $1 in bursts of 9 seconds until the time limit is reached.
$2 is used to detect of baby is awake and reruns the noise generator again with a new noise waveform.</p>
<p>Enjoy...</p>
A pseudo-echo, (or printf), function for any Python version. (Python)
2017-01-20T22:17:23-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/580750-a-pseudo-echo-or-printf-function-for-any-python-ve/
<p style="color: grey">
Python
recipe 580750
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/echo/">echo</a>, <a href="/recipes/tags/fs_uae/">fs_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/printf/">printf</a>, <a href="/recipes/tags/unix/">unix</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>A simple example of having a pseudo-echo using sys.stdout.write...</p>
<p>This gives exactly the same results from Python Versions, 1.4.0, 2.0.1, 2.5.6, 2.6.9, 3.4.3 and 3.5.2 on various platforms including the classic AMIGA A1200.</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<p>Bazza.</p>
A utility like Unix seq (command-line), in Python (Python)
2017-01-08T17:48:57-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580744-a-utility-like-unix-seq-command-line-in-python/
<p style="color: grey">
Python
recipe 580744
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/command/">command</a>, <a href="/recipes/tags/commandline/">commandline</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/script/">script</a>, <a href="/recipes/tags/seq/">seq</a>, <a href="/recipes/tags/sequence/">sequence</a>, <a href="/recipes/tags/shell/">shell</a>, <a href="/recipes/tags/unix/">unix</a>, <a href="/recipes/tags/utilities/">utilities</a>, <a href="/recipes/tags/utility/">utility</a>).
</p>
<p>This recipe shows how to create a utility like Unix seq (command-line), in Python.
seq is described here: </p>
<p><a href="https://en.wikipedia.org/wiki/Seq_%28Unix%29" rel="nofollow">https://en.wikipedia.org/wiki/Seq_(Unix)</a></p>
<p>but briefly, it is a command-line utility that takes 1 to 3 arguments (some being optional), the start, stop and step, and prints numbers from the start value to the stop value, on standard output. So seq has many uses in bigger commands or scripts; a common category of use is to quickly generate multiple filenames or other strings that contain numbers in them, for exhaustive testing, load testing or other purposes. A similar command called jot is found on some Unix systems.</p>
<p>This recipe does not try to be exactly the same in functionality as seq. It has some differences. However the core functionality of generating integer sequences is the same (but without steps other than 1 for the range).</p>
<p>More details and sample output are here:</p>
<p><a href="https://jugad2.blogspot.in/2017/01/an-unix-seq-like-utility-in-python.html" rel="nofollow">https://jugad2.blogspot.in/2017/01/an-unix-seq-like-utility-in-python.html</a></p>
<p>The code is below.</p>
A simple raw hexdumper. (Python)
2016-09-19T13:24:37-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/580697-a-simple-raw-hexdumper/
<p style="color: grey">
Python
recipe 580697
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/fs_uae/">fs_uae</a>, <a href="/recipes/tags/hex/">hex</a>, <a href="/recipes/tags/hexdump/">hexdump</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/raw_hexdump/">raw_hexdump</a>, <a href="/recipes/tags/unix/">unix</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>This is not a hexreader. This code creates a raw hexdump of a binary file that is whitespace, optional, delimited. The dump is saved into the current directory with a ".hex" extension.</p>
<p>It works on just about any current platform but is designed around a stock Amiga A1200(HD) with Python 1.4.0. It also works on the current stable version 3.5.2.</p>
<p>I needed a hexdump some years ago for banging the Amiga hardware, and decided to modify recently for another usage but it had to still work on version 1.4.0 for the classic A1200.</p>
<p>Enjoy...</p>
Daemon to create a wifi hotspot on linux (Python)
2014-07-08T04:45:27-07:00Prahlad Yerihttp://code.activestate.com/recipes/users/4190347/http://code.activestate.com/recipes/578904-daemon-to-create-a-wifi-hotspot-on-linux/
<p style="color: grey">
Python
recipe 578904
by <a href="/recipes/users/4190347/">Prahlad Yeri</a>
(<a href="/recipes/tags/hotspot/">hotspot</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/wifi/">wifi</a>).
</p>
<p>This recipe is based on Hotspotd, a small linux daemon to create a wifi hotspot on linux. It depends on hostapd for AP provisioning and dnsmasq to assign IP addresses to devices.</p>
<p>Hotspotd works by creating a virtual NAT (Network address transation) table between your connected device and the internet using iptables.</p>
A simple shell script to keep the wife off of your back... (Bash)
2013-12-09T20:05:49-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578781-a-simple-shell-script-to-keep-the-wife-off-of-your/
<p style="color: grey">
Bash
recipe 578781
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/reminder/">reminder</a>, <a href="/recipes/tags/script/">script</a>, <a href="/recipes/tags/shell/">shell</a>).
</p>
<p>How many times have you been asked to remember to do something from the other half whilst she is out for a short while.</p>
<p>For example: "You WILL check the dinner every few minutes won't you?"</p>
<p>And how many times did/do you forget?</p>
<p>Most of us have been there...</p>
<p>This is a simple kids level, practical learning, shell script that generates an "xterm" with your reminder inside every 30 seconds for a period of 3 seconds.</p>
<p>It is always be the active front window for 3 seconds at a time to _annoy_ you into remembering.</p>
<p>Usage: reminder "What you have to remember here using spaces AND double quotes."<CR></p>
<p>Just reanme the downloaded script to reminder and remember to chmod it as required.</p>
<p>Just run it from your default terminal and when finished press Ctrl-C just AFTER the xterm window closes.</p>
<p>There is NO error detection so steer clear of any special characters in you reminder text.</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
determine google count by automatisation (Python)
2012-12-31T15:33:39-08:00Peer Valhoegenhttp://code.activestate.com/recipes/users/4184749/http://code.activestate.com/recipes/578392-determine-google-count-by-automatisation/
<p style="color: grey">
Python
recipe 578392
by <a href="/recipes/users/4184749/">Peer Valhoegen</a>
(<a href="/recipes/tags/count/">count</a>, <a href="/recipes/tags/google/">google</a>, <a href="/recipes/tags/linux/">linux</a>).
Revision 2.
</p>
<p>Sometimes you need o know the number of results that google gets for a specific query.
There are lots of scripts that claim to do that, but I didn't find any that worked.
They mostly rely on urllib, which is blocked by Google.</p>
<p>This script automates what you would do by hand.
It is therefore incredibly slow, but it works and seems future proof to me.</p>
<p>You may want to adjust the respective timespan that is waited before certain operations.
This script relies on the unix command xsel.
I'm sure there are equivalent solutions on other operating systems.</p>
Colo(u)rs Inside Text Mode Python... (Python)
2012-08-21T21:01:57-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578101-colours-inside-text-mode-python/
<p style="color: grey">
Python
recipe 578101
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</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/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
Revision 2.
</p>
<p>A simple DEMO to show how to enhance Python inside a Terminal. This works on Classic AMIGAs, E-UAE,
Debian Linux 6.0.0, PCLinuxOS 2009, Windows XP and Vista and WinUAE, from Python 1.4.0 to 3.3A2.</p>
<p>Due to a complaint about my _fun_ upload recently I decided to post this so that the MANY can now
find out how to manipulate text inside a Python Terminal window so that it looks much better.</p>
<p>Read the code for more information...</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<p>Bazza...</p>
Yet Another Python Generator... (Python)
2011-12-19T08:14:55-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577990-yet-another-python-generator/
<p style="color: grey">
Python
recipe 577990
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/signal/">signal</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/source/">source</a>, <a href="/recipes/tags/sweep/">sweep</a>).
</p>
<p>Aha, but not what big guns were expecting...</p>
<p>LF Audio Sweep Generator.</p>
<p>Another kids level project to do for yourselves...</p>
<p>This is a Python DEMO to show the power of the sound card using Linux to
generate an Audio Sweep Signal from 4KHz down to 100Hz and back again.</p>
<p>Written in such a way that anyone can understand how it works...
This is for Linux and Python 2.x.x. Read the code for much more information, and......
A Python 3.x.x version is here:-</p>
<p><a href="http://www.linuxformat.com/forums/viewtopic.php?t=14411" rel="nofollow">http://www.linuxformat.com/forums/viewtopic.php?t=14411</a></p>
<p>Enjoy finding simple solutions to often VERY difficult problems...</p>
<p>Bazza, G0LCU...</p>
A DEMO Frequency Counter With A Difference - Text Mode Python. (Python)
2011-11-21T18:00:43-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577955-a-demo-frequency-counter-with-a-difference-text-mo/
<p style="color: grey">
Python
recipe 577955
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/counter/">counter</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/frequency/">frequency</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/sound/">sound</a>).
</p>
<p>Hi experts...</p>
<p>I think that this is a first... ;o)</p>
<p>Another kids level project to do for yourselves...</p>
<p>This is yet another Python DEMO to show the power of the sound card using
Linux as an audio frequency counter.</p>
<p>It is a kids level project that uses the sound card as an input through the
microphone socket to measure up to >3500Hz from a symmetrical waveform, sine
square or triangle. See the comments inside the code for more details...</p>
<p>The only external hardware required is a test lead; oh my, this is technical
stuff... ;o)</p>
<p>This is for Python 2.x.x, (probably even down to 1.5.2) but it would be
just as easy to make it work on 3.x.x. I've already done it......</p>
<p>......But I'll let the big guns do that for you...</p>
<p>Enjoy finding simple solutions to often VERY difficult problems...</p>
<p>Be aware of word wrapping etc...</p>
<p>Bazza, G0LCU...</p>
And Now For Something COMPLETELY Different Using Text Mode Python... (Python)
2011-10-26T19:24:32-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577924-and-now-for-something-completely-different-using-t/
<p style="color: grey">
Python
recipe 577924
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/sound/">sound</a>).
</p>
<p>Hi experts...</p>
<p>A kids level project to do for yourselves...</p>
<p>This is a Python DEMO to show the power of the sound card using Linux for
a specific usage that I need(ed). It is a kids level project that uses the
sound card as a variable DC Voltage reference for projects like stabilised
linear PSUs. Why linear? Relatively clean RF wise...</p>
<p>The TEST circuit is inside the code and is SOOO simple a dexterous 10 year
old could make it in less than an hour and have it up and running to start
using...</p>
<p>My own circuit is just as simple, isolated, and, gives me MUCH more voltage
range than the one inside the code... How did I do it? ;o)</p>
<p>This is for Python 2.x.x, (probably even down to 1.5.2) but it would be
just as easy to make it work on 3.x.x.
I'll let the big guns do that...</p>
<p>Enjoy finding simple solutions to often VERY difficult problems...</p>
<p>Be aware of word wrapping etc...</p>
<p>Bazza, G0LCU...</p>
IOPS calculator (Python)
2011-09-20T09:31:09-07:00Slava Yansonhttp://code.activestate.com/recipes/users/4176967/http://code.activestate.com/recipes/577873-iops-calculator/
<p style="color: grey">
Python
recipe 577873
by <a href="/recipes/users/4176967/">Slava Yanson</a>
(<a href="/recipes/tags/iops/">iops</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/performance/">performance</a>, <a href="/recipes/tags/sysadmin/">sysadmin</a>).
</p>
<p>Calculates IOPS for all disks in Linux/Unix system</p>
Locate thumbnail file (Python)
2009-11-02T06:22:33-08:00Rajahttp://code.activestate.com/recipes/users/4172172/http://code.activestate.com/recipes/576942-locate-thumbnail-file/
<p style="color: grey">
Python
recipe 576942
by <a href="/recipes/users/4172172/">Raja</a>
(<a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/thumbnail/">thumbnail</a>).
Revision 2.
</p>
<p>On unix systems following the free desktop standards, locate the thumbnail image for any file, if present. Needs Python 2.5.</p>
High level inotify wrapper (Python)
2008-09-21T05:17:23-07:00Louis RIVIEREhttp://code.activestate.com/recipes/users/4035877/http://code.activestate.com/recipes/576377-high-level-inotify-wrapper/
<p style="color: grey">
Python
recipe 576377
by <a href="/recipes/users/4035877/">Louis RIVIERE</a>
(<a href="/recipes/tags/inotify/">inotify</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/system/">system</a>).
Revision 4.
</p>
<p>This is an exemple to show how to use the inotify module, it could be very usefull unchanged though.</p>
<p>A Watcher instance let you define callbacks for any event that occur on any file or directory and subdirectories.</p>
<p>The inotify module is from <a href="http://code.activestate.com/recipes/576375/">Recipe 576375</a></p>