Skip to content

Instantly share code, notes, and snippets.

View hugobarauna's full-sized avatar

Hugo Baraúna hugobarauna

View GitHub Profile
@hugobarauna
hugobarauna / progress_demo.livemd
Last active September 18, 2024 16:42
How to display progress using Kino

How to display progress

Mix.install([
  {:kino, "~> 0.14"},
  {:kino_progress_bar, github: "acalejos/kino_progress_bar"}
])

Using a custom a spinner based on on Kino.HTML

@hugobarauna
hugobarauna / kino_spinner.livemd
Created July 10, 2024 12:47
Kino Spinner component

Kino Spinner

Mix.install([
  {:kino, "~> 0.13.2"}
])

Section

Kino.Proxy.listen(fn conn ->
Plug.Conn.send_resp(conn, 200, "hello world!")
end)
@hugobarauna
hugobarauna / kino_ui_widgets.livemd
Created June 13, 2024 18:03
Livebook app with Kino widgets demo

Kino UI widgets

Mix.install([
  {:kino, "~> 0.12.3"}
])
@hugobarauna
hugobarauna / process_labels_demo.livemd
Last active June 13, 2024 13:37
Process Labels demo

Process labels demo

Mix.install([
  {:kino, github: "livebook-dev/kino", ref: "hb-support-process-labels"}
])

Kino.Process.render_seq_trace

@hugobarauna
hugobarauna / nx_tensor_as_latex_table.livemd
Last active April 22, 2024 17:36
A custom Kino to visualize a 2-dimensional Nx tensor as a matrix inside Livebook

Custom Kino to visualize a 2-dimensional Nx tensor as a matrix

Mix.install(
  [
    {:nx, "~> 0.7.1"},
    {:kino, "~> 0.12.3"}
  ],
  consolidate_protocols: false
)
@hugobarauna
hugobarauna / kino_json_input_poc.livemd
Last active April 9, 2024 15:06
Kino JSON input with syntax highlight

Kino JSON Input Proof of Concept

Mix.install([
  {:kino, "~> 0.12.3"},
  {:jason, "~> 1.4"}
])
@hugobarauna
hugobarauna / genserver_state_inspector.livemd
Last active March 25, 2024 16:59
GenServer state inspector with Livebook

GenServer state inspector

Mix.install([
  {:kino, "~> 0.12.3"}
])

Section

@hugobarauna
hugobarauna / kino_benchee_example.livemd
Created February 15, 2024 18:04
Benchmark example using (future) kino_benchee

Benchmark using (future) kino_benchee

Mix.install(
  [
    {:explorer, "~> 0.8.0"},
    # {:kino_benchee, github: "livebook-dev/kino_benchee"},
    {:kino, "~> 0.12.3"},
    {:benchee, "~> 1.3"},
    {:kino_vega_lite, "~> 0.1.11"}
@hugobarauna
hugobarauna / kino_spinner.livemd
Created February 1, 2024 14:14
Livebook Kino Spinner component

Kino Spinner component

Mix.install([
  {:kino, "~> 0.12.3"}
])

Section