<commit_before>#
# extract voter_id and passwords for a particular email address
# may return many rows, if they all have the same email address
#
# python extract-passwords-for-email.py <election_uuid> <email_address>
#

from django.core.management import setup_environ
import settings, sys, csv

setup_environ(settings)

from helios.models import *

election_uuid = sys.argv[1]<commit_msg>Restore functionality of extract-passwords-for-email<commit_after>#
# extract voter_id and passwords for a particular email address
# may return many rows, if they all have the same email address
#
# python extract-passwords-for-email.py <election_uuid> <email_address>
#

import sys

import csv
import django
import os

from helios.models import Election

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
django.setup()

election_uuid = sys.argv[1]
{'fraction_non_alphanumeric': 0.0799059929494712, 'fraction_numerical': 0.0023501762632197414, 'mean_word_length': 5.708661417322834, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5604606', 'n_tokens_mistral': 258, 'n_tokens_neox': 253, 'n_words': 85}