However, there will always be a set of socially retarded people, there will always be horny people, and there will always be people who posses both attributes at the same time. There are a lot of socially awkward people in tech, I don't know what you can do about this problem.
If you have an attractive physique as a woman, and you wear clothes that don't hide or minimize this fact, then men will notice, and some will comment on it, and some will even be inappropriate about it. As a remedy the women should get mad, she should tell them off. However you could even make inappropriate comments punishable by DEATH. I guarantee that not even the death penalty will stop inappropriate comments, or some guy putting a hand on your knee type of stuff. Even if the women wore a burqua, that wouldn't stop it, some guy would find that hot, "hey baby, what's under the burqua?". I don't have the answer, I don't think there is an answer. Possibly when these issues occur the women are reacting politely when they should react angrily so the offender gets the correct feedback often enough to realize that he is the problem.