<commit_before>import _spawn


def run(command="", send_input=None, timeout=0, output_file="", listen_for="", header=""):
    """Run a system command.

    :param command: Command-line command to run.
    :type command: str.
    :param send_input: List of strings to send to STDIN one item of the list at a time.
    :type send_input: list.
    :param timeout: Maximum time command is able to execute before program is killed.
    :type timeout: int.
    :param output_file: Path to file used to save captured STDOUT instead of the console.
    :type output_file: str.
    :param listen_for: Text to listen for in STDOUT. If text is discovered, the command is killed immediately after.
    :type listen_for: str.
    :param header: Send this text to STDOUT before the command is executed.
    :type header: str.
    :return: int -- The return code.
    """<commit_msg>Add better explaination on spawn.run() return code. Have excuse to push gh-pages subtree again.<commit_after>import _spawn


def run(command="", send_input=None, timeout=0, output_file="", listen_for="", header=""):
    """Run a system command.

    :param command: Command-line command to run.
    :type command: str.
    :param send_input: List of strings to send to STDIN one item of the list at a time.
    :type send_input: list.
    :param timeout: Maximum time command is able to execute before program is killed.
    :type timeout: int.
    :param output_file: Path to file used to save captured STDOUT instead of the console.
    :type output_file: str.
    :param listen_for: Text to listen for in STDOUT. If text is discovered, the command is killed immediately after.
    :type listen_for: str.
    :param header: Send this text to STDOUT before the command is executed.
    :type header: str.
    :return: int -- 0 if successful, 1 if not.
    """
{'fraction_non_alphanumeric': 0.08698030634573305, 'fraction_numerical': 0.002188183807439825, 'mean_word_length': 3.386091127098321, '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': '1628322', 'n_tokens_mistral': 529, 'n_tokens_neox': 519, 'n_words': 248}