Popular recipes tagged "diff"http://code.activestate.com/recipes/tags/diff/2015-06-01T08:08:11-07:00ActiveState Code RecipesLongest common subsequence of 3+ strings (Python)
2015-06-01T08:08:11-07:00Alister Cordinerhttp://code.activestate.com/recipes/users/4174503/http://code.activestate.com/recipes/579065-longest-common-subsequence-of-3-strings/
<p style="color: grey">
Python
recipe 579065
by <a href="/recipes/users/4174503/">Alister Cordiner</a>
(<a href="/recipes/tags/diff/">diff</a>, <a href="/recipes/tags/lcs/">lcs</a>).
</p>
<p>Script to find the longest common subsequence (LCS) of 3+ strings using dynamic programming.</p>
Line-based side-by-side diff (Python)
2011-07-10T20:38:23-07:00Christoph Burgmerhttp://code.activestate.com/recipes/users/4178578/http://code.activestate.com/recipes/577784-line-based-side-by-side-diff/
<p style="color: grey">
Python
recipe 577784
by <a href="/recipes/users/4178578/">Christoph Burgmer</a>
(<a href="/recipes/tags/diff/">diff</a>).
</p>
<p>A line-based diff that shows two versions side-by-side based on Google's diff_match_patch implementation.</p>
<p>Deletions are displayed on the left side, while additions are displayed on the right similar to the diff shown on Wikipedia.</p>
Rsync Algorithm (Python)
2011-01-09T16:32:22-08:00Eric Pruitthttp://code.activestate.com/recipes/users/4170757/http://code.activestate.com/recipes/577518-rsync-algorithm/
<p style="color: grey">
Python
recipe 577518
by <a href="/recipes/users/4170757/">Eric Pruitt</a>
(<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/delta/">delta</a>, <a href="/recipes/tags/diff/">diff</a>, <a href="/recipes/tags/patch/">patch</a>, <a href="/recipes/tags/python3/">python3</a>, <a href="/recipes/tags/rsync/">rsync</a>).
Revision 4.
</p>
<p>This is a pure Python implementation of the <a href="http://samba.anu.edu.au/rsync/">rsync algorithm</a>. On my desktop (3.0GHz dual core, 7200RPM), best case throughput for target file hash generation and delta generation is around 2.9MB/s. Absolute worst case scenario (no blocks in common) throughput for delta generation is 200KB/s to 300KB/s on the same system.</p>
<p>Tested in Python 2.5, 2.6, and 3.1. In 2.7, io.BufferedReader should yield the best throughput. On all other versions use __builtin__.open.</p>
jardiff (Python)
2011-03-22T15:00:28-07:00Raphaël Jolivethttp://code.activestate.com/recipes/users/4135673/http://code.activestate.com/recipes/577620-jardiff/
<p style="color: grey">
Python
recipe 577620
by <a href="/recipes/users/4135673/">Raphaël Jolivet</a>
(<a href="/recipes/tags/diff/">diff</a>, <a href="/recipes/tags/jar/">jar</a>, <a href="/recipes/tags/war/">war</a>, <a href="/recipes/tags/zip/">zip</a>).
</p>
<p>Diff JAR / WAR / ZIP files (even recursively bundled).</p>
<p>Possibility to ignore some files, or some patterns in text files (like MANIFEST.mf).</p>
<p>This script is useful in order to know if a new build has changed anything to your binary JAR/WAR/Zip.</p>
Patch/diff file viewer with highlighting (Python)
2010-10-29T10:48:15-07:00Anton Butanaevhttp://code.activestate.com/recipes/users/4175501/http://code.activestate.com/recipes/577436-patchdiff-file-viewer-with-highlighting/
<p style="color: grey">
Python
recipe 577436
by <a href="/recipes/users/4175501/">Anton Butanaev</a>
(<a href="/recipes/tags/cvs/">cvs</a>, <a href="/recipes/tags/diff/">diff</a>, <a href="/recipes/tags/git/">git</a>, <a href="/recipes/tags/gui/">gui</a>).
Revision 4.
</p>
<p>diff shows difference in files in whole lines. Sometimes those lines are very similar, only one or two words changed. This script compares changed lines by characters and highlights actual differences in them.</p>
Textual diffs between word files (Python)
2010-02-16T08:58:07-08:00Joseph Reaglehttp://code.activestate.com/recipes/users/4171494/http://code.activestate.com/recipes/577055-textual-diffs-between-word-files/
<p style="color: grey">
Python
recipe 577055
by <a href="/recipes/users/4171494/">Joseph Reagle</a>
(<a href="/recipes/tags/diff/">diff</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/word/">word</a>).
</p>
<p>Diff two directories of Word documents, providing extra context as well, using antiword and dwdiff.</p>
Diff Two Dictionaries (Python)
2009-02-05T08:35:07-08:00Michael Shepanskihttp://code.activestate.com/recipes/users/4169100/http://code.activestate.com/recipes/576644-diff-two-dictionaries/
<p style="color: grey">
Python
recipe 576644
by <a href="/recipes/users/4169100/">Michael Shepanski</a>
(<a href="/recipes/tags/dictionary/">dictionary</a>, <a href="/recipes/tags/diff/">diff</a>, <a href="/recipes/tags/difference/">difference</a>).
</p>
<p>Diff two dictionaries returning just the differences. If an item is not found, it is represented by the string "<KEYNOTFOUND>". If there is a better way, please share. :)</p>