<commit_before>#!/bin/bash
#exit on error
set -e 
#print commands
set -x 
CC=g++

INCLUDES="-I/usr/local/includes/"
LINK_LIBS="-ltorrent-rasterbar -lboost_system -lboost_filesystem"
LINKER_PATHS="-L/usr/local/Cellar/boost/HEAD/lib"
STD="-std=c++11"
STD_LIB="-stdlib=libstdc++"

if [[ $OSTYPE == darwin* ]] ; then
  CC=clang++
  STD="-std=c++11"
  STD_LIB="-stdlib=libc++"
  INCLUDES="-I/usr/local/libtorrent-rasterbar/1.0.1_1/include"
fi

CPP_FILES="api_walkthrough.cpp"
OUTPUT="api_walkthrough"

FLAGS="-Wfatal-errors ${STD} ${STD_LIB} -DBOOST_ASIO_SEPARATE_COMPILATION -g"

${CC} ${FLAGS} ${INCLUDES} ${CPP_FILES} -o ${OUTPUT} ${LINK_LIBS} ${LINKER_PATHS}<commit_msg>builds and runs (without segfault in linux)<commit_after>#!/bin/bash
#exit on error
set -e 
#print commands
set -x 

LINK_LIBS="-ltorrent-rasterbar -lboost_system -lboost_filesystem"
STD="-std=c++11"

if [[ "$OSTYPE" == "darwin"* ]]; then
  CC=clang++
  STD_LIB="-stdlib=libc++"
  INCLUDES="-I/usr/local/libtorrent-rasterbar/1.0.1_1/include"
  LINKER_PATHS="-L/usr/local/Cellar/boost/HEAD/lib"
elif [[ "$OSTYPE" == "linux-gnu" ]]; then
  CC=g++
  STD_LIB=""
  INCLUDES="-I/usr/local/includes"
  LINKER_PATHS="-L/usr/local/lib"
  export LD_LIBRARY_PATH="/usr/local/lib"
fi

CPP_FILES="api_walkthrough.cpp"
OUTPUT="api_walkthrough"

FLAGS="-Wfatal-errors ${STD} ${STD_LIB} -DBOOST_ASIO_SEPARATE_COMPILATION -g"

${CC} ${FLAGS} ${INCLUDES} ${CPP_FILES} -o ${OUTPUT} ${LINK_LIBS} ${LINKER_PATHS}

{'fraction_non_alphanumeric': 0.19575633127994524, 'fraction_numerical': 0.009582477754962354, 'mean_word_length': 5.384279475982533, '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': '710310', 'n_tokens_mistral': 660, 'n_tokens_neox': 613, 'n_words': 95}