Write a failing test that defines the expected behavior before implementing any code.
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
| from fontTools.ttLib import TTFont | |
| import os | |
| def rename_font_family(input_path, output_path, old_family="M+1", new_family="M+11"): | |
| font = TTFont(input_path) | |
| name_table = font["name"] | |
| print(name_table) |
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 threading | |
| from concurrent.futures import ThreadPoolExecutor, as_completed | |
| from functools import wraps | |
| # Global thread pool | |
| thread_pool = ThreadPoolExecutor(max_workers=10) | |
| workernames = list("abcdefghijklmnopqrstuvwxyz") | |
| def submit_to_thread_pool(func): |
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
| // Implements: | |
| // fibers as lightweight concurrency control | |
| // | |
| // Source: | |
| // https://cyp.sh/blog/coroutines-in-c | |
| // https://agraphicsguynotes.com/posts/fiber_in_cpp_understanding_the_basics/ | |
| // https://github.com/SuperAuguste/oatz/blob/main/impls/aarch64.zig | |
| // https://raw.githubusercontent.com/wiki/hjl-tools/x86-psABI/x86-64-psABI-1.0.pdf | |
| const std = @import("std"); |
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
| local wezterm = require("wezterm") | |
| local act = wezterm.action | |
| -- This will hold the configuration. | |
| local config = wezterm.config_builder() | |
| -- load my other fonts | |
| -- config.font_dirs = { "/home/darksied/.local/share/fonts/" } | |
| -- config.color_scheme = "rose-pine" |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParent
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
| gen.model.tester: | |
| ollama create llama3-coder -f Modelfile | |
| ollama run llama3-coder < /dev/null | |
| cache.model.tester: | |
| ollama run llama3-coder < /dev/null |
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
| const { GoogleResults, BingResults, DDGResults } = require('./sniffratings'); | |
| function parseArguments(args) { | |
| const argsMap = {}; | |
| let currentKey = null; | |
| for (let i = 2; i < args.length; i++) { | |
| const arg = args[i]; | |
| if (arg.startsWith('-')) { |
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
| // file present in std/debug.zig | |
| pub fn println(comptime fmt: []const u8, args: anytype) void { | |
| lockStdErr(); | |
| defer unlockStdErr(); | |
| const stderr = io.getStdErr().writer(); | |
| nosuspend stderr.print(fmt ++ "\n", args) catch return; | |
| } |
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
| Internet Engineering Task Force (IETF) Amitava Ghosh | |
| Internet-Draft Example Inc. | |
| Intended status: Standards Track June 3, 2024 | |
| Expires: December 3, 2024 | |
| A New Date Format for ISO Compatibility and Reduced Ambiguity | |
| draft-iso-date-extended-date-format-00 | |
| Abstract |
NewerOlder