Top-rated recipes tagged "count"http://code.activestate.com/recipes/tags/count/top/2016-10-25T17:53:01-07:00ActiveState Code RecipesLines Of Code (LOC) (Python)
2016-10-25T17:53:01-07:00Jean Brouwershttp://code.activestate.com/recipes/users/2984142/http://code.activestate.com/recipes/580709-lines-of-code-loc/
<p style="color: grey">
Python
recipe 580709
by <a href="/recipes/users/2984142/">Jean Brouwers</a>
(<a href="/recipes/tags/count/">count</a>, <a href="/recipes/tags/lines/">lines</a>, <a href="/recipes/tags/python2/">python2</a>, <a href="/recipes/tags/python3/">python3</a>, <a href="/recipes/tags/source/">source</a>).
Revision 3.
</p>
<p>Count the number of lines (code, comment, blank) in one or several Python source files.</p>
determine google count by automatisation (Python)
2012-12-31T15:33:39-08:00Peer Valhoegenhttp://code.activestate.com/recipes/users/4184749/http://code.activestate.com/recipes/578392-determine-google-count-by-automatisation/
<p style="color: grey">
Python
recipe 578392
by <a href="/recipes/users/4184749/">Peer Valhoegen</a>
(<a href="/recipes/tags/count/">count</a>, <a href="/recipes/tags/google/">google</a>, <a href="/recipes/tags/linux/">linux</a>).
Revision 2.
</p>
<p>Sometimes you need o know the number of results that google gets for a specific query.
There are lots of scripts that claim to do that, but I didn't find any that worked.
They mostly rely on urllib, which is blocked by Google.</p>
<p>This script automates what you would do by hand.
It is therefore incredibly slow, but it works and seems future proof to me.</p>
<p>You may want to adjust the respective timespan that is waited before certain operations.
This script relies on the unix command xsel.
I'm sure there are equivalent solutions on other operating systems.</p>