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/?q=image&page=237&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 2609 results for "image"(353ms)

socialDataSearch_628836socialDataSearch1 match

@charmaine•Updated 1 month ago
57 created_at: string;
58 profile_banner_url: string;
59 profile_image_url_https: string;
60 can_dm: boolean;
61}

cerebras_coderstarter-prompts.js1 match

@Miraj•Updated 1 month ago
23 "prompt": "two column interactive markdown editor with live preview and default text to explain markdown features",
24 "title": "Markdown Editor",
25 "code": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Markdown Editor</title>\n <link href=\"https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css\" rel=\"stylesheet\">\n</head>\n<body class=\"bg-white\">\n <div class=\"max-w-full mx-auto p-4 pt-6 md:p-6 lg:p-8\">\n <h1 class=\"text-3xl text-center mb-4\">Markdown Editor</h1>\n <div class=\"flex flex-row\">\n <div class=\"editor p-4 rounded-lg border border-gray-200 w-full md:w-1/2\">\n <textarea id=\"editor\" class=\"w-full h-screen p-2 border border-gray-200 rounded-lg\" placeholder=\"Type your Markdown here...\"></textarea>\n </div>\n <div class=\"preview p-4 rounded-lg border border-gray-200 w-full md:w-1/2 ml-2 md:ml-4 lg:ml-8\">\n <div id=\"preview\"></div>\n </div>\n </div>\n <p class=\"text-center mt-4\">Built on <a href=\"https://cerebrascoder.com\">Cerebras Coder</a></p>\n </div>\n\n <script>\n const editor = document.getElementById('editor');\n const preview = document.getElementById('preview');\n\n // Initialize textarea with default markdown\n const defaultMarkdown = `\n# Introduction to Markdown\nMarkdown is a lightweight markup language that is easy to read and write. It is often used for formatting text in plain text editors, chat applications, and even web pages.\n\n## Headers\nHeaders are denoted by the # symbol followed by a space. The number of # symbols determines the level of the header:\n# Heading 1\n## Heading 2\n### Heading 3\n\n## Emphasis\nYou can use emphasis to make your text **bold** or *italic*:\n*Italics*\n**Bold**\n\n## Lists\nYou can use lists to organize your text:\n* Item 1\n* Item 2\n* Item 3\nOr\n1. Item 1\n2. Item 2\n3. Item 3\n\n## Links\nYou can use links to reference external resources:\n[Google](https://www.google.com)\n\n## Images\nYou can use images to add visual content:\n![Markdown Logo](https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Markdown-mark.svg/208px-Markdown-mark.svg.png)\n`;\n editor.value = defaultMarkdown;\n\n // Update preview on input\n editor.addEventListener('input', () => {\n const markdown = editor.value;\n const html = markdownToHtml(markdown);\n preview.innerHTML = html;\n });\n\n // Initialize preview with default markdown\n const defaultHtml = markdownToHtml(defaultMarkdown);\n preview.innerHTML = defaultHtml;\n\n // Function to convert Markdown to HTML\n function markdownToHtml(markdown) {\n // Bold\n markdown = markdown.replace(/\\*\\*(.*?)\\*\\*/g, '<b>$1</b>');\n\n // Italic\n markdown = markdown.replace(/\\*(.*?)\\*/g, '<i>$1</i>');\n\n // Links\n markdown = markdown.replace(/\\[(.*?)\\]\\((.*?)\\)/g, '<a href=\"$2\">$1</a>');\n\n // Images\n markdown = markdown.replace(/!\\[(.*?)\\]\\((.*?)\\)/g, '<img src=\"$2\" alt=\"$1\">');\n\n // Headings\n markdown = markdown.replace(/(^#{1,6} )(.*)/gm, (match, level, text) => {\n return `<h${level.length}>${text}</h${level.length}>`;\n });\n\n // Lists\n markdown = markdown.replace(/^(\\*|\\d+\\.) (.*)/gm, (match, marker, text) => {\n if (marker.startsWith('*')) {\n return `<li>${text}</li>`;\n } else {\n return `<li>${text}</li>`;\n }\n });\n\n // Line breaks\n markdown = markdown.replace(/\\n/g, '<br>');\n\n // Fix for nested lists\n markdown = markdown.replace(/<li><li>/g, '<li>');\n markdown = markdown.replace(/<\\/li><\\/li>/g, '</li>');\n\n // Wrap lists in ul\n markdown = markdown.replace(/(<li>.*<\\/li>)/g, '<ul>$1</ul>');\n\n return markdown;\n }\n </script>\n</body>\n</html>",
26 "performance": {
27 "tokensPerSecond": 4092.96,

cerebras_coderindex.html1 match

@Miraj•Updated 1 month ago
21 <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."">
22 <meta property="og:type" content="website">
23 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
24
25

MEDIANALIZE_PROMedicalreport.tsx25 matches

@UndiscoverableERA•Updated 1 month ago
4
5function App() {
6 const [image, setImage] = useState<File | null>(null);
7 const [imagePreview, setImagePreview] = useState<string | null>(null);
8 const [age, setAge] = useState<string>('');
9 const [gender, setGender] = useState<string>('');
25 if (files && files[0]) {
26 const file = files[0];
27 if (file.type.startsWith('image/')) {
28 setImage(file);
29 setImagePreview(URL.createObjectURL(file));
30 } else {
31 alert('Please upload a valid image file');
32 }
33 }
42 };
43
44 const processImage = async () => {
45 if (!image || !age || !gender) {
46 alert('Please upload an image and provide complete patient information');
47 return;
48 }
56 },
57 body: JSON.stringify({
58 image: await image.arrayBuffer(),
59 age,
60 gender
70 } catch (error) {
71 console.error('Analysis error:', error);
72 alert('Failed to analyze image. Please try again.');
73 } finally {
74 setIsLoading(false);
76 };
77
78 const clearImage = () => {
79 setImage(null);
80 setImagePreview(null);
81 if (fileInputRef.current) {
82 fileInputRef.current.value = '';
98 onClick={triggerFileInput}
99 >
100 {imagePreview ? (
101 <>
102 <img src={imagePreview} alt="Preview" className="preview-image" />
103 <button className="clear-image-btn" onClick={(e) => {
104 e.stopPropagation();
105 clearImage();
106 }}>✖</button>
107 </>
108 ) : (
109 <div className="dropzone-content">
110 <p>📷 Drag & Drop or Click to Upload Medical Image</p>
111 <small>Supported formats: PNG, JPEG, WEBP</small>
112 </div>
115 type="file"
116 ref={fileInputRef}
117 accept="image/png, image/jpeg, image/webp"
118 onChange={handleFileUpload}
119 className="file-input"
146 </div>
147 <button
148 onClick={processImage}
149 disabled={isLoading || !image || !age || !gender}
150 className="analyze-btn"
151 >
152 {isLoading ? '🔄 Analyzing...' : '🩺 Analyze Image'}
153 </button>
154 </div>
354}
355
356.preview-image {
357 max-width: 100%;
358 max-height: 400px;
361}
362
363.clear-image-btn {
364 position: absolute;
365 top: 10px;

MEDIANALIZE_PROhealthcare.tsx1 match

@UndiscoverableERA•Updated 1 month ago
343 <title>MEDIANALIZE AI</title>
344 <meta name="viewport" content="width=device-width, initial-scale=1">
345 <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='50' r='45' fill='%234CAF50'/><path d='M25 50 L45 70 L75 30' stroke='white' stroke-width='8' fill='none'/></svg>">
346 <script src="https://esm.town/v/std/catch"></script>
347 <style>${css}</style>

MEDIANALIZE_PROindex.tsx4 matches

@UndiscoverableERA•Updated 1 month ago
65});
66
67// Inline SVG Icons to replace external image links
68const PillIcon = (props) => (
69 <SvgIcon {...props} viewBox="0 0 48 48">
100 alignItems: 'center',
101 gap: 2,
102 backgroundImage: 'linear-gradient(to bottom right, #0077be, #4eb3ff)'
103 };
104
112 justifyContent: 'center',
113 alignItems: 'center',
114 backgroundImage: 'url(https://img.freepik.com/free-vector/gradient-medical-background_23-2148727326.jpg)',
115 backgroundSize: 'cover',
116 backgroundPosition: 'center',
142 <CardMedia
143 component="img"
144 image="https://img.freepik.com/free-vector/medical-healthcare-logo-design_460848-13823.jpg"
145 alt="MEDIANALIZE Logo"
146 sx={{

PDF2Vectorconverter17 matches

@dcm31•Updated 1 month ago
46 const svgContent = await svgBlob.text();
47
48 // Return with proper headers that force the browser to display it as an image
49 return new Response(svgContent, {
50 headers: {
51 "Content-Type": "image/svg+xml",
52 "Content-Disposition": "inline",
53 "X-Content-Type-Options": "nosniff",
387
388 // Create blob and URL for download
389 const blob = new Blob([svgContent], {type: 'image/svg+xml'});
390 const url = URL.createObjectURL(blob);
391
509 const width = canvas.width;
510 const height = canvas.height;
511 const imageData = ctx.getImageData(0, 0, width, height);
512 const data = imageData.data;
513
514 // Determine stroke color based on settings
515 const strokeColor = useCurrentColor ? "currentColor" : "black";
516
517 // Create binary image representation
518 const binaryImage = new Array(height);
519 for (let y = 0; y < height; y++) {
520 binaryImage[y] = new Array(width).fill(false);
521 for (let x = 0; x < width; x++) {
522 const idx = (y * width + x) * 4;
523 // Check if pixel is dark (black or close to black)
524 if (data[idx] < 100 && data[idx+1] < 100 && data[idx+2] < 100) {
525 binaryImage[y][x] = true;
526 }
527 }
546 // Find horizontal lines
547 for (let x = 0; x < width; x++) {
548 if (binaryImage[y][x]) {
549 if (lineStart === -1) lineStart = x;
550 } else {
567
568 for (let y = 0; y < height; y++) {
569 if (binaryImage[y][x]) {
570 if (lineStart === -1) lineStart = y;
571 } else {
587 for (let y = 1; y < height-1; y++) {
588 for (let x = 1; x < width-1; x++) {
589 if (binaryImage[y][x]) {
590 // Check for diagonal patterns
591 // Top-left to bottom-right
592 if (binaryImage[y-1][x-1] && binaryImage[y+1][x+1]) {
593 svg += '<line x1="' + (x-1) + '" y1="' + (y-1) + '" x2="' + (x+1) + '" y2="' + (y+1) + '" stroke="' + strokeColor + '" stroke-width="' + lineThickness + '"/>';
594 }
595 // Top-right to bottom-left
596 if (binaryImage[y-1][x+1] && binaryImage[y+1][x-1]) {
597 svg += '<line x1="' + (x+1) + '" y1="' + (y-1) + '" x2="' + (x-1) + '" y2="' + (y+1) + '" stroke="' + strokeColor + '" stroke-width="' + lineThickness + '"/>';
598 }
604 for (let y = 0; y < height; y++) {
605 for (let x = 0; x < width; x++) {
606 if (binaryImage[y][x]) {
607 // Check if this point is isolated (not part of any detected line)
608 let isolated = true;
617
618 if (nx >= 0 && nx < width && ny >= 0 && ny < height) {
619 if (binaryImage[ny][nx]) {
620 isolated = false;
621 }
674 // Store SVG content in blob storage with proper content type
675 await blob.set(blobKey, new TextEncoder().encode(svg), {
676 contentType: "image/svg+xml",
677 contentDisposition: "inline"
678 });

PDF2Vectorworking-version3 matches

@dcm31•Updated 1 month ago
172
173 // Create download link
174 const blob = new Blob([svgContent], {type: 'image/svg+xml'});
175 const url = URL.createObjectURL(blob);
176
208 const width = canvas.width;
209 const height = canvas.height;
210 const imageData = ctx.getImageData(0, 0, width, height);
211 const data = imageData.data;
212
213 // Find dark pixels

PDF2Vectorone-file1 match

@dcm31•Updated 1 month ago
51
52 // Create download link
53 const blob = new Blob([svgContent], {type: 'image/svg+xml'});
54 const url = URL.createObjectURL(blob);
55

PDF2Vectorultra-simple1 match

@dcm31•Updated 1 month ago
59
60 // Create download link
61 const blob = new Blob([svg], {type: 'image/svg+xml'});
62 const url = URL.createObjectURL(blob);
63 const a = document.createElement('a');

brainrot_image_gen1 file match

@dcm31•Updated 1 day ago
Generate images for Italian Brainrot characters using FAL AI

bingImageOfDay4 file matches

@wolf•Updated 1 month ago