ExZarr.Gallery.SampleData (ExZarr v1.1.0)

View Source

Deterministic sample data generators used by the Livebook tutorials.

Summary

Functions

Creates a rows x cols matrix (flat list) with a simple pattern.

Returns n pseudo-random floats in [0,1) with a stable seed.

Builds a tiny corpus for embedding demos (no network calls).

Functions

matrix(rows, cols)

@spec matrix(non_neg_integer(), non_neg_integer()) :: [number()]

Creates a rows x cols matrix (flat list) with a simple pattern.

Value at (r, c) is: r * 1000 + c.

rand_floats(n, seed \\ 42)

@spec rand_floats(pos_integer(), integer()) :: [float()]

Returns n pseudo-random floats in [0,1) with a stable seed.

tiny_corpus()

@spec tiny_corpus() :: [{String.t(), String.t()}]

Builds a tiny corpus for embedding demos (no network calls).