<commit_before>package cmd

import (
	"github.com/Masterminds/cookoo"
	"fmt"
	"os"
)

var Quiet bool = false
const (
	Blue    = "0;34"
	Red     = "0;31"
	BoldRed = "1;31"
	Yellow  = "0;33"
	Cyan    = "0;36"
	Pink    = "1;35"
)

func Color(code, msg string) string {
	return fmt.Sprintf("\033[%sm%s\033[m", code, msg)
}


func BeQuiet(c cookoo.Context, p *cookoo.Params) (interface{}, cookoo.Interrupt) {
	qstr := p.Get("quiet", "false").(string)
	Quiet = qstr == "true"
	return Quiet, nil
}

func Info(msg string, args ...interface{}) {
	if Quiet { return }
	fmt.Print(Color(Yellow, "[INFO] "))
	Msg(msg, args...)
}
func Debug(msg string, args ...interface{}) {
	if Quiet { return }
	fmt.Print("[DEBUG] ")
	Msg(msg, args...)
}

func Warn(msg string, args ...interface{}) {
	fmt.Fprint(os.Stderr, Color(Red, "[WARN] "))
	ErrMsg(msg, args...)
}

func Error(msg string, args ...interface{}) {
	fmt.Fprint(os.Stderr, Color(BoldRed, "[ERROR] "))
	ErrMsg(msg, args...)
}

// ErrMsg sends a message to Stderr
func ErrMsg(msg string, args...interface{}) {
	if len(args) == 0 {
		fmt.Fprint(os.Stderr, msg)
		return
	}
	fmt.Fprintf(os.Stderr, msg, args...)
}

func Msg(msg string, args...interface{}) {
	if len(args) == 0 {
		fmt.Print(msg)
		return
	}
	fmt.Printf(msg, args...)
}<commit_msg>Updated the documentation on utilities.<commit_after>package cmd

import (
	"github.com/Masterminds/cookoo"
	"fmt"
	"os"
)

var Quiet bool = false
const (
	Blue    = "0;34"
	Red     = "0;31"
	BoldRed = "1;31"
	Yellow  = "0;33"
	Cyan    = "0;36"
	Pink    = "1;35"
)

func Color(code, msg string) string {
	return fmt.Sprintf("\033[%sm%s\033[m", code, msg)
}

// BeQuiet supresses Info and Debug messages.
func BeQuiet(c cookoo.Context, p *cookoo.Params) (interface{}, cookoo.Interrupt) {
	qstr := p.Get("quiet", "false").(string)
	Quiet = qstr == "true"
	return Quiet, nil
}

// Info logs information
func Info(msg string, args ...interface{}) {
	if Quiet { return }
	fmt.Print(Color(Yellow, "[INFO] "))
	Msg(msg, args...)
}
// Debug logs debug information
func Debug(msg string, args ...interface{}) {
	if Quiet { return }
	fmt.Print("[DEBUG] ")
	Msg(msg, args...)
}
// Warn logs a warning
func Warn(msg string, args ...interface{}) {
	fmt.Fprint(os.Stderr, Color(Red, "[WARN] "))
	ErrMsg(msg, args...)
}

// Error logs and error.
func Error(msg string, args ...interface{}) {
	fmt.Fprint(os.Stderr, Color(BoldRed, "[ERROR] "))
	ErrMsg(msg, args...)
}

// ErrMsg sends a message to Stderr
func ErrMsg(msg string, args...interface{}) {
	if len(args) == 0 {
		fmt.Fprint(os.Stderr, msg)
		return
	}
	fmt.Fprintf(os.Stderr, msg, args...)
}

func Msg(msg string, args...interface{}) {
	if len(args) == 0 {
		fmt.Print(msg)
		return
	}
	fmt.Printf(msg, args...)
}
{'fraction_non_alphanumeric': 0.19372491791317037, 'fraction_numerical': 0.01897117840204305, 'mean_word_length': 3.4512987012987013, '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': '5467641', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1085, 'n_words': 267}