<commit_before>class Account < ApplicationRecord

  has_secure_password
  validates :email,
              presence: true,
              uniqueness: true,
              format: {
                  with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
              }
  before_save   :downcase_email

  STATUS_INACTIVE = 0
  STATUS_ACTIVE   = 1

  DUMMY_PASSWORD  = '<PASSWORD>'
  KEY_EXPIRY_DAYS = 1

  def to_s
    self.name.blank? ? self.email : self.name
  end

  def params_name
    self.class.name.downcase.singularize
  end

  def gravatar_url(size = 200)
    "http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(downcase_email)}?s=#{size}"
  end

  def no_password?
    self.password_digest == Account::DUMMY_PASSWORD
  end

  def inactive?
    self.status == Account::STATUS_INACTIVE
  end

  def not_activated?
    self.inactive? || self.no_password?
  end<commit_msg>mystery man for default gravatar for now<commit_after>class Account < ApplicationRecord

  has_secure_password
  validates :email,
              presence: true,
              uniqueness: true,
              format: {
                  with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
              }
  before_save   :downcase_email

  STATUS_INACTIVE = 0
  STATUS_ACTIVE   = 1

  DUMMY_PASSWORD  = '<PASSWORD>'
  KEY_EXPIRY_DAYS = 1

  def to_s
    self.name.blank? ? self.email : self.name
  end

  def params_name
    self.class.name.downcase.singularize
  end

  def gravatar_url(size = 200)
    "http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(downcase_email)}?d=mm&s=#{size}"
  end

  def no_password?
    self.password_digest == Account::DUMMY_PASSWORD
  end

  def inactive?
    self.status == Account::STATUS_INACTIVE
  end

  def not_activated?
    self.inactive? || self.no_password?
  end
{'fraction_non_alphanumeric': 0.1265397536394177, 'fraction_numerical': 0.011198208286674132, 'mean_word_length': 2.595573440643863, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3276422', 'n_tokens_mistral': 678, 'n_tokens_neox': 636, 'n_words': 111}