<commit_before>#include <iostream>
#include <set>
#include <string>
#include <thread>

#include "src/eventloop.h"
#include "src/selector.h"
#include "src/tcpserver.h"
#include "src/util/concurrent.h"
#include "src/util/core.h"
#include "src/util/fd.h"
#include "src/util/net.h"

using namespace std;
using namespace happyntrain;
using namespace happyntrain::concurrent;
using namespace happyntrain::network;
using namespace happyntrain::fd;

struct A {
  int a;
  std::string b;
  A(int a_, std::string b_) : a(a_), b(b_) {}
  A() : A(0, "") {}
};

int main() {
  EventLoop eventloop(0);
  set<int> fuckset;
  fuckset.insert(1);
  LinkedBlockingQueue<A> queue;
  queue.Push(A(1, "fuck"));
  DEBUG("%d", queue.Pop().a);
  int fd = network::new_tcp_socket();
  fd::set_fd_nonblocking(fd);
  fd::set_fd_closexec(fd);
  eventloop.SubmitTask(10000, []() { INFO("Hello, world!"); });
  eventloop.SubmitTask(20000, []() { INFO("Fuck you!"); });
  std::thread maint([&]() { eventloop.Run(); });

  for (int i = 0; i < 100; i++) {
    std::thread t([i, &eventloop]() {
      eventloop.SubmitTask([i]() { INFO("Wake up %d!", 2 * i); });
      eventloop.SubmitTask([i]() { INFO("Wake up %d!", 2 * i + 1); });
    });
    t.detach();
  }
  std::thread t1(
      [&]() { eventloop.SubmitTask(30000, [&]() { eventloop.ShutDown(); }); });
  maint.join();
  t1.join();
  { 
    AutoClosable<SocketFD> socket_fd;
    socket_fd->valid();
    socket_fd->close();
  }
  // auto server = TCPServer::Create([&](auto socket) {
  //                 socker.end("goodbye\n");
  //               })->OnError([&](auto error) {});
  // server.listen([&]() { DEBUG("opened server on ", server.Address()); });
  return 0;
}
<commit_msg>Fix naming<commit_after>#include <iostream>
#include <set>
#include <string>
#include <thread>

#include "src/eventloop.h"
#include "src/selector.h"
#include "src/tcpserver.h"
#include "src/util/concurrent.h"
#include "src/util/core.h"
#include "src/util/fd.h"
#include "src/util/net.h"

using namespace std;
using namespace happyntrain;
using namespace happyntrain::concurrent;
using namespace happyntrain::network;
using namespace happyntrain::fd;

struct A {
  int a;
  std::string b;
  A(int a_, std::string b_) : a(a_), b(b_) {}
  A() : A(0, "") {}
};

int main() {
  EventLoop eventloop(0);
  set<int> fuckset;
  fuckset.insert(1);
  LinkedBlockingQueue<A> queue;
  queue.Push(A(1, "fuck"));
  DEBUG("%d", queue.Pop().a);
  int fd = network::new_tcp_socket();
  fd::set_fd_nonblocking(fd);
  fd::set_fd_closexec(fd);
  eventloop.SubmitTask(10000, []() { INFO("Hello, world!"); });
  eventloop.SubmitTask(20000, []() { INFO("Fuck you!"); });
  std::thread maint([&]() { eventloop.Run(); });

  for (int i = 0; i < 100; i++) {
    std::thread t([i, &eventloop]() {
      eventloop.SubmitTask([i]() { INFO("Wake up %d!", 2 * i); });
      eventloop.SubmitTask([i]() { INFO("Wake up %d!", 2 * i + 1); });
    });
    t.detach();
  }
  std::thread t1(
      [&]() { eventloop.SubmitTask(30000, [&]() { eventloop.ShutDown(); }); });
  maint.join();
  t1.join();
  { 
    AutoClosable<ServerSocketFD> socket_fd;
    socket_fd->valid();
    socket_fd->close();
  }
  // auto server = TCPServer::Create([&](auto socket) {
  //                 socker.end("goodbye\n");
  //               })->OnError([&](auto error) {});
  // server.listen([&]() { DEBUG("opened server on ", server.Address()); });
  return 0;
}

{'fraction_non_alphanumeric': 0.22033401699384705, 'fraction_numerical': 0.0169938470553765, 'mean_word_length': 3.7815126050420167, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 23, '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': '386862', 'n_tokens_mistral': 1320, 'n_tokens_neox': 1282, 'n_words': 253}