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
// ==UserScript== | |
// @name Mark Read Creepypasta.com | |
// @namespace http://herbalcell.com | |
// @version 0.4 | |
// @description Mark stories as read on Creepypasta.com | |
// @match http://www.creepypasta.com/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js | |
// @require https://greasyfork.org/scripts/2199-waitforkeyelements/code/waitForKeyElements.js?version=6349 | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Hide videos seen on Youtube | |
// @namespace http://youtube.com | |
// @version 1.0 | |
// @description Hide videos seen on Youtube, on any page, by X'ing them | |
// @include https://www.youtube.com/* | |
// @exclude https://www.youtube.com/user/*/playlists | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js | |
// @require https://greasyfork.org/scripts/2199-waitforkeyelements/code/waitForKeyElements.js?version=6349 | |
// ==/UserScript== |
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
from urllib import urlencode | |
from urllib2 import urlopen | |
import re | |
import json | |
from pprint import pprint | |
from random import randint | |
from os import remove, path | |
from time import sleep | |
from glob import glob |
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 re | |
def longestDuplicateNonOverlappingSubstring(string, minimum_length_of_substring=4): | |
substrings = [] | |
# Create list of every substring | |
# ['b', 'ba', 'ban', 'bana', 'banan', 'banana', 'a', 'an', 'ana', ...] | |
for i in xrange(len(string)): | |
for j in xrange(i, len(string)): | |
sub = string[i:j+1] | |
substrings.append(sub) |