Skip to content

Instantly share code, notes, and snippets.

View tano297's full-sized avatar
🔨
Breaking stuff

Andres Milioto tano297

🔨
Breaking stuff
View GitHub Profile
@tano297
tano297 / dimmer.py
Last active July 29, 2020 22:13
Dim image from one folder and put it in another, for each new image
#!/usr/bin/env python3
import numpy as np
import cv2
import time
import os
DIM = 0.5
ROOTDIR = "/home/tano/Dropbox/earth"
SAVEDIR = "/home/tano/Dropbox/earth/dimmed"
@tano297
tano297 / protonvpn-tray.py
Last active June 27, 2020 08:33
Creates a tray notification for connecting, reconnecting, and disconnecting using protonvpn-cli in Ubuntu. Also displays the status.
#!/usr/bin/python3
import os
import gi
import random
import yaml
import subprocess
import queue
from threading import Thread
from queue import Queue
gi.require_version('Gtk', '3.0')
#!/usr/bin/env python3
import requests
from lxml import html
import json
import shutil
import cv2
import numpy as np
# where to look for earthview
@tano297
tano297 / sshfs.sh
Last active June 12, 2023 11:26
Mount and unmount remotes with sshfs
# remote mount functions
remote-mount()
{
# Mount a remote ssh root directory in /media/$USER/remotes/[remote alias]
# This function requires 1 argument, which is the ssh alias you made for the
# remote in your .ssh/config.
# If the directory is not created, it will try to, but this part is probably only
# going to be called the first time for each remote, unless you change the alias.
# To unmount, see remote-unmount().
@tano297
tano297 / value_iteration_gridworld.py
Created December 17, 2018 17:55
value_iteration_gridworld.py
#!/usr/bin/env python3
import numpy as np
# define the grid size
size_h = 4
size_w = 4
# define the actions
actions = np.array(["up", "down", "left", "right"])
@tano297
tano297 / policy_iteration_gridworld_start_random_policy.py
Last active December 17, 2018 17:44
policy_iteration_gridworld_start_random_policy.py
#!/usr/bin/env python3
import numpy as np
# define the grid size
size_h = 4
size_w = 4
# define the actions
actions = np.array(["up", "down", "left", "right"])
#!/usr/bin/env python3
import numpy as np
# define the grid size
size_h = 4
size_w = 4
# define the actions
actions = ["up", "down", "left", "right"]
@tano297
tano297 / persons.py
Created April 25, 2018 12:16
coco extraction of persons
#!/usr/bin/python2
from pycocotools.coco import COCO
import skimage.io as io
import matplotlib.pyplot as plt
import os
import shutil
import numpy as np
import cv2
@tano297
tano297 / cityscapes_erf.pbtxt
Created December 13, 2017 16:36
cityscapes_erf
This file has been truncated, but you can view the full file.
node {
name: "x_pl"
op: "Placeholder"
attr {
key: "dtype"
value {
type: DT_FLOAT
}
}
attr {