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/$%7Burl%7D?q=image&page=578&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 6621 results for "image"(952ms)

patchedFeedExtractormain.tsx1 match

@easrngUpdated 8 months ago
348 }
349 });
350 const optionalProps = "source category enclosure author image".split(" ");
351 optionalProps.forEach((key) => {
352 if (hasProperty(item2, key)) {

blob_adminREADME.md1 match

@ryiUpdated 8 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:

telegramDalleBotmain.tsx5 matches

@adjacentUpdated 8 months ago
1import { textToImageDalle } from "https://esm.town/v/hootz/textToImageDalle";
2import { telegramSendMessage } from "https://esm.town/v/vtdocs/telegramSendMessage?v=5";
3import { telegramSendPhoto } from "https://esm.town/v/vtdocs/telegramSendPhoto?v=1";
20 telegramSendMessage(
21 process.env.telegramDalleBotToken,
22 { chat_id: chatId, text: "send prompt, get an image!" },
23 );
24 return;
25 }
26 // otherwise, generate an image!
27 try {
28 const imageURL = (await textToImageDalle(
29 process.env.openai,
30 text,
36 process.env.telegramDalleBotToken,
37 // caption is limited to 1024 characters
38 { chat_id: chatId, photo: imageURL, caption: text.slice(0, 1024) },
39 );
40 }

telegramDalleBotREADME.md1 match

@adjacentUpdated 8 months ago
1# Telegram DALLE Bot
2
3A personal telegram bot you can message to create images with OpenAI's [DALLE](https://openai.com/dall-e-2) ✨
4
5![DALLE: A Macintosh II sitting on a desk, painted by Picasso in his blue period.](https://i.imgur.com/uJrP5mE.png)

tidbytCirclemain.tsx3 matches

@andreterronUpdated 8 months ago
6 const { default: Jimp } = await import("npm:jimp@0");
7 const img = await new Jimp(size, size);
8 for (const { x, y, idx, image } of img.scanIterator(0, 0, size, size)) {
9 const dx = x - size / 2 + 0.5;
10 const dy = y - size / 2 + 0.5;
12 if (d <= size / 2) {
13 if (typeof border === "number" && d > (size / 2 - 1)) {
14 image.setPixelColor(border, x, y);
15 }
16 else if (typeof fill === "number") {
17 image.setPixelColor(fill, x, y);
18 }
19 }

createTidbytWorkoutsImagemain.tsx1 match

@andreterronUpdated 8 months ago
8import Jimp from "npm:jimp@0";
9
10export async function createTidbytWorkoutsImage(icons: WorkoutIcon[]) {
11 const headerUrl = "https://art.pixilart.com/sr2c714c74a22aws3.png";
12 const weekdaysUrl = "https://art.pixilart.com/sr22f1df42b42aws3.png";

rabbitstreamUtilsmain.tsx1 match

@tempdevUpdated 8 months ago
55}
56export async function getWasm() {
57 const req = await fetch("https://rabbitstream.net/images/loading.png?v=0.6", {
58 "headers": {
59 "Referrer-Policy": "strict-origin-when-cross-origin",

valTownInspirationEmailmain.tsx1 match

@irenegUpdated 8 months ago
11 let html = `<h1>${valTownInspo.title}</h1>
12 <p>${valTownInspo.description}</p>
13 <a href="https://val.town/${valTownInspo.val}"><img src="${valTownInspo.image}" style="max-width:576px"/></a>
14 <p><a href="https://www.val.town/settings/intervals">Unsubscribe here</a></p>`;
15

jsonToDalleFormmain.tsx14 matches

@weaverwhaleUpdated 8 months ago
11function App() {
12 const [json, setJson] = useState("");
13 const [imageUrl, setImageUrl] = useState("");
14 const [error, setError] = useState("");
15 const [isLoading, setIsLoading] = useState(false);
19 setIsLoading(true);
20 setError("");
21 setImageUrl("");
22
23 try {
32 if (data.error) {
33 setError(data.error);
34 } else if (data.imageUrl) {
35 setImageUrl(data.imageUrl);
36 }
37 } catch (error) {
44 return (
45 <div className="container">
46 <h1>JSON to DALL-E Image Generator</h1>
47 <form onSubmit={handleSubmit}>
48 <textarea
54 >
55 </textarea>
56 <button type="submit" disabled={isLoading}>Generate Image</button>
57 </form>
58 {isLoading && <div id="loadingIndicator">Generating image...</div>}
59 {error && (
60 <div>
62 </div>
63 )}
64 {imageUrl && (
65 <div>
66 <img src={imageUrl} alt="Generated image" />
67 </div>
68 )}
116 font-style: italic;
117 }
118 #imageContainer {
119 margin-top: 20px;
120 }
167 const dallePrompt = completion.choices[0].message.content;
168
169 // Generate DALL-E image
170 const response = await openai.images.generate({
171 model: "dall-e-3",
172 prompt: dallePrompt,
175 });
176
177 return new Response(JSON.stringify({ imageUrl: response.data[0].url, dallePrompt }), {
178 headers: { "Content-Type": "application/json" },
179 });
190 <html>
191 <head>
192 <title>JSON to DALL-E Image Generator</title>
193 <style>${css}</style>
194 </head>

umbrellaReminderREADME.md1 match

@therealarkinUpdated 8 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-gen

@armadillomikeUpdated 2 days ago

gpt-image-test1 file match

@CaptainJackUpdated 4 days ago
测试 gpt image 的不同 api 能否满足图片生成要求
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