<commit_before>class ReputationEvent < ActiveRecord::Base
  belongs_to :action, polymorphic: true
  belongs_to :user

  TYPES = [
    { action: 'receive question upvote',
      reputation: 10 },
    { action: 'receive question downvote',
      reputation: -5 },
    { action: 'receive answer upvote',
      reputation: 10 },
    { action: 'receive answer downvote',
      reputation: -5 }
  ]

  def self.create_for_receiving_question_upvote(vote)
    vote.post.user.reputation_events.create(
      action: vote,
      event_type: 1
    )
  end
end<commit_msg>The zero index event type is not going to be a thing<commit_after>class ReputationEvent < ActiveRecord::Base
  belongs_to :action, polymorphic: true
  belongs_to :user

  TYPES = [
    {},
    { action: 'receive question upvote',
      reputation: 10 },
    { action: 'receive question downvote',
      reputation: -5 },
    { action: 'receive answer upvote',
      reputation: 10 },
    { action: 'receive answer downvote',
      reputation: -5 }
  ]

  def self.create_for_receiving_question_upvote(vote)
    vote.post.user.reputation_events.create(
      action: vote,
      event_type: 1
    )
  end
end
{'fraction_non_alphanumeric': 0.10197086546700942, 'fraction_numerical': 0.011996572407883462, 'mean_word_length': 3.041522491349481, 'pattern_counts': {'":': 0, '<': 5, '<?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': '901431', 'n_tokens_mistral': 387, 'n_tokens_neox': 366, 'n_words': 96}