This file contains 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 | |
# | |
# Prints the compute capability of the first CUDA device installed | |
# on the system, or alternatively the device whose index is the | |
# first command-line argument | |
device_index=${1:-0} | |
timestamp=$(date +%s.%N) | |
gcc_binary=${CMAKE_CXX_COMPILER:-$(which c++)} | |
cuda_root=${CUDA_DIR:-/usr/local/cuda} |
This file contains 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
" Last modified 2017-11-30 | |
" Dorai Sitaram | |
" By default, Neovim warns you only of unsaved file buffers | |
" before you exit, not of unclosed terminal buffers, which will | |
" be summarily killed. Unintentionally killing a terminal buffer | |
" can be frustrating, not only because of killed processes (which | |
" could be restarted) but also for the lost scroll history. This | |
" plugin prevents that loss. |
This file contains 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 math | |
import cv2 | |
import numpy as np | |
def isRotationMatrix(R): | |
Rt = np.transpose(R) | |
shouldBeIdentity = np.dot(Rt, R) | |
I = np.identity(3, dtype=R.dtype) | |
n = np.linalg.norm(I - shouldBeIdentity) |