Large magnetocaloric effects in magnetic intermetallics: First-principles and Monte Carlo studies