Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 numpy as np | |
| from scipy.linalg import expm | |
| def rot_euler(v, xyz): | |
| ''' Rotate vector v (or array of vectors) by the euler angles xyz ''' | |
| # https://stackoverflow.com/questions/6802577/python-rotation-of-3d-vector | |
| for theta, axis in zip(xyz, np.eye(3)): | |
| v = np.dot(np.array(v), expm(np.cross(np.eye(3), axis*-theta))) | |
| return v |
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
| # Stop all containers | |
| docker stop `docker ps -qa` | |
| # Remove all containers | |
| docker rm `docker ps -qa` | |
| # Remove all images | |
| docker rmi -f `docker images -qa ` | |
| # Remove all volumes |
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
| sudo apt install libresample1 | |
| wget http://mirrors.kernel.org/ubuntu/pool/universe/liba/libav/libavutil52_9.18-0ubuntu0.14.04.1_amd64.deb | |
| sudo dpkg -i libavutil52_9.18-0ubuntu0.14.04.1_amd64.deb | |
| wget http://mirrors.kernel.org/ubuntu/pool/universe/liba/libav/libswscale2_9.18-0ubuntu0.14.04.1_amd64.deb | |
| sudo dpkg -i libswscale2_9.18-0ubuntu0.14.04.1_amd64.deb | |
| wget https://www.dropbox.com/s/gg2i5wszrqkhzy8/clickshare_01.07.01-79_amd64.deb?dl=0# | |
| sudo dpkg -i clickshare_01.07.01-79_amd64.deb |
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
| # Example animations using matplotlib's FuncAnimation | |
| # Ken Hughes. 18 June 2016. | |
| # For more detail, see | |
| # https://brushingupscience.wordpress.com/2016/06/21/matplotlib-animations-the-easy-way/ | |
| # Examples include | |
| # - line plot | |
| # - pcolor plot | |
| # - scatter plot |
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
| /* | |
| * SimpleAdHocTracker.cpp | |
| * | |
| * Created on: Mar 15, 2015 | |
| * Author: roy_shilkrot | |
| * | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2015 Roy Shilkrot | |
| * |
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 numpy as np | |
| import cv2 | |
| import os | |
| # this two lines are for loading the videos. | |
| # in this case the video are named as: cut1.mp4, cut2.mp4, ..., cut15.mp4 | |
| videofiles = [n for n in os.listdir('.') if n[0]=='c' and n[-4:]=='.mp4'] | |
| videofiles = sorted(videofiles, key=lambda item: int( item.partition('.')[0][3:])) | |
| video_index = 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 zmq # Client | |
| sock = zmq.Context().socket(zmq.REQ) | |
| sock.connect("tcp://127.0.0.1:10000") | |
| sock.send('0') | |
| print(sock.recv()) # Prints "1" |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include "ros/ros.h" | |
| #include "std_msgs/MultiArrayLayout.h" | |
| #include "std_msgs/MultiArrayDimension.h" | |
| #include "std_msgs/Int32MultiArray.h" |