A practical guide to convex optimization using Python