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
# credits source : https://gist.github.com/rueedlinger/76af36d04a0798a8e1f43ed16595bd97 | |
import sys | |
import os | |
import json | |
import argparse | |
from base64 import b64encode | |
PYTHON_MAJOR_VERSION = sys.version_info.major | |
DEFAULT_HOST = 'localhost' |
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
# When the cache is clear, pip is working again. | |
hash -r | |
1. sudo apt-get install python3 python-dev python3-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt-dev python3-pip | |
2. sudo pip3 install virtualenvwrapper | |
3. workon [try this command in terminal if it not works go to point 4] | |
4. source /usr/local/bin/virtualenvwrapper.sh (or) source ~/.local/bin/virtualenvwrapper.sh |
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
"""Print most frequent N-grams in given file. | |
Usage: python ngrams.py filename | |
Problem description: Build a tool which receives a corpus of text, | |
analyses it and reports the top 10 most frequent bigrams, trigrams, | |
four-grams (i.e. most frequently occurring two, three and four word | |
consecutive combinations). | |
NOTES |