Remove trash

This commit is contained in:
Wedge 2016-06-10 16:22:16 +03:00
parent 87e9a26396
commit 0491cdb219
3 changed files with 0 additions and 3913 deletions

23
1.rb
View File

@ -1,23 +0,0 @@
require 'json'
class Analyzer
def initialize(filename)
@filename = filename
end
def analyze
data = []
File.open(@filename) do |f|
f.each_line do |line|
data << (parsed=JSON.parse(line))
end
end
data.group_by{|row| row["generation"]}
.sort{|a,b| a[0].to_i <=> b[0].to_i}
.each do |k,v|
puts "generation #{k} objects #{v.count}"
end
end
end
Analyzer.new(ARGV[0]).analyze

23
2.rb
View File

@ -1,23 +0,0 @@
require 'json'
class Analyzer
def initialize(filename)
@filename = filename
end
def analyze
data = []
File.open(@filename) do |f|
f.each_line do |line|
parsed=JSON.parse(line)
data << parsed if parsed["generation"]
end
end
data.group_by{|row| "#{row["file"]}:#{row["line"]}"}
.sort{|a,b| b[1].count <=> a[1].count}
.each do |k,v|
puts "#{k} * #{v.count}"
end
end
end
Analyzer.new(ARGV[0]).analyze

3867
out

File diff suppressed because it is too large Load Diff