Sha256: ad85a9f5dad4d479ec0a50ce2419b1af52fa6b74fa0101fdb84544a903a2a74a

Contents?: true

Size: 414 Bytes

Versions: 74

Compression:

Stored size: 414 Bytes

Contents

#!/usr/bin/env ruby
require 'socket'

host = 'localhost'
port = 4334

f = open('10000_names.txt')
w = open('output.txt', 'w')
s = TCPSocket.open(host, port)

f.each_with_index do |line, i|
  puts i if i % 1000 == 0
  line = line.strip
  s.puts(line.strip)
  res = s.gets
  if res && res.split(" ").size > 3
    res = res.strip
    w.write(line + "\n")
    w.write(res + "\n")
    w.write("\n")
  end
end

s.close

Version data entries

74 entries across 74 versions & 2 rubygems

Version Path
biodiversity-3.5.1 examples/socket_client.rb
biodiversity-3.5.0 examples/socket_client.rb
biodiversity-3.4.6 examples/socket_client.rb
biodiversity-3.4.5 examples/socket_client.rb
biodiversity-3.4.4 examples/socket_client.rb
biodiversity-3.4.3 examples/socket_client.rb
biodiversity-3.4.2 examples/socket_client.rb
biodiversity-3.4.1 examples/socket_client.rb
biodiversity-3.4.0 examples/socket_client.rb
biodiversity-3.3.0 examples/socket_client.rb
biodiversity-3.2.1 examples/socket_client.rb
biodiversity-3.2.0 examples/socket_client.rb
biodiversity-3.1.10 examples/socket_client.rb
biodiversity-3.1.9 examples/socket_client.rb
biodiversity-3.1.8 examples/socket_client.rb
biodiversity19-3.1.7 examples/socket_client.rb
biodiversity-3.1.7 examples/socket_client.rb
biodiversity19-3.1.6 examples/socket_client.rb
biodiversity-3.1.6 examples/socket_client.rb
biodiversity19-3.1.5 examples/socket_client.rb