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
{ | |
"messages": [ | |
{ | |
"content": "You are an advanced, reliable, candid AI system that takes user search queries, converts them into questions, and answers them, using specific facts and details sourced from webpages to prove your answer. You admit when you're unsure or don't know, and you never make a statement without providing a fact or instance to back it up. You answer questions directly and clearly, then provide more detail later. You follow the JSON schema exactly.", | |
"role": "system" | |
}, | |
{ | |
"content": "# CONTEXT\nCurrent date: #{DATE_TIME}.\n\nHere are result from a web search for '#{QUERY}':\nBEGIN WEB PAGE #{HOST_1} #{MARKDOWN_1}END WEB PAGE\nBEGIN WEB PAGE #{HOST_2} #{MARKDOWN_2}END WEB PAGE\nBEGIN WEB PAGE #{HOST_3} #{MARKDOWN_3}END WEB PAGE\nBEGIN WEB PAGE #{HOST_4} #{MARKDOWN_4}END WEB PAGE\nBEGIN WEB PAGE #{HOST_5} #{MARKDOWN_5}END WEB PAGE\nBEGIN WEB PAGE #{HOST_6} #{MARKDOWN_6}END WEB PAGE", | |
"role": "system" | |
}, |
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 { EventEmitter } from "eventemitter3"; | |
import type { MP4ArrayBuffer, MP4File, MP4Info, MP4Sample } from "mp4box"; | |
import * as MP4Box from "mp4box"; | |
import type { MediaFile } from "../../models.js"; | |
import type { IDisposable } from "../abstract/hooks.js"; | |
import type { | |
VideoMetadata, | |
} from "../abstract/pipeline.js"; | |
import type { MediaFileObjectUrlProvider } from "../utils/ObjectUrlProvider.js"; |
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
// This is a proper alternative to | |
// https://github.com/BuckleScript/bucklescript/blob/b9508105b1a35537bdea9a1fabd10f6c65f776b4/jscomp/bsb/templates/react-hooks/src/FetchedDogPictures/FetchedDogPictures.re#L14 | |
// The one in that file uses Promise, but that's *wrong*. | |
// We only used promise as a demo of its API. We'll remove it soon. | |
// As you can see below, the pure XMLHttpRequest code is just as clean, | |
// less mysterious for all, more performant, extensible, and actually correct. | |
// Ignore these externals for now. They're just for illustration | |
// purposes. I just copy pasted the Js code from |
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
2D graphics animation tool using cairo rust binding and ffmpeg |
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
/* Graph */ | |
exception Not_found; | |
type nodes = list(int); | |
type edges = list((int, int)); | |
type graph = | |
| Empty | |
| Graph(nodes, edges); |
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
'use strict'; | |
/*globals ebml */ | |
if ( !window.ebml ) window.ebml = {}; | |
ebml.EbmlDecoder = function EbmlDecoder( options ) { | |
var schema = { | |
"80": { |
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
# open terminal | |
cmd - return : osascript -e 'tell application "iTerm" to create window with default profile' | |
# enter fullscreen mode for the focused container | |
# cmd + f clobbers text search in firefox. | |
shift + cmd - f : yabai -m window --toggle zoom-fullscreen | |
# kill focused window | |
shift + cmd - q : yabai -m window --close |
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
/* Use Reason's ability to define recursive types with the `and` keyword */ | |
type movie = { | |
id: option(string), | |
name: option(string), | |
rating: option(Js.null(string)), | |
runTime: option(Js.null(int)), | |
actors: option(list(actor)), | |
} | |
and actor = { | |
id: option(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
/* | |
* Define a type that can be either a single string or a list of strings | |
*/ | |
type queryItem = | |
| Single(string) | |
| Multiple(list(string)); | |
/* | |
* Make a string “safe” by |
NewerOlder