Skip to content

Instantly share code, notes, and snippets.

View TomFaulkner's full-sized avatar
:octocat:
GitHub activity feed is almost as exciting as early Twitter.

Tom Faulkner TomFaulkner

:octocat:
GitHub activity feed is almost as exciting as early Twitter.
View GitHub Profile
@TomFaulkner
TomFaulkner / find-duplicate-files.bash
Last active December 29, 2018 03:43 — forked from OndraZizka/find-duplicate-files.bash
Finds duplicate files. An alternative to `fdupes -r -S .`
find -type f -size +3M -print0 | while IFS= read -r -d '' i; do
#echo $i
echo -n '.'
if grep -q "$i" md5-partial.txt; then
echo -n ':'; #-e "\n$i ---- Already counted, skipping.";
continue;
fi
#md5sum "$i" >> md5.txt
MD5=`dd bs=1M count=1 if="$i" status=none | md5sum`
MD5=`echo $MD5 | cut -d' ' -f1`
@TomFaulkner
TomFaulkner / beautiful_idiomatic_python.md
Created April 26, 2017 05:09 — forked from mongoose11235813/beautiful_idiomatic_python.md
Transforming Code into Beautiful, Idiomatic Python: notes from Raymond Hettinger's talk at pycon US 2013. The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]: