<commit_before># Sexy bash prompt demo
# Walks to the next directory in our list

# Save the TEST_DIR for reference
TEST_DIR=test/test-files/

# Navigate through the test directories
USE_NEXT_DIR=""
for DEMO_DIR in "" "clean-synced" "dirty" "unsynced" "dirty-unsynced" ""; do
  # If we should use this directory, navigate to it
  if test -n "$USE_NEXT_DIR"; then
    echo "Use $DEMO_DIR"
    break
  fi

  # If the current directory was the last one, mark us to use the next one
  if test "$DEMO_DIR" = "$_LAST_DEMO_DIR"; then
    USE_NEXT_DIR="1"
  fi
done

# If no directories were matching, reset _LAST_DEMO_DIR
if test -z "$USE_NEXT_DIR"; then
  echo "We couldn't find where you were in the loop. Resetting it..."
  _LAST_DEMO_DIR=""
fi<commit_msg>Finished up 'it works enough' demo script<commit_after># Sexy bash prompt demo
# Walks to the next directory in our list

# Save the TEST_DIR for reference
TEST_DIR="test/test-files"

# If we are already in a test directory, use ../
if test -n "$(echo $PWD | grep 'test-files')"; then
  TEST_DIR=".."
fi

# Navigate through the test directories
USE_NEXT_DIR=""
TARGET_DEMO_DIR=""
for DEMO_DIR in "clean-synced" "dirty" "unpushed" "dirty-unpushed"; do
  # If we should use this directory, navigate to it
  if test -n "$USE_NEXT_DIR"; then
    TARGET_DEMO_DIR="$DEMO_DIR"
    break
  fi

  # If the current directory was the last one, mark us to use the next one
  if test -n "$(echo $PWD | grep -E ${DEMO_DIR}$)"; then
    USE_NEXT_DIR="1"
  fi
done

# If no directories were matching, move to the start directory
if test -z "$TARGET_DEMO_DIR"; then
  TARGET_DEMO_DIR="clean-synced"
fi

# Move to the directory
echo "$TEST_DIR"/"$TARGET_DEMO_DIR"
{'fraction_non_alphanumeric': 0.10076605774896877, 'fraction_numerical': 0.0011785503830288745, 'mean_word_length': 3.9941176470588236, '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': '7256729', 'n_tokens_mistral': 592, 'n_tokens_neox': 574, 'n_words': 226}