This online textbook, written by Stephen Boyd and Lieven Vandenberghe, covers many aspects of convex optimization.
According to the authors:
This book is about convex optimization, a special class of mathematical optimization problems, which includes least-squares and linear programming problems. It is well known that least-squares and linear programming problems have a fairly complete theory, arise in a variety of applications, and can be solved numerically very efficiently. The basic point of this book is that the same can be said for the larger class of convex optimization problems.Boyd & Vandenberghe, preface of "Convex optimization"
This textbook includes many examples, along with Python, Julia, and Matlab data for additional exercises available on GitHub.
Textbook: Convex optimization.
GitHub: Data for additional exercises.