<commit_before>#!/bin/bash

sandbox_user=$1
sandbox_path=$2
for i in {30..0}; do
    if [ $(getent passwd $sandbox_user | wc -l) -eq 1 ]; then
        break
    fi
    echo "Waiting for user $sandbox_user to be initialized..."
    /bin/sleep 1
done
if [ "$i" = 0 ]; then
    echo >&2 "User $sandbox_user not initialized"
    exit 1
else
    echo "User $sandbox_user initialized"
fi
cd /usr/local/lib/geo-web-viz
export core_count=$(/bin/grep -c ^processor /proc/cpuinfo)
sudo -Eu $sandbox_user "PATH=$sandbox_path" gunicorn\
 --bind 0.0.0.0:5678\
 --workers 1\
 --timeout 3600\
 --threads 16\
 --backlog 64\
 --error-logfile -\
 --log-level info\
 --capture-output\
 wsgi:app 5678 /home/$sandbox_user<commit_msg>Added more logging to geo-web-viz.<commit_after>#!/bin/bash

sandbox_user=$1
sandbox_path=$2
for i in {30..0}; do
    if [ $(getent passwd $sandbox_user | wc -l) -eq 1 ]; then
        break
    fi
    echo "Waiting for user $sandbox_user to be initialized..."
    /bin/sleep 1
done
if [ "$i" = 0 ]; then
    echo >&2 "User $sandbox_user not initialized"
    exit 1
else
    echo "User $sandbox_user initialized"
fi
cd /usr/local/lib/geo-web-viz
export core_count=$(/bin/grep -c ^processor /proc/cpuinfo)
sudo -Eu $sandbox_user "PATH=$sandbox_path" gunicorn\
 --bind 0.0.0.0:5678\
 --workers 1\
 --timeout 3600\
 --threads 16\
 --backlog 64\
 --error-logfile -\
 --log-file -\
 --access-logfile -\
 --log-level debug\
 --capture-output\
 wsgi:app 5678 /home/$sandbox_user
{'fraction_non_alphanumeric': 0.1545209176788124, 'fraction_numerical': 0.04183535762483131, 'mean_word_length': 2.744949494949495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4620849', 'n_tokens_mistral': 626, 'n_tokens_neox': 556, 'n_words': 159}