<commit_before>#!/bin/bash
memcached_basedir=$(dirname $(readlink -f $0))
memcached_calldir=$(pwd)

cd "$memcached_basedir"

set -e

apt-get install -y memcached

if which php > /dev/null 2>&1; then
    phpversion=$(php -v | sed -rn 's/PHP ([0-9]+\.[0-9]+).*/\1/p')

    apt-get install -y php-memcached

    systemctl restart php${phpversion}-fpm

    # install memcacheadmin
    ( cd /var/www; git clone https://github.com/hgschmie/phpmemcacheadmin.git )
    chown ubuntu:ubuntu -R /var/www/phpmemcacheadmin<commit_msg>latest ubuntu images use vagrant user again, use vagrant user for memcached admin<commit_after>#!/bin/bash
memcached_basedir=$(dirname $(readlink -f $0))
memcached_calldir=$(pwd)

cd "$memcached_basedir"

set -e

apt-get install -y memcached

if which php > /dev/null 2>&1; then
    phpversion=$(php -v | sed -rn 's/PHP ([0-9]+\.[0-9]+).*/\1/p')

    apt-get install -y php-memcached

    systemctl restart php${phpversion}-fpm

    # install memcacheadmin
    ( cd /var/www; git clone https://github.com/hgschmie/phpmemcacheadmin.git )
    chown vagrant:vagrant -R /var/www/phpmemcacheadmin
{'fraction_non_alphanumeric': 0.15197841726618705, 'fraction_numerical': 0.014388489208633094, 'mean_word_length': 3.6182572614107884, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '5272080', 'n_tokens_mistral': 434, 'n_tokens_neox': 419, 'n_words': 99}