Skip to content

Instantly share code, notes, and snippets.

@dedlim
dedlim / claude_3.5_sonnet_artifacts.xml
Last active May 15, 2025 17:19
Claude 3.5 Sonnet, Full Artifacts System Prompt
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
@rickkk856
rickkk856 / Drawing_App.py
Last active May 17, 2024 03:38
Drawing Interface For Google Colaboratory - Paint
#@title <font color='red'>Drawing APP</font> {vertical-output: true, run: "auto"}
import ipywidgets as widgets
from ipywidgets import Layout, Button, Box
from IPython.display import display, HTML, Image
from google.colab.output import eval_js
from base64 import b64decode
Square_Size = 256 #@param ["256", "512"] {type:"raw"}
Brush_Size = 30 #@param {type:"slider", min:0, max:100, step:5}
@korakot
korakot / draw.py
Last active March 28, 2025 11:38
Drawing on Google Colab
from IPython.display import HTML, Image
from google.colab.output import eval_js
from base64 import b64decode
canvas_html = """
<canvas width=%d height=%d></canvas>
<button>Finish</button>
<script>
var canvas = document.querySelector('canvas')
var ctx = canvas.getContext('2d')