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
| /** | |
| * tokens/sec status extension for pi. | |
| * | |
| * Shows live decode throughput while the model streams, and the exact | |
| * average (from provider `usage.output`) when the response finishes: | |
| * | |
| * ⚡ ~84.2 tok/s (streaming, estimated) | |
| * ⚡ 91.7 tok/s · 1423 out (final, exact) | |
| * | |
| * The estimate assumes ~4 chars/token; the final number uses the real |
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
| package main | |
| import ( | |
| "bufio" | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "io" | |
| "math" | |
| "net/http" |
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
| body { | |
| margin: auto; | |
| padding: 32px; | |
| max-width: 640px; | |
| text-align: left; | |
| word-wrap: break-word; | |
| overflow-wrap: break-word; | |
| line-height: 1.5; | |
| font-size: 18px; | |
| font-family: monospace; |
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
| CreateCollection({name: "users"}) | |
| CreateCollection({name: "accounts"}) | |
| CreateCollection({name: "items"}) | |
| CreateIndex({ | |
| name: "allUsers", | |
| source: Collection("users"), | |
| permissions: {read: null}, | |
| }) | |
| CreateIndex({ | |
| name: "allAccounts", |
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
| // From https://technote.fyi/code/javascript/base32-encoding-and-decoding-in-javascript/ | |
| (function(exports) { | |
| var base32 = { | |
| a: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", | |
| pad: "=", | |
| encode: function (s) { | |
| var a = this.a; | |
| var pad = this.pad; | |
| var len = s.length; | |
| var o = ""; |
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
| query IntrospectionQuery { | |
| __schema { | |
| queryType { name } | |
| mutationType { name } | |
| subscriptionType { name } | |
| types { | |
| ...FullType | |
| } | |
| directives { | |
| name |
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
| BackgroundColour=255,255,255 | |
| ForegroundColour=55,59,65 | |
| CursorColour=38,38,38 | |
| Black=29,31,33 | |
| BoldBlack=150,152,150 | |
| Red=204,102,102 | |
| BoldRed=204,102,102 | |
| Green=181,189,104 | |
| BoldGreen=181,188,104 | |
| Yellow=240,198,116 |
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
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" |
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 java.lang.Math; | |
| public class Elo { | |
| public int k; | |
| public Elo(int k) { | |
| this.k = k; | |
| } | |
| public double expectedScoreForDifference(int difference) { |
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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "PublicReadGetObject", | |
| "Effect": "Allow", | |
| "Principal": "*", | |
| "Action": [ | |
| "s3:GetObject" | |
| ], |
NewerOlder