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
await (async () => { | |
function wrap(p) { | |
return p.then( | |
(res) => ["ok", res], | |
(err) => ["error", err] | |
); | |
} | |
async function compare(title, pa, pb) { | |
const a = await wrap(pa); |
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
from enum import Enum | |
from draftsman.blueprintable import Blueprint, BlueprintBook | |
from draftsman.entity import ElectricPole, Roboport, Radar, Lamp | |
from draftsman.tile import Tile | |
def main(): | |
book = base_grid_book() | |
print(book.to_string()) |
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
/* | |
* Convert "Hebrew frequency list: 10,000 most commonly used words" into Anki cards. | |
* | |
* https://www.teachmehebrew.com/hebrew-frequency-list.html | |
* http://web.archive.org/web/20230320182549/https://www.teachmehebrew.com/hebrew-frequency-list.html | |
* | |
* Go to the page and run this script in the developer console. | |
*/ | |
/* |
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
$Search = "E:\Music Production\" | |
$Replace = "D:\Music Production\" | |
function Confirm { | |
for (;;) { | |
Write-Host "[YNQ] " -NoNewline | |
$Key = [System.Console]::ReadKey().Key | |
Write-Host "" | |
switch ($Key) { | |
"Y" { return $true } |
Using Z3 to generate a slightly more optimal Minecraft sugarcane/water block layout compared to the farm presented by Mysticat in Top 3 Minecraft Sugarcane Farms at 7:32.
Original (190 sugarcanes):
Optimized (200 sugarcanes):
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
from itertools import cycle | |
from z3 import * | |
class NameGen: | |
def __init__(self, prefix): | |
self.prefix = prefix | |
self.count = 0 | |
def gen(self): |
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
to_rgb | |
dct | |
abs | |
log | |
cut 0,8 | |
normalize 0,255 |
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
// Censor a part of the screen (such as a chat window) by pixelation in | |
// obs-shaderfilter. | |
// https://obsproject.com/forum/resources/obs-shaderfilter.775/ | |
// https://creativecommons.org/publicdomain/zero/1.0/ | |
// To the extent possible under law, ion has waived all copyright and related | |
// or neighboring rights to obs-pixelate-rectangle. This work is published | |
// from: Suomi. | |
// https://gist.github.com/ion1/0e028ad096aa6f375bc9a97334639fa3 |
NewerOlder