Skip to content

Instantly share code, notes, and snippets.

View rbino's full-sized avatar

Riccardo Binetti rbino

View GitHub Profile
@rbino
rbino / beam_fosdem_2023_cfp.md
Created November 12, 2022 15:39
[FOSDEM 2023 - Call for Participation] Erlang, Elixir and Friends Devroom

Call for Participation

The Erlang, Elixir & Friends Devroom will take place in person at FOSDEM on Sunday, 5th February 2023.

We invite authors to submit original, high-quality work with sufficient background material to be clear to the BEAM community.

Topics

We welcome any talk proposals about BEAM-related projects. Topics of interest include, but are not limited to:

@rbino
rbino / ex_lttb_stream.exs
Created March 23, 2018 14:01
ExLTTB.Stream example
input_stream =
Stream.iterate(%{x: 0, y: :random.uniform() * 100}, fn %{x: x} ->
%{x: x + 1, y: :random.uniform() * 100}
end)
# Take 20 samples output samples after downsampling by 2.3
# The 20 output samples will correspond to ~ 20 * 2.3 input samples
output_samples =
ExLTTB.Stream.downsample(input_stream, 2.3)
|> Enum.take(20)
@rbino
rbino / complex_ex_lttb.exs
Last active March 23, 2018 13:46
Complex ExLTTB example
# Downsample a list of data of arbitrary shape
input_samples =
for x <- 1..1000 do
%{nested: %{timestamp: x},
data: :random.uniform() * 100,
untouched_other_key: :random.uniform() * 3
}
end
sample_to_x_fun = fn sample -> sample[:nested][:timestamp] end
@rbino
rbino / simple_ex_lttb.exs
Created March 23, 2018 13:11
Simple ExLTTB example
# Downsample a list of data in the default shape of %{x: x, y: y}
input_samples = for x <- 1..1000, do: %{x: x, y: :random.uniform() * 100}
# 50 output samples
output_samples = ExLTTB.downsample_to(input_samples, 50)

Keybase proof

I hereby claim:

  • I am rbino on github.
  • I am rbino (https://keybase.io/rbino) on keybase.
  • I have a public key whose fingerprint is 937F 416B 9ECB 6179 6FFE 62FC 74AE CC9F 5480 C3EB

To claim this, I am signing this object: