<commit_before>F=
->s,l{s+=' '*(l-s.size%l)
(s.size/l).times{|i|x=s.slice i*l,l
puts [x,x.reverse][i%2]}}

require 'minitest/autorun'

describe F do
  def test_case_1
    expected = <<-EOS
Prog
mmar
ing 
zzuP
les <commit_msg>using String#[] instead of String#slice to save 6 chars<commit_after>F=
->s,l{s+=' '*(l-s.size%l)
(s.size/l).times{|i|x=s[i*l,l]
puts [x,x.reverse][i%2]}}

require 'minitest/autorun'

describe F do
  def test_case_1
    expected = <<-EOS
Prog
mmar
ing 
zzuP
les 
{'fraction_non_alphanumeric': 0.19917864476386038, 'fraction_numerical': 0.01026694045174538, 'mean_word_length': 4.48314606741573, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '4435527', 'n_tokens_mistral': 246, 'n_tokens_neox': 241, 'n_words': 49}