<commit_before>#!/usr/bin/env bash
###
### helpers.sh -- Convenience functions and setup
###
### Included by other scripts, such as through:
### source "$(dirname $0)/helpers.sh" || { echo "ERROR: helpers.sh not found!" ;exit 1 ; }

#
# Internal Variables
#
# DEBUG of 0 to disable debug messages, 1 to enable
DEBUG=1

# Find a useful tput
CMD_TPUT=$(which tput)
if [ -x "${CMD_TPUT}" ]; then
	_TXT_RESET="$(${CMD_TPUT} sgr0)"
	_TXT_BOLD="$(${CMD_TPUT} bold)"
	_TXT_ERROR="${_TXT_BOLD}$(${CMD_TPUT} setaf 1)"
	_TXT_WARN="${_TXT_BOLD}$(${CMD_TPUT} setaf 3)"
	_TXT_NOTE="${_TXT_BOLD}$(${CMD_TPUT} setaf 2)"
	_TXT_DEBUG="${_TXT_BOLD}$(${CMD_TPUT} setaf 4)"
else
	_TXT_RESET=""
	_TXT_BOLD=""
	_TXT_ERROR=""<commit_msg>Only set DEBUG if not already set, default 0/off<commit_after>#!/usr/bin/env bash
###
### helpers.sh -- Convenience functions and setup
###
### Included by other scripts, such as through:
### source "$(dirname $0)/helpers.sh" || { echo "ERROR: helpers.sh not found!" ;exit 1 ; }

#
# Internal Variables
#
# DEBUG of 0 to disable debug messages, 1 to enable
DEBUG=${DEBUG:-0}

# Find a useful tput
CMD_TPUT=$(which tput)
if [ -x "${CMD_TPUT}" ]; then
	_TXT_RESET="$(${CMD_TPUT} sgr0)"
	_TXT_BOLD="$(${CMD_TPUT} bold)"
	_TXT_ERROR="${_TXT_BOLD}$(${CMD_TPUT} setaf 1)"
	_TXT_WARN="${_TXT_BOLD}$(${CMD_TPUT} setaf 3)"
	_TXT_NOTE="${_TXT_BOLD}$(${CMD_TPUT} setaf 2)"
	_TXT_DEBUG="${_TXT_BOLD}$(${CMD_TPUT} setaf 4)"
else
	_TXT_RESET=""
	_TXT_BOLD=""
	_TXT_ERROR=""
{'fraction_non_alphanumeric': 0.1975560081466395, 'fraction_numerical': 0.014256619144602852, 'mean_word_length': 5.730593607305936, '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': '700015', 'n_tokens_mistral': 640, 'n_tokens_neox': 616, 'n_words': 141}