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
<div class="calendar-rectangle"> | |
<div id="calendar-content" class="calendar-content"></div> | |
</div> |
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 Foundation | |
// Somebody at apple should be fired for getting async / await so badly wrong | |
// And presumably not the same person should also get fired for all this crazy @escaping fun | |
func compose<A, B, C>(_ apply: @escaping ((A) -> B), andThen: @escaping (B) -> C) -> ((A) -> C) { | |
return { | |
(x: A) in | |
andThen(apply(x)) |
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
{ | |
"model": "gpt-3.5-turbo-0613", | |
"messages": [ | |
{ | |
"role": "system", | |
"content": "I want you to ignore the order of statements in the user input and focus only on the logical implications that the words denote.\n\nI need you to find a way to fulfill the goal while respecting all the restrictions. This does NOT need to happen simultaneously however. You can explore different paths and then if you find a restriction was violated, backtrack, learning from the mistake, and try a different strategy. Likewise if you discover the goal cannot be reached without undoing a previous action, backtrack, undo, and try a different strategy" | |
}, | |
{ | |
"role": "user", | |
"content": "I have some plates stacked in a specific order, with the blue plate at the bottom, followed by the yellow plate, then the red plate, and finally the orange plate on top" |
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
# Converts OpenAI compatible function calling JSON schema to a prompt that instructs the LLM to return | |
# a JSON object that is a choice of a function call conforming to one of the functions or a message reply | |
def convert_schema_to_typescript(schema): | |
if not schema: | |
return 'any' | |
if '$ref' in schema: | |
return schema['$ref'].replace('#/definitions/', '') |
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
{-# LANGUAGE GADTs, RankNTypes #-} | |
newtype Const a b = Const { getConst :: a } | |
newtype Ran g h a = Ran { runRan :: forall r. (a -> g r) -> h r } | |
data Lan g h a where | |
Lan :: h i -> (g i -> a) -> Lan g h a | |
type Cont r a = Ran (Const r) (Const r) a | |
type Selection r a = Ran (Const r) (Const a) a |
OlderNewer