Skip to content

Instantly share code, notes, and snippets.

View bgalvao's full-sized avatar
💻

Bernardo bgalvao

💻
View GitHub Profile
@bgalvao
bgalvao / learning_curriculum.md
Last active May 9, 2018 09:40
A checklist of things that I want to get dialed, learning machine learning wise.

Learning Checklist

Generic Neural Nets

  • Convolutional Neural Networks
  • Autoencoders
  • Recurrent Neural Nets (LSTM)

Domains

  • Symbiotic GP game playing agent with Autoencoder + RNN processing layer. #biggestscope
  • CyberSec dataset from Stratosphere Lab.
@bgalvao
bgalvao / Dockerfile
Last active August 31, 2018 17:43
Data Science env
FROM continuumio/miniconda3
RUN conda install -c conda-forge -y pandas scipy
RUN conda install -c conda-forge -y matplotlib seaborn
RUN conda install -c conda-forge -y bowtie-py tqdm
RUN conda install -c conda-forge -y scikit-learn jupyterlab
RUN conda install -c conda-forge -y ipywidgets plotly dash
RUN jupyter labextension install @jupyterlab/plotly-extension
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager
RUN conda install -c conda-forge -y dask-ml dask-distance
@bgalvao
bgalvao / frozen2lite.sh
Last active October 1, 2019 15:37
Convert a frozen graph to tflite on your local machine, with compilation of TOCO with the Bazel build system if need be. Proper directory structure is not clarified here, but you get the idea.
# installed bazel in a new conda env
# git clone https://github.com/tensorflow/tensorflow --depth 1
# move this file into the repo clone
# touch WORKSPACE inside the clone
# if [ ! -d tensorflow ]; then
# echo "tensorflow clone not yet here. cloning it..."
# git clone https://github.com/tensorflow/tensorflow --depth 1
# fi
@bgalvao
bgalvao / fetch_ih_quote.py
Last active September 30, 2019 20:26
Fetch random quote from indiehackers.com, as a kickstart to your terminal session (add it to your .bashrc or similar), as if you're loading they're page.
#!/usr/bin/python
import numpy as np
import requests
from colored import fg, bg, attr
# after probing, I found out that these are the possible values
# [0, 140[
url = "https://indie-hackers.firebaseio.com/loadingQuotes/{}.json".format(
np.random.choice(140)
)
@bgalvao
bgalvao / ssd_mobilenet_v2_oid_v4.config
Created October 21, 2019 18:19
until I make a pull request... this'll be a fix
# SSD with Mobilenet v2 configuration for OpenImages V4 Dataset.
# Users should configure the fine_tune_checkpoint field in the train config as
# well as the label_map_path and input_path fields in the train_input_reader and
# eval_input_reader. Search for "PATH_TO_BE_CONFIGURED" to find the fields that
# should be configured.
model {
ssd {
num_classes: 601
box_coder {
@bgalvao
bgalvao / Dockerfile
Last active October 26, 2019 11:30
tensorflow object detection api install
FROM tensorflow/tensorflow:latest-gpu-py3
# add some dependencies
RUN apt install protobuf-compiler git -y
RUN pip3 install Cython contextlib2 pillow lxml matplotlib jupyter jupyterlab
# add tf od api
RUN git clone https://github.com/tensorflow/models.git --depth 1
# add coco metrics
@bgalvao
bgalvao / install_docker.sh
Created November 13, 2019 16:20
nvidia docker
sudo apt-get remove docker docker-engine docker.io containerd runc -y
sudo apt update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common -y
@bgalvao
bgalvao / unfollow_all_linkedin.js
Created January 30, 2020 13:09
unfollow on social sites that dont have an unfollow all buttonn
follows = document.querySelectorAll("button.is-following")
follows.forEach(follow => follow.click())
window.location.reload(false)
@bgalvao
bgalvao / README.md
Last active February 17, 2020 11:17
Command line messaging
@bgalvao
bgalvao / .bash_aliases
Last active February 20, 2020 08:57
bashing scripts :: a collection of scripts to help automate some stuff on my linux home
alias ytdl-audio="youtube-dl --audio-quality 0 --embed-thumbnail --format m4a -i"
alias ytdl-video="youtube-dl --audio-quality 0 --embed-thumbnail --format bestvideo -i"
alias clock="tty-clock -s -c -C 3"