A recent Ecoratorio twitter directed me towards a BBC article on sharks and how to avoid them (http://www.bbc.co.uk/nature/14559836). As a public service I thought I would pass on the highlights.
Sharks prefer some places to others
Places where the shelf drops suddenly, river mouths for example. Just don't go there.
Don't look like food
Sharks generally won't attack humans except by mistake, once they realise their mistake they'll back off, which is why most people are only bitten once. Of course it's a bit late then.
Don't swim in murky water - they won't realise their mistake until too late. Equally avoid dawn and dusk.
Don't splash about a lot, to a shark that signals a wounded (and therefore vulnerable) animal.
On the same subject, don't wear bright or shiny objects, it attracts them.
Swim as a pair or group, it's more intimidating.
You can generally tell a shark's mood by it's body language, aggressive or languid. If it's in a bad mood, leave.
Don't do anything to annoy them (obviously)
You can, sometimes, face them down. Keep eye contact. Never turn your back on a shark.
There are documented cases of sharks being dissuaded by a punch on the nose, even when they have an arm or leg in their mouth. Some authors recommend the eyes or gills. Probably best not to rely on this though.
Sharks in Brazil
There are various sharks along the Brazilian coast, but only three considered dangerous to humans, the Bull shark (Carcharhinus leucas), Tiger shark (Galeocerdo cuvier) and Blacktip shark (Carcharhinus limbatus). The first two are sometimes found off the Espirito Santo coast, but shark attacks there are virtually unknown. Actually, it is technically possible to encounter a Great White, but you would have to be so incredibly unlucky that either this or a falling meteorite would get you.
The situation in the north of Brazil, around Recife, is different, Tiger and Bull sharks flourish in the warm water. Even this did not use to be a problem, but in the last few decades shark attacks on humans have increased, probably due to disturbance to their traditional habitats along the coast by over fishing and the building of a new port complex.
It´s still pretty rare to become shark food though, with only 47 attacks between 1992 and 2006, although admittedly that did involve 17 fatalities. The bad news is that sharks don´t use toothpaste, wound infections are common. Over 80 different human pathogens have been isolated from shark mouths. Whether the sharks get food poisoning from us is unrecorded.