<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import csv
import os
from time import time
from faker import Faker


def main():
    if len(sys.argv) <= 1:
        print ("Usage: gen # ")
    else:
        locale = 'en_US'
        fake = Faker(locale)
        dName = "import" + str(time())
        filename = locale + ".csv"
        if not os.path.exists(dName):
            os.makedirs(dName)
        with open("{0}/{1}".format(dName,filename), "wb") as output:
            csvWriter = csv.writer(output)
            zlist = ["Unique ID", "First Name", "Last Name", "Email", "Registration Code",
                "Show on Attendee List", "Company Name", "Job Title", "Brief Bio",
                "Work Phone", "Mobile Phone", "Other Phone", "Other Phone Type",
                "Address", "Address 2", "City", "State", "Zipcode", "Country",
                "Website", "Website 2", "Linkedin URL", "Twitter URL", "Facebook URL",
                "Group List (comma-separated)"]
            csvWriter.writerow(zlist)
            for i in range(0,int(sys.argv[1])):
                ylist = ["A-{0}".format(i), fake.first_name(), fake.last_name(),
                    fake.email(), " ", "FALSE", fake.word(), fake.slug(), fake.slug(),
                    fake.phone_number(), " ", " ", " ", " ", " ", fake.city(),
                    fake.state(), fake.postcode(), fake.country(), fake.url(),
                    fake.url(), " ", " ", " ", " ", ]
                csvWriter.writerow(ylist)
            print ("{0}/{1}").format(dName, filename)

if __name__ == '__main__':
    main()

'''

locales = ['bg_BG',
        'cs_CZ',
        'de_DE',
        'dk_DK',
        'el_GR',
        'en_CA',
        'en_GB',
        'en_US',
        'es_ES',
        'es_MX',
        'fa_IR',
        'fi_FI',
        'fr_FR',<commit_msg>attempt at unicode support in gen.py<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import csv
import os
from time import time
from faker import Faker


def main():
    if len(sys.argv) <= 1:
        print ("Usage: gen # ")
    else:
        locale = 'zh_TW'
        fake = Faker(locale)
        dName = "import" + str(time())
        filename = locale + ".csv"
        if not os.path.exists(dName):
            os.makedirs(dName)
        with open("{0}/{1}".format(dName,filename), "wb") as output:
            csvWriter = csv.writer(output)
            zlist = ["Unique ID", "First Name", "Last Name", "Email", "Registration Code",
                "Show on Attendee List", "Company Name", "Job Title", "Brief Bio",
                "Work Phone", "Mobile Phone", "Other Phone", "Other Phone Type",
                "Address", "Address 2", "City", "State", "Zipcode", "Country",
                "Website", "Website 2", "Linkedin URL", "Twitter URL", "Facebook URL",
                "Group List (comma-separated)"]
            csvWriter.writerow(zlist)
            for i in range(0,int(sys.argv[1])):
                ylist = ["A-{0}".format(i), fake.first_name(), fake.last_name(),
                    fake.email(), " ", "FALSE", fake.word(), fake.slug(), fake.slug(),
                    fake.phone_number(), " ", " ", " ", " ", " ", fake.city(),
                    fake.slug(), fake.postcode(), fake.country(), fake.url(),
                    fake.url(), " ", " ", " ", " ", ]
                csvWriter.writerow(str(ylist).encode('utf-8'))
            print ("{0}/{1}").format(dName, filename)

if __name__ == '__main__':
    main()

'''

locales = ['bg_BG',
        'cs_CZ',
        'de_DE',
        'dk_DK',
        'el_GR',
        'en_CA',
        'en_GB',
        'en_US',
        'es_ES',
        'es_MX',
        'fa_IR',
        'fi_FI',
        'fr_FR',
{'fraction_non_alphanumeric': 0.18315902386698846, 'fraction_numerical': 0.006167873424510592, 'mean_word_length': 1.8582375478927202, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6823044', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1174, 'n_words': 282}