Latest recipes tagged "bits" Code Recipesinterleave bits (aka morton-ize aka z-order curve) (Python) 2011-02-02T12:50:58-08:00Romain Dartigues <p style="color: grey"> Python recipe 577558 by <a href="/recipes/users/4167472/">Romain Dartigues</a> (<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/bits/">bits</a>, <a href="/recipes/tags/manipulation/">manipulation</a>, <a href="/recipes/tags/mathematical/">mathematical</a>, <a href="/recipes/tags/mathematics/">mathematics</a>). </p> <p>This recipe let you encode in a single number two or three numbers.</p> <p>Note: this is only an adaptation of the recipes from <strong>Sean Eron Anderson</strong> and <strong>Fabian “ryg” Giesen</strong>; all credits goes to the respective authors.</p> <ul> <li><a href="" rel="nofollow"></a></li> <li><a href="" rel="nofollow"></a></li> </ul> Bitset (Python) 2009-05-04T16:37:02-07:00geremy condra <p style="color: grey"> Python recipe 576738 by <a href="/recipes/users/4170000/">geremy condra</a> (<a href="/recipes/tags/bits/">bits</a>, <a href="/recipes/tags/bytes/">bytes</a>). </p> <p>This is a simple Bitset type for Python. It implements the Sequence interface plus __setitem__, the set operations, and string and integer conversions.</p>