Skip to content

Instantly share code, notes, and snippets.

@yuriploc
yuriploc / YOLOv8m.livemd
Last active September 27, 2023 18:56
An Elixir LiveBook running YOLO on Elixir Nx and friends. Forked from "Hans Elias B. Josephsen - Object detection in Elixir with Axon @ warsaw.ex #10" talk

YOLOv8m

Mix.install(
  [
    {:axon_onnx, ">= 0.0.0"},
    {:exla, ">= 0.0.0"},
    {:evision, ">= 0.0.0"},
@yuriploc
yuriploc / Dockerfile
Last active March 30, 2023 12:23
TensorFlow, CUDA, cuDNN, OpenCV 4.5.5, Ubuntu 18.04
ARG CUDA_VERSION=11.2.2
ARG CUDNN_VERSION=8
ARG UBUNTU_VERSION=18.04
# https://hub.docker.com/r/nvidia/cuda
FROM nvidia/cuda:${CUDA_VERSION}-cudnn${CUDNN_VERSION}-devel-ubuntu${UBUNTU_VERSION}
ARG PYTHON_VERSION=3.8
ARG OPENCV_VERSION=4.5.5
@yuriploc
yuriploc / Ecto.Query.map_is_a_thing.md
Created November 12, 2021 18:03
Draft for a post on Elixir School?

%{ author: "Yuri Oliveira", author_link: "https://github.com/yuriploc", tags: , date: ~D[2021-11-12], title: "Writing a cleaner select query", excerpt: """ How learning more about the Ecto.Query module can help you write cleaner select queries. """ }

@yuriploc
yuriploc / are_eq.ex
Last active December 15, 2020 16:52
Check if two lists have the same members in any order. Considers duplicated values.
def are_eq?(left, right) when is_list(left) and is_list(right), do: same_members?(left, right)
defp same_members?([hd_left | t_left], [_ | _] = right) do
if Enum.any?(right, &(&1 == hd_left)) do
index = Enum.find_index(right, &(&1 == hd_left))
{_, next_right} = List.pop_at(right, index)
same_members?(t_left, next_right)
else
false

Keybase proof

I hereby claim:

  • I am yuriploc on github.
  • I am yuriploc (https://keybase.io/yuriploc) on keybase.
  • I have a public key ASBJd2TddgRiSq3hK3Ffny1lR62QHnXOgk-lwHnEISmQdQo

To claim this, I am signing this object:

@yuriploc
yuriploc / .gitconfig
Created October 15, 2019 20:37
My gitconfig aliases
[user]
email = my@email.sh
name = Юрий Оливейра
[alias]
lo = log --graph --format=oneline --abbrev-commit
loa = !git lo --all
lol = log --graph --format='%C(auto)%h%d %s%Creset %Cgreen(%cr)%Creset %C(cyan)<%an>%Creset'
lola = !git lol --all
co = checkout
br = branch
@yuriploc
yuriploc / get_files.sh
Created September 4, 2019 18:31
Download bucket files and save them in folders
len=${#buckets[@]}
i=0
while [ $len -gt $i ]
do
bucket=${buckets[$i]}
url=${urls[$i]}
echo $bucket
mkdir -p $bucket && cd $bucket
filenames=$(aws s3 ls s3://${buckets[$i]} | awk '{ print $4 }')
@yuriploc
yuriploc / docker-comm.md
Last active April 2, 2019 00:23
Docker nice commands

Copy from host to container

docker cp ~/path/local/file  <CONTAINER-ID>:/home/path/container/file

Run bash in container

docker exec -t -i  /bin/bash

Survey and classification of model transformation tools

Objective: To present 60 metamodel-based transformation tools and compare them using a qualitative framework.

Method: Classification by transformation approach and compare by 46 facets in 6 categories.

  • More than half (6 of 11) of the tools based on a relational transformation language have been discontinued.
  • Four out of nine tools targeting the QVT standard have been discontinued

General

@yuriploc
yuriploc / .editorconfig
Last active September 4, 2018 18:10
An editorconfig template
# https://editorconfig.org
# Yuri's default
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space