markLessonCompletemain.tsx1 match
1import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
23export async function markLessonComplete(emailAddress: string) {
4await sqlite.execute({
5sql: `
sendLessonmain.tsx1 match
8}
910export async function sendLesson({ lesson, emailAddress }: SendLessonParams) {
11await sqlite.execute({
12sql: `
createStudentsTablemain.tsx1 match
1import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
23export async function createStudentsTable() {
4await sqlite.execute(
5`
unsubscribemain.tsx1 match
2import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
34export async function unsubscribe(req: Request) {
5const searchParams = new URL(req.url).searchParams;
6const emailAddress = searchParams.get("email");
62<h2>The basal ganglia</h2>
63<p>
64The basal ganglia, which also controls some motor function—both voluntary and unvoluntary, like subconscious eye
65movements, Cognitive and motor functions can be chunked together in one unit that makes up a learned habit or
66skill. So you can think of learned habits become automatic, uncontrolled System 1 knowledge.
67
notionSiteProxymain.tsx1 match
4const notionPage = "https://chetcorcos.notion.site/0e27612403084b2fb4a3166edafd623a";
56export default async function(req: Request): Promise<Response> {
7const notionUrl = new URL(notionPage);
8const notionDomain = notionUrl.host;
3const db = new ValTupleStorage("email");
45export async function generateEmailKey() {
6const key = Math.random().toString().slice(3);
717}
1819export async function listEmailKeys() {
20const emailKeys = await db.scan();
21console.log("Email keys:", emailKeys);
22}
2324export async function expireEmailKey(key: string) {
25const expires = Date.now() - 1;
26await db.write({ set: [{ key: [key], value: expires }] });
27}
2829export async function authenticateEmailKey(key: string) {
30const result = await db.scan({ gte: [key], lte: [key], limit: 1 });
31if (result.length === 0) return "Invalid key.";
34}
3536export async function resetEmailKeys() {
37await db.destroy();
38}
add_to_notion_w_ai_webpagemain.tsx10 matches
39});
4041function createPrompt(title, description, properties) {
42let prompt =
43"You are processing content into a database. Based on the title of the database, its properties, their types and options, and any existing descriptions, infer appropriate values for the fields:\n";
84}
8586function processProperties(jsonObject) {
87const properties = jsonObject.properties;
88const filteredProps = {};
115}
116117async function get_and_save_notion_db_processed_properties(databaseId)
118{
119const response = await notion.databases.retrieve({ database_id: databaseId });
126}
127128async function get_notion_db_info(databaseId) {
129databaseId = databaseId.replaceAll("-", "");
130let db_info = null;
142}
143144async function get_and_save_notion_db_info(databaseId) {
145databaseId = databaseId.replaceAll("-", "");
146let db_info = await get_and_save_notion_db_processed_properties(databaseId);
149}
150151function createZodSchema(filteredProps) {
152const schemaObject = {};
153198}
199200function convertToNotionProperties(responseValues, filteredProps) {
201const notionProperties = {};
202273}
274275async function process_text(dbid, text) {
276const db_info = await get_notion_db_info(dbid);
277const processed_message = await client.chat.completions.create({
288}
289290async function addToNotion(databaseId, text) {
291databaseId = databaseId.replaceAll("-", "");
292const properties = await process_text(databaseId, text);
301}
302303export default async function(req: Request) {
304if (req.method === "POST") {
305const content = (await req.formData()).get("content");
add_to_notion_w_aimain.tsx9 matches
35});
3637function createPrompt(title, description, properties) {
38let prompt =
39"You are processing content into a database. Based on the title of the database, its properties, their types and options, and any existing descriptions, infer appropriate values for the fields:\n";
80}
8182function processProperties(jsonObject) {
83const properties = jsonObject.properties;
84const filteredProps = {};
111}
112113async function get_and_save_notion_db_processed_properties(databaseId)
114{
115const response = await notion.databases.retrieve({ database_id: databaseId });
122}
123124async function get_notion_db_info(databaseId) {
125databaseId = databaseId.replaceAll("-", "");
126let db_info = null;
137}
138139async function get_and_save_notion_db_info(databaseId) {
140databaseId = databaseId.replaceAll("-", "");
141let db_info = await get_and_save_notion_db_processed_properties(databaseId);
144}
145146function createZodSchema(filteredProps) {
147const schemaObject = {};
148193}
194195function convertToNotionProperties(responseValues, filteredProps) {
196const notionProperties = {};
197268}
269270async function process_text(dbid, text) {
271const db_info = await get_notion_db_info(dbid);
272const processed_message = await client.chat.completions.create({
283}
284285async function addToNotion(databaseId, text) {
286databaseId = databaseId.replaceAll("-", "");
287const properties = await process_text(databaseId, text);
untitled_roseGuanacomain.tsx1 match
1import { html } from "https://esm.town/v/stevekrouse/html";
23export default async function(req: Request): Promise<Response> {
4// return new Response("<h1>Hello FRC!</h1>", { headers: {
5// "Content-Type": "text/html"