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
# Measures the average execution time of a specified function over a given number of iterations | |
export def main [ | |
func: closure # The function (closure) to be executed | |
iterations: int = 10000 # Number of iterations to run the function | |
] { | |
let start_time = date now | |
1..($iterations) | each { |_| do $func } | ignore | |
let end_time = date now |
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 os import environ | |
from pathlib import Path | |
__all__ = ["load_env_to_environ"] | |
def _format(key_or_value: str) -> str: | |
return key_or_value.strip(" \"'") | |
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
// ==UserScript== | |
// @name Twitch Chat Answer Inserter | |
// @namespace http://tampermonkey.net/ | |
// @author MrPandir | |
// @version 1.8.2 | |
// @description Inserts single words from Twitch chat into specified websites | |
// @match https://slovo.win/* |
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
use std "path add" | |
def cache [] { | |
let func = $in | |
let version = version | get version | |
let path = $nu.temp-path | path join "carapace-cache" $version | |
try { | |
open $path |