Implement it...from scratch? Its literally least squares regression. Its a few lines of code. What are you trying to say here?
You have to get the data first build all data processing pipelines to get your parameters for linear regression.