Skip to content

Instantly share code, notes, and snippets.

View Davidnet's full-sized avatar
🦔

David Cardozo Davidnet

🦔
View GitHub Profile
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
@EXPLICIT
https://conda.anaconda.org/pkgw-forge/linux-64/atk-2.18.0-0.tar.bz2
https://repo.continuum.io/pkgs/free/linux-64/bleach-1.5.0-py36_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.6-1.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/cairo-1.14.6-4.tar.bz2
https://repo.continuum.io/pkgs/free/linux-64/cycler-0.10.0-py36_0.tar.bz2
https://repo.continuum.io/pkgs/free/linux-64/dbus-1.10.10-0.tar.bz2
@Davidnet
Davidnet / vim configure
Created September 14, 2017 06:03
vim configure
dgromov@dgromov-GL552VW:~/Documents/Programs/vim$ ./configure --with-features=huge --enable-python3interp --with-compiledby="David Cardozo <[email protected]>"
channels:
- loopbio # gtk2-feature, gtk2, ffmpeg-feature,
# opencv [gtk2, ffmpeg]
# cuda-feature, cudnn-feature, caffe [cuda, cudnn],
- conda-forge # everything else
- pkgw-forge # atk gdk2-pixbuf & deps
- defaults # in case anything is missing
dependencies:
- python=2.7
@Davidnet
Davidnet / davidppo.py
Created October 28, 2017 21:41
ppo python
# # David Tensor Force Agent
# ## Tensorforce's Policy Proximity Optimizator
# Contains an implementation of PPO as described (https://arxiv.org/abs/1707.06347).
from docopt import docopt
import os
from ppo.models import *
from ppo.trainer import Trainer
from unityagents import UnityEnvironment
#!/bin/bash
# Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
@Davidnet
Davidnet / install_latern.sh
Created November 20, 2017 18:40
Installation of latern
#!/bin/bash
curl -O https://raw.githubusercontent.com/getlantern/lantern-binaries/master/lantern-installer-64-bit.deb
sudo apt install ./lantern-installer-64-bit.deb
echo 'Installation complete! Bon Voyage!'
#!/usr/bin/env python
import numpy as np
import cv2, time, re, subprocess, os
from threading import Thread, Event
import json
NUM_LIDARS = 3
LATERAL_CUTOFF = 150
dir_path = os.path.dirname(os.path.realpath(__file__))
import tensorflow as tf
import cv2
import objectdetection
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
with tf.Session(config=config) as sess:
detector = objectdetection.ObjectDetection('ssd_mobilenet_v2_coco_2018_03_29/frozen_inference_graph.pb', session=sess)
cam = cv2.VideoCapture(0)
while True:
import numpy as np
import PIL.Image as Image
import PIL.ImageColor as ImageColor
import PIL.ImageDraw as ImageDraw
import PIL.ImageFont as ImageFont
import random
STANDARD_COLORS = [
'AliceBlue', 'Chartreuse', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque',
import numpy as np
import PIL.Image as Image
import PIL.ImageColor as ImageColor
import PIL.ImageDraw as ImageDraw
import PIL.ImageFont as ImageFont
STANDARD_COLORS = [
'AliceBlue', 'Chartreuse', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque',
'BlanchedAlmond', 'BlueViolet', 'BurlyWood', 'CadetBlue', 'AntiqueWhite',
'Chocolate', 'Coral', 'CornflowerBlue', 'Cornsilk', 'Crimson', 'Cyan',