<commit_before>#!/bin/bash

# see: http://stackoverflow.com/a/17076258
function abs_path {
  (cd "$(dirname '$1')" &>/dev/null && printf "%s/%s" "$(pwd)" "${1##*/}")
}

SAVE=$2

if [ "$SAVE" == "" ] ; then
  TMP=`mktemp -t insomniac`
else 
  TMP=$(abs_path $SAVE)
fi

SRC=$(abs_path $1)

(
  echo "Temp :" $TMP 

  echo
  echo "Compiling ..."
  echo

  # the compiler needs to know where to find it's preamble
  (
    cd ../build
    src/insc $SRC > $TMP
  )

  EXIT=$?

  if [ "$EXIT" != "0" ] ; then
    echo $EXIT
    exit $EXIT 
  fi


  echo
  echo
  echo "Running ..."
  echo

  ../build/src/insomniac $TMP

)

echo
echo

if [ "$SAVE" == "" ] ; then
#  rm $TMP
fi<commit_msg>Turn temp file clean up back on.<commit_after>#!/bin/bash

# see: http://stackoverflow.com/a/17076258
function abs_path {
  (cd "$(dirname '$1')" &>/dev/null && printf "%s/%s" "$(pwd)" "${1##*/}")
}

SAVE=$2

if [ "$SAVE" == "" ] ; then
  TMP=`mktemp -t insomniac`
else 
  TMP=$(abs_path $SAVE)
fi

SRC=$(abs_path $1)

(
  echo "Temp :" $TMP 

  echo
  echo "Compiling ..."
  echo

  # the compiler needs to know where to find it's preamble
  (
    cd ../build
    src/insc $SRC > $TMP
  )

  EXIT=$?

  if [ "$EXIT" != "0" ] ; then
    echo $EXIT
    exit $EXIT 
  fi


  echo
  echo
  echo "Running ..."
  echo

  ../build/src/insomniac $TMP

)

echo
echo

if [ "$SAVE" == "" ] ; then
  rm $TMP
fi
{'fraction_non_alphanumeric': 0.2, 'fraction_numerical': 0.01884057971014493, 'mean_word_length': 2.4183168316831685, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '42128', 'n_tokens_mistral': 618, 'n_tokens_neox': 581, 'n_words': 151}