elf2data.sf 420 B

1234567891011121314
  1. #!/usr/bin/ruby
  2. # Convert an Aliquot ELF file from factordb.com, to a b-file for OEIS.org.
  3. # Examples:
  4. # sidef elf2data.sf elf_files/1134.elf | gnuplot -p -e 'set logscale y; plot "/dev/stdin" with lines'
  5. # cat elf_files/1134.elf | sidef elf2data.sf | gnuplot -p -e 'set logscale y; plot "/dev/stdin" with lines'
  6. ARGF.each {|line|
  7. if (line =~ /^(\d+)\s*\.\s*(\d+)/) {|m|
  8. say (m[0], ' ', m[1])
  9. }
  10. }