<commit_before>#!/bin/bash

# Install Pake
pyrus channel-discover pear.indeyets.ru
pyrus install -f http://pear.indeyets.ru/get/pake-1.6.3.tgz

# Options
MIDGARD_LIBS_VERSION=10.05.7
MIDGARD_EXT_VERSION=gjallarhorn

# Install Midgard2 library dependencies from OBS
sudo apt-get install -y dbus libglib2.0-dev libgda-4.0-4 libgda-4.0-dev libxml2-dev libdbus-1-dev libdbus-glib-1-dev valgrind php-pear

# Build Midgard2 core from recent tarball
wget -q https://github.com/midgardproject/midgard-core/tarball/${MIDGARD_EXT_VERSION}
tar -xzf ratatoskr
sh -c "cd midgardproject-midgard-core-*&&./autogen.sh --prefix=/usr; make; sudo make install"
rm -f ${MIDGARD_EXT_VERSION}

# Build and install the Midgard2 extension
php `pyrus get php_dir|tail -1`/pake.php install

# Enable dynamic loading of extensions in PHP
echo "enable_dl=On" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
<commit_msg>Add security apt source to install php packages<commit_after>#!/bin/bash

# Install Pake
pyrus channel-discover pear.indeyets.ru
pyrus install -f http://pear.indeyets.ru/get/pake-1.6.3.tgz

# Options
MIDGARD_LIBS_VERSION=10.05.7
MIDGARD_EXT_VERSION=gjallarhorn

# Install Midgard2 library dependencies
sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu precise-security main restricted universe multiverse"
sudo apt-get --quiet update
sudo apt-get install -y dbus libglib2.0-dev libgda-4.0-4 libgda-4.0-dev libxml2-dev libdbus-1-dev libdbus-glib-1-dev valgrind php-pear

# Build Midgard2 core from recent tarball
wget -q https://github.com/midgardproject/midgard-core/tarball/${MIDGARD_EXT_VERSION}
tar -xzf ratatoskr
sh -c "cd midgardproject-midgard-core-*&&./autogen.sh --prefix=/usr; make; sudo make install"
rm -f ${MIDGARD_EXT_VERSION}

# Build and install the Midgard2 extension
php `pyrus get php_dir|tail -1`/pake.php install

# Enable dynamic loading of extensions in PHP
echo "enable_dl=On" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`

{'fraction_non_alphanumeric': 0.12261306532663317, 'fraction_numerical': 0.022110552763819097, 'mean_word_length': 4.56145251396648, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6372053', 'n_tokens_mistral': 783, 'n_tokens_neox': 735, 'n_words': 188}