<commit_before>#! /bin/bash -

# Delete vim swap files in directory

# Set flags so script is executed in "strict mode"
set -u # Prevent unset variables
set -e # Stop on an error
set -o pipefail # Pipe exit code should be non-zero when a command in it fails
IFS=$'\t\n' # Stricter IFS settings
ORIGINAL_IFS=$IFS

usage() {
    cat <<EOF
    Usage
EOF
}

delete_vim_swap_files() {
    find $1 -type f -name "*.swp" -delete
}

if [ -z $1 ]; then
    delete_vim_swap_files
else
    usage
fi<commit_msg>Complete the delete_vim_swap_files.sh script.<commit_after>#! /bin/bash -

# Delete vim swap files in the given directory

# Set flags so script is executed in "strict mode"
set -u # Prevent unset variables
set -e # Stop on an error
set -o pipefail # Pipe exit code should be non-zero when a command in it fails
IFS=$'\t\n' # Stricter IFS settings
ORIGINAL_IFS=$IFS

# Variables
directory=${1:-}

usage() {
    cat <<EOF
    Usage: delete_vim_swap_files.sh [directory]
EOF
}

delete_vim_swap_files() {
    directory=${1:-}
    find $directory -type f -name "*.swp" -delete
}

if [ "z" = "z$directory" ]; then
    usage
else
    delete_vim_swap_files $directory
fi
{'fraction_non_alphanumeric': 0.10843373493975904, 'fraction_numerical': 0.0034423407917383822, 'mean_word_length': 3.4220532319391634, 'pattern_counts': {'":': 0, '<': 7, '<?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': '916646', 'n_tokens_mistral': 420, 'n_tokens_neox': 408, 'n_words': 148}