Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$%7Bart_info.art.src%7D?q=image&page=725&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=image

Returns an array of strings in format "username" or "username/projectName"

Found 7855 results for "image"(2132ms)

substrateBadgemain.tsx1 match

@substrateUpdated 10 months ago
45 return new Response(badge, {
46 headers: {
47 "Content-Type": "image/svg+xml",
48 },
49 });

IllustratedPrimermain.tsx22 matches

@kousun12Updated 10 months ago
1import wrapper from "https://esm.town/v/substrate/substrateBadgeMiddleware";
2import { ComputeJSON, ComputeText, GenerateImage, sb, Substrate } from "npm:substrate";
3import { z } from "npm:zod";
4import { zodToJsonSchema } from "npm:zod-to-json-schema";
23 });
24 const prompt1 = new ComputeText({
25 prompt: sb.interpolate`generate a description of an image of ${
26 c1.future.json_object.get("concepts").at(0)
27 }. Be concise and terse. Include details on the background, angle & framing, and style.`,
28 });
29 const prompt2 = new ComputeText({
30 prompt: sb.interpolate`generate a description of an image of ${
31 c1.future.json_object.get("concepts").at(1)
32 }. Be concise and terse. Include details on the background, angle & framing, and style.`,
43 ${caption1.future.text}`,
44 }, { cache_age: 800 });
45 const image1 = new GenerateImage({ prompt: prompt1.future.text });
46 const image2 = new GenerateImage({ prompt: prompt2.future.text });
47 const c2 = new ComputeJSON({
48 prompt: sb.interpolate`List deeper concepts or ideas related to: ${c1.future.json_object.get("concepts").at(0)}
53 });
54 const prompt3 = new ComputeText({
55 prompt: sb.interpolate`generate a description of an image of ${
56 c2.future.json_object.get("concepts").at(0)
57 }. Be creative depicting abstract topics with extra detail. Include details on the background, angle & framing, and style.`,
58 });
59 const prompt4 = new ComputeText({
60 prompt: sb.interpolate`generate a description of an image of ${
61 c2.future.json_object.get("concepts").at(1)
62 }. Be creative depicting abstract topics with extra detail. Include details on the background, angle & framing, and style.`,
77 ${caption3.future.text}`,
78 });
79 const image3 = new GenerateImage({ prompt: prompt3.future.text });
80 const image4 = new GenerateImage({ prompt: prompt4.future.text });
81 const nodes = [image1, caption1, image2, caption2, image3, caption3, image4, caption4];
82 const stream = await substrate.stream(...nodes);
83
88 async start(controller) {
89 const pairs = [
90 { image: null, caption: null, title: null },
91 { image: null, caption: null, title: null },
92 { image: null, caption: null, title: null },
93 { image: null, caption: null, title: null },
94 ];
95
96 const outputPair = (pair, index) => {
97 if (pair.image && pair.caption) {
98 controller.enqueue(new TextEncoder().encode(
99 `<div style="display:flex;justify-content:center;align-items:center;margin-bottom:20px;">
100 <div style="margin:0 10px;">${pair.image}</div>
101 <div style="margin:0 10px;font-size:1.2rem;">
102 <a href="/?subject=${pair.title}"><b>${capitalize(pair.title)}</b></a><br/>${pair.caption}</div>
103</div>`,
104 ));
105 pairs[index] = { image: null, caption: null, title: null }; // Reset after output
106 }
107 };
152 if (index !== -1) {
153 const pairIndex = Math.floor(index / 2);
154 const isImage = index % 2 === 0;
155 const content = event.data.image_uri
156 ? `<img src="${event.data.image_uri}" width=400/>`
157 : `<div>${event.data.text}</div>`;
158
159 if (isImage) {
160 pairs[pairIndex].image = content;
161 } else {
162 pairs[pairIndex].caption = content;

blob_adminREADME.md1 match

@janpaul123Updated 10 months ago
3This is a lightweight Blob Admin interface to view and debug your Blob data.
4
5![b7321ca2cd80899250589b9aa08bc3cae9c7cea276282561194e7fc537259b46.png](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/311a81bb-18d8-4583-b7e3-64bac326f700/public)
6
7Use this button to install the val:

shotclipREADME.md1 match

@kousun12Updated 10 months ago
1#### SHOTCLIP
2
3Demo of embedding images with [substrate](https://www.substrate.run/), and querying them for semantic relevance.
4
5Use the query parameter `prompt` to control the search.

private_modelmain.tsx2 matches

@turbo1912Updated 10 months ago
16 },
17 });
18 console.log(result.image.url);
19 console.log(
20 renderToString(
25 <body>
26 <h1>gorkem</h1>
27 <img src={result.image.url} />
28 </body>
29 </html>,

randomCardImagemain.tsx4 matches

@jamiedubsUpdated 10 months ago
8 const data = await response.json();
9 if (data.success && data.cards && data.cards.length > 0) {
10 const cardImage = data.cards[0].image;
11 return Response.json({ data: cardImage });
12 } else {
13 return Response.json({ error: "No cards found in the response." }, { status: 400 });
14 }
15 } catch (error) {
16 console.log("Error fetching random card image:", error);
17 return Response.json({
18 error: `An error occurred while fetching the random card image. ${error}`,
19 }, { status: 400 });
20 }

streammain.tsx1 match

@tempguyUpdated 10 months ago
28const headers = {
29 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0",
30 "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
31 "Accept-Language": "en-US,en;q=0.5",
32 "Alt-Used": "www.showbox.media",

servicefactorymain.tsx3 matches

@dglazkovUpdated 10 months ago
76 | "ports-spec"
77 /**
78 * Indicates that the input or output port represents an image. The image can
79 * be a URL or a base64 encoded image.
80 */
81 | "image"
82 /**
83 * Indicates that the input or output represents some sort of code

plumOwlmain.tsx2 matches

@tempguyUpdated 10 months ago
15 headers: {
16 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0",
17 "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
18 "Accept-Language": "en-US,en;q=0.5",
19 "Alt-Used": "www.showbox.media",
27 headers: {
28 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0",
29 "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
30 "Accept-Language": "en-US,en;q=0.5",
31 "Alt-Used": "www.showbox.media",

umbrellaReminderREADME.md1 match

@benroboUpdated 10 months ago
1# ☔️ Umbrella reminder if there's rain today
2
3![Screenshot 2023-09-14 at 12.31.32.png](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/d82916ca-f8d9-4b49-88c6-420ab67a7700/public)
4
5## Setup

image_proxy

@oopsUpdated 9 hours ago

ImageExplorer10 file matches

@carmiUpdated 5 days ago
Chrimage
Atiq
"Focal Lens with Atig Wazir" "Welcome to my photography journey! I'm Atiq Wazir, a passionate photographer capturing life's beauty one frame at a time. Explore my gallery for stunning images, behind-the-scenes stories, and tips & tricks to enhance your own