Search
![pranjaldotdev avatar](https://images.clerk.dev/oauth_github/img_2Skxz9KcxZsvrWVdlalLqQhxbzm.jpeg)
cfwod
@pranjaldotdev
An interactive, runnable TypeScript val by pranjaldotdev
HTTP
import axios from "https://esm.sh/axios"; // latest
const URL = "https://www.crossfit.com/workout/";
export default async function main(req: Request): Promise<Response> {
let wodToday = null;
try {
![stevekrouse avatar](https://images.clerk.dev/uploaded/img_2PqHa2Gsy93xQrjh2w78Xu0cChW.jpeg)
fetchHTML
@stevekrouse
// this function doesn't work yet, I'm still iterating on it
Script
import { parseHTML } from "https://esm.town/v/stevekrouse/parseHTML";
import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
// this function doesn't work yet, I'm still iterating on it
export function fetchHTML(url: string, options?: any) {
return fetchText(url, options)
.then(parseHTML);
myApi
@yosun
An interactive, runnable TypeScript val by yosun
Script
export function myApi(name) {
return "hi " + name;
myApi
@jwshin
An interactive, runnable TypeScript val by jwshin
Script
export function myApi(name) {
return "hi " + name;
myApi
@jamesyin
An interactive, runnable TypeScript val by jamesyin
Script
export function myApi(name) {
return "hi " + name;
![pomdtr avatar](https://images.clerk.dev/oauth_github/img_2RCoAITJZH1QencEgtVjh4Qirj4.jpeg)
python
@pomdtr
An interactive, runnable TypeScript val by pomdtr
Script
(globalThis as any).document = { location: { href: "" }, currentScript: { src: "" } };
(globalThis as any).navigator = {};
export async function loadPython(params?: { packages: string[] }) {
const pyodide = await pyodideModule.loadPyodide();
for (const pkg of params?.packages || []) {
get_gemini_models
@cotr
List all of the Gemini AI models: https://ai.google.dev/tutorials/rest_quickstart#list_models
Script
description: string;
created: string;
export async function getGeminiModels(): Promise<GeminiModel[]> {
try {
const API_KEY = process.env.GEMINI_API_KEY;
![micmath avatar](https://images.clerk.dev/oauth_github/img_2RHMiJytHQQoPXSNMgvqTYmTSdL.png)
myApi
@micmath
An interactive, runnable TypeScript val by micmath
Script
export function myApi(name) {
return "hi " + name;
![pomdtr avatar](https://images.clerk.dev/oauth_github/img_2RCoAITJZH1QencEgtVjh4Qirj4.jpeg)
generate_invoice
@pomdtr
An interactive, runnable TypeScript val by pomdtr
Script
import { Base64 } from "npm:js-base64";
import open from "npm:open";
function printHelp() {
console.log("help");
const { _, language, currency } = parseArgs(Deno.args, {
val_WYIvLkEalH
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_WYIvLkEalH(req) {
try {
// Execute the code directly and capture its result
web_QGLg8dmk1o
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function web_QGLg8dmk1o(req) {
return new Response(`<!DOCTYPE html>
<html>
aiImageGenerator
@jumptoai
@jsxImportSource https://esm.sh/react
Script
import { createRoot } from "https://esm.sh/react-dom/client";
function ImageGenerator() {
const [imageUrl, setImageUrl] = useState<string | null>(null);
marginBottom: '20px',
export default async function handler(request: Request): Promise<Response> {
return new Response(`
import { createRoot } from "https://esm.sh/react-dom/client";
function ImageGenerator() {
${ImageGenerator.toString()}
const styles = ${JSON.stringify(styles)};
function renderApp() {
const rootElement = document.getElementById("root");
sendRandomChihuahuaToSlack
@metart43
An interactive, runnable TypeScript val by metart43
Script
import { fetch } from "https://esm.town/v/std/fetch";
import process from "node:process";
export async function sendRandomChihuahuaToSlack() {
const dogAPIURL = new URL(
"https://dog.ceo/api/breed/chihuahua/images/random",
val_4y4XKYYOAg
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_4y4XKYYOAg(req) {
try {
// This demonstrates how simple mathematical rules can create complex behavior
function generateLogisticMap(r, iterations, skipFirst) {
let x = 0.5; // Initial population
return results;
function visualizeResults(results, height = 20) {
const rows = Array(height).fill('');
![jacoblee93 avatar](https://images.clerk.dev/oauth_github/img_2QIS74zfuoUpIQDz75ze0alKMAy.jpeg)
runAgent
@jacoblee93
An interactive, runnable TypeScript val by jacoblee93
Script
const { z } = await import("npm:zod");
const { ChatOpenAI } = await import("npm:langchain/chat_models/openai");
const { ChatAnthropic } = await import("npm:langchain/chat_models/anthropic");
"npm:langchain/output_parsers"
const model = new ChatOpenAI({
openAIApiKey: process.env.OPENAI_API_KEY,
modelName: "gpt-4",