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 os | |
import fcntl | |
import errno | |
from multiprocessing.util import register_after_fork | |
def _reset_level_after_fork(lock): | |
lock._level = 0 | |
class _ShrdExclLock(object): |
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
function findPositions(text, query, boundary) { | |
let lastBoundary = 0; | |
let numMatched = 0; | |
let found = false; | |
let positions = []; | |
for (let pos = 0; pos < text.length; pos++) { | |
let c = text[pos]; | |
if (c == boundary) { |
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
#!/usr/bin/env python3 | |
import os | |
import subprocess | |
import sys | |
import re | |
import datetime | |
import shutil | |
import urllib.parse | |
import urllib.request |
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
function getException(page, url, typeMask, docDomain, sitekey) | |
{ | |
let thirdParty = !!docDomain && isThirdParty(url, docDomain); | |
let urlString = stringifyURL(url); | |
if (!docDomain) | |
docDomain = getDecodedHostname(url); | |
let filter = defaultMatcher.whitelist.matchesAny( | |
urlString, typeMask, docDomain, thirdParty, sitekey |
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 ast | |
import re | |
import tokenize | |
import sys | |
__version__ = '0.1' | |
DEPRECATED_APIS = { | |
('re', 'match'): 'A101 use re.search() instead re.match()', | |
('codecs', 'open'): 'A102 use io.open() instead codecs.open()', |
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 ast | |
import re | |
import tokenize | |
import sys | |
__version__ = '0.1' | |
DEPRECATED_APIS = { | |
('re', 'match'): 'A101 use re.search() instead re.match()', | |
('codecs', 'open'): 'A102 use io.open() instead codecs.open()', |
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
def check_redundant_parenthesis(logical_line, tokens): | |
if tokens[0][2][0] != tokens[-1][3][0]: | |
return | |
statement = None | |
level = 0 | |
for kind, token, start, end, _ in tokens: | |
if kind == tokenize.INDENT: | |
continue |
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 sys | |
import re | |
import os | |
try: | |
from StringIO import StringIO | |
except ImportError: | |
from io import StringIO | |
import flake8.engine |
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 tokenize | |
import sys | |
import re | |
re_string = re.compile(r'^([rub]*)([\'"]{1,3})(.*)\2$', re.S) | |
class Converter: | |
def __init__(self, filename): | |
self.filename = filename | |
self.out = [] |
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
/home/sebastian/src/adblockpluschrome/background.js | |
20:24 error 'require' is not defined no-undef | |
21:20 error 'require' is not defined no-undef | |
22:28 error 'require' is not defined no-undef | |
23:32 error 'require' is not defined no-undef | |
24:16 error 'require' is not defined no-undef | |
25:18 error 'require' is not defined no-undef | |
51:34 error Expected to return a value at the end of this function consistent-return | |
55:18 error 'ext' is not defined no-undef | |
63:18 error 'Promise' is not defined no-undef |
OlderNewer