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 |
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
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
/* | |
BSD 3-Clause License | |
Copyright (c) 2023 Alan Hamlett. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. |
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
# -*- coding: utf-8 -*- | |
""" | |
wakatime.admin | |
~~~~~~~~~~~~~~ | |
Flask-Admin. | |
""" | |
from .views import admin |
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
""" Example for Blog Post: | |
https://wakatime.com/blog/34-part-3-flask-api-decorators-and-helpers | |
""" | |
def oauth(required_scopes=[]): | |
def wrapper(func): | |
@wraps(func) | |
def inner(*args, **kwargs): | |
# don't check oauth tokens if user already logged in with session cookie |
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
# -*- coding: utf-8 -*- | |
""" | |
wakatime.oauth.provider | |
~~~~~~~~~~~~~~~~~~~~~~~ | |
OAuth 2.0 Provider. | |
""" | |
from datetime import datetime, timedelta |
This file has been truncated, but you can view the full file.
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
41b5f9baa448533dfd513f4ed1753990f59cc613:workingknowledge | |
deb7be5e7ca96c5b317b8a0ee13045a00e22bab5:rafaebiel | |
c528cf77d9cdb4ea14b43aa62cf55044e25d3b4e:kunsitint | |
0cbcf09868e2ec6b856eee76e7e6a9201cc60ed0:zxcasdQWE!@# | |
413b6507e26f3fbe388f4f5bc1f5599ff85dec1c:siapatakut | |
708c503230bb9a2079696386f891899a7fc15ba5:FM95jd01 | |
400945c2ea0fa0179adb232c882fd9d8dec90424:100Senh@ | |
e7880b9ae185f66fdfcc80d71e61154ce705f4ab:om2sanji | |
d819838e7f3a3d37fdc8dcb5c5cf9409d32bfbaf:bc89mod47a | |
12ba813567f950658c0151e9b4d2e3dcdccc8d25:fredandleo |
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
{ | |
"name": "wakatime", | |
"version": "1.0.0", | |
"private": true, | |
"ignore": [ | |
".jshintrc", | |
"**/.*", | |
"**/*.txt", | |
"test", | |
"tests", |
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
-e git://github.com/kennethreitz/inbox.py.git@551b4f44b144564504c687cebdb4c543cb8e9adf#egg=inbox | |
alembic==0.8.3 | |
amqp==1.4.9 | |
anyjson==0.3.3 | |
boto==2.39.0 | |
braintree==3.20.0 | |
cairosvg==1.0.19 | |
celery==3.1.20 |
NewerOlder