<commit_before>#!/bin/bash

set -e

apt-get update
apt-get install -y libffi-dev build-essential python-pip python-dev mongodb git

pip install virtualenv

cd /tmp
wget http://dist.schmorp.de/libev/libev-4.15.tar.gz
tar zxvf libev-4.15.tar.gz 
cd libev-4.15
./configure && make && make install
ldconfig

cd /opt
git clone https://github.com/threatstream/hpfeeds
chmod 755 -R hpfeeds
cd hpfeeds
virtualenv env
. env/bin/activate

pip install cffi
pip install pyopenssl==0.14
pip install pymongo
pip install -e git+https://github.com/rep/evnet.git#egg=evnet-dev

apt-get install supervisor

cat >> /etc/supervisor/conf.d/hpfeeds-broker.conf <<EOF 
[program:hpfeeds-broker]
command=/opt/hpfeeds/env/bin/python /opt/hpfeeds/broker/feedbroker.py
directory=/opt/hpfeeds<commit_msg>added libssl-dev to install_hpfeeds.sh<commit_after>#!/bin/bash

set -e

apt-get update
apt-get install -y libffi-dev build-essential python-pip python-dev mongodb git libssl-dev

pip install virtualenv

cd /tmp
wget http://dist.schmorp.de/libev/libev-4.15.tar.gz
tar zxvf libev-4.15.tar.gz 
cd libev-4.15
./configure && make && make install
ldconfig

cd /opt
git clone https://github.com/threatstream/hpfeeds
chmod 755 -R hpfeeds
cd hpfeeds
virtualenv env
. env/bin/activate

pip install cffi
pip install pyopenssl==0.14
pip install pymongo
pip install -e git+https://github.com/rep/evnet.git#egg=evnet-dev

apt-get install supervisor

cat >> /etc/supervisor/conf.d/hpfeeds-broker.conf <<EOF 
[program:hpfeeds-broker]
command=/opt/hpfeeds/env/bin/python /opt/hpfeeds/broker/feedbroker.py
directory=/opt/hpfeeds
{'fraction_non_alphanumeric': 0.12168978562421186, 'fraction_numerical': 0.018915510718789406, 'mean_word_length': 4.152597402597403, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '2103156', 'n_tokens_mistral': 653, 'n_tokens_neox': 608, 'n_words': 139}