Popular recipes by Artur de Sousa Rocha http://code.activestate.com/recipes/users/343771/2006-02-11T16:49:17-08:00ActiveState Code RecipesSudoku solver (Python)
2006-02-11T16:49:17-08:00Artur de Sousa Rochahttp://code.activestate.com/recipes/users/343771/http://code.activestate.com/recipes/473844-sudoku-solver/
<p style="color: grey">
Python
recipe 473844
by <a href="/recipes/users/343771/">Artur de Sousa Rocha</a>
(<a href="/recipes/tags/algorithms/">algorithms</a>).
Revision 3.
</p>
<p>This program is a Sudoku solver that uses 3 simple algorithms.</p>
Manipulate Mac OS clipboard (Python)
2005-04-21T18:38:38-07:00Artur de Sousa Rochahttp://code.activestate.com/recipes/users/343771/http://code.activestate.com/recipes/410615-manipulate-mac-os-clipboard/
<p style="color: grey">
Python
recipe 410615
by <a href="/recipes/users/343771/">Artur de Sousa Rocha</a>
(<a href="/recipes/tags/ui/">ui</a>).
Revision 3.
</p>
<p>This is a clipboard manipulation module that demonstrates some simple use of Carbon API. It can double as a Unix-style command-line tool that prints the clipboard contents to stdout or, if specified, copies its stdin to the clipboard, although pbcopy(1) and pbpaste(1) are better suited for that.</p>
Find duplicate file names (Python)
2005-01-28T11:12:48-08:00Artur de Sousa Rochahttp://code.activestate.com/recipes/users/343771/http://code.activestate.com/recipes/364953-find-duplicate-file-names/
<p style="color: grey">
Python
recipe 364953
by <a href="/recipes/users/343771/">Artur de Sousa Rocha</a>
(<a href="/recipes/tags/files/">files</a>).
</p>
<p>This script looks for files with identical file names. If requested, file sizes are also compared. You can search current directory or a list of directories specified on the command line. Search can be restricted to files with names containing a string, or with names matching a regular expression. Paths to duplicates are printed in groups separated by empty lines.</p>
Criteria-based cascading priority queue (Python)
2005-01-28T10:39:52-08:00Artur de Sousa Rochahttp://code.activestate.com/recipes/users/343771/http://code.activestate.com/recipes/364952-criteria-based-cascading-priority-queue/
<p style="color: grey">
Python
recipe 364952
by <a href="/recipes/users/343771/">Artur de Sousa Rocha</a>
(<a href="/recipes/tags/algorithms/">algorithms</a>).
</p>
<p>This module provides a simple criteria-based priority queue with "priority cascading".</p>
Fetch a file preserving relative path (Python)
2005-01-23T04:41:42-08:00Artur de Sousa Rochahttp://code.activestate.com/recipes/users/343771/http://code.activestate.com/recipes/364225-fetch-a-file-preserving-relative-path/
<p style="color: grey">
Python
recipe 364225
by <a href="/recipes/users/343771/">Artur de Sousa Rocha</a>
(<a href="/recipes/tags/web/">web</a>).
</p>
<p>The fetch_relative() function downloads a file, reproducing the directory structure from the server. After downloading, additional callback function can be performed on the file's contents. If the local copy already exists, the file is not re-refetched, and the callback is performed on the local copy.</p>
Entering accented characters in Tkinter widgets (Python)
2005-01-12T22:00:07-08:00Artur de Sousa Rochahttp://code.activestate.com/recipes/users/343771/http://code.activestate.com/recipes/286155-entering-accented-characters-in-tkinter-widgets/
<p style="color: grey">
Python
recipe 286155
by <a href="/recipes/users/343771/">Artur de Sousa Rocha</a>
(<a href="/recipes/tags/ui/">ui</a>).
Revision 4.
</p>
<p>This module provides two standard Tkinter widgets, Entry and ScrolledText, modified for text editing with key bindings that allow entering accented letters, umlauts, etc.</p>
<p>Usage: To enter an accented character, press Ctrl-symbol, then press the character key. Example: to enter U with umlaut, press Ctrl-", U. For accent symbols that need shift, press Ctrl-Shift-symbol (for example, Ctrl-Shift-' if " is under Shift-').</p>
<p>Accent bindings are defined in the Diacritical.accent table. Not all accents exist on all letters. This is handled by gracefully falling back to the base letter.</p>
<p>Additional changes in default Tk key bindings: Ctrl-A is now select-all.</p>
Temperature class (Python)
2004-07-13T14:03:46-07:00Artur de Sousa Rochahttp://code.activestate.com/recipes/users/343771/http://code.activestate.com/recipes/286226-temperature-class/
<p style="color: grey">
Python
recipe 286226
by <a href="/recipes/users/343771/">Artur de Sousa Rocha</a>
(<a href="/recipes/tags/algorithms/">algorithms</a>).
Revision 2.
</p>
<p>Assign temperature value in one scale and you have it available in others as respective attributes. Kelvin, Celsius, Fahrenheit, and Rankine are supported (k, c, f, r attributes).</p>
Extract verbatim texts from LaTeX file (Python)
2004-07-15T15:35:21-07:00Artur de Sousa Rochahttp://code.activestate.com/recipes/users/343771/http://code.activestate.com/recipes/286243-extract-verbatim-texts-from-latex-file/
<p style="color: grey">
Python
recipe 286243
by <a href="/recipes/users/343771/">Artur de Sousa Rocha</a>
(<a href="/recipes/tags/text/">text</a>).
</p>
<p>This script extracts contents of all verbatim environments from the LaTeX file specified on command line. Modified LaTeX code with \verbatiminput commands instead of verbatim is produced on the standard output.</p>