Popular recipes tagged "meta:loc=125"http://code.activestate.com/recipes/tags/meta:loc=125/2014-09-20T08:16:57-07:00ActiveState Code RecipesBytes-to-human / human-to-bytes converter (Python)
2012-02-02T16:09:52-08:00Giampaolo RodolĂ http://code.activestate.com/recipes/users/4178764/http://code.activestate.com/recipes/578019-bytes-to-human-human-to-bytes-converter/
<p style="color: grey">
Python
recipe 578019
by <a href="/recipes/users/4178764/">Giampaolo RodolĂ </a>
(<a href="/recipes/tags/bytes/">bytes</a>, <a href="/recipes/tags/conversion/">conversion</a>, <a href="/recipes/tags/converter/">converter</a>, <a href="/recipes/tags/human/">human</a>, <a href="/recipes/tags/humanize/">humanize</a>, <a href="/recipes/tags/string/">string</a>).
Revision 15.
</p>
<p>Here goes.</p>
asskick.py (Python)
2014-09-20T08:16:57-07:00p@ntut$http://code.activestate.com/recipes/users/4183895/http://code.activestate.com/recipes/578940-asskickpy/
<p style="color: grey">
Python
recipe 578940
by <a href="/recipes/users/4183895/">p@ntut$</a>
(<a href="/recipes/tags/kickass/">kickass</a>, <a href="/recipes/tags/search/">search</a>, <a href="/recipes/tags/torrents/">torrents</a>).
</p>
<p>URL: <a href="http://pantuts.com/2014/09/20/asskick-py-python-script-search-download-torrents-kickass/" rel="nofollow">http://pantuts.com/2014/09/20/asskick-py-python-script-search-download-torrents-kickass/</a></p>
<p>Python script to search and download torrents from KickAss torrents.</p>
A DEMO 6 Bit At A Glance Colouerd Bargraph Generator. (Bash)
2013-01-16T12:26:55-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578391-a-demo-6-bit-at-a-glance-colouerd-bargraph-generat/
<p style="color: grey">
Bash
recipe 578391
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/apple/">apple</a>, <a href="/recipes/tags/bargraph/">bargraph</a>, <a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/beep/">beep</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/generator/">generator</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>).
Revision 2.
</p>
<p>This code generates a horizontal coloured real time bargraph generator anim for a Macbook Pro 13 inch, OSX 10.7.5, using the default standard Terminal only.</p>
<p>It is UNTESTED on Linux variants but I would like any successful Linux tryers to make a comment in the comments section and tags will be added accordingly otherwise I will assume it does NOT work on other UNIX like variants.</p>
<p>It is a derivative of my 7 bit bargraph generator for Python on this site elsewhere.</p>
<p>The Terminal colours WILL be changed on running but it is simple to return it back to its original state.</p>
<p>Read the code for more information.</p>
<p>Enjoy, (and a Happy New Year)...</p>
<p>Bazza, G0LCU...</p>
EXIF-date-based JPEG files rename using PIL (Python)
2012-07-21T02:38:33-07:00Jorge Barnabyhttp://code.activestate.com/recipes/users/4182918/http://code.activestate.com/recipes/578219-exif-date-based-jpeg-files-rename-using-pil/
<p style="color: grey">
Python
recipe 578219
by <a href="/recipes/users/4182918/">Jorge Barnaby</a>
(<a href="/recipes/tags/date/">date</a>, <a href="/recipes/tags/exif/">exif</a>, <a href="/recipes/tags/jfif/">jfif</a>, <a href="/recipes/tags/jpeg/">jpeg</a>, <a href="/recipes/tags/jpg/">jpg</a>, <a href="/recipes/tags/photo/">photo</a>, <a href="/recipes/tags/pil/">pil</a>, <a href="/recipes/tags/rename/">rename</a>).
Revision 2.
</p>
<p>Rename JPEG files according to EXIF-date using PIL [library].</p>
<p>If global variable CREATE_HARDLINK is set, script creates Windows (XP) batch file
for creating hardlink version of source files.</p>
<p>PIL available here: <a href="http://www.pythonware.com/products/pil/" rel="nofollow">http://www.pythonware.com/products/pil/</a></p>
objectsignature - debugging utility, will work with containers, classes, nested classes ... almost anything (Python)
2012-02-15T23:05:44-08:00Boris Katshttp://code.activestate.com/recipes/users/4180778/http://code.activestate.com/recipes/578039-objectsignature-debugging-utility-will-work-with-c/
<p style="color: grey">
Python
recipe 578039
by <a href="/recipes/users/4180778/">Boris Kats</a>
(<a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/objectsignature/">objectsignature</a>, <a href="/recipes/tags/objectview/">objectview</a>).
Revision 3.
</p>
<p>Small debug utility will help to detect unwonted changes of user's class during program execution.</p>
Patch/diff file viewer with highlighting (Python)
2010-10-29T10:48:15-07:00Anton Butanaevhttp://code.activestate.com/recipes/users/4175501/http://code.activestate.com/recipes/577436-patchdiff-file-viewer-with-highlighting/
<p style="color: grey">
Python
recipe 577436
by <a href="/recipes/users/4175501/">Anton Butanaev</a>
(<a href="/recipes/tags/cvs/">cvs</a>, <a href="/recipes/tags/diff/">diff</a>, <a href="/recipes/tags/git/">git</a>, <a href="/recipes/tags/gui/">gui</a>).
Revision 4.
</p>
<p>diff shows difference in files in whole lines. Sometimes those lines are very similar, only one or two words changed. This script compares changed lines by characters and highlights actual differences in them.</p>
Gravity Simulation Applet (Java)
2010-03-26T17:50:43-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577151-gravity-simulation-applet/
<p style="color: grey">
Java
recipe 577151
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/applet/">applet</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/physics/">physics</a>).
</p>
<p>It displays the trajectories of N mass particles moving under the force of gravity in 2D space.
The repeating patterns mean particles started orbiting each other.</p>
Purge Mysql binary logs (Python)
2010-01-12T15:14:10-08:00Umang Gopanihttp://code.activestate.com/recipes/users/4172787/http://code.activestate.com/recipes/577004-purge-mysql-binary-logs/
<p style="color: grey">
Python
recipe 577004
by <a href="/recipes/users/4172787/">Umang Gopani</a>
(<a href="/recipes/tags/automate/">automate</a>, <a href="/recipes/tags/binary_logs/">binary_logs</a>, <a href="/recipes/tags/master_slave/">master_slave</a>, <a href="/recipes/tags/mysql/">mysql</a>, <a href="/recipes/tags/purge/">purge</a>).
Revision 8.
</p>
<p>Being a MySQL DBA , one faces a common issue in replication environment -> Disk space issue on master, since the number of binary logs have increased.
Now, one of the solution to this would be using expire_logs_days parameter in your mysql config file.
But what if, the slave is lagging by few hours or if the slave is broken since few days and the binary logs are removed due to the parameter set. Whenever the salve comes up, it will go bonkers, knowing that the binary log where it last stopped no more exists.</p>
<p>I faced this issue a couple of time until I decided to automate it using a script. Herewith I am attaching a python script which can run regularly in cron.</p>
Iterate over .MP4 atoms (Python)
2006-08-23T14:56:34-07:00Christos Georgiouhttp://code.activestate.com/recipes/users/418040/http://code.activestate.com/recipes/496984-iterate-over-mp4-atoms/
<p style="color: grey">
Python
recipe 496984
by <a href="/recipes/users/418040/">Christos Georgiou</a>
(<a href="/recipes/tags/files/">files</a>).
</p>
<p>This recipe yields the atoms contained in an MP4 file. Mostly used for extracting the tags contained in it (artist, title etc) using a convenience class (M4ATags). Implemented as an generator.</p>
Recursive FTP. (Tcl)
2005-12-06T23:42:57-08:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/461612-recursive-ftp/
<p style="color: grey">
Tcl
recipe 461612
by <a href="/recipes/users/1220635/">Patrick Finnegan</a>
(<a href="/recipes/tags/network/">network</a>).
</p>
<p>Recursively FTP from top level directory down creating directory structure on remote FTP Server.</p>
Thread-safe MultiQueue (Python)
2005-02-05T17:13:00-08:00Dominic Foxhttp://code.activestate.com/recipes/users/1951506/http://code.activestate.com/recipes/365640-thread-safe-multiqueue/
<p style="color: grey">
Python
recipe 365640
by <a href="/recipes/users/1951506/">Dominic Fox</a>
(<a href="/recipes/tags/threads/">threads</a>).
Revision 3.
</p>
<p>A class that contains a dictionary of named queues, with read requests blocking until a message has been added to any one of a supplied list of queues.</p>
Example application framework (Tcl)
2001-09-20T12:50:25-07:00Paul Obermeierhttp://code.activestate.com/recipes/users/130521/http://code.activestate.com/recipes/68426-example-application-framework/
<p style="color: grey">
Tcl
recipe 68426
by <a href="/recipes/users/130521/">Paul Obermeier</a>
(<a href="/recipes/tags/binding/">binding</a>).
</p>
<p>This script demonstrates how to create a Windows-alike application.
It may serve as a starting point for your own applications.</p>