<commit_before>require 'sqlite3'
require 'active_record'

SQLite3::Database.new('test.sqlite')
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: 'test.sqlite')
ActiveRecord::Base.connection
ActiveRecord::Migration.verbose = false # debug messages
ActiveRecord::Migrator.migrate '.'

require 'coap'
require 'codtls'

c = CoAP::Client.new(48).use_dtls
random = Random.new

puts "start random test with socket1, socket2 and rgb light..."

suppress(Exception) do
	while true do  
	  sleep(5)	

	  state = random.rand(0..5)
	  case state
		when 0
		  value = random.rand(0...16777215)
		  c.post('aaaa::60b1:0013', 5684, '/rgb', value.to_s)
		  puts "rgb: "+value.to_s
		when 1
		  c.post('aaaa::60b1:0013', 5684, '/rgb', '0')
		  puts "rgb: 0"
		when 2
		  c.post('aaaa::60b1:00a6', 5684, '/swt', '0')
		  puts "socket1 off"
		when 3
		  c.post('aaaa::60b1:00a6', 5684, '/swt', '1')
		  puts "socket1 on"
		when 4
		  c.post('aaaa::60b1:00a7', 5684, '/swt', '0')
		  puts "socket2 off"
		when 5
		  c.post('aaaa::60b1:00a7', 5684, '/swt', '1')
		  puts "socket2 on"
	  end
	end
end<commit_msg>tiny fix for test script<commit_after>require 'sqlite3'
require 'active_record'

SQLite3::Database.new('test.sqlite')
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: 'test.sqlite')
ActiveRecord::Base.connection
ActiveRecord::Migration.verbose = false # debug messages
ActiveRecord::Migrator.migrate '.'

require 'coap'
require 'codtls'

c = CoAP::Client.new(48).use_dtls
random = Random.new

puts "start random test with socket1, socket2 and rgb light..."

suppress(Exception) do
	while true do  
	  sleep(5)	

	  state = random.rand(0..5)
	  case state
		when 0
		  value = random.rand(0...16777215)
		  c.post('aaaa::60b1:0013', 5684, '/rgb', value.to_s) rescue 'error'
		  puts "rgb: "+value.to_s
		when 1
		  c.post('aaaa::60b1:0013', 5684, '/rgb', '0') rescue 'error'
		  puts "rgb: 0"
		when 2
		  c.post('aaaa::60b1:00a6', 5684, '/swt', '0') rescue 'error'
		  puts "socket1 off"
		when 3
		  c.post('aaaa::60b1:00a6', 5684, '/swt', '1') rescue 'error'
		  puts "socket1 on"
		when 4
		  c.post('aaaa::60b1:00a7', 5684, '/swt', '0') rescue 'error'
		  puts "socket2 off"
		when 5
		  c.post('aaaa::60b1:00a7', 5684, '/swt', '1') rescue 'error'
		  puts "socket2 on"
	  end
	end
end
{'fraction_non_alphanumeric': 0.16817593790426907, 'fraction_numerical': 0.08365674859853385, 'mean_word_length': 3.8637316561844863, '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': '6406918', 'n_tokens_mistral': 1069, 'n_tokens_neox': 914, 'n_words': 219}