Explicit Methods for Modular and Shimura Curves