<commit_before>"""
Categorize and play sounds randomly, based on category.
"""
# coding: utf-8

# Standard imports
import os
import time
import random

# External imports
import pygame

class Soundcat(object):
    """Categorize and play sounds randomly, based on category.

        A Soundcat object plays a random sound from a given category.
        In order to do this, the sounds from a specific category must
        be in the same directory. You can add a category to a Soundcat
        object with the add_category() method as in the example below,
        where all sound files are in /home/user/songs/hello.

        >>> import soundcat;<commit_msg>Fixed issue with PyGame messages at startup<commit_after>"""
Categorize and play sounds randomly, based on category.
"""
# coding: utf-8

# Standard imports
import os
import time
import random

os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1'

# External imports
import pygame

class Soundcat(object):
    """Categorize and play sounds randomly, based on category.

        A Soundcat object plays a random sound from a given category.
        In order to do this, the sounds from a specific category must
        be in the same directory. You can add a category to a Soundcat
        object with the add_category() method as in the example below,
        where all sound files are in /home/user/songs/hello.

        >>> import soundcat;
{'fraction_non_alphanumeric': 0.06169296987087518, 'fraction_numerical': 0.002152080344332855, 'mean_word_length': 3.227272727272727, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6301421', 'n_tokens_mistral': 367, 'n_tokens_neox': 363, 'n_words': 183}