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

set -u -e

if [[ ! -d ../.nvm ]]; then
    git clone https://github.com/creationix/nvm.git ../.nvm
fi
set +u
source ../.nvm/nvm.sh
nvm install 0.10
nvm use 0.10
set -u
node --version
npm --version

npm install nw-gyp

OLD_PATH="$PATH"

if [[ $(uname -s) == 'Darwin' ]]; then
    npm install --build-from-source --target_arch=ia32 --runtime=node-webkit --target=$NODE_WEBKIT
    export NW_DOWNLOAD=node-webkit-v${NODE_WEBKIT}-osx-ia32
    wget http://dl.node-webkit.org/v${NODE_WEBKIT}/${NW_DOWNLOAD}.tar.gz
    unzip ${NW_DOWNLOAD}.zip
    export PATH=$(pwd)/${NW_DOWNLOAD}:$PATH
else
    # for testing node-webkit, launch a virtual display
    export DISPLAY=:99.0
    sh -e /etc/init.d/xvfb start +extension RANDR
    npm install --build-from-source --runtime=node-webkit --target=$NODE_WEBKIT<commit_msg>fix mac node-webkit download [publish binary]<commit_after>#!/usr/bin/env bash

set -u -e

if [[ ! -d ../.nvm ]]; then
    git clone https://github.com/creationix/nvm.git ../.nvm
fi
set +u
source ../.nvm/nvm.sh
nvm install 0.10
nvm use 0.10
set -u
node --version
npm --version

npm install nw-gyp

OLD_PATH="$PATH"

if [[ $(uname -s) == 'Darwin' ]]; then
    npm install --build-from-source --target_arch=ia32 --runtime=node-webkit --target=$NODE_WEBKIT
    export NW_DOWNLOAD=node-webkit-v${NODE_WEBKIT}-osx-ia32
    wget http://dl.node-webkit.org/v${NODE_WEBKIT}/${NW_DOWNLOAD}.zip
    unzip ${NW_DOWNLOAD}.zip
    export PATH=$(pwd)/${NW_DOWNLOAD}:$PATH
else
    # for testing node-webkit, launch a virtual display
    export DISPLAY=:99.0
    sh -e /etc/init.d/xvfb start +extension RANDR
    npm install --build-from-source --runtime=node-webkit --target=$NODE_WEBKIT
{'fraction_non_alphanumeric': 0.16559766763848396, 'fraction_numerical': 0.015160349854227406, 'mean_word_length': 3.1853658536585368, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6523203', 'n_tokens_mistral': 714, 'n_tokens_neox': 648, 'n_words': 152}