Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
| #include "ggml-cpu.h" | |
| #include "ggml.h" | |
| #include <iostream> | |
| void print_tensor(struct ggml_tensor *tensor) { | |
| for (size_t i = 0; i < tensor->ne[3]; i++) { | |
| for (size_t k = 0; k < tensor->ne[2]; k++) { | |
| for (size_t j = 0; j < tensor->ne[1]; j++) { | |
| for (size_t l = 0; l < tensor->ne[0]; l++) { | |
| std::cout << ggml_get_i32_nd(tensor, l, j, k, i) << " "; |
| const std = @import("std"); | |
| const mem = std.mem; | |
| const meta = std.meta; | |
| const math = std.math; | |
| const Vector = meta.Vector; | |
| const expect = std.testing.expect; | |
| fn generateSquareMatrix(N: usize, allocator: mem.Allocator, gen_rand: bool) ![][]f64 { | |
| var matrix: [][]f64 = undefined; | |
| matrix = try allocator.alloc([]f64, N); |
| #!/usr/bin/env python | |
| import subprocess | |
| import re | |
| import sys | |
| def get_init_array(filename): | |
| # Call objdump -s -j .init_array <filename> to get the contents of the .init_array section | |
| try: | |
| objdump_output = subprocess.check_output(['objdump', '-s', '-j', '.init_array', filename], stderr=subprocess.STDOUT) |
| """ | |
| 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 |
| # gcc -Wall -o match match.c && ./match | |
| # | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <regex.h> | |