<commit_before>#!/bin/bash

sudo apt-get update
sudo apt-get install git apache2 libapache2-mod-wsgi python-virtualenv \
    python-pip python-cairo python-dev

sudo pip install daemonize
sudo pip install pycassa 
sudo pip install django 
sudo pip install twisted 
sudo pip install tagging
sudo pip install django-tagging 
sudo pip install pytz

git clone -b db-plugin https://github.com/thelastpickle/graphite-web.git /tmp/graphite/graphite-web

cd /tmp/graphite
GRAPHITE_DIRS=`ls -d */`
for dir in $GRAPHITE_DIRS; do
    pushd .
    cd $dir
    sudo python setup.py install
    popd
done

# Must create access token for command line use when MFA enabled
# https://help.github.com/articles/creating-an-access-token-for-command-line-use
git clone -b rollups https://github.com/thelastpickle/graphite-cassandra-plugin.git \
    /tmp/graphite-cassandra-plugin

git clone -b rollups https://github.com/thelastpickle/carbon.git \
    /tmp/carbon

cd /tmp/graphite-cassandra-plugin<commit_msg>require twisted < 12.0<commit_after>#!/bin/bash

sudo apt-get update
sudo apt-get install git apache2 libapache2-mod-wsgi python-virtualenv \
    python-pip python-cairo python-dev

sudo pip install pycassa 
sudo pip install django 

# reuire twisted < 12 
# see http://stackoverflow.com/questions/19894708/cant-start-carbon-12-04-python-error-importerror-cannot-import-name-daem
sudo pip install 'Twisted<12.0'
sudo pip install tagging
sudo pip install django-tagging 
sudo pip install pytz

git clone -b db-plugin https://github.com/thelastpickle/graphite-web.git /tmp/graphite/graphite-web

cd /tmp/graphite
GRAPHITE_DIRS=`ls -d */`
for dir in $GRAPHITE_DIRS; do
    pushd .
    cd $dir
    sudo python setup.py install
    popd
done

# Must create access token for command line use when MFA enabled
# https://help.github.com/articles/creating-an-access-token-for-command-line-use
git clone -b rollups https://github.com/thelastpickle/graphite-cassandra-plugin.git \
    /tmp/graphite-cassandra-plugin

git clone -b rollups https://github.com/thelastpickle/carbon.git \
    /tmp/carbon

cd /tmp/graphite-cassandra-plugin
{'fraction_non_alphanumeric': 0.09805779251539555, 'fraction_numerical': 0.011369019422074847, 'mean_word_length': 3.7354260089686098, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 3, 'https://': 8, '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': '896117', 'n_tokens_mistral': 768, 'n_tokens_neox': 706, 'n_words': 186}