This file contains hidden or 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
#*-*encoding: utf-8*-* | |
import re | |
PATTERN = re.compile('^(http[s]?|ftp):\/?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$') | |
class Search(object): | |
"""docstring for ClassName""" | |
def __init__(self): | |
self.list_of_links = self.get_links() |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
from difflib import SequenceMatcher | |
def f1(string_list): | |
d = {} | |
for s in string_list: | |
d[s] = score(s, string_list) | |
return d | |
def score(string, string_list): |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import os, sys, re | |
lib_path = os.path.realpath(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', 'lib')) | |
if lib_path not in sys.path: | |
sys.path[0:0] = [lib_path] | |
# Main | |
import json | |
import random |
NewerOlder