linear regression python code without sklearn