<commit_before>#!/bin/bash

KERNELGCCVERSION=$(cat /proc/version | awk '{print $9}' | awk 'BEGIN {FS="."} {print $1"."$2}')
NVIDIAINSTALLER='./'$(ls -t | grep NVIDIA | head -1)

if [ ! -e $NVIDIAINSTALLER ]
then
    echo 'NVIDIA installer not found!'
    exit 1
fi

if [ ! -e /usr/bin/gcc-$KERNELGCCVERSION ]
then
    echo 'GCC version $KERNELGCCVERSION not found!'
    exit 1
fi

/etc/init.d/gdm stop
echo 'Installing '$NVIDIAINSTALLER
env CC=/usr/bin/gcc-$KERNELGCCVERSION $NVIDIAINSTALLER
/etc/init.d/gdm start<commit_msg>Add command arguments for logout (-l), silent (-s, accepts everything), uninstall (-u)<commit_after>#!/bin/bash

KERNELGCCVERSION=$(cat /proc/version | awk '{print $9}' | awk 'BEGIN {FS="."} {print $1"."$2}')
NVIDIAINSTALLER='./'$(ls -t | grep NVIDIA | head -1)

# Options
NVBLOGOUT=
NVBUNINSTALL=
NVBSILENT=

while getopts lus o
do
    case "$o" in
        l)
            NVBLOGOUT='y'
            ;;
        u)
            NVBUNINSTALL='--uninstall'
            ;;
        s)
            NVBSILENT='--silent --opengl-headers --run-nvidia-xconfig'
            ;;
    esac
done

if [ ! -e $NVIDIAINSTALLER ]
then
    echo 'NVIDIA installer not found!'
    exit 1
fi

if [ ! -e /usr/bin/gcc-$KERNELGCCVERSION ]
then
    echo 'GCC version $KERNELGCCVERSION not found!'
    exit 1
fi

sudo /etc/init.d/gdm stop
echo 'Installing '$NVIDIAINSTALLER
sudo env CC=/usr/bin/gcc-$KERNELGCCVERSION $NVIDIAINSTALLER "$NVBUNINSTALL $NVBSILENT"
sudo /etc/init.d/gdm start

if [ -n "$NVBLOGOUT" ]
then
    kill -HUP $PPID
fi
{'fraction_non_alphanumeric': 0.15133724722765818, 'fraction_numerical': 0.007827788649706457, 'mean_word_length': 2.8542713567839195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3251463', 'n_tokens_mistral': 616, 'n_tokens_neox': 564, 'n_words': 149}