Put oven rack in middle position and preheat oven to 400°F. If using whole coconut, pierce 2 softest eyes of coconut with a small screwdriver or a metal skewer, then drain and discard liquid. Bake whole coconut 15 minutes. Break shell with a hammer and remove flesh, levering it out carefully with screwdriver or point of a strong knife. Finely shred enough coconut to measure 1 cup using the 1/8-inch-wide holes of a box grater. Finely grind mustard seeds with a pinch of salt in grinder. Finely chop whole chile (without slit) and mash in mortar with pestle along with ground mustard seeds and a pinch of salt until chile is finely ground. Add 1 tablespoon water. Mix to a paste. (Alternatively, very finely chop chile, then stir with mustard seeds and water to form a paste.) Toss shrimp with turmeric and salt. Heat oil in wok over moderately high heat until hot but not smoking. Saute shrimp, stirring, until it just turns pink, 2 to 3 minutes. Add grated coconut, mustard paste, remaining 6 chiles, and remaining 2 tablespoons water. Saute, stirring, until water is absorbed and shrimp are well coated, about 2 minutes more.