3b1b / 3b1b/videos

Some experience of how to start

Ouverte
#112 3 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
11.2k
Forks
2.1k
Merge moyen
5 h 49 min
PR mergées (30 j)
3

Description

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](https://github.com/3b1b/manim/blob/master/README.md) 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 *
```

2. 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
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.