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
%% Spectrogram takes the STFT of the signal | |
win = floor(Fs/32); | |
noverlap = floor(win/4); % 75% overlap | |
Nfft = Fs; | |
% P matrix contains the power spectral density of each segment of the STFT | |
[S,F,T,P] = spectrogram(data, win, noverlap, Nfft, Fs); | |
fh = figure(1); clf; | |
imagesc(T, F, real(S)); | |
colorbar; |
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 matplotlib | |
matplotlib.use('Agg') | |
import matplotlib.pyplot as plt | |
# marker [ '+' | ',' | '.' | '1' | '2' | '3' | '4' ] | |
# linestyle or ls [ '-' | '--' | '-.' | ':' | 'steps' | ...] | |
fig_idx = 0 | |
font_size = 10 |
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
#!/usr/bin/env python | |
###################################### | |
## | |
## Yi-Chao Chen @ UT Austin | |
## | |
## - Input | |
## | |
## - Output | |
## |
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
%% get_dtw_opt: function description | |
function [arg1, arg2] = get_XX_opt(opt) | |
arg1 = 1; | |
arg2 = 2; | |
if nargin < 1, return; end | |
opts = regexp(opt, ',', 'split'); | |
for this_opt = opts | |
eval([char(this_opt) ';']); | |
end |
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
data = textread(filename, '', 'commentstyle', 'shell', 'delimiter', ':'); |
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
reset | |
set terminal postscript eps enhanced 28 | |
set size 1.2,0.09 | |
set pointsize 0 | |
set border 0 | |
set noxtics; | |
set noytics; | |
set key Left above left reverse nobox horizontal spacing 1 samplen 3.5 width 2 |
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
clf; | |
fh = figure; | |
fontSize = 28; | |
%colors = {'r', 'b', [0 0.8 0], 'm', [1 0.85 0], [0 0 0.47], [0.45 0.17 0.48], 'k'}; | |
colors = {[228 26 28]/255, [55 126 184]/255, [77,175,74]/255, [152,78,163]/255, [255,127,0]/255, [255,255,51]/255, [166,86,40]/255, [247,129,191]/255, [153,153,153]/255}; | |
lines = {'-', '--', '-.', ':'}; | |
markers = {'+', 'o', '*', '.', 'x', 's', 'd', '^', '>', '<', 'p', 'h'}; | |
%% line |
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
reset | |
set terminal postscript eps enhanced color 28 | |
# set terminal postscript eps enhanced monochrome 28 | |
# set terminal png enhanced 28 size 800,600 | |
# set terminal jpeg enhanced font helvetica 28 | |
set size ratio 0.7 | |
data_dir = "DATA_DIR" | |
fig_dir = "FIG_DIR" | |
file_name = "FILE_NAME" |
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
http://www.wireshark.org/docs/dfref/i/ip.html | |
tshark -r trace.pcap -R "ip.src == 28.222.232.44 && ip.dst == 69.171.224.14" -T fields -E separator=/t -e frame.number -e frame.time_epoch -e ip.src -e tcp.srcport -e ip.dst -e tcp.dstport -e tcp.options.timestamp.tsval -e http.user_agent |
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
sed "s/XXX/$(echo ${replace} | sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/&/\\\&/g')/g" mother.file > output.file |
NewerOlder