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
Software Name as Headline | |
====== | |
**Software Name** is a software for things. Short description here. | |
#### Screenshot | |
![Screenshot software](http://url/screenshot-software.png "screenshot software") | |
## Download | |
* [Version X.Y](https://github.com/username/sw-name/archive/master.zip) | |
* Other Versions |
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
Script Name as Headline | |
====== | |
**Script Name** is a script for things. The usage is explained like this: | |
``` | |
$ ./script parameter1 .. parameterN | |
Output | |
$ | |
``` | |
## 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
sudo apt update && sudo apt upgrade | |
sudo apt install build-essential default-jdk libssl-dev exuberant-ctags ncurses-term fontconfig software-properties-common git curl lib32readline-dev sqlite3 libsqlite3-dev | |
sudo apt install postgresql postgresql-contrib memcached libmemcached-dev | |
sudo apt install zlib1g-dev libffi-dev libbz2-dev libreadline-dev |
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
celery -A proj worker -l INFO -P gevent -E |
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
os.environ.setdefault('FORKED_BY_MULTIPROCESSING', '1') |
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
# Define your functions | |
def print_message(): | |
print("I'm sorry, I did not understand your selection. Please enter the corresponding letter for your response.") | |
def get_drink_type(): | |
res = input('What type of drink would you like? \n[a] Brewed Coffee \n[b] Mocha \n[c] Latte \n> ') | |
if res == "a": | |
return "brewed coffee" | |
elif res == "b": | |
return "mocha" |
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
# regex for removing punctuation! | |
import re | |
# nltk preprocessing magic | |
import nltk | |
from nltk.tokenize import word_tokenize | |
from nltk.stem import PorterStemmer | |
from nltk.stem import WordNetLemmatizer | |
# grabbing a part of speech function: | |
from part_of_speech import get_part_of_speech |
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
looking_glass_text = """ | |
However, the egg only got larger and larger, and more and more human: when she had come within a few yards of it, she saw that it had eyes and a nose and mouth; and when she had come close to it, she saw clearly that it was HUMPTY DUMPTY himself. It cant be anybody else! she said to herself. Im as certain of it, as if his name were written all over his face. | |
It might have been written a hundred times, easily, on that enormous face. Humpty Dumpty was sitting with his legs crossed, like a Turk, on the top of a high wallsuch a narrow one that Alice quite wondered how he could keep his balanceand, as his eyes were steadily fixed in the opposite direction, and he didnt take the least notice of her, she thought he must be a stuffed figure after all. | |
And how exactly like an egg he is! she said aloud, standing with her hands ready to catch him, for she was every moment expecting him to fall. | |
Its very provoking, Humpty Dumpty said after a long silence, looking away from Alice as he spoke, |
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
import nltk, re | |
from nltk.tokenize import word_tokenize | |
# importing ngrams module from nltk | |
from nltk.util import ngrams | |
from collections import Counter | |
from looking_glass import looking_glass_full_text | |
cleaned = re.sub('\W+', ' ', looking_glass_full_text).lower() | |
tokenized = word_tokenize(cleaned) |
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
import nltk, re | |
from nltk.corpus import wordnet | |
from nltk.corpus import stopwords | |
from nltk.tokenize import word_tokenize | |
from nltk.stem import WordNetLemmatizer | |
from collections import Counter | |
stop_words = stopwords.words('english') | |
normalizer = WordNetLemmatizer() |
OlderNewer