<commit_before>#!/usr/bin/env bash

apt-get install -y python-pip
apt-get install -y python-setuptools
# cd /tmp
# wget -q - http://python-distribute.org/distribute_setup.py
# python distribute_setup.py
# apt-get install -y python-virtualenv

# libgmp-dev installed to avoid the warning
#   "warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath."
# when install pycrypto
apt-get install -y libgmp-dev

# installing python-dev was req'd because pycrypto install was failing
# when trying to install clf's setup.py - the article below describes
# the problem and sol'n
# http://stackoverflow.com/questions/11596839/install-pycrypto-on-ubuntu
apt-get install -y python-dev

echo "############################################################"
echo "Installing yar server(s), cli and frameworks"
echo "############################################################"
# :TODO: in future, there should service specific setup.py
cd /tmp
cp /vagrant/artifacts/tmp/yar-*.*.tar.gz .
gunzip yar-*.*.tar.gz
tar xvf yar-*.*.tar
cd yar-*.*
sudo python setup.py install
cd /tmp
rm -rf yar-*.*. >& /dev/null

echo "############################################################"
echo "Creating yar user"
echo "############################################################"
useradd --system --user-group --create-home yar

echo "############################################################"<commit_msg>closer 2 right 4 yar provisioning script on Ubuntu<commit_after>#!/usr/bin/env bash

apt-get update

# run 2 x lines below if we need setuptools 2.1 rather than the 0.6 default
cd /tmp
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python

apt-get install -y python-pip

# libgmp-dev installed to avoid the warning
#   "warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath."
# when install pycrypto
apt-get install -y libgmp-dev

# installing python-dev was req'd because pycrypto install was failing
# when trying to install clf's setup.py - the article below describes
# the problem and sol'n
# http://stackoverflow.com/questions/11596839/install-pycrypto-on-ubuntu
apt-get install -y python-dev

echo "############################################################"
echo "Installing yar server(s), cli and frameworks"
echo "############################################################"
# :TODO: in future, there should service specific setup.py
cd /tmp
cp /vagrant/artifacts/tmp/yar-*.*.tar.gz .
pip install yar-*.*.tar.gz
cd /tmp
rm -rf yar-*.*. >& /dev/null

echo "############################################################"
echo "Creating yar user"
echo "############################################################"
useradd --system --user-group --create-home yar

echo "############################################################"
{'fraction_non_alphanumeric': 0.3082142857142857, 'fraction_numerical': 0.008214285714285714, 'mean_word_length': 5.062770562770563, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '5505001', 'n_tokens_mistral': 835, 'n_tokens_neox': 783, 'n_words': 252}