Skip to content

Instantly share code, notes, and snippets.

View bityob's full-sized avatar

Yonatan Bitton bityob

View GitHub Profile
@bityob
bityob / torch-multi.ipynb
Created December 25, 2023 23:47
Run torch with multiprocessing on Jupyter Notebook (aka IPython, Jupyter Lab etc.)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bityob
bityob / README.md
Last active February 28, 2024 22:16
Postgres - Aggregate multiple rows to 1 row with removing duplicates, null, empty fields on text, array and 2D array types

What

We want to have 1 row by id, but not just aggregating all values with simple array_agg, but removing null and empty fields, removing duplicates, and doing it for array field and 2D array field too.

Table before agg logic

image

Table after agg logic