8 max = threshold * total
15 while i != np.size(v)-1:
18 while j != np.size(v)-1
and count < max:
25 width.append(v[j] - v[i])
29 npminwidth = np.array(width)
31 minwidth = np.amin(npminwidth)
32 pos = np.argmin(npminwidth)
42 window_size = math.ceil(len(file_sizes) * percentage / 100)
44 sorted_sizes = sorted(file_sizes)
47 min_size, max_size = sorted_sizes[0], sorted_sizes[-1]
48 min_interval = max_size - min_size
51 for i
in range(len(sorted_sizes) - (window_size - 1)):
52 lower, upper = sorted_sizes[i], sorted_sizes[i + (window_size - 1)]
53 interval = upper - lower
56 if interval < min_interval:
57 min_interval = interval
58 min_size, max_size = lower, upper
60 return min_size, max_size