code: def bin(args):
      
      from bitarray import bitarray
      p = OptionParser(bin.__doc__)
      opts, args = p.parse_args(args)
  
      if len(args) != 2:
          sys.exit(not p.print_help())
  
      inp, outp = args
      fp = must_open(inp)
      fw = must_open(outp, "w")
      a = bitarray()
      for row in fp:
          c = row.split()[-1]
          a.append(int(c))
      a.tofile(fw)
      fw.close()
docs: %prog bin filename filename.bin
  
      Serialize counts to bitarrays.