<commit_before>require "scan_item"
require 'ffi'

module Hermes
  module Beacon
    extend FFI::Library
    
    ffi_lib 'objc', '/System/Library/Frameworks/Foundation.framework/Foundation', '/System/Library/Frameworks/IOBluetooth.framework/IOBluetooth',
    "#{File.dirname(__FILE__)}/../bin/hermes-beacon"
    
    def self.scan(interval=0.1)
      scan = {}
      callback = Proc.new do |uuid, major, minor, power, rssi|
        scan = ScanItem.new(uuid, major, minor, power, rssi)
        return scan
      end
      Beacon.startWithTimeInterval(interval,callback)
    end
    
    callback :completion_function, [:string, :int, :int, :int, :int], :int
    
    attach_function :startWithTimeInterval, [:double, :completion_function], :void
  end
end<commit_msg>Formatting changes<commit_after>require "scan_item"
require 'ffi'

module Hermes
  module Beacon
    extend FFI::Library

    ffi_lib 'objc', '/System/Library/Frameworks/Foundation.framework/Foundation', '/System/Library/Frameworks/IOBluetooth.framework/IOBluetooth',
    "#{File.dirname(__FILE__)}/../bin/hermes-beacon"

    def self.scan(interval=0.1)
      scan = {}
      callback = Proc.new do |uuid, major, minor, power, rssi|
        scan = ScanItem.new(uuid, major, minor, power, rssi)
        return scan
      end
      Beacon.startWithTimeInterval(interval,callback)
    end

    callback :completion_function, [:string, :int, :int, :int, :int], :int

    attach_function :startWithTimeInterval, [:double, :completion_function], :void
  end
end
{'fraction_non_alphanumeric': 0.126232741617357, 'fraction_numerical': 0.0026298487836949377, 'mean_word_length': 3.6121212121212123, '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': '5284238', 'n_tokens_mistral': 497, 'n_tokens_neox': 486, 'n_words': 104}