AGENT SKILL

notebook.create_animation

Create an animation from an ipywidget interact function using a description

License 许可
Apache-2.0
所属仓库
causify-ai/helpers
最近更新
2026-11-02
Stars
★ 155
Forks
170

01 前言 Front Matter

model
haiku
description
Create an animation from an ipywidget interact function using a description

03 SKILL.md 正文

Goal

  • Given the function passed that can go in ipywidget.interact() create an animation using the template below:
    # Parameters for video generation.
    n_steps = 11
    n_samples_fixed = 300
    dependence_values = np.linspace(0.0, 1.0, n_steps)
    
    # Prepare values list for generate_animation.
    values = []
    for val in dependence_values:
        values.append({"dependence": val, "n_samples": n_samples_fixed})
    
    # Directory to save frames.
    dst_dir = "./figures/Lesson94_Joint_Entropy_video"
    
    # Generate animation frames with fixed dimensions.
    ut.generate_animation(
        utils.plot_joint_entropy_interactive,
        values,
        dst_dir,
        incremental=False,
        figsize=(20, 5),
        dpi=150
    )
    

Conventions

  • Always follow the conventions and guidelines in .claude/skills/notebook.rules.md

04 同仓库更多 Skills