<commit_before>#!/bin/bash
set -eu
REMOTE_HOST=${REMOTE_HOST:-127.0.0.1}
if command -v http; then
    http -v $REMOTE_HOST:2020/api/v1/trace/dummy.0 output=stdout prefix=trace. params:='{"format":"json"}'
elif command -v curl; then
    curl --header 'Content-Type: application/json' --data '{"output": "stdout", "params": { "format": "json" }, "prefix": "trace."}' "$REMOTE_HOST":2020/api/v1/trace/dummy.0
else
    echo "No curl or httpie installed"
    apt-get update
    apt-get install -y curl
    curl --header 'Content-Type: application/json' --data '{"output": "stdout", "params": { "format": "json" }, "prefix": "trace."}' "$REMOTE_HOST":2020/api/v1/trace/dummy
fi<commit_msg>examples: minor tweaks to resolve shellcheck issues<commit_after>#!/bin/bash
set -eu

REMOTE_HOST=${REMOTE_HOST:-127.0.0.1}

if command -v http; then
    http -v "$REMOTE_HOST":2020/api/v1/trace/dummy.0 output=stdout prefix=trace. params:='{"format":"json"}'
elif command -v curl; then
    curl --header 'Content-Type: application/json' --data '{"output": "stdout", "params": { "format": "json" }, "prefix": "trace."}' "$REMOTE_HOST":2020/api/v1/trace/dummy.0
else
    echo "No curl or httpie installed"
    if command -v apt-get; then
        apt-get update
        apt-get install -y curl
    elif command -v yum; then
        yum install -y curl
    else
        exit 1
    fi
    curl --header 'Content-Type: application/json' --data '{"output": "stdout", "params": { "format": "json" }, "prefix": "trace."}' "$REMOTE_HOST":2020/api/v1/trace/dummy
fi
{'fraction_non_alphanumeric': 0.1841249186727391, 'fraction_numerical': 0.03057905009759271, 'mean_word_length': 3.674772036474164, 'pattern_counts': {'":': 23, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '7538058', 'n_tokens_mistral': 573, 'n_tokens_neox': 524, 'n_words': 143}