<commit_before>#!/usr/bin/env bash
set -e
root=$(readlink -e $(dirname $0))

tags=""

help_text="usage: $0 [--disable-redis]"

# check for help flags first
for arg in $@ ; do
    case $arg in
        -h|--help)
            echo $help_text
            exit 0
            ;;
    esac
done

rev="<KEY>"

_next=""
# check for build flags
for arg in $@ ; do
    case $arg in
        "--disable-redis")
            tags="$tags -tags disable_redis"
            ;;
        "--revision")
            _next="rev"
            ;;
        "--revision=*")
            rev=$(echo $arg | cut -d'=' -f2)
            ;;
        *)
            if [ "x$_next" == "xrev" ] ; then
                rev="$arg"
            fi
    esac
done

if [ "x$rev" == "x" ] ; then
    echo "revision not specified"
    exit 1
fi

cd $root
export GOPATH=$root/go
mkdir -p $GOPATH
echo "obtaining gx"
go get -v github.com/whyrusleeping/gx-go
gx install --global
go get -v gx/ipfs/$rev/srndv2
cp $GOPATH/bin/srndv2 $root
echo "Built"
<commit_msg>fix build.sh<commit_after>#!/usr/bin/env bash
set -e
root=$(readlink -e $(dirname $0))

tags=""

help_text="usage: $0 [--disable-redis]"

# check for help flags first
for arg in $@ ; do
    case $arg in
        -h|--help)
            echo $help_text
            exit 0
            ;;
    esac
done

rev="<KEY>"

_next=""
# check for build flags
for arg in $@ ; do
    case $arg in
        "--disable-redis")
            tags="$tags -tags disable_redis"
            ;;
        "--revision")
            _next="rev"
            ;;
        "--revision=*")
            rev=$(echo $arg | cut -d'=' -f2)
            ;;
        *)
            if [ "x$_next" == "xrev" ] ; then
                rev="$arg"
            fi
    esac
done

if [ "x$rev" == "x" ] ; then
    echo "revision not specified"
    exit 1
fi

cd $root
export GOPATH=$root/go
mkdir -p $GOPATH
echo "obtaining gx"
go get -v github.com/whyrusleeping/gx
go get -v github.com/whyrusleeping/gx-go
gx install --global
go get -v gx/ipfs/$rev/srndv2
cp $GOPATH/bin/srndv2 $root
echo "Built"

{'fraction_non_alphanumeric': 0.15260848366650415, 'fraction_numerical': 0.006825938566552901, 'mean_word_length': 1.6893840104849278, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5570763', 'n_tokens_mistral': 770, 'n_tokens_neox': 733, 'n_words': 207}