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
| """ | |
| draws many samples from a diffusion model by slerp'ing around | |
| the noise space, and dumps frames to a directory. You can then | |
| stitch up the frames with e.g.: | |
| $ ffmpeg -r 10 -f image2 -s 512x512 -i out/frame%04d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p test.mp4 | |
| THIS FILE IS HACKY AND NOT CONFIGURABLE READ THE CODE, MAKE EDITS TO PATHS AND SETTINGS YOU LIKE | |
| THIS FILE IS HACKY AND NOT CONFIGURABLE READ THE CODE, MAKE EDITS TO PATHS AND SETTINGS YOU LIKE | |
| THIS FILE IS HACKY AND NOT CONFIGURABLE READ THE CODE, MAKE EDITS TO PATHS AND SETTINGS YOU LIKE |
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
| #import random, math | |
| outputdebug = False | |
| def debug(msg): | |
| if outputdebug: | |
| print (msg) | |
| class Node(): | |
| def __init__(self, key): |
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
| #ifndef TEST_UTILITIES_H_ | |
| #define TEST_UTILITIES_H_ | |
| #include <stdbool.h> | |
| #include <stdio.h> | |
| #include <assert.h> | |
| #ifndef min | |
| #define min(a,b) ((a)<(b) ? (a) : (b)) | |
| #endif /* min */ |
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
| // Helper macros for creating Offsets struct | |
| // (that are used later by the bitfield accessors). | |
| # define maskForField(name) (((uint64_t(1)<<name##BitCount)-1) << name##Shift) | |
| # define shiftAfterField(name) (name##Shift + name##BitCount) | |
| // "Bitfield" accessors. | |
| # define getFieldIn(bits, offsets, name) \ | |
| ((bits & offsets::name##Mask) >> offsets::name##Shift) | |
| # define setFieldIn(bits, offsets, name, val) \ | |
| bits = ((bits & ~offsets::name##Mask) | \ |
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
| import collections | |
| """ | |
| This is based on HeapDict 1.0.0, but includes a few modifications. | |
| https://pypi.org/project/HeapDict/ | |
| """ | |
| def doc(s): | |
| if hasattr(s, '__call__'): | |
| s = s.__doc__ |
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
| <html> | |
| <head> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.2/underscore-min.js"></script> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script> | |
| <script src="//ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script> | |
| <!-- | |
| TODO: |
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
| #include "List.h" | |
| #include <iostream> | |
| #include <string> | |
| /********************** | |
| * ListLink | |
| * | |
| ********************** | |
| */ |