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
type Flow<T, O> = Iterable<T> & { | |
[K in keyof O]: O[K] extends Function ? O[K] : never; | |
} & { | |
flow<U>(iterable: (this: Flow<T, O>) => Iterable<U>): Flow<U, O>; | |
}; | |
type FlowFactory<O> = { | |
<T>(iterable: Iterable<T>): Flow<T, O>; | |
}; |
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
-----BEGIN CERTIFICATE----- | |
MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UE | |
AwwJQUNDVlJBSVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQsw | |
CQYDVQQGEwJFUzAeFw0xMTA1MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQ | |
BgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwHUEtJQUNDVjENMAsGA1UECgwEQUND | |
VjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCb | |
qau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gMjmoY | |
HtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWo | |
G2ioPej0RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpA | |
lHPrzg5XPAOBOp0KoVdDaaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhr |
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
// ==UserScript== | |
// @name lemmy style tweaks | |
// @namespace - | |
// @match *://*/* | |
// @grant none | |
// @version 1.0.1 | |
// @author killjoy1221 | |
// @description Various stylistic tweaks for Lemmy | |
// @require https://cdn.jsdelivr.net/npm/@violentmonkey/dom@2 | |
// ==/UserScript== |
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
#!/bin/bash | |
# .pyenv/plugins/install-latest-python/bin/pyenv-install-latest | |
# Summary: Install the latest version of a python release | |
# | |
# Usage: pyenv install-latest [version] | |
# | |
# Description: | |
# This command will pick the latest version as returned from pyenv version --list. | |
# If an argument is provided, it will be used as a filter. | |
# |
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
ZERO = ord("0") | |
NINE = ord("9") | |
def parseInt(s): | |
result = None | |
for i in str(s): | |
ascii_value = ord(i) | |
if ZERO <= ascii_value <= NINE: | |
result = result or 0 |
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 { Puzzle } from './index'; | |
type Predicate<T> = (value: T) => boolean; | |
interface Passport { | |
byr: string | |
iyr: string | |
eyr: string | |
hgt: string | |
hcl: 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
plugins { | |
id 'java-library' | |
} | |
repositories { | |
jcenter() | |
maven { | |
name = "SpongeMaven" | |
url = "https://repo.spongepowered.org/maven" | |
} |
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
package splooge.api.world; | |
import kotlin.jvm.internal.PropertyReference1; | |
import kotlin.reflect.KDeclarationContainer; | |
import kotlin.jvm.internal.PropertyReference1Impl; | |
import kotlin.jvm.internal.Reflection; | |
import org.jetbrains.annotations.NotNull; | |
import kotlin.reflect.KProperty; | |
import splooge.api.EnumProvider; | |
import kotlin.Metadata; |
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 enum | |
from typing import Dict, Tuple | |
import aoc | |
import bytecode | |
def main(): | |
instrs = load_instructions() | |
w = World(instrs) |
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 typing import List | |
import aoc | |
def read_layers(data: List[int], width: int, height: int): | |
size = width * height | |
for layer in range(len(data) // size): | |
yield Layer(data[size * layer:size * (layer + 1)], width, height) |
NewerOlder