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
sudo apt update && sudo apt upgrade -y | |
sudo add-apt-repository ppa:deadsnakes/ppa | |
sudo apt update | |
sudo apt install -y ca-certificates curl gnupg lsb-release \ | |
software-properties-common apt-transport-https \ | |
wget git chromium-browser python3.8 python3-pip |
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
cat << 'EOF' > ngram.sh | |
#Helper function to count ngrams | |
function soniq(){ | |
sort | uniq -c | sort -nr | |
} | |
#Usage: cat file.txt | ngram 3 | soniq | head -20 | |
function ngram(){ |
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
sudo apt-get install build-essential checkinstall | |
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev | |
cd /usr/src | |
sudo wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz | |
sudo tar xzf Python-2.7.12.tgz | |
cd Python-2.7.12 | |
sudo ./configure |