well, the only remotely valid thing to do is to test if the input data is decodable with any of the encodings python knows.if we do some arbitrary threshold, we only get bugs like fedora’s current release name “Schrödinger's Cat” being considered “not text”. i’d never write code like this.
PS: why do people still convert stuff to float? we live in python3 world, where 1/2 is 0.5