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
# -*- coding: utf-8 -*- | |
from __future__ import division, print_function | |
import numpy as np | |
import copy | |
import matplotlib.pyplot as plt | |
import seaborn | |
def smooth(array, m=3): | |
_array = copy.deepcopy(array) |
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 | |
sudo apt-get install libxmu-dev libxmu6 | |
wget http://plib.sourceforge.net/dist/plib-1.8.5.tar.gz | |
tar xzf plib-1.8.5.tar.gz | |
cd plib-1.8.5 | |
./configure | |
sudo make install |
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 | |
cd cuda/include/ | |
sudo cp *.h /usr/local/cuda/include/ | |
cd ../lib64/ | |
sudo cp libcudnn* /usr/local/cuda/lib64/ | |
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn* |
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 cv2 | |
import imageio | |
cap = cv2.VideoCapture('stillalive.mov') | |
cap.set(1 ,62) | |
length = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) - 62 | |
print('length=%d' % length) | |
frames = [] | |
for i in range(1668): | |
ret, frame = cap.read() |
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
if [ "$SHELL" != "/usr/bin/zsh" ] | |
then | |
export SHELL="/usr/bin/zsh" | |
exec /usr/bin/zsh -l # -l: login shell again | |
fi |