Depends on the neighbor. Some of our neighbors keep obviously vicious dogs, for reasons I don’t understand. Other neighbors have very nice dogs, and yes, I pet them. (I also walk a few dogs in the neighborhood, since I’m home during the day, and the owners are not.)
I should also point out that we have a dog, and she fits very nicely into the non-vicious category.