<commit_before>#!/usr/bin/env bash

set +x
set +x
echo
echo "==== Installing postgres ===="
echo
set -x

if [ -z "$PLATFORM" ]; then
    set +x
    echo "PLATFORM environment variable not set. Please run previous install step(s)."
    exit 1

elif [ $PLATFORM = "macos" ]; then

    brew install postgres

elif [ $PLATFORM = "centos" ]; then
    wget -nv https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
    sudo yum install -y pgdg-centos96-9.6-3.noarch.rpm epel-release

    sudo yum update
    sudo yum install -y postgresql96 postgresql96-server postgresql96-contrib
    sudo /usr/pgsql-9.6/bin/postgresql96-setup initdb

    PG_HBA_PATH=$(sudo find /var/lib/pgsql -name "pg_hba.conf")
    sudo sed -i s/peer/trust/  $PG_HBA_PATH
    sudo sed -i s/ident/trust/  $PG_HBA_PATH

    sudo systemctl stop postgresql-9.6   # make sure no postgres instance is running already
    sudo systemctl enable postgresql-9.6
    sudo systemctl start postgresql-9.6

elif [ $PLATFORM = "ubuntu" ]; then

    sudo apt-get install -y postgresql postgresql-contrib postgresql-client

    PG_HBA_PATH=$(find /etc/postgresql -name "pg_hba.conf")
    sudo sed -i s/peer/trust/ $PG_HBA_PATH
    sudo sed -i s/md5/trust/ $PG_HBA_PATH

    sudo systemctl stop postgresql
    sudo systemctl enable postgresql.service
    sudo systemctl start postgresql.service

else
    set +x
    echo "Unexpected operating system: $PLATFORM"
    exit 1

fi;

set +x

echo Done<commit_msg>skip prompt on yum update<commit_after>#!/usr/bin/env bash

set +x
set +x
echo
echo "==== Installing postgres ===="
echo
set -x

if [ -z "$PLATFORM" ]; then
    set +x
    echo "PLATFORM environment variable not set. Please run previous install step(s)."
    exit 1

elif [ $PLATFORM = "macos" ]; then

    brew install postgres

elif [ $PLATFORM = "centos" ]; then
    wget -nv https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
    sudo yum install -y pgdg-centos96-9.6-3.noarch.rpm epel-release

    sudo yum update -y
    sudo yum install -y postgresql96 postgresql96-server postgresql96-contrib
    sudo /usr/pgsql-9.6/bin/postgresql96-setup initdb

    PG_HBA_PATH=$(sudo find /var/lib/pgsql -name "pg_hba.conf")
    sudo sed -i s/peer/trust/  $PG_HBA_PATH
    sudo sed -i s/ident/trust/  $PG_HBA_PATH

    sudo systemctl stop postgresql-9.6   # make sure no postgres instance is running already
    sudo systemctl enable postgresql-9.6
    sudo systemctl start postgresql-9.6

elif [ $PLATFORM = "ubuntu" ]; then

    sudo apt-get install -y postgresql postgresql-contrib postgresql-client

    PG_HBA_PATH=$(find /etc/postgresql -name "pg_hba.conf")
    sudo sed -i s/peer/trust/ $PG_HBA_PATH
    sudo sed -i s/md5/trust/ $PG_HBA_PATH

    sudo systemctl stop postgresql
    sudo systemctl enable postgresql.service
    sudo systemctl start postgresql.service

else
    set +x
    echo "Unexpected operating system: $PLATFORM"
    exit 1

fi;

set +x

echo Done
{'fraction_non_alphanumeric': 0.10413223140495868, 'fraction_numerical': 0.023801652892561982, 'mean_word_length': 3.072678331090175, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5775462', 'n_tokens_mistral': 1200, 'n_tokens_neox': 1109, 'n_words': 308}