<commit_before>#!/bin/bash

# Install dependencies
pip install -r development_requirements.txt

# Install FOP 2.2
wget https://archive.apache.org/dist/xmlgraphics/fop/source/fop-2.2-src.tar.gz
tar -xzf fop-2.2-src.tar.gz -C ../usr/bin
rm -rf fop-2.2-src.tar.gz
chmod 755 ../usr/bin/fop-2.2/fop/fop

# Install Java 8
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/jdk-8u162-linux-x64.tar.gz
tar -xzf jdk-8u162-linux-x64.tar.gz -C ../usr/bin
rm -rf jdk-8u162-linux-x64.tar.gz

# Create /media/uploads/ directory which is required by django filebrowser
mkdir -p projectsettings/media/uploads
chmod -R 755 projectsettings/media


# Execute startup scripts
python manage.py collectstatic --noinput
python manage.py makemigrations
python manage.py migrate
python manage.py runserver 0.0.0.0:8000<commit_msg>[issue #97] Changed download of FOP from sources to binaries and added commands to create PDF upload folder for FOP.<commit_after>#!/bin/bash

# Install dependencies
pip install -r development_requirements.txt

# Install FOP 2.2
wget http://archive.apache.org/dist/xmlgraphics/fop/binaries/fop-2.2-bin.tar.gz
tar -xzf fop-2.2-bin.tar.gz -C ../usr/bin
rm -rf fop-2.2-bin.tar.gz
chmod 755 ../usr/bin/fop-2.2/fop

# Install Java 8
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/jdk-8u162-linux-x64.tar.gz
tar -xzf jdk-8u162-linux-x64.tar.gz -C ../usr/bin
rm -rf jdk-8u162-linux-x64.tar.gz

# Create /media/uploads/ directory which is required by django filebrowser
mkdir -p projectsettings/media/uploads
chmod -R 755 projectsettings/media

# Create /static/pdf for FOP PDF export
mkdir -p projectsettings/static/pdf
chmod -R 755 projectsettings/static/pdf

# Execute startup scripts
python manage.py collectstatic --noinput
python manage.py makemigrations
python manage.py migrate
python manage.py runserver 0.0.0.0:8000
{'fraction_non_alphanumeric': 0.12307692307692308, 'fraction_numerical': 0.07163461538461538, 'mean_word_length': 3.954761904761905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2916099', 'n_tokens_mistral': 872, 'n_tokens_neox': 768, 'n_words': 179}