<commit_before>
F=
->i{n=Hash.new{|h,k|h[k]=[0,p]}
y=0
i.lines{|l|x=0
  l.chars{|c|x+=1

    i='><v^'.index c

    if i
      f,t=[[[y,x-4],[y,x+2]],[[y,x+4],[y,x-2]],[[y-3,x],[y+1,x]],[[y+3,x],[y-1,x]]][i]
      n[f][1]=n[t]
      n[t][0]+=1
    end
  }
  y+=1
}

c,*_,s=n.values.sort_by{|v|v[0]}

t=0
l=n.size
s[0]>1?((t+=1;c=c[1])while c!=s):t=l-=1
[t,l-t]
}



require 'minitest/autorun'

describe F do<commit_msg>joined declaration and assignment/usage for 2 vars<commit_after>
F=
->i{n=Hash.new{|h,k|h[k]=[0,p]}
t=y=0
i.lines{|l|x=0
  l.chars{|c|x+=1

    i='><v^'.index c

    if i
      s,d=[[[y,x-4],[y,x+2]],[[y,x+4],[y,x-2]],[[y-3,x],[y+1,x]],[[y+3,x],[y-1,x]]][i]
      (n[s][1]=n[d])[0]+=1
      # n[d]
    end
  }
  y+=1
}

c,*_,s=n.values.sort_by{|v|v[0]}

l=n.size
s[0]>1?((t+=1;c=c[1])while c!=s):t=l-=1
[t,l-t]
}



require 'minitest/autorun'

describe F do
{'fraction_non_alphanumeric': 0.352, 'fraction_numerical': 0.052571428571428575, 'mean_word_length': 3.8131868131868134, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '5565140', 'n_tokens_mistral': 552, 'n_tokens_neox': 526, 'n_words': 56}