<commit_before>#!/usr/bin/env ruby

#
# This stuff will look a little better with Twine::Pool implemented. 
#

require "rubygems"
require "bundler/setup"

require 'twine'
require 'ffi-rzmq'
require 'optitron'
require 'logger'

ROOT_PATH = File.expand_path(File.dirname(__FILE__))
TMP_PATH = File.join(ROOT_PATH, 'tmp')
PID_FILE = File.join(TMP_PATH, 'master.pid')
LOG_FILE = File.join(TMP_PATH, 'daemon.log')
IPC_FILE = File.join(TMP_PATH, 'dispatcher.ipc')

require File.join(ROOT_PATH, 'dispatcher')
require File.join(ROOT_PATH, 'consumer')

class Master
  include Optitron::ClassDsl

  desc "Start up the daemon"
  def start<commit_msg>slight documentation improvement<commit_after>#!/usr/bin/env ruby

#
# This stuff will look a little better with Twine::Pool implemented. 
#
# start the daemon with:
#   ruby daemon.rb start
#
# for help:
#   ruby daemon.rb 
#

require "rubygems"
require "bundler/setup"

require 'twine'
require 'ffi-rzmq'
require 'optitron'
require 'logger'

ROOT_PATH = File.expand_path(File.dirname(__FILE__))
TMP_PATH = File.join(ROOT_PATH, 'tmp')
PID_FILE = File.join(TMP_PATH, 'master.pid')
LOG_FILE = File.join(TMP_PATH, 'daemon.log')
IPC_FILE = File.join(TMP_PATH, 'dispatcher.ipc')

require File.join(ROOT_PATH, 'dispatcher')
require File.join(ROOT_PATH, 'consumer')

class Master
  include Optitron::ClassDsl

  desc "Start up the daemon"
  def start
{'fraction_non_alphanumeric': 0.12581344902386118, 'fraction_numerical': 0.0, 'mean_word_length': 5.497652582159624, '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': '3068643', 'n_tokens_mistral': 513, 'n_tokens_neox': 508, 'n_words': 122}