<commit_before>#!/bin/bash

# set option
HELP=0
SHOCK=''
NODE=''
TOKEN=''
USAGE="Usage: delete_node.sh [-h] -s <shock url> -n <node ID> -t <auth token>"

# get options
while getopts hs:n:t: option; do
    case "${option}"
	in
	    h) HELP=1;;
	    s) SHOCK=${OPTARG};;
	    n) NODE=${OPTARG};;
	    t) TOKEN=${OPTARG};;
    esac
done

# check options
if [ $HELP -eq 1 ]; then
    echo $USAGE
    exit
fi
if [ -z $NODE ] || [ -z $TOKEN ]; then
    echo $USAGE
    exit
fi
if [ -z $SHOCK ]; then
    SHOCK='http://shock.metagenomics.anl.gov'
fi

# do it
curl -s -X DELETE -H "authorization: mgrast $TOKEN" ${SHOCK}/node/${NODE}<commit_msg>chmod<commit_after>#!/bin/bash

# set option
HELP=0
SHOCK=''
NODE=''
TOKEN=''
USAGE="Usage: delete_node.sh [-h] -s <shock url> -n <node ID> -t <auth token>"

# get options
while getopts hs:n:t: option; do
    case "${option}"
	in
	    h) HELP=1;;
	    s) SHOCK=${OPTARG};;
	    n) NODE=${OPTARG};;
	    t) TOKEN=${OPTARG};;
    esac
done

# check options
if [ $HELP -eq 1 ]; then
    echo $USAGE
    exit
fi
if [ -z $NODE ] || [ -z $TOKEN ]; then
    echo $USAGE
    exit
fi
if [ -z $SHOCK ]; then
    SHOCK='http://shock.metagenomics.anl.gov'
fi

# do it
curl -s -X DELETE -H "authorization: mgrast $TOKEN" ${SHOCK}/node/${NODE}
echo
{'fraction_non_alphanumeric': 0.1872541306058222, 'fraction_numerical': 0.004720692368214005, 'mean_word_length': 2.8780487804878048, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7275377', 'n_tokens_mistral': 562, 'n_tokens_neox': 530, 'n_words': 154}