cerebras_codermain.tsx9 matches
15"recipe ingredient converter and scaler",
16"morse code translator with audio output",
17"random quote generator with tweet functionality",
18"personal finance tracker with basic charts",
19"multiplayer rock-paper-scissors game",
20];
2122function Dashboard() {
23const [stats, setStats] = useState<{
24totalGenerations: number;
3637useEffect(() => {
38async function fetchStats() {
39const response = await fetch("/dashboard-stats");
40const data = await response.json();
115}
116117function App() {
118const [prompt, setPrompt] = useState(
119STARTER_PROMPTS[Math.floor(Math.random() * STARTER_PROMPTS.length)],
141});
142143async function handleSubmit(e: React.FormEvent) {
144e.preventDefault();
145setLoading(true);
174}
175176function handleVersionChange(direction: "back" | "forward") {
177const { currentVersionIndex, versions } = versionHistory;
178305}
306307function client() {
308const path = window.location.pathname;
309const root = createRoot(document.getElementById("root")!);
320}
321322function extractCodeFromFence(text: string): string {
323const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
324return htmlMatch ? htmlMatch[1].trim() : text;
325}
326327export default async function server(req: Request): Promise<Response> {
328// Dynamic import for SQLite to avoid client-side import
329const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
FetchBasicmain.tsx1 match
1export default async function(req: Request): Promise<Response> {
2// Pick a random greeting
3const greetings = ["Hello!", "Welcome!", "Hi!", "Heya!", "Hoi!"];
gregariousCrimsonFlamingomain.tsx9 matches
13const FONT_FAMILY = 'CIRO, Arial, sans-serif';
1415function MainHeader() {
16const [dropdownOpen, setDropdownOpen] = useState(false);
17
77}
7879function MorePage() {
80const navigate = useNavigate();
81208}
209210function App() {
211return (
212<BrowserRouter>
231}
232233function BottomNavbar() {
234const navigate = useNavigate();
235
272}
273274function MainPage() {
275const navigate = useNavigate();
276
337}
338339function ServicesPage() {
340const navigate = useNavigate();
341const [searchTerm, setSearchTerm] = useState('');
460}
461462function ReportsPage() {
463const navigate = useNavigate();
464const [selectedReport, setSelectedReport] = useState(null);
581}
582583function client() {
584createRoot(document.getElementById("root")).render(<App />);
585}
587if (typeof document !== "undefined") { client(); }
588589export default async function server(request: Request): Promise<Response> {
590return new Response(`
591<html>
5const resolverBase = "https://id.rijksmuseum.nl/";
67function createManifest(images: any[], label: any, metadata: any, id: string) {
8const builder = new IIIFBuilder();
9const uri = "https://sammeltassen-rijks.web.val.run/" + id;
50}
5152function getImageInformation(record: any) {
53const imageApiEndpoint = record?.["rdf:RDF"]?.["svcs:Service"]?.[0]?.$?.["rdf:about"];
54if (imageApiEndpoint) {
59}
6061function getMoreImages(part: any) {
62const uri = part.$["rdf:resource"];
63const id = uri.split("/").pop();
67}
6869function getValues(property: any) {
70if (property && property.length) {
71const obj: any = new Object();
83}
8485function getMetadata(props: any) {
86const title = getValues(props["dc:title"]);
87const identifier = getValues(props["dc:identifier"]);
142}
143144async function fetchJson(id: string) {
145const headers = new Headers([
146["Accept-Profile", "edm"],
155}
156157export default async function(req: Request): Promise<Response> {
158const url = new URL(req.url);
159const params = url.searchParams;
74}
7576export default async function(req: Request): Promise<Response> {
77// Use your Val Town API Token to create a session
78const wide = new Wide(await ValSession.new(Deno.env.get("valtown")));
inspiringLavenderTakinmain.tsx9 matches
15"recipe ingredient converter and scaler",
16"morse code translator with audio output",
17"random quote generator with tweet functionality",
18"personal finance tracker with basic charts",
19"multiplayer rock-paper-scissors game",
20];
2122function Dashboard() {
23const [stats, setStats] = useState<{
24totalGenerations: number;
3637useEffect(() => {
38async function fetchStats() {
39const response = await fetch("/dashboard-stats");
40const data = await response.json();
115}
116117function App() {
118const [prompt, setPrompt] = useState(
119STARTER_PROMPTS[Math.floor(Math.random() * STARTER_PROMPTS.length)],
141});
142143async function handleSubmit(e: React.FormEvent) {
144e.preventDefault();
145setLoading(true);
174}
175176function handleVersionChange(direction: "back" | "forward") {
177const { currentVersionIndex, versions } = versionHistory;
178305}
306307function client() {
308const path = window.location.pathname;
309const root = createRoot(document.getElementById("root")!);
320}
321322function extractCodeFromFence(text: string): string {
323const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
324return htmlMatch ? htmlMatch[1].trim() : text;
325}
326327export default async function server(req: Request): Promise<Response> {
328// Dynamic import for SQLite to avoid client-side import
329const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
slackScoutmain.tsx10 matches
15}
1617export default async function(interval: Interval): Promise<void> {
18try {
19await createTable();
3839// Create an SQLite table
40async function createTable(): Promise<void> {
41await sqlite.execute(`
42CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
5051// Fetch Hacker news, Twitter, and Reddit results
52async function fetchHackerNewsResults(topic: string): Promise<Website[]> {
53return hackerNewsSearch({
54query: topic,
58}
5960async function fetchTwitterResults(topic: string): Promise<Website[]> {
61return twitterSearch({
62query: topic,
67}
6869async function fetchRedditResults(topic: string): Promise<Website[]> {
70return redditSearch({ query: topic });
71}
7273function formatSlackMessage(website: Website): string {
74const displayTitle = website.title || website.url;
75return `*<${website.url}|${displayTitle}>*
78}
7980async function sendSlackMessage(message: string): Promise<Response> {
81const slackWebhookUrl = Deno.env.get("SLACK_WEBHOOK_URL");
82if (!slackWebhookUrl) {
104}
105106async function isURLInTable(url: string): Promise<boolean> {
107const result = await sqlite.execute({
108sql: `SELECT 1 FROM ${TABLE_NAME} WHERE url = :url LIMIT 1`,
112}
113114async function addWebsiteToTable(website: Website): Promise<void> {
115await sqlite.execute({
116sql: `INSERT INTO ${TABLE_NAME} (source, url, title, date_published)
120}
121122async function processResults(results: Website[]): Promise<void> {
123for (const website of results) {
124if (!(await isURLInTable(website.url))) {
projectTweetGallerymain.tsx5 matches
22];
2324function TweetEmbed({ tweetId }) {
25const containerRef = useRef(null);
2654}
5556function TweetGallery() {
57return (
58<div className="tweet-gallery">
62}
6364function App() {
65return (
66<div className="dark-mode">
78}
7980function client() {
81createRoot(document.getElementById("root")).render(<App />);
82}
83if (typeof document !== "undefined") { client(); }
8485export default async function server(request: Request): Promise<Response> {
86return new Response(
87`
interview_practicemain.tsx3 matches
14}
1516function App() {
17const [intervieweeResponse, setIntervieweeResponse] = useState("");
18const [response, setResponse] = useState("");
225}
226227function client() {
228createRoot(document.getElementById("root")).render(<App />);
229}
230if (typeof document !== "undefined") { client(); }
231232export default async function server(request: Request): Promise<Response> {
233if (request.method === "POST" && new URL(request.url).pathname === "/ask") {
234try {
webpage_summarizermain.tsx3 matches
5import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
67function App() {
8const [url, setUrl] = useState(() => {
9// Initialize URL from localStorage on first load
214}
215216function client() {
217createRoot(document.getElementById("root")).render(<App />);
218}
219if (typeof document !== "undefined") { client(); }
220221export default async function server(request: Request): Promise<Response> {
222if (request.method === "POST" && new URL(request.url).pathname === "/summarize") {
223try {