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
{-# 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 |
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
# 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 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
{ | |
"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 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
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 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
<div class="calendar-rectangle"> | |
<div id="calendar-content" class="calendar-content"></div> | |
</div> |
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 Connected = {}; | |
function removeUser(conferenceId, uid, ws) | |
{ | |
const Conf = Connected[conferenceId]; | |
const a = Conf[uid]; | |
if (a.length == 1) { | |
if (Conf.numParticipants == 1) { | |
delete Connected[conferenceId]; | |
} else { |
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
Apr 7 07:54:05 iPhone D6UI_000[1111] <Notice>: [2018.04.07-14.54.05:434][599]LogTemp: New Timestamp 167582.664033 | |
Apr 7 07:54:05 iPhone D6UI_000[1111] <Notice>: [2018.04.07-14.54.05:441][600]LogTemp: cars.yaml => /var/containers/Bundle/Application/B35C3FD0-D203-4712-A0DF-1EB53006E9A6/D6UI_000.app/cars.yaml | |
Apr 7 07:54:05 iPhone D6UI_000[1111] <Notice>: [2018.04.07-14.54.05:589][608]LogBlueprintUserMessages: [UIMap_C_1] Sun direction: P=196.459335 Y=104.594971 R=0.000000 | |
Apr 7 07:54:05 iPhone D6UI_000[1111] <Notice>: Created a hitchy pipeline state for hash 4000000000049000000000b733194b5 (this = 0x13b7a5a00) | |
Apr 7 07:54:05 iPhone D6UI_000(CFNetwork)[1111] <Notice>: Task <42FAADA6-8045-47AC-8337-D29AAA6C0E48>.<0> received response, status 200 content K | |
Apr 7 07:54:05 iPhone D6UI_000(CFNetwork)[1111] <Notice>: Task <42FAADA6-8045-47AC-8337-D29AAA6C0E48>.<0> response ended | |
Apr 7 07:54:05 iPhone D6UI_000[1111] <Notice>: [2018.04.07-14.54.05:684][613]LogVaRest: On process request complete https://maps.googl |
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
// Fill out your copyright notice in the Description page of Project Settings. | |
#include "SighthoundRecognizerComponent.h" | |
#include "AppleARKitBlueprintFunctionLibrary.h" | |
#include "AppleARKitSession.h" | |
#if PLATFORM_IOS | |
#import <Foundation/Foundation.h> | |
#import <CoreMedia/CoreMedia.h> | |
#import <CoreVideo/CoreVideo.h> |
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
#pragma once | |
#include "CoreMinimal.h" | |
#include "MediaTexture.h" | |
#include "AVFoundation/AVFoundation.h" | |
#include "CoreMedia/CoreMedia.h" | |
#include <Metal/Metal.h> | |
@class FSampleBufferDelegate; |
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
#include "IOSCamera.h" | |
#include "IMediaTextureSink.h" | |
#include "MediaTexture.h" | |
@interface FSampleBufferDelegate: NSObject<AVCaptureVideoDataOutputSampleBufferDelegate> | |
@property (assign) FIOSCamera* Target; | |
@end |
NewerOlder