Sampling random numbers from any probability distribution you want

A guide using simple Python code.

Random numbers sampled from a positive cosine probability distribution

In my previous story ( I discussed how to simulate correlated random numbers from a normal probability distribution. We focused on a normal distribution because it is well known, and standard methods of sampling exist.