<commit_before>#!/bin/bash

if [[ "$#" != "1" ]] ; then
  echo "Usage: copy-dir <dir>"
  exit 1
fi

DIR=`readlink -f "$1"`
DIR=`echo "$DIR"|sed 's@/$@@'`
DEST=`dirname "$DIR"`

SLAVES=`cat /root/spark-ec2/slaves`

SSH_OPTS="-o StrictHostKeyChecking=no -o ConnectTimeout=5"

echo "RSYNC'ing $DIR to slaves..."
for slave in $SLAVES; do
    echo $slave
    rsync -e "ssh $SSH_OPTS" -az "$DIR" "$slave:$DEST" & sleep 0.5
done
wait<commit_msg>Adding --delete to copy-dir<commit_after>#!/bin/bash

if [[ "$#" != "1" ]] ; then
  echo "Usage: copy-dir <dir>"
  exit 1
fi

DIR=`readlink -f "$1"`
DIR=`echo "$DIR"|sed 's@/$@@'`
DEST=`dirname "$DIR"`

SLAVES=`cat /root/spark-ec2/slaves`

SSH_OPTS="-o StrictHostKeyChecking=no -o ConnectTimeout=5"

echo "RSYNC'ing $DIR to slaves..."
for slave in $SLAVES; do
    echo $slave
    rsync -e "ssh $SSH_OPTS" --delete -az "$DIR" "$slave:$DEST" & sleep 0.5
done
wait
{'fraction_non_alphanumeric': 0.21023359288097887, 'fraction_numerical': 0.01557285873192436, 'mean_word_length': 3.891304347826087, 'pattern_counts': {'":': 0, '<': 5, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5030894', 'n_tokens_mistral': 404, 'n_tokens_neox': 384, 'n_words': 99}