nl: divide num_entries by self._cull_frequency, convert the result to an integer, call the random.sample function with filelist and previous result as arguments, substitute the result for filelist.
code: filelist = random . sample ( filelist , int ( num_entries / self . _cull_frequency ) )