That first one is a difficult spot, I think you should bet the flop if you dont think you can take heat.

The second one is interesting, I think your opponent actually has a set and is giving himself odds to draw to a boat because he knows you're weak.