<commit_before>#!/bin/bash

echo "Hello, $USER. Installing applications..."

# Run as sudo from start
sudo -v

# GIMP
read -p "Install GIMP? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing GIMP."
    sudo apt-get install gimp
fi

# GParted
read -p "Install GParted? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing GParted."
    sudo apt-get install gparted
fi

# VLC
read -p "Install VLC? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing VLC."
    sudo apt-get install vlc
fi

# Ubuntu Restricted Extras
read -p "Install Ubuntu Restricted Extras? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing Ubuntu Restricted Extras."
    sudo apt-get install ubuntu-restricted-extras
fi

# Git
read -p "Install Git? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing Git."
    sudo add-apt-repository ppa:git-core/ppa
    sudo apt update
    sudo apt install git
fi

# Oracle JDK 8
read -p "Install Oracle JDK 8? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing Oracle JDK 8."
    echo "Part A - Add the PPA."
    sudo add-apt-repository ppa:webupd8team/java
    echo "Part B - Update system package index."
    sudo apt update
    echo "Part C - Install Java installer script."
    sudo apt install oracle-java8-installer
    echo "Part D - Set environment variable (Requires a restart)."
    sudo apt install oracle-java8-set-default
    echo "Part E - Check version of Java."
    java -version
fi

# Sublime Text 3
read -p "Install Sublime Text 3? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing Sublime Text 3."
    echo "Part A - Install the GPG key."
    sudo wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
    echo "Part B - Ensure apt is set up to work with https sources."
    sudo apt-get install apt-transport-https
    echo "Part C - Elect the channel to use."
    echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
    echo "Part D - Update apt sources and install Sublime Text."
    sudo apt-get update
    sudo apt-get install sublime-text
fi

# Visual Studio Code
read -p "Install Visual Studio Code? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing Visual Studio Code."
    curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
    sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
    sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
    sudo apt-get update
    sudo apt-get install code
fi
 
# Google Chrome
read -p "Install Google Chrome? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing Google Chrome."
    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    if sudo dpkg -i google-chrome*.deb; then
        echo 'Google Chrome installed.'
    else
        sudo apt-get install -f
        sudo dpkg -i google-chrome*.deb
        echo 'Google Chrome installed.'
    fi
fi

read -p "Finished. Press enter to continue."<commit_msg>Update and upgrade existing packages<commit_after>#!/bin/bash

echo "Hello, $USER. Installing applications..."

# Run as sudo from start
sudo -v

# Update
echo "Updating the list of available updates."
sudo apt-get update

# Upgrade
echo "Upgrading current packages."
sudo apt-get upgrade

# GIMP
read -p "Install GIMP? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing GIMP."
    sudo apt-get install gimp
fi
 
# Google Chrome
read -p "Install Google Chrome? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing Google Chrome."
    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    if sudo dpkg -i google-chrome*.deb; then
        echo 'Google Chrome installed.'
    else
        sudo apt-get install -f
        sudo dpkg -i google-chrome*.deb
        echo 'Google Chrome installed.'
    fi
fi

# GParted
read -p "Install GParted? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing GParted."
    sudo apt-get install gparted
fi

# VLC
read -p "Install VLC? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing VLC."
    sudo apt-get install vlc
fi

# Ubuntu Restricted Extras
read -p "Install Ubuntu Restricted Extras? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing Ubuntu Restricted Extras."
    sudo apt-get install ubuntu-restricted-extras
fi

# Git
read -p "Install Git? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing Git."
    sudo add-apt-repository ppa:git-core/ppa
    sudo apt update
    sudo apt install git
fi

# Oracle JDK 8
read -p "Install Oracle JDK 8? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing Oracle JDK 8."
    echo "Part A - Add the PPA."
    sudo add-apt-repository ppa:webupd8team/java
    echo "Part B - Update system package index."
    sudo apt update
    echo "Part C - Install Java installer script."
    sudo apt install oracle-java8-installer
    echo "Part D - Set environment variable (Requires a restart)."
    sudo apt install oracle-java8-set-default
    echo "Part E - Check version of Java."
    java -version
fi

# Sublime Text 3
read -p "Install Sublime Text 3? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing Sublime Text 3."
    echo "Part A - Install the GPG key."
    sudo wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
    echo "Part B - Ensure apt is set up to work with https sources."
    sudo apt-get install apt-transport-https
    echo "Part C - Elect the channel to use."
    echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
    echo "Part D - Update apt sources and install Sublime Text."
    sudo apt-get update
    sudo apt-get install sublime-text
fi

# Visual Studio Code
read -p "Install Visual Studio Code? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
    echo "Installing Visual Studio Code."
    curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
    sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
    sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
    sudo apt-get update
    sudo apt-get install code
fi

read -p "Finished. Press enter to continue."
{'fraction_non_alphanumeric': 0.12827899924184988, 'fraction_numerical': 0.00667172100075815, 'mean_word_length': 2.7562642369020502, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4475617', 'n_tokens_mistral': 2482, 'n_tokens_neox': 2335, 'n_words': 826}