In python, for cropping image I use PIL. However the dependencies of PIL is huge, also need to install some lib*-dev packages.
So I choose go to crop images:
% go run crop.go large.jpeg thumbna
out_file = 'text_file.txt'
file_size = 1024 * 1024
rands = lambda x: ''.join(random.choice(string.letters + string.digits) for x in xrange(x))
with open(out_file, 'w') as f: