Skip to content

Instantly share code, notes, and snippets.

View daveselinger's full-sized avatar

David Selinger daveselinger

View GitHub Profile
@daveselinger
daveselinger / servo_pwm.py
Last active January 24, 2020 20:50
A simple set of interfaces to control various servos using RPi.GPIO with preset settings for a couple popular servos
#!/usr/bin/python
import RPi.GPIO as GPIO
import time
def setup():
GPIO.setmode(GPIO.BCM)
GPIO.setup(26, GPIO.OUT)
class ServoControl:
@daveselinger
daveselinger / DeepLearning_IntelHD500
Last active September 6, 2017 23:53
Installing OpenCL, OpenVX, and hopefully theano on Intel HD500 with J3355 Celeron
# FIRST Install Ubuntu 16.04.3 (Installed desktop version)
sudo apt purge -y libreoffice*
sudo apt update
sudo apt upgrade
# NEXT Download the Ubuntu prerequisites (listed at the bottom here: https://software.intel.com/en-us/cvsdk-quickstartguide-installing-intel-computer-vision-sdk)
sudo apt install -y libpng12-dev libcairo2-dev libpango1.0-dev libglib2.0-dev libgtk2.0-dev libgstreamer0.10-dev libgstreamer1.0-dev libswscale-dev libavcodec-dev libavformat-dev
# NEXT Install OpenCL from the Intel script: https://software.intel.com/en-us/articles/sdk-for-opencl-gsg
cd ~/Downloads
@daveselinger
daveselinger / rocm_install_script_16_04
Last active July 19, 2022 14:37
Install ROCM and hipCaffe on Ubuntu 16.04
# https://rocm.github.io/ROCmHipCaffeQuickstart.html
# But fixed :)
wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
sudo sh -c 'echo deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main > /etc/apt/sources.list.d/rocm.list'
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update
sudo apt upgrade
sudo apt install mesa-vdpau-drivers
@daveselinger
daveselinger / ubuntu_16_amd_rocm_theano
Last active March 7, 2019 11:50
Ubuntu 16.04 with proprietary AMD driver for OpenCL on Theano.
## Shout out to jarutis here https://gist.github.com/jarutis/ff28bca8cfb9ce0c8b1a
## install Catalyst proprietary
## sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.BAK
sudo apt update
sudo apt dist-upgrade
# on a clean install not needed but could be helpful
sudo apt-get remove --purge fglrx*
@daveselinger
daveselinger / ubuntu_16_amd_mesa_theano
Last active April 27, 2018 00:23
Ubuntu 16.04 AMD + OpenCL + Theano + Keras from scratch (IN PROGRESS)
## Shout out to jarutis here https://gist.github.com/jarutis/ff28bca8cfb9ce0c8b1a
## install Catalyst proprietary
## sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.BAK
# on a clean install not needed but could be helpful
sudo apt-get remove --purge fglrx*
#
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update