<commit_before>#!/bin/bash

# configuration
inputrcFile="/etc/inputrc"
bashrcFile="/home/${osUsername}/.bashrc"

# update all packages
apt-get dist-upgrade -y

# install additional packages
apt-get install -y open-vm-tools

# set timezone
timedatectl set-timezone ${osTimezone}

# set locale
locale-gen ${osLocale}
update-locale LANG=${osLocale}

# set keyboard layout
sed -i 's|'XKBMODEL=.*'|'XKBMODEL=pc105'|g' /etc/default/keyboard
sed -i 's|'XKBLAYOUT=.*'|'XKBLAYOUT=${osKeyboardLayout}'|g' /etc/default/keyboard

# add history completion
echo "" >> "$inputrcFile"
echo '"\e[5~": history-search-backward' >> "$inputrcFile"
echo '"\e[6~": history-search-forward' >> "$inputrcFile"

# add default aliases
echo "" >> "$bashrcFile"
echo "alias l='ls -altrh'" >> "$bashrcFile"
echo "alias ..='cd ..'" >> "$bashrcFile"

# install docker engine?
if [ "${osDocker}" == "true" ]
then

    # install additional helper packages
    apt-get install -y apt-transport-https ca-certificates curl linux-image-extra-$(uname -r) linux-image-extra-virtual software-properties-common

    # add gpg key
    curl -x "${osProxy}" -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -

    # add apt sources to list
    add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

    # update package repos
    apt-get update

    # install docker community edition
    apt-get install -y docker-ce

    # allow execution of docker command without sudo
    gpasswd -a ${osUsername} docker
fi

# get default IP address
ipAddress="$(ip route get 8.8.8.8 | head -1 | cut -d' ' -f8)"

# show how to login via ssh
echo ""
echo "---------"
echo "SSH login"
echo "---------"
echo "ssh ${osUsername}@${ipAddress}"
echo ""<commit_msg>Download docker-compose and docker-compose-wrapper automatically<commit_after>#!/bin/bash

# configuration
inputrcFile="/etc/inputrc"
bashrcFile="/home/${osUsername}/.bashrc"

# update all packages
apt-get dist-upgrade -y

# install additional packages
apt-get install -y open-vm-tools

# set timezone
timedatectl set-timezone ${osTimezone}

# set locale
locale-gen ${osLocale}
update-locale LANG=${osLocale}

# set keyboard layout
sed -i 's|'XKBMODEL=.*'|'XKBMODEL=pc105'|g' /etc/default/keyboard
sed -i 's|'XKBLAYOUT=.*'|'XKBLAYOUT=${osKeyboardLayout}'|g' /etc/default/keyboard

# add history completion
echo "" >> "$inputrcFile"
echo '"\e[5~": history-search-backward' >> "$inputrcFile"
echo '"\e[6~": history-search-forward' >> "$inputrcFile"

# add default aliases
echo "" >> "$bashrcFile"
echo "alias l='ls -altrh'" >> "$bashrcFile"
echo "alias ..='cd ..'" >> "$bashrcFile"

# install docker engine?
if [ "${osDocker}" == "true" ]
then

    # install additional helper packages
    apt-get install -y apt-transport-https ca-certificates curl linux-image-extra-$(uname -r) linux-image-extra-virtual software-properties-common

    # add gpg key
    curl -x "${osProxy}" -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -

    # add apt sources to list
    add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

    # update package repos
    apt-get update

    # install docker community edition
    apt-get install -y docker-ce

    # allow execution of docker command without sudo
    gpasswd -a ${osUsername} docker
    
    # download docker-compose and make executable
    curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
    chmod +x /usr/local/bin/docker-compose
    
    # download docker-compose-wrapper and make executable
    curl -L https://raw.githubusercontent.com/chrisipa/docker-compose-wrapper/master/docker-compose-wrapper -o /usr/local/bin/docker-compose-wrapper
    chmod +x /usr/local/bin/docker-compose-wrapper
fi

# get default IP address
ipAddress="$(ip route get 8.8.8.8 | head -1 | cut -d' ' -f8)"

# show how to login via ssh
echo ""
echo "---------"
echo "SSH login"
echo "---------"
echo "ssh ${osUsername}@${ipAddress}"
echo ""
{'fraction_non_alphanumeric': 0.15968650502081802, 'fraction_numerical': 0.0073475385745775165, 'mean_word_length': 3.732329084588644, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 27, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3502342', 'n_tokens_mistral': 1460, 'n_tokens_neox': 1365, 'n_words': 358}