code stringlengths 3 6.57k |
|---|
iterable (iterable) |
chunk_size (int) |
n (int) |
__init__(self, iterable, chunk_size) |
_chunk_iterator(iterable, chunk_size) |
super() |
int(math.ceil(getattr(iterable, 'n', 0) |
float(chunk_size) |
int(math.ceil(len(iterable) |
float(chunk_size) |
_chunk_iterator(itr, chunk_size) |
chunk.append(x) |
len(chunk) |
len(chunk) |
ShardedIterator(CountingIterator) |
iterable (iterable) |
num_shards (int) |
shard_id (int) |
fill_value (Any, optional) |
n (int) |
__init__(self, iterable, num_shards, shard_id, fill_value=None) |
ValueError('shard_id must be between 0 and num_shards') |
int(math.ceil(len(iterable) |
float(num_shards) |
len(list(iterable) |
max( list(map(max, *list(iterable) |
subsequences (like [1,2,3,4,5,...]) |
range(0, last) |
range(shard_id*batch_size, (shard_id+1) |
all_itrs.append(itr) |
itertools.chain(*itertools.zip_longest(*all_itrs) |
range(0, len(itr) |
len(itr) |
len(itr) |
range(sharded_len-to_add, sharded_len) |
super() |
int(math.ceil(getattr(iterable, 'n', 0) |
float(num_shards) |
BackgroundConsumer(Thread) |
__init__(self, queue, source, max_len) |
Thread.__init__(self) |
run(self) |
self._queue.put(item) |
self._queue.put(_sentinel) |
self._queue.put(e) |
BufferedIterator(object) |
__init__(self, size, iterable) |
queue.Queue(size) |
time.time() |
len(iterable) |
_create_consumer(self) |
self._consumer.start() |
__iter__(self) |
__len__(self) |
take(self, n) |
min(self.total, n) |
hasattr(self._iterable, "take") |
self._iterable.take(n) |
itertools.islice(self._iterable, n) |
__next__(self) |
self._create_consumer() |
self._queue.qsize() |
min(2, max(1, self._queue.maxsize // 2) |
time.time() |
time.time() |
workers (--num-workers) |
time.time() |
self._queue.get(True) |
isinstance(item, Exception) |
StopIteration() |
gen_h_ndx(orig_ndx, topology, out_name='h_prot.ndx') |
list() |
open(orig_ndx, 'r') |
f.readline() |
f.readline() |
f.readline() |
f.readline() |
line.strip() |
len(line) |
ndx_ind.extend(line.split() |
f.readline() |
strip() |
int(elem) |
parse_top_for_h(topology) |
format(elem) |
open(out_name, 'w') |
new_file.write('[ Protein ]\n') |
len(filtered_h_ind) |
new_file.write(''.join(formated_h_ind[ind:ind+15]) |
new_file.write('\n') |
print(''.join(formated_h_ind[ind:ind+15]) |
gen_h_ndx('./prot_dir/prot.ndx', './prot_dir/topol.top') |
__init__(self, app) |
can_login(self, username, password) |
Client("http://localhost:8080/mantisbt-1.2.20/api/soap/mantisconnect.php?wsdl") |
client.service.mc_login(username, password) |
get_project_list(self, username, password) |
Client("http://localhost:8080/mantisbt-1.2.20/api/soap/mantisconnect.php?wsdl") |
client.service.mc_projects_get_user_accessible(username, password) |
range(len(projects) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.