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 [ revs ] = deg2revs( deg ) | |
% @Brief: A function that converts a 1D array from degrees to revolutions | |
% @Param: deg -> 1D array of angles expressed in degrees | |
% @Return: revs -> 1D array that counts how many revolutions have been | |
% completed. Starts from 1 for future grouping. | |
% A revolution | |
d = diff(deg); | |
revs = ones(length(deg),1); |
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
ssh -v -N -D 8888 -oProxyCommand="ssh -W %h:%p userA@machineA" userB@machineB |
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
# @Brief: A function that takes a python list and returns a Dict of a summary of entries and thier number of occurrences | |
# @Param: input_list -> Any list of elements | |
# @Return: result -> A Dict containig as many keys as the unique elements of input_list | |
# The value for each key is the number of occurance of each unique element | |
def summary(input_list): | |
result=dict() | |
keys=list(set(input_list)) | |
for key in keys: | |
result[key]=input_list.count(key) |
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 unique(input_list): | |
result=list(set(input_list)) | |
return result |