<commit_before>import re
import mysite
Person = mysite.profile.models.Person

people_with_weird_locations = Person.objects.filter(location_display_name__regex=', [0-9][0-9],')

for p in people_with_weird_locations:
    location_pieces = re.split(r', \d\d,', p.location_display_name)
    unweirded_location = ",".join(location_pieces)
    if unweirded_location != p.location_display_name:
        print "weird location: " + p.location_display_name
        p.location_display_name = unweirded_location
        print "unweirded location: " + p.location_display_name
        p.save()<commit_msg>In script that remove numbers from locations, print an email address so we can email everybody whose location was edited.<commit_after>import re
import mysite
Person = mysite.profile.models.Person

people_with_weird_locations = Person.objects.filter(location_display_name__regex=', [0-9][0-9],')

count = 0
for p in people_with_weird_locations:
    location_pieces = re.split(r', \d\d,', p.location_display_name)
    unweirded_location = ",".join(location_pieces)
    if unweirded_location != p.location_display_name:
        #print p.location_display_name + "->" + unweirded_location
        p.location_display_name = unweirded_location
        print p.user.email + ","
        p.save()
        count += 1
{'fraction_non_alphanumeric': 0.10254433307632999, 'fraction_numerical': 0.007710100231303007, 'mean_word_length': 4.297959183673469, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5317589', 'n_tokens_mistral': 424, 'n_tokens_neox': 413, 'n_words': 85}