<commit_before>class Card < ActiveRecord::Base
  self.inheritance_column = :_type_disabled

  has_and_belongs_to_many :decks

  scope :playable, -> do
    # select cards which were recorded as played
    where('EXISTS(SELECT card_histories.id FROM card_histories WHERE card_histories.card_id = cards.id LIMIT 1)')
    .where.not(ref: [ # remove duplicated cards
      'EX1_165t1', # druid of the claw minion
      'EX1_165t2' , # druid of the claw minion
      'CS2_mirror', # mirror image minion
      'ds1_whelptoken', # whelp
      'EX1_116t', # whelp
      'TU4c_006', # bananas
      'TU4c_006e', # bananas
      'EX1_158t', # treant
      'EX1_573t', # treant
      'EX1_tk9', # treant
      'NEW1_040t', # gnoll
      'TU4a_003', # gnoll
      'tt_010a', # spellbender minion
    ])
  end
end<commit_msg>remove some adventure cards for the deck selection<commit_after>class Card < ActiveRecord::Base
  self.inheritance_column = :_type_disabled

  has_and_belongs_to_many :decks

  # Card.playable.group_by { |x| x['name'] }.select { |n,c| c.length > 1 }.values.flatten.map(&:ref)
  scope :playable, -> do
    # select cards which were recorded as played
    where('EXISTS(SELECT card_histories.id FROM card_histories WHERE card_histories.card_id = cards.id LIMIT 1)')
    .where.not(ref: [ # remove duplicated cards
      'EX1_165t1', # druid of the claw minion
      'EX1_165t2' , # druid of the claw minion
      'CS2_mirror', # mirror image minion
      'ds1_whelptoken', # whelp
      'EX1_116t', # whelp
      'TU4c_006', # bananas
      'TU4c_006e', # bananas
      'EX1_158t', # treant
      'EX1_573t', # treant
      'EX1_tk9', # treant
      'NEW1_040t', # gnoll
      'TU4a_003', # gnoll
      'tt_010a', # spellbender minion
      'FP1_007t', # nerubian
      'NAX1_03', # nerubian
      'NAX2_05', # worshipper
      'NAX2_05H' # worshipper
    ])
  end
end
{'fraction_non_alphanumeric': 0.11241342567927544, 'fraction_numerical': 0.05647309536494406, 'mean_word_length': 3.0214132762312635, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '6842144', 'n_tokens_mistral': 766, 'n_tokens_neox': 697, 'n_words': 160}