Popular recipes by Agnius Vasiliauskas http://code.activestate.com/recipes/users/4169134/2009-04-20T06:31:13-07:00ActiveState Code RecipesCopy-move forgery detection in images (Python)
2009-04-20T06:25:43-07:00Agnius Vasiliauskashttp://code.activestate.com/recipes/users/4169134/http://code.activestate.com/recipes/576689-copy-move-forgery-detection-in-images/
<p style="color: grey">
Python
recipe 576689
by <a href="/recipes/users/4169134/">Agnius Vasiliauskas</a>
(<a href="/recipes/tags/copy_move_forgery/">copy_move_forgery</a>, <a href="/recipes/tags/digital_image_forensic/">digital_image_forensic</a>, <a href="/recipes/tags/image_forgery_detection/">image_forgery_detection</a>).
Revision 5.
</p>
<p>Ad-hoc algorithm for copy-move forgery detection in images.
This algorithm is robust so it can detect copy-move forgery in lossy compression formats such as jpeg.
Because this algorithm is ad-hoc - it heavily depends on script parameters. So if it don`t finds any copy-move
tamperings in image - try to lower essential parameter "block color deviation threshold".
Something like (you can also try to change other parameters as well):</p>
<p>%script image_file --blcoldev=0.05</p>
<p>If you want to look at some copy-move forgery detection examples, - you should check this site:</p>
<p><a href="http://coding-experiments.blogspot.com/2009/03/detecting-copy-move-forgery-in-images.html" rel="nofollow">http://coding-experiments.blogspot.com/2009/03/detecting-copy-move-forgery-in-images.html</a></p>
Generation of captcha without using any fonts (Python)
2009-03-21T14:29:30-07:00Agnius Vasiliauskashttp://code.activestate.com/recipes/users/4169134/http://code.activestate.com/recipes/576695-generation-of-captcha-without-using-any-fonts/
<p style="color: grey">
Python
recipe 576695
by <a href="/recipes/users/4169134/">Agnius Vasiliauskas</a>
(<a href="/recipes/tags/captcha/">captcha</a>, <a href="/recipes/tags/reverse_turing_test/">reverse_turing_test</a>).
Revision 3.
</p>
<p>Generation of captcha image composed of numbers without using any fonts. As such it adds more variability to symbols (because every symbol is generated using random noise). And because of this - should be more secure than known set of fonts.</p>
Evolution optimization strategy (Python)
2009-04-20T06:31:13-07:00Agnius Vasiliauskashttp://code.activestate.com/recipes/users/4169134/http://code.activestate.com/recipes/576645-evolution-optimization-strategy/
<p style="color: grey">
Python
recipe 576645
by <a href="/recipes/users/4169134/">Agnius Vasiliauskas</a>
(<a href="/recipes/tags/ai/">ai</a>, <a href="/recipes/tags/evolution/">evolution</a>, <a href="/recipes/tags/evolution_strategy/">evolution_strategy</a>, <a href="/recipes/tags/gene/">gene</a>, <a href="/recipes/tags/genetic_algorithm/">genetic_algorithm</a>, <a href="/recipes/tags/np_complete/">np_complete</a>, <a href="/recipes/tags/optimization/">optimization</a>).
Revision 6.
</p>
<p>Algorithm for solving search and optimization problems.</p>
Top 20 linux distributions (Python)
2009-03-15T08:32:36-07:00Agnius Vasiliauskashttp://code.activestate.com/recipes/users/4169134/http://code.activestate.com/recipes/576691-top-20-linux-distributions/
<p style="color: grey">
Python
recipe 576691
by <a href="/recipes/users/4169134/">Agnius Vasiliauskas</a>
(<a href="/recipes/tags/most_popular_linux_distributions/">most_popular_linux_distributions</a>, <a href="/recipes/tags/top_20_linux_distributions/">top_20_linux_distributions</a>).
</p>
<p>Script for calculating top 20 most popular linux distributions.
This is done by getting list of possible linux distributions from <a href="http://lwn.net/Distributions/" rel="nofollow">http://lwn.net/Distributions/</a>.
And after that - automated queries are send to yahoo search engine to get a pages count which every distribution returns. From these numbers linux distribution rating is built as percentage from total top 20 queries hits.</p>
<p>IMPORTANT: because there are about 300 queries which are send to yahoo,- load of yahoo server is pretty high, so for load balancing each query is send with 2 seconds delay. Despite to this there is a good chance to get temporary ban from yahoo search service, because of high load from one IP address. SO, USE AT YOUR OWN RISK !!!</p>