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"
trendingreposmain.tsx7 matches
1import { fetch } from "https://esm.town/v/std/fetch";
23// Helper function to format the date for GitHub API query
4function formatDate(daysAgo: number): string {
5const date = new Date();
6date.setDate(date.getDate() - daysAgo);
8}
910// Function to fetch top GitHub repositories based on stars and creation date
11async function topGitHubRepos(stars: number, daysAgo: number, timeframeDescription: string) {
12const date = formatDate(daysAgo);
13const query = `stars:>${stars} created:>${date}`;
23}
2425// Function to get combined information for different criteria
26export async function getTopReposByCriteria() {
27const reposLastWeek = await topGitHubRepos(1000, 7, "Created Last Week"); // Last week, over 1000 stars
28const reposLastMonth = await topGitHubRepos(3000, 30, "Created Last Month"); // Last month, over 3000 stars
33}
3435// Call the function to get and print the information
36getTopReposByCriteria().then(console.log);
1export async function prune_val(
2val_id: string,
3keep_versions: number[],
1export default async function() {
2const res = await fetch("https://api.manifold.markets/request-loan", {
3headers: {
untitled_indigoMolluskmain.tsx2 matches
6import { post_idFetcher } from "https://esm.town/v/willthereader/post_idFetcher";
78export async function Sendingemail() {
9// console.log("Sendingemail function called");
10try {
11let lastRunDate = new Date("2023-11-10T19:27:25.547Z");
react_maplibremain.tsx1 match
2import { renderToString } from "npm:react-dom/server";
34export default async function(req: Request) {
5return new Response(
6renderToString(
untitled_beigeLemurmain.tsx1 match
20};
2122export default async function(req: Request) {
23return new Response(
24renderToString(
10const UFE0Fg = /\uFE0F/g;
1112export function getIconCode (char: string) {
13return toCodePoint(!char.includes(U200D) ? char.replace(UFE0Fg, "") : char);
14}
1516function toCodePoint (unicodeSurrogates: string) {
17const r = [];
18let c = 0;
56const emojiCache: Record<string, Promise<string>> = {};
5758export async function loadEmoji (type: keyof typeof apis, code: string) {
59const key = `${type}:${code}`;
6069const api = apis[type];
7071if (typeof api === "function") {
72return (emojiCache[key] = fetch(api(code)).then(async r => r.text()));
73}
powderNotifyCronmain.tsx1 match
1import { powderNotify } from "https://esm.town/v/chet/powderNotify";
23export default async function(interval: Interval) {
4await Promise.all([
5powderNotify("Truckee, CA"),