Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some experience of how to start #112

Open
minnow54426 opened this issue Jan 10, 2025 · 0 comments
Open

Some experience of how to start #112

minnow54426 opened this issue Jan 10, 2025 · 0 comments

Comments

@minnow54426
Copy link

Hello everyone, learned from some issue of how to start a demo in this project, i want to share some expreience, feel free to commit any suggestions, thanks.

Suppose that you have install manimgl and all thing it needed, for M3 pro of Mac, its FFmpeg and MacTex, see install for details. To run a scene, only two things needed to be done. We will use the file: _2024/transformers/network_flow.py as examples(i like the explanation of transformer from 3B1B so much), and it's applicable to any other files.

  1. Firstly, you need to add the following three lines before from manim_imports_ext import *
import sys
sys.path.append(".")
sys.path.append("..")

now the beginning of this file looks like

import torch
import sys
sys.path.append(".")
sys.path.append("..")
from manim_imports_ext import *
from _2024.transformers.helpers import *
from _2024.transformers.embedding import *
  1. Edit the file named custom_config.yml, i suppose that you have git cloned this repo, just run pwd to get your current directory, and change to string after removed_mirror_prefix to pwd's output, then commit the base line, after modification, the begin of custom_config.yml looks like:
directories:
  mirror_module_path: True
  removed_mirror_prefix: "/Users/name/code/python/manim/videos/"
  # base: "/Users/grant/3Blue1Brown Dropbox/3Blue1Brown/"
  subdirs:

Now just enter the following line to enjoy this elegant code:

manimgl _2024/transformers/network_flow.py HighLevelNetworkFlow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant