Popular recipes by Stijn de Graaf http://code.activestate.com/recipes/users/4178055/2011-08-15T17:23:03-07:00ActiveState Code RecipesMidpoint of two GPS points (Python)
2011-05-21T22:11:01-07:00Stijn de Graafhttp://code.activestate.com/recipes/users/4178055/http://code.activestate.com/recipes/577713-midpoint-of-two-gps-points/
<p style="color: grey">
Python
recipe 577713
by <a href="/recipes/users/4178055/">Stijn de Graaf</a>
(<a href="/recipes/tags/circle/">circle</a>, <a href="/recipes/tags/coordinates/">coordinates</a>, <a href="/recipes/tags/gps/">gps</a>, <a href="/recipes/tags/latitude/">latitude</a>, <a href="/recipes/tags/longitude/">longitude</a>, <a href="/recipes/tags/midpoint/">midpoint</a>, <a href="/recipes/tags/orthodrome/">orthodrome</a>).
</p>
<p>This calculates the midpoint between two GPS coordinates along the Earth's surface.
Based on formula from <a href="http://www.movable-type.co.uk/scripts/latlong.html" rel="nofollow">http://www.movable-type.co.uk/scripts/latlong.html</a></p>
Credit Card Validation (Python)
2011-08-11T19:06:58-07:00Stijn de Graafhttp://code.activestate.com/recipes/users/4178055/http://code.activestate.com/recipes/577838-credit-card-validation/
<p style="color: grey">
Python
recipe 577838
by <a href="/recipes/users/4178055/">Stijn de Graaf</a>
(<a href="/recipes/tags/card/">card</a>, <a href="/recipes/tags/credit/">credit</a>, <a href="/recipes/tags/false/">false</a>, <a href="/recipes/tags/number/">number</a>, <a href="/recipes/tags/testing/">testing</a>, <a href="/recipes/tags/true/">true</a>, <a href="/recipes/tags/validating/">validating</a>, <a href="/recipes/tags/validation/">validation</a>).
</p>
<p>Test validity of any credit card number using the LUHN method (mod 10).
Starting at the last digit and moving backwards, you add up every other digit.
Then, you double the left-out digits, and add the digits of these results to the original sum.
If this satisfies sum mod 10 == 0 then the card is valid.</p>
<p>This is also explained at <a href="http://www.beachnet.com/%7Ehstiles/cardtype.html" rel="nofollow">http://www.beachnet.com/~hstiles/cardtype.html</a></p>
Calculate Trailing Zeroes in a Factorial (Python)
2011-08-15T17:23:03-07:00Stijn de Graafhttp://code.activestate.com/recipes/users/4178055/http://code.activestate.com/recipes/577844-calculate-trailing-zeroes-in-a-factorial/
<p style="color: grey">
Python
recipe 577844
by <a href="/recipes/users/4178055/">Stijn de Graaf</a>
(<a href="/recipes/tags/calculate/">calculate</a>, <a href="/recipes/tags/calculation/">calculation</a>, <a href="/recipes/tags/factorial/">factorial</a>, <a href="/recipes/tags/trailing/">trailing</a>, <a href="/recipes/tags/zero/">zero</a>, <a href="/recipes/tags/zeroes/">zeroes</a>).
</p>
<p>Calculates the number of trailing zeroes on the end of x! when the user inputs x.</p>
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>
Chess Notation Player (Python)
2011-05-25T18:41:33-07:00Stijn de Graafhttp://code.activestate.com/recipes/users/4178055/http://code.activestate.com/recipes/577719-chess-notation-player/
<p style="color: grey">
Python
recipe 577719
by <a href="/recipes/users/4178055/">Stijn de Graaf</a>
(<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/chess/">chess</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/notation/">notation</a>, <a href="/recipes/tags/viewer/">viewer</a>).
</p>
<p>This allows you to input the algebraic chess notation of a game, move by move, and the position of the pieces will be shown on the screen. The upper case letters represent Black pieces and the lower case letters represent White pieces. Most notations are accepted, including Castling and Disambiguating. For details on Algebraic Chess notation see: <a href="http://en.wikipedia.org/wiki/Algebraic_chess_notation." rel="nofollow">http://en.wikipedia.org/wiki/Algebraic_chess_notation.</a></p>