<commit_before># == Schema Information
#
# Table name: collection_tags
#
#  id          :uuid             not null, primary key
#  name        :string           not null
#  description :string           not null
#

class CollectionTag < ApplicationRecord
  has_many :lesson_tags, as: :taggable

  validates_uniqueness_of :name

  before_create :downcase_name, :if => :new_record?

  def downcase_name
    self.name = self.name.downcase
  end

  def self.seed
    [
        {name: "fab certified/tested", desc:"adapted and tested lessons by Fab Foundation team, based on submissions from Fabbers, educators, and makers from the Fab Network and partnering organizations"},
        {name: "big ideas", desc:"open ended projects and activities, using digital fabrication tools to guide learners to design their own inventions or solve community challenges
"},
        {name: "games", desc:"lessons featuring build or programming projects around board or video games
"},
        {name: "environmental", desc:"lessons focusing on exploring environmental science or solving an ecological challenges
"},
        {name: "world culture", desc:"lessons highlighting global awareness, cultural practices, learning about history, holidays, legends, etc."},
        {name: "chevron stem award", desc:"lessons from the Fab Foundation and Chevron STEM Award winners.  Over the past two years, award prizes ranging from $1,000-$5,000 have been give to educators dedicated to innovative lessons and projects for K-12 students, while living up to the Fab Lab mission"}
    ].map{ |i|
      new(name: i[:name], description: i[:desc]).save
    }


  end


end<commit_msg>Shortcut to name<commit_after># == Schema Information
#
# Table name: collection_tags
#
#  id          :uuid             not null, primary key
#  name        :string           not null
#  description :string           not null
#

class CollectionTag < ApplicationRecord
  has_many :lesson_tags, as: :taggable

  validates_uniqueness_of :name

  before_create :downcase_name, :if => :new_record?

  def downcase_name
    self.name = self.name.downcase
  end

  def self.seed
    [
        {name: "fab certified/tested", desc:"adapted and tested lessons by Fab Foundation team, based on submissions from Fabbers, educators, and makers from the Fab Network and partnering organizations"},
        {name: "big ideas", desc:"open ended projects and activities, using digital fabrication tools to guide learners to design their own inventions or solve community challenges
"},
        {name: "games", desc:"lessons featuring build or programming projects around board or video games
"},
        {name: "environmental", desc:"lessons focusing on exploring environmental science or solving an ecological challenges
"},
        {name: "world culture", desc:"lessons highlighting global awareness, cultural practices, learning about history, holidays, legends, etc."},
        {name: "chevron stem award", desc:"lessons from the Fab Foundation and Chevron STEM Award winners.  Over the past two years, award prizes ranging from $1,000-$5,000 have been give to educators dedicated to innovative lessons and projects for K-12 students, while living up to the Fab Lab mission"}
    ].map{ |i|
      new(name: i[:name], description: i[:desc]).save
    }


  end

  def to_s
    name
  end


end
{'fraction_non_alphanumeric': 0.08048048048048048, 'fraction_numerical': 0.006006006006006006, 'mean_word_length': 3.5755494505494507, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4123328', 'n_tokens_mistral': 891, 'n_tokens_neox': 831, 'n_words': 375}