Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save flarco/e27402262320d0a3bf66712d5ca66dd4 to your computer and use it in GitHub Desktop.
Save flarco/e27402262320d0a3bf66712d5ca66dd4 to your computer and use it in GitHub Desktop.
import os
data = {
'1MB' : 1*1024*1024, # 1MB
'10MB' : 10*1024*1024, # 10MB
'100MB' : 100*1024*1024, # 100MB
'1GB' : 1*1024*1024*1024, # 1GB
'10GB' : 10*1024*1024*1024, # 10GB
'50GB' : 50*1024*1024*1024, # 50GB
}
for key in data:
print('Writing ' +key)
with open(key+'.test', 'wb') as fout:
fout.write(os.urandom(data[key]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment