<commit_before>#!/usr/bin/env bash

platform=$BUILD_PLATFORM

if [ -z "$platform" ]; then
    platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/")
fi

if [ "$platform" == "win32" ]; then
    export INSTALL_NODE_URL=https://mapbox.s3.amazonaws.com/node-cpp11
fi

set -e -u
set -o pipefail

cwd=$(pwd)
mkdir -p $(dirname $0)/../vendor
cd $(dirname $0)/../vendor
curl https://s3.amazonaws.com/mapbox/apps/install-node/v0.2.0/run |  NV=$NODE_VERSION NP=$platform-x64 OD=$(pwd) BO=true sh

cd $cwd
<commit_msg>fallback to node v0.10.33 if NODE_VERSION not specified<commit_after>#!/usr/bin/env bash

platform=$BUILD_PLATFORM

if [ -z "$platform" ]; then
    platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/")
fi

if [ "$platform" == "win32" ]; then
    export INSTALL_NODE_URL=https://mapbox.s3.amazonaws.com/node-cpp11
fi

if [ -z $NODE_VERSION ]; then
    echo "NOTICE: NODE_VERSION environment variable not defined, defaulting to 0.10.33"
    NODE_VERSION=0.10.33
fi

set -e -u
set -o pipefail

cwd=$(pwd)
mkdir -p $(dirname $0)/../vendor
cd $(dirname $0)/../vendor
curl https://s3.amazonaws.com/mapbox/apps/install-node/v0.2.0/run |  NV=$NODE_VERSION NP=$platform-x64 OD=$(pwd) BO=true sh

cd $cwd

{'fraction_non_alphanumeric': 0.16442687747035573, 'fraction_numerical': 0.03241106719367589, 'mean_word_length': 4.064, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3063033', 'n_tokens_mistral': 541, 'n_tokens_neox': 512, 'n_words': 107}