3import { rssFeeds } from "https://esm.town/v/stevekrouse/rssFeeds";
4
5export async function pollRSSFeeds({ lastRunAt }: Interval) {
6 return Promise.all(
7 Object.entries(rssFeeds).map(async ([name, url]) => {
1export default async function handler(req: Request): Promise<Response> {
2
3
2import { executePython } from "https://esm.town/v/iamseeley/pyodideExecutor";
3
4export async function runPythonCode(code: string) {
5 const pyodide = await initializePyodide();
6 return await executePython(pyodide, code);
7}
8
9export function runPythonCodeInWorker(code: string): Promise<string> {
10 return new Promise((resolve, reject) => {
11 const worker = new Worker(new URL("https://esm.town/v/iamseeley/pyodideWorker", import.meta.url), { type: "module" });
1import { runPythonCode } from "https://esm.town/v/iamseeley/pyodideMod";
2
3export default async function handler(req: Request): Promise<Response> {
4 const pythonCode = `
5import numpy as np
48```
49
50You can allow anyone to signup by returning a boolean from the verifyEmail function:
51
52```ts
1export function handler(request: Request) {
2 return Response.json({ ok: true });
3}
1async function installPackages(pyodide: any, code: string) {
2 const importStatements = code.match(/import (\w+)|from (\w+)/g);
3 const packages = new Set<string>();
37}
38
39export async function executePython(pyodide: any, code: string) {
40 await installPackages(pyodide, code);
41 return await pyodide.runPythonAsync(code);
3import { readmeToHtmlResponse } from "https://esm.town/v/pomdtr/readme";
4
5async function createScreenshot(code: string) {
6 const apiUrl = "https://sourcecodeshots.com/api/image";
7 const resp = await fetch(apiUrl, {
19}
20
21export default async function raw(req: Request) {
22 const url = new URL(req.url);
23 const [_, author, file] = url.pathname.slice(1).split("/");
6};
7
8export default async function(req: Request): Promise<Response> {
9 // Check if the request is an OPTIONS request
10 if (req.method === "OPTIONS") {
3import { Hono } from "npm:hono@3";
4
5function esmTown(url) {
6 return fetch(url, {
7 headers: {
A helper function to build a file's email
Simple functional CSS library for Val Town
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.