Best self-defense is to avoid dangerous situations. Ppl see, hear and notice a lot more things then they realize. Its that "sense of danger" you talk about. Trust it, even if it means accepting some inconveniences like taking a longer route home.
Another thing, someone suggested playing a basket case or similar in public. Thats a bad idea. The best way to avoid trouble is to blend in.
Walk fast but not too fast, look around but dont be paranoid, look confident but dont challenge ppl by staring... i.e. try to find the middle road with all things
And one thing I've learned the hard way; do not stop if someone approaches you. Keep walking.