<commit_before>#!/bin/bash

# Initializing virtualenv

virtualenv --python=$(type -p python2.7) .venv
source .venv/bin/activate

# Install yum dependencies
sudo yum -y update
sudo yum -y groupinstall "Development tools"
sudo yum -y install epel-release

# Remove Amazon Linux AMI pip install

sudo rm /usr/bin/pip

# Install pip, ansible and testinfra
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
sudo python get-pip.py
export PATH=$PATH:$HOME/bin:/usr/local/bin
source ~/.bash_profile
pip install -r requirements.txt

set -x
# Clone GitHub repo with Ansible playbook
git clone https://github.com/redsox2002/SREChallenge.git
cd SREChallenge/Ansible
ansible-playbook -i hosts nginx.yml

# Run testinfra
cd ../Tests
testinfra -v test_myinfra.py

# Deactivates virtualenv
deactivate<commit_msg>Updating script where to install pip requirements<commit_after>#!/bin/bash

# Initializing virtualenv

virtualenv --python=$(type -p python2.7) .venv
source .venv/bin/activate

# Install yum dependencies
sudo yum -y update
sudo yum -y groupinstall "Development tools"
sudo yum -y install epel-release

# Remove Amazon Linux AMI pip install

sudo rm /usr/bin/pip

# Install pip, ansible and testinfra
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
sudo python get-pip.py
export PATH=$PATH:$HOME/bin:/usr/local/bin
source ~/.bash_profile

set -x
# Clone GitHub repo with Ansible playbook
git clone https://github.com/redsox2002/SREChallenge.git
cd SREChallenge
pip install -r requirements.txt
cd Ansible
ansible-playbook -i hosts nginx.yml

# Run testinfra
cd ../Tests
testinfra -v test_myinfra.py

# Deactivates virtualenv
deactivate
{'fraction_non_alphanumeric': 0.10115081768625075, 'fraction_numerical': 0.0072683222289521504, 'mean_word_length': 4.294871794871795, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '790055', 'n_tokens_mistral': 621, 'n_tokens_neox': 550, 'n_words': 175}