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
| function [pattern]=genpattern(stamp,d_max,pattern_size,density) | |
| density=density/prod(pattern_size); | |
| pattern=rand(pattern_size)<density; | |
| [y,x]=find(pattern); | |
| d=2*norm(0.5*size(stamp,1) , 0.5*size(stamp,2)); | |
| pattern=zeros(pattern_size); | |
| disp(numel(y)) | |
| for k=1:numel(y) | |
| B=rand()*imrotate(stamp,360*rand(),'bicubic','loose',0); | |
| B=double( rand()*imresize(B,d_max*(0.5+0.5*rand())/d,'bicubic') )/255; |
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
| #!/bin/bash | |
| filename=$1 | |
| echo $filename | |
| reportname=${filename%.*} | |
| grep -o '\\input{[a-z/.A-Z_0-9\-]*}' $filename \ | |
| | sed 's/\\input{\([a-z/.A-Z_0-9\-]*\)}/\1/g' > deps.txt | |
| grep -o '\\includegraphics\(\[.*\]\)*{[a-z/.A-Z_0-9\-]*}' $filename \ |
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
| #!/bin/bash | |
| sudo apt-get install apt-transport-https software-properties-common wget | |
| wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_9.2.1~kxstudio1_all.deb | |
| sudo dpkg -i kxstudio-repos_9.2.1~kxstudio1_all.deb | |
| sudo apt-get install bc | |
| DISTRIB_RELEASE=`lsb_release -sr` | |
| if [ $(echo "$DISTRIB_RELEASE >= 15.10" | bc) -eq 1 ]; then | |
| wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos-gcc5_9.2.1~kxstudio1_all.deb | |
| sudo dpkg -i kxstudio-repos-gcc5_9.2.1~kxstudio1_all.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
| #!/bin/bash | |
| OPTIND=1 | |
| rate=48000 | |
| period=64 | |
| cloop=0 | |
| show_help() | |
| { | |
| echo 'Starts the JACK(1) server using graphical choice of device. Options: | |
| -r sample_rate in Hz |
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
| function get_tempo(filename) | |
| [data,fs]=wavread(filename); | |
| beat_spectrum=abs(fft(data.^2)./length(data)); | |
| f=linspace(0,1,length(beat_spectrum ))*fs*60; | |
| index=find(f>=30 & f<=480); | |
| plot(f(index),beat_spectrum(index)); | |
| xlabel('BPM'); | |
| ylabel('Intensity'); | |
| xlim([30 480]); | |
| set(gca,'XTick',30:30:480); |
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
| #!/bin/bash | |
| bibstyle=$(grep '\\bibstyle' "${1}" | sed -r 's/(\\bibstyle\{)(.*)\}/\2/').xsl | |
| bibdata=$(grep '\\bibdata' "${1}" | sed -r 's/(\\bibdata\{)(.*)\}/\2/').xml | |
| bblfile="${1%.*}".bbl | |
| echo "Writing $bibdata to $bblfile" | |
| xsltproc "$bibstyle" "$bibdata" > "$bblfile" |
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
| %% | |
| %% This is file `mybibstyle.bst', | |
| %% generated with the docstrip utility. | |
| %% | |
| %% The original source files were: | |
| %% | |
| %% merlin.mbs (with options: `ay,har,harnm,vonx,nm-rev,ed-rev,jnrlst,nmlm,x2,m1,blkyear,dt-beg,yr-par,aymth,dtrev,note-yr,jxper,trtit-b,vnum-cm,volp-com,pgsep-s,jwdpg,pp-last,jwdvol,num-xser,ser-vol,ser-ed,add-pub,isbn,issn,url-doi,edparxc,bkedcap,blk-tit,pp,abr,ednx,ord,etal-xc,url,url-blk,nfss,') | |
| %% ---------------------------------------- | |
| %% *** CTH *** | |
| %% |
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
| // Compile with g++ -std=c++11 -O2 -DNDEBUG csvformat.cpp -o csvformat | |
| #include <cstdio> | |
| #include <vector> | |
| #include <string> | |
| #include <cstring> | |
| #include <cstdint> | |
| struct Option | |
| { |
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
| #ifdef __WAND__ | |
| target[name[gabish] type[application] platform[;GNU/Linux]] | |
| #endif | |
| #include <cstdio> | |
| #include <string> | |
| #include <vector> | |
| #include <map> | |
| #include <stack> | |
| #include <cmath> |
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
| #ifdef __WAND__ | |
| target[name[mindist_test] type[application]] | |
| #endif | |
| #include <herbs/array_fixedsize/array_fixedsize.h> | |
| #include <herbs/array/array.h> | |
| #include <herbs/pairsame/pairsame.h> | |
| #include <algorithm> | |
| #include <cstdio> |