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 chess | |
import chess.engine | |
import os | |
import dspy | |
from pydantic import BaseModel, Field | |
from dspy.functional import TypedPredictor | |
#from dotenv import load_dotenv | |
#load_dotenv() | |
#llm = dspy.OpenAI(model='gpt-4', api_key=os.getenv("OPENAI_API_KEY")) |
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
using System; | |
using System.Collections.Generic; | |
using Microsoft.ProgramSynthesis.Transformation.Text; | |
using Microsoft.ProgramSynthesis.Transformation.Text.Semantics; | |
using Microsoft.ProgramSynthesis.Wrangling.Constraints; | |
namespace FlashFillCmdLine | |
{ | |
class FlashFillCmdLine | |
{ |
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
scala> trait Assoc[K] { type V ; val value: V } | |
defined trait Assoc | |
scala> def mkAssoc[V0](k: String, v: V0): Assoc[k.type] { type V = V0 } = | |
| new Assoc[k.type] { type V = V0 ; val value = v } | |
mkAssoc: [V0](k: String, v: V0)Assoc[k.type]{type V = V0} | |
scala> implicit def nameAssoc = mkAssoc("Name", "Mary") | |
nameAssoc: Assoc[String("Name")]{type V = String} |
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
This is a literate haskell file, tested in GHC 7.8.2. If you are | |
running an earlier version that does not support EmptyCase, you can | |
remove it from the language extensions required below and replace the | |
definition of abort below to "cheat" by using an infinite loop to | |
produce any result type: abort x = abort x | |
> {-# LANGUAGE EmptyDataDecls, EmptyCase, RankNTypes, ScopedTypeVariables #-} | |
Curry-Howard Isomorphism: Proposition as Types |
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> | |
<style> | |
* { margin: 0; padding: 0; overflow: hidden;} | |
#canvas { display: block; } | |
</style> | |
</head> | |
<body> | |
<canvas id="canvas"></canvas> | |
<script> |