This python script is an implementation of gibbs sampling used to find pattern in the sequences of character. One popular example is to find motif in DNA sequence.
First, import module gibbs then called the method sampling with arguments sequence and word length the output is the position of the word for each sequence
See https://mitbal.wordpress.com/2014/01/27/gibbs-sampling/ for more explanation about the code (in Indonesian).