When I was in college I lived in an sketchy neighborhood. I tried to follow safety in numbers - if it was after 9 or so, I'd have friends walk me home from the bar. My school was pretty good about reminding us to have safety in numbers and use shuttles/call for escorts whenever possible. Unfortunately you can't always do that in the real world.

Whenever I go back there to visit friends, we try to arrange it so they'll walk me to my car and I'll drop them back off at their house/the bar to make sure they get inside safely.
That being said, there's still some places I won't go. There's a beautiful park in Minneapolis that I won't walk through when it's dark, so I'll walk a mile out of my way to feel safe when I'm in that area. To me, it's worth it, but I have friends who take the gamble.
It's a tough spot to be in.