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/$%7Bsuccess?q=image&page=526&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 7022 results for "image"(1202ms)

blobStoragemain.tsx5 matches

@kamenxrider•Updated 3 months ago
440 {profile && (
441 <div className="flex items-center space-x-4">
442 <img src={profile.profileImageUrl} alt="Profile" className="w-8 h-8 rounded-full" />
443 <span>{profile.username}</span>
444 <a href="/auth/logout" className="text-blue-400 hover:text-blue-300">Logout</a>
583 alt="Blob content"
584 className="max-w-full h-auto"
585 onError={() => console.error("Error loading image")}
586 />
587 </div>
635 <li>Create public shareable links for blobs</li>
636 <li>View and manage public folder</li>
637 <li>Preview images directly in the interface</li>
638 </ul>
639 </div>
694 const { ValTown } = await import("npm:@valtown/sdk");
695 const vt = new ValTown();
696 const { email: authorEmail, profileImageUrl, username } = await vt.me.profile.retrieve();
697 // const authorEmail = me.email;
698
762
763 c.set("email", email);
764 c.set("profile", { profileImageUrl, username });
765 await next();
766};

emailValHandlermain.tsx25 matches

@martinbowling•Updated 3 months ago
11- Parse and analyze various types of content:
12 - PDF attachments
13 - Image attachments (using GPT-4 Vision)
14 - Website content from links in your email
15- Get detailed, context-aware responses directly to your inbox
294. Compose your email:
30 - Write your query or request in the email body
31 - Attach any relevant PDFs or images
32 - Include links to websites you want analyzed
33 - Send it to the Val email address
45
46- PDFs: Text content will be extracted and analyzed
47- Images: Will be analyzed using GPT-4 Vision API
48- Websites: Content will be extracted and converted to markdown for analysis
49- Other file types are not currently supported and will be ignored
79
80 // Step 3: Process different types of content
81 const { pdfTexts, imageAnalysis } = await processAttachments(attachments, openaiKey, transformedPrompt);
82 const websiteMarkdown = await extractWebsiteMarkdown(links, mdApiKey);
83
86 transformedPrompt,
87 pdfTexts,
88 imageAnalysis,
89 websiteMarkdown,
90 receivedEmail,
176}
177
178// Process image attachments with GPT-4V
179async function analyzeImage(imageAttachment, apiKey, transformedPrompt) {
180 try {
181 const response = await fetch("https://api.openai.com/v1/chat/completions", {
191 role: "system",
192 content:
193 `You are an AI assistant tasked with analyzing images in the context of a specific query. Use the following transformed prompt to guide your analysis and provide relevant context:\n\n${transformedPrompt}\n\nFocus your analysis on aspects that are most relevant to this prompt.`,
194 },
195 {
198 {
199 type: "text",
200 text: "Analyze this image and provide relevant context based on the given prompt:${transformedPrompt}",
201 },
202 {
203 type: "image_url",
204 image_url: {
205 url: `data:${imageAttachment.type};base64,${imageAttachment.content}`,
206 },
207 },
215 return data.choices[0]?.message?.content || "No analysis available";
216 } catch (error) {
217 console.error("Error analyzing image:", error);
218 return "Error analyzing image";
219 }
220}
310}
311
312// Process all attachments (PDFs and Images)
313async function processAttachments(attachments, apiKey, transformedPrompt) {
314 const pdfTexts = [];
315 const imageAnalysis = [];
316
317 for (const attachment of attachments) {
319 const pdfText = await extractPdfText([attachment]);
320 pdfTexts.push(...pdfText);
321 } else if (attachment.type.startsWith("image/")) {
322 const analysis = await analyzeImage(attachment, apiKey, transformedPrompt);
323 imageAnalysis.push({
324 filename: attachment.filename,
325 analysis,
328 }
329
330 return { pdfTexts, imageAnalysis };
331}
332
365
366// Generate the final prompt with all context
367function generateFinalPrompt(transformedPrompt, pdfTexts, imageAnalysis, websiteMarkdown, email) {
368 let contextDump = [];
369
373 }
374
375 // Add image analysis
376 if (imageAnalysis.length > 0) {
377 contextDump.push("Image Analysis:", ...imageAnalysis.map(img => `${img.filename}: ${img.analysis}`));
378 }
379
401 role: "system",
402 content:
403 `You are a helpful AI that replies to emails. Address the sender by their first name if provided, and sign off as 'AI Assistant' in a friendly and professional tone. Be concise and thorough in your analysis. As you're replying via email, use email syntax and not markdown. Analyze all provided content, including PDFs, images, and website content, in the context of the email request. Follow the structured format provided in the transformed prompt to organize your response. Here's the transformed prompt to guide your response:\n\n${transformedPrompt}`,
404 },
405 {

blob_adminREADME.md1 match

@sethblanchard•Updated 3 months ago
3This is a lightweight Blob Admin interface to view and debug your Blob data.
4
5![Screenshot 2024-11-22 at 15.43.43@2x.png](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/d075a4ee-93ec-4cdd-4823-7c8aee593f00/public)
6
7Versions 0-17 of this val were done with Hono and server-rendering.

blob_adminmain.tsx5 matches

@sethblanchard•Updated 3 months ago
440 {profile && (
441 <div className="flex items-center space-x-4">
442 <img src={profile.profileImageUrl} alt="Profile" className="w-8 h-8 rounded-full" />
443 <span>{profile.username}</span>
444 <a href="/auth/logout" className="text-blue-400 hover:text-blue-300">Logout</a>
583 alt="Blob content"
584 className="max-w-full h-auto"
585 onError={() => console.error("Error loading image")}
586 />
587 </div>
635 <li>Create public shareable links for blobs</li>
636 <li>View and manage public folder</li>
637 <li>Preview images directly in the interface</li>
638 </ul>
639 </div>
694 const { ValTown } = await import("npm:@valtown/sdk");
695 const vt = new ValTown();
696 const { email: authorEmail, profileImageUrl, username } = await vt.me.profile.retrieve();
697 // const authorEmail = me.email;
698
762
763 c.set("email", email);
764 c.set("profile", { profileImageUrl, username });
765 await next();
766};

tangibleIvoryCanidaemain.tsx1 match

@alexwein•Updated 3 months ago
48 "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" ",
49 ),
50 { headers: { "Content-Type": "image/svg+xml" } },
51 );
52}

tangibleIvoryCanidaeREADME.md1 match

@alexwein•Updated 3 months ago
11|-----|-----|
12| Web page | https://alexwein-fabwbogglelike.web.val.run |
13| Observable Plot for image | https://observablehq.com/plot/ |
14| wordnik from words | https://github.com/wordnik/wordlist |

bluesky_bot_templatemain.tsx5 matches

@alexwein•Updated 3 months ago
24 }
25 const svgText = await response.text();
26 return `data:image/svg+xml;base64,${btoa(svgText)}`;
27}
28
53 // Upload blob to Bluesky
54 const { data } = await agent.uploadBlob(convertDataURIToUint8Array(svgDataUri), {
55 encoding: "image/svg+xml",
56 });
57
60 text: "",
61 embed: {
62 $type: "app.bsky.embed.images",
63 images: [{
64 alt: "Generated SVG visualization",
65 image: data.blob,
66 aspectRatio: {
67 width: 600,

vividCopperWrenmain.tsx1 match

@vishu44•Updated 3 months ago
1111 <meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1112 <meta property="og:type" content="website">
1113 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1114
1115

reverentAquaCuckoomain.tsx1 match

@vishu44•Updated 3 months ago
1111 <meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1112 <meta property="og:type" content="website">
1113 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1114
1115

exuberantLimeReindeermain.tsx1 match

@gunisettigokul•Updated 3 months ago
1111 <meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1112 <meta property="og:type" content="website">
1113 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1114
1115

Imagetourl

@dcm31•Updated 1 hour ago

thilenius-webcam1 file match

@stabbylambda•Updated 4 days ago
Image proxy for the latest from https://gliderport.thilenius.com
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