Popular Python recipes tagged "prefix"http://code.activestate.com/recipes/langs/python/tags/prefix/2010-05-06T17:09:44-07:00ActiveState Code RecipesDecimal and binary prefix Python snippet (Python) 2010-05-06T17:09:44-07:00Romain Dartigueshttp://code.activestate.com/recipes/users/4167472/http://code.activestate.com/recipes/577220-decimal-and-binary-prefix-python-snippet/ <p style="color: grey"> Python recipe 577220 by <a href="/recipes/users/4167472/">Romain Dartigues</a> (<a href="/recipes/tags/binary/">binary</a>, <a href="/recipes/tags/decimal/">decimal</a>, <a href="/recipes/tags/prefix/">prefix</a>). </p> <p>Really short snipped of a decimal and binary prefix calculator in Python.</p> <p>Without covering the entire International System of Units (SI) range, it does fit my daily needs. <br /> The code could be <em>way</em> smarter, but i wanted to keep the recipe as basic as i could.</p> <p>Tested on <code>Python 2.4.1</code> and <code>2.6.4;</code> could work on lower as well.</p> Metric Prefix Symbol and Decimal Quiz (Python) 2009-10-11T18:39:58-07:00Daniel Sahahttp://code.activestate.com/recipes/users/4171644/http://code.activestate.com/recipes/576928-metric-prefix-symbol-and-decimal-quiz/ <p style="color: grey"> Python recipe 576928 by <a href="/recipes/users/4171644/">Daniel Saha</a> (<a href="/recipes/tags/base/">base</a>, <a href="/recipes/tags/decimal/">decimal</a>, <a href="/recipes/tags/metric/">metric</a>, <a href="/recipes/tags/prefix/">prefix</a>, <a href="/recipes/tags/symbol/">symbol</a>, <a href="/recipes/tags/units/">units</a>). Revision 3. </p> <p>Quiz on the metric prefixs, symbols, and decimals associated with each other.</p> Simple reverse converter of unicode code points string (Python) 2009-09-22T20:02:32-07:00Ryanhttp://code.activestate.com/recipes/users/4171767/http://code.activestate.com/recipes/576909-simple-reverse-converter-of-unicode-code-points-st/ <p style="color: grey"> Python recipe 576909 by <a href="/recipes/users/4171767/">Ryan</a> (<a href="/recipes/tags/code/">code</a>, <a href="/recipes/tags/points/">points</a>, <a href="/recipes/tags/prefix/">prefix</a>, <a href="/recipes/tags/reverse/">reverse</a>, <a href="/recipes/tags/str/">str</a>, <a href="/recipes/tags/string/">string</a>, <a href="/recipes/tags/u/">u</a>, <a href="/recipes/tags/unicode/">unicode</a>). Revision 4. </p> <p>It's a simple recipe to convert a str type string with pure unicode code point (e.g string = <strong>"\u5982\u679c\u7231"</strong> ) to an unicode type string. Actually, this method has the same effect with <strong>'u'</strong> prefix. But differently, it allows you to pass a variable of code points string as well as a constant one.</p>