The formula I am using to find the updated w and b parameters:
For w:
new w = w_current - learning rate * partial derivative with respect to w
For b:
new b = b_current - learning rate * partial derivative with respect to b
From the picture I am calculating the partial derivatives with the variables tot_w and tot_b for each x and y, and storing the total in pd_w and pd_b.