When I got Deja Vu, she was playbite my hands if I pet her and would attack my ankles if I walked past, grabbing them and biting.
I read up on what to do on the web, and found this solution. Whether it's the best or not, I don't know. But they said it's very similar to how mother cats discipline kittens, and all I can say is, it worked for me. By 3 days she would think about it, and maybe make the first slight movement toward it and then look me in the eye. I'd go "uh uh uh" and shake my finger and she would stop. Eventually she stopped even trying at all. Here's what they said to do.
If she starts to bite, even though your first reaction is maybe to pull back or jump, try not to. Moving slowly and calmly, firmly but gently grab her by the scruff of the neck and push her head firmly but gently down towards the floor (or whatever surface she's on) and hold her like that for just a second or two. While you're doing that, in a loud, stern, unpleasant voice, say something like "bad kitty" or "don't bite". Say whatever you want, but keep ti consistent each time. (Remember, you are NOT picking her up by the scruff of the neck, you are only holding her there to move her head away from where she is biting and to the surface she is on at the moment).
Then, keeping it calm, and still moving slowly and smoothly, let go and act like nothing happened. This is supposedly similar to what the mother cat does.
They said that many times the biting comes from pent up energy, so another thing they suggested that every time you do this, as soon as you let go, get a ball, or fishing rod type toy or something and play with her for a few mnutes which should teach her how to redirect the energy. I did do that.
All I can say is, maybe I was lucky, but within 3 days she stopped biting, and hasn't done it since, and its been 8 months. And since nothing ever hurt her, or scared her, she never became afraid of my hand or me.