In general no, for both personal health and safety reasons. For example the food may have either substance contamination or infectious agents which could harm you. In addition, the dumpsters are often in hidden alleyways and at times hard to get in to, and therefore personal safety is an issue.
If you are going to try this, a few suggestions:
1. take a friend, both for safety and to help check the food
2. dress to protect yourself from sharp objects, common around dumpsters
3. learn who is using the dumpsters, so you can see the source of the food
4. look for packaged food, thereby reducing the risk of contamination. Particularly, look for 'best before' dates - often this food is still viable.
5. look at fruit and vegetables. Nature's packaging is often still intact, and it can become easier to judge the food quality
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence