Created
March 7, 2018 18:29
-
-
Save ktym/edd6b1284c2ebef7df5f0d41c51c4069 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'json' | |
uniq = File.open("uniq_node.txt").map {|x| x.stip.to_i} | |
json = JSON.parse(ARGF.read) | |
json.each do |ary| | |
read_id = ary.shift | |
uniq.each do |uniq_id| | |
size = ary.select { |node_id| node_id == uniq_id }.size | |
if size > 0 | |
p read_id, uniq_id | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment