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 registry = new FinalizationRegistry((callback) => void callback()); | |
export function polyfillAbortSignalAny() { | |
/** @param {AbortSignal[]} signals */ | |
return (signals) => { | |
// if (AbortSignal.any) { | |
// return AbortSignal.any(signals); | |
// } | |
const controller = new AbortController(); | |
for (const signal of signals) { |
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
# copied from `promplate.prompt.utils` | |
from functools import cached_property | |
from inspect import currentframe | |
class AutoNaming: | |
def __new__(cls, *args, **kwargs): | |
obj = super().__new__(cls) | |
obj._bind_frame() |
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
<html> | |
<head> | |
<title>标题</title> | |
</head> | |
<body> | |
<img src="图片地址" alt="图片标题" /> | |
<div> | |
<p>第0句</p> | |
<p>第1句</p> | |
<p>第2句</p> |
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
hello world! |