<commit_before>#!/bin/bash

scriptPath=$(cd `dirname $0`; pwd)

if [ $UID -ne 0 ]
then
	echo "Use \"sudo\" to run this, or switch to root to run this."
	exit 1
fi


sudo touch /var/log/installserver.log
sudo chmod 666 /var/log/installserver.log

section="# ----- [ PHP (command-line) ] ----- #"
echo "$section"

sudo aptitude -q -y install php5-cli php5-mcrypt php5-imagick php5-mysql php5-gd \
	php-gettext php5-memcached php5-sqlite php-apc php5-intl php5-curl \
	>> /var/log/installserver.log 2>&1 
# install composer (package management tool)
#cd /usr/local/bin/;
#curl -s http://getcomposer.org/installer | php
#sudo chmod a+x /usr/local/bin/composer.phar<commit_msg>include phpQuery (query-path) as a default package<commit_after>#!/bin/bash

scriptPath=$(cd `dirname $0`; pwd)

if [ $UID -ne 0 ]
then
	echo "Use \"sudo\" to run this, or switch to root to run this."
	exit 1
fi


sudo touch /var/log/installserver.log
sudo chmod 666 /var/log/installserver.log

section="# ----- [ PHP (command-line) ] ----- #"
echo "$section"

sudo aptitude -q -y install php5-cli php5-mcrypt php5-imagick php5-mysql php5-gd \
	php-gettext php5-memcached php5-sqlite php-apc php5-intl php5-curl \
	>> /var/log/installserver.log 2>&1 
sudo apt-get -q -y install php-pear
# phpQuery library, useful for processing XML files
sudo pear channel-discover pear.querypath.org
#sudo pear install phpquery/phpQuery
sudo pear install querypath/QueryPath


# install composer (package management tool)
#cd /usr/local/bin/;
#curl -s http://getcomposer.org/installer | php
#sudo chmod a+x /usr/local/bin/composer.phar
{'fraction_non_alphanumeric': 0.14133165829145727, 'fraction_numerical': 0.02135678391959799, 'mean_word_length': 3.590778097982709, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, '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': '4593534', 'n_tokens_mistral': 633, 'n_tokens_neox': 567, 'n_words': 172}