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 fs from 'fs'; | |
import path from 'path'; | |
import execa from 'execa'; | |
import { runner } from 'hygen'; | |
import Logger from 'hygen/dist/logger'; | |
export type ArgsObject = { [key: string]: string | boolean }; | |
export const readFileString = (path: string) => fs.readFileSync(path, 'utf8'); |
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
export const COLLAPSED = 'collapsed'; | |
export const EXPANDED = 'expanded'; | |
export const COLLAPSIBLE_AND_EXPANDED = 'collapsable_and_expanded'; | |
export enum SideFilterCollapsibleStates { | |
COLLAPSED = 'collapsed', | |
COLLAPSIBLE_AND_EXPANDED = 'collapsable_and_expanded', | |
EXPANDED = 'expanded', | |
} |
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 openai | |
class ChatGPT: | |
""" A very simple wrapper around OpenAI's ChatGPT API. Makes it easy to create custom messages & chat. """ | |
def __init__(self, model="gpt-3.5-turbo", completion_hparams=None): | |
self.model = model | |
self.completion_hparams = completion_hparams or {} | |
self.history = [] | |
self._messages = [] |
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
javascript: (function () { | |
const vids = [ | |
...document.querySelectorAll('video'), | |
...document.querySelectorAll('audio'), | |
...[...document.querySelectorAll('iframe').values()].flatMap(el => { | |
try { | |
return [ | |
...el.querySelectorAll('video').values(), | |
...el.querySelectorAll('audio').values(), | |
]; |
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 concurrent.futures import ThreadPoolExecutor, as_completed | |
def do_things(i, dry_run): | |
print(i, dry_run) | |
return i * 2, i * 3 | |
def main(): | |
build_ids = [1, 2, 3, 4, 5, 6, 7, 8, 9] |
OlderNewer