<commit_before>/// \file Connector_RAW/main.cpp
/// Contains the main code for the RAW connector.

#include <iostream>
#include "../util/socket.h"

/// Contains the main code for the RAW connector.
/// Expects a single commandline argument telling it which stream to connect to,
/// then outputs the raw stream to stdout.
int main(int argc, char  ** argv) {
  if (argc < 2){
    std::cout << "Usage: " << argv[0] << " stream_name" << std::endl;
    return 1;
  }
  std::string input = "/tmp/shared_socket_";
  input += argv[1];
  //connect to the proper stream
  Socket::Connection S(input);
  if (!S.connected()){
    std::cout << "Could not open stream " << argv[1] << std::endl;
    return 1;
  }
  //transport ~50kb at a time
  //this is a nice tradeoff between CPU usage and speed
  char buffer[50000];
  while(std::cout.good() && S.read(buffer,50000)){std::cout.write(buffer,50000);}
  S.close();
  return 0;
}
<commit_msg>Fix compiling of DTSC version branch.<commit_after>/// \file Connector_RAW/main.cpp
/// Contains the main code for the RAW connector.

#include <iostream>
#include "../util/socket.h"

/// Contains the main code for the RAW connector.
/// Expects a single commandline argument telling it which stream to connect to,
/// then outputs the raw stream to stdout.
int main(int argc, char  ** argv) {
  if (argc < 2){
    std::cout << "Usage: " << argv[0] << " stream_name" << std::endl;
    return 1;
  }
  std::string input = "/tmp/shared_socket_";
  input += argv[1];
  //connect to the proper stream
  Socket::Connection S(input);
  if (!S.connected()){
    std::cout << "Could not open stream " << argv[1] << std::endl;
    return 1;
  }
  //transport ~50kb at a time
  //this is a nice tradeoff between CPU usage and speed
  const char buffer[50000] = {0};
  while(std::cout.good() && S.read(buffer,50000)){std::cout.write(buffer,50000);}
  S.close();
  return 0;
}

{'fraction_non_alphanumeric': 0.1583949313621964, 'fraction_numerical': 0.02587117212249208, 'mean_word_length': 3.386574074074074, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 5, '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': '3061696', 'n_tokens_mistral': 657, 'n_tokens_neox': 617, 'n_words': 211}