Popular recipes by Jason Whitlark http://code.activestate.com/recipes/users/302240/2006-11-17T01:07:04-08:00ActiveState Code RecipesForce verbose mode for unittests in an IDE. (Python)
2004-10-18T01:34:39-07:00Jason Whitlarkhttp://code.activestate.com/recipes/users/302240/http://code.activestate.com/recipes/310547-force-verbose-mode-for-unittests-in-an-ide/
<p style="color: grey">
Python
recipe 310547
by <a href="/recipes/users/302240/">Jason Whitlark</a>
(<a href="/recipes/tags/debugging/">debugging</a>).
</p>
<p>When running unit tests, using the verbose flag often provides an extra level of protection against mistakes. When running from the command line, this simply means adding the v option. If you use an IDE, matters become more complicated. While you can often set your IDE to pass in the v option when running a file, this has a number of drawbacks. This code will ensure that your tests will run with the verbose option.</p>
Python prompt from explorer (Python)
2004-08-30T01:29:03-07:00Jason Whitlarkhttp://code.activestate.com/recipes/users/302240/http://code.activestate.com/recipes/302547-python-prompt-from-explorer/
<p style="color: grey">
Python
recipe 302547
by <a href="/recipes/users/302240/">Jason Whitlark</a>
(<a href="/recipes/tags/shortcuts/">shortcuts</a>).
</p>
<p>If you use the command prompt here powertoy, you might find this useful. Right click on any folder and select Python Shell Here, and an that opens up in the directory you selected.</p>
one liner frequency count (Python)
2006-11-17T01:07:04-08:00Jason Whitlarkhttp://code.activestate.com/recipes/users/302240/http://code.activestate.com/recipes/277600-one-liner-frequency-count/
<p style="color: grey">
Python
recipe 277600
by <a href="/recipes/users/302240/">Jason Whitlark</a>
(<a href="/recipes/tags/shortcuts/">shortcuts</a>).
Revision 2.
</p>
<p>You often see frequency counts done with dicts, requiring serveral lines of code. Here is a way to do it in one line using itertools and list comprehensions. This revised version was suggested by Raymon Hettinger. It is O(n log n).</p>
Quickly remove or order columns in a list of lists (Python)
2003-03-28T20:27:26-08:00Jason Whitlarkhttp://code.activestate.com/recipes/users/302240/http://code.activestate.com/recipes/192401-quickly-remove-or-order-columns-in-a-list-of-lists/
<p style="color: grey">
Python
recipe 192401
by <a href="/recipes/users/302240/">Jason Whitlark</a>
.
</p>
<p>I've often needed to take out or reorder the columns in a list of lists. I'm embarrased to say it took me a while to think of this, it's so simple, but I looked around and have not found any examples of it, so...</p>