id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
24,000 | pytest-dev/pytest | testing/python/fixtures.py | fixtures.TestRequestMarking | from _pytest.pytester import Pytester
from _pytest.fixtures import TopRequest
from _pytest.python import Function
import pytest
class TestRequestMarking:
def test_applymarker(self, pytester: Pytester) -> None:
item1, item2 = pytester.getitems('\n import pytest\n\n @pytest.fixture\n ... |
class TestRequestMarking:
def test_applymarker(self, pytester: Pytester) -> None:
pass
def test_accesskeywords(self, pytester: Pytester) -> None:
pass
def test_accessmarker_dynamic(self, pytester: Pytester) -> None:
pass | 4 | 0 | 22 | 1 | 21 | 0 | 1 | 0.02 | 0 | 4 | 3 | 0 | 3 | 0 | 3 | 3 | 69 | 4 | 65 | 8 | 61 | 1 | 22 | 8 | 18 | 1 | 0 | 1 | 3 |
24,001 | pytest-dev/pytest | testing/python/fixtures.py | fixtures.TestRequestScopeAccess | import pytest
from _pytest.pytester import Pytester
class TestRequestScopeAccess:
pytestmark = pytest.mark.parametrize(('scope', 'ok', 'error'), [['session', '', 'path class function module'], ['module', 'module path', 'cls function'], ['class', 'module path cls', 'function'], ['function', 'module path cls functio... |
class TestRequestScopeAccess:
def test_setup(self, pytester: Pytester, scope, ok, error) -> None:
pass
def test_funcarg(self, pytester: Pytester, scope, ok, error) -> None:
pass | 3 | 0 | 20 | 0 | 20 | 1 | 1 | 0.04 | 0 | 1 | 1 | 0 | 2 | 0 | 2 | 2 | 52 | 2 | 50 | 6 | 47 | 2 | 10 | 6 | 7 | 1 | 0 | 0 | 2 |
24,002 | pytest-dev/pytest | testing/python/fixtures.py | fixtures.TestRequestSessionScoped | import pytest
class TestRequestSessionScoped:
@pytest.fixture(scope='session')
def session_request(self, request):
return request
@pytest.mark.parametrize('name', ['path', 'module'])
def test_session_scoped_unavailable_attributes(self, session_request, name):
with pytest.raises(Attrib... |
class TestRequestSessionScoped:
@pytest.fixture(scope='session')
def session_request(self, request):
pass
@pytest.mark.parametrize('name', ['path', 'module'])
def test_session_scoped_unavailable_attributes(self, session_request, name):
pass | 5 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 2 | 0 | 2 | 2 | 12 | 1 | 11 | 5 | 6 | 0 | 6 | 3 | 3 | 1 | 0 | 1 | 2 |
24,003 | pytest-dev/pytest | testing/python/fixtures.py | fixtures.TestScopeOrdering | import textwrap
from _pytest.monkeypatch import MonkeyPatch
from _pytest.fixtures import TopRequest
import pytest
from _pytest.python import Function
from _pytest.config import ExitCode
from _pytest.pytester import Pytester
class TestScopeOrdering:
"""Class of tests that ensure fixtures are ordered based on their ... |
class TestScopeOrdering:
'''Class of tests that ensure fixtures are ordered based on their scopes (#2405)'''
@pytest.mark.parametrize('variant', ['mark', 'autouse'])
def test_func_closure_module_auto(self, pytester: Pytester, variant, monkeypatch) -> None:
'''Semantically identical to the example p... | 11 | 9 | 41 | 5 | 32 | 4 | 1 | 0.12 | 0 | 5 | 5 | 0 | 9 | 0 | 9 | 9 | 377 | 54 | 290 | 36 | 273 | 34 | 70 | 29 | 60 | 1 | 0 | 0 | 9 |
24,004 | pytest-dev/pytest | testing/python/fixtures.py | fixtures.TestShowFixtures | import textwrap
import pytest
from _pytest.pytester import Pytester
class TestShowFixtures:
def test_funcarg_compat(self, pytester: Pytester) -> None:
config = pytester.parseconfigure('--funcargs')
assert config.option.showfixtures
def test_show_help(self, pytester: Pytester) -> None:
... |
class TestShowFixtures:
def test_funcarg_compat(self, pytester: Pytester) -> None:
pass
def test_show_help(self, pytester: Pytester) -> None:
pass
def test_show_fixtures(self, pytester: Pytester) -> None:
pass
def test_show_fixtures_verbose(self, pytester: Pytester) -> None:... | 18 | 2 | 20 | 1 | 19 | 0 | 1 | 0.01 | 0 | 3 | 1 | 0 | 13 | 0 | 13 | 13 | 290 | 21 | 267 | 36 | 247 | 2 | 55 | 32 | 40 | 2 | 0 | 1 | 15 |
24,005 | pytest-dev/pytest | testing/python/integration.py | integration.TestMockDecoration | import pytest
from _pytest.pytester import Pytester
class TestMockDecoration:
def test_wrapped_getfuncargnames(self) -> None:
from _pytest.compat import getfuncargnames
def wrap(f):
def func():
pass
func.__wrapped__ = f
return func
@wr... |
class TestMockDecoration:
def test_wrapped_getfuncargnames(self) -> None:
pass
def wrap(f):
pass
def func():
pass
@wrap
def func():
pass
def test_getfuncargnames_patching(self):
pass
class TestM... | 18 | 1 | 14 | 1 | 13 | 0 | 1 | 0.03 | 0 | 2 | 2 | 0 | 9 | 0 | 9 | 9 | 195 | 22 | 169 | 34 | 148 | 5 | 61 | 32 | 42 | 1 | 0 | 0 | 14 |
24,006 | pytest-dev/pytest | testing/python/integration.py | integration.TestNoselikeTestAttribute | from _pytest.pytester import Pytester
class TestNoselikeTestAttribute:
def test_module_with_global_test(self, pytester: Pytester) -> None:
pytester.makepyfile('\n __test__ = False\n def test_hello():\n pass\n ')
reprec = pytester.inline_run()
ass... |
class TestNoselikeTestAttribute:
def test_module_with_global_test(self, pytester: Pytester) -> None:
pass
def test_class_and_method(self, pytester: Pytester) -> None:
pass
def test_unittest_class(self, pytester: Pytester) -> None:
pass
def test_class_with_nasty_getattr(self,... | 5 | 1 | 20 | 2 | 16 | 1 | 1 | 0.08 | 0 | 1 | 1 | 0 | 4 | 0 | 4 | 4 | 82 | 12 | 65 | 13 | 60 | 5 | 26 | 13 | 21 | 1 | 0 | 0 | 4 |
24,007 | pytest-dev/pytest | testing/python/integration.py | integration.TestParameterize | from _pytest.pytester import Pytester
class TestParameterize:
"""#351"""
def test_idfn_marker(self, pytester: Pytester) -> None:
pytester.makepyfile("\n import pytest\n\n def idfn(param):\n if param == 0:\n return 'spam'\n elif par... |
class TestParameterize:
'''#351'''
def test_idfn_marker(self, pytester: Pytester) -> None:
pass
def test_idfn_fixture(self, pytester: Pytester) -> None:
pass
def test_param_rejects_usefixtures(self, pytester: Pytester) -> None:
pass | 4 | 1 | 21 | 2 | 19 | 0 | 1 | 0.02 | 0 | 1 | 1 | 0 | 3 | 0 | 3 | 3 | 68 | 10 | 57 | 7 | 53 | 1 | 13 | 7 | 9 | 1 | 0 | 0 | 3 |
24,008 | pytest-dev/pytest | testing/python/integration.py | integration.TestReRunTests | from _pytest.pytester import Pytester
class TestReRunTests:
def test_rerun(self, pytester: Pytester) -> None:
pytester.makeconftest('\n from _pytest.runner import runtestprotocol\n def pytest_runtest_protocol(item, nextitem):\n runtestprotocol(item, log=False, nextitem... |
class TestReRunTests:
def test_rerun(self, pytester: Pytester) -> None:
pass | 2 | 0 | 37 | 0 | 37 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 38 | 0 | 38 | 3 | 36 | 0 | 7 | 3 | 5 | 1 | 0 | 0 | 1 |
24,009 | pytest-dev/pytest | testing/python/metafunc.py | metafunc.TestMarkersWithParametrization | from _pytest.pytester import Pytester
import pytest
from _pytest.outcomes import fail
class TestMarkersWithParametrization:
"""#308"""
def test_simple_mark(self, pytester: Pytester) -> None:
s = '\n import pytest\n\n @pytest.mark.foo\n @pytest.mark.parametrize(("n", "e... | null | 18 | 2 | 19 | 2 | 17 | 0 | 1 | 0.01 | 0 | 2 | 1 | 0 | 15 | 0 | 15 | 15 | 302 | 39 | 260 | 49 | 240 | 3 | 82 | 45 | 66 | 2 | 0 | 1 | 18 |
24,010 | pytest-dev/pytest | testing/python/metafunc.py | metafunc.TestMetafunc | from collections.abc import Sequence
from _pytest.pytester import Pytester
from _pytest import fixtures
from collections.abc import Iterator
import pytest
from hypothesis import strategies
from _pytest.outcomes import fail
import re
from _pytest.scope import Scope
import hypothesis
from _pytest.compat import NOTSET
imp... |
class TestMetafunc:
def Metafunc(self, func, config=None) -> python.Metafunc:
pass
class FuncFixtureInfoMock:
def __init__(self, names):
pass
@dataclasses.dataclass
class FixtureManagerMock:
@dataclasses.dataclass
class Session... | 124 | 28 | 11 | 1 | 9 | 1 | 1 | 0.09 | 0 | 36 | 18 | 0 | 58 | 0 | 58 | 58 | 1,091 | 160 | 857 | 222 | 718 | 78 | 404 | 201 | 289 | 2 | 0 | 1 | 108 |
24,011 | pytest-dev/pytest | testing/python/metafunc.py | metafunc.TestMetafuncFunctional | import pytest
import textwrap
from _pytest.pytester import Pytester
from _pytest.python import Function
class TestMetafuncFunctional:
def test_attributes(self, pytester: Pytester) -> None:
p = pytester.makepyfile("\n # assumes that generate/provide runs in the same process\n import s... |
class TestMetafuncFunctional:
def test_attributes(self, pytester: Pytester) -> None:
pass
def test_two_functions(self, pytester: Pytester) -> None:
pass
def test_noself_in_method(self, pytester: Pytester) -> None:
pass
def test_generate_tests_in_class(self, pytester: Pyteste... | 28 | 6 | 21 | 2 | 19 | 0 | 1 | 0.02 | 0 | 4 | 2 | 0 | 25 | 0 | 25 | 25 | 557 | 68 | 478 | 76 | 440 | 11 | 118 | 64 | 92 | 1 | 0 | 0 | 25 |
24,012 | pytest-dev/pytest | testing/python/metafunc.py | metafunc.TestMetafuncFunctionalAuto | import sys
from _pytest.pytester import Pytester
class TestMetafuncFunctionalAuto:
"""Tests related to automatically find out the correct scope for
parametrized tests (#1832)."""
def test_parametrize_auto_scope(self, pytester: Pytester) -> None:
pytester.makepyfile('\n import pytest\n\n... |
class TestMetafuncFunctionalAuto:
'''Tests related to automatically find out the correct scope for
parametrized tests (#1832).'''
def test_parametrize_auto_scope(self, pytester: Pytester) -> None:
pass
def test_parametrize_auto_scope_indirect(self, pytester: Pytester) -> None:
pass
... | 7 | 2 | 25 | 4 | 21 | 0 | 1 | 0.02 | 0 | 3 | 1 | 0 | 6 | 0 | 6 | 6 | 161 | 29 | 129 | 18 | 120 | 3 | 33 | 16 | 26 | 1 | 0 | 0 | 6 |
24,013 | pytest-dev/pytest | doc/en/example/multipython.py | multipython.Python | import subprocess
import textwrap
import pytest
import shutil
class Python:
def __init__(self, version, picklefile):
self.pythonpath = shutil.which(version)
if not self.pythonpath:
pytest.skip(f'{version!r} not found')
self.picklefile = picklefile
def dumps(self, obj):
... |
class Python:
def __init__(self, version, picklefile):
pass
def dumps(self, obj):
pass
def load_and_is_true(self, expression):
pass | 4 | 0 | 12 | 0 | 12 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 | 2 | 3 | 3 | 38 | 2 | 36 | 8 | 32 | 0 | 15 | 8 | 11 | 2 | 0 | 1 | 4 |
24,014 | pytest-dev/pytest | doc/en/example/nonpython/conftest.py | nonpython.conftest.YamlException | class YamlException(Exception):
"""Custom exception for error reporting.""" | class YamlException(Exception):
'''Custom exception for error reporting.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
24,015 | pytest-dev/pytest | doc/en/example/nonpython/conftest.py | nonpython.conftest.YamlFile | import pytest
class YamlFile(pytest.File):
def collect(self):
import yaml
raw = yaml.safe_load(self.path.open(encoding='utf-8'))
for name, spec in sorted(raw.items()):
yield YamlItem.from_parent(self, name=name, spec=spec) |
class YamlFile(pytest.File):
def collect(self):
pass | 2 | 0 | 7 | 1 | 5 | 1 | 2 | 0.17 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 52 | 8 | 1 | 6 | 5 | 3 | 1 | 6 | 5 | 3 | 2 | 8 | 1 | 2 |
24,016 | pytest-dev/pytest | doc/en/example/nonpython/conftest.py | nonpython.conftest.YamlItem | import pytest
class YamlItem(pytest.Item):
def __init__(self, *, spec, **kwargs):
super().__init__(**kwargs)
self.spec = spec
def runtest(self):
for name, value in sorted(self.spec.items()):
if name != value:
raise YamlException(self, name, value)
def ... |
class YamlItem(pytest.Item):
def __init__(self, *, spec, **kwargs):
pass
def runtest(self):
pass
def repr_failure(self, excinfo):
'''Called when self.runtest() raises an exception.'''
pass
def reportinfo(self):
pass | 5 | 1 | 5 | 0 | 5 | 1 | 2 | 0.1 | 1 | 2 | 1 | 0 | 4 | 1 | 4 | 56 | 25 | 3 | 20 | 7 | 15 | 2 | 14 | 7 | 9 | 3 | 6 | 2 | 7 |
24,017 | pytest-dev/pytest | scripts/prepare-release-pr.py | prepare-release-pr.InvalidFeatureRelease | class InvalidFeatureRelease(Exception):
pass | class InvalidFeatureRelease(Exception):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
24,018 | pytest-dev/pytest | doc/en/example/pythoncollection.py | pythoncollection.TestClass | class TestClass:
def test_method(self):
pass
def test_anothermethod(self):
pass | class TestClass:
def test_method(self):
pass
def test_anothermethod(self):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 6 | 1 | 5 | 3 | 2 | 0 | 5 | 3 | 2 | 1 | 0 | 0 | 2 |
24,019 | pytest-dev/pytest | testing/python/raises.py | raises.TestRaises | import io
from _pytest.pytester import Pytester
import re
from _pytest.outcomes import Failed
import sys
import pytest
from _pytest.warning_types import PytestWarning
class TestRaises:
def test_check_callable(self) -> None:
with pytest.raises(TypeError, match='.* must be callable'):
pytest.rai... |
class TestRaises:
def test_check_callable(self) -> None:
pass
def test_raises(self):
pass
def test_raises_function(self):
pass
def test_raises_does_not_allow_none(self):
pass
def test_raises_false_and_arg(self):
pass
def test_raises_does_not_allow_e... | 43 | 5 | 10 | 1 | 8 | 1 | 1 | 0.14 | 0 | 18 | 8 | 0 | 26 | 0 | 26 | 26 | 328 | 59 | 249 | 66 | 204 | 35 | 174 | 56 | 131 | 3 | 0 | 2 | 37 |
24,020 | pytest-dev/pytest | scripts/update-plugin-list.py | update-plugin-list.PluginInfo | from typing import TypedDict
class PluginInfo(TypedDict):
"""Relevant information about a plugin to generate the summary."""
name: str
summary: str
last_release: str
status: str
requires: str |
class PluginInfo(TypedDict):
'''Relevant information about a plugin to generate the summary.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.17 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 1 | 6 | 1 | 5 | 1 | 6 | 1 | 5 | 0 | 1 | 0 | 0 |
24,021 | ninja-build/ninja | ninja-build_ninja/src/browse.py | browse.HTTPServer | class HTTPServer(socketserver.ThreadingMixIn, httpserver.HTTPServer):
daemon_threads = True | class HTTPServer(socketserver.ThreadingMixIn, httpserver.HTTPServer):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.5 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 3 | 0 | 2 | 2 | 1 | 1 | 2 | 2 | 1 | 0 | 3 | 0 | 0 |
24,022 | ninja-build/ninja | ninja-build_ninja/src/browse.py | browse.RequestHandler | from typing import Tuple, Any
class RequestHandler(httpserver.BaseHTTPRequestHandler):
def do_GET(self) -> None:
assert self.path[0] == '/'
target = unquote(self.path[1:])
if target == '':
self.send_response(302)
self.send_header('Location', '?' + args.initial_targe... |
class RequestHandler(httpserver.BaseHTTPRequestHandler):
def do_GET(self) -> None:
pass
def log_message(self, format: str, *args: Any) -> None:
pass | 3 | 0 | 14 | 2 | 12 | 1 | 3 | 0.08 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 25 | 30 | 5 | 24 | 6 | 21 | 2 | 23 | 6 | 20 | 4 | 3 | 1 | 5 |
24,023 | ninja-build/ninja | ninja-build_ninja/configure.py | configure.Bootstrap | from typing import Optional, Union, Dict, List, Any, TYPE_CHECKING
import subprocess
class Bootstrap:
"""API shim for ninja_syntax.Writer that instead runs the commands.
Used to bootstrap Ninja from scratch. In --bootstrap mode this
class is used to execute all the commands to build an executable.
It... |
class Bootstrap:
'''API shim for ninja_syntax.Writer that instead runs the commands.
Used to bootstrap Ninja from scratch. In --bootstrap mode this
class is used to execute all the commands to build an executable.
It also proxies all calls to an underlying ninja_syntax.Writer, to
behave like non-b... | 12 | 5 | 6 | 0 | 5 | 1 | 1 | 0.33 | 0 | 6 | 1 | 0 | 11 | 4 | 11 | 11 | 84 | 14 | 54 | 26 | 36 | 18 | 43 | 20 | 31 | 3 | 0 | 2 | 16 |
24,024 | ninja-build/ninja | ninja-build_ninja/configure.py | configure.Platform | import subprocess
import sys
import os
from typing import Optional, Union, Dict, List, Any, TYPE_CHECKING
class Platform(object):
"""Represents a host/target platform and its specific build attributes."""
def __init__(self, platform: Optional[str]) -> None:
self._platform = platform
if self._p... |
class Platform(object):
'''Represents a host/target platform and its specific build attributes.'''
def __init__(self, platform: Optional[str]) -> None:
pass
@staticmethod
def known_platforms() -> List[str]:
pass
def platform(self) -> str:
pass
def is_linux(self) -> bo... | 17 | 1 | 4 | 0 | 4 | 0 | 2 | 0.04 | 1 | 3 | 0 | 0 | 14 | 1 | 15 | 15 | 83 | 14 | 68 | 20 | 51 | 3 | 49 | 19 | 33 | 14 | 1 | 1 | 28 |
24,025 | ninja-build/ninja | ninja-build_ninja/misc/ninja_syntax.py | ninja_syntax.Writer | from io import TextIOWrapper
from typing import Dict, List, Match, Optional, Tuple, Union
import textwrap
class Writer(object):
def __init__(self, output: TextIOWrapper, width: int=78) -> None:
self.output = output
self.width = width
def newline(self) -> None:
self.output.write('\n')
... |
class Writer(object):
def __init__(self, output: TextIOWrapper, width: int=78) -> None:
pass
def newline(self) -> None:
pass
def comment(self, text: str) -> None:
pass
def variable(self, key: str, value: Optional[Union[bool, int, float, str, List[str]]], indent: int=0) -> No... | 14 | 2 | 12 | 1 | 11 | 1 | 3 | 0.07 | 1 | 7 | 0 | 0 | 13 | 2 | 13 | 13 | 170 | 22 | 140 | 59 | 93 | 10 | 101 | 26 | 87 | 9 | 1 | 4 | 40 |
24,026 | ninja-build/ninja | ninja-build_ninja/misc/write_fake_manifests.py | write_fake_manifests.GenRandom | import os
from typing import Generator, Optional, Tuple, List, Set
class GenRandom(object):
def __init__(self, src_dir: str) -> None:
self.seen_names: Set[Optional[str]] = set([None])
self.seen_defines: Set[Optional[str]] = set([None])
self.src_dir = src_dir
def _unique_string(self, s... |
class GenRandom(object):
def __init__(self, src_dir: str) -> None:
pass
def _unique_string(self, seen: Set[Optional[str]], avg_options: float=1.3, p_suffix: float=0.1) -> str:
pass
def _n_unique_strings(self, n: int) -> List[str]:
pass
def target_name(self) -> str:
p... | 8 | 0 | 4 | 0 | 4 | 0 | 1 | 0.03 | 1 | 5 | 0 | 0 | 7 | 3 | 7 | 7 | 36 | 6 | 30 | 17 | 22 | 1 | 23 | 14 | 15 | 2 | 1 | 1 | 8 |
24,027 | ninja-build/ninja | ninja-build_ninja/misc/write_fake_manifests.py | write_fake_manifests.Target | from typing import Generator, Optional, Tuple, List, Set
import random
import os
class Target(object):
def __init__(self, gen: GenRandom, kind: int) -> None:
self.name = gen.target_name()
self.dir_path = gen.path()
self.ninja_file_path = os.path.join('obj', self.dir_path, self.name + '.nin... |
class Target(object):
def __init__(self, gen: GenRandom, kind: int) -> None:
pass | 2 | 0 | 14 | 0 | 14 | 0 | 3 | 0 | 1 | 2 | 1 | 0 | 1 | 9 | 1 | 1 | 15 | 0 | 15 | 11 | 13 | 0 | 13 | 11 | 11 | 3 | 1 | 1 | 3 |
24,028 | marcotcr/lime | marcotcr_lime/lime/discretize.py | lime.discretize.BaseDiscretizer | from sklearn.utils import check_random_state
import numpy as np
import scipy
from abc import ABCMeta, abstractmethod
class BaseDiscretizer:
"""
Abstract class - Build a class that inherits from this class to implement
a custom discretizer.
Method bins() is to be redefined in the child class, as it is t... |
class BaseDiscretizer:
'''
Abstract class - Build a class that inherits from this class to implement
a custom discretizer.
Method bins() is to be redefined in the child class, as it is the actual
custom part of the discretizer.
'''
def __init__(self, data, categorical_features, feature_nam... | 7 | 4 | 24 | 2 | 17 | 6 | 3 | 0.43 | 0 | 4 | 0 | 4 | 5 | 9 | 5 | 5 | 136 | 15 | 86 | 40 | 78 | 37 | 69 | 38 | 63 | 8 | 0 | 2 | 16 |
24,029 | marcotcr/lime | marcotcr_lime/lime/discretize.py | lime.discretize.DecileDiscretizer | import numpy as np
class DecileDiscretizer(BaseDiscretizer):
def __init__(self, data, categorical_features, feature_names, labels=None, random_state=None):
BaseDiscretizer.__init__(self, data, categorical_features, feature_names, labels=labels, random_state=random_state)
def bins(self, data, labels):... |
class DecileDiscretizer(BaseDiscretizer):
def __init__(self, data, categorical_features, feature_names, labels=None, random_state=None):
pass
def bins(self, data, labels):
pass | 3 | 0 | 6 | 0 | 6 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 7 | 13 | 1 | 12 | 6 | 9 | 0 | 9 | 6 | 6 | 2 | 1 | 1 | 3 |
24,030 | marcotcr/lime | marcotcr_lime/lime/discretize.py | lime.discretize.EntropyDiscretizer | import sklearn
import sklearn.tree
import numpy as np
class EntropyDiscretizer(BaseDiscretizer):
def __init__(self, data, categorical_features, feature_names, labels=None, random_state=None):
if labels is None:
raise ValueError('Labels must be not None when using E... |
class EntropyDiscretizer(BaseDiscretizer):
def __init__(self, data, categorical_features, feature_names, labels=None, random_state=None):
pass
def bins(self, data, labels):
pass | 3 | 0 | 13 | 2 | 11 | 1 | 3 | 0.04 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 7 | 28 | 4 | 23 | 8 | 20 | 1 | 17 | 8 | 14 | 3 | 1 | 2 | 5 |
24,031 | marcotcr/lime | marcotcr_lime/lime/discretize.py | lime.discretize.QuartileDiscretizer | import numpy as np
class QuartileDiscretizer(BaseDiscretizer):
def __init__(self, data, categorical_features, feature_names, labels=None, random_state=None):
BaseDiscretizer.__init__(self, data, categorical_features, feature_names, labels=labels, random_state=random_state)
def bins(self, data, labels... |
class QuartileDiscretizer(BaseDiscretizer):
def __init__(self, data, categorical_features, feature_names, labels=None, random_state=None):
pass
def bins(self, data, labels):
pass | 3 | 0 | 6 | 1 | 5 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 7 | 13 | 2 | 11 | 6 | 8 | 0 | 9 | 6 | 6 | 2 | 1 | 1 | 3 |
24,032 | marcotcr/lime | marcotcr_lime/lime/discretize.py | lime.discretize.StatsDiscretizer | import numpy as np
class StatsDiscretizer(BaseDiscretizer):
"""
Class to be used to supply the data stats info when discretize_continuous is true
"""
def __init__(self, data, categorical_features, feature_names, labels=None, random_state=None, data_stats=None):
BaseDiscretizer.__init__(sel... |
class StatsDiscretizer(BaseDiscretizer):
'''
Class to be used to supply the data stats info when discretize_continuous is true
'''
def __init__(self, data, categorical_features, feature_names, labels=None, random_state=None, data_stats=None):
pass
def bins(self, data, labels):
... | 3 | 1 | 9 | 1 | 8 | 0 | 3 | 0.18 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 7 | 23 | 3 | 17 | 9 | 13 | 3 | 13 | 8 | 10 | 4 | 1 | 3 | 5 |
24,033 | marcotcr/lime | marcotcr_lime/lime/exceptions.py | lime.exceptions.LimeError | class LimeError(Exception):
"""Raise for errors""" | class LimeError(Exception):
'''Raise for errors'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
24,034 | marcotcr/lime | marcotcr_lime/lime/explanation.py | lime.explanation.DomainMapper | class DomainMapper(object):
"""Class for mapping features to the specific domain.
The idea is that there would be a subclass for each domain (text, tables,
images, etc), so that we can have a general Explanation class, and separate
out the specifics of visualizing features in here.
"""
def __i... | class DomainMapper(object):
'''Class for mapping features to the specific domain.
The idea is that there would be a subclass for each domain (text, tables,
images, etc), so that we can have a general Explanation class, and separate
out the specifics of visualizing features in here.
'''
def __in... | 4 | 3 | 13 | 2 | 4 | 7 | 1 | 2.17 | 1 | 0 | 0 | 2 | 3 | 0 | 3 | 3 | 48 | 10 | 12 | 9 | 3 | 26 | 7 | 4 | 3 | 1 | 1 | 0 | 3 |
24,035 | marcotcr/lime | marcotcr_lime/lime/explanation.py | lime.explanation.Explanation | import numpy as np
from sklearn.utils import check_random_state
import os
import os.path
from .exceptions import LimeError
import json
from io import open
class Explanation(object):
"""Object returned by explainers."""
def __init__(self, domain_mapper, mode='classification', class_names=None, random_state=Non... |
class Explanation(object):
'''Object returned by explainers.'''
def __init__(self, domain_mapper, mode='classification', class_names=None, random_state=None):
'''
Initializer.
Args:
domain_mapper: must inherit from DomainMapper class
type: "classification" or "r... | 10 | 9 | 27 | 3 | 18 | 7 | 3 | 0.41 | 1 | 6 | 1 | 0 | 8 | 14 | 8 | 8 | 255 | 34 | 158 | 65 | 129 | 64 | 89 | 48 | 77 | 8 | 1 | 2 | 23 |
24,036 | marcotcr/lime | marcotcr_lime/lime/lime_base.py | lime.lime_base.LimeBase | import scipy as sp
import numpy as np
from sklearn.utils import check_random_state
from sklearn.linear_model import Ridge, lars_path
class LimeBase(object):
"""Class for learning a locally linear sparse model from perturbed data"""
def __init__(self, kernel_fn, verbose=False, random_state=None):
"""In... |
class LimeBase(object):
'''Class for learning a locally linear sparse model from perturbed data'''
def __init__(self, kernel_fn, verbose=False, random_state=None):
'''Init function
Args:
kernel_fn: function that transforms an array of distances into an
array... | 7 | 6 | 38 | 2 | 25 | 11 | 5 | 0.45 | 1 | 4 | 0 | 0 | 4 | 3 | 5 | 5 | 198 | 13 | 128 | 52 | 111 | 57 | 85 | 41 | 79 | 14 | 1 | 6 | 24 |
24,037 | marcotcr/lime | marcotcr_lime/lime/lime_image.py | lime.lime_image.ImageExplanation | import numpy as np
class ImageExplanation(object):
def __init__(self, image, segments):
"""Init function.
Args:
image: 3d numpy array
segments: 2d numpy array, with the output from skimage.segmentation
"""
self.image = image
self.segments = segments... |
class ImageExplanation(object):
def __init__(self, image, segments):
'''Init function.
Args:
image: 3d numpy array
segments: 2d numpy array, with the output from skimage.segmentation
'''
pass
def get_image_and_mask(self, label, positive_only=True, negat... | 3 | 2 | 34 | 2 | 21 | 12 | 7 | 0.55 | 1 | 2 | 0 | 0 | 2 | 6 | 2 | 2 | 69 | 4 | 42 | 19 | 38 | 23 | 37 | 18 | 34 | 12 | 1 | 3 | 13 |
24,038 | marcotcr/lime | marcotcr_lime/lime/lime_image.py | lime.lime_image.LimeImageExplainer | from . import lime_base
from .wrappers.scikit_image import SegmentationAlgorithm
from functools import partial
import copy
from sklearn.utils import check_random_state
from tqdm.auto import tqdm
import sklearn
import numpy as np
from skimage.color import gray2rgb
class LimeImageExplainer(object):
"""Explains predi... |
class LimeImageExplainer(object):
'''Explains predictions on Image (i.e. matrix) data.
For numerical features, perturb them by sampling from a Normal(0,1) and
doing the inverse operation of mean-centering and scaling, according to the
means and stds in the training data. For categorical features, pertu... | 5 | 4 | 44 | 4 | 24 | 17 | 4 | 0.78 | 1 | 7 | 3 | 0 | 3 | 3 | 3 | 3 | 184 | 18 | 93 | 44 | 72 | 73 | 57 | 28 | 52 | 8 | 1 | 2 | 17 |
24,039 | marcotcr/lime | marcotcr_lime/lime/lime_tabular.py | lime.lime_tabular.LimeTabularExplainer | from lime.discretize import StatsDiscretizer
import collections
from lime.discretize import QuartileDiscretizer
import numpy as np
import copy
from lime.discretize import BaseDiscretizer
from scipy.stats.distributions import norm
from . import lime_base
from pyDOE2 import lhs
from lime.discretize import EntropyDiscreti... |
class LimeTabularExplainer(object):
'''Explains predictions on tabular (i.e. matrix) data.
For numerical features, perturb them by sampling from a Normal(0,1) and
doing the inverse operation of mean-centering and scaling, according to the
means and stds in the training data. For categorical features, p... | 9 | 5 | 75 | 6 | 51 | 18 | 9 | 0.38 | 1 | 24 | 8 | 1 | 3 | 14 | 5 | 5 | 462 | 40 | 305 | 101 | 268 | 117 | 195 | 71 | 188 | 22 | 1 | 3 | 54 |
24,040 | marcotcr/lime | marcotcr_lime/lime/lime_tabular.py | lime.lime_tabular.RecurrentTabularExplainer | import numpy as np
class RecurrentTabularExplainer(LimeTabularExplainer):
"""
An explainer for keras-style recurrent neural networks, where the
input shape is (n_samples, n_timesteps, n_features). This class
just extends the LimeTabularExplainer class and reshapes the training
data and feature name... |
class RecurrentTabularExplainer(LimeTabularExplainer):
'''
An explainer for keras-style recurrent neural networks, where the
input shape is (n_samples, n_timesteps, n_features). This class
just extends the LimeTabularExplainer class and reshapes the training
data and feature names such that they be... | 5 | 4 | 35 | 3 | 14 | 18 | 1 | 1.63 | 1 | 2 | 0 | 0 | 3 | 2 | 3 | 8 | 150 | 16 | 51 | 17 | 39 | 83 | 21 | 10 | 16 | 2 | 2 | 1 | 5 |
24,041 | marcotcr/lime | marcotcr_lime/lime/lime_tabular.py | lime.lime_tabular.TableDomainMapper | import scipy as sp
from . import explanation
import json
class TableDomainMapper(explanation.DomainMapper):
"""Maps feature ids to names, generates table views, etc"""
def __init__(self, feature_names, feature_values, scaled_row, categorical_features, discretized_feature_names=None, feature_indexes=None):
... |
class TableDomainMapper(explanation.DomainMapper):
'''Maps feature ids to names, generates table views, etc'''
def __init__(self, feature_names, feature_values, scaled_row, categorical_features, discretized_feature_names=None, feature_indexes=None):
'''Init.
Args:
feature_names: li... | 4 | 4 | 28 | 1 | 18 | 8 | 3 | 0.45 | 1 | 5 | 0 | 0 | 3 | 8 | 3 | 6 | 88 | 7 | 56 | 28 | 44 | 25 | 35 | 20 | 31 | 6 | 2 | 2 | 10 |
24,042 | marcotcr/lime | marcotcr_lime/lime/lime_text.py | lime.lime_text.IndexedCharacters | import numpy as np
import itertools
class IndexedCharacters(object):
"""String with various indexes."""
def __init__(self, raw_string, bow=True, mask_string=None):
"""Initializer.
Args:
raw_string: string with raw text in it
bow: if True, a char is the same everywhere ... |
class IndexedCharacters(object):
'''String with various indexes.'''
def __init__(self, raw_string, bow=True, mask_string=None):
'''Initializer.
Args:
raw_string: string with raw text in it
bow: if True, a char is the same everywhere in the text - i.e. we
... | 8 | 8 | 11 | 1 | 7 | 3 | 2 | 0.46 | 1 | 5 | 0 | 0 | 7 | 8 | 7 | 7 | 87 | 11 | 52 | 21 | 44 | 24 | 46 | 21 | 38 | 7 | 1 | 3 | 17 |
24,043 | marcotcr/lime | marcotcr_lime/lime/lime_text.py | lime.lime_text.IndexedString | import re
import itertools
import numpy as np
class IndexedString(object):
"""String with various indexes."""
def __init__(self, raw_string, split_expression='\\W+', bow=True, mask_string=None):
"""Initializer.
Args:
raw_string: string with raw text in it
split_express... | null | 11 | 9 | 13 | 1 | 9 | 3 | 3 | 0.35 | 1 | 6 | 0 | 0 | 7 | 8 | 8 | 8 | 129 | 16 | 84 | 31 | 72 | 29 | 74 | 29 | 64 | 9 | 1 | 3 | 26 |
24,044 | marcotcr/lime | marcotcr_lime/lime/lime_text.py | lime.lime_text.LimeTextExplainer | from sklearn.utils import check_random_state
import sklearn
import scipy as sp
import numpy as np
from functools import partial
from . import lime_base
from . import explanation
class LimeTextExplainer(object):
"""Explains text classifiers.
Currently, we are using an exponential kernel on cosine distance, a... |
class LimeTextExplainer(object):
'''Explains text classifiers.
Currently, we are using an exponential kernel on cosine distance, and
restricting explanations to words that are present in documents.'''
def __init__(self, kernel_width=25, kernel=None, verbose=False, class_names=None, feature_selec... | 6 | 4 | 37 | 2 | 18 | 16 | 2 | 0.98 | 1 | 10 | 5 | 0 | 3 | 9 | 3 | 3 | 185 | 15 | 86 | 52 | 58 | 84 | 46 | 30 | 40 | 5 | 1 | 1 | 11 |
24,045 | marcotcr/lime | marcotcr_lime/lime/lime_text.py | lime.lime_text.TextDomainMapper | from . import explanation
import re
import json
import itertools
class TextDomainMapper(explanation.DomainMapper):
"""Maps feature ids to words or word-positions"""
def __init__(self, indexed_string):
"""Initializer.
Args:
indexed_string: lime_text.IndexedString, original string
... |
class TextDomainMapper(explanation.DomainMapper):
'''Maps feature ids to words or word-positions'''
def __init__(self, indexed_string):
'''Initializer.
Args:
indexed_string: lime_text.IndexedString, original string
'''
pass
def map_exp_ids(self, exp, positions=... | 4 | 4 | 19 | 1 | 10 | 7 | 2 | 0.69 | 1 | 6 | 0 | 0 | 3 | 1 | 3 | 6 | 61 | 7 | 32 | 8 | 27 | 22 | 18 | 7 | 14 | 2 | 2 | 1 | 5 |
24,046 | marcotcr/lime | marcotcr_lime/lime/submodular_pick.py | lime.submodular_pick.SubmodularPick | import warnings
import numpy as np
class SubmodularPick(object):
"""Class for submodular pick
Saves a representative sample of explanation objects using SP-LIME,
as well as saving all generated explanations
First, a collection of candidate explanations are generated
(see explain_instance). From t... |
class SubmodularPick(object):
'''Class for submodular pick
Saves a representative sample of explanation objects using SP-LIME,
as well as saving all generated explanations
First, a collection of candidate explanations are generated
(see explain_instance). From these candidates, num_exps_desired are... | 2 | 2 | 114 | 10 | 74 | 31 | 20 | 0.49 | 1 | 6 | 0 | 0 | 1 | 3 | 1 | 1 | 124 | 13 | 75 | 32 | 65 | 37 | 56 | 24 | 54 | 20 | 1 | 4 | 20 |
24,047 | marcotcr/lime | marcotcr_lime/lime/wrappers/scikit_image.py | lime.wrappers.scikit_image.BaseWrapper | from lime.utils.generic_utils import has_arg
import types
class BaseWrapper(object):
"""Base class for LIME Scikit-Image wrapper
Args:
target_fn: callable function or class instance
target_params: dict, parameters to pass to the target_fn
'target_params' takes parameters required to ins... |
class BaseWrapper(object):
'''Base class for LIME Scikit-Image wrapper
Args:
target_fn: callable function or class instance
target_params: dict, parameters to pass to the target_fn
'target_params' takes parameters required to instanciate the
desired Scikit-Image class/model
... | 5 | 4 | 16 | 1 | 9 | 6 | 3 | 0.81 | 1 | 3 | 0 | 1 | 4 | 2 | 4 | 4 | 79 | 12 | 37 | 12 | 32 | 30 | 30 | 12 | 25 | 8 | 1 | 4 | 13 |
24,048 | marcotcr/lime | marcotcr_lime/lime/wrappers/scikit_image.py | lime.wrappers.scikit_image.SegmentationAlgorithm | from skimage.segmentation import felzenszwalb, slic, quickshift
class SegmentationAlgorithm(BaseWrapper):
""" Define the image segmentation function based on Scikit-Image
implementation and a set of provided parameters
Args:
algo_type: string, segmentation algorithm among the follo... |
class SegmentationAlgorithm(BaseWrapper):
''' Define the image segmentation function based on Scikit-Image
implementation and a set of provided parameters
Args:
algo_type: string, segmentation algorithm among the following:
'quickshift', 'slic', 'felzenszwalb'
... | 3 | 1 | 8 | 0 | 8 | 0 | 3 | 0.47 | 1 | 0 | 0 | 0 | 2 | 1 | 2 | 6 | 28 | 3 | 17 | 5 | 14 | 8 | 15 | 5 | 12 | 4 | 2 | 1 | 5 |
24,049 | Miserlou/Zappa | Miserlou_Zappa/example/authmodule.py | authmodule.AuthPolicy | import re
class AuthPolicy:
awsAccountId = ''
'The AWS account id the policy will be generated for. This is used to create the method ARNs.'
principalId = ''
'The principal used for the policy, this should be a unique identifier for the end user.'
version = '2012-10-17'
"The policy version used... |
class AuthPolicy:
def __init__(self, principal, awsAccountId):
pass
def _addMethod(self, effect, verb, resource, conditions):
'''Adds a method to the internal lists of allowed or denied methods. Each object in
the internal list contains a resource ARN and a condition statement. The co... | 12 | 10 | 10 | 1 | 7 | 2 | 2 | 0.4 | 0 | 2 | 1 | 0 | 11 | 0 | 11 | 11 | 146 | 24 | 87 | 29 | 75 | 35 | 62 | 29 | 50 | 6 | 0 | 3 | 20 |
24,050 | Miserlou/Zappa | Miserlou_Zappa/zappa/asynchronous.py | zappa.asynchronous.AsyncException | class AsyncException(Exception):
""" Simple exception class for async tasks. """
pass | class AsyncException(Exception):
''' Simple exception class for async tasks. '''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 3 | 0 | 2 | 1 | 1 | 2 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
24,051 | Miserlou/Zappa | Miserlou_Zappa/zappa/asynchronous.py | zappa.asynchronous.LambdaAsyncResponse | import json
import uuid
class LambdaAsyncResponse:
"""
Base Response Dispatcher class
Can be used directly or subclassed if the method to send the message is changed.
"""
def __init__(self, lambda_function_name=None, aws_region=None, capture_response=False, **kwargs):
""" """
if kw... |
class LambdaAsyncResponse:
'''
Base Response Dispatcher class
Can be used directly or subclassed if the method to send the message is changed.
'''
def __init__(self, lambda_function_name=None, aws_region=None, capture_response=False, **kwargs):
''' '''
pass
def send(self, ... | 4 | 4 | 17 | 1 | 14 | 3 | 2 | 0.33 | 0 | 2 | 1 | 1 | 3 | 7 | 3 | 3 | 60 | 6 | 43 | 13 | 39 | 14 | 26 | 13 | 22 | 4 | 0 | 2 | 7 |
24,052 | Miserlou/Zappa | Miserlou_Zappa/zappa/asynchronous.py | zappa.asynchronous.SnsAsyncResponse | import json
from .utilities import get_topic_name
import uuid
class SnsAsyncResponse(LambdaAsyncResponse):
"""
Send a SNS message to a specified SNS topic
Serialise the func path and arguments
"""
def __init__(self, lambda_function_name=None, aws_region=None, capture_response=False, **kwargs):
... |
class SnsAsyncResponse(LambdaAsyncResponse):
'''
Send a SNS message to a specified SNS topic
Serialise the func path and arguments
'''
def __init__(self, lambda_function_name=None, aws_region=None, capture_response=False, **kwargs):
pass
def _send(self, message):
'''
G... | 3 | 2 | 29 | 4 | 23 | 4 | 4 | 0.24 | 1 | 2 | 1 | 0 | 2 | 8 | 2 | 5 | 64 | 9 | 46 | 14 | 43 | 11 | 30 | 14 | 27 | 6 | 1 | 2 | 8 |
24,053 | Miserlou/Zappa | Miserlou_Zappa/zappa/cli.py | zappa.cli.ZappaCLI | import pkgutil
import base64
import zipfile
import argparse
import yaml
import argcomplete
import toml
import time
from builtins import input, bytes
import tempfile
from past.builtins import basestring
import sys
import string
import slugify
import requests
import re
import random
import pkg_resources
import os
from .u... |
class ZappaCLI:
'''
ZappaCLI object is responsible for loading the settings,
handling the input arguments and executing the calls to the core library.
'''
def __init__(self):
pass
@property
def stage_config(self):
'''
A shortcut property for settings of a stage.
... | 50 | 44 | 55 | 7 | 39 | 10 | 8 | 0.26 | 0 | 25 | 1 | 0 | 44 | 23 | 44 | 44 | 2,666 | 390 | 1,858 | 377 | 1,801 | 488 | 1,275 | 339 | 1,220 | 32 | 0 | 5 | 372 |
24,054 | Miserlou/Zappa | Miserlou_Zappa/zappa/core.py | zappa.core.Zappa | import string
import shutil
import re
from .utilities import add_event_source, conflicts_with_a_neighbouring_module, contains_python_files_or_subdirs, copytree, get_topic_name, get_venv_from_python_version, human_size, remove_event_source
import random
from tqdm import tqdm
import os
from botocore.exceptions import Cli... |
class Zappa:
'''
Zappa!
Makes it easy to run Python web applications on AWS Lambda/API Gateway.
'''
def __init__(self, boto_session=None, profile_name=None, aws_region=None, load_credentials=True, desired_role_name=None, desired_role_arn=None, runtime='python3.6', tags=(), endpoint_urls={}, xray_t... | 97 | 82 | 33 | 3 | 23 | 7 | 4 | 0.31 | 0 | 26 | 0 | 0 | 77 | 26 | 86 | 86 | 3,006 | 397 | 2,019 | 568 | 1,784 | 629 | 1,235 | 404 | 1,142 | 45 | 0 | 5 | 386 |
24,055 | Miserlou/Zappa | Miserlou_Zappa/zappa/handler.py | zappa.handler.LambdaHandler | import logging
import importlib
import sys
import base64
import tarfile
from werkzeug.wrappers import Response
import traceback
import datetime
from builtins import str
import os
import inspect
import collections
import boto3
import json
class LambdaHandler:
"""
Singleton for avoiding duplicate setup.
Pat... |
class LambdaHandler:
'''
Singleton for avoiding duplicate setup.
Pattern provided by @benbangert.
'''
def __new__(cls, settings_name='zappa_settings', session=None):
'''Singleton instance to avoid repeat setup'''
pass
def __init__(self, settings_name='zappa_settings', session=... | 17 | 10 | 45 | 5 | 29 | 11 | 8 | 0.39 | 0 | 13 | 1 | 0 | 8 | 0 | 12 | 12 | 571 | 79 | 365 | 98 | 341 | 141 | 313 | 87 | 293 | 37 | 0 | 5 | 94 |
24,056 | Miserlou/Zappa | Miserlou_Zappa/zappa/middleware.py | zappa.middleware.ZappaWSGIMiddleware | from werkzeug.wsgi import ClosingIterator
class ZappaWSGIMiddleware:
"""
Middleware functions necessary for a Zappa deployment.
Most hacks have now been remove except for Set-Cookie permutation.
"""
def __init__(self, application):
self.application = application
def __call__(self, en... |
class ZappaWSGIMiddleware:
'''
Middleware functions necessary for a Zappa deployment.
Most hacks have now been remove except for Set-Cookie permutation.
'''
def __init__(self, application):
pass
def __call__(self, environ, start_response):
'''
We must case-mangle the S... | 4 | 3 | 14 | 2 | 6 | 5 | 1 | 1.15 | 0 | 2 | 0 | 0 | 2 | 1 | 2 | 2 | 35 | 7 | 13 | 8 | 9 | 15 | 11 | 8 | 7 | 1 | 0 | 0 | 3 |
24,057 | Miserlou/Zappa | Miserlou_Zappa/zappa/utilities.py | zappa.utilities.InvalidAwsLambdaName | class InvalidAwsLambdaName(Exception):
"""Exception: proposed AWS Lambda name is invalid"""
pass | class InvalidAwsLambdaName(Exception):
'''Exception: proposed AWS Lambda name is invalid'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 3 | 0 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
24,058 | jopohl/urh | jopohl_urh/setup.py | setup.build_ext | class build_ext(_build_ext):
def finalize_options(self):
print('Finalizing options')
_build_ext.finalize_options(self)
set_builtin('__NUMPY_SETUP__', False)
import numpy
self.include_dirs.append(numpy.get_include()) | class build_ext(_build_ext):
def finalize_options(self):
pass | 2 | 0 | 8 | 1 | 6 | 1 | 1 | 0.14 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 9 | 1 | 7 | 3 | 4 | 1 | 7 | 3 | 4 | 1 | 0 | 0 | 1 |
24,059 | jopohl/urh | jopohl_urh/src/urh/awre/CommonRange.py | urh.awre.CommonRange.ChecksumRange | import numpy as np
from urh.util.GenericCRC import GenericCRC
class ChecksumRange(CommonRange):
def __init__(self, start, length, crc: GenericCRC, data_range_start, data_range_end, value: np.ndarray=None, score=0, field_type='Generic', message_indices=None, range_type='bit'):
super().__init__(start, lengt... |
class ChecksumRange(CommonRange):
def __init__(self, start, length, crc: GenericCRC, data_range_start, data_range_end, value: np.ndarray=None, score=0, field_type='Generic', message_indices=None, range_type='bit'):
pass
@property
def data_range_bit_start(self):
pass
@property
def d... | 9 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 6 | 3 | 6 | 24 | 55 | 5 | 50 | 24 | 29 | 0 | 16 | 10 | 9 | 1 | 2 | 0 | 6 |
24,060 | jopohl/urh | jopohl_urh/src/urh/awre/CommonRange.py | urh.awre.CommonRange.CommonRange | import numpy as np
import copy
from urh.util import util
class CommonRange(object):
def __init__(self, start, length, value: np.ndarray=None, score=0, field_type='Generic', message_indices=None, range_type='bit', byte_order='big'):
"""
:param start:
:param length:
:param value: Va... |
class CommonRange(object):
def __init__(self, start, length, value: np.ndarray=None, score=0, field_type='Generic', message_indices=None, range_type='bit', byte_order='big'):
'''
:param start:
:param length:
:param value: Value for this common range as string
'''
pa... | 28 | 2 | 9 | 1 | 8 | 1 | 2 | 0.13 | 1 | 8 | 0 | 2 | 18 | 9 | 18 | 18 | 195 | 32 | 146 | 51 | 108 | 19 | 90 | 32 | 71 | 5 | 1 | 1 | 36 |
24,061 | jopohl/urh | jopohl_urh/src/urh/awre/CommonRange.py | urh.awre.CommonRange.CommonRangeContainer | import itertools
class CommonRangeContainer(object):
"""
This is the raw equivalent of a Message Type:
A container of common ranges
"""
def __init__(self, ranges: list, message_indices: set=None):
assert isinstance(ranges, list)
self.__ranges = ranges
self.__ranges.sort()
... |
class CommonRangeContainer(object):
'''
This is the raw equivalent of a Message Type:
A container of common ranges
'''
def __init__(self, ranges: list, message_indices: set=None):
pass
@property
def ranges_overlap(self) -> bool:
pass
def update_message_indices(self):
... | 16 | 1 | 4 | 0 | 4 | 0 | 2 | 0.09 | 1 | 6 | 1 | 0 | 12 | 2 | 13 | 13 | 75 | 18 | 53 | 21 | 36 | 5 | 46 | 19 | 31 | 3 | 1 | 2 | 20 |
24,062 | jopohl/urh | jopohl_urh/src/urh/awre/CommonRange.py | urh.awre.CommonRange.EmptyCommonRange | class EmptyCommonRange(CommonRange):
"""
Empty Common Bit Range, to indicate, that no common Bit Range was found
"""
def __init__(self, field_type='Generic'):
super().__init__(0, 0, '')
self.field_type = field_type
def __eq__(self, other):
return isinstance(other, EmptyComm... | class EmptyCommonRange(CommonRange):
'''
Empty Common Bit Range, to indicate, that no common Bit Range was found
'''
def __init__(self, field_type='Generic'):
pass
def __eq__(self, other):
pass
def __repr__(self):
pass
def __hash__(self):
pass | 5 | 1 | 3 | 0 | 3 | 0 | 1 | 0.25 | 1 | 1 | 0 | 0 | 4 | 1 | 4 | 22 | 19 | 4 | 12 | 6 | 7 | 3 | 10 | 6 | 5 | 1 | 2 | 0 | 4 |
24,063 | jopohl/urh | jopohl_urh/src/urh/awre/FormatFinder.py | urh.awre.FormatFinder.FormatFinder | from urh.awre.engines.AddressEngine import AddressEngine
from urh.awre.engines.LengthEngine import LengthEngine
from urh.awre.engines.SequenceNumberEngine import SequenceNumberEngine
from urh.util.WSPChecksum import WSPChecksum
from urh.awre import AutoAssigner
from urh.awre.CommonRange import CommonRange, EmptyCommonR... |
class FormatFinder(object):
def __init__(self, messages, participants=None, shortest_field_length=None):
'''
:type messages: list of Message
:param participants:
'''
pass
@property
def message_types(self):
'''
:rtype: list of MessageType
'''
... | 27 | 10 | 35 | 4 | 26 | 6 | 5 | 0.23 | 1 | 22 | 15 | 0 | 5 | 9 | 15 | 15 | 557 | 74 | 398 | 109 | 367 | 91 | 203 | 90 | 187 | 14 | 1 | 5 | 75 |
24,064 | jopohl/urh | jopohl_urh/src/urh/awre/Histogram.py | urh.awre.Histogram.Histogram | import numpy as np
from collections import defaultdict
from urh.cythonext import awre_util
from urh.awre.CommonRange import CommonRange
class Histogram(object):
"""
Create a histogram based on the equalness of vectors
"""
def __init__(self, vectors, indices=None, normalize=True, debug=False):
... |
class Histogram(object):
'''
Create a histogram based on the equalness of vectors
'''
def __init__(self, vectors, indices=None, normalize=True, debug=False):
'''
:type vectors: list of np.ndarray
:param indices: Indices of vectors for which the Histogram shall be created.
... | 9 | 4 | 13 | 1 | 9 | 3 | 2 | 0.32 | 1 | 6 | 1 | 0 | 8 | 4 | 8 | 8 | 118 | 19 | 76 | 25 | 66 | 24 | 54 | 25 | 44 | 7 | 1 | 3 | 18 |
24,065 | jopohl/urh | jopohl_urh/src/urh/awre/MessageTypeBuilder.py | urh.awre.MessageTypeBuilder.MessageTypeBuilder | from urh.signalprocessing.ChecksumLabel import ChecksumLabel
from urh.signalprocessing.FieldType import FieldType
from urh.signalprocessing.MessageType import MessageType
from urh.signalprocessing.ProtocoLabel import ProtocolLabel
class MessageTypeBuilder(object):
def __init__(self, name: str):
self.name ... |
class MessageTypeBuilder(object):
def __init__(self, name: str):
pass
def add_label(self, label_type: FieldType.Function, length: int, name: str=None):
pass
def add_checksum_label(self, length, checksum, data_start=None, data_end=None, name: str=None):
pass | 4 | 0 | 21 | 2 | 19 | 0 | 4 | 0.02 | 1 | 8 | 5 | 0 | 3 | 2 | 3 | 3 | 66 | 8 | 57 | 17 | 51 | 1 | 37 | 15 | 33 | 7 | 1 | 3 | 11 |
24,066 | jopohl/urh | jopohl_urh/src/urh/awre/Preprocessor.py | urh.awre.Preprocessor.Preprocessor | from urh.cythonext import awre_util
import os
import itertools
from collections import defaultdict
from urh.signalprocessing.FieldType import FieldType
import math
import numpy as np
class Preprocessor(object):
"""
This class preprocesses the messages in the following ways
1) Identify preamble / length of ... |
class Preprocessor(object):
'''
This class preprocesses the messages in the following ways
1) Identify preamble / length of preamble
2) Identify sync word(s)
3) Align all given messages on the identified preamble information
'''
def __init__(self, bitvectors: list, existing_message_types: ... | 20 | 6 | 20 | 2 | 15 | 3 | 4 | 0.19 | 1 | 12 | 2 | 0 | 11 | 2 | 15 | 15 | 322 | 53 | 226 | 77 | 197 | 44 | 145 | 62 | 129 | 12 | 1 | 5 | 53 |
24,067 | jopohl/urh | jopohl_urh/src/urh/awre/ProtocolGenerator.py | urh.awre.ProtocolGenerator.ProtocolGenerator | from array import array
import math
from urh.util import util
from collections import defaultdict
from urh.signalprocessing.Message import Message
from urh.signalprocessing.FieldType import FieldType
import struct
from urh.signalprocessing.Participant import Participant
from urh.signalprocessing.MessageType import Mess... |
class ProtocolGenerator(object):
def __init__(self, message_types: list, participants: list=None, preambles_by_mt=None, syncs_by_mt=None, little_endian=False, length_in_bytes=True, sequence_numbers=None, sequence_number_increment=1, message_type_codes=None):
'''
:param message_types:
:para... | 14 | 1 | 34 | 4 | 29 | 1 | 6 | 0.05 | 1 | 16 | 7 | 0 | 8 | 9 | 9 | 9 | 312 | 48 | 256 | 74 | 225 | 13 | 143 | 53 | 132 | 22 | 1 | 3 | 55 |
24,068 | jopohl/urh | jopohl_urh/src/urh/awre/engines/AddressEngine.py | urh.awre.engines.AddressEngine.AddressEngine | import itertools
import numpy as np
import math
from urh.cythonext import awre_util
from urh.awre.CommonRange import CommonRange
from collections import defaultdict, Counter
from array import array
from urh.awre.engines.Engine import Engine
from urh.util.Logger import logger
class AddressEngine(Engine):
def __ini... |
class AddressEngine(Engine):
def __init__(self, msg_vectors, participant_indices, known_participant_addresses: dict=None, already_labeled: list=None, src_field_present=False):
'''
:param msg_vectors: Message data behind synchronization
:type msg_vectors: list of np.ndarray
:param p... | 11 | 3 | 66 | 8 | 51 | 8 | 11 | 0.16 | 1 | 15 | 1 | 0 | 6 | 7 | 8 | 13 | 535 | 68 | 413 | 110 | 391 | 65 | 234 | 94 | 225 | 31 | 2 | 6 | 90 |
24,069 | jopohl/urh | jopohl_urh/src/urh/awre/engines/ChecksumEngine.py | urh.awre.engines.ChecksumEngine.ChecksumEngine | from urh.util.GenericCRC import GenericCRC
import copy
from urh.awre.CommonRange import ChecksumRange
from urh.awre.engines.Engine import Engine
import math
from urh.util.WSPChecksum import WSPChecksum
from urh.cythonext import awre_util
from collections import defaultdict
class ChecksumEngine(Engine):
def __init... |
class ChecksumEngine(Engine):
def __init__(self, bitvectors, n_gram_length=8, minimum_score=0.9, already_labeled: list=None):
'''
:type bitvectors: list of np.ndarray
:param bitvectors: bitvectors behind the synchronization
'''
pass
def find(self):
pass
@st... | 5 | 2 | 50 | 5 | 41 | 5 | 5 | 0.11 | 1 | 13 | 3 | 0 | 2 | 4 | 3 | 8 | 154 | 17 | 124 | 37 | 113 | 14 | 64 | 26 | 60 | 11 | 2 | 4 | 16 |
24,070 | jopohl/urh | jopohl_urh/src/urh/awre/engines/Engine.py | urh.awre.engines.Engine.Engine | from urh.awre.Histogram import Histogram
import itertools
from urh.cythonext import awre_util
class Engine(object):
_DEBUG_ = False
def _debug(self, *args):
if self._DEBUG_:
print('[{}]'.format(self.__class__.__name__), *args)
@staticmethod
def find_common_ranges_by_cluster(msg_ve... |
class Engine(object):
def _debug(self, *args):
pass
@staticmethod
def find_common_ranges_by_cluster(msg_vectors, clustered_bitvectors, alpha=0.95, range_type='bit'):
'''
:param alpha: How many percent of values must be equal per range?
:param range_type: Describes what kind... | 10 | 2 | 16 | 2 | 11 | 3 | 3 | 0.25 | 1 | 5 | 1 | 4 | 1 | 0 | 5 | 5 | 89 | 14 | 60 | 30 | 46 | 15 | 39 | 22 | 33 | 4 | 1 | 3 | 15 |
24,071 | jopohl/urh | jopohl_urh/src/urh/awre/engines/LengthEngine.py | urh.awre.engines.LengthEngine.LengthEngine | from urh.awre.CommonRange import CommonRange
from collections import defaultdict
import numpy as np
import math
from urh.cythonext import util
from urh.awre.engines.Engine import Engine
class LengthEngine(Engine):
def __init__(self, bitvectors, already_labeled=None):
"""
:type bitvectors: list of... |
class LengthEngine(Engine):
def __init__(self, bitvectors, already_labeled=None):
'''
:type bitvectors: list of np.ndarray
:param bitvectors: bitvectors behind the synchronization
'''
pass
def find(self, n_gram_length=8, minimum_score=0.1):
pass
@staticmeth... | 12 | 3 | 30 | 4 | 22 | 4 | 6 | 0.17 | 1 | 10 | 1 | 0 | 3 | 2 | 7 | 12 | 220 | 33 | 160 | 60 | 141 | 27 | 101 | 49 | 93 | 14 | 2 | 6 | 39 |
24,072 | jopohl/urh | jopohl_urh/src/urh/awre/engines/SequenceNumberEngine.py | urh.awre.engines.SequenceNumberEngine.SequenceNumberEngine | from urh.awre.CommonRange import CommonRange
import numpy as np
from urh.cythonext import awre_util
from urh.awre.engines.Engine import Engine
class SequenceNumberEngine(Engine):
def __init__(self, bitvectors, n_gram_length=8, minimum_score=0.75, already_labeled: list=None):
"""
:type bitvectors:... |
class SequenceNumberEngine(Engine):
def __init__(self, bitvectors, n_gram_length=8, minimum_score=0.75, already_labeled: list=None):
'''
:type bitvectors: list of np.ndarray
:param bitvectors: bitvectors behind the synchronization
'''
pass
def find(self):
pass
... | 9 | 3 | 31 | 4 | 23 | 5 | 3 | 0.22 | 1 | 11 | 1 | 0 | 2 | 4 | 5 | 10 | 165 | 22 | 117 | 40 | 102 | 26 | 71 | 30 | 65 | 10 | 2 | 2 | 17 |
24,073 | jopohl/urh | jopohl_urh/src/urh/controller/CompareFrameController.py | urh.controller.CompareFrameController.CompareFrameController | from urh.models.ProtocolTreeModel import ProtocolTreeModel
from urh.ui.ui_analysis import Ui_TabAnalysis
import numpy
from urh.plugins.PluginManager import PluginManager
from urh.models.ProtocolTableModel import ProtocolTableModel
from collections import defaultdict
from urh.models.MessageTypeTableModel import MessageT... |
class CompareFrameController(QWidget):
def __init__(self, plugin_manager: PluginManager, project_manager: ProjectManager, parent):
pass
@property
def field_types(self):
pass
@property
def field_types_by_caption(self):
pass
@property
def active_group_ids(self):
... | 180 | 10 | 14 | 2 | 12 | 1 | 3 | 0.04 | 1 | 35 | 19 | 0 | 113 | 30 | 113 | 113 | 1,824 | 291 | 1,483 | 411 | 1,284 | 59 | 1,009 | 323 | 894 | 22 | 1 | 6 | 286 |
24,074 | jopohl/urh | jopohl_urh/src/urh/controller/GeneratorTabController.py | urh.controller.GeneratorTabController.GeneratorTabController | from urh.controller.dialogs.FuzzingDialog import FuzzingDialog
from urh.controller.dialogs.SendDialog import SendDialog
from urh.plugins.RfCat.RfCatPlugin import RfCatPlugin
from urh.signalprocessing.ProtocoLabel import ProtocolLabel
from urh.util.Formatter import Formatter
import locale
from urh.ui.actions.Fuzz import... |
class GeneratorTabController(QWidget):
def __init__(self, compare_frame_controller: CompareFrameController, project_manager: ProjectManager, parent=None):
pass
def __get_modulator_of_message(self, message: Message) -> Modulator:
pass
@property
def selected_message_index(self) -> int:
... | 107 | 3 | 12 | 1 | 11 | 0 | 2 | 0.03 | 1 | 35 | 23 | 0 | 61 | 10 | 61 | 61 | 855 | 113 | 721 | 219 | 609 | 23 | 494 | 165 | 432 | 7 | 1 | 4 | 119 |
24,075 | jopohl/urh | jopohl_urh/src/urh/controller/MainController.py | urh.controller.MainController.MainController | from urh.models.ParticipantLegendListModel import ParticipantLegendListModel
from urh.util import FileOperator, util
from urh.signalprocessing.Signal import Signal
from urh import settings, version
from urh.controller.widgets.SignalFrame import SignalFrame
from urh.util.ProjectManager import ProjectManager
from urh.con... |
class MainController(QMainWindow):
def __init__(self, *args):
pass
def __set_non_project_warning_visibility(self):
pass
def create_connects(self):
pass
def add_plain_bits_from_txt(self, filename: str):
pass
def __add_empty_frame_for_filename(self, protocol: Prot... | 119 | 2 | 14 | 1 | 12 | 0 | 2 | 0.02 | 1 | 35 | 21 | 0 | 74 | 15 | 74 | 74 | 1,164 | 184 | 964 | 224 | 840 | 18 | 644 | 169 | 567 | 17 | 1 | 4 | 160 |
24,076 | jopohl/urh | jopohl_urh/src/urh/controller/SignalTabController.py | urh.controller.SignalTabController.SignalTabController | from urh.util import util
from PyQt5.QtCore import QPoint, pyqtSignal, pyqtSlot
from urh import settings
from urh.signalprocessing.Signal import Signal
from PyQt5.QtWidgets import QWidget, QSizePolicy, QUndoStack, QCheckBox, QMessageBox
from urh.controller.widgets.SignalFrame import SignalFrame
from urh.ui.ui_tab_inter... |
class SignalTabController(QWidget):
@property
def num_frames(self):
pass
@property
def signal_frames(self):
'''
:rtype: list of SignalFrame
'''
pass
@property
def signal_undo_stack(self):
pass
def __init__(self, project_manager, parent=None)... | 32 | 1 | 11 | 2 | 9 | 0 | 3 | 0.02 | 1 | 11 | 3 | 0 | 20 | 5 | 20 | 20 | 257 | 56 | 197 | 68 | 165 | 4 | 165 | 57 | 144 | 11 | 1 | 3 | 54 |
24,077 | jopohl/urh | jopohl_urh/src/urh/controller/SimulatorTabController.py | urh.controller.SimulatorTabController.SimulatorTabController | from urh.simulator.SimulatorItem import SimulatorItem
from urh.ui.SimulatorScene import SimulatorScene
from urh.controller.CompareFrameController import CompareFrameController
from urh.controller.dialogs.SimulatorDialog import SimulatorDialog
from PyQt5.QtWidgets import QWidget, QFileDialog, QCompleter, QMessageBox, QF... | null | 89 | 0 | 12 | 1 | 11 | 0 | 2 | 0.01 | 1 | 37 | 29 | 0 | 53 | 14 | 53 | 53 | 719 | 113 | 603 | 151 | 508 | 5 | 362 | 107 | 308 | 7 | 1 | 2 | 87 |
24,078 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/AdvancedModulationOptionsDialog.py | urh.controller.dialogs.AdvancedModulationOptionsDialog.AdvancedModulationOptionsDialog | from PyQt5.QtWidgets import QDialog
from urh.ui.ui_advanced_modulation_settings import Ui_DialogAdvancedModSettings
from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt
class AdvancedModulationOptionsDialog(QDialog):
pause_threshold_edited = pyqtSignal(int)
message_length_divisor_edited = pyqtSignal(int)
def... |
class AdvancedModulationOptionsDialog(QDialog):
def __init__(self, pause_threshold: int, message_length_divisor: int, parent=None):
pass
def create_connects(self):
pass
@pyqtSlot()
def on_accept_clicked(self):
pass | 5 | 0 | 9 | 2 | 7 | 0 | 2 | 0 | 1 | 3 | 1 | 0 | 3 | 3 | 3 | 3 | 34 | 8 | 26 | 10 | 21 | 0 | 23 | 9 | 19 | 3 | 1 | 1 | 5 |
24,079 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/CSVImportDialog.py | urh.controller.dialogs.CSVImportDialog.CSVImportDialog | from urh.util import FileOperator, util
from PyQt5.QtWidgets import QDialog, QInputDialog, QApplication, QCompleter, QDirModel, QFileDialog
import csv
import os
from PyQt5.QtCore import Qt, pyqtSlot, pyqtSignal
import numpy as np
from urh.ui.ui_csv_wizard import Ui_DialogCSVImport
from urh.util.Errors import Errors
cl... |
class CSVImportDialog(QDialog):
def __init__(self, filename='', parent=None):
pass
def create_connects(self):
pass
def update_file(self):
pass
def update_preview(self):
pass
@staticmethod
def parse_csv_line(csv_line: str, i_data_col: int, q_data_col: int, tim... | 27 | 0 | 15 | 2 | 13 | 0 | 3 | 0.01 | 1 | 10 | 2 | 0 | 12 | 2 | 15 | 15 | 255 | 44 | 211 | 68 | 180 | 2 | 152 | 50 | 136 | 7 | 1 | 4 | 43 |
24,080 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/ContinuousSendDialog.py | urh.controller.dialogs.ContinuousSendDialog.ContinuousSendDialog | from urh.controller.dialogs.SendRecvDialog import SendRecvDialog
from urh.signalprocessing.ContinuousModulator import ContinuousModulator
from urh.ui.painting.ContinuousSceneManager import ContinuousSceneManager
from urh.dev.VirtualDevice import VirtualDevice, Mode
from urh.controller.dialogs.SendDialog import SendDial... |
class ContinuousSendDialog(SendDialog):
def __init__(self, project_manager, messages, modulators, total_samples: int, parent, testing_mode=False):
pass
def create_connects(self):
pass
def _update_send_indicator(self, width: int):
pass
def update_view(self):
pass
... | 20 | 0 | 9 | 1 | 8 | 0 | 1 | 0.01 | 1 | 8 | 4 | 0 | 13 | 8 | 13 | 53 | 131 | 20 | 111 | 40 | 83 | 1 | 73 | 24 | 59 | 2 | 3 | 1 | 15 |
24,081 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/CostaOptionsDialog.py | urh.controller.dialogs.CostaOptionsDialog.CostaOptionsDialog | from PyQt5.QtWidgets import QDialog
from urh.ui.ui_costa import Ui_DialogCosta
from PyQt5.QtCore import Qt, pyqtSlot
class CostaOptionsDialog(QDialog):
def __init__(self, loop_bandwidth, parent=None):
super().__init__(parent)
self.ui = Ui_DialogCosta()
self.ui.setupUi(self)
self.se... |
class CostaOptionsDialog(QDialog):
def __init__(self, loop_bandwidth, parent=None):
pass
def create_connects(self):
pass
@pyqtSlot(float)
def on_spinbox_loop_bandwidth_value_changed(self, value):
pass | 5 | 0 | 6 | 1 | 6 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 3 | 2 | 3 | 3 | 23 | 4 | 19 | 7 | 14 | 0 | 16 | 6 | 12 | 1 | 1 | 0 | 3 |
24,082 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/DecoderDialog.py | urh.controller.dialogs.DecoderDialog.DecoderDialog | from urh import settings
import os
from urh.ui.painting.SignalSceneManager import SignalSceneManager
from PyQt5.QtGui import QCloseEvent, QDropEvent, QDragEnterEvent, QIcon
from PyQt5.QtCore import QDir, Qt, pyqtSlot
from urh.ui.ui_decoding import Ui_Decoder
from urh.signalprocessing.Encoding import Encoding
from urh.s... |
class DecoderDialog(QDialog):
def __init__(self, decodings, signals, project_manager: ProjectManager, parent=None):
'''
:type decodings: list of Encoding
:type signals: list of Signal
'''
pass
def create_connects(self):
pass
def closeEvent(self, event: QCl... | 42 | 1 | 32 | 2 | 28 | 2 | 5 | 0.08 | 1 | 12 | 5 | 0 | 29 | 15 | 29 | 29 | 961 | 84 | 820 | 126 | 776 | 69 | 598 | 109 | 568 | 49 | 1 | 6 | 157 |
24,083 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/FilterBandwidthDialog.py | urh.controller.dialogs.FilterBandwidthDialog.FilterBandwidthDialog | from urh.signalprocessing.Filter import Filter
from urh import settings
from PyQt5.QtWidgets import QDialog, QLabel, QRadioButton
from PyQt5.QtCore import pyqtSlot, Qt
from urh.ui.ui_filter_bandwidth_dialog import Ui_DialogFilterBandwidth
class FilterBandwidthDialog(QDialog):
def __init__(self, parent=None):
... |
class FilterBandwidthDialog(QDialog):
def __init__(self, parent=None):
pass
def create_connects(self):
pass
@property
def checked_radiobutton(self):
pass
@pyqtSlot(float)
def on_spin_box_custom_bandwidth_value_changed(self, bw: float):
pass
@pyqtSlot(int)
... | 11 | 0 | 14 | 1 | 13 | 0 | 2 | 0 | 1 | 6 | 2 | 0 | 6 | 1 | 6 | 6 | 91 | 10 | 81 | 20 | 70 | 0 | 43 | 16 | 36 | 6 | 1 | 3 | 14 |
24,084 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/FilterDialog.py | urh.controller.dialogs.FilterDialog.FilterDialog | from urh.signalprocessing.Filter import Filter, FilterType
from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt
from urh.ui.ui_filter_dialog import Ui_FilterDialog
from PyQt5.QtWidgets import QDialog
class FilterDialog(QDialog):
filter_accepted = pyqtSignal(Filter)
def __init__(self, dsp_filter: Filter, parent=N... |
class FilterDialog(QDialog):
def __init__(self, dsp_filter: Filter, parent=None):
pass
def set_dsp_filter_status(self, dsp_filter_type: FilterType):
pass
def create_connects(self):
pass
def build_filter(self) -> Filter:
pass
def set_error_status(self):
p... | 14 | 0 | 10 | 0 | 9 | 0 | 2 | 0.01 | 1 | 13 | 3 | 0 | 9 | 2 | 9 | 9 | 103 | 13 | 89 | 23 | 75 | 1 | 69 | 17 | 59 | 5 | 1 | 3 | 20 |
24,085 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/FuzzingDialog.py | urh.controller.dialogs.FuzzingDialog.FuzzingDialog | from urh import settings
import math
from urh.signalprocessing.ProtocoLabel import ProtocolLabel
from PyQt5.QtCore import Qt, pyqtSlot
from PyQt5.QtGui import QCloseEvent
from PyQt5.QtWidgets import QDialog, QInputDialog
from urh.models.FuzzingTableModel import FuzzingTableModel
from urh.ui.ui_fuzzing import Ui_Fuzzing... |
class FuzzingDialog(QDialog):
def __init__(self, protocol: ProtocolAnalyzerContainer, label_index: int, msg_index: int, proto_view: int, parent=None):
pass
@property
def message(self):
pass
@property
def current_label_index(self):
pass
@property
def current_label_in... | 61 | 0 | 11 | 1 | 10 | 0 | 2 | 0.01 | 1 | 8 | 4 | 0 | 34 | 4 | 34 | 34 | 420 | 56 | 364 | 105 | 296 | 3 | 248 | 72 | 213 | 4 | 1 | 2 | 62 |
24,086 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/MessageTypeDialog.py | urh.controller.dialogs.MessageTypeDialog.MessageTypeDialog | from PyQt5.QtCore import Qt, pyqtSlot
import copy
from PyQt5.QtWidgets import QDialog
from urh import settings
from urh.ui.delegates.ComboBoxDelegate import ComboBoxDelegate
from urh.signalprocessing.Ruleset import Rule, OPERATION_DESCRIPTION
from urh.signalprocessing.MessageType import MessageType
from PyQt5.QtGui imp... |
class MessageTypeDialog(QDialog):
def __init__(self, message_type: MessageType, parent=None):
pass
def create_connects(self):
pass
def set_ruleset_ui_status(self):
pass
def open_editors(self, row):
pass
def closeEvent(self, event: QCloseEvent):
pass
... | 18 | 0 | 9 | 1 | 8 | 0 | 1 | 0 | 1 | 11 | 6 | 0 | 11 | 5 | 11 | 11 | 117 | 20 | 97 | 26 | 79 | 0 | 69 | 20 | 57 | 2 | 1 | 1 | 13 |
24,087 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/ModulationParametersDialog.py | urh.controller.dialogs.ModulationParametersDialog.ModulationParametersDialog | import math
from PyQt5.QtWidgets import QDialog, QTableWidgetItem
from PyQt5.QtCore import Qt, pyqtSlot
from urh.ui.delegates.KillerSpinBoxDelegate import KillerSpinBoxDelegate
from urh.ui.delegates.SpinBoxDelegate import SpinBoxDelegate
from urh.ui.ui_modulation_parameters_dialog import Ui_DialogModulationParameters
... |
class ModulationParametersDialog(QDialog):
def __init__(self, parameters: list, modulation_type: str, parent=None):
pass
def create_connects(self):
pass
@pyqtSlot()
def on_accepted(self):
pass | 5 | 0 | 18 | 2 | 16 | 0 | 3 | 0 | 1 | 10 | 3 | 0 | 3 | 3 | 3 | 3 | 58 | 8 | 50 | 13 | 45 | 0 | 37 | 12 | 33 | 5 | 1 | 1 | 8 |
24,088 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/ModulatorDialog.py | urh.controller.dialogs.ModulatorDialog.ModulatorDialog | from urh.util.Logger import logger
import numpy
from PyQt5.QtCore import Qt, pyqtSlot, QRegExp, QTimer
from urh.signalprocessing.Modulator import Modulator
from PyQt5.QtWidgets import QDialog, QMessageBox, QLineEdit
from urh.ui.ui_modulation import Ui_DialogModulation
from urh import settings
from array import array
fr... |
class ModulatorDialog(QDialog):
def __init__(self, modulators, tree_model=None, parent=None):
'''
:type modulators: list of Modulator
'''
pass
def __cur_selected_mod_type(self):
pass
@staticmethod
def __trim_number(number):
pass
@staticmethod
de... | 81 | 1 | 12 | 1 | 11 | 0 | 2 | 0.02 | 1 | 15 | 3 | 0 | 51 | 8 | 53 | 53 | 711 | 114 | 589 | 138 | 508 | 13 | 442 | 111 | 388 | 7 | 1 | 2 | 106 |
24,089 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/OptionsDialog.py | urh.controller.dialogs.OptionsDialog.DeviceOptionsTableModel | from PyQt5.QtCore import Qt, pyqtSlot, pyqtSignal, QSize, QAbstractTableModel, QModelIndex
from urh.dev.BackendHandler import BackendHandler, Backends
class DeviceOptionsTableModel(QAbstractTableModel):
header_labels = ['Software Defined Radio', 'Info', 'Native backend (recommended)', 'GNU Radio backend']
def... |
class DeviceOptionsTableModel(QAbstractTableModel):
def __init__(self, backend_handler: BackendHandler, parent=None):
pass
def update(self):
pass
def columnCount(self, parent: QModelIndex=None, *args, **kwargs):
pass
def rowCount(self, parent: QModelIndex=None, *args, **kwar... | 10 | 0 | 12 | 1 | 11 | 0 | 5 | 0 | 1 | 5 | 2 | 0 | 9 | 1 | 9 | 9 | 127 | 21 | 106 | 23 | 96 | 0 | 78 | 23 | 68 | 20 | 1 | 4 | 44 |
24,090 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/OptionsDialog.py | urh.controller.dialogs.OptionsDialog.OptionsDialog | from urh.ui.ui_options import Ui_DialogOptions
from urh.controller.widgets.PluginFrame import PluginFrame
from PyQt5.QtWidgets import QDialog, QHBoxLayout, QCompleter, QDirModel, QApplication, QHeaderView, QRadioButton, QFileDialog, qApp
import numpy as np
import tempfile
from urh.util import util
import os
import subp... |
class OptionsDialog(QDialog):
def __init__(self, installed_plugins, highlighted_plugins=None, parent=None):
pass
def create_connects(self):
pass
def show_gnuradio_infos(self):
pass
def read_options(self):
pass
def refresh_device_tab(self):
pass
def ... | 51 | 0 | 17 | 2 | 15 | 0 | 2 | 0.01 | 1 | 22 | 11 | 0 | 28 | 9 | 29 | 29 | 532 | 80 | 451 | 94 | 400 | 4 | 252 | 73 | 222 | 8 | 1 | 3 | 63 |
24,091 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/ProjectDialog.py | urh.controller.dialogs.ProjectDialog.ProjectDialog | from PyQt5.QtCore import pyqtSlot
from urh import settings
from urh.models.ParticipantTableModel import ParticipantTableModel
from PyQt5.QtWidgets import QDialog, QCompleter, QDirModel
from urh.dev import config
from urh.ui.ui_project import Ui_ProjectDialog
from urh.util import FileOperator
from PyQt5.QtGui import QRe... |
class ProjectDialog(QDialog):
def __init__(self, new_project=True, project_manager: ProjectManager=None, parent=None):
pass
@property
def participants(self):
'''
:rtype: list of Participant
'''
pass
def create_connects(self):
pass
def set_path(self... | 29 | 1 | 11 | 1 | 10 | 0 | 2 | 0.03 | 1 | 12 | 5 | 0 | 16 | 11 | 16 | 16 | 209 | 34 | 170 | 46 | 139 | 5 | 117 | 32 | 100 | 5 | 1 | 2 | 26 |
24,092 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/ProtocolLabelDialog.py | urh.controller.dialogs.ProtocolLabelDialog.ProtocolLabelDialog | from urh import settings
from urh.signalprocessing.ProtocoLabel import ProtocolLabel
from urh.signalprocessing.FieldType import FieldType
from urh.util import util
from urh.signalprocessing.Message import Message
from PyQt5.QtCore import Qt, pyqtSlot, pyqtSignal
from urh.util.Logger import logger
from urh.models.PLabel... |
class ProtocolLabelDialog(QDialog):
def __init__(self, message: Message, viewtype: int, selected_index=None, parent=None):
pass
def configure_special_config_tabs(self):
pass
def create_connects(self):
pass
def open_editors(self, row):
pass
def keyPressEvent(self... | 15 | 0 | 13 | 1 | 11 | 0 | 2 | 0.01 | 1 | 15 | 11 | 0 | 10 | 2 | 10 | 10 | 144 | 25 | 119 | 26 | 102 | 1 | 71 | 20 | 60 | 6 | 1 | 3 | 19 |
24,093 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/ProtocolSniffDialog.py | urh.controller.dialogs.ProtocolSniffDialog.ProtocolSniffDialog | from urh.util import util
from PyQt5.QtCore import pyqtSlot, pyqtSignal
import numpy as np
from urh.controller.dialogs.SendRecvDialog import SendRecvDialog
from PyQt5.QtGui import QIcon, QCloseEvent
from urh.controller.widgets.SniffSettingsWidget import SniffSettingsWidget
from urh.ui.painting.SniffSceneManager import ... |
class ProtocolSniffDialog(SendRecvDialog):
def __init__(self, project_manager, signal=None, signals=None, parent=None, testing_mode=False):
pass
@property
def view_type(self) -> int:
pass
@property
def show_timestamp(self) -> bool:
pass
def closeEvent(self, event: QClo... | 29 | 0 | 7 | 1 | 7 | 0 | 1 | 0.02 | 1 | 7 | 2 | 0 | 17 | 6 | 17 | 17 | 157 | 27 | 129 | 45 | 93 | 2 | 83 | 26 | 65 | 3 | 1 | 1 | 22 |
24,094 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/ReceiveDialog.py | urh.controller.dialogs.ReceiveDialog.ReceiveDialog | import numpy as np
from urh.signalprocessing.RecordedFile import RecordedFile
from datetime import datetime
from PyQt5.QtWidgets import QMessageBox
from urh.ui.painting.LiveSceneManager import LiveSceneManager
from urh.controller.dialogs.SendRecvDialog import SendRecvDialog
from PyQt5.QtCore import pyqtSignal, pyqtSlot... |
class ReceiveDialog(SendRecvDialog):
def __init__(self, project_manager, parent=None, testing_mode=False):
pass
def create_connects(self):
pass
def save_before_close(self):
pass
def update_view(self):
pass
def init_device(self):
pass
@pyqtSlot()
... | 14 | 0 | 11 | 1 | 10 | 0 | 2 | 0.02 | 1 | 8 | 5 | 0 | 9 | 7 | 9 | 9 | 117 | 19 | 97 | 29 | 83 | 2 | 63 | 23 | 53 | 4 | 1 | 2 | 17 |
24,095 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/SendDialog.py | urh.controller.dialogs.SendDialog.SendDialog | from urh.signalprocessing.IQArray import IQArray
from urh.dev.VirtualDevice import VirtualDevice, Mode
from urh import settings
from urh.signalprocessing.Signal import Signal
from urh.util.Logger import logger
from PyQt5.QtCore import Qt, pyqtSlot
from urh.ui.painting.SignalSceneManager import SignalSceneManager
from u... |
class SendDialog(SendRecvDialog):
def __init__(self, project_manager, modulated_data, modulation_msg_indices=None, continuous_send_mode=False, parent=None, testing_mode=False):
pass
def create_connects(self):
pass
def _update_send_indicator(self, width: int):
pass
def set_cu... | 21 | 0 | 12 | 1 | 11 | 0 | 2 | 0.01 | 1 | 10 | 5 | 1 | 13 | 7 | 13 | 40 | 176 | 22 | 153 | 47 | 124 | 1 | 100 | 29 | 86 | 4 | 2 | 3 | 23 |
24,096 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/SendRecvDialog.py | urh.controller.dialogs.SendRecvDialog.SendRecvDialog | from urh.util.ProjectManager import ProjectManager
import time
from urh.util.Logger import logger
from urh.controller.widgets.DeviceSettingsWidget import DeviceSettingsWidget
import locale
from urh.util import util
from urh import settings
from urh.ui.ui_send_recv import Ui_SendRecvDialog
from PyQt5.QtGui import QClose... |
class SendRecvDialog(QDialog):
def __init__(self, project_manager: ProjectManager, is_tx: bool, continuous_send_mode=False, parent=None, testing_mode=False):
pass
@property
def is_rx(self) -> bool:
pass
@property
def has_empty_device_list(self):
pass
@property
def d... | 40 | 0 | 10 | 2 | 9 | 0 | 2 | 0.01 | 1 | 14 | 9 | 1 | 27 | 10 | 27 | 27 | 318 | 70 | 246 | 62 | 199 | 3 | 174 | 43 | 146 | 7 | 1 | 2 | 49 |
24,097 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/SignalDetailsDialog.py | urh.controller.dialogs.SignalDetailsDialog.SignalDetailsDialog | import locale
import time
from urh.ui.ui_signal_details import Ui_SignalDetails
import os
from PyQt5.QtWidgets import QDialog
from urh import settings
from PyQt5.QtGui import QCloseEvent
from PyQt5.QtCore import Qt, pyqtSlot
from urh.util.Formatter import Formatter
class SignalDetailsDialog(QDialog):
def __init__... |
class SignalDetailsDialog(QDialog):
def __init__(self, signal, parent=None):
pass
def closeEvent(self, event: QCloseEvent):
pass
@pyqtSlot(float)
def on_dsb_sample_rate_value_changed(self, value: float):
pass
def set_duration(self):
pass | 6 | 0 | 12 | 1 | 10 | 0 | 1 | 0 | 1 | 5 | 2 | 0 | 4 | 2 | 4 | 4 | 51 | 8 | 43 | 10 | 37 | 0 | 31 | 9 | 26 | 2 | 1 | 1 | 5 |
24,098 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/SimulatorDialog.py | urh.controller.dialogs.SimulatorDialog.SimulatorDialog | from urh.util.ProjectManager import ProjectManager
from urh.controller.dialogs.ProtocolSniffDialog import ProtocolSniffDialog
from urh.signalprocessing.IQArray import IQArray
from PyQt5.QtGui import QIcon, QCloseEvent
from PyQt5.QtCore import QTimer, pyqtSlot, pyqtSignal, Qt
from urh.controller.widgets.SniffSettingsWid... |
class SimulatorDialog(QDialog):
def __init__(self, simulator_config, modulators, expression_parser, project_manager: ProjectManager, signals: list=None, signal_tree_model=None, parent=None):
pass
def create_connects(self):
pass
def update_buttons(self):
pass
def __get_full_t... | 47 | 0 | 16 | 2 | 14 | 0 | 2 | 0 | 1 | 22 | 14 | 0 | 28 | 16 | 28 | 28 | 503 | 88 | 415 | 109 | 359 | 1 | 276 | 78 | 246 | 8 | 1 | 2 | 69 |
24,099 | jopohl/urh | jopohl_urh/src/urh/controller/dialogs/SpectrumDialogController.py | urh.controller.dialogs.SpectrumDialogController.SpectrumDialogController | from PyQt5.QtWidgets import QGraphicsScene
from PyQt5.QtCore import QTimer, pyqtSlot
from urh.dev.VirtualDevice import VirtualDevice, Mode
from urh.ui.painting.FFTSceneManager import FFTSceneManager
from urh.controller.dialogs.SendRecvDialog import SendRecvDialog
from urh.signalprocessing.Spectrogram import Spectrogram... |
class SpectrumDialogController(SendRecvDialog):
def __init__(self, project_manager, parent=None, testing_mode=False):
pass
def __clear_spectrogram(self):
pass
def __update_spectrogram(self):
pass
def _eliminate_graphic_view(self):
pass
def create_connects(self):... | 29 | 0 | 10 | 1 | 9 | 0 | 1 | 0 | 1 | 8 | 4 | 0 | 18 | 10 | 18 | 18 | 201 | 31 | 170 | 46 | 141 | 0 | 118 | 34 | 99 | 4 | 1 | 2 | 24 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.