Latest recipes tagged "clone"http://code.activestate.com/recipes/tags/clone/new/2012-09-02T13:30:29-07:00ActiveState Code RecipesGhoster - Windows program to create 0kb clone of folder or drive (Python) 2012-09-02T13:30:29-07:00commentator8http://code.activestate.com/recipes/users/4182761/http://code.activestate.com/recipes/578251-ghoster-windows-program-to-create-0kb-clone-of-fol/ <p style="color: grey"> Python recipe 578251 by <a href="/recipes/users/4182761/">commentator8</a> (<a href="/recipes/tags/clone/">clone</a>, <a href="/recipes/tags/copy/">copy</a>, <a href="/recipes/tags/directory/">directory</a>, <a href="/recipes/tags/windows/">windows</a>). </p> <p>A program that will create a "ghost" of a given directory or drive on windows systems (easily adaptable to unix etc) to a given destination. This will consist of a copy of all folders and files with only names and extensions retained, not size. This allows browsing of a remote drive or network location when offline.</p> Python code clone detector (Don't Repeat Yourself) (Python) 2012-07-12T14:59:11-07:00frahttp://code.activestate.com/recipes/users/4182629/http://code.activestate.com/recipes/578206-python-code-clone-detector-dont-repeat-yourself/ <p style="color: grey"> Python recipe 578206 by <a href="/recipes/users/4182629/">fra</a> (<a href="/recipes/tags/analysis/">analysis</a>, <a href="/recipes/tags/clone/">clone</a>, <a href="/recipes/tags/code/">code</a>, <a href="/recipes/tags/dry/">dry</a>, <a href="/recipes/tags/duplication/">duplication</a>, <a href="/recipes/tags/parse/">parse</a>, <a href="/recipes/tags/similarity/">similarity</a>, <a href="/recipes/tags/static/">static</a>, <a href="/recipes/tags/syntax/">syntax</a>). Revision 2. </p> <p>Find duplicate code in Python 2/3 source files. Write a nice report about it.</p> <p>Works at the Abstract Syntax Tree level, which is a robust way to detect clones. See this <a href="http://francois.boutines.free.fr/python-3.2-report.html">code duplicated in the Python 3.2 standard library</a>.</p> <p><strong>Update</strong>: I cleaned the code a little bit, made it Python 2.7 compatible and faster.</p>