Horje
python faker json Code Example
python faker json
from json import dumps
from faker import Faker
import collections

database = []
filename = '1M'
length   = 1000000
fake     = Faker() # <--- Forgot this

for x in range(length):
    database.append(collections.OrderedDict([
        ('last_name', fake.last_name()),
        ('first_name', fake.first_name()),
        ('street_address', fake.street_address()),
        ('email', fake.email())
    ]))

with open('%s.json' % filename, 'w') as output:
    output.write(dumps(database, indent=4))
print "Done."
python faker json
from json import dumps
from faker import Faker
import collections

database = []
filename = '1M'
length   = 1000000
fake     = Faker() # <--- Forgot this

for x in range(length):
    database.append(collections.OrderedDict([
        ('last_name', fake.last_name()),
        ('first_name', fake.first_name()),
        ('street_address', fake.street_address()),
        ('email', fake.email())
    ]))

with open('%s.json' % filename, 'w') as output:
    output.write(dumps(database, indent=4))
print "Done."




Javascript

Related
Icons library in react Code Example Icons library in react Code Example
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ Code Example __REDUX_DEVTOOLS_EXTENSION_COMPOSE__ Code Example
Append to the text in the <p> tag Code Example Append to the text in the <p> tag Code Example
inject firebase in angularjs Code Example inject firebase in angularjs Code Example
unique id generator javascript Code Example unique id generator javascript Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8