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 timeit | |
setup = ''' | |
import difflib | |
import jellyfish | |
import Levenshtein | |
def difflib_result(first_str,second_str): | |
return difflib.SequenceMatcher(None, first_str, second_str).ratio() |
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
# tested on : python 3.7.0, spacy 2.0.12 | |
import urllib | |
import spacy | |
from collections import defaultdict | |
from pprint import pprint | |
nlp = spacy.load('en') | |
#fetch a long essay text | |
text_url = "https://pastebin.com/raw/M7RwNi5q" |
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
kill -9 `ps aux | awk '{print $2}' | shuf | awk '!(NR%2)'` |