Popular recipes by Christos Georgiou http://code.activestate.com/recipes/users/418040/2006-08-23T14:56:34-07:00ActiveState Code RecipesIterate over .MP4 atoms (Python)
2006-08-23T14:56:34-07:00Christos Georgiouhttp://code.activestate.com/recipes/users/418040/http://code.activestate.com/recipes/496984-iterate-over-mp4-atoms/
<p style="color: grey">
Python
recipe 496984
by <a href="/recipes/users/418040/">Christos Georgiou</a>
(<a href="/recipes/tags/files/">files</a>).
</p>
<p>This recipe yields the atoms contained in an MP4 file. Mostly used for extracting the tags contained in it (artist, title etc) using a convenience class (M4ATags). Implemented as an generator.</p>
Recover files from damaged media (Python)
2006-06-27T08:37:53-07:00Christos Georgiouhttp://code.activestate.com/recipes/users/418040/http://code.activestate.com/recipes/496839-recover-files-from-damaged-media/
<p style="color: grey">
Python
recipe 496839
by <a href="/recipes/users/418040/">Christos Georgiou</a>
(<a href="/recipes/tags/files/">files</a>).
</p>
<p>Files existing on damaged media (eg old CD-ROMs) are not completely lost. Often, readers will read sectors unreadable in other readers. The "trick" is to merge the successful reads from several devices.</p>
Copy huge files on Windows avoiding system cache misbehaviour (Python)
2006-05-10T18:06:55-07:00Christos Georgiouhttp://code.activestate.com/recipes/users/418040/http://code.activestate.com/recipes/496694-copy-huge-files-on-windows-avoiding-system-cache-m/
<p style="color: grey">
Python
recipe 496694
by <a href="/recipes/users/418040/">Christos Georgiou</a>
(<a href="/recipes/tags/files/">files</a>).
</p>
<p>This recipe uses pywin32 in order to copy files making use of the win32file.FILE_FLAG_SEQUENTIAL_SCAN, which makes much more efficient use of the system cache (only a few megabytes are consumed instead of caching the whole file).</p>
regular expression point of failure (Python)
2006-03-31T17:59:25-08:00Christos Georgiouhttp://code.activestate.com/recipes/users/418040/http://code.activestate.com/recipes/475187-regular-expression-point-of-failure/
<p style="color: grey">
Python
recipe 475187
by <a href="/recipes/users/418040/">Christos Georgiou</a>
(<a href="/recipes/tags/text/">text</a>).
Revision 2.
</p>
<p>Debug non-matching regular expressions by finding out the maximum parts of the pattern and the text that do match.</p>
repr() of containers with non-ASCII strings (Python)
2005-08-12T02:53:35-07:00Christos Georgiouhttp://code.activestate.com/recipes/users/418040/http://code.activestate.com/recipes/439148-repr-of-containers-with-non-ascii-strings/
<p style="color: grey">
Python
recipe 439148
by <a href="/recipes/users/418040/">Christos Georgiou</a>
(<a href="/recipes/tags/text/">text</a>).
</p>
<p>Printing sequences or maps containing non-ASCII strings results in escape sequences. This function uses the not-so-commonly-known "string_escape" codec to facilitate printing such sequences for quick-viewing.</p>
Getting <n>th permutation of a sequence (Python)
2002-05-10T15:35:41-07:00Christos Georgiouhttp://code.activestate.com/recipes/users/418040/http://code.activestate.com/recipes/126037-getting-nth-permutation-of-a-sequence/
<p style="color: grey">
Python
recipe 126037
by <a href="/recipes/users/418040/">Christos Georgiou</a>
(<a href="/recipes/tags/algorithms/">algorithms</a>).
Revision 2.
</p>
<p>This function, given a sequence and a number n as parameters, returns the <n>th permutation of the sequence (always as a list).</p>