<commit_before>class Dude < ActiveRecord::Base
  validates_presence_of :name
  validates_presence_of :ruby_gems_id
  has_many :affiliations, :dependent => :destroy
  has_many :projects, :through => :affiliations
  scope :featured, where(featured: true)
  scope :regular, where(featured: false)

  before_save :set_avatar, if: Proc.new { |user| user.twitter_changed? }

  def bio<commit_msg>Stupid migrations are stupid.<commit_after>class Dude < ActiveRecord::Base
  validates_presence_of :name
  # our migrations are so stupid. If we nuke the data, this conditional can go
  validates_presence_of :ruby_gems_id, :if => proc { |u| u.respond_to? :ruby_gems_id }
  has_many :affiliations, :dependent => :destroy
  has_many :projects, :through => :affiliations
  scope :featured, where(featured: true)
  scope :regular, where(featured: false)

  before_save :set_avatar, if: Proc.new { |user|
    user.respond_to?(:twitter_changed?) and user.twitter_changed?
  }

  def bio
{'fraction_non_alphanumeric': 0.10412371134020619, 'fraction_numerical': 0.0, 'mean_word_length': 5.430463576158941, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '2439018', 'n_tokens_mistral': 336, 'n_tokens_neox': 324, 'n_words': 85}