<commit_before>#include "occaSerial.hpp"

namespace occa {
  //---[ Helper Functions ]-----------
  namespace cpu {
    std::string getFieldFrom(const std::string &command,
                             const std::string &field){
#if (OCCA_OS & LINUX_OS)
      std::stringstream ss;

      ss << "echo \"(. " << getOCCADir() << "/scripts/shellTools.sh; " << command << " '" << field << "')\" | bash";

      std::string sCommand = ss.str();

      FILE *fp;
      fp = popen(sCommand.c_str(), "r");

      const int bufferSize = 4096;
      char *buffer = new char[bufferSize];

      ignoreResult( fread(buffer, sizeof(char), bufferSize, fp) );

      pclose(fp);

      int end;

      for(end = 0; end < bufferSize; ++end){
        if(buffer[end] == '\n')
          break;
      }

      std::string ret(buffer, end);<commit_msg>[Cache] Updated OpenMP and CUDA, still need to test [5]<commit_after>#include "occaSerial.hpp"

namespace occa {
  //---[ Helper Functions ]-----------
  namespace cpu {
    std::string getFieldFrom(const std::string &command,
                             const std::string &field){
#if (OCCA_OS & LINUX_OS)
      std::stringstream ss;

      ss << "echo \"(. " << env::OCCA_DIR << "/scripts/shellTools.sh; " << command << " '" << field << "')\" | bash";

      std::string sCommand = ss.str();

      FILE *fp;
      fp = popen(sCommand.c_str(), "r");

      const int bufferSize = 4096;
      char *buffer = new char[bufferSize];

      ignoreResult( fread(buffer, sizeof(char), bufferSize, fp) );

      pclose(fp);

      int end;

      for(end = 0; end < bufferSize; ++end){
        if(buffer[end] == '\n')
          break;
      }

      std::string ret(buffer, end);
{'fraction_non_alphanumeric': 0.18005865102639296, 'fraction_numerical': 0.0064516129032258064, 'mean_word_length': 2.2433460076045626, 'pattern_counts': {'":': 0, '<': 33, '<?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': '873675', 'n_tokens_mistral': 576, 'n_tokens_neox': 536, 'n_words': 132}