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

# # # # # # # # # # # # # # # # # # # #
# to enable pro-cli in the project, try to
# fetch the working dir via Git
if git status &> /dev/null; then
    WDIR=$(git rev-parse --show-toplevel)
    cd $WDIR
else
    WDIR=$(pwd)
fi

# current system
PC_SYSTEM=$(uname -s)
# current pro-cli version
PC_VERSION=$(cd $PC_DIR && git describe --tags)

if [ "$PC_SYSTEM" == "Darwin" ]; then
    PC_LATEST_FETCH=$(expr $(date +%s) - $(stat -f %m $PC_DIR/.git/FETCH_HEAD))
else
    PC_LATEST_FETCH=$(expr $(date +%s) - $(stat -c %Y $PC_DIR/.git/FETCH_HEAD))
fi

# check for new version
if [ $PC_LATEST_FETCH -gt 1800 ]; then<commit_msg>use HEAD file if not fetched before<commit_after>#!/usr/bin/env bash

# # # # # # # # # # # # # # # # # # # #
# to enable pro-cli in the project, try to
# fetch the working dir via Git
if git status &> /dev/null; then
    WDIR=$(git rev-parse --show-toplevel)
    cd $WDIR
else
    WDIR=$(pwd)
fi

# current system
PC_SYSTEM=$(uname -s)
# current pro-cli version
PC_VERSION=$(cd $PC_DIR && git describe --tags)

if [ -f "$PC_DIR/.git/FETCH_HEAD" ]; then
    PC_HEAD_FILE="$PC_DIR/.git/FETCH_HEAD"
else
    PC_HEAD_FILE="$PC_DIR/.git/HEAD"
fi

if [ "$PC_SYSTEM" == "Darwin" ]; then
    PC_LATEST_FETCH=$(expr $(date +%s) - $(stat -f %m $PC_HEAD_FILE))
else
    PC_LATEST_FETCH=$(expr $(date +%s) - $(stat -c %Y $PC_HEAD_FILE))
fi

# check for new version
if [ $PC_LATEST_FETCH -gt 1800 ]; then
{'fraction_non_alphanumeric': 0.17918676774638181, 'fraction_numerical': 0.005513439007580979, 'mean_word_length': 3.3473053892215567, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '26988', 'n_tokens_mistral': 604, 'n_tokens_neox': 578, 'n_words': 153}