<commit_before>from models import User
from existing_users import USERS
import sys
import csv

def get_not_registered_emails():
    users = User.all()
    reg_user_emails = [u.email for u in users]
    meet_user_emails = [unicode(k) for k in USERS.keys()]
    not_registered_emails = set(meet_user_emails) - set(reg_user_emails)
    return not_registered_emails

def get_contact_info_not_registered():
    not_registered_emails = get_not_registered_emails()
    not_registered_users = [USERS[email] for email in not_registered_emails]

    fieldnames = ['phone_number','first_name','last_name', 'designation', 'company', 'graduation_year', 'nearest_railway_line', 'enrollment_fee', 'payment_mode', 't_shirt_size']
    writer = csv.DictWriter(sys.stdout, fieldnames=fieldnames)
    headers = {}
    for n in fieldnames:
        headers[n] = n
    writer.writerow(headers)
    for u in not_registered_users:
        writer.writerow(u)
<commit_msg>add the email field to the list of not yet registered people<commit_after>from models import User
from existing_users import USERS
import sys
import csv

def get_not_registered_emails():
    users = User.all()
    reg_user_emails = []
    for u in users:
        reg_user_emails.extend([u.email, u.signin_email, u.corporate_email])
    meet_user_emails = [unicode(k) for k in USERS.keys()]
    not_registered_emails = set(meet_user_emails) - set(reg_user_emails)
    return not_registered_emails

def get_contact_info_not_registered():
    not_registered_emails = get_not_registered_emails()
    #not_registered_users = [USERS[email] for email in not_registered_emails]
    not_registered_users = []
    for email in not_registered_emails:
        d = {'email': email}
        d.update(USERS[email])
        not_registered_users.append(d)

    fieldnames = ['email','phone_number','first_name','last_name', 'designation', 'company', 'graduation_year', 'nearest_railway_line', 'enrollment_fee', 'payment_mode', 't_shirt_size']
    writer = csv.DictWriter(sys.stdout, fieldnames=fieldnames)
    headers = {}
    for n in fieldnames:
        headers[n] = n
    writer.writerow(headers)
    for u in not_registered_users:
        writer.writerow(u)

{'fraction_non_alphanumeric': 0.09863013698630137, 'fraction_numerical': 0.0, 'mean_word_length': 4.546835443037975, 'pattern_counts': {'":': 0, '<': 3, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3917175', 'n_tokens_mistral': 742, 'n_tokens_neox': 711, 'n_words': 159}