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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Chat with GPT</title> | |
<style> | |
#chatbox { | |
width: 500px; | |
height: 500px; | |
border: 1px solid black; | |
overflow: auto; |
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
class ScriptRunner { | |
constructor(guidelines, scriptIdentifier) { | |
this.guidelines = guidelines; | |
this.scriptIdentifier = scriptIdentifier; | |
} | |
addRunButton(el) { | |
const btn = document.createElement('button'); | |
btn.textContent = 'Run'; | |
btn.style.marginLeft = '5px'; |
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
### | |
During a recent flight with Eva, we were playing with cards to | |
relieve the boredom. Such boredom that we ended up guessing "red or black" | |
off a deck of cards, trying to see how many we could guess right in | |
a pack of 52. Without state, you expect to come in somewhere around 26. | |
Naturally I started thinking what a better strategy would be, so I figured | |
remembering how many red and black cards have come out so far would help | |
make better choices. So the strategy was simple: choose what has come out |
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 ['angular', 'bacon', 'lodash'], (angular, bacon, _) -> | |
($parse, ngUrlBind) -> | |
# StreamEngine is a generic stream generation and caching | |
# library that is dependent on bacon.js only. It takes | |
# as argument a streamSource function which takes the | |
# StreamEngine instance, source name, and source params | |
# as arguments and returns a bacon stream. | |
class StreamEngine | |
constructor: (streamSource) -> | |
@streamSource = streamSource.bind(null, this) |
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
match = [ | |
'aerate aerate arrest errant serene tanner testes' | |
'aerate assent assent assert rester retest tenant' | |
'aerate assert rearer renter resent serene teaser' | |
'aerate easter easter tenant tester testes tsetse' | |
'arrest arrest easter entree errant resent senate' | |
'assent assess assets estate resent staree teaser' | |
'assert astern renter rerent resent staree street' | |
'assert enseat entree errata rennet teaser tsetse' | |
'assert rennet renter reseat rester serene tenant' |
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
test |