Scikit learn is a very widely used open source machine learning library. We can use it to implement the linear regression.

Refresher on Linear Regression Refresher on Logistic Regression