<commit_before>#!/usr/bin/env bash

__koopa_locate_app() { # {{{1
    # """
    # Locate file system path to an application.
    # @note Updated 2021-05-24.
    # """
    local app_name brew_name brew_prefix file
    [ "$#" -eq 2 ] || return 1
    brew_name="${1:?}"
    app_name="${2:?}"
    if _koopa_is_linux
    then
        _koopa_print "$app_name"
    elif _koopa_is_macos
    then
        brew_prefix="$(_koopa_homebrew_prefix)"
        file="${brew_prefix}/opt/${brew_name}/bin/${app_name}"
        [ -x "$file" ] || return 1
        _koopa_print "$file"
    fi
    return 0
}

__koopa_locate_app_simple() { # {{{1
    # """
    # Simpler app location fetcher that doesn't attempt to use Homebrew.
    # @note Updated 2021-05-21.
    # """
    local app_name file
    [ "$#" -eq 1 ] || return 1
    app_name="${1:?}"
    file="$(_koopa_which_realpath "$app_name")"
    [ -x "$file" ] || return 1
    _koopa_print "$file"
    return 0
}

__koopa_locate_gnu_app() { # {{{1
    # """
    # Locate a GNU application.
    # @note Updated 2021-05-24.
    # """
    local app_name brew_name brew_prefix file
    [ "$#" -eq 2 ] || return 1
    brew_name="${1:?}"
    app_name="${2:?}"
    if _koopa_is_linux
    then
        _koopa_print "$app_name"
    elif _koopa_is_macos
    then
        brew_prefix="$(_koopa_homebrew_prefix)"
        file="${brew_prefix}/opt/${brew_name}/libexec/gnubin/${app_name}"
        [ -x "$file" ] || return 1
        _koopa_print "$file"
    fi
    return 0
}
<commit_msg>Need to figure out how to speed up shell again<commit_after>#!/usr/bin/env bash

__koopa_locate_app() { # {{{1
    # """
    # Locate file system path to an application.
    # @note Updated 2021-05-24.
    # """
    local app_name brew_name brew_prefix file
    [ "$#" -eq 2 ] || return 1
    brew_name="${1:?}"
    app_name="${2:?}"
    if _koopa_is_macos
    then
        brew_prefix="$(_koopa_homebrew_prefix)"
        file="${brew_prefix}/opt/${brew_name}/bin/${app_name}"
        [ -x "$file" ] || return 1
        _koopa_print "$file"
    else
        _koopa_print "$app_name"
    fi
    return 0
}

__koopa_locate_app_simple() { # {{{1
    # """
    # Simpler app location fetcher that doesn't attempt to use Homebrew.
    # @note Updated 2021-05-24.
    # """
    local app_name file
    [ "$#" -eq 1 ] || return 1
    app_name="${1:?}"
    file="$(_koopa_which_realpath "$app_name")"
    [ -x "$file" ] || return 1
    _koopa_print "$file"
    return 0
}

__koopa_locate_gnu_app() { # {{{1
    # """
    # Locate a GNU application.
    # @note Updated 2021-05-24.
    # """
    local app_name brew_name brew_prefix file
    [ "$#" -eq 2 ] || return 1
    brew_name="${1:?}"
    app_name="${2:?}"
    if _koopa_is_macos
    then
        brew_prefix="$(_koopa_homebrew_prefix)"
        file="${brew_prefix}/opt/${brew_name}/libexec/gnubin/${app_name}"
        [ -x "$file" ] || return 1
        _koopa_print "$file"
    else
        _koopa_print "$app_name"
    fi
    return 0
}

{'fraction_non_alphanumeric': 0.15914409896355733, 'fraction_numerical': 0.029421598127716483, 'mean_word_length': 2.462962962962963, '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': '1680790', 'n_tokens_mistral': 1186, 'n_tokens_neox': 1097, 'n_words': 237}