<commit_before>require 'colorize'

class String
    def console_red;          colorize(self, "\001\e[1m\e[31m\002");  end
    def console_dark_red;     colorize(self, "\001\e[31m\002");       end
    def console_green;        colorize(self, "\001\e[1m\e[32m\002");  end
    def console_dark_green;   colorize(self, "\001\e[32m\002");       end
    def console_yellow;       colorize(self, "\001\e[1m\e[33m\002");  end
    def console_dark_yellow;  colorize(self, "\001\e[33m\002");       end
    def console_blue;         colorize(self, "\001\e[1m\e[34m\002");  end
    def console_dark_blue;    colorize(self, "\001\e[34m\002");       end
    def console_purple;       colorize(self, "\001\e[1m\e[35m\002");  end

    def console_def;          colorize(self, "\001\e[1m\002");  end
    def console_bold;         colorize(self, "\001\e[1m\002");  end
    def console_blink;        colorize(self, "\001\e[5m\002");  end

    def colorize(text, color_code)  "#{color_code}#{text}\001\e[0m\002" end
end<commit_msg>refactor colors, now can do .color(:blue), etc<commit_after>
class String
    def console_red;          color(:red);         end
    def console_dark_red;     color(:dark_red);    end
    def console_green;        color(:green);       end
    def console_dark_green;   color(:dark_green);  end
    def console_yellow;       color(:yellow);      end
    def console_dark_yellow;  color(:dark_yellow); end
    def console_blue;         color(:blue);        end
    def console_dark_blue;    color(:dark_blue);   end
    def console_purple;       color(:purple);      end

    def console_def;          color(:def);         end
    def console_bold;         color(:bold);        end
    def console_blink;        color(:blink);       end
    
    @@console_end_code = "\001\e[0m\002"
    @@console_color_codes = {
      red: "\001\e[1m\e[31m\002",
      dark_red: "\001\e[31m\002",
      green: "\001\e[1m\e[32m\002",
      dark_green: "\001\e[32m\002",
      yellow: "\001\e[1m\e[33m\002",
      dark_yellow: "\001\e[33m\002",
      blue: "\001\e[1m\e[34m\002",
      dark_blue: "\001\e[34m\002",
      purple: "\001\e[1m\e[35m\002",
      def: "\001\e[1m\002",
      bold: "\001\e[1m\002",
      blink: "\001\e[5m\002",
    }
    
    def color(name)
      "#{@@console_color_codes[name]}#{self}#{@@console_end_code}"
    end
end
{'fraction_non_alphanumeric': 0.15818725951261223, 'fraction_numerical': 0.08978195810175288, 'mean_word_length': 2.371757925072046, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4779558', 'n_tokens_mistral': 1004, 'n_tokens_neox': 876, 'n_words': 158}