Latest recipes tagged "test"http://code.activestate.com/recipes/tags/test/new/2012-07-02T22:44:58-07:00ActiveState Code RecipesZcgi Test (Python)
2012-07-02T22:44:58-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578185-zcgi-test/
<p style="color: grey">
Python
recipe 578185
by <a href="/recipes/users/2608421/">Stephen Chappell</a>
(<a href="/recipes/tags/archive/">archive</a>, <a href="/recipes/tags/cgi/">cgi</a>, <a href="/recipes/tags/old/">old</a>, <a href="/recipes/tags/test/">test</a>).
</p>
<p>While trying to implement a bare-bones CGI module with little support for the then-new-to-me concept, the <code>Zcgi</code> module was written, and this experiment was designed to test what it could do. This is committed for archival to be run under Python 2.5 or later versions.</p>
Bitmap Maker (Python)
2011-04-21T13:08:46-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/577674-bitmap-maker/
<p style="color: grey">
Python
recipe 577674
by <a href="/recipes/users/2608421/">Stephen Chappell</a>
(<a href="/recipes/tags/experiment/">experiment</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/proof_of_concept/">proof_of_concept</a>, <a href="/recipes/tags/test/">test</a>).
</p>
<p>A friend and I were discussing the possibility of creating every possible image that is 800x600x24 (800 pixels wide by 600 pixels tall and using 24-bit color). This recipe is a proof-of-concept program showing what is possible with just a 2x2 image using 15 different colors (yielding a total of 50,625 images when run). In terms of the original thought experiment, a total of <code>16777216 ** 480000</code> images should be possible given the 800x600x24 specifications (or <code>1 << 11520000</code> in binary). In base 10 that is <code>10 ** 3467865.55</code> and shows that there are an enormous number of possible states that a 800x600 canvas can take.</p>
<p>If you have any comments or wish to down-vote this recipe, please provide your insight as to what could be improved upon and how you would go about fixing any problems that you might find.</p>