Algorithms for convex optimization with applications to data science