Last active
November 27, 2019 13:57
-
-
Save rootux/548be248410022636c0e913562fabff5 to your computer and use it in GitHub Desktop.
Revisions
-
rootux revised this gist
Nov 27, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ # Takes an emails.csv file and output it without any '.' # run with python3 doocrate-clean-mails.py > cleaned_emails.txt # also remember to concat the original emails to this output import csv -
rootux created this gist
Nov 27, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ # Takes an emails.csv file and output it without any '.' # run with doocrate-clean-mails.py > cleaned_emails.txt # also remember to concat the original emails to this output import csv with open('emails.csv') as csv_file: emails = csv.reader(csv_file, delimiter=',') line_count = 0 for email in emails: if(email[0].endswith("@gmail.com")): text, domain = email[0].split("@") if(text.find(".") != -1): text = text.replace(".","") print(text+"@"+domain) line_count +=1