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
function skeleton | |
% Script to open editor with skeleton code structure | |
% Skeleton taken from | |
% http://www.cs.utah.edu/~germain/PPS/Topics/Matlab/function_design_pattern.html | |
content = sprintf(strcat('function return_value = name_of_function( parameters ) \n', ... | |
'%% Author: \n', ... | |
'%% Date: ', date, '\n', ... | |
'%% Partner: \n', ... | |
'%% Function : Name of Function \n', ... |
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
{ | |
"metadata": { | |
"name": "WishartMatrix" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
I hereby claim:
- I am sauravrt on github.
- I am sauravtuladhar (https://keybase.io/sauravtuladhar) on keybase.
- I have a public key ASAIDbaKegnTzngNHrRl4u_LAI4JG693wT9aItK8Pv6n1wo
To claim this, I am signing this object:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Script to find raspberry pi ip on your local network | |
sudo nmap -sP 192.168.1.0/24 | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}' |
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 struct | |
import numpy as np | |
if __name__ == '__main__': | |
''' | |
# Data format: "%1B(Hours)%1B(Minutes)%4F(Seconds)%4U(ChipTimeUS) | |
%4F(RawAccelX)%4F(RawAccelY)%4F(RawAccelZ)" | |
The header string is 108 bytes long + CRLF\r\n (2bytes) | |
Each valid data record is 22 bytes |
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
def plot_twosigma(pos, S, ax, color='g'): | |
"""Plot 2-sigma ellipse | |
Parameters | |
---------- | |
pos : tuple of length 2 | |
Center of the 2-sigma ellipse | |
S : numpy.ndarray of size 2x2 | |
Position covariance | |
ax : matplotlib.axes |