Skip to content

Instantly share code, notes, and snippets.

View zzeitt's full-sized avatar

zeit zzeitt

View GitHub Profile
@savanovich
savanovich / .gdbinit
Last active March 28, 2024 02:31
GDB cheatsheet
define pyp
set \$\_unused\_void = PyObject\_Print($arg0, stderr, 1)
printf "\n"
end
@gwerbin
gwerbin / conda_env_export.py
Last active March 6, 2024 06:23
Export a Conda environment with --from-history, but also append Pip-installed dependencies
"""
Export a Conda environment with --from-history, but also append
Pip-installed dependencies
Exports only manually-installed dependencies, excluding build versions, but
including Pip-installed dependencies.
Lots of issues requesting this functionality in the Conda issue tracker,
e.g. https://github.com/conda/conda/issues/9628
@edi33416
edi33416 / .gdbinit
Last active March 28, 2024 02:42
GDB intro layout
# gdb configuration file
# place contents in ~/.gdbinit
source /home/fawkes/ws/pwndbg/gdbinit.py
# auto-load directory in which we run gdb, so we can have a
# .gdbinit per project directory
add-auto-load-safe-path .
# path to your library. Multiple dirs can be separated by ':' as in the comment below
set directories /home/fawkes/ws/glibc/glibc-2.31/stdio-common/
@karpathy
karpathy / stablediffusionwalk.py
Last active June 29, 2024 03:43
hacky stablediffusion code for generating videos
"""
stable diffusion dreaming
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry
to stitch together the images, e.g.:
$ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4