Popular recipes by Sylvain Fourmanoit http://code.activestate.com/recipes/users/4150902/2009-04-23T18:33:56-07:00ActiveState Code RecipesBrute-force sudoku solver (Python) 2009-04-23T18:33:56-07:00Sylvain Fourmanoithttp://code.activestate.com/recipes/users/4150902/http://code.activestate.com/recipes/576725-brute-force-sudoku-solver/ <p style="color: grey"> Python recipe 576725 by <a href="/recipes/users/4150902/">Sylvain Fourmanoit</a> (<a href="/recipes/tags/sudoku/">sudoku</a>). Revision 4. </p> <p>This is a very simple, short Sudoku solver using a classic brute-force approach.</p> <p>What makes it nice is the purely arithmetic one-liner computing the constraint c (the sequence of already used digits on the same row, same column, same block of a given cell).</p> Remove diatrical marks (including accents) from strings using latin alphabets (Python) 2009-02-11T11:40:55-08:00Sylvain Fourmanoithttp://code.activestate.com/recipes/users/4150902/http://code.activestate.com/recipes/576648-remove-diatrical-marks-including-accents-from-stri/ <p style="color: grey"> Python recipe 576648 by <a href="/recipes/users/4150902/">Sylvain Fourmanoit</a> (<a href="/recipes/tags/text/">text</a>, <a href="/recipes/tags/text_processing/">text_processing</a>). Revision 7. </p> <p>Many written languages using latin alphabets employ <a href="http://en.wikipedia.org/wiki/Diacritic">diacritical marks</a>. Even today, it is still pretty common to encounter situations where it would be desirable to get rid of them: files naming, creation of easy to read URIs, indexing schemes, etc. </p> <p>An easy way has always been to simply filter out any "decorated characters"; unfortunately, this does not preserve the base, undecorated glyphs. But thanks to Unicode support in Python, it is now straightforward to perform such a transliteration.</p> <p>(This recipe was completely rewritten based on a comment by Mathieu Clabaut: many thanks to him!)</p>