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
#!/usr/bin/env python | |
import argparse | |
import ast | |
import glob | |
import sys | |
class CheckStrings(ast.NodeVisitor): | |
filename = 'unknown' |
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
import tracemalloc | |
import pathlib | |
import random | |
import csv | |
import os | |
from datetime import datetime | |
import re | |
import linecache | |
import logging | |
import threading |
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
from django.db.backends.base.base import BaseDatabaseWrapper | |
from django.db import connections | |
import cx_Oracle | |
__all__ = ( | |
'get_etl_cursor', | |
) | |
class CursorProxy(object): |
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
""" | |
Test the linter | |
""" | |
def real_uninitialized_problem(x): | |
""" | |
Real problem of uninitialized variable | |
""" | |
return x + y |
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
from urllib.parse import urlsplit | |
from tornado import gen | |
from tornado.escape import url_escape | |
from tornado.httputil import url_concat | |
from traitlets import ( | |
Unicode, Integer, Dict, TraitError, List, Bool, Any, | |
Type, Set, Instance, Bytes, Float, | |
observe, default, |
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
{ | |
"referrerLinkText": null, | |
"isRootParentReference": false, | |
"sitemapLastMod": null, | |
"parentRootReference": null, | |
"referrerLinkTag": null, | |
"sitemapChangeFreq": null, | |
"crawlState": "REJECTED", | |
"isValid": false, | |
"contentType": "text/html", |
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
class RecentlyModifiedLocalTarget(luigi.LocalTarget): | |
""" | |
The local file must have been recently enough modified to "exist", driving luigi's DAG | |
""" | |
def __init__(self, *args, **kwargs): | |
""" | |
Extract an optional maxage parameter | |
""" | |
maxage = kwargs.pop('maxage', None) |
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
package gov.nih.nlm.occs.norconex.util; | |
import static com.norconex.collector.core.AbstractCollectorLauncher.ARG_CONFIG; | |
import static com.norconex.collector.core.AbstractCollectorLauncher.ARG_VARIABLES; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.StringReader; |
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
package gov.nih.nlm.occs.norconex; | |
import java.io.IOException; | |
import java.io.Reader; | |
import java.io.StringReader; | |
import java.io.StringWriter; | |
import java.io.Writer; | |
import java.util.ArrayList; | |
import java.util.Date; | |
import java.util.List; |