In-context Example Selection with Influences