<commit_before>require "csv_sort/version"
require "smarter_csv"

module CsvSort

  class Csv  
    def parse_csv_file(csv_file)
      # make csv file into an array of hashes
      @parsed_csv = SmarterCSV.process(csv_file)
      valid_attendees = [] 

      # check for email validity
      for row in @parsed_csv
        valid_attendees << is_valid_email(row[:email])
        puts is_valid_email(row[:email])
      end
      
    end

    # regex out the email
    def is_valid_email(email) 
      email =~ /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i
    end
  end

  class File_Writer

  end 
end
<commit_msg>separate arrays for valid/invalid things :nail_care: :sparkles:<commit_after>require "csv_sort/version"
require "smarter_csv"

module CsvSort

  class Csv  
    def parse_csv_file(csv_file)
      # make csv file into an array of hashes
      @parsed_csv = SmarterCSV.process(csv_file)
      valid_attendees = [] 
      invalid_attendees = []

      # check for email validity
      for row in @parsed_csv
        if is_valid_email(row[:email])
          valid_attendees << row
        else 
          invalid_attendees << row 
        end 
      end
      
    end

    # regex out the email
    def is_valid_email(email) 
      email =~ /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i
    end
  end

  class File_Writer

  end 
end

{'fraction_non_alphanumeric': 0.11218424962852898, 'fraction_numerical': 0.0, 'mean_word_length': 2.2457831325301205, 'pattern_counts': {'":': 0, '<': 9, '<?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': '1404975', 'n_tokens_mistral': 494, 'n_tokens_neox': 474, 'n_words': 109}