Most viewed recipes tagged "the"http://code.activestate.com/recipes/tags/the/views/2015-01-03T02:04:02-08:00ActiveState Code RecipesSnake the game (Python)
2015-01-03T02:04:02-08:00Burak Tandoganhttp://code.activestate.com/recipes/users/4191373/http://code.activestate.com/recipes/578996-snake-the-game/
<p style="color: grey">
Python
recipe 578996
by <a href="/recipes/users/4191373/">Burak Tandogan</a>
(<a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/pygame/">pygame</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/snake/">snake</a>, <a href="/recipes/tags/the/">the</a>).
Revision 3.
</p>
<p>Popular Snake game with Python-Pygame module. <strong>Important:</strong> If you try to run this script without special <strong>png-wav</strong> files it will fail, you have to put following files to a directory with this script. "apple.png","snakehead.png","intro.wav","dead.wav". They are basically apple picture, head of snake, intro sound and dead sound.Without them script will not run. Just make inactive the statements intro.wav and dead.wav, and find a little apple picture and snake head :).Or you can play the game just install it. <strong>Here is the installer:</strong> <a href="http://dosya.co/7c6f15c0f4d04514/Flafel-1.26-win32.rar" rel="nofollow">http://dosya.co/7c6f15c0f4d04514/Flafel-1.26-win32.rar</a>
It will install the game in program files, you can find it in search "Flafel" and click to Flafel.exe. </p>
Getting the SHA-1 (or MD5) hash of a directory (Python)
2009-12-06T19:02:40-08:00Stephen Akikihttp://code.activestate.com/recipes/users/4172143/http://code.activestate.com/recipes/576973-getting-the-sha-1-or-md5-hash-of-a-directory/
<p style="color: grey">
Python
recipe 576973
by <a href="/recipes/users/4172143/">Stephen Akiki</a>
(<a href="/recipes/tags/directory/">directory</a>, <a href="/recipes/tags/getting/">getting</a>, <a href="/recipes/tags/hash/">hash</a>, <a href="/recipes/tags/md5/">md5</a>, <a href="/recipes/tags/sha_1/">sha_1</a>, <a href="/recipes/tags/the/">the</a>).
Revision 4.
</p>
<h5><a href="http://akiscode.com/articles/sha-1directoryhash.shtml" rel="nofollow">http://akiscode.com/articles/sha-1directoryhash.shtml</a></h5>
<p>By definition a cryptographic hash is, "a deterministic procedure that takes an arbitrary block of data and returns a fixed-size bit string, the (cryptographic) hash value, such that an accidental or intentional change to the data will change the hash value". </p>
<p>Usually these hashes are used on files to "fingerprint" them, but in order to do the same to a directory you have to do something like this: </p>
The Poem ( in Python) (Python)
2008-08-08T10:39:50-07:00Marcello(Harry) Bontempo Salgueirohttp://code.activestate.com/recipes/users/4166255/http://code.activestate.com/recipes/576413-the-poem-in-python/
<p style="color: grey">
Python
recipe 576413
by <a href="/recipes/users/4166255/">Marcello(Harry) Bontempo Salgueiro</a>
(<a href="/recipes/tags/in/">in</a>, <a href="/recipes/tags/poem/">poem</a>, <a href="/recipes/tags/the/">the</a>).
</p>
<p>This is my first poem writing in python.
Why i do that?
I do because i saw some perl poems and not so much in python, just it! =)
Python developers let's go express your art, and domain of langague Python...!!!!
ihulllllllllllllllll!!!
see ya!</p>
<p>marcello.</p>
Bash completed man and info pages generation (Python)
2011-08-24T03:14:13-07:00Josh Dhttp://code.activestate.com/recipes/users/4179060/http://code.activestate.com/recipes/577854-bash-completed-man-and-info-pages-generation/
<p style="color: grey">
Python
recipe 577854
by <a href="/recipes/users/4179060/">Josh D</a>
(<a href="/recipes/tags/a/">a</a>, <a href="/recipes/tags/all/">all</a>, <a href="/recipes/tags/and/">and</a>, <a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/be/">be</a>, <a href="/recipes/tags/command/">command</a>, <a href="/recipes/tags/completed/">completed</a>, <a href="/recipes/tags/consume/">consume</a>, <a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/first/">first</a>, <a href="/recipes/tags/generation/">generation</a>, <a href="/recipes/tags/get/">get</a>, <a href="/recipes/tags/in/">in</a>, <a href="/recipes/tags/info/">info</a>, <a href="/recipes/tags/line/">line</a>, <a href="/recipes/tags/man/">man</a>, <a href="/recipes/tags/modify/">modify</a>, <a href="/recipes/tags/must/">must</a>, <a href="/recipes/tags/only/">only</a>, <a href="/recipes/tags/pages/">pages</a>, <a href="/recipes/tags/possibilties/">possibilties</a>, <a href="/recipes/tags/possiblities/">possiblities</a>, <a href="/recipes/tags/py/">py</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/run/">run</a>, <a href="/recipes/tags/script/">script</a>, <a href="/recipes/tags/so/">so</a>, <a href="/recipes/tags/tab/">tab</a>, <a href="/recipes/tags/terminal/">terminal</a>, <a href="/recipes/tags/the/">the</a>, <a href="/recipes/tags/this/">this</a>, <a href="/recipes/tags/to/">to</a>).
Revision 6.
</p>
<p>The script it self is very self explaining - the task is simple.
*NIX only unless with cygwin perhaps?</p>
<p>To start this open a terminal and strike the "Tab" key to get all possibilities (strike y, and strike the space key alot). Select all then Copy and save in "comms.txt"
Modify the file so ONLY the possiblities consume a line; no prompts or extra newlines.
(first line must be a command, the last line must be a command)</p>
<p>Save the file ("~/Documents/bashing/comms.txt" is my path) then run this script in "~/Documents/bashing/".</p>
<p>This generates two (2) files: "bash_help_man.sh", "bash_help_info.sh".</p>
<p>Then it runs these files: "bash bash_help_man.sh", "bash bash_help_info.sh".</p>
<p>This produces 2 files for every command (every line) in "comms.txt".
All manpages are wrote in "mans/", all infopages are wrote in "infos/"</p>
<p>There is now alot of files to read and organize; lets separate these by size.
Directories are under1kb, under2kb, etc.</p>
<p>Once complete do as you wish the files less than 128 kb;
these files are COPIED into there new respective home, I repeat COPIED.</p>
<p>The files 128 kb and higher ARE NOT copied to anywhere!</p>