The present application relates to substituted heterocycles compound of Formula I and pharmaceutical compositions thereof useful for the inhibition of BET protein function by binding to bromodomains (Formula I).