<commit_before>#!/bin/bash

# script to run cmake or just recompile
#  - if the command build or rebuild is given this will build the  
#    clean (or create) the build dir and (re)run cmake 
#  - otherwise, it will assume cmake has been run already and
#    just re-make the code

builddir=../build
thisdir=`pwd`

if [ "$#" -gt "0" ]; then
  # re-run cmake and then remake
  if [ "$1" = "rebuild" ] || [ "$1" = "build" ]; then
    if [ ! -d "$builddir" ]; then
      mkdir $builddir
      cd $builddir
    else
      cd $builddir
      rm -rf *
    fi
    cmake ..
    make
    cd $thisdir
  else
    echo "Use \"build\" or \"rebuild\" as arguments to re-run cmake"
  fi
else
  # just re-run make
  cd $builddir
  make
  cd $thisdir
fi
<commit_msg>build.sh: allow code to be build with debug flags (i.e. ability to use compile for gdb)<commit_after>#!/bin/bash

# script to run cmake or just recompile
#  - if the command build or rebuild is given this will build the  
#    clean (or create) the build dir and (re)run cmake 
#  - otherwise, it will assume cmake has been run already and
#    just re-make the code

builddir=../build
thisdir=`pwd`

if [ "$#" -gt "0" ]; then
  # re-run cmake and then remake
  if [ "$1" = "rebuild" ] || [ "$1" = "build" ] || [ "$1" = "debug" ]; then
    if [ ! -d "$builddir" ]; then
      mkdir $builddir
      cd $builddir
    else
      cd $builddir
      rm -rf *
    fi
    if [ "$1" = "debug" ]; then
      cmake -DCMAKE_BUILD_TYPE=Debug ..
    else
      cmake ..
    fi
    make
    cd $thisdir
  else
    echo "Use \"build\", \"rebuild\" or \"debug\" as arguments to re-run cmake"
  fi
else
  # just re-run make
  cd $builddir
  make
  cd $thisdir
fi

{'fraction_non_alphanumeric': 0.12507374631268436, 'fraction_numerical': 0.00471976401179941, 'mean_word_length': 2.2932038834951456, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4349318', 'n_tokens_mistral': 608, 'n_tokens_neox': 593, 'n_words': 226}