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

CACHE_DIR=/tmp/tsd

diskSpaceIsShort() {
   df -h "$CACHE_DIR" \
   | awk 'NR==2{pct=$5; sub(/%/, "", pct); if (pct < 90) exit 1; exit 0;}'
}

if diskSpaceIsShort; then
  ( cd ${CACHE_DIR} && find . -x -exec rm {} \; )
fi<commit_msg>Make the clean cache script a bit more OS agnostic fixing #1268. Thanks @myg821561935<commit_after>#!/usr/bin/env bash

CACHE_DIR=/tmp/tsd

diskSpaceIsShort() {
   df -h "$CACHE_DIR" \
   | awk 'NR==2{pct=$5; sub(/%/, "", pct); if (pct < 90) exit 1; exit 0;}'
}

if diskSpaceIsShort; then
  ( cd ${CACHE_DIR} && find . -type f -exec rm {} \; )
fi
{'fraction_non_alphanumeric': 0.2, 'fraction_numerical': 0.04065040650406504, 'mean_word_length': 3.3380281690140845, 'pattern_counts': {'":': 0, '<': 5, '<?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': '74690', 'n_tokens_mistral': 275, 'n_tokens_neox': 250, 'n_words': 69}