This file contains 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
{ | |
"title": "caramelized carrot soup", | |
"properties": [ | |
{ | |
"name": "yield", | |
"value": "six servings (1.3 kg / 6 cups)" | |
}, | |
{ | |
"name": "time estimate", | |
"value": "40 minutes overall, including 20 minutes of preparation and 20 minutes unattended" |
This file contains 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 bpy | |
import gpu | |
from gpu_extras.batch import batch_for_shader | |
from collections import defaultdict | |
from time import time | |
from math import sin | |
shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR') |
This file contains 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 argparse | |
import itertools | |
import logging | |
from pathlib import Path | |
from PIL import Image | |
import sys | |
def collage_size(*, image_count, x_count, source_image_size): | |
if image_count <= x_count: |
This file contains 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
/// Cats, groups of cats, and cat ages obfuscate business objects | |
/// for an actual problem trying to be solved | |
use std::collections::HashMap; | |
struct Cat { | |
age: u8 | |
} | |
struct CatGroup { |
This file contains 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
void FilterMethodIL(byte[] src, byte[] dst, int stride, int bytesPerPixel) | |
{ | |
int cBytes = src.Length; | |
DynamicMethod dynameth = new DynamicMethod("Go", typeof(void), | |
new Type[] { typeof(byte[]), typeof(byte[]) }, GetType()); | |
ILGenerator generator = dynameth.GetILGenerator(); | |
generator.DeclareLocal(typeof(int)); // Index 0 = iDst | |
generator.DeclareLocal(typeof(double)); // Index 1 = pixelsAccum | |
generator.DeclareLocal(typeof(double)); // Index 2 = filterAccum |