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

if [[ ! ("$#" == 2) ]]
  then
    echo "Usage: $0 <koan directory to copy> <new koan directory to populate>"
    exit 1
fi

if [ -d "$1" ]; then
  if [ ! -d "$2" ]; then
	mkdir $2
else
	# Make sure the destination directory is writeable.
	if [ ! -w "$2" ]; then
	  echo "$2 destination directory must be writeable"
	  exit 1
	fi	
  fi
  echo "Creating new Koan in: $2, based on Koan in: $1"; echo
  cp -R $1/start $2/
  cp -R $1/complete $2/
  cp -R $1/README.md $2/
  cp -R $1/LICENSE-2.0.txt $2/

  # Tidy up any intellij files if present
  rm -Rf $2/start/*.iml
  rm -Rf $2/start/.idea
  rm -Rf $2/complete/*.iml
  rm -Rf $2/complete/.idea
  echo "New Koan created in: $2, based on Koan in: $1"; echo
  echo "You still need to update the README and gradle.settings for the new Koan number."; echo
  echo "And of course the code itself ;-)"; echo
  echo "Enjoy!"
else
  echo "'$1' and '$2' directories must exist in order for copy to occur."
fi

<commit_msg>Added classes directory to those tidied up after copying a Koan<commit_after>#!/usr/bin/env bash

echo

if [[ ! ("$#" == 2) ]]
  then
    echo "Usage: $0 <koan directory to copy> <new koan directory to populate>"
    exit 1
fi

if [ -d "$1" ]; then
  if [ ! -d "$2" ]; then
	mkdir $2
else
	# Make sure the destination directory is writeable.
	if [ ! -w "$2" ]; then
	  echo "$2 destination directory must be writeable"
	  exit 1
	fi	
  fi
  echo "Creating new Koan in: $2, based on Koan in: $1"; echo

  cp -R $1/.gitignore $2/

  cp -R $1/start $2/
  cp -R $1/complete $2/
  cp -R $1/README.md $2/
  cp -R $1/LICENSE-2.0.txt $2/

  # Tidy up any intellij files if present
  rm -Rf $2/start/*.iml
  rm -Rf $2/start/.idea
  rm -Rf $2/start/classes
  rm -Rf $2/complete/*.iml
  rm -Rf $2/complete/.idea
  rm -Rf $2/start/classes

  echo "New Koan created in: $2, based on Koan in: $1"; echo
  echo "You still need to update the README and gradle.settings for the new Koan number."; echo
  echo "And of course the code itself ;-)"; echo
  echo "Enjoy!"
else
  echo "'$1' and '$2' directories must exist in order for copy to occur."
fi

echo


{'fraction_non_alphanumeric': 0.1414519906323185, 'fraction_numerical': 0.029039812646370025, 'mean_word_length': 2.645051194539249, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3246785', 'n_tokens_mistral': 844, 'n_tokens_neox': 812, 'n_words': 328}