<commit_before>#!/bin/bash
set -e
printf "%s\n" "${DSN_ROOT:?You must set DSN_ROOT}"
echo "[rDSN.Python] cmake"

mkdir -p builder

cd builder
cmake ..

echo "[rDSN.Python] make"
make install

echo "[rDSN.Python] install python2.7"
sudo apt-get install -y python2.7
echo "[rDSN.Python] install pip"
sudo apt-get install -y python-pip
cd ../src
sudo python setup.py install

echo "[rDSN.Python] install python dependency packages"
cd apps/rDSN.monitor
sudo pip install -r requirement.txt

echo "[rDSN.Python] install successfully!"
<commit_msg>Use virtualenv to deploy monitor on Linux<commit_after>#!/bin/bash
set -e
printf "%s\n" "${DSN_ROOT:?You must set DSN_ROOT}"
echo "[rDSN.Python] cmake"

mkdir -p builder

cd builder
cmake ..

echo "[rDSN.Python] make"
make install

cd ..

echo "[rDSN.Python] install python2.7"
sudo apt-get install -y python2.7


echo "[rDSN.Python] Install virtualenv"
sudo pip install virtualenv

echo "[rDSN.Python] create virtualenv"
mkdir -p env
cd env
virtualenv venv
. venv/bin/activate

echo "[rDSN.Python] set virtual env successfully!"

cd ..

cd ./src
python setup.py install

echo "[rDSN.Python] install python dependency packages"
cd apps/rDSN.monitor
pip install -r requirement.txt

echo "[rDSN.Python] install successfully!"

{'fraction_non_alphanumeric': 0.11927330173775672, 'fraction_numerical': 0.00631911532385466, 'mean_word_length': 4.323529411764706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1802221', 'n_tokens_mistral': 471, 'n_tokens_neox': 439, 'n_words': 151}