new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Deno · Reference · all subjects

runtime api/jupyter

8 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Deno.jupyter.display() API

Deno.jupyter.display() is an async function that directly displays a MIME bundle object. It accepts a dictionary mapping MIME types to values and an options object with a `raw` property. Example: `await Deno.jupyter.display({"text/plain": "Hello, world!", "text/html": "<h1>Hello, world!</h1>", "text/markdown": "# Hello, world!"}, { raw: true });`

Symbol.for("Jupyter.display") method

Objects can implement a `[Symbol.for("Jupyter.display")]` method that returns a dictionary mapping MIME types to display values. Alternatively, use `Deno.jupyter.$display` instead of typing `Symbol.for("Jupyter.display")`.

Deno.jupyter.html tagged template

Deno.jupyter.html is a tagged template function that renders the provided string as HTML in the notebook. Example: `Deno.jupyter.html`<h1>Hello, world!</h1>`

Deno.jupyter.md tagged template

Deno.jupyter.md is a tagged template function that renders the provided string as a Markdown document in the notebook. Example: `Deno.jupyter.md`# Notebooks in TypeScript via Deno`

Deno.jupyter.svg tagged template

Deno.jupyter.svg is a tagged template function that renders the provided string as an SVG figure in the notebook. Example: `Deno.jupyter.svg`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /></svg>`

Deno.jupyter.image() API

Deno.jupyter.image() is a function that renders a JPG or PNG image in the notebook. It accepts either a filepath string or already-read bytes. Example: `Deno.jupyter.image("./cat.jpg");` or `const data = Deno.readFileSync("./dog.png"); Deno.jupyter.image(data);`

prompt and confirm Web APIs in Jupyter

The `prompt` and `confirm` Web APIs are available in the Deno Jupyter kernel to wait for user input in notebooks.

Deno.jupyter.broadcast() API

Deno.jupyter.broadcast() is an async function that publishes messages to the IO pub channel, allowing live updates during cell evaluation. It accepts a message type string (e.g., "display_data" or "update_display_data") and a message object containing data, metadata, and optional transient properties. Example: `await Deno.jupyter.broadcast("display_data", { data: { "text/html": "<b>Processing...</b>" }, metadata: {}, transient: { display_id: "progress" } });`

Give your agent this brain