ibllib.misc.misc

Functions

logger_config

pprint

print_progress

Call in a loop to create terminal progress bar

range_str

Given a list of integers, returns a terse string expressing the unique values.

structarr

pprint(my_dict)[source]
structarr(names, shape=None, formats=None)[source]
logger_config(name=None)[source]
print_progress(iteration, total, prefix='', suffix='', decimals=1, length=100, fill='█')[source]

Call in a loop to create terminal progress bar

Parameters
  • iteration – Required : current iteration (Int)

  • total – Required : total iterations (Int)

  • prefix – Optional : prefix string (Str)

  • suffix – Optional: suffix string (Str)

  • decimals – Optional: positive number of decimals in percent complete (Int)

  • length – Optional: character length of bar (Int)

  • fill – Optional: bar fill character (Str)

Returns

None

range_str(values: iter) → str[source]

Given a list of integers, returns a terse string expressing the unique values.

Example

indices = [0, 1, 2, 3, 4, 7, 8, 11, 15, 20] range_str(indices) >> ‘0-4, 7-8, 11, 15 & 20’

Parameters

values – An iterable of ints

Returns