57created_at: string;
58profile_banner_url: string;
59profile_image_url_https: string;
60can_dm: boolean;
61}
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\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
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
45function App() {
6const [image, setImage] = useState<File | null>(null);
7const [imagePreview, setImagePreview] = useState<string | null>(null);
8const [age, setAge] = useState<string>('');
9const [gender, setGender] = useState<string>('');
25if (files && files[0]) {
26const file = files[0];
27if (file.type.startsWith('image/')) {
28setImage(file);
29setImagePreview(URL.createObjectURL(file));
30} else {
31alert('Please upload a valid image file');
32}
33}
42};
4344const processImage = async () => {
45if (!image || !age || !gender) {
46alert('Please upload an image and provide complete patient information');
47return;
48}
56},
57body: JSON.stringify({
58image: await image.arrayBuffer(),
59age,
60gender
70} catch (error) {
71console.error('Analysis error:', error);
72alert('Failed to analyze image. Please try again.');
73} finally {
74setIsLoading(false);
76};
7778const clearImage = () => {
79setImage(null);
80setImagePreview(null);
81if (fileInputRef.current) {
82fileInputRef.current.value = '';
98onClick={triggerFileInput}
99>
100{imagePreview ? (
101<>
102<img src={imagePreview} alt="Preview" className="preview-image" />
103<button className="clear-image-btn" onClick={(e) => {
104e.stopPropagation();
105clearImage();
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>
115type="file"
116ref={fileInputRef}
117accept="image/png, image/jpeg, image/webp"
118onChange={handleFileUpload}
119className="file-input"
146</div>
147<button
148onClick={processImage}
149disabled={isLoading || !image || !age || !gender}
150className="analyze-btn"
151>
152{isLoading ? '🔄 Analyzing...' : '🩺 Analyze Image'}
153</button>
154</div>
354}
355356.preview-image {
357max-width: 100%;
358max-height: 400px;
361}
362363.clear-image-btn {
364position: absolute;
365top: 10px;
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
65});
6667// Inline SVG Icons to replace external image links
68const PillIcon = (props) => (
69<SvgIcon {...props} viewBox="0 0 48 48">
100alignItems: 'center',
101gap: 2,
102backgroundImage: 'linear-gradient(to bottom right, #0077be, #4eb3ff)'
103};
104112justifyContent: 'center',
113alignItems: 'center',
114backgroundImage: 'url(https://img.freepik.com/free-vector/gradient-medical-background_23-2148727326.jpg)',
115backgroundSize: 'cover',
116backgroundPosition: 'center',
142<CardMedia
143component="img"
144image="https://img.freepik.com/free-vector/medical-healthcare-logo-design_460848-13823.jpg"
145alt="MEDIANALIZE Logo"
146sx={{
PDF2Vectorconverter17 matches
46const svgContent = await svgBlob.text();
47
48// Return with proper headers that force the browser to display it as an image
49return new Response(svgContent, {
50headers: {
51"Content-Type": "image/svg+xml",
52"Content-Disposition": "inline",
53"X-Content-Type-Options": "nosniff",
387
388// Create blob and URL for download
389const blob = new Blob([svgContent], {type: 'image/svg+xml'});
390const url = URL.createObjectURL(blob);
391
509const width = canvas.width;
510const height = canvas.height;
511const imageData = ctx.getImageData(0, 0, width, height);
512const data = imageData.data;
513
514// Determine stroke color based on settings
515const strokeColor = useCurrentColor ? "currentColor" : "black";
516
517// Create binary image representation
518const binaryImage = new Array(height);
519for (let y = 0; y < height; y++) {
520binaryImage[y] = new Array(width).fill(false);
521for (let x = 0; x < width; x++) {
522const idx = (y * width + x) * 4;
523// Check if pixel is dark (black or close to black)
524if (data[idx] < 100 && data[idx+1] < 100 && data[idx+2] < 100) {
525binaryImage[y][x] = true;
526}
527}
546// Find horizontal lines
547for (let x = 0; x < width; x++) {
548if (binaryImage[y][x]) {
549if (lineStart === -1) lineStart = x;
550} else {
567
568for (let y = 0; y < height; y++) {
569if (binaryImage[y][x]) {
570if (lineStart === -1) lineStart = y;
571} else {
587for (let y = 1; y < height-1; y++) {
588for (let x = 1; x < width-1; x++) {
589if (binaryImage[y][x]) {
590// Check for diagonal patterns
591// Top-left to bottom-right
592if (binaryImage[y-1][x-1] && binaryImage[y+1][x+1]) {
593svg += '<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
596if (binaryImage[y-1][x+1] && binaryImage[y+1][x-1]) {
597svg += '<line x1="' + (x+1) + '" y1="' + (y-1) + '" x2="' + (x-1) + '" y2="' + (y+1) + '" stroke="' + strokeColor + '" stroke-width="' + lineThickness + '"/>';
598}
604for (let y = 0; y < height; y++) {
605for (let x = 0; x < width; x++) {
606if (binaryImage[y][x]) {
607// Check if this point is isolated (not part of any detected line)
608let isolated = true;
617
618if (nx >= 0 && nx < width && ny >= 0 && ny < height) {
619if (binaryImage[ny][nx]) {
620isolated = false;
621}
674// Store SVG content in blob storage with proper content type
675await blob.set(blobKey, new TextEncoder().encode(svg), {
676contentType: "image/svg+xml",
677contentDisposition: "inline"
678});
PDF2Vectorworking-version3 matches
172
173// Create download link
174const blob = new Blob([svgContent], {type: 'image/svg+xml'});
175const url = URL.createObjectURL(blob);
176
208const width = canvas.width;
209const height = canvas.height;
210const imageData = ctx.getImageData(0, 0, width, height);
211const data = imageData.data;
212
213// Find dark pixels
PDF2Vectorone-file1 match
51
52// Create download link
53const blob = new Blob([svgContent], {type: 'image/svg+xml'});
54const url = URL.createObjectURL(blob);
55
PDF2Vectorultra-simple1 match
59
60// Create download link
61const blob = new Blob([svg], {type: 'image/svg+xml'});
62const url = URL.createObjectURL(blob);
63const a = document.createElement('a');