Skip to content

Instantly share code, notes, and snippets.

@neil90
Created July 11, 2016 16:50
Show Gist options
  • Save neil90/399a32ce417a07aa92b7d5ae152b5941 to your computer and use it in GitHub Desktop.
Save neil90/399a32ce417a07aa92b7d5ae152b5941 to your computer and use it in GitHub Desktop.
from faker import Faker
fake = Faker()
outfile = 'data.csv'
outsize = 1024 * 1024 * 1024 # 1GB
with open(outfile, 'w') as csvfile:
size = 0
while size < outsize:
txt = '%s, %s\n' % (fake.name(), fake.address())
size += len(txt)
csvfile.write(txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment