Skip to content

Instantly share code, notes, and snippets.

View planetceres's full-sized avatar

Matt Shaffer planetceres

View GitHub Profile
@planetceres
planetceres / profile.py
Created October 31, 2018 18:46 — forked from thomwolf/profile.py
Profiling a Python module
import cProfile
import pstats
import my_slow_module
cProfile.run('my_slow_module.run()', 'restats')
p = pstats.Stats('restats')
p.sort_stats('cumulative').print_stats(30)
@planetceres
planetceres / cuda_installation_on_ubuntu_18.04
Created November 13, 2018 23:46 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
cuda 9.0 complete installation procedure for ubuntu 18.04 LTS
#!/bin/bash
## This gist contains step by step instructions to install cuda v9.0 and cudnn 7.2 in ubuntu 18.04
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
@planetceres
planetceres / update_firmware.sh
Created January 11, 2019 02:03
Update Realsense Firmware
#!/bin/bash
# Don't actually run this file as a script, just follow directions in the pdf which doesn't copy/paste
# https://www.intel.com/content/www/us/en/support/articles/000028171/emerging-technologies/intel-realsense-technology.html
# Copy/paste instructions https://github.com/IntelRealSense/librealsense/issues/2884#issuecomment-448049644
echo 'deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main'| sudo tee /etc/apt/sources.list.d/realsense-public.list
sudo apt-key adv--keyserverkeys.gnupg.net --recv-key 6F3EFCDE
sudo apt-get update
@planetceres
planetceres / .cudaactivate_9.0
Created January 16, 2019 17:53
CUDA Activation Script - 9.0
#!/bin/sh
ORIGINAL_PATH=$PATH
export PATH=/usr/local/cuda-9.0/bin:$PATH
ORIGINAL_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:/usr/local/cuda-9.0/extras/CUPTI/lib64:/lib/nccl/cuda-9:$LD_LIBRARY_PATH
@planetceres
planetceres / .cudadeactivate
Created January 16, 2019 17:53
CUDA Deactivate Script
#!/bin/sh
export PATH=$ORIGINAL_PATH
unset ORIGINAL_PATH
export LD_LIBRARY_PATH=$ORIGINAL_LD_LIBRARY_PATH
unset ORIGINAL_LD_LIBRARY_PATH
@planetceres
planetceres / gitcreate.sh
Created February 2, 2019 02:23 — forked from robwierzbowski/gitcreate.sh
A simple litte script. Create and push to a new github repo from the command line.
#!/bin/bash
# https://gist.github.com/robwierzbowski/5430952/
# Create and push to a new github repo from the command line.
# Grabs sensible defaults from the containing folder and `.gitconfig`.
# Refinements welcome.
# Gather constant vars
CURRENTDIR=${PWD##*/}
GITHUBUSER=$(git config github.user)
@planetceres
planetceres / install_pipenv.md
Created February 3, 2019 21:31
pipenv installation notes Ubuntu 18.04

Installation Notes for pipenv on Ubuntu 18.04

1. Add ~/.local/bin to PATH

pypa/pipenv#2122 (comment)

echo 'export PATH="${HOME}/.local/bin:$PATH"' >> ~/.bashrc
@planetceres
planetceres / git_create.sh
Last active February 4, 2019 16:12
Create new Github repo from command line
#!/bin/bash
git_create () {
# Based on https://gist.github.com/robwierzbowski/5430952/
# Get defaults
CURRENTDIR=${PWD##*/}
GITHUBUSER=$(git config github.user)
@planetceres
planetceres / Dockerfile
Created February 11, 2019 05:27 — forked from ruffsl/Dockerfile
Nvidia docker with rviz
FROM osrf/ros:melodic-desktop-bionic
# setup catkin workspace
ENV CATKIN_WS=/root/catkin_ws
RUN mkdir -p $CATKIN_WS/src
WORKDIR $CATKIN_WS/src
# clone source code
RUN git clone -b melodic-devel https://github.com/ros-visualization/rviz
@planetceres
planetceres / notepad.html
Created February 26, 2019 19:08 — forked from orrsella/notepad.html
Simple in-browser html notepad
data: text/html,
<html>
<head>
<title>Notepad</title>
<link rel="icon" type="image/png" href="http://icons.iconarchive.com/icons/hopstarter/sleek-xp-software/256/Notepad-icon.png">
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#text').bind('keyup', function() {
var content = $(this).val();