This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Cuda and friends installation done right. | |
# Switch default Cuda version using symbolic link: cuda.switch 9.2 | |
# Install Cuda: cuda.install.cuda 10.0 | |
# Install cuDNN to CUDA_HOME: cuda.install.cudnn 7.5 | |
# Install NCCL to CUDA_HOME: cuda.install.nccl 2.4 | |
# Install Cuda, cuDNN and NCCL: cuda.install 10.0 7.5 2.4 | |
# Author: Hadrien Mary <[email protected]> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# install CUDA Toolkit v9.0 | |
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb) | |
CUDA_REPO_PKG="cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb" | |
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/${CUDA_REPO_PKG} | |
sudo dpkg -i ${CUDA_REPO_PKG} | |
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | |
sudo apt-get update | |
sudo apt-get -y install cuda-9-0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
dir_name = "directory_name" | |
cur_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
sys.path.append(os.path.join(cur_path, dir_name)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.pyimagesearch.com/2015/08/10/checking-your-opencv-version-using-python/ | |
def is_cv2(): | |
return check_opencv_version("2.") | |
def is_cv3(): | |
return check_opencv_version("3.") | |
def is_cv4(): | |
return check_opencv_version("4.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!#/bin/bash | |
set_python () { | |
DEFAULT_PYTHON_PATH=$(readlink /usr/bin/python) | |
DEFAULT_PYTHON=${DEFAULT_PYTHON_PATH##*-} | |
if [[ $1 = 2* ]]; then | |
PYTHON_SET_VERSION=2 | |
elif [[ $1 = 3* ]]; then | |
PYTHON_SET_VERSION=3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://medium.com/@IsaacJK/setting-up-a-ubuntu-18-04-1-lts-system-for-deep-learning-and-scientific-computing-fab19f7ca39d | |
sudo apt-get update | |
sudo apt-get upgrade | |
# Install core packages | |
sudo apt-get install vim csh flex gfortran libgfortran3 g++ \ | |
cmake xorg-dev patch zlib1g-dev libbz2-dev \ | |
libboost-all-dev openssh-server libcairo2 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Activate CUDA | |
cuda_activate () { | |
if [[ ":$PATH:" == *":/usr/local/cuda"* ]]; then | |
echo "CUDA already set in PATH. Deactivate before activating another version." | |
return 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git_create () { | |
# Based on https://gist.github.com/robwierzbowski/5430952/ | |
# Get defaults | |
CURRENTDIR=${PWD##*/} | |
GITHUBUSER=$(git config github.user) |