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
[project] | |
name = "sqlite-utils-litecli" | |
version = "0.1" | |
dependencies = [ | |
"litecli" | |
] | |
[project.entry-points.sqlite_utils] | |
litecli = "sqlite_utils_litecli" |
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
from transformers import AutoTokenizer | |
import transformers | |
import torch | |
model = "meta-llama/Llama-2-7b-chat-hf" | |
print("AutoTokenizer.from_pretrained(model)") | |
tokenizer = AutoTokenizer.from_pretrained(model) |
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
[project] | |
name = "sqlite-utils-hello-world" | |
version = "0.1" | |
[project.entry-points.sqlite_utils] | |
hello_world = "sqlite_utils_hello_world" |
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>Globe Emoji Animation</title> | |
<style>h1 { font-size: 70vh; text-align: center; padding: 0; margin: 0 }</style> | |
</head> | |
<body> | |
<h1>🌎</h1> | |
<script> | |
const globeEmojis = ['🌎', '🌍', '🌏']; |
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
(function() { | |
const OPENAI_API_KEY = 'sk-...'; | |
let selectedText = window.getSelection().toString().trim(); | |
if (selectedText.length > 0) { | |
let body = JSON.stringify({ | |
model: 'gpt-3.5-turbo', | |
messages: [{role: 'system', content: 'explain this succinctly' },{ role: 'user', content: selectedText }] | |
}); | |
fetch('https://api.openai.com/v1/chat/completions', { | |
method: 'POST', |
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 asyncio | |
from pprint import pprint | |
async def app(scope, receive, send): | |
if scope["type"] == "http": | |
if scope["path"] == "/": | |
await homepage(send) | |
elif scope["path"] == "/subscribe": | |
await subscribe(scope, send) |
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
from datasette import hookimpl | |
from llm.cli import cli as llm_cli | |
@hookimpl | |
def register_commands(cli): | |
cli.add_command(llm_cli, name="llm") |
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 llm | |
import random | |
import time | |
from typing import Optional | |
from pydantic import field_validator | |
@llm.hookimpl | |
def register_models(register): | |
register(Markov()) |
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="group w-full text-gray-800 dark:text-gray-100 border-b border-black/10 dark:border-gray-900/50 dark:bg-gray-800"> | |
<div class="text-base gap-4 md:gap-6 md:max-w-2xl lg:max-w-xl xl:max-w-3xl p-4 md:py-6 flex lg:px-0 m-auto"> | |
<div class="w-[30px] flex flex-col relative items-end"> | |
<div class="relative flex"> | |
<span style="box-sizing: border-box; display: inline-block; overflow: hidden; width: initial; height: initial; background: none; opacity: 1; border: 0px none; margin: 0px; padding: 0px; position: relative; max-width: 100%;"> | |
<span style="box-sizing: border-box; display: block; width: initial; height: initial; background: none; opacity: 1; border: 0px none; margin: 0px; padding: 0px; max-width: 100%;"> | |
<img style="display: block; max-width: 100%; width: initial; height: initial; background: none; opacity: 1; border: 0px none; margin: 0px; padding: 0px;" alt="" aria-hidden="true" src="data:image/svg+xml,%3csvg%20 | |
xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27 |
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
{"ISO 693-3":"aaa","Language Name":"Ghotuo","Language Family":"Niger-Congo","Subgrouping":"Atlantic-Congo","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aaa"} | |
{"ISO 693-3":"aab","Language Name":"Arum","Language Family":"Niger-Congo","Subgrouping":"Atlantic-Congo","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aab"} | |
{"ISO 693-3":"aac","Language Name":"Ari","Language Family":"Trans-New Guinea","Subgrouping":"Gogodala-Suki","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aac"} | |
{"ISO 693-3":"aad","Language Name":"Amal","Language Family":"Sepik","Subgrouping":"Iwam","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aad"} | |
{"ISO 693-3":"aaf","Language Name":"Aranadan","Language Family":"Dravidian","Subgrouping":"Southern","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aaf"} | |
{"ISO 693-3":"aai","Language Name":"Miniafia Oyan","Language Family":"Austronesian","Subgrouping":"Malayo-Pol |