A personal collection of python related code snippets. Includes a wide variety of useful/useless code samples. Comes with a simple interactive CLI!
Dynamically interprets the type of given string using eval
.
Splits list into sublists with a maximum length of the given size. Return list of sublists.
Decorator that outputs the time elapsed during the given function.
Generator that spilts list into sublists with a maximum length of the given size. Returns next sublist on each iteration.
Prints a string char by char to stdout
, pausing between each char for a given amount of milliseconds.
Returns True
if given list contains unique values. Returns False
otherwise.