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 logging import getLogger, ERROR, Formatter, Filter | |
from logging.handlers import WatchedFileHandler | |
from wakatime import app | |
from wakatime.background import wakaq | |
TASK_LOG_FORMAT = '[%(asctime)s] %(hostname)s %(levelname)s in %(task)s args=%(task_args)s kwargs=%(task_kwargs)s retry=%(task_retry)s: %(message)s' | |
class TaskFilter(Filter): |
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 io import BytesIO | |
from subprocess import PIPE, Popen | |
from typing import Optional | |
from PIL import Image, ImageFile, UnidentifiedImageError | |
from PIL.Image import DecompressionBombError | |
SUPPORTED_IMAGE_FORMATS = ["PNG", "JPEG", "JPEG2000"] | |
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
""" | |
wakatime.geocoding_utils | |
~~~~~~~~~~~~~~~~~~~~~~~~ | |
Utils to get location from ip address. | |
""" | |
import traceback | |
import flag # https://pypi.org/project/emoji-country-flag |
OlderNewer