Created
February 3, 2012 21:18
-
-
Save brunogama/1732682 to your computer and use it in GitHub Desktop.
My random size image generator script (only for UNIX systems).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import string | |
from os import system as s | |
for i in range(14): | |
new = '%s.jpg' % (''.join(random.choice(string.ascii_lowercase + string.digits) for x in range(15))) | |
cmd = 'cp terra.jpg %s' % (new) | |
s(cmd) | |
s('dd if=/dev/urandom of=dummy_bytes bs=1m count=80') | |
cmd = 'cat dummy_bytes >> %s' % (new) | |
s(cmd) | |
s('rm dummy_bytes') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment