<commit_before>from colorama import Fore
import requests


def main(self):
    try:
        req = requests.get("https://api.chucknorris.io/jokes/random")
        chuck_json = req.json()

        chuck_fact = chuck_json["value"]
        if self.enable_voice:
            print(Fore.RED + chuck_fact + Fore.RESET)
            self.speech.text_to_speech(chuck_fact)
        else:
            print(Fore.RED + chuck_fact + Fore.RESET)
    except:
        if self.enable_voice:
            self.speech.text_to_speech(
                "Looks like Chuck broke the Internet.")
        else:
            print(
                Fore.RED +
                "Looks like Chuck broke the Internet..." + Fore.RESET)<commit_msg>refactor chuck facts<commit_after>from colorama import Fore
from utilities.GeneralUtilities import print_say
import requests


def main(self):
    try:
        req = requests.get("https://api.chucknorris.io/jokes/random")
        chuck_json = req.json()

        chuck_fact = chuck_json["value"]
        print_say(chuck_fact, self, Fore.RED)
    except:
        print_say("Looks like Chuck broke the Internet...", self, Fore.RED)
{'fraction_non_alphanumeric': 0.10175438596491228, 'fraction_numerical': 0.0, 'mean_word_length': 2.2322946175637393, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1968797', 'n_tokens_mistral': 342, 'n_tokens_neox': 330, 'n_words': 77}