<commit_before>#!/bin/bash

#
# Detects if system is macOS
#
is_mac() {
    if [[ `uname` == "Darwin" ]]; then
        return 0
    else
        return 1
    fi
}

#
# Detects if system is Linux
#
is_linux() {
    if [[ `uname` == "Linux" ]]; then
        return 0
    else
        return 1
    fi
}

#
# Detects if environment is ZSH
#
is_zsh() {
    if [ -n "$ZSH_VERSION" ]; then
        return 0
    elif [ -n "$BASH_VERSION" ]; then
        return 1
    fi
}

#
# Resets the color
#
msg_reset () {
  RESET='\033[0m'
  printf "${RESET}\n"
}

#
# Log an error
#
error () {
  RED_FORE='\033[0;31m'
  printf "${RED_FORE}ERROR: $1"
  msg_reset
}

#
# Log verbose message
#
verbose () {
  CYAN_FORE='\033[0;36m'
  printf "${CYAN_FORE}INFO: $1"
  msg_reset
}

#
# Log message
#
msg () {
  printf "$1\n"
}

#
# Install Homebrew
#
install_homebrew () {
    command -v brew >/dev/null 2>&1 || {
        msg "Installing Homebrew..."

        /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
        brew tap caskroom/cask

        if [ $? -ne 0 ]; then
            error "Was not able to install Homebrew."
            exit 1
        fi
    }
}

#
# Install Ruby envioronment for linux
#
install_rbenv_linux() {
    msg "Installing Ruby..."
    sudo apt update
    git clone git://github.com/rbenv/rbenv ~/.rbenv/
    git clone git://github.com/rbenv/ruby-build ~/.rbenv/plugins/ruby-build
<commit_msg>FIX: Update ./setup.sh git source for rbenv<commit_after>#!/bin/bash

#
# Detects if system is macOS
#
is_mac() {
    if [[ `uname` == "Darwin" ]]; then
        return 0
    else
        return 1
    fi
}

#
# Detects if system is Linux
#
is_linux() {
    if [[ `uname` == "Linux" ]]; then
        return 0
    else
        return 1
    fi
}

#
# Detects if environment is ZSH
#
is_zsh() {
    if [ -n "$ZSH_VERSION" ]; then
        return 0
    elif [ -n "$BASH_VERSION" ]; then
        return 1
    fi
}

#
# Resets the color
#
msg_reset () {
  RESET='\033[0m'
  printf "${RESET}\n"
}

#
# Log an error
#
error () {
  RED_FORE='\033[0;31m'
  printf "${RED_FORE}ERROR: $1"
  msg_reset
}

#
# Log verbose message
#
verbose () {
  CYAN_FORE='\033[0;36m'
  printf "${CYAN_FORE}INFO: $1"
  msg_reset
}

#
# Log message
#
msg () {
  printf "$1\n"
}

#
# Install Homebrew
#
install_homebrew () {
    command -v brew >/dev/null 2>&1 || {
        msg "Installing Homebrew..."

        /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
        brew tap caskroom/cask

        if [ $? -ne 0 ]; then
            error "Was not able to install Homebrew."
            exit 1
        fi
    }
}

#
# Install Ruby envioronment for linux
#
install_rbenv_linux() {
    msg "Installing Ruby..."
    sudo apt update
    git clone https://github.com/rbenv/rbenv ~/.rbenv/
    git clone https://github.com/rbenv/ruby-build ~/.rbenv/plugins/ruby-build

{'fraction_non_alphanumeric': 0.15037593984962405, 'fraction_numerical': 0.019822282980177717, 'mean_word_length': 2.1884531590413943, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '3445871', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1104, 'n_words': 276}