Popular recipes tagged "power" but not "of"http://code.activestate.com/recipes/tags/power-of/2011-08-28T12:25:49-07:00ActiveState Code RecipesCheck PC Power (Python) 2011-08-28T12:25:49-07:00Frank Larkinhttp://code.activestate.com/recipes/users/4179117/http://code.activestate.com/recipes/577861-check-pc-power/ <p style="color: grey"> Python recipe 577861 by <a href="/recipes/users/4179117/">Frank Larkin</a> (<a href="/recipes/tags/api/">api</a>, <a href="/recipes/tags/computer/">computer</a>, <a href="/recipes/tags/passing/">passing</a>, <a href="/recipes/tags/pointers/">pointers</a>, <a href="/recipes/tags/power/">power</a>, <a href="/recipes/tags/widows/">widows</a>). </p> <p>Call windows API GetSystemPowerStatus to determine if the AC power is on or off. Great example of calling Windows APIs using Ptyhon.</p> Chek if a number is a power of two (Python) 2010-12-23T11:29:38-08:00A. Polinohttp://code.activestate.com/recipes/users/4176317/http://code.activestate.com/recipes/577514-chek-if-a-number-is-a-power-of-two/ <p style="color: grey"> Python recipe 577514 by <a href="/recipes/users/4176317/">A. Polino</a> (<a href="/recipes/tags/2/">2</a>, <a href="/recipes/tags/check/">check</a>, <a href="/recipes/tags/number/">number</a>, <a href="/recipes/tags/power/">power</a>, <a href="/recipes/tags/python/">python</a>). Revision 2. </p> <p>Pretty good way to check if a number is a power of two or not.</p>