cheat sheet
Contents
cheat sheet#
how do I…#
create a GIF#
from enjoyn import GifAnimator
GifAnimator(items=["01.png", "02.png"], output_path="output.gif").compute()
create a MP4#
from enjoyn import Mp4Animator
Mp4Animator(items=["01.png", "02.png"], output_path="output.mp4").compute()
read items
from a directory#
from enjoyn import GifAnimator
GifAnimator.from_directory("path/to/directory", pattern="*.png", limit=10)
generate images on the fly#
from enjoyn import Preprocessor
preprocessor = Preprocessor(func=func, args=(), kwds={})
GifAnimator(..., preprocessor=preprocessor)
plot and close images on the fly#
from enjoyn import MatplotlibPreprocessor
preprocessor = MatplotlibPreprocessor(func=func, args=(), kwds={})
GifAnimator(..., preprocessor=preprocessor)
use an existing Client
#
from distributed import Client
client = Client(threads_per_worker=1)
GifAnimator(...).compute(client=client)
disable progress bar#
GifAnimator(...).compute(show_progress=False)
visualize a task graph#
GifAnimator(...).plan()
get dask delayed object#
GifAnimator(...).plan(visualize=False)
tweak runtime#
GifAnimator(...).plan(partition_size=28, split_every=8)
debug outputs#
GifAnimator(..., _debug=True)