<commit_before>if $0 =~ /^irb/
  Site.current = Site.find(1)
  puts 'Sites:'
  puts '  id    name                                     host'
  puts '  ----- ---------------------------------------- ------------------------------'
  puts Site.all.map { |s| "#{s.default? ? '*' : ' '} #{s.id.to_s.ljust 5} #{s.name.ljust(40)[0...40]} #{s.host.ljust(30)[0...30]}" }.join("\n")
  def use(id)
    Site.current = Site.find(id)
    puts "Set Site.current to <#{Site.current.name}>"
    true
  end
  puts 'Type "use ID" to change selected site...'
end<commit_msg>Fix rails console site selection menu.<commit_after>if defined?(IRB)
  Site.current = Site.find(1)
  def use(id=nil)
    Site.current = Site.find(id) if id
    puts 'Sites:'
    puts '  id    name                                     host'
    puts '  ----- ---------------------------------------- ------------------------------'
    Site.all.each do |site|
      next if id and site.id != id
      puts "#{site == Site.current ? '*' : ' '} #{site.id.to_s.ljust 5} #{site.name.ljust(40)[0...40]} #{site.host.ljust(30)[0...30]}"
    end
    true
  end
  use
  puts 'Type "use ID" to change selected site...'
end
{'fraction_non_alphanumeric': 0.28951890034364264, 'fraction_numerical': 0.02147766323024055, 'mean_word_length': 1.4070247933884297, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3602884', 'n_tokens_mistral': 397, 'n_tokens_neox': 394, 'n_words': 91}