I have some raw binary and I am unsure of some of the bits due to bad reading.
I made a list of the frequency that each bit is either 1 or 0. Some bits were always 0 or 1 but some are hard to determine. The real list unlike the sample below has 255 items. There is only 10 bits that are uncertain, so I feel it can be brute-forced.
[ 0.0, 0.35555555555555557, 1.0, 1.0, 0.4388888888888889, 0.0, 0.35555555555555557, 1.0]
x marks the uncertain values, f marking fixed.
[ f, x, f, f, x, f, x, f]
How can I use itertools to get every combination where x could be either 0 or 1, outputting a list of possibilities yet keeping the known values fixed ?
[ 0, 0, 1, 1, 0, 0, 0, 1]
[ 0, 1, 1, 1, 0, 0, 0, 1]
...
[ 0, 1, 1, 1, 1, 0, 1, 1]