How to add bias consideration into logistic regression code?
If I understood correctly, by bias you mean the intercept term in your model, that is, $\alpha$ in the equation
$$
p(y=1|x) = \frac{1}{1+e^{-(\alpha + \beta_1 x_1 + \beta_2 x_2 + ... + \beta_k x_x)}}
$$

If it is the case, you can easily incorporate intercept by adding a colum of ones into your X:

X = np.hstack([np.ones([X.shape[0],1]), X])


So the first colum of $X$ is always one. Then, your model will look like

$$
p(y=1|x) = \frac{1}{1+e^{-(\beta_0 x_0 + \beta_1 x_1 + \beta_2 x_2 + ... + \beta_k x_x)}}
$$
where $\beta_0$ is your bias term and $x_0$ always equals $1$. Thus, your model would be equivalent to the one with explicit intercept.