<commit_before>#!/bin/bash

# Performs any necessary steps before the main upgrade process is complete.

# For some reason NVM_DIR isn't set at this point
export NVM_DIR=${HOME}/.nvm
\. "$NVM_DIR/nvm.sh"  # This loads nvm
NODE_VERSION="--lts=carbon"
nvm install ${NODE_VERSION}
nvm use ${NODE_VERSION}
# always use most recent version (lts)
nvm alias default node

# Allow node and python3 to use the Bluetooth adapter<commit_msg>Clean up old node versions when upgrading. (#1744)<commit_after>#!/bin/bash

# Performs any necessary steps before the main upgrade process is complete.

# For some reason NVM_DIR isn't set at this point
export NVM_DIR=${HOME}/.nvm
\. "$NVM_DIR/nvm.sh"  # This loads nvm
NODE_VERSION="--lts=carbon"
nvm install ${NODE_VERSION}
nvm use ${NODE_VERSION}
# always use most recent version (lts)
nvm alias default node

# Clean up old node versions
for version in $(nvm ls --no-colors | grep '^ ' | awk '{ print $1 }'); do
    nvm uninstall "${version/^v/}"
done

# Allow node and python3 to use the Bluetooth adapter
{'fraction_non_alphanumeric': 0.10758885686839577, 'fraction_numerical': 0.0067243035542747355, 'mean_word_length': 4.427083333333333, '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': '6678473', 'n_tokens_mistral': 350, 'n_tokens_neox': 329, 'n_words': 132}