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,900
_adapters.py
rembo10_headphones/lib/pkg_resources/_vendor/importlib_resources/_adapters.py
from contextlib import suppress from io import TextIOWrapper from . import abc class SpecLoaderAdapter: """ Adapt a package spec to adapt the underlying loader. """ def __init__(self, spec, adapter=lambda spec: spec.loader): self.spec = spec self.loader = adapter(spec) def __get...
4,504
Python
.py
126
26.68254
87
0.594139
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,901
test_contents.py
rembo10_headphones/lib/pkg_resources/_vendor/importlib_resources/tests/test_contents.py
import unittest import importlib_resources as resources from . import data01 from . import util class ContentsTests: expected = { '__init__.py', 'binary.file', 'subdirectory', 'utf-16.file', 'utf-8.file', } def test_contents(self): contents = {path.name fo...
968
Python
.py
31
24.935484
79
0.668108
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,902
test_read.py
rembo10_headphones/lib/pkg_resources/_vendor/importlib_resources/tests/test_read.py
import unittest import importlib_resources as resources from . import data01 from . import util from importlib import import_module class CommonBinaryTests(util.CommonTests, unittest.TestCase): def execute(self, package, path): resources.files(package).joinpath(path).read_bytes() class CommonTextTests(...
2,408
Python
.py
56
35.428571
80
0.666381
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,903
test_resource.py
rembo10_headphones/lib/pkg_resources/_vendor/importlib_resources/tests/test_resource.py
import sys import unittest import importlib_resources as resources import uuid import pathlib from . import data01 from . import zipdata01, zipdata02 from . import util from importlib import import_module from ._compat import import_helper, unlink class ResourceTests: # Subclasses are expected to set the `data` ...
8,478
Python
.py
206
32.864078
85
0.630324
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,904
_compat.py
rembo10_headphones/lib/pkg_resources/_vendor/importlib_resources/tests/_compat.py
import os try: from test.support import import_helper # type: ignore except ImportError: # Python 3.9 and earlier class import_helper: # type: ignore from test.support import ( modules_setup, modules_cleanup, DirsOnSysPath, CleanImport, ) ...
708
Python
.py
25
22.24
58
0.66716
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,905
util.py
rembo10_headphones/lib/pkg_resources/_vendor/importlib_resources/tests/util.py
import abc import importlib import io import sys import types import pathlib from . import data01 from . import zipdata01 from ..abc import ResourceReader from ._compat import import_helper from importlib.machinery import ModuleSpec class Reader(ResourceReader): def __init__(self, **kwargs): vars(self)...
4,873
Python
.py
131
29.541985
88
0.640884
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,906
_path.py
rembo10_headphones/lib/pkg_resources/_vendor/importlib_resources/tests/_path.py
import pathlib import functools #### # from jaraco.path 3.4 def build(spec, prefix=pathlib.Path()): """ Build a set of files/directories, as described by the spec. Each key represents a pathname, and the value represents the content. Content may be a nested directory. >>> spec = { ... ...
1,039
Python
.py
36
24.805556
63
0.581395
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,907
test_files.py
rembo10_headphones/lib/pkg_resources/_vendor/importlib_resources/tests/test_files.py
import typing import textwrap import unittest import warnings import importlib import contextlib import importlib_resources as resources from ..abc import Traversable from . import data01 from . import util from . import _path from ._compat import os_helper, import_helper @contextlib.contextmanager def suppress_know...
3,251
Python
.py
88
29.261364
81
0.645428
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,908
update-zips.py
rembo10_headphones/lib/pkg_resources/_vendor/importlib_resources/tests/update-zips.py
""" Generate the zip test data files. Run to build the tests/zipdataNN/ziptestdata.zip files from files in tests/dataNN. Replaces the file with the working copy, but does commit anything to the source repo. """ import contextlib import os import pathlib import zipfile def main(): """ >>> from unittest impo...
1,417
Python
.py
42
28.285714
71
0.638563
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,909
test_open.py
rembo10_headphones/lib/pkg_resources/_vendor/importlib_resources/tests/test_open.py
import unittest import importlib_resources as resources from . import data01 from . import util class CommonBinaryTests(util.CommonTests, unittest.TestCase): def execute(self, package, path): target = resources.files(package).joinpath(path) with target.open('rb'): pass class CommonT...
2,565
Python
.py
60
34.8
67
0.654589
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,910
test_compatibilty_files.py
rembo10_headphones/lib/pkg_resources/_vendor/importlib_resources/tests/test_compatibilty_files.py
import io import unittest import importlib_resources as resources from importlib_resources._adapters import ( CompatibilityFiles, wrap_spec, ) from . import util class CompatibilityFilesTests(unittest.TestCase): @property def package(self): bytes_data = io.BytesIO(b'Hello, world!') ...
3,260
Python
.py
77
34.727273
88
0.624763
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,911
test_path.py
rembo10_headphones/lib/pkg_resources/_vendor/importlib_resources/tests/test_path.py
import io import unittest import importlib_resources as resources from . import data01 from . import util class CommonTests(util.CommonTests, unittest.TestCase): def execute(self, package, path): with resources.as_file(resources.files(package).joinpath(path)): pass class PathTests: def ...
2,103
Python
.py
50
34.3
78
0.655223
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,912
test_reader.py
rembo10_headphones/lib/pkg_resources/_vendor/importlib_resources/tests/test_reader.py
import os.path import sys import pathlib import unittest from importlib import import_module from importlib_resources.readers import MultiplexedPath, NamespaceReader class MultiplexedPathTest(unittest.TestCase): @classmethod def setUpClass(cls): path = pathlib.Path(__file__).parent / 'namespacedata01...
4,480
Python
.py
109
32.284404
88
0.625489
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,913
_tokenizer.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/_tokenizer.py
import contextlib import re from dataclasses import dataclass from typing import Dict, Iterator, NoReturn, Optional, Tuple, Union from .specifiers import Specifier @dataclass class Token: name: str text: str position: int class ParserSyntaxError(Exception): """The provided source text could not be ...
5,292
Python
.py
162
23.925926
84
0.540588
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,914
_structures.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/_structures.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. class InfinityType: def __repr__(self) -> str: return "Infinity" def __hash__(self) -> int: return hash(repr(self...
1,431
Python
.py
39
30.205128
79
0.613139
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,915
markers.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/markers.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import operator import os import platform import sys from typing import Any, Callable, Dict, List, Optional, Tuple, Union from ._parser im...
8,208
Python
.py
204
32.607843
88
0.616893
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,916
tags.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/tags.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import logging import platform import subprocess import sys import sysconfig from importlib.machinery import EXTENSION_SUFFIXES from typing...
18,106
Python
.py
456
32.070175
88
0.610364
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,917
_manylinux.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/_manylinux.py
import collections import contextlib import functools import os import re import sys import warnings from typing import Dict, Generator, Iterator, NamedTuple, Optional, Tuple from ._elffile import EIClass, EIData, ELFFile, EMachine EF_ARM_ABIMASK = 0xFF000000 EF_ARM_ABI_VER5 = 0x05000000 EF_ARM_ABI_FLOAT_HARD = 0x000...
8,926
Python
.py
205
36.965854
88
0.665899
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,918
_parser.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/_parser.py
"""Handwritten parser of dependency specifiers. The docstring for each __parse_* function contains ENBF-inspired grammar representing the implementation. """ import ast from typing import Any, List, NamedTuple, Optional, Tuple, Union from ._tokenizer import DEFAULT_RULES, Tokenizer class Node: def __init__(sel...
10,194
Python
.py
276
29.865942
88
0.614673
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,919
utils.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/utils.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import re from typing import FrozenSet, NewType, Tuple, Union, cast from .tags import Tag, parse_tag from .version import InvalidVersion, ...
4,355
Python
.py
112
32.696429
88
0.652349
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,920
metadata.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/metadata.py
import email.feedparser import email.header import email.message import email.parser import email.policy import sys import typing from typing import Dict, List, Optional, Tuple, Union, cast if sys.version_info >= (3, 8): # pragma: no cover from typing import TypedDict else: # pragma: no cover if typing.TYPE_...
16,397
Python
.py
364
37.123626
88
0.647257
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,921
__init__.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/__init__.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. __title__ = "packaging" __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" __version__ = "23...
501
Python
.py
11
44.181818
79
0.703704
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,922
_musllinux.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/_musllinux.py
"""PEP 656 support. This module implements logic to detect if the currently running Python is linked against musl, and what musl version is used. """ import functools import re import subprocess import sys from typing import Iterator, NamedTuple, Optional from ._elffile import ELFFile class _MuslVersion(NamedTuple...
2,524
Python
.py
61
36.131148
80
0.671849
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,923
_elffile.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/_elffile.py
""" ELF file parser. This provides a class ``ELFFile`` that parses an ELF executable in a similar interface to ``ZipFile``. Only the read interface is implemented. Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html ""...
3,266
Python
.py
88
27.522727
86
0.545915
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,924
requirements.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/requirements.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import urllib.parse from typing import Any, List, Optional, Set from ._parser import parse_requirement as _parse_requirement from ._tokeni...
3,287
Python
.py
75
34.88
79
0.625627
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,925
version.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/version.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. """ .. testsetup:: from packaging.version import parse, Version """ import collections import itertools import re from typing import A...
16,326
Python
.py
455
27.969231
88
0.573912
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,926
specifiers.py
rembo10_headphones/lib/pkg_resources/_vendor/packaging/specifiers.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. """ .. testsetup:: from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier from packaging.version import Version...
39,206
Python
.py
831
36.799037
88
0.579742
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,927
functools.py
rembo10_headphones/lib/pkg_resources/_vendor/jaraco/functools.py
import functools import time import inspect import collections import types import itertools import warnings import pkg_resources.extern.more_itertools from typing import Callable, TypeVar CallableT = TypeVar("CallableT", bound=Callable[..., object]) def compose(*funcs): """ Compose any number of unary fu...
15,056
Python
.py
429
29.137529
88
0.636966
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,928
context.py
rembo10_headphones/lib/pkg_resources/_vendor/jaraco/context.py
import os import subprocess import contextlib import functools import tempfile import shutil import operator import warnings @contextlib.contextmanager def pushd(dir): """ >>> tmp_path = getfixture('tmp_path') >>> with pushd(tmp_path): ... assert os.getcwd() == os.fspath(tmp_path) >>> assert o...
7,460
Python
.py
234
25.538462
85
0.610429
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,929
__init__.py
rembo10_headphones/lib/pkg_resources/_vendor/jaraco/text/__init__.py
import re import itertools import textwrap import functools try: from importlib.resources import files # type: ignore except ImportError: # pragma: nocover from pkg_resources.extern.importlib_resources import files # type: ignore from pkg_resources.extern.jaraco.functools import compose, method_cache from ...
15,526
Python
.py
446
29.002242
78
0.622697
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,930
utc.py
rembo10_headphones/lib/tempora/utc.py
""" Facilities for common time operations in UTC. Inspired by the `utc project <https://pypi.org/project/utc>`_. >>> dt = now() >>> dt == fromtimestamp(dt.timestamp()) True >>> dt.tzinfo datetime.timezone.utc >>> from time import time as timestamp >>> now().timestamp() - timestamp() < 0.1 True >>> (now() - fromtime...
846
Python
.py
25
32.4
82
0.739506
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,931
schedule.py
rembo10_headphones/lib/tempora/schedule.py
""" Classes for calling functions a schedule. Has time zone support. For example, to run a job at 08:00 every morning in 'Asia/Calcutta': >>> job = lambda: print("time is now", datetime.datetime()) >>> time = datetime.time(8, tzinfo=pytz.timezone('Asia/Calcutta')) >>> cmd = PeriodicCommandFixedDelay.daily_at(time, jo...
6,065
Python
.py
186
25.139785
76
0.616004
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,932
__init__.py
rembo10_headphones/lib/tempora/__init__.py
"Objects and routines pertaining to date and time (tempora)" import datetime import time import re import numbers import functools import warnings import contextlib from jaraco.functools import once class Parser: """ *deprecated* Datetime parser: parses a date-time string using multiple possible fo...
20,192
Python
.py
555
30.74955
83
0.632909
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,933
timing.py
rembo10_headphones/lib/tempora/timing.py
import datetime import functools import numbers import time import collections.abc import contextlib import jaraco.functools class Stopwatch: """ A simple stopwatch which starts automatically. >>> w = Stopwatch() >>> _1_sec = datetime.timedelta(seconds=1) >>> w.split() < _1_sec True >>> ...
6,197
Python
.py
201
24.114428
84
0.601079
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,934
__main__.py
rembo10_headphones/lib/certifi/__main__.py
import argparse from certifi import contents, where parser = argparse.ArgumentParser() parser.add_argument("-c", "--contents", action="store_true") args = parser.parse_args() if args.contents: print(contents()) else: print(where())
243
Python
.py
9
24.777778
60
0.748918
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,935
core.py
rembo10_headphones/lib/certifi/core.py
# -*- coding: utf-8 -*- """ certifi.py ~~~~~~~~~~ This module returns the installation location of cacert.pem or its contents. """ import os try: from importlib.resources import path as get_path, read_text _CACERT_CTX = None _CACERT_PATH = None def where(): # This is slightly terrible, but ...
2,303
Python
.py
48
40.395833
78
0.652251
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,936
error.py
rembo10_headphones/lib/twitter/error.py
#!/usr/bin/env python class TwitterError(Exception): """Base class for Twitter errors""" @property def message(self): '''Returns the first argument used to construct this error.''' return self.args[0] class PythonTwitterDeprecationWarning(DeprecationWarning): """Base class for pytho...
659
Python
.py
16
36.375
74
0.760252
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,937
models.py
rembo10_headphones/lib/twitter/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from calendar import timegm try: from rfc822 import parsedate except ImportError: from email.utils import parsedate class TwitterModel(object): """ Base class from which all twitter models will inherit. """ def __init__(se...
17,490
Python
.py
433
28.561201
100
0.539478
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,938
ratelimit.py
rembo10_headphones/lib/twitter/ratelimit.py
from collections import namedtuple import re try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse from twitter.twitter_utils import enf_type EndpointRateLimit = namedtuple('EndpointRateLimit', ['limit', 'remaining', 'reset']) ResourceEndpoint...
7,389
Python
.py
149
40.114094
131
0.646846
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,939
twitter_utils.py
rembo10_headphones/lib/twitter/twitter_utils.py
# encoding: utf-8 from __future__ import unicode_literals import mimetypes import os import re import sys from tempfile import NamedTemporaryFile from unicodedata import normalize try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse import requests from twitter import Twit...
16,403
Python
.py
285
49.364912
118
0.545197
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,940
api.py
rembo10_headphones/lib/twitter/api.py
#!/usr/bin/env python # # # Copyright 2007-2016, 2018 The Python-Twitter Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
199,197
Python
.py
4,356
32.054408
134
0.561902
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,941
parse_tweet.py
rembo10_headphones/lib/twitter/parse_tweet.py
#!/usr/bin/env python import re class Emoticons: POSITIVE = ["*O", "*-*", "*O*", "*o*", "* *", ":P", ":D", ":d", ":p", ";P", ";D", ";d", ";p", ":-)", ";-)", ":=)", ";=)", ":<)", ":>)", ";>)", ";=)", "=}", ":)", "(:;)", ...
3,607
Python
.py
85
31.811765
133
0.475905
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,942
__init__.py
rembo10_headphones/lib/twitter/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2007-2018 The Python-Twitter Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICE...
2,137
Python
.py
47
43.276596
74
0.556196
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,943
_file_cache.py
rembo10_headphones/lib/twitter/_file_cache.py
#!/usr/bin/env python import errno import os import tempfile from hashlib import md5 class _FileCacheError(Exception): """Base exception class for FileCache related errors""" class _FileCache(object): DEPTH = 3 def __init__(self, root_directory=None): self._InitializeRootDirectory(root_directo...
3,337
Python
.py
86
27.94186
81
0.572798
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,944
models.py
rembo10_headphones/lib/requests/models.py
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import datetime import sys # Import encoding now, to avoid implicit import later. # Implicit import within threads may cause LookupError when standard library is in a ZIP, # such as in Embed...
35,051
Python
.py
786
34.005089
119
0.599566
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,945
cookies.py
rembo10_headphones/lib/requests/cookies.py
# -*- coding: utf-8 -*- """ requests.cookies ~~~~~~~~~~~~~~~~ Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports. """ import copy import time import calendar from ._internal_utils import to_native_string from .compat import cookiel...
18,430
Python
.py
438
33.828767
111
0.636933
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,946
sessions.py
rembo10_headphones/lib/requests/sessions.py
# -*- coding: utf-8 -*- """ requests.sessions ~~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). """ import os import sys import time from datetime import timedelta from collections import OrderedDict from .auth import _basic_auth_str from...
29,835
Python
.py
613
38.657423
106
0.631572
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,947
help.py
rembo10_headphones/lib/requests/help.py
"""Module containing bug report helper(s).""" from __future__ import print_function import json import platform import sys import ssl import idna import urllib3 from . import __version__ as requests_version try: import charset_normalizer except ImportError: charset_normalizer = None try: import chardet...
3,968
Python
.py
113
27.99115
78
0.630577
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,948
__version__.py
rembo10_headphones/lib/requests/__version__.py
# .-. .-. .-. . . .-. .-. .-. .-. # |( |- |.| | | |- `-. | `-. # ' ' `-' `-`.`-' `-' `-' ' `-' __title__ = 'requests' __description__ = 'Python HTTP for Humans.' __url__ = 'https://requests.readthedocs.io' __version__ = '2.27.1' __build__ = 0x022701 __author__ = 'Kenneth Reitz' __author_email__ = 'me@kennethrei...
441
Python
.py
13
32.846154
46
0.503513
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,949
api.py
rembo10_headphones/lib/requests/api.py
# -*- coding: utf-8 -*- """ requests.api ~~~~~~~~~~~~ This module implements the Requests API. :copyright: (c) 2012 by Kenneth Reitz. :license: Apache2, see LICENSE for more details. """ from . import sessions def request(method, url, **kwargs): """Constructs and sends a :class:`Request <Request>`. :para...
6,402
Python
.py
121
47.46281
139
0.676277
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,950
auth.py
rembo10_headphones/lib/requests/auth.py
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib import threading import warnings from base64 import b64encode from .compat import urlparse, str, basestring from .cookies import extract_cookies_...
10,207
Python
.py
246
31.849593
88
0.580893
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,951
utils.py
rembo10_headphones/lib/requests/utils.py
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import codecs import contextlib import io import os import re import socket import struct import sys import tempfile import warnings import...
33,277
Python
.py
828
32.233092
128
0.623336
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,952
status_codes.py
rembo10_headphones/lib/requests/status_codes.py
# -*- coding: utf-8 -*- r""" The ``codes`` object defines a mapping from common names for HTTP statuses to their numerical codes, accessible either as attributes or as dictionary items. Example:: >>> import requests >>> requests.codes['temporary_redirect'] 307 >>> requests.codes.teapot 418 >>...
4,188
Python
.py
108
33.564815
89
0.6033
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,953
__init__.py
rembo10_headphones/lib/requests/__init__.py
# -*- coding: utf-8 -*- # __ # /__) _ _ _ _ _/ _ # / ( (- (/ (/ (- _) / _) # / """ Requests HTTP Library ~~~~~~~~~~~~~~~~~~~~~ Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('https://www.python.org') >>> ...
4,924
Python
.py
125
34.984
102
0.685457
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,954
packages.py
rembo10_headphones/lib/requests/packages.py
import sys try: import chardet except ImportError: import charset_normalizer as chardet import warnings warnings.filterwarnings('ignore', 'Trying to detect', module='charset_normalizer') # This code exists for backwards compatibility reasons. # I don't like it either. Just look the other way. :) for...
932
Python
.py
21
40.095238
96
0.703091
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,955
hooks.py
rembo10_headphones/lib/requests/hooks.py
# -*- coding: utf-8 -*- """ requests.hooks ~~~~~~~~~~~~~~ This module provides the capabilities for the Requests hooks system. Available hooks: ``response``: The response generated from a Request. """ HOOKS = ['response'] def default_hooks(): return {event: [] for event in HOOKS} # TODO: response is the ...
757
Python
.py
25
25.08
68
0.616874
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,956
compat.py
rembo10_headphones/lib/requests/compat.py
# -*- coding: utf-8 -*- """ requests.compat ~~~~~~~~~~~~~~~ This module handles import compatibility issues between Python 2 and Python 3. """ try: import chardet except ImportError: import charset_normalizer as chardet import sys # ------- # Pythons # ------- # Syntax sugar. _ver = sys.version_info #: P...
2,054
Python
.py
67
26.820896
132
0.717689
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,957
exceptions.py
rembo10_headphones/lib/requests/exceptions.py
# -*- coding: utf-8 -*- """ requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. """ from urllib3.exceptions import HTTPError as BaseHTTPError from .compat import JSONDecodeError as CompatJSONDecodeError class RequestException(IOError): """There was an ambiguous excepti...
3,434
Python
.py
76
40.644737
84
0.741896
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,958
certs.py
rembo10_headphones/lib/requests/certs.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ requests.certs ~~~~~~~~~~~~~~ This module returns the preferred default CA certificate bundle. There is only one — the one from the certifi package. If you are packaging Requests, e.g., for a Linux distribution or a managed environment, you can change the definitio...
453
Python
.py
14
30.785714
76
0.71954
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,959
adapters.py
rembo10_headphones/lib/requests/adapters.py
# -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import os.path import socket from urllib3.poolmanager import PoolManager, proxy_from_url from urllib3.response import HTTPResponse from urllib3.util ...
21,645
Python
.py
439
37.42369
108
0.618278
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,960
_internal_utils.py
rembo10_headphones/lib/requests/_internal_utils.py
# -*- coding: utf-8 -*- """ requests._internal_utils ~~~~~~~~~~~~~~ Provides utility functions that are consumed internally by Requests which depend on extremely few external helpers (such as compat) """ from .compat import is_py2, builtin_str, str def to_native_string(string, encoding='ascii'): """Given a str...
1,096
Python
.py
33
27.818182
77
0.679317
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,961
structures.py
rembo10_headphones/lib/requests/structures.py
# -*- coding: utf-8 -*- """ requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. """ from collections import OrderedDict from .compat import Mapping, MutableMapping class CaseInsensitiveDict(MutableMapping): """A case-insensitive ``dict``-like object. Implements all methods and op...
3,005
Python
.py
77
32.051948
75
0.617931
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,962
_compat.py
rembo10_headphones/lib/cheroot/_compat.py
# pylint: disable=unused-import """Compatibility code for using Cheroot with various versions of Python.""" from __future__ import absolute_import, division, print_function __metaclass__ = type import os import platform import re import six try: import selectors # lgtm [py/unused-import] except ImportError: ...
4,436
Python
.py
115
32.104348
77
0.650187
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,963
wsgi.pyi
rembo10_headphones/lib/cheroot/wsgi.pyi
from . import server from typing import Any class Server(server.HTTPServer): wsgi_version: Any wsgi_app: Any request_queue_size: Any timeout: Any shutdown_timeout: Any requests: Any def __init__(self, bind_addr, wsgi_app, numthreads: int = ..., server_name: Any | None = ..., max: int = ...,...
1,348
Python
.py
36
33.166667
343
0.6317
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,964
server.pyi
rembo10_headphones/lib/cheroot/server.pyi
from typing import Any class HeaderReader: def __call__(self, rfile, hdict: Any | None = ...): ... class DropUnderscoreHeaderReader(HeaderReader): ... class SizeCheckWrapper: rfile: Any maxlen: Any bytes_read: int def __init__(self, rfile, maxlen) -> None: ... def read(self, size: Any | None ...
4,910
Python
.py
162
25.518519
202
0.600886
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,965
errors.py
rembo10_headphones/lib/cheroot/errors.py
# -*- coding: utf-8 -*- """Collection of exceptions raised and/or processed by Cheroot.""" from __future__ import absolute_import, division, print_function __metaclass__ = type import errno import sys class MaxSizeExceeded(Exception): """Exception raised when a client sends more data then acceptable within limi...
2,944
Python
.py
67
40.537313
83
0.749649
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,966
__main__.py
rembo10_headphones/lib/cheroot/__main__.py
"""Stub for accessing the Cheroot CLI tool.""" from .cli import main if __name__ == '__main__': main()
109
Python
.py
4
24.75
46
0.621359
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,967
makefile.pyi
rembo10_headphones/lib/cheroot/makefile.pyi
import io SOCK_WRITE_BLOCKSIZE: int class BufferedWriter(io.BufferedWriter): def write(self, b): ... class MakeFile_PY2: bytes_read: int bytes_written: int def __init__(self, *args, **kwargs) -> None: ... def write(self, data) -> None: ... def send(self, data): ... def flush(self) -> None...
931
Python
.py
26
31.653846
71
0.585095
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,968
cli.py
rembo10_headphones/lib/cheroot/cli.py
"""Command line tool for starting a Cheroot WSGI/HTTP server instance. Basic usage: .. code-block:: shell-session $ # Start a server on 127.0.0.1:8000 with the default settings $ # for the WSGI app myapp/wsgi.py:application() $ cheroot myapp.wsgi $ # Start a server on 0.0.0.0:9000 with 8 threads ...
6,994
Python
.py
197
28.467005
79
0.609901
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,969
connections.py
rembo10_headphones/lib/cheroot/connections.py
"""Utilities to manage open connections.""" from __future__ import absolute_import, division, print_function __metaclass__ = type import io import os import socket import threading import time from . import errors from ._compat import selectors from ._compat import suppress from ._compat import IS_WINDOWS from .make...
14,723
Python
.py
336
31.738095
79
0.580204
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,970
connections.pyi
rembo10_headphones/lib/cheroot/connections.pyi
from typing import Any def prevent_socket_inheritance(sock) -> None: ... class _ThreadsafeSelector: def __init__(self) -> None: ... def __len__(self): ... @property def connections(self) -> None: ... def register(self, fileobj, events, data: Any | None = ...): ... def unregister(self, fileobj)...
714
Python
.py
20
31.35
68
0.59479
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,971
errors.pyi
rembo10_headphones/lib/cheroot/errors.pyi
from typing import Any, List, Set, Tuple class MaxSizeExceeded(Exception): ... class NoSSLError(Exception): ... class FatalSSLAlert(Exception): ... def plat_specific_errors(*errnames: str) -> List[int]: ... socket_error_eintr: List[int] socket_errors_to_ignore: List[int] socket_errors_nonblocking: List[int] acceptab...
413
Python
.py
10
40
58
0.785
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,972
__init__.py
rembo10_headphones/lib/cheroot/__init__.py
"""High-performance, pure-Python HTTP server used by CherryPy.""" from __future__ import absolute_import, division, print_function __metaclass__ = type try: import pkg_resources except ImportError: pass try: __version__ = pkg_resources.get_distribution('cheroot').version except Exception: __version_...
334
Python
.py
11
27.545455
67
0.736677
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,973
makefile.py
rembo10_headphones/lib/cheroot/makefile.py
"""Socket file object.""" from __future__ import absolute_import, division, print_function __metaclass__ = type import socket try: # prefer slower Python-based io module import _pyio as io except ImportError: # Python 2.6 import io import six from . import errors from ._compat import extract_bytes,...
16,368
Python
.py
403
24.07196
78
0.443628
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,974
testing.pyi
rembo10_headphones/lib/cheroot/testing.pyi
from typing import Any, Iterator, Optional, TypeVar from .server import HTTPServer from .wsgi import Server T = TypeVar('T', bound=HTTPServer) EPHEMERAL_PORT: int NO_INTERFACE: Optional[str] ANY_INTERFACE_IPV4: str ANY_INTERFACE_IPV6: str config: dict def cheroot_server(server_factory: T) -> Iterator[T]: ... def ws...
448
Python
.py
13
33.153846
57
0.75174
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,975
testing.py
rembo10_headphones/lib/cheroot/testing.py
"""Pytest fixtures and other helpers for doing testing by end-users.""" from __future__ import absolute_import, division, print_function __metaclass__ = type from contextlib import closing import errno import socket import threading import time import pytest from six.moves import http_client import cheroot.server f...
4,172
Python
.py
120
27.691667
73
0.641204
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,976
cli.pyi
rembo10_headphones/lib/cheroot/cli.pyi
from typing import Any class BindLocation: ... class TCPSocket(BindLocation): bind_addr: Any def __init__(self, address, port) -> None: ... class UnixSocket(BindLocation): bind_addr: Any def __init__(self, path) -> None: ... class AbstractSocket(BindLocation): bind_addr: Any def __init__(sel...
828
Python
.py
25
29.44
56
0.646985
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,977
wsgi.py
rembo10_headphones/lib/cheroot/wsgi.py
"""This class holds Cheroot WSGI server implementation. Simplest example on how to use this server:: from cheroot import wsgi def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [('Content-type','text/plain')] start_response(status, response_headers) ...
14,870
Python
.py
356
31.154494
79
0.585313
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,978
server.py
rembo10_headphones/lib/cheroot/server.py
""" A high-speed, production ready, thread pooled, generic HTTP server. For those of you wanting to understand internals of this module, here's the basic call flow. The server's listening thread runs a very tight loop, sticking incoming connections onto a Queue:: server = HTTPServer(...) server.start() ->...
76,777
Python
.py
1,841
30.348724
101
0.566385
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,979
conftest.py
rembo10_headphones/lib/cheroot/test/conftest.py
"""Pytest configuration module. Contains fixtures, which are tightly bound to the Cheroot framework itself, useless for end-users' app testing. """ from __future__ import absolute_import, division, print_function __metaclass__ = type # pylint: disable=invalid-name import threading import time import pytest from ....
1,839
Python
.py
54
28.962963
70
0.699661
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,980
_pytest_plugin.py
rembo10_headphones/lib/cheroot/test/_pytest_plugin.py
"""Local pytest plugin. Contains hooks, which are tightly bound to the Cheroot framework itself, useless for end-users' app testing. """ from __future__ import absolute_import, division, print_function __metaclass__ = type import pytest pytest_version = tuple(map(int, pytest.__version__.split('.'))) def pytest_l...
2,085
Python
.py
42
42.928571
79
0.700737
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,981
test_makefile.py
rembo10_headphones/lib/cheroot/test/test_makefile.py
"""Tests for :py:mod:`cheroot.makefile`.""" from cheroot import makefile __metaclass__ = type class MockSocket: """A mock socket.""" def __init__(self): """Initialize :py:class:`MockSocket`.""" self.messages = [] def recv_into(self, buf): """Simulate ``recv_into`` for Python 3...
1,214
Python
.py
39
24.358974
50
0.592083
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,982
test_cli.py
rembo10_headphones/lib/cheroot/test/test_cli.py
"""Tests to verify the command line interface. .. spelling:: cli """ # -*- coding: utf-8 -*- # vim: set fileencoding=utf-8 : import sys import six import pytest from cheroot.cli import ( Application, parse_wsgi_bind_addr, ) @pytest.mark.parametrize( ('raw_bind_addr', 'expected_bind_addr'), ( ...
3,091
Python
.py
82
31.146341
76
0.626796
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,983
test_wsgi.py
rembo10_headphones/lib/cheroot/test/test_wsgi.py
"""Test wsgi.""" from concurrent.futures.thread import ThreadPoolExecutor from traceback import print_tb import pytest import portend import requests from requests_toolbelt.sessions import BaseUrlSession as Session from jaraco.context import ExceptionTrap from cheroot import wsgi from cheroot._compat import IS_MACOS...
2,758
Python
.py
63
38.079365
76
0.698318
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,984
test_dispatch.py
rembo10_headphones/lib/cheroot/test/test_dispatch.py
"""Tests for the HTTP server.""" # -*- coding: utf-8 -*- # vim: set fileencoding=utf-8 : from __future__ import absolute_import, division, print_function from cheroot.wsgi import PathInfoDispatcher def wsgi_invoke(app, environ): """Serve 1 request from a WSGI application.""" response = {} def start_res...
1,332
Python
.py
44
23.113636
64
0.561472
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,985
test_ssl.py
rembo10_headphones/lib/cheroot/test/test_ssl.py
"""Tests for TLS support.""" # -*- coding: utf-8 -*- # vim: set fileencoding=utf-8 : from __future__ import absolute_import, division, print_function __metaclass__ = type import functools import json import os import ssl import subprocess import sys import threading import time import traceback import OpenSSL.SSL im...
23,991
Python
.py
662
27.667674
79
0.603281
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,986
test__compat.py
rembo10_headphones/lib/cheroot/test/test__compat.py
# -*- coding: utf-8 -*- """Test suite for cross-python compatibility helpers.""" from __future__ import absolute_import, division, print_function __metaclass__ = type import pytest import six from cheroot._compat import extract_bytes, memoryview, ntob, ntou, bton @pytest.mark.parametrize( ('func', 'inp', 'out'...
1,818
Python
.py
53
29.037736
77
0.656699
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,987
webtest.py
rembo10_headphones/lib/cheroot/test/webtest.py
"""Extensions to unittest for web frameworks. Use the :py:meth:`WebCase.getPage` method to request a page from your HTTP server. Framework Integration ===================== If you have control over your server process, you can handle errors in the server-side of the HTTP conversation a bit better. You must run both t...
19,205
Python
.py
506
29.092885
78
0.587672
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,988
test_core.py
rembo10_headphones/lib/cheroot/test/test_core.py
"""Tests for managing HTTP issues (malformed requests, etc).""" # -*- coding: utf-8 -*- # vim: set fileencoding=utf-8 : from __future__ import absolute_import, division, print_function __metaclass__ = type import errno import socket import pytest import six from six.moves import urllib from cheroot.test import help...
14,652
Python
.py
364
34.483516
79
0.672621
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,989
test_conn.py
rembo10_headphones/lib/cheroot/test/test_conn.py
"""Tests for TCP connection handling, including proper and timely close.""" from __future__ import absolute_import, division, print_function __metaclass__ = type import errno import socket import time import logging import traceback as traceback_ from collections import namedtuple from six.moves import range, http_c...
43,739
Python
.py
1,100
32.753636
79
0.648977
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,990
helper.py
rembo10_headphones/lib/cheroot/test/helper.py
"""A library of helper functions for the Cheroot test suite.""" from __future__ import absolute_import, division, print_function __metaclass__ = type import datetime import logging import os import sys import time import threading import types from six.moves import http_client import six import cheroot.server impo...
4,896
Python
.py
140
26.014286
79
0.573698
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,991
test_server.py
rembo10_headphones/lib/cheroot/test/test_server.py
"""Tests for the HTTP server.""" # -*- coding: utf-8 -*- # vim: set fileencoding=utf-8 : from __future__ import absolute_import, division, print_function __metaclass__ = type import os import socket import tempfile import threading import uuid import pytest import requests import requests_unixsocket import six from...
12,813
Python
.py
332
32.924699
79
0.692215
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,992
test_errors.py
rembo10_headphones/lib/cheroot/test/test_errors.py
"""Test suite for ``cheroot.errors``.""" import pytest from cheroot import errors from .._compat import IS_LINUX, IS_MACOS, IS_WINDOWS # noqa: WPS130 @pytest.mark.parametrize( ('err_names', 'err_nums'), ( (('', 'some-nonsense-name'), []), ( ( 'EPROTOTYPE', 'EAGA...
868
Python
.py
25
27.28
77
0.575179
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,993
pyopenssl.pyi
rembo10_headphones/lib/cheroot/ssl/pyopenssl.pyi
from . import Adapter from ..makefile import StreamReader, StreamWriter from OpenSSL import SSL from typing import Any ssl_conn_type: SSL.Connection class SSLFileobjectMixin: ssl_timeout: int ssl_retry: float def recv(self, size): ... def readline(self, size: int = ...): ... def sendall(self, *arg...
1,018
Python
.py
24
39
125
0.672065
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,994
pyopenssl.py
rembo10_headphones/lib/cheroot/ssl/pyopenssl.py
""" A library for integrating :doc:`pyOpenSSL <pyopenssl:index>` with Cheroot. The :py:mod:`OpenSSL <pyopenssl:OpenSSL>` module must be importable for SSL/TLS/HTTPS functionality. You can obtain it from `here <https://github.com/pyca/pyopenssl>`_. To use this module, set :py:attr:`HTTPServer.ssl_adapter <cheroot.serv...
13,339
Python
.py
313
32.527157
79
0.593116
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,995
builtin.pyi
rembo10_headphones/lib/cheroot/ssl/builtin.pyi
from typing import Any from . import Adapter generic_socket_error: OSError DEFAULT_BUFFER_SIZE: int class BuiltinSSLAdapter(Adapter): CERT_KEY_TO_ENV: Any CERT_KEY_TO_LDAP_CODE: Any def __init__(self, certificate, private_key, certificate_chain: Any | None = ..., ciphers: Any | None = ...) -> None: ... ...
585
Python
.py
16
32.6875
125
0.636684
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,996
__init__.pyi
rembo10_headphones/lib/cheroot/ssl/__init__.pyi
from abc import abstractmethod from typing import Any class Adapter(): certificate: Any private_key: Any certificate_chain: Any ciphers: Any context: Any @abstractmethod def __init__(self, certificate, private_key, certificate_chain: Any | None = ..., ciphers: Any | None = ...): ... @ab...
555
Python
.py
18
26.444444
117
0.645522
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,997
__init__.py
rembo10_headphones/lib/cheroot/ssl/__init__.py
"""Implementation of the SSL adapter base interface.""" from __future__ import absolute_import, division, print_function __metaclass__ = type from abc import ABCMeta, abstractmethod from six import add_metaclass @add_metaclass(ABCMeta) class Adapter: """Base class for SSL driver library adapters. Required...
1,539
Python
.py
40
31.725
74
0.663753
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,998
builtin.py
rembo10_headphones/lib/cheroot/ssl/builtin.py
""" A library for integrating Python's builtin :py:mod:`ssl` library with Cheroot. The :py:mod:`ssl` module must be importable for SSL functionality. To use this module, set ``HTTPServer.ssl_adapter`` to an instance of ``BuiltinSSLAdapter``. """ from __future__ import absolute_import, division, print_function __meta...
18,045
Python
.py
419
32.792363
79
0.591059
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)
8,999
threadpool.pyi
rembo10_headphones/lib/cheroot/workers/threadpool.pyi
import threading from typing import Any class TrueyZero: def __add__(self, other): ... def __radd__(self, other): ... trueyzero: TrueyZero class WorkerThread(threading.Thread): conn: Any server: Any ready: bool requests_seen: int bytes_read: int bytes_written: int start_time: Any ...
925
Python
.py
33
23.636364
142
0.585586
rembo10/headphones
3,370
601
527
GPL-3.0
9/5/2024, 5:10:38 PM (Europe/Amsterdam)