The attitude I've taken lately is that we have to take responsibility for the risk we are in. If a cyclist gets hit it might be the driver's fault but it's the cyclist who will be hurting. Someone wrote that even if a car breaks every law, runs you down and hits you it is your fault. That's obviously an extreme example but there is a point to it.
I have a friend who was run down and knocked off of her bike for absolutely no reason by people she didn't know. It was a two way street with only her off to the right hand side and a van coming straight at her, no other moving vehicles on the street, the driver was looking at her too. She managed to get mostly out of the way at the last second but still got clipped and ran into some parked cars. This doesn't happen every day but it still but it kind of drove this point home for me. There are people who will hit you and a lot of people who will mess with you.
I think you have to ride assertively like Rustybrown said, but you also need to be aware of the behavior of traffic.