<commit_before>#!/bin/bash
# script assume that you have miniconda3 instaled in path
# it will create python v2 and v3 virtual environments. and install
# dependencies in both of them
#
. deactivate
pip install sniffer
for e in 2 3
do
    conda remove -n py${e} --all -y|| echo py${e} not here, it is ok!
    conda create -y -n py${e} python=${e} python
    . activate py${e}
    pip install -r requirements.txt
    pip install -r test-requirements.txt
done
if [ "$1" == "run_all_test" ] ; then
    . deactivate
    python scent.py
fi
<commit_msg>reorganize set_env script<commit_after>#!/bin/bash
# script assume that you have miniconda3 instaled in path
# it will create python v2 and v3 virtual environments. and install
# dependencies in both of them
#
. deactivate
pip install sniffer
for e in 2 3
do
    conda remove -n py${e} --all -y|| echo py${e} not here, it is ok!
    conda create -y -n py${e} python=${e} python
    . activate py${e}
    pip install -r requirements.txt
    pip install -r test-requirements.txt
    if [ "$1" == "run_all_tests" ] ; then
      coverage run -p -m nose
      echo $? > $e.status
    fi
done
if [ "$1" == "run_all_tests" ] ; then
  source activate py2
  coverage combine
  coverage report -m
fi
test $(cat py2.status) == 0 && test $(cat py3.status) == 0


{'fraction_non_alphanumeric': 0.1110254433307633, 'fraction_numerical': 0.013878180416345412, 'mean_word_length': 3.018575851393189, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '4841451', 'n_tokens_mistral': 443, 'n_tokens_neox': 432, 'n_words': 177}