<commit_before>#!/bin/bash

# Install xcode
if type -a xcode-select > /dev/null 2>&1; then
  echo '*** Skip xcode install'
else
  xcode-select --install
fi

# Prepare to install homebrew
# ref: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md
if test -z "$(ls -l /usr/local | grep bin | grep $(whoami))"; then
  if test -e /usr/local; then
    sudo mkdir -p /usr/local
  fi
  sudo chflags norestricted /usr/local && sudo chown -R $(whoami):admin /usr/local
fi

# Install brew-file
if type -a brew-file > /dev/null 2>&1; then
  echo '*** Skip brew-file install'
else
  curl -fsSL https://raw.github.com/rcmdnk/homebrew-file/install/install.sh | sh
fi

# Update homebrew
brew update
# Upgrade formula
brew upgrade

# Install tools
brew file install
brew cask cleanup
<commit_msg>[cask] Upgrade Casks<commit_after>#!/bin/bash

# Install xcode
if type -a xcode-select > /dev/null 2>&1; then
  echo '*** Skip xcode install'
else
  xcode-select --install
fi

# Prepare to install homebrew
# ref: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md
if test -z "$(ls -l /usr/local | grep bin | grep $(whoami))"; then
  if test -e /usr/local; then
    sudo mkdir -p /usr/local
  fi
  sudo chflags norestricted /usr/local && sudo chown -R $(whoami):admin /usr/local
fi

# Install brew-file
if type -a brew-file > /dev/null 2>&1; then
  echo '*** Skip brew-file install'
else
  curl -fsSL https://raw.github.com/rcmdnk/homebrew-file/install/install.sh | sh
fi

# Update homebrew
brew update
# Upgrade formula
brew upgrade

# Install tools
brew file install

# Upgrade cask and cleanup
brew file cask_upgrade -C

{'fraction_non_alphanumeric': 0.127913927077107, 'fraction_numerical': 0.004781829049611476, 'mean_word_length': 3.487935656836461, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2457127', 'n_tokens_mistral': 617, 'n_tokens_neox': 587, 'n_words': 187}