<commit_before>import subprocess
import sys
import os
import setup_util 

def start(args):
  setup_util.replace_text("cpoll_cppsp/www/connectioninfo.H", "\\#define BENCHMARK_DB_HOST \".*\"", "#define BENCHMARK_DB_HOST \"" + args.database_host + "\"")
  subprocess.Popen("make && ./run_application \"$(pwd)\"/www -g g++-4.8 -m /forcedynamic.cppsm", shell=True, cwd="cpoll_cppsp");
  return 0

def stop():
  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
  out, err = p.communicate()
  for line in out.splitlines():
    if 'cppsp_standalone' in line:
      pid = int(line.split(None, 2)[1])
      os.kill(pid, 9)
  return 0<commit_msg>setup wasn't working for me unless i broke out the make and ./run_application commands<commit_after>import subprocess
import sys
import os
import setup_util 

def start(args):
  setup_util.replace_text("cpoll_cppsp/www/connectioninfo.H", "\\#define BENCHMARK_DB_HOST \".*\"", "#define BENCHMARK_DB_HOST \"" + args.database_host + "\"")
  subprocess.check_call("make", shell=True, cwd="cpoll_cppsp")
  subprocess.Popen("./run_application \"$(pwd)\"/www -g g++-4.8 -m /forcedynamic.cppsm", shell=True, cwd="cpoll_cppsp");
  return 0

def stop():
  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
  out, err = p.communicate()
  for line in out.splitlines():
    if 'cppsp_standalone' in line:
      pid = int(line.split(None, 2)[1])
      os.kill(pid, 9)
  return 0
{'fraction_non_alphanumeric': 0.1676056338028169, 'fraction_numerical': 0.009859154929577466, 'mean_word_length': 4.382575757575758, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '7445666', 'n_tokens_mistral': 531, 'n_tokens_neox': 515, 'n_words': 116}