<commit_before>require_relative '../core_ext/socket_patch'
require 'ipaddr'
require 'socket'
require 'eventmachine'

require_relative 'ssdp/listener'
require_relative 'ssdp/searcher'

class SSDP

  # Default broadcast address
  BROADCAST = '172.16.17.32'

  # Default multicast port
  MULTICAST_PORT = 1900

  # Default TTL
  TTL = 4

  # Simply open a multicast UDP socket and listen for data.
  #def self.listen(ttl=TTL)
  #  EM.run do
  #    EM.open_datagram_socket(BROADCAST, MULTICAST_PORT, SSDP::Listener, ttl)
  #    i = 0
  #    EM.add_periodic_timer(1) { i += 1; print "listening for \b#{i}"}
  #    trap_signals<commit_msg>Removed unneeded requires<commit_after>require_relative '../core_ext/socket_patch'
require 'eventmachine'

require_relative 'ssdp/listener'
require_relative 'ssdp/searcher'

class SSDP

  # Default broadcast address
  BROADCAST = '172.16.17.32'

  # Default multicast port
  MULTICAST_PORT = 1900

  # Default TTL
  TTL = 4

  # Simply open a multicast UDP socket and listen for data.
  #def self.listen(ttl=TTL)
  #  EM.run do
  #    EM.open_datagram_socket(BROADCAST, MULTICAST_PORT, SSDP::Listener, ttl)
  #    i = 0
  #    EM.add_periodic_timer(1) { i += 1; print "listening for \b#{i}"}
  #    trap_signals
{'fraction_non_alphanumeric': 0.10610932475884244, 'fraction_numerical': 0.027331189710610933, 'mean_word_length': 3.806949806949807, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1253920', 'n_tokens_mistral': 499, 'n_tokens_neox': 457, 'n_words': 109}