<commit_before>local BRIGHT     = 10 -- in %
local PIXELS     = 30*5

local rainbow_index = 1
local function run(wsbuf, rainbow_speed)
  for pixel = 1, PIXELS do
--    tmr.wdclr()
    wsbuf:set(pixel, hue2rgb((pixel * rainbow_speed + rainbow_index) % 256))
  end
  rainbow_index = (rainbow_index + 1) % 256
  return 100
end

return run<commit_msg>bit faster and check args<commit_after>local BRIGHT     = 10 -- in %
local PIXELS     = 30*5

local rainbow_index = 1
local function run(wsbuf, rainbow_speed)
  if not (type(rainbow_speed) == "number" and rainbow_speed > 0) then
    rainbow_speed = 1
  end
  for pixel = 1, PIXELS do
--    tmr.wdclr()
    wsbuf:set(pixel, hue2rgb((pixel * rainbow_speed + rainbow_index) % 256))
  end
  rainbow_index = (rainbow_index + 1) % 256
  return 70
end

return run
{'fraction_non_alphanumeric': 0.10211706102117062, 'fraction_numerical': 0.0460772104607721, 'mean_word_length': 3.4419889502762433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '6295985', 'n_tokens_mistral': 341, 'n_tokens_neox': 291, 'n_words': 84}