Popular recipes tagged "formats" but not "files" and "python"http://code.activestate.com/recipes/tags/formats-files-python/2017-03-12T23:10:48-07:00ActiveState Code RecipesNumber of bits needed to store an integer, and its binary representation (Python) 2017-03-12T23:10:48-07:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580762-number-of-bits-needed-to-store-an-integer-and-its-/ <p style="color: grey"> Python recipe 580762 by <a href="/recipes/users/4173351/">Vasudev Ram</a> (<a href="/recipes/tags/binary/">binary</a>, <a href="/recipes/tags/formats/">formats</a>, <a href="/recipes/tags/integers/">integers</a>, <a href="/recipes/tags/numbers/">numbers</a>, <a href="/recipes/tags/representation/">representation</a>, <a href="/recipes/tags/type/">type</a>). </p> <p>This recipe shows how to find, via Python code, the number of bits needed to store an integer, and how to generate its binary representation. It does this for integers from 0 to 256.</p> <p>More details and full output here:</p> <p><a href="https://jugad2.blogspot.in/2017/03/find-number-of-bits-needed-to-store.html" rel="nofollow">https://jugad2.blogspot.in/2017/03/find-number-of-bits-needed-to-store.html</a></p> RFC 822-style parser (Python) 2010-01-09T22:46:42-08:00Karl Dickmanhttp://code.activestate.com/recipes/users/4172760/http://code.activestate.com/recipes/576996-rfc-822-style-parser/ <p style="color: grey"> Python recipe 576996 by <a href="/recipes/users/4172760/">Karl Dickman</a> (<a href="/recipes/tags/data/">data</a>, <a href="/recipes/tags/formats/">formats</a>). Revision 7. </p> <p>In <em>The Art of Unix Programming</em>, Eric S. Raymond describes a data file metaformat based on RFC 822. [http://www.faqs.org/docs/artu/ch05s02.html#id2902039] This is a simple parser for that format.</p>