# baca file file = File.open("server.log") # nyieun hash pikeun nyimpen data log_stats = Hash.new {07h, k h[k] = [] } # iterate leuwih file file.each do ➡️ jalur, ip = garis.split(' ') log_stats[path] << ip end # count the number of views = {} log_stats.each do do k, _v= log_stats[k].length end # sort the hash by value_most views => => => views = counts.sort_by {k_, v v.re.print.to_h_views # the first 5 elements most_[0...5].each do k, array puts "{k #arrarrake} ###arrake}"
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence