<commit_before>begin
  unless Rails.env.test?
    global_prefs = Preference.first
    if global_prefs.email_notifications?
      ActionMailer::Base.delivery_method = :smtp
      smtp_port = ENV['SMTP_PORT'] ? ENV['SMTP_PORT'].to_i : 587
      starttls_auto = 587==smtp_port ? true : false
      ActionMailer::Base.smtp_settings = {
        :address        => ENV['SMTP_SERVER'] || 'smtp.sendgrid.net',
        :port           => smtp_port,
        :authentication => :plain,
        :enable_starttls_auto => starttls_auto,
        :user_name      => ENV['SMTP_USER'] || ENV['SENDGRID_USERNAME'],
        :password       => ENV['<PASSWORD>'] || ENV['SEND<PASSWORD>'],<commit_msg>use more accomodating using_email? in initializers/email_settings.rb<commit_after>begin
  unless Rails.env.test?
    global_prefs = Preference.first
    if global_prefs.using_email?
      ActionMailer::Base.delivery_method = :smtp
      smtp_port = ENV['SMTP_PORT'] ? ENV['SMTP_PORT'].to_i : 587
      starttls_auto = 587==smtp_port ? true : false
      ActionMailer::Base.smtp_settings = {
        :address        => ENV['SMTP_SERVER'] || 'smtp.sendgrid.net',
        :port           => smtp_port,
        :authentication => :plain,
        :enable_starttls_auto => starttls_auto,
        :user_name      => ENV['SMTP_USER'] || ENV['SENDGRID_USERNAME'],
        :password       => ENV['<PASSWORD>'] || ENV['SENDGRID_PASSWORD'],
{'fraction_non_alphanumeric': 0.13726884779516357, 'fraction_numerical': 0.008534850640113799, 'mean_word_length': 3.043103448275862, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 18, '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': '4107732', 'n_tokens_mistral': 500, 'n_tokens_neox': 477, 'n_words': 70}