<commit_before>require "active_support/core_ext/string/inflections"

module Custodian
  module CLI
    module Commands

      class Samplers < Command

        def initialize(options)
          samplers                = Custodian::Samplers.list
          compatible_samplers     = samplers.select { |s| s.new.compatible? }
          incompatible_samplers   = samplers.reject { |s| s.new.compatible? }

          unless compatible_samplers.empty?
            puts "#{compatible_samplers.count} compatible samplers:"
            puts ""

            compatible_samplers.each do |sampler|
              puts "   " + sampler.name.demodulize.underscore  + " " * (20 - sampler.name.demodulize.underscore.length) + sampler.description
            end
          end

          if compatible_samplers.empty? && incompatible_samplers.empty?
            puts ""
          end

          unless incompatible_samplers.empty?
            puts "#{incompatible_samplers.count} incompatible samplers:"
            puts ""

            incompatible_samplers.each do |sampler|
              puts "   " + sampler.name.split("::").last.downcase
            end
          end

        end

        def self.description
          "Show samplers"
        end

      end

    end
  end
end<commit_msg>Fix newline<commit_after>require "active_support/core_ext/string/inflections"

module Custodian
  module CLI
    module Commands

      class Samplers < Command

        def initialize(options)
          samplers                = Custodian::Samplers.list
          compatible_samplers     = samplers.select { |s| s.new.compatible? }
          incompatible_samplers   = samplers.reject { |s| s.new.compatible? }

          unless compatible_samplers.empty?
            puts "#{compatible_samplers.count} compatible samplers:"
            puts ""

            compatible_samplers.each do |sampler|
              puts "   " + sampler.name.demodulize.underscore  + " " * (20 - sampler.name.demodulize.underscore.length) + sampler.description
            end
            
            puts "" unless incompatible_samplers.empty?
          end

          unless incompatible_samplers.empty?
            puts "#{incompatible_samplers.count} incompatible samplers:"
            puts ""

            incompatible_samplers.each do |sampler|
              puts "   " + sampler.name.split("::").last.downcase
            end
          end

        end

        def self.description
          "Show samplers"
        end

      end

    end
  end
end
{'fraction_non_alphanumeric': 0.08121019108280254, 'fraction_numerical': 0.0015923566878980893, 'mean_word_length': 1.7984409799554566, 'pattern_counts': {'":': 2, '<': 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': '7644623', 'n_tokens_mistral': 738, 'n_tokens_neox': 716, 'n_words': 136}