<commit_before># ruby names.rb
# >dojo-name1 is in ca/cfefd7daacd9694bd893527581c59596ebd21e
# >dojo-name2 is in f6/893527581c59596ebd21ecfefd7daacd9694bd

require 'digest/sha1'

index = eval IO.popen('cat dojos/index.rb').read
names = index.map{|e| e[:name]}
names.each do |name|
  sha1 = Digest::SHA1.hexdigest(name)
  inner = sha1[0..1]   
  outer = sha1[2..-1]
  print inner + '/' + outer + '    ' + name + "\n"
end
<commit_msg>names.rb script now shows creation date and number of increments per avatar<commit_after># ruby names.rb
# >June 19 15:17 ca/cfefd7... php-caret 9,4,13 
# >June 29 19:05 f6/893527... dojo-name 0,1,3 

require 'digest/sha1'

def recent(array, max_length)
  len = [array.length, max_length].min
  array[-len,len]
end

def avatars
  %w( alligator buffalo cheetah elephant frog giraffe hippo lion raccoon snake wolf zebra )
end

index = eval IO.popen('cat dojos/index.rb').read
show = (ARGV[0] || "32").to_i
names = recent(index, show).map{|e| e[:name]}
names.each do |name|
  sha1 = Digest::SHA1.hexdigest(name)
  inner = sha1[0..1]   
  outer = sha1[2..-1]
  path = "dojos/#{inner}/#{outer}"
  manifest = eval IO.popen("cat #{path}/manifest.rb").read
  created = Time.mktime(*manifest[:created])

  inc_lengths = []
  avatars.each do |avatar|
    if File.directory? path + '/' + avatar
      incs = eval IO.popen("cat #{path}/#{avatar}/increments.rb").read
      inc_lengths << incs.length
    end
  end

  print created.strftime('%b %d %H:%M') + 
    '  ' + inner + '/' + outer[0..6] + '...' + 
    '  ' + name +
    '  ' + inc_lengths.sort.join(',') +
    "\n"

end

{'fraction_non_alphanumeric': 0.17146433041301626, 'fraction_numerical': 0.05944931163954944, 'mean_word_length': 3.3688524590163933, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '1704080', 'n_tokens_mistral': 706, 'n_tokens_neox': 639, 'n_words': 141}