<commit_before>#!/bin/bash

#exit script on any error
set -e

#Shell Colour constants for use in 'echo -e'
#e.g.  echo -e "My message ${GREEN}with just this text in green${NC}"
RED='\033[1;31m'
GREEN='\033[1;32m'
YELLOW='\033[1;33m'
BLUE='\033[1;34m'
NC='\033[0m' # No Colour 

sudo bash -c "echo '127.0.0.1 kafka' >> /etc/hosts"
sudo bash -c "echo '127.0.0.1 hbase' >> /etc/hosts"
sudo bash -c "echo '127.0.0.1 stroom-auth-service' >> /etc/hosts"

echo -e "TRAVIS_EVENT_TYPE:   [${GREEN}${TRAVIS_EVENT_TYPE}${NC}]"

if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
    echo "Cron build so don't set up gradle plugins or docker containers"

else
    echo -e "JAVA_OPTS: [${GREEN}$JAVA_OPTS${NC}]"
    # Increase the size of the heap
    export JAVA_OPTS=-Xmx1024m

    echo "Clone our stroom-resources repo"
    git clone https://github.com/gchq/stroom-resources.git
    pushd stroom-resources/bin
    git checkout $STROOM_RESOURCES_BRANCH

    echo "Start all the services we need to run the integration tests in stroom"
    ./bounceIt.sh 'up -d --build' -e -y -x kafka stroom-db stroom-stats-db zookeeper
    popd
    popd

    echo "Configure our plugins directory so stroom can find the kafka jar"
    mkdir -p ~/.stroom/plugins
    #Run the script to convert stroom.conf.template into stroom.conf
    ./stroom.conf.sh
fi

exit 0<commit_msg>Remove popd cmd in travis.before_script<commit_after>#!/bin/bash

#exit script on any error
set -e

#Shell Colour constants for use in 'echo -e'
#e.g.  echo -e "My message ${GREEN}with just this text in green${NC}"
RED='\033[1;31m'
GREEN='\033[1;32m'
YELLOW='\033[1;33m'
BLUE='\033[1;34m'
NC='\033[0m' # No Colour 

sudo bash -c "echo '127.0.0.1 kafka' >> /etc/hosts"
sudo bash -c "echo '127.0.0.1 hbase' >> /etc/hosts"
sudo bash -c "echo '127.0.0.1 stroom-auth-service' >> /etc/hosts"

echo -e "TRAVIS_EVENT_TYPE:   [${GREEN}${TRAVIS_EVENT_TYPE}${NC}]"

if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
    echo "Cron build so don't set up gradle plugins or docker containers"

else
    echo -e "JAVA_OPTS: [${GREEN}$JAVA_OPTS${NC}]"
    # Increase the size of the heap
    export JAVA_OPTS=-Xmx1024m

    echo "Clone our stroom-resources repo"
    git clone https://github.com/gchq/stroom-resources.git
    pushd stroom-resources/bin
    git checkout $STROOM_RESOURCES_BRANCH

    echo "Start all the services we need to run the integration tests in stroom"
    ./bounceIt.sh 'up -d --build' -e -y -x kafka stroom-db stroom-stats-db zookeeper
    popd

    echo "Configure our plugins directory so stroom can find the kafka jar"
    mkdir -p ~/.stroom/plugins
    #Run the script to convert stroom.conf.template into stroom.conf
    ./stroom.conf.sh
fi

exit 0
{'fraction_non_alphanumeric': 0.1346938775510204, 'fraction_numerical': 0.03784786641929499, 'mean_word_length': 3.3695299837925448, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '321635', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1028, 'n_words': 312}