Kozilek vs Stonecloaker
Yes you can. Because when Kozilek goes to the graveyard, the "shuffle it into library" goes on the stack. Before that resolves, you can exile it from the graveyard with Stonecloaker.

The "shuffle it into library" is a so called triggered ability, therefore it goes on the stack and you can put your (instant or flash) spells on the stack before resolving that ability.