id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8,700 | __init__.py | rembo10_headphones/lib/mako/__init__.py | # mako/__init__.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
__version__ = "1.1.6"
| 242 | Python | .py | 6 | 39 | 74 | 0.74359 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,701 | codegen.py | rembo10_headphones/lib/mako/codegen.py | # mako/codegen.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""provides functionality for rendering a parsetree constructing into module
source code."""
import j... | 47,892 | Python | .py | 1,141 | 29.138475 | 79 | 0.547709 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,702 | _ast_util.py | rembo10_headphones/lib/mako/_ast_util.py | # mako/_ast_util.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
ast
~~~
This is a stripped down version of Armin Ronacher's ast module.
:copyr... | 20,414 | Python | .py | 606 | 24.280528 | 76 | 0.558331 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,703 | compat.py | rembo10_headphones/lib/mako/compat.py | # mako/compat.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import collections
import inspect
import sys
py3k = sys.version_info >= (3, 0)
py2k = sys.version_info... | 4,295 | Python | .py | 129 | 27.271318 | 78 | 0.628946 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,704 | exceptions.py | rembo10_headphones/lib/mako/exceptions.py | # mako/exceptions.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""exception classes"""
import sys
import traceback
from mako import compat
from mako import util... | 13,110 | Python | .py | 354 | 26.889831 | 79 | 0.577287 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,705 | lookup.py | rembo10_headphones/lib/mako/lookup.py | # mako/lookup.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import os
import posixpath
import re
import stat
from mako import exceptions
from mako import util
fro... | 12,718 | Python | .py | 310 | 30.964516 | 78 | 0.606593 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,706 | cmd.py | rembo10_headphones/lib/mako/cmd.py | # mako/cmd.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from argparse import ArgumentParser
import io
from os.path import dirname
from os.path import isfile
import... | 2,859 | Python | .py | 89 | 24.494382 | 74 | 0.611393 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,707 | turbogears.py | rembo10_headphones/lib/mako/ext/turbogears.py | # ext/turbogears.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from mako import compat
from mako.lookup import TemplateLookup
from mako.template import Template
... | 2,165 | Python | .py | 49 | 35.428571 | 79 | 0.634981 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,708 | pygmentplugin.py | rembo10_headphones/lib/mako/ext/pygmentplugin.py | # ext/pygmentplugin.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from pygments import highlight
from pygments.formatters.html import HtmlFormatter
from pygments.l... | 4,951 | Python | .py | 136 | 26.992647 | 79 | 0.526283 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,709 | linguaplugin.py | rembo10_headphones/lib/mako/ext/linguaplugin.py | # ext/linguaplugin.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import io
from lingua.extractors import Extractor
from lingua.extractors import get_extractor
fro... | 2,161 | Python | .py | 56 | 28 | 75 | 0.574905 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,710 | autohandler.py | rembo10_headphones/lib/mako/ext/autohandler.py | # ext/autohandler.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""adds autohandler functionality to Mako templates.
requires that the TemplateLookup class is use... | 1,885 | Python | .py | 55 | 27.181818 | 78 | 0.629752 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,711 | babelplugin.py | rembo10_headphones/lib/mako/ext/babelplugin.py | # ext/babelplugin.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""gettext message extraction via Babel: http://babel.edgewall.org/"""
from babel.messages.extract ... | 2,138 | Python | .py | 49 | 34.979592 | 78 | 0.650962 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,712 | preprocessors.py | rembo10_headphones/lib/mako/ext/preprocessors.py | # ext/preprocessors.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""preprocessing functions, used with the 'preprocessor'
argument on Template, TemplateLookup"""
... | 576 | Python | .py | 14 | 38.285714 | 74 | 0.739209 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,713 | beaker_cache.py | rembo10_headphones/lib/mako/ext/beaker_cache.py | # ext/beaker_cache.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Provide a :class:`.CacheImpl` for the Beaker caching system."""
from mako import exceptions
fr... | 2,599 | Python | .py | 64 | 32.703125 | 79 | 0.617799 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,714 | extract.py | rembo10_headphones/lib/mako/ext/extract.py | # ext/extract.py
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import re
from mako import compat
from mako import lexer
from mako import parsetree
class MessageExt... | 4,616 | Python | .py | 109 | 28.724771 | 78 | 0.558228 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,715 | _collections.py | rembo10_headphones/lib/urllib3/_collections.py | from __future__ import absolute_import
try:
from collections.abc import Mapping, MutableMapping
except ImportError:
from collections import Mapping, MutableMapping
try:
from threading import RLock
except ImportError: # Platform-specific: No threads available
class RLock:
def __enter__(self):
... | 10,811 | Python | .py | 271 | 30.354244 | 86 | 0.594424 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,716 | _version.py | rembo10_headphones/lib/urllib3/_version.py | # This file is protected via CODEOWNERS
__version__ = "1.26.8"
| 63 | Python | .py | 2 | 30.5 | 39 | 0.704918 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,717 | response.py | rembo10_headphones/lib/urllib3/response.py | from __future__ import absolute_import
import io
import logging
import zlib
from contextlib import contextmanager
from socket import error as SocketError
from socket import timeout as SocketTimeout
try:
import brotli
except ImportError:
brotli = None
from ._collections import HTTPHeaderDict
from .connection ... | 28,203 | Python | .py | 692 | 29.297688 | 110 | 0.576291 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,718 | poolmanager.py | rembo10_headphones/lib/urllib3/poolmanager.py | from __future__ import absolute_import
import collections
import functools
import logging
from ._collections import RecentlyUsedContainer
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, port_by_scheme
from .exceptions import (
LocationValueError,
MaxRetryError,
ProxySchemeUnknown,
... | 19,763 | Python | .py | 434 | 37.085253 | 100 | 0.644146 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,719 | request.py | rembo10_headphones/lib/urllib3/request.py | from __future__ import absolute_import
from .filepost import encode_multipart_formdata
from .packages.six.moves.urllib.parse import urlencode
__all__ = ["RequestMethods"]
class RequestMethods(object):
"""
Convenience mixin for classes who implement a :meth:`urlopen` method, such
as :class:`urllib3.HTTPC... | 5,985 | Python | .py | 135 | 34.377778 | 92 | 0.617885 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,720 | __init__.py | rembo10_headphones/lib/urllib3/__init__.py | """
Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more
"""
from __future__ import absolute_import
# Set default logging handler to avoid "No handler found" warnings.
import logging
import warnings
from logging import NullHandler
from . import exceptions
from ._version ... | 2,763 | Python | .py | 71 | 35.915493 | 99 | 0.761016 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,721 | exceptions.py | rembo10_headphones/lib/urllib3/exceptions.py | from __future__ import absolute_import
from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
# Base Exceptions
class HTTPError(Exception):
"""Base exception used by this module."""
pass
class HTTPWarning(Warning):
"""Base warning used by this module."""
pass
clas... | 8,217 | Python | .py | 193 | 36.528497 | 88 | 0.697872 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,722 | connectionpool.py | rembo10_headphones/lib/urllib3/connectionpool.py | from __future__ import absolute_import
import errno
import logging
import re
import socket
import sys
import warnings
from socket import error as SocketError
from socket import timeout as SocketTimeout
from .connection import (
BaseSSLError,
BrokenPipeError,
DummyConnection,
HTTPConnection,
HTTPEx... | 39,013 | Python | .py | 931 | 30.856069 | 106 | 0.594539 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,723 | connection.py | rembo10_headphones/lib/urllib3/connection.py | from __future__ import absolute_import
import datetime
import logging
import os
import re
import socket
import warnings
from socket import error as SocketError
from socket import timeout as SocketTimeout
from .packages import six
from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection
from .pack... | 20,076 | Python | .py | 473 | 32.515856 | 101 | 0.613831 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,724 | fields.py | rembo10_headphones/lib/urllib3/fields.py | from __future__ import absolute_import
import email.utils
import mimetypes
import re
from .packages import six
def guess_content_type(filename, default="application/octet-stream"):
"""
Guess the "Content-Type" of a file.
:param filename:
The filename to guess the "Content-Type" of using :mod:`m... | 8,579 | Python | .py | 217 | 31.193548 | 88 | 0.622878 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,725 | filepost.py | rembo10_headphones/lib/urllib3/filepost.py | from __future__ import absolute_import
import binascii
import codecs
import os
from io import BytesIO
from .fields import RequestField
from .packages import six
from .packages.six import b
writer = codecs.lookup("utf-8")[3]
def choose_boundary():
"""
Our embarrassingly-simple replacement for mimetools.choo... | 2,440 | Python | .py | 70 | 28.657143 | 85 | 0.657985 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,726 | six.py | rembo10_headphones/lib/urllib3/packages/six.py | # Copyright (c) 2010-2020 Benjamin Peterson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publi... | 34,666 | Python | .py | 858 | 33.679487 | 87 | 0.642502 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,727 | makefile.py | rembo10_headphones/lib/urllib3/packages/backports/makefile.py | # -*- coding: utf-8 -*-
"""
backports.makefile
~~~~~~~~~~~~~~~~~~
Backports the Python 3 ``socket.makefile`` method for use with anything that
wants to create a "fake" socket object.
"""
import io
from socket import SocketIO
def backport_makefile(
self, mode="r", buffering=None, encoding=None, errors=None, newli... | 1,417 | Python | .py | 48 | 24.208333 | 76 | 0.628111 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,728 | appengine.py | rembo10_headphones/lib/urllib3/contrib/appengine.py | """
This module provides a pool manager that uses Google App Engine's
`URLFetch Service <https://cloud.google.com/appengine/docs/python/urlfetch>`_.
Example usage::
from urllib3 import PoolManager
from urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox
if is_appengine_sandbox():
... | 11,010 | Python | .py | 258 | 32.20155 | 88 | 0.630236 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,729 | securetransport.py | rembo10_headphones/lib/urllib3/contrib/securetransport.py | """
SecureTranport support for urllib3 via ctypes.
This makes platform-native TLS available to urllib3 users on macOS without the
use of a compiler. This is an important feature because the Python Package
Index is moving to become a TLSv1.2-or-higher server, and the default OpenSSL
that ships with macOS is not capable... | 34,417 | Python | .py | 780 | 35.234615 | 86 | 0.652276 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,730 | pyopenssl.py | rembo10_headphones/lib/urllib3/contrib/pyopenssl.py | """
TLS with SNI_-support for Python 2. Follow these instructions if you would
like to verify TLS certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.
This needs the following packages installed:
* `pyOpenSSL`_ (teste... | 16,874 | Python | .py | 407 | 33.727273 | 88 | 0.659781 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,731 | socks.py | rembo10_headphones/lib/urllib3/contrib/socks.py | # -*- coding: utf-8 -*-
"""
This module contains provisional support for SOCKS proxies from within
urllib3. This module supports SOCKS4, SOCKS4A (an extension of SOCKS4), and
SOCKS5. To enable its functionality, either install PySocks or install this
module with the ``socks`` extra.
The SOCKS implementation supports t... | 7,097 | Python | .py | 174 | 31.954023 | 85 | 0.632902 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,732 | ntlmpool.py | rembo10_headphones/lib/urllib3/contrib/ntlmpool.py | """
NTLM authenticating pool, contributed by erikcederstran
Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
"""
from __future__ import absolute_import
import warnings
from logging import getLogger
from ntlm import ntlm
from .. import HTTPSConnectionPool
from ..packages.six.moves.http_client imp... | 4,538 | Python | .py | 111 | 32.468468 | 88 | 0.623185 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,733 | _appengine_environ.py | rembo10_headphones/lib/urllib3/contrib/_appengine_environ.py | """
This module provides means to detect the App Engine environment.
"""
import os
def is_appengine():
return is_local_appengine() or is_prod_appengine()
def is_appengine_sandbox():
"""Reports if the app is running in the first generation sandbox.
The second generation runtimes are technically still i... | 957 | Python | .py | 24 | 35.541667 | 78 | 0.717698 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,734 | low_level.py | rembo10_headphones/lib/urllib3/contrib/_securetransport/low_level.py | """
Low-level helpers for the SecureTransport bindings.
These are Python functions that are not directly related to the high-level APIs
but are necessary to get them to work. They include a whole bunch of low-level
CoreFoundation messing about and memory management. The concerns in this module
are almost entirely abou... | 13,922 | Python | .py | 336 | 34.300595 | 88 | 0.678669 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,735 | bindings.py | rembo10_headphones/lib/urllib3/contrib/_securetransport/bindings.py | """
This module uses ctypes to bind a whole bunch of functions and constants from
SecureTransport. The goal here is to provide the low-level API to
SecureTransport. These are essentially the C-level functions and constants, and
they're pretty gross to work with.
This code is a bastardised version of the code found in ... | 17,632 | Python | .py | 423 | 36.34279 | 96 | 0.757611 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,736 | ssltransport.py | rembo10_headphones/lib/urllib3/util/ssltransport.py | import io
import socket
import ssl
from ..exceptions import ProxySchemeUnsupported
from ..packages import six
SSL_BLOCKSIZE = 16384
class SSLTransport:
"""
The SSLTransport wraps an existing socket and establishes an SSL connection.
Contrary to Python's implementation of SSLSocket, it allows you to cha... | 6,895 | Python | .py | 180 | 28.188889 | 86 | 0.591399 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,737 | queue.py | rembo10_headphones/lib/urllib3/util/queue.py | import collections
from ..packages import six
from ..packages.six.moves import queue
if six.PY2:
# Queue is imported for side effects on MS Windows. See issue #229.
import Queue as _unused_module_Queue # noqa: F401
class LifoQueue(queue.Queue):
def _init(self, _):
self.queue = collections.deque... | 498 | Python | .py | 15 | 28 | 71 | 0.678571 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,738 | proxy.py | rembo10_headphones/lib/urllib3/util/proxy.py | from .ssl_ import create_urllib3_context, resolve_cert_reqs, resolve_ssl_version
def connection_requires_http_tunnel(
proxy_url=None, proxy_config=None, destination_scheme=None
):
"""
Returns True if the connection requires an HTTP CONNECT through the proxy.
:param URL proxy_url:
URL of the p... | 1,605 | Python | .py | 47 | 28 | 80 | 0.675065 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,739 | response.py | rembo10_headphones/lib/urllib3/util/response.py | from __future__ import absolute_import
from email.errors import MultipartInvariantViolationDefect, StartBoundaryNotFoundDefect
from ..exceptions import HeaderParsingError
from ..packages.six.moves import http_client as httplib
def is_fp_closed(obj):
"""
Checks whether a given file-like object is closed.
... | 3,510 | Python | .py | 84 | 34.416667 | 88 | 0.682633 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,740 | wait.py | rembo10_headphones/lib/urllib3/util/wait.py | import errno
import select
import sys
from functools import partial
try:
from time import monotonic
except ImportError:
from time import time as monotonic
__all__ = ["NoWayToWaitForSocketError", "wait_for_read", "wait_for_write"]
class NoWayToWaitForSocketError(Exception):
pass
# How should we wait on... | 5,404 | Python | .py | 127 | 36.244094 | 81 | 0.674157 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,741 | url.py | rembo10_headphones/lib/urllib3/util/url.py | from __future__ import absolute_import
import re
from collections import namedtuple
from ..exceptions import LocationParseError
from ..packages import six
url_attrs = ["scheme", "auth", "host", "port", "path", "query", "fragment"]
# We only want to normalize urls with an HTTP(S) scheme.
# urllib3 infers URLs withou... | 14,030 | Python | .py | 354 | 31.768362 | 88 | 0.560671 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,742 | request.py | rembo10_headphones/lib/urllib3/util/request.py | from __future__ import absolute_import
from base64 import b64encode
from ..exceptions import UnrewindableBodyError
from ..packages.six import b, integer_types
# Pass as a value within ``headers`` to skip
# emitting some HTTP headers that are added automatically.
# The only headers that are supported are ``Accept-Enc... | 4,123 | Python | .py | 115 | 28.904348 | 86 | 0.640201 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,743 | ssl_.py | rembo10_headphones/lib/urllib3/util/ssl_.py | from __future__ import absolute_import
import hmac
import os
import sys
import warnings
from binascii import hexlify, unhexlify
from hashlib import md5, sha1, sha256
from ..exceptions import (
InsecurePlatformWarning,
ProxySchemeUnsupported,
SNIMissingWarning,
SSLError,
)
from ..packages import six
fr... | 17,165 | Python | .py | 411 | 34.671533 | 87 | 0.673125 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,744 | __init__.py | rembo10_headphones/lib/urllib3/util/__init__.py | from __future__ import absolute_import
# For backwards compatibility, provide imports that used to be here.
from .connection import is_connection_dropped
from .request import SKIP_HEADER, SKIPPABLE_HEADERS, make_headers
from .response import is_fp_closed
from .retry import Retry
from .ssl_ import (
ALPN_PROTOCOLS,... | 1,155 | Python | .py | 47 | 20.638298 | 68 | 0.68264 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,745 | retry.py | rembo10_headphones/lib/urllib3/util/retry.py | from __future__ import absolute_import
import email
import logging
import re
import time
import warnings
from collections import namedtuple
from itertools import takewhile
from ..exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ProtocolError,
ProxyError,
ReadTimeoutError,... | 22,001 | Python | .py | 498 | 34.194779 | 94 | 0.626538 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,746 | ssl_match_hostname.py | rembo10_headphones/lib/urllib3/util/ssl_match_hostname.py | """The match_hostname() function from Python 3.3.3, essential when using SSL."""
# Note: This file is under the PSF license as the code comes from the python
# stdlib. http://docs.python.org/3/license.html
import re
import sys
# ipaddress has been backported to 2.6+ in pypi. If it is installed on the
# system, us... | 5,751 | Python | .py | 138 | 34.101449 | 88 | 0.64025 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,747 | timeout.py | rembo10_headphones/lib/urllib3/util/timeout.py | from __future__ import absolute_import
import time
# The default socket timeout, used by httplib to indicate that no timeout was
# specified by the user
from socket import _GLOBAL_DEFAULT_TIMEOUT
from ..exceptions import TimeoutStateError
# A sentinel value to indicate that no timeout was specified by the user in
#... | 10,003 | Python | .py | 209 | 38.473684 | 84 | 0.646533 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,748 | connection.py | rembo10_headphones/lib/urllib3/util/connection.py | from __future__ import absolute_import
import socket
from ..contrib import _appengine_environ
from ..exceptions import LocationParseError
from ..packages import six
from .wait import NoWayToWaitForSocketError, wait_for_read
def is_connection_dropped(conn): # Platform-specific
"""
Returns True if the connec... | 4,901 | Python | .py | 118 | 34.576271 | 82 | 0.675715 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,749 | _jellyfish.py | rembo10_headphones/lib/jellyfish/_jellyfish.py | import unicodedata
from collections import defaultdict
from .compat import _range, _zip_longest, _no_bytes_err
from .porter import Stemmer
def _normalize(s):
return unicodedata.normalize('NFKD', s)
def levenshtein_distance(s1, s2):
if isinstance(s1, bytes) or isinstance(s2, bytes):
raise TypeError(_... | 13,017 | Python | .py | 402 | 22.49005 | 99 | 0.473382 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,750 | test.py | rembo10_headphones/lib/jellyfish/test.py | # -*- coding: utf-8 -*-
import sys
if sys.version_info[0] < 3:
import unicodecsv as csv
open_kwargs = {}
else:
import csv
open_kwargs = {'encoding': 'utf8'}
import platform
import pytest
def assertAlmostEqual(a, b, places=3):
assert abs(a - b) < (0.1**places)
if platform.python_implementation() ... | 6,527 | Python | .py | 153 | 37.45098 | 90 | 0.678453 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,751 | __init__.py | rembo10_headphones/lib/jellyfish/__init__.py | try:
from .cjellyfish import * # noqa
except ImportError:
from ._jellyfish import * # noqa
| 103 | Python | .py | 4 | 22.75 | 38 | 0.676768 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,752 | compat.py | rembo10_headphones/lib/jellyfish/compat.py | import sys
import itertools
IS_PY3 = sys.version_info[0] == 3
if IS_PY3:
_range = range
_zip_longest = itertools.zip_longest
_no_bytes_err = 'expected str, got bytes'
else:
_range = xrange
_zip_longest = itertools.izip_longest
_no_bytes_err = 'expected unicode, got str'
| 297 | Python | .py | 11 | 23.636364 | 47 | 0.690141 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,753 | porter.py | rembo10_headphones/lib/jellyfish/porter.py | from .compat import _range
_s2_options = {
'a': ((['a', 't', 'i', 'o', 'n', 'a', 'l'], ['a', 't', 'e']),
(['t', 'i', 'o', 'n', 'a', 'l'], ['t', 'i', 'o', 'n'])),
'c': ((['e', 'n', 'c', 'i'], ['e', 'n', 'c', 'e']),
(['a', 'n', 'c', 'i'], ['a', 'n', 'c', 'e']),),
'e': ((['i', 'z', 'e', 'r... | 6,796 | Python | .py | 192 | 24.760417 | 80 | 0.343265 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,754 | transform.py | rembo10_headphones/lib/bencode/transform.py | """Code, for converting bencoded data to string and back."""
def be_to_str(data: bytes) -> str:
"""Convert bencoded data from bytes to string"""
result = []
for num in data:
# Non-printable characters, double quotes, square brackets, accent
if num < 32 or num in [34, 91, 92, 93] or num > 1... | 977 | Python | .py | 30 | 24.2 | 74 | 0.550955 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,755 | __init__.py | rembo10_headphones/lib/bencode/__init__.py | """We import some functions here, so they are available on the package level"""
from .bencode import decode, encode # noqa
from .torrent import decode_torrent, encode_torrent # noqa
from .transform import be_to_str, str_to_be # noqa
| 236 | Python | .py | 4 | 58 | 79 | 0.762931 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,756 | torrent.py | rembo10_headphones/lib/bencode/torrent.py | """Code, which deals with torrent data."""
from typing import Any
from bencode.bencode import decode, encode
def _decode_object(data: Any, encoding: str, errors: str) -> Any:
"""Replace bytes with strings in the provided Python object"""
if isinstance(data, bytes):
return data.decode(encoding, errors... | 3,568 | Python | .py | 80 | 36.25 | 78 | 0.64158 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,757 | bencode.py | rembo10_headphones/lib/bencode/bencode.py | """Code, which deals with bencoded data."""
from dataclasses import dataclass
from typing import Union
COLON = ord(":")
END_MARKER = ord("e")
START_DICT = ord("d")
START_INTEGER = ord("i")
START_LIST = ord("l")
@dataclass
class BencodedString:
"""An internal container for bencoded strings"""
def __init__(se... | 7,431 | Python | .py | 201 | 29.139303 | 78 | 0.631057 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,758 | _compat.py | rembo10_headphones/lib/concurrent/futures/_compat.py | from keyword import iskeyword as _iskeyword
from operator import itemgetter as _itemgetter
import sys as _sys
def namedtuple(typename, field_names):
"""Returns a new subclass of tuple with named fields.
>>> Point = namedtuple('Point', 'x y')
>>> Point.__doc__ # docstring for the new cla... | 4,969 | Python | .py | 100 | 41.93 | 126 | 0.592837 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,759 | thread.py | rembo10_headphones/lib/concurrent/futures/thread.py | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Implements ThreadPoolExecutor."""
import atexit
import threading
import weakref
import sys
from concurrent.futures import _base
try:
import queue
except ImportError:
import queue as queue
__author__ = ... | 4,568 | Python | .py | 117 | 30.512821 | 80 | 0.619187 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,760 | process.py | rembo10_headphones/lib/concurrent/futures/process.py | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Implements ProcessPoolExecutor.
The follow diagram and text describe the data-flow through the system:
|======================= In-process =====================|== Out-of-process ==|
+----------+ +----------... | 14,812 | Python | .py | 318 | 36.833333 | 100 | 0.569451 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,761 | __init__.py | rembo10_headphones/lib/concurrent/futures/__init__.py | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Execute computations asynchronously using threads or processes."""
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
from concurrent.futures._base import (FIRST_COMPLETED,
FI... | 877 | Python | .py | 19 | 28.526316 | 69 | 0.533958 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,762 | _base.py | rembo10_headphones/lib/concurrent/futures/_base.py | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
import logging
import threading
import time
from concurrent.futures._compat import reraise
try:
from collections import namedtuple
except ImportError:
from concurrent.futures._compat import namedtuple
__au... | 20,793 | Python | .py | 486 | 32.306584 | 80 | 0.611601 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,763 | signals.py | rembo10_headphones/lib/oauthlib/signals.py | """
Implements signals based on blinker if available, otherwise
falls silently back to a noop. Shamelessly stolen from flask.signals:
https://github.com/mitsuhiko/flask/blob/master/flask/signals.py
"""
signals_available = False
try:
from blinker import Namespace
signals_available = True
except Impor... | 1,489 | Python | .py | 35 | 34.6 | 73 | 0.648723 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,764 | __init__.py | rembo10_headphones/lib/oauthlib/__init__.py | """
oauthlib
~~~~~~~~
A generic, spec-compliant, thorough implementation of the OAuth
request-signing logic.
:copyright: (c) 2019 by The OAuthlib Community
:license: BSD, see LICENSE for details.
"""
import logging
from logging import NullHandler
__author__ = 'The OAuthlib Community'
__versio... | 686 | Python | .py | 25 | 24.48 | 67 | 0.703077 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,765 | uri_validate.py | rembo10_headphones/lib/oauthlib/uri_validate.py | """
Regex for URIs
These regex are directly derived from the collected ABNF in RFC3986
(except for DIGIT, ALPHA and HEXDIG, defined by RFC2234).
They should be processed with re.VERBOSE.
Thanks Mark Nottingham for this code - https://gist.github.com/138549
"""
import re
# basics
DIGIT = r"[\x30-\x39]"
ALPHA = r"[... | 6,107 | Python | .py | 136 | 40.794118 | 96 | 0.479635 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,766 | common.py | rembo10_headphones/lib/oauthlib/common.py | """
oauthlib.common
~~~~~~~~~~~~~~
This module provides data structures and utilities common
to all implementations of OAuth.
"""
import collections
import datetime
import logging
import re
import time
import urllib.parse as urlparse
from urllib.parse import (
quote as _quote, unquote as _unquote, urlencode as _ur... | 13,422 | Python | .py | 338 | 32.065089 | 98 | 0.626424 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,767 | __init__.py | rembo10_headphones/lib/oauthlib/openid/__init__.py | """
oauthlib.openid
~~~~~~~~~~~~~~
"""
from .connect.core.endpoints import Server, UserInfoEndpoint
from .connect.core.request_validator import RequestValidator
| 162 | Python | .py | 6 | 25.833333 | 60 | 0.767742 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,768 | tokens.py | rembo10_headphones/lib/oauthlib/openid/connect/core/tokens.py | """
authlib.openid.connect.core.tokens
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module contains methods for adding JWT tokens to requests.
"""
from oauthlib.oauth2.rfc6749.tokens import TokenBase, random_token_generator, get_token_from_header
class JWTToken(TokenBase):
__slots__ = (
'request_validator', '... | 1,596 | Python | .py | 36 | 36.472222 | 99 | 0.656129 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,769 | request_validator.py | rembo10_headphones/lib/oauthlib/openid/connect/core/request_validator.py | """
oauthlib.openid.connect.core.request_validator
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import logging
from oauthlib.oauth2.rfc6749.request_validator import (
RequestValidator as OAuth2RequestValidator,
)
log = logging.getLogger(__name__)
class RequestValidator(OAuth2RequestValidator):
def ge... | 13,448 | Python | .py | 236 | 47.65678 | 109 | 0.688128 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,770 | exceptions.py | rembo10_headphones/lib/oauthlib/openid/connect/core/exceptions.py | """
oauthlib.oauth2.rfc6749.errors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error used both by OAuth 2 clients and providers to represent the spec
defined error responses for all four core grant types.
"""
from oauthlib.oauth2.rfc6749.errors import FatalClientError, OAuth2Error
class FatalOpenIDClientError(FatalClientError):... | 4,790 | Python | .py | 116 | 36.146552 | 79 | 0.732385 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,771 | pre_configured.py | rembo10_headphones/lib/oauthlib/openid/connect/core/endpoints/pre_configured.py | """
oauthlib.openid.connect.core.endpoints.pre_configured
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module is an implementation of various endpoints needed
for providing OpenID Connect servers.
"""
from oauthlib.oauth2.rfc6749.endpoints import (
AuthorizationEndpoint, IntrospectEndpoint, ResourceE... | 5,426 | Python | .py | 84 | 48.416667 | 154 | 0.62751 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,772 | __init__.py | rembo10_headphones/lib/oauthlib/openid/connect/core/endpoints/__init__.py | """
oauthlib.oopenid.core
~~~~~~~~~~~~~~~~~~~~~~~
This module is an implementation of various logic needed
for consuming and providing OpenID Connect
"""
from .pre_configured import Server
from .userinfo import UserInfoEndpoint
| 229 | Python | .py | 8 | 27.5 | 56 | 0.759091 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,773 | userinfo.py | rembo10_headphones/lib/oauthlib/openid/connect/core/endpoints/userinfo.py | """
oauthlib.openid.connect.core.endpoints.userinfo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module is an implementation of userinfo endpoint.
"""
import json
import logging
from oauthlib.common import Request
from oauthlib.oauth2.rfc6749 import errors
from oauthlib.oauth2.rfc6749.endpoints.base imp... | 3,847 | Python | .py | 82 | 38.292683 | 88 | 0.666756 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,774 | hybrid.py | rembo10_headphones/lib/oauthlib/openid/connect/core/grant_types/hybrid.py | """
oauthlib.openid.connect.core.grant_types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import logging
from oauthlib.oauth2.rfc6749.errors import InvalidRequestError
from oauthlib.oauth2.rfc6749.grant_types.authorization_code import (
AuthorizationCodeGrant as OAuth2AuthorizationCodeGrant,
)
from ..request_vali... | 2,742 | Python | .py | 53 | 43.603774 | 87 | 0.689436 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,775 | implicit.py | rembo10_headphones/lib/oauthlib/openid/connect/core/grant_types/implicit.py | """
oauthlib.openid.connect.core.grant_types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import logging
from oauthlib.oauth2.rfc6749.errors import InvalidRequestError
from oauthlib.oauth2.rfc6749.grant_types.implicit import (
ImplicitGrant as OAuth2ImplicitGrant,
)
from .base import GrantTypeBase
log = logging.... | 1,971 | Python | .py | 42 | 39.238095 | 87 | 0.682813 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,776 | dispatchers.py | rembo10_headphones/lib/oauthlib/openid/connect/core/grant_types/dispatchers.py | import logging
log = logging.getLogger(__name__)
class Dispatcher:
default_grant = None
oidc_grant = None
class AuthorizationCodeGrantDispatcher(Dispatcher):
"""
This is an adapter class that will route simple Authorization Code
requests, those that have `response_type=code` and a scope includi... | 3,979 | Python | .py | 77 | 44.285714 | 113 | 0.700619 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,777 | __init__.py | rembo10_headphones/lib/oauthlib/openid/connect/core/grant_types/__init__.py | """
oauthlib.openid.connect.core.grant_types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
from .authorization_code import AuthorizationCodeGrant
from .base import GrantTypeBase
from .dispatchers import (
AuthorizationCodeGrantDispatcher, AuthorizationTokenGrantDispatcher,
ImplicitTokenGrantDispatcher,
)
from .h... | 381 | Python | .py | 12 | 30.083333 | 72 | 0.766938 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,778 | authorization_code.py | rembo10_headphones/lib/oauthlib/openid/connect/core/grant_types/authorization_code.py | """
oauthlib.openid.connect.core.grant_types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import logging
from oauthlib.oauth2.rfc6749.grant_types.authorization_code import (
AuthorizationCodeGrant as OAuth2AuthorizationCodeGrant,
)
from .base import GrantTypeBase
log = logging.getLogger(__name__)
class Authori... | 1,441 | Python | .py | 34 | 35 | 79 | 0.674535 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,779 | base.py | rembo10_headphones/lib/oauthlib/openid/connect/core/grant_types/base.py | import base64
import hashlib
import logging
import time
from json import loads
from oauthlib.oauth2.rfc6749.errors import (
ConsentRequired, InvalidRequestError, LoginRequired,
)
log = logging.getLogger(__name__)
class GrantTypeBase:
# Just proxy the majority of method calls through to the
# proxy_tar... | 15,386 | Python | .py | 271 | 43.487085 | 117 | 0.631981 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,780 | __init__.py | rembo10_headphones/lib/oauthlib/oauth1/__init__.py | """
oauthlib.oauth1
~~~~~~~~~~~~~~
This module is a wrapper for the most recent implementation of OAuth 1.0 Client
and Server classes.
"""
from .rfc5849 import Client
from .rfc5849 import (SIGNATURE_HMAC,
SIGNATURE_HMAC_SHA1,
SIGNATURE_HMAC_SHA256,
SIGN... | 1,187 | Python | .py | 27 | 32.111111 | 79 | 0.639344 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,781 | errors.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/errors.py | """
oauthlib.oauth1.rfc5849.errors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error used both by OAuth 1 clients and provicers to represent the spec
defined error responses for all four core grant types.
"""
from oauthlib.common import add_params_to_uri, urlencode
class OAuth1Error(Exception):
error = None
description ... | 2,474 | Python | .py | 57 | 34.192982 | 77 | 0.638032 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,782 | parameters.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/parameters.py | """
oauthlib.parameters
~~~~~~~~~~~~~~~~~~~
This module contains methods related to `section 3.5`_ of the OAuth 1.0a spec.
.. _`section 3.5`: https://tools.ietf.org/html/rfc5849#section-3.5
"""
from urllib.parse import urlparse, urlunparse
from oauthlib.common import extract_params, urlencode
from . import utils
... | 4,802 | Python | .py | 99 | 42.20202 | 80 | 0.672307 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,783 | request_validator.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/request_validator.py | """
oauthlib.oauth1.rfc5849
~~~~~~~~~~~~~~
This module is an implementation of various logic needed
for signing and checking OAuth 1.0 RFC 5849 requests.
"""
from . import SIGNATURE_METHODS, utils
class RequestValidator:
"""A validator/datastore interaction base class for OAuth 1 providers.
OAuth providers... | 30,988 | Python | .py | 640 | 39.16875 | 107 | 0.671555 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,784 | utils.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/utils.py | """
oauthlib.utils
~~~~~~~~~~~~~~
This module contains utility methods used by various parts of the OAuth
spec.
"""
import urllib.request as urllib2
from oauthlib.common import quote, unquote
UNICODE_ASCII_CHARACTER_SET = ('abcdefghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
... | 2,613 | Python | .py | 61 | 36.442623 | 79 | 0.670751 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,785 | __init__.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/__init__.py | """
oauthlib.oauth1.rfc5849
~~~~~~~~~~~~~~
This module is an implementation of various logic needed
for signing and checking OAuth 1.0 RFC 5849 requests.
It supports all three standard signature methods defined in RFC 5849:
- HMAC-SHA1
- RSA-SHA1
- PLAINTEXT
It also supports signature methods that are not defined i... | 16,744 | Python | .py | 306 | 45.026144 | 140 | 0.659991 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,786 | signature.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/signature.py | """
This module is an implementation of `section 3.4`_ of RFC 5849.
**Usage**
Steps for signing a request:
1. Collect parameters from the request using ``collect_parameters``.
2. Normalize those parameters using ``normalize_parameters``.
3. Create the *base string URI* using ``base_string_uri``.
4. Create the *signa... | 32,024 | Python | .py | 624 | 44.766026 | 80 | 0.665373 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,787 | access_token.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/endpoints/access_token.py | # -*- coding: utf-8 -*-
"""
oauthlib.oauth1.rfc5849.endpoints.access_token
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module is an implementation of the access token provider logic of
OAuth 1.0 RFC 5849. It validates the correctness of access token requests,
creates and persists tokens as well as create the p... | 9,347 | Python | .py | 183 | 40.415301 | 137 | 0.638414 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,788 | pre_configured.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/endpoints/pre_configured.py | from . import (
AccessTokenEndpoint, AuthorizationEndpoint, RequestTokenEndpoint,
ResourceEndpoint,
)
class WebApplicationServer(RequestTokenEndpoint, AuthorizationEndpoint,
AccessTokenEndpoint, ResourceEndpoint):
def __init__(self, request_validator):
RequestTokenEndpo... | 543 | Python | .py | 11 | 41.636364 | 71 | 0.729679 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,789 | authorization.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/endpoints/authorization.py | # -*- coding: utf-8 -*-
"""
oauthlib.oauth1.rfc5849.endpoints.authorization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module is an implementation of various logic needed
for signing and checking OAuth 1.0 RFC 5849 requests.
"""
from urllib.parse import urlencode
from oauthlib.common import add_params_to_ur... | 6,724 | Python | .py | 132 | 39.742424 | 89 | 0.616966 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,790 | __init__.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/endpoints/__init__.py | from .access_token import AccessTokenEndpoint
from .authorization import AuthorizationEndpoint
from .base import BaseEndpoint
from .request_token import RequestTokenEndpoint
from .resource import ResourceEndpoint
from .signature_only import SignatureOnlyEndpoint
from .pre_configured import WebApplicationServer # isor... | 327 | Python | .py | 7 | 45.571429 | 62 | 0.884013 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,791 | base.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/endpoints/base.py | # -*- coding: utf-8 -*-
"""
oauthlib.oauth1.rfc5849.endpoints.base
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module is an implementation of various logic needed
for signing and checking OAuth 1.0 RFC 5849 requests.
"""
import time
from oauthlib.common import CaseInsensitiveDict, Request, generate_token
from .. imp... | 11,643 | Python | .py | 207 | 43.15942 | 100 | 0.623443 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,792 | resource.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/endpoints/resource.py | # -*- coding: utf-8 -*-
"""
oauthlib.oauth1.rfc5849.endpoints.resource
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module is an implementation of the resource protection provider logic of
OAuth 1.0 RFC 5849.
"""
import logging
from .. import errors
from .base import BaseEndpoint
log = logging.getLogger(__name__)... | 7,376 | Python | .py | 140 | 41.085714 | 114 | 0.635242 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,793 | signature_only.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/endpoints/signature_only.py | # -*- coding: utf-8 -*-
"""
oauthlib.oauth1.rfc5849.endpoints.signature_only
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module is an implementation of the signing logic of OAuth 1.0 RFC 5849.
"""
import logging
from .. import errors
from .base import BaseEndpoint
log = logging.getLogger(__name__)
class... | 3,327 | Python | .py | 67 | 40.119403 | 79 | 0.646841 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,794 | request_token.py | rembo10_headphones/lib/oauthlib/oauth1/rfc5849/endpoints/request_token.py | # -*- coding: utf-8 -*-
"""
oauthlib.oauth1.rfc5849.endpoints.request_token
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module is an implementation of the request token provider logic of
OAuth 1.0 RFC 5849. It validates the correctness of request token requests,
creates and persists tokens as well as create t... | 9,293 | Python | .py | 180 | 41.211111 | 131 | 0.637605 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,795 | __init__.py | rembo10_headphones/lib/oauthlib/oauth2/__init__.py | """
oauthlib.oauth2
~~~~~~~~~~~~~~
This module is a wrapper for the most recent implementation of OAuth 2.0 Client
and Server classes.
"""
from .rfc6749.clients import (
BackendApplicationClient, Client, LegacyApplicationClient,
MobileApplicationClient, ServiceApplicationClient, WebApplicationClient,
)
from .r... | 1,555 | Python | .py | 34 | 42.705882 | 79 | 0.846053 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,796 | errors.py | rembo10_headphones/lib/oauthlib/oauth2/rfc6749/errors.py | """
oauthlib.oauth2.rfc6749.errors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error used both by OAuth 2 clients and providers to represent the spec
defined error responses for all four core grant types.
"""
import json
from oauthlib.common import add_params_to_uri, urlencode
class OAuth2Error(Exception):
error = None
... | 12,991 | Python | .py | 310 | 34.945161 | 84 | 0.69455 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,797 | parameters.py | rembo10_headphones/lib/oauthlib/oauth2/rfc6749/parameters.py | """
oauthlib.oauth2.rfc6749.parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module contains methods related to `Section 4`_ of the OAuth 2 RFC.
.. _`Section 4`: https://tools.ietf.org/html/rfc6749#section-4
"""
import json
import os
import time
import urllib.parse as urlparse
from oauthlib.common import add_param... | 17,936 | Python | .py | 348 | 42.439655 | 100 | 0.663749 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,798 | tokens.py | rembo10_headphones/lib/oauthlib/oauth2/rfc6749/tokens.py | """
oauthlib.oauth2.rfc6749.tokens
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module contains methods for adding two types of access tokens to requests.
- Bearer https://tools.ietf.org/html/rfc6750
- MAC https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-01
"""
import hashlib
import hmac
import warnings
from binascii i... | 11,097 | Python | .py | 281 | 31.601423 | 116 | 0.633681 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |
8,799 | request_validator.py | rembo10_headphones/lib/oauthlib/oauth2/rfc6749/request_validator.py | """
oauthlib.oauth2.rfc6749.request_validator
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import logging
log = logging.getLogger(__name__)
class RequestValidator:
def client_authentication_required(self, request, *args, **kwargs):
"""Determine if client authentication is required for current request.
... | 27,845 | Python | .py | 512 | 44.261719 | 98 | 0.663982 | rembo10/headphones | 3,370 | 601 | 527 | GPL-3.0 | 9/5/2024, 5:10:38 PM (Europe/Amsterdam) |