Popular recipes tagged "analyze"http://code.activestate.com/recipes/tags/analyze/popular/2012-01-24T21:37:33-08:00ActiveState Code RecipesSimple Python Checker (Python) 2012-01-24T21:37:33-08:00Thomas Lehmannhttp://code.activestate.com/recipes/users/4174477/http://code.activestate.com/recipes/578023-simple-python-checker/ <p style="color: grey"> Python recipe 578023 by <a href="/recipes/users/4174477/">Thomas Lehmann</a> (<a href="/recipes/tags/analyse/">analyse</a>, <a href="/recipes/tags/analyze/">analyze</a>, <a href="/recipes/tags/checker/">checker</a>, <a href="/recipes/tags/code/">code</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/simple/">simple</a>). Revision 2. </p> <p><strong>Why this recipe?</strong>:</p> <ul> <li>pylint is great but I does not support newer python versions.</li> <li>I intended to write an own more simple parser recognizing that Python is doing the job for me and so I started to learn - a little - how to use AST.</li> </ul> <p><strong>In scope (for this recipe)</strong>:</p> <ul> <li>scanning a single python file displaying warnings and errors when breaking rules.</li> <li>easy to maintain and easy extensible.</li> <li>reporting messages in a way - when displayed in an editor - you can click on them to jump to the location for the relating message.</li> <li>Lines of code means: without blanks (later: also without comments)</li> </ul> <p><strong>Out of scope (for this recipe)</strong>:</p> <ul> <li>For the recipe the folder/path support would break my limits. This include also the possible limits for this.</li> <li>Checking for comments (SIngle line comments, block comments, checking for parameter documentation)</li> </ul> <p><strong>Future:</strong></p> <ul> <li>I'm thinking about putting this on a project base location (issue tracker, versioning, ...).</li> <li>Of course same free license.</li> <li>Providing a link here.</li> <li>Checking for comments to handle further limits (LOC/COM, COM, checking for tags vs. parameters).</li> <li>Allow to handle a path/folder with Python files (another statistic output)</li> </ul> Frequency Analyser (Python) 2011-08-11T09:26:56-07:00Stijn de Graafhttp://code.activestate.com/recipes/users/4178055/http://code.activestate.com/recipes/577837-frequency-analyser/ <p style="color: grey"> Python recipe 577837 by <a href="/recipes/users/4178055/">Stijn de Graaf</a> (<a href="/recipes/tags/analysis/">analysis</a>, <a href="/recipes/tags/analyze/">analyze</a>, <a href="/recipes/tags/character/">character</a>, <a href="/recipes/tags/cryptography/">cryptography</a>, <a href="/recipes/tags/frequency/">frequency</a>). </p> <p>Calculates the frequency of characters within a block of text. In the context of cryptography, these values can be compared to a frequency table in order to attempt to ascertain the original message.</p> NBD server in python (Python) 2011-02-08T20:59:23-08:00Dima Tisnekhttp://code.activestate.com/recipes/users/4068698/http://code.activestate.com/recipes/577569-nbd-server-in-python/ <p style="color: grey"> Python recipe 577569 by <a href="/recipes/users/4068698/">Dima Tisnek</a> (<a href="/recipes/tags/analyze/">analyze</a>, <a href="/recipes/tags/block/">block</a>, <a href="/recipes/tags/device/">device</a>, <a href="/recipes/tags/disk/">disk</a>, <a href="/recipes/tags/io/">io</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/nbd/">nbd</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/python/">python</a>). </p> <p>Linux Network Block Device server in Python</p> <p>This is a simplified version based on Kragen Sitaker's <a href="http://lists.canonical.org/pipermail/kragen-hacks/2004-May/000397.html" rel="nofollow">http://lists.canonical.org/pipermail/kragen-hacks/2004-May/000397.html</a></p> <p>Close is never actually called, at least not on the same connection -- linux C nbd-client -d seems to stall, perhaps it tries to open another socket?</p> <p>This code doesn't check for error conditions, failed reads/writes, past end of disk, etc.</p> <p>It prints io requests, you can analyze filesystem and user program io patterns.</p>