I try to ride more or less to the traffic laws.
I ride a meter from the curb, and I shoulder check, move left, and signal before turning left. If there are parked cars I ride a meter out from them to avoid being 'doored'.
If I see a narrow spot ahead, I will shoulder check, signal and take the lane.
I slow down at stop signs and roll through, just like car drivers do

. If a car on the cross street arrives before or at the same time as me and has right of way, I stop and put a foot down and refuse to make eye contact so they can't wave me through, and wait until they go first.
At red lights I usually pull over and put my right foot on the curb, unless the right lane is a turning lane, in which case I stop on the left side of it, on the lane line. If the right lane is both a right turn and straight ahead lane, I stay in the middle so nobody tries to pass me on the right, but well forward so cars can turn right behind me. But in that position, you have to watch out for cars coming from your right and turning towards you - you may be in their blind spot.
I don't take short cuts though parking lots as it can be dangerous, as well as annoying to pedestrians.
I ride on park paths if they are on my route (legal to do so here) but almost never sidewalks.
On paths and streets, I ring the bell as I am approaching/overtaking pedestrians, so they don't walk in front of me, and on paths I also call out "on your left" or just "passing".