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
ENCRYPTION_FILTER="echo \$(echo \"- secure: \")\$(travis encrypt \"\$FILE='\`cat $FILE\`'\" -r navya/navya.github.io)" | |
split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_\")"\")" |
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
% Generate impulse response of the system | |
c = 340; % Sound speed | |
fs = 44100; % Sampling frequency | |
source = [2 3 1]; % Source positions [x y z] (m) | |
receiver = [4.23 3 1; 2 0.77 1]; % Receiver positions [x y z] (m) | |
L = [5 4 1]; % Room dimensions | |
beta = [0.15 0.30 0.50]; % T60 - Reverberation Time | |
% Modified for non-integer? |
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
for i = 1:3 | |
tau(i) = gcc_phat(x{i}(1,:), x{i}(2,:)) | |
end | |
function tau = gcc_phat(sig1, sig2) | |
% Find FFT for the signals | |
fft1 = fft(sig1, fftSize(sig1)); | |
fft2 = fft(sig2, fftSize(sig2)); | |
% Find R(\Tau) | |
G12 = fft1.*conj(fft2); |
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 [lag, I] = mi(sig1, sig2, order, base) | |
% Estimate lag via Mutual Information criterion | |
% sig1: signal1 | |
% sig2: signal2 | |
% order: N order | |
% base: log base | |
start = 1; | |
finish = length(sig1) - order; |
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
* No Pred | |
towers | |
Cycles = 19385 | |
Insts = 9907 | |
multiply | |
Cycles = 64395 | |
Insts = 21098 |
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 [x,n] = impseq(n0,n1,n2) | |
% Generates x(n) = delta(n-n0); n1 <= n,n0 <= n2 | |
% ---------------------------------------------- | |
% [x,n] = impseq(n0,n1,n2) | |
% | |
if ((n0 < n1) | (n0 > n2) | (n1 > n2)) | |
error('arguments must satisfy n1 <= n0 <= n2') | |
end | |
n = [n1:n2]; | |
%x = [zeros(1,(n0-n1)), 1, zeros(1,(n2-n0))]; |
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
(dolist (mode '(magit-log-edit-mode | |
log-edit-mode | |
org-mode | |
text-mode | |
haml-mode | |
sass-mode | |
yaml-mode | |
haskell-mode | |
html-mode | |
nxml-mode |
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/zsh | |
eclient=$(which emacsclient) | |
emacs=$(which emacs) | |
vim=$(which vim) | |
name=${0:t} | |
if [[ $name == "emacs-gui" ]]; then | |
argclient=("-c" "-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
# unregister broken GHC packages. Run this a few times to resolve dependency rot in installed packages. | |
# ghc-pkg-clean -f cabal/dev/packages*.conf also works. | |
function ghc-pkg-clean() { | |
for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'` | |
do | |
echo unregistering $p; ghc-pkg $* unregister $p | |
done | |
} | |
# remove all installed GHC/cabal packages, leaving ~/.cabal binaries and docs in place. |
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
Config { font = "xft:Consolas-8" | |
, bgColor = "#121212" | |
, fgColor = "#AFAF87" | |
, position = BottomW L 96 | |
, lowerOnStart = True | |
, commands = [ Run DynNetwork ["-t", "<dev> <fc=#387BAB><icon=/home/rejuvyesh/.xmonad/icons/net_down_03.xbm/><rx>kB</fc> <fc=#005F87><icon=/home/rejuvyesh/.xmonad/icons/net_up_03.xbm/><tx>kB</fc>", "-M", "5"] 15 | |
, Run Date "%a %d-%m %H:%M:%S " "date" 10 | |
, Run BatteryP ["BAT0"] ["-t", "<fc=#D0CFD0><acstatus></fc><left>", "-S", "True", "-L", "30", "-H", "70", "-p", "3", "-l", "#D74083", "-n", "#FF9926", "-h", "#93FF19", "--", "-O", "+", "-o", "-", "-f", "BAT0/subsystem/ADP0/online" ] 600 | |
, Run StdinReader | |
, Run Memory ["-p", "2", "-c", "0", "-S", "True","-H", "80", "-h", "#D7005F", "-L", "50", "-l", "#87FF00", "-n", "#FF8700", "-t", "RAM: <usedratio>"] 50 |