Skip to content

Instantly share code, notes, and snippets.

View Bumbleblo's full-sized avatar

Felipe Borges Bumbleblo

  • VTEX
  • Gama - DF
  • 05:52 (UTC -03:00)
View GitHub Profile
@Bumbleblo
Bumbleblo / test_unique_encoding.py
Created February 1, 2021 08:55
Test if a alphabet have a unique encoding using the "test for unique decodability".
codewords = {'0', '01', '10', '1'}
def isprefix(string_1: str, string_2: str) -> bool:
return string_1 == string_2[:len(string_1)]
dangling_codewords = set()
for word1 in codewords:
for word2 in codewords:
@Bumbleblo
Bumbleblo / config.toml
Created October 21, 2020 14:54
Gitlab-runner docker executor with dind.
concurrent = 5
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "Docker runner"
url = "https://gitlab.com/"
token = "<token>"
@Bumbleblo
Bumbleblo / example.py
Last active April 4, 2020 06:06
MetaFlow: Simple flow example
from metaflow import FlowSpec, step
class Flow(FlowSpec):
"""
Flow Example
"""
@step
def start(self):
@Bumbleblo
Bumbleblo / requirements.txt
Created February 10, 2020 23:25
Requirements for tfx using docker image with python:3.7
absl-py==0.8.1
alembic==1.4.0
apache-airflow==1.10.9
apache-beam==2.19.0
apispec==1.3.3
argcomplete==1.11.1
astor==0.8.1
attrs==19.3.0
avro-python3==1.9.1
Babel==2.8.0
@Bumbleblo
Bumbleblo / bind_nas_volume
Created August 1, 2019 19:41
Bind NAS volume directly with docker-compose file
# volume section
volumes:
<volume name>:
driver: local
driver_opts:
type: "nfs"
o: "addr=<NAS ip>,nolock,soft,rw"
device: <path to directory>
@Bumbleblo
Bumbleblo / AlpineBuildEssential
Created August 14, 2018 06:46
Dockerfile with ubuntu build-essential package dependences in alpine
FROM alpine
RUN apk add --update \
dpkg-dev \
g++ \
gcc \
libc-dev \
make