Popular recipes tagged "digits" but not "gtin"http://code.activestate.com/recipes/tags/digits-gtin/2013-08-09T18:15:09-07:00ActiveState Code RecipesA Simple Clock, Well Maybe Not That Simple... (Bash) 2013-07-17T17:40:18-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578610-a-simple-clock-well-maybe-not-that-simple/ <p style="color: grey"> Bash recipe 578610 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/clock/">clock</a>, <a href="/recipes/tags/digital/">digital</a>, <a href="/recipes/tags/digits/">digits</a>, <a href="/recipes/tags/display/">display</a>, <a href="/recipes/tags/large/">large</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/readout/">readout</a>, <a href="/recipes/tags/terminal/">terminal</a>). </p> <p>Hi all...</p> <p>Do you remember this little snippet?</p> <p><a href="http://code.activestate.com/recipes/578079-pure-fun-for-text-mode-python/?in=user-4177147" rel="nofollow">http://code.activestate.com/recipes/578079-pure-fun-for-text-mode-python/?in=user-4177147</a></p> <p>Well it was voted down, but who cares? I surely don't! So to those that voted this FUN piece of Python coding down, you are now about to see what the aim was.</p> <p>However although I have subsequently done what I said I would, that is, to create large digits as an _at_a_glance_ digital readout for a project in Python I have decided not to upload it. However I have decided to let this one go as a bash/shell script instead.</p> <p>It is a nothing but a simple clock, well, maybe not that simple; but as I am into shell stuff at the moment I thought I would share this with you.</p> <p>The terminal does have its colours changed and the cursor disabled for the session but I expect you big guns to be able to return back to normal in a jiffy.</p> <p>I am an amateur coder and if that is easy for me then you pros should have no problems.</p> <p>This code is not like most of my other stuff as is NOT Public Domain...</p> <p>It is only a DEMO to see what an at a glance display would look like in a terminal.</p> <p>Move away to a distance and see which of the two time readings you can still read... ;o)</p> <p>It is for a Macbook Pro 13" OSX 10.7.5 and uses bash imode. It will probably work on most Linux machines too but I haven't tested it...</p> <p>This is purely a DEMO only and any other special effects, (e.g. flashing colon every second), alram, etc, I have already experimented with and is easy enough to do...</p> <p>My intention is to use this as a kids level text mode digital voltmeter I am doing.</p> <p>Enjoy...</p> <p>Bazza...</p> A Simple Clock, Well Maybe Not That Simple... (Python) 2013-08-09T18:15:09-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578633-a-simple-clock-well-maybe-not-that-simple/ <p style="color: grey"> Python recipe 578633 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/big/">big</a>, <a href="/recipes/tags/clock/">clock</a>, <a href="/recipes/tags/digits/">digits</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/time/">time</a>, <a href="/recipes/tags/winuae/">winuae</a>). </p> <p>BIG_TIME.py</p> <p>Remember this?</p> <p><a href="http://code.activestate.com/recipes/578610-a-simple-clock-well-maybe-not-that-simple/" rel="nofollow">http://code.activestate.com/recipes/578610-a-simple-clock-well-maybe-not-that-simple/</a></p> <p>And this?</p> <p><a href="http://code.activestate.com/recipes/578079-pure-fun-for-text-mode-python/?in=user-4177147" rel="nofollow">http://code.activestate.com/recipes/578079-pure-fun-for-text-mode-python/?in=user-4177147</a></p> <p>Well the Python version of the top URL has been uploaded to AMINET on 01-08-2013...</p> <p>Now the big gun that complained about my fun Python upload and voted it down can see that this was a serious attempt ae viewing "Hello World!" in extra large xharacters.</p> <p>This is the result in Python...</p> <p>It is ONLY uploaded to AMINET and that is where it will stay.</p> <p>If you want it then use the pointer inside code section.</p> <p>Remember to change the BIG_TIME.py.txt file on AMINET to BIG_TIME.py...</p> <p>Designed around a Macbook Pro OSX 10.7.5 for the Classic AMIGA platforms and works on Debian 6.0.x and PCLiuxOS 2009 using Python versions 1.4.0 to 3.3.2 inclusive...</p> <p>Although the description in the AMINET readme below is for an AMIGA environment it does not take a genius to adapt it to the other platforms...</p> <p>Boy was this difficult to get working in a single Python script...</p> <p>ENJOY...</p> <p>This is the AMINET readme file:-</p> <p>Short: A Big Digital Clock Python Script. Author: <a href="mailto:wisecracker@tesco.net">wisecracker@tesco.net</a> (Barry Walker) Uploader: <a href="mailto:wisecracker@tesco.net">wisecracker@tesco.net</a> (Barry Walker) Type: dev/src Version: 1.00.00 Architecture: generic; m68k-amigaos</p> <p>Distribution: Public Domain, Emailware.</p> <p>============================================================================</p> <h5 id="architectures-classic-amigas-e-uae-and-winuae">Architectures: Classic AMIGAs, E-UAE and WinUAE.</h5> <p>MINIMUM Requirements Are:-</p> <hr /> <pre class="prettyprint"><code> 68EC020 CPU and 2MB RAM total, example, a standard A1200(HD). WinUAE Version 1.5.3 minimum. Standard OS3.0x install or better. Python Version 1.4.0 or higher. (Also, OSX 10.7.5, Debian Linux 6.0.x and PCLinuxOS 2009.) </code></pre> <hr /> <h5 id="history">History.</h5> <p>01-08-2013. Version 1.00.00:- Original upload to AMINET...</p> <p>This is dedicated entirely to the AMIGA community and AMINET and will not be uploaded elsewhere.</p> <hr /> <p>To install just download the "BIG_TIME.py.txt" file and rename it to "BIG_TIME.py" without the quotes. Drag this file into your AMIGA PYTHON: volume and...</p> <p>From a minimum of Python Version 1.4.0 prompt:-</p> <pre class="prettyprint"><code>&gt;&gt;&gt; exec(open("PYTHON:BIG_TIME.py").read())&lt;CR&gt; </code></pre> <p>And away you go...</p> <p>This code is/was designed to work in all versions of Python from 1.4.0 to 3.3.2 on at least the platforms shown in the Architectures: section.</p> <p>It was developed entirely on a Macbook Pro OSX 10.7.5 and finalised using MEmacs for the AMIGA.</p> <hr /> <p>This is just a simple DEMO to show how to generate large digits in Python and put them to use as an _AT_A_GLANCE_ digital clock.</p> <p>It starts up by generating all of the characters available for the DEMO for five seconds then goes into the clock proper.</p> <p>As this code is multi platform AND multi Python version then it is issued as GPL2...</p> <p>Enjoy finding simple solutions to often very difficult problems...</p> <hr /> <pre class="prettyprint"><code> IMPORTANT:- ----------- The Legal Stuff:- ----------------- This Python script is issued under the GPL2 licence conditions. The author is not responsible for any damage to, or loss of, or failure of equipment or data caused in any way by the use of this script. There is NO warranty with the use of this software release and YOU USE IT AT YOUR OWN RISK. </code></pre> <hr /> <pre class="prettyprint"><code>Testing Evaluation:- -------------------- All WinUAE, E-UAE and Classic AMIGA test conditions were/are running standard OS3.0x/OS3.1x and using standard ~topaz 8~ fonts throughout. I have no idea what strange configuration setups will create so refer to the ~The Legal Stuff~ above. </code></pre> <hr /> <p>Contact:-</p> <hr /> <p>Mr Barry Walker, G0LCU.</p> <p>Email:- <a href="mailto:wisecracker@tesco.net">wisecracker@tesco.net</a></p> <p>Author of the ~TestGear?~ projects in the ~docs/hard~ drawer of AMINET.</p> <hr /> <p>A very useful HardWare related site, (C) Anthony Hoffman, for modifications, schematics, repairs and the like is:-</p> <pre class="prettyprint"><code> <a href="http://amiga.serveftp.net/">http://amiga.serveftp.net/</a> </code></pre> <p>============================================================================</p>