Add get_samples fn: discards junk STDIN data