To change how the LFSR is implemented you can change the global variables LENGTH, SEED and GATES in lfsr.py
This program will go through the steps of a user configured LFSR until a the series repeats, it will then print the length of the repeating series.