(seq, num)
| 89 | autowrap.DeclResolver.default_namespace = "OpenMS" |
| 90 | |
| 91 | def chunkIt(seq, num): |
| 92 | avg = len(seq) / float(num) |
| 93 | out = [] |
| 94 | last = 0.0 |
| 95 | while len(out) < num: |
| 96 | out.append(seq[int(last):int(last + avg)]) |
| 97 | last += avg |
| 98 | |
| 99 | # append the rest to the last element (if there is any) |
| 100 | out[-1].extend( seq[int(last):] ) |
| 101 | return out |
| 102 | |
| 103 | j = os.path.join |
| 104 |
no test coverage detected