This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [ | |
| # "torch", | |
| # "tiktoken", | |
| # "numpy", | |
| # ] | |
| # /// | |
| """ | |
| Standalone CPU-compatible text generation for the nanochat model. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //xcr.c | |
| //cc -o xcr $(pkg-config --cflags --libs cairo xcb xcb-icccm) xcr.c -lcairo -lxcb -lxcb-icccm | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <cairo.h> | |
| #include <cairo-xcb.h> | |
| #include <xcb/xcb.h> | |
| #include <xcb/xcb_image.h> | |
| #include <xcb/xcb_aux.h> | |
| #include <xcb/xcb_icccm.h> |