<commit_before>CometIO.on :chat do |data, from|
  puts "#{data['name']} : #{data['message']}  (from:#{from})"
  self.push :chat, data
end

CometIO.on :connect do |session|
  puts "new client <#{session}>"
  CometIO.push :chat, {:name => "system", :message => "new client <#{session}>"}
  CometIO.push :chat, {:name => "system", :message => "welcome <#{session}>"}, {:to => session}
end

CometIO.on :disconnect do |session|
  puts "disconnect client <#{session}>"
end

EM::defer do
  loop do
    CometIO.push :chat, :name => 'clock', :message => Time.now.to_s
    sleep 60
  end
end

get '/' do
  haml :index
end

get '/:source.css' do
  scss params[:source].to_sym
end<commit_msg>notify client disconnection on sample app<commit_after>CometIO.on :chat do |data, from|
  puts "#{data['name']} : #{data['message']}  (from:#{from})"
  self.push :chat, data
end

CometIO.on :connect do |session|
  puts "new client <#{session}>"
  CometIO.push :chat, {:name => "system", :message => "new client <#{session}>"}
  CometIO.push :chat, {:name => "system", :message => "welcome <#{session}>"}, {:to => session}
end

CometIO.on :disconnect do |session|
  puts "disconnect client <#{session}>"
  CometIO.push :chat, {:name => "system", :message => "bye <#{session}>"}
end

EM::defer do
  loop do
    CometIO.push :chat, :name => 'clock', :message => Time.now.to_s
    sleep 60
  end
end

get '/' do
  haml :index
end

get '/:source.css' do
  scss params[:source].to_sym
end
{'fraction_non_alphanumeric': 0.19630642954856362, 'fraction_numerical': 0.0027359781121751026, 'mean_word_length': 4.339416058394161, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 28, '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': '7079655', 'n_tokens_mistral': 548, 'n_tokens_neox': 551, 'n_words': 157}