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
rm -r openspades_install | |
mkdir openspades_install | |
cd openspades_install | |
sudo apt-get install pkg-config libfltk1.3-dev libglew-dev libcurl3-openssl-dev libjpeg-dev libxinerama-dev libxft-dev libalut-dev | |
wget http://www.libsdl.org/release/SDL2-2.0.1.tar.gz | |
tar xvf SDL2-2.0.1.tar.gz | |
cd SDL2-2.0.1/ | |
./configure && make && sudo make install | |
cd .. | |
wget https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.0.tar.gz |
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/bash | |
mkdir openspades_install | |
cd openspades_install | |
sudo apt-get install pkg-config libfltk1.3-dev libglew-dev libcurl3-openssl-dev libjpeg-dev libxinerama-dev libxft-dev | |
wget http://www.libsdl.org/release/SDL2-2.0.1.tar.gz | |
tar xvf SDL2-2.0.1.tar.gz | |
cd SDL2-2.0.1/ | |
./configure && make && sudo make install | |
cd .. | |
wget https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.0.tar.gz |
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
nyxos@IdeaPad-Y500 ~/test $ bash install_openspades | |
[sudo] password for nyxos: | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
Note, selecting 'libcurl4-openssl-dev' instead of 'libcurl3-openssl-dev' | |
libglew-dev is already the newest version. | |
libjpeg-dev is already the newest version. | |
libxft-dev is already the newest version. | |
pkg-config is already the newest version. |
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
#/usr/bin/ruby | |
class DetectLanguage | |
def calc_wc txt, lang | |
wc=0 | |
txt.split(/\W+/).select{|ww|lang.include?(ww)}.map{|ww| | |
wc+=[(lang.size-lang.index(ww))/lang.size.to_f, 0.5].max | |
} | |
wc | |
end | |
def detect |