Top-rated recipes by philip nunez http://code.activestate.com/recipes/users/136492/top/2001-12-10T20:10:09-08:00ActiveState Code RecipesUse try/except to handle unexpected input from raw_input. (Python)
2001-12-10T20:10:09-08:00philip nunezhttp://code.activestate.com/recipes/users/136492/http://code.activestate.com/recipes/101853-use-tryexcept-to-handle-unexpected-input-from-raw_/
<p style="color: grey">
Python
recipe 101853
by <a href="/recipes/users/136492/">philip nunez</a>
(<a href="/recipes/tags/ui/">ui</a>).
</p>
<p>Minesweeper expects the user to enter properly bounded integers for
moves. Should the user enter something unexpected, the resulting exception
can be caught and handled in some way other than exiting.</p>
n-dimensional loop iterator object (Python)
2001-11-01T13:58:56-08:00philip nunezhttp://code.activestate.com/recipes/users/136492/http://code.activestate.com/recipes/84739-n-dimensional-loop-iterator-object/
<p style="color: grey">
Python
recipe 84739
by <a href="/recipes/users/136492/">philip nunez</a>
(<a href="/recipes/tags/algorithms/">algorithms</a>).
</p>
<p>Do nested for loops on an arbitrary list of iterable things.</p>
hash a string (preferably your name) to an alter ego description (Python)
2001-10-23T16:32:04-07:00philip nunezhttp://code.activestate.com/recipes/users/136492/http://code.activestate.com/recipes/83206-hash-a-string-preferably-your-name-to-an-alter-ego/
<p style="color: grey">
Python
recipe 83206
by <a href="/recipes/users/136492/">philip nunez</a>
(<a href="/recipes/tags/ui/">ui</a>).
</p>
<p>What is your Viking name? This script will tell you.</p>
pulse (Python)
2001-10-17T23:21:51-07:00philip nunezhttp://code.activestate.com/recipes/users/136492/http://code.activestate.com/recipes/82347-pulse/
<p style="color: grey">
Python
recipe 82347
by <a href="/recipes/users/136492/">philip nunez</a>
.
</p>
<p>Execute a command-line argument repeatedly between arbitrary intervals of time.</p>
random 3 CNF problem generator (Python)
2001-10-17T23:09:15-07:00philip nunezhttp://code.activestate.com/recipes/users/136492/http://code.activestate.com/recipes/82346-random-3-cnf-problem-generator/
<p style="color: grey">
Python
recipe 82346
by <a href="/recipes/users/136492/">philip nunez</a>
(<a href="/recipes/tags/algorithms/">algorithms</a>).
</p>
<p>Given the number of literals and clauses, returns a randomly generated
3-CNF sentence composed of clauses in the form of lists of tuples.
The first number in the tuple is the literal; the second number is its truth value.</p>
pykill (Python)
2001-10-17T23:02:04-07:00philip nunezhttp://code.activestate.com/recipes/users/136492/http://code.activestate.com/recipes/82345-pykill/
<p style="color: grey">
Python
recipe 82345
by <a href="/recipes/users/136492/">philip nunez</a>
(<a href="/recipes/tags/sysadmin/">sysadmin</a>).
</p>
<p>A python script very loosely approximating pkill.</p>