<commit_before>#!/bin/bash

set -e

echo -n "Waiting MongoDB..."
max_seconds=15
while ! /usr/bin/mongo mongo:27017/test --eval true > /dev/null 2>&1
do
    sleep 1
    echo -n .
    max_seconds=$((max_seconds-1))
    if [ "$max_seconds" -le 0 ]
    then
        echo timeout
        exit 1
    fi
done
echo ok

echo -n "Setting up MongoDB..."
/usr/bin/mongo  mongo:27017/test --eval 'rs.initiate({_id:"rs1",members:[{_id:0,host:"localhost:27017"}]})'
echo ok<commit_msg>Setting correct path to mongo shell in docker build<commit_after>#!/bin/bash

set -e

echo -n "Waiting MongoDB..."
max_seconds=15
while ! /opt/mongodb/bin/mongo mongo:27017/test --eval true > /dev/null 2>&1
do
    sleep 1
    echo -n .
    max_seconds=$((max_seconds-1))
    if [ "$max_seconds" -le 0 ]
    then
        echo timeout
        exit 1
    fi
done
echo ok

echo -n "Setting up MongoDB..."
/opt/mongodb/bin/mongo  mongo:27017/test --eval 'rs.initiate({_id:"rs1",members:[{_id:0,host:"localhost:27017"}]})'
echo ok
{'fraction_non_alphanumeric': 0.158953722334004, 'fraction_numerical': 0.05030181086519115, 'mean_word_length': 2.8715953307392996, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5622151', 'n_tokens_mistral': 421, 'n_tokens_neox': 379, 'n_words': 97}