code
stringlengths
114
1.05M
path
stringlengths
3
312
quality_prob
float64
0.5
0.99
learning_prob
float64
0.2
1
filename
stringlengths
3
168
kind
stringclasses
1 value
from tqdm import tqdm from r2c_isg.loaders import Loader from r2c_isg.structures import Dataset class GithubLoader(Loader): @classmethod def weblists(cls) -> dict: return { 'top1kstarred': { 'getter': GithubLoader._get_top1kstarred, 'parser': GithubLoader._...
/r2c-inputset-generator-0.3.2.tar.gz/r2c-inputset-generator-0.3.2/r2c_isg/loaders/web/github_loader.py
0.42919
0.290528
github_loader.py
pypi
from tqdm import tqdm from r2c_isg.loaders import Loader from r2c_isg.structures import Dataset class NpmLoader(Loader): @classmethod def weblists(cls) -> dict: """ Other possible sources/useful links: - Realtime list of the top 108 most depended-upon packages: https://www.n...
/r2c-inputset-generator-0.3.2.tar.gz/r2c-inputset-generator-0.3.2/r2c_isg/loaders/web/npm_loader.py
0.7324
0.438785
npm_loader.py
pypi
from tqdm import tqdm from r2c_isg.loaders import Loader from r2c_isg.structures import Dataset class PypiLoader(Loader): @classmethod def weblists(cls) -> dict: return { 'top4kmonth': { 'getter': PypiLoader._get_top4kmonth, 'parser': PypiLoader._parse_hugo...
/r2c-inputset-generator-0.3.2.tar.gz/r2c-inputset-generator-0.3.2/r2c_isg/loaders/web/pypi_loader.py
0.694095
0.231451
pypi_loader.py
pypi
import attr @attr.s(frozen=True) class Location: """A location in a source file.""" line = attr.ib() # 0-based column = attr.ib() index = attr.ib() def __str__(self): return '{}:{}'.format(self.line + 1, self.column) @attr.s(frozen=True) class Node: """Base abstract type for AST no...
/r2c-jinjalint-0.7.2.tar.gz/r2c-jinjalint-0.7.2/jinjalint/ast.py
0.810929
0.233674
ast.py
pypi
import abc import hashlib import json import os import shutil from pathlib import Path from typing import List, Optional from r2c.lib.constants import DEFAULT_LOCAL_RUN_DIR_SUFFIX from r2c.lib.jobdef import CacheKey from r2c.lib.util import get_tmp_dir class FileStore(metaclass=abc.ABCMeta): """ Abstract...
/r2c-lib-0.0.19b1.tar.gz/r2c-lib-0.0.19b1/r2c/lib/filestore.py
0.754599
0.209389
filestore.py
pypi
import abc import hashlib import json from enum import Enum from inspect import signature from typing import Any, Dict, List, Optional, Type, Union import attr import cattr INPUT_TYPE_KEY = "input_type" @attr.s(auto_attribs=True, frozen=True) class AnalyzerInput(metaclass=abc.ABCMeta): @classmethod def subc...
/r2c-lib-0.0.19b1.tar.gz/r2c-lib-0.0.19b1/r2c/lib/input.py
0.823044
0.169956
input.py
pypi
import json from typing import Any, ClassVar, Dict, NewType, Optional, Set import attr import cattr from mypy_extensions import TypedDict from semantic_version import Version from r2c.lib.constants import ECR_URL AnalyzerName = NewType("AnalyzerName", str) VersionedAnalyzerJson = TypedDict( "VersionedAnalyzerJs...
/r2c-lib-0.0.19b1.tar.gz/r2c-lib-0.0.19b1/r2c/lib/analyzer.py
0.642208
0.17749
analyzer.py
pypi
import logging import shutil from pathlib import Path from typing import Optional import attr from r2c.lib.analysis.mount_manager import MountManager from r2c.lib.analysis.output_storage import OutputStorage from r2c.lib.analyzer import SpecifiedAnalyzer from r2c.lib.input import AnalyzerInput from r2c.lib.jobdef im...
/r2c-lib-0.0.19b1.tar.gz/r2c-lib-0.0.19b1/r2c/lib/analysis/dependency_mounter.py
0.850033
0.238251
dependency_mounter.py
pypi
import hashlib import logging import shutil import tempfile from pathlib import Path from typing import List, Optional import attr from r2c.lib.filestore import FileStore from r2c.lib.jobdef import CacheKey from r2c.lib.manifest import AnalyzerOutputType logger = logging.getLogger(__name__) logger.setLevel(logging....
/r2c-lib-0.0.19b1.tar.gz/r2c-lib-0.0.19b1/r2c/lib/analysis/output_storage.py
0.833189
0.299592
output_storage.py
pypi
import abc import logging import os import subprocess from pathlib import Path from tempfile import TemporaryDirectory from typing import Any, Dict, TypeVar import attr import docker.errors from r2c.lib.util import get_tmp_dir # We need a very small Linux image so we can do some filesystem stuff through # Docker. A...
/r2c-lib-0.0.19b1.tar.gz/r2c-lib-0.0.19b1/r2c/lib/analysis/mount_manager.py
0.661814
0.220342
mount_manager.py
pypi
import copy import json import logging import os import pathlib import subprocess import sys import threading import time from pathlib import Path from typing import Any, List, NewType, Optional, Tuple, Union, cast import attr import docker import jsonschema from r2c.lib.analysis import ( DependencyMounter, E...
/r2c-lib-0.0.19b1.tar.gz/r2c-lib-0.0.19b1/r2c/lib/analysis/runner.py
0.734024
0.157687
runner.py
pypi
from typing import Any, Dict, List, Optional, Tuple, Union import attr from r2c.lib.analyzer import AnalyzerName, SpecifiedAnalyzer from r2c.lib.input import ( AnalyzerInput, GitRepo, GitRepoCommit, LocalCode, PackageRepository, PackageVersion, ) from r2c.lib.registry import RegistryData @at...
/r2c-lib-0.0.19b1.tar.gz/r2c-lib-0.0.19b1/r2c/lib/analysis/execution_order.py
0.925365
0.294367
execution_order.py
pypi
import ast from collections import defaultdict from typing import Dict, List, Set class MethodVisitor(ast.NodeVisitor): """ Abstract visitor that tracks call sites across import aliasing """ def __init__(self, module_name: str): self.module_alias: str = module_name self.methods: Dict[...
/r2c_py_ast-0.1.0b1.tar.gz/r2c_py_ast-0.1.0b1/r2c_py_ast/import_aliasing_visitor.py
0.759939
0.253959
import_aliasing_visitor.py
pypi
from __future__ import division import subprocess from r2g.Bio import NCBIWWW try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET import sys def find_r2g_results(dir): results = subprocess.check_output([ "find", dir, "-maxdepth", "1", "-...
/r2g-1.0.1.tar.gz/r2g-1.0.1/examples/benchmark_100genes/scripts/parse_results.py
0.454472
0.163312
parse_results.py
pypi
# r360-py - Python Library for the Route360° API ## API-Key Get your API key [here ](https://developers.route360.net/pricing/). ## Installation ### the r360-py library uses python3 make sure this is installed on your system ### use virtualenv for a clean, global-free install [virtualenv](http://docs.python-guide.org/...
/r360_py-0.20.tar.gz/r360_py-0.20/README.md
0.419291
0.717024
README.md
pypi
import boto3 import time import socket import re from libr53dyndns.errors import InvalidInputError class R53(object): """ Wrap the boto Route53 interface with some specific convenience operations """ def __init__(self, fqdn, zone, ak, sk, ttl=60): """ Initialize everything giv...
/r53-dyndns-0.4.0.tar.gz/r53-dyndns-0.4.0/libr53dyndns/r53.py
0.522933
0.166777
r53.py
pypi
from dns.resolver import Resolver from io import BytesIO from libr53dyndns.errors import IPParseError, InvalidURL from urllib.request import urlopen, Request import re import ssl import time class IPGet(object): """ This defines a simple interface for grabbing the external IP address """ # Define a sim...
/r53-dyndns-0.4.0.tar.gz/r53-dyndns-0.4.0/libr53dyndns/ipget.py
0.658418
0.243564
ipget.py
pypi
<img class="r5py_logo" align="right" src="https://github.com/r5py/r5py/raw/main/docs/_static/images/r5py_blue.svg" alt="r5py logo" style="width:180px; max-width:30vW;"> # r5py: Rapid Realistic Routing with R5 in Python <!-- badges --> [![Try r5py with binder][binder-badge]][binder-link] [![DOI][doi-badge]][doi-link] ...
/r5py-0.1.0.tar.gz/r5py-0.1.0/README.md
0.7413
0.771112
README.md
pypi
import os from dataclasses import MISSING, dataclass, field, fields, is_dataclass from enum import Enum from typing import TypeVar @dataclass(frozen=True) class DatabaseConnRetriesConfig: min_retry_time: float = 1 max_retry_time: float = 2 max_wait_time: float = 120 @dataclass(frozen=True) class Databas...
/r614_config-0.1.7-py3-none-any.whl/r614_config/config.py
0.54819
0.166337
config.py
pypi
import functools import inspect from dataclasses import dataclass from datetime import datetime, timezone from pathlib import Path from typing import Awaitable, Callable, Concatenate, ParamSpec, TypeAlias, TypeVar import orjson import structlog as slog from r614_config.config import DatadogConfig, LoggingMode, read_co...
/r614_o11y-0.1.6.tar.gz/r614_o11y-0.1.6/r614_o11y/o11y.py
0.478285
0.169097
o11y.py
pypi
import asyncio import functools import random from contextlib import asynccontextmanager from dataclasses import dataclass from datetime import timedelta from textwrap import dedent from typing import ( Any, AsyncGenerator, Awaitable, Callable, Concatenate, Iterable, ParamSpec, TypeVar, ...
/r614_postgres-0.1.18-py3-none-any.whl/r614_postgres/postgres.py
0.657978
0.161419
postgres.py
pypi
import collections.abc import dataclasses from itertools import chain from types import NoneType, UnionType from typing import ( Any, Iterable, Literal, Mapping, Sequence, TypeAlias, TypeVar, Union, get_args, get_origin, get_type_hints, ) from opentelemetry.trace import get_...
/r614_postgres-0.1.18-py3-none-any.whl/r614_postgres/validation.py
0.455925
0.164785
validation.py
pypi
from .exceptions import OperatorNotFoundError class Operators: sledge = "Sledge" thatcher = "Thatcher" ash = "Ash" thermite = "Thermite" twitch = "Twitch" montagne = "Montagne" glaz = "Glaz" fuze = "Fuze" blitz = "Blitz" iq = "IQ" buck = "Buck" blackbeard = "Blackbeard" ...
/r6stats.py-1.0.1.tar.gz/r6stats.py-1.0.1/r6stats/operators.py
0.472927
0.173813
operators.py
pypi
# Import third-party modules. from numpy import pi, sqrt, sin, cos, arcsin, arctanh, deg2rad, rad2deg # Import standard modules. from random import uniform # Import my modules. from rhealpixdggs.utils import my_round, auth_lat, auth_rad # Parameters of some common ellipsoids. WGS84_A = 6378137.0 WGS84_F = 1 / 298.2...
/rHEALPixDGGS-0.5.3-py3-none-any.whl/rhealpixdggs/ellipsoids.py
0.900992
0.561515
ellipsoids.py
pypi
# Import third-party modules. import pyproj # Import standard modules. import importlib # Import my modules. from rhealpixdggs.utils import my_round, wrap_longitude, wrap_latitude from rhealpixdggs.ellipsoids import WGS84_ELLIPSOID # Homemade map projections, as opposed to those in the PROJ.4 library. # Remove 'he...
/rHEALPixDGGS-0.5.3-py3-none-any.whl/rhealpixdggs/projection_wrapper.py
0.760473
0.506774
projection_wrapper.py
pypi
# Import third-party modules. from numpy import pi, floor, sqrt, sin, arcsin, sign, array, deg2rad, rad2deg # Import my modules. from rhealpixdggs.utils import my_round, auth_lat, auth_rad def healpix_sphere(lam, phi): """ Compute the signature function of the HEALPix projection of the unit sphere. ...
/rHEALPixDGGS-0.5.3-py3-none-any.whl/rhealpixdggs/pj_healpix.py
0.87903
0.723273
pj_healpix.py
pypi
# Import third-party modules. from numpy import pi, sign, array, identity, dot, deg2rad, rad2deg # Import my modules. from rhealpixdggs.pj_healpix import ( healpix_sphere, healpix_sphere_inverse, healpix_ellipsoid, healpix_ellipsoid_inverse, ) from rhealpixdggs.utils import my_round, auth_rad # Matri...
/rHEALPixDGGS-0.5.3-py3-none-any.whl/rhealpixdggs/pj_rhealpix.py
0.918457
0.754712
pj_rhealpix.py
pypi
# Import third-party modules. from numpy import pi, floor, sqrt, log, sin, arcsin, deg2rad, rad2deg, sign def my_round(x, digits=0): """ Round the floating point number or list/tuple of floating point numbers to ``digits`` number of digits. Calls Python's ``round()`` function. EXAMPLES:: ...
/rHEALPixDGGS-0.5.3-py3-none-any.whl/rhealpixdggs/utils.py
0.908901
0.799286
utils.py
pypi
import inspect import logging from functools import partial from typing import Callable, Hashable, Any class Injector: def __init__(self, logger: Callable = logging.debug): """ _bindings is a map of any hashable object to a callable that 'resolves' that object """ self._bindings = ...
/rInject-0.1.1.tar.gz/rInject-0.1.1/rinject/__init__.py
0.784979
0.27124
__init__.py
pypi
import random from itertools import groupby from itertools import zip_longest from operator import add from operator import itemgetter from typing import Any from typing import Callable from typing import Dict from typing import Iterator from typing import List from typing import TextIO from typing import Tuple from ty...
/ra-fixture-generator-0.2.0.tar.gz/ra-fixture-generator-0.2.0/ra_fixture_generator/fixture_generator.py
0.517815
0.194139
fixture_generator.py
pypi
import random from typing import Callable from typing import Dict from typing import Iterator from typing import Tuple from typing import TypeVar from mimesis import Address OrgTree = Dict[str, Dict] def generate_cantina() -> OrgTree: if random.random() > 0.5: return {"Kantine": {}} return {} def...
/ra-fixture-generator-0.2.0.tar.gz/ra-fixture-generator-0.2.0/ra_fixture_generator/generate_org_tree.py
0.65368
0.294418
generate_org_tree.py
pypi
from collections.abc import Iterator from itertools import chain from typing import Any from typing import Optional from pydantic import validator from ra_utils.semantic_version_type import SemanticVersion from ramodels.mo import Employee from ramodels.mo import MOBase from ramodels.mo import OrganisationUnit from ram...
/ra-flatfile-importer-2.1.1.tar.gz/ra-flatfile-importer-2.1.1/ra_flatfile_importer/models.py
0.85318
0.202719
models.py
pypi
from typing import Any from typing import Callable from typing import Dict from typing import Optional from more_itertools import unzip def dict_map( dicty: Dict, key_func: Optional[Callable[[Any], Any]] = None, value_func: Optional[Callable[[Any], Any]] = None, ) -> Dict: """Map a dictionary's keys ...
/ra_utils-1.13.9-py3-none-any.whl/ra_utils/dict_map.py
0.938202
0.952574
dict_map.py
pypi
from functools import wraps from inspect import signature from typing import Any from typing import Callable from typing import Tuple from typing import TypeVar CallableReturnType = TypeVar("CallableReturnType") def has_self_arg(func: Callable) -> bool: """Return `True` if the given callable `func` needs `self` ...
/ra_utils-1.13.9-py3-none-any.whl/ra_utils/apply.py
0.928026
0.748536
apply.py
pypi
from collections.abc import Hashable from decimal import Decimal from typing import Any from ra_utils.dict_map import dict_map _has_frozendict = True try: from frozendict import frozendict except ImportError: # pragma: no cover _has_frozendict = False def is_hashable(value: Any) -> bool: """Check if in...
/ra_utils-1.13.9-py3-none-any.whl/ra_utils/ensure_hashable.py
0.896427
0.411466
ensure_hashable.py
pypi
import re from typing import cast from typing import Dict from typing import Iterator from typing import Pattern def multiple_replace_compile(replacement_dict: Dict[str, str]) -> Pattern: """Make a regex pattern for finding all keys in replacement dict. Calling this directly with `multiple_replace_run` allow...
/ra_utils-1.13.9-py3-none-any.whl/ra_utils/multiple_replace.py
0.903362
0.645679
multiple_replace.py
pypi
from collections.abc import Mapping from inspect import signature from typing import Any from typing import Callable from typing import Iterator from typing import Optional class LazyEval: """Lazily evaluated dict member, used in tandem with `LazyDict`. For details and usage see `LazyDict`. """ def ...
/ra_utils-1.13.9-py3-none-any.whl/ra_utils/lazy_dict.py
0.957298
0.853913
lazy_dict.py
pypi
import re from functools import lru_cache from typing import Any from typing import Callable from typing import Dict from typing import Iterator from typing import Pattern _has_pydantic = True try: from pydantic import BaseModel except ImportError: # pragma: no cover _has_pydantic = False BaseModel = obje...
/ra_utils-1.13.9-py3-none-any.whl/ra_utils/semantic_version_type.py
0.81372
0.655308
semantic_version_type.py
pypi
from functools import partial from functools import wraps from typing import Any from typing import Callable from typing import Dict from typing import Iterator from typing import List from typing import Optional from typing import Tuple _has_jinja = True try: from jinja2 import Template except ImportError: # pra...
/ra_utils-1.13.9-py3-none-any.whl/ra_utils/jinja_filter.py
0.939893
0.460046
jinja_filter.py
pypi
import json from functools import lru_cache from pathlib import Path from typing import Any from typing import Callable from typing import cast from typing import Dict # This path is now used on all (non-K8S) servers _JSON_SETTINGS_PATH = "/opt/dipex/os2mo-data-import-and-export/settings/settings.json" @lru_cache(ma...
/ra_utils-1.13.9-py3-none-any.whl/ra_utils/load_settings.py
0.85987
0.623004
load_settings.py
pypi
"""Pydantic StructuredUrl model.""" import json from typing import Any from typing import Optional from urllib.parse import parse_qsl from urllib.parse import quote from urllib.parse import urlencode try: from pydantic import AnyUrl from pydantic import BaseModel from pydantic import Field from pydanti...
/ra_utils-1.13.9-py3-none-any.whl/ra_utils/structured_url.py
0.920531
0.270709
structured_url.py
pypi
from asyncio import get_event_loop from asyncio import iscoroutinefunction from asyncio import new_event_loop from functools import partial from functools import wraps from types import TracebackType from typing import Any from typing import Awaitable from typing import Callable from typing import Optional from typing ...
/ra_utils-1.13.9-py3-none-any.whl/ra_utils/syncable.py
0.816223
0.461259
syncable.py
pypi
import folium import pandas as pd from folium.features import CustomIcon import urllib.request import matplotlib.pyplot as plt import seaborn as sns from io import StringIO from types import MethodType class Map(): """ Map is a class will create, save and customize point to point visualizations. Ra Ma...
/raViz-0.1.0.tar.gz/raViz-0.1.0/ra/ra.py
0.579519
0.550305
ra.py
pypi
from __future__ import (absolute_import, division,print_function) from builtins import * # Other packages import math # Other parts of raasaft from raasaft.mie import * from raasaft.constants import * # This is the alkane class based on the M&M correlation. class MnMAlkane(MieCG): # Define tables that give the s...
/raaSAFT-0.6.4.tar.gz/raaSAFT-0.6.4/raasaft/alkanes.py
0.709321
0.353066
alkanes.py
pypi
# raadpy | RAAD Data Analysis Framework <p align="center"> <img src="https://img.shields.io/badge/raadpy-Active-green?style=for-the-badge" alt="raadpy"> </p> <p align="center"> <img src="https://img.shields.io/pypi/format/raadpy?style=flat-square" alt="Format"> <img src="https://img.shields.io/pypi/v/raadpy?style=...
/raadpy-2.1.5.tar.gz/raadpy-2.1.5/README.md
0.894401
0.90878
README.md
pypi
# RAATK RAATK: A Python-based reduce amino acid toolkit of machine learning for protein sequence level inference. - [User Manual](https://github.com/huang-sh/raatk/wiki/User-manual) - [用户手册](https://github.com/huang-sh/raatk/wiki/%E7%94%A8%E6%88%B7%E6%89%8B%E5%86%8C) Installation ------------ It is recommended to us...
/raatk-1.2.7.tar.gz/raatk-1.2.7/README.md
0.69987
0.839405
README.md
pypi
# <p align="center">🥕 Rabbie 🥕</p> <p align="center"> <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/scuffi/rabbie"> <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/rabbie"> <img alt="GitHub" src="https://img.shields.io/github/license/scuffi/rabbie"> <a hr...
/rabbie-0.0.9.tar.gz/rabbie-0.0.9/README.md
0.451085
0.819533
README.md
pypi
import numpy as np def calculate_surface_densities_by_group(group, data_transects, transect_lenght=300): parameters = Native_Group_Parameters(group, data_transects, transect_lenght) animal_group_data = parameters.animal_group_data TRANSECT_PARAMETERS = { "length": parameters.length, "width...
/rabbit_clarion-1.0.0-py3-none-any.whl/rabbit_clarion/calculate_wildlife_surface_densities.py
0.678327
0.396623
calculate_wildlife_surface_densities.py
pypi
import asyncio import os from contextlib import suppress from typing import Callable, Optional from aioamqp.channel import Channel from aioamqp.envelope import Envelope from aioamqp.exceptions import SynchronizationError from aioamqp.properties import Properties from attrs import field, mutable, validators from ._wai...
/rabbit-client-3.0.2.tar.gz/rabbit-client-3.0.2/rabbit/subscribe.py
0.784195
0.15006
subscribe.py
pypi
import asyncio from typing import Callable from aioamqp.channel import Channel from aioamqp.envelope import Envelope from aioamqp.properties import Properties from attrs import field, mutable, validators from ._wait import constant from .exceptions import AttributeNotInitialized, OperationError from .exchange import ...
/rabbit-client-3.0.2.tar.gz/rabbit-client-3.0.2/rabbit/dlx.py
0.826187
0.155463
dlx.py
pypi
import pika import pika_message class Message: """Abstract representation of a RabbitMQ message. It is independant of pika or any other library. The message has three parts: two dictionaries and a string: * body (string) * delivery_info (dict) * delivery_tag * prope...
/rabbit_utils-0.1.0.tar.gz/rabbit_utils-0.1.0/rabbit_droppings/message.py
0.671578
0.207114
message.py
pypi
from pika_message import PikaMessage from rabbit_droppings import Message from reader import Reader class _Queue: """A RabbitMQ queue. Not for external use.""" def __init__(self, channel, name): """Create an instance given a pika.Channel and the queue's name.""" self._channel = channel ...
/rabbit_utils-0.1.0.tar.gz/rabbit_utils-0.1.0/rabbit_droppings/queue.py
0.893312
0.166811
queue.py
pypi
try: # python 2.x from urllib import quote except ImportError: # python 3.x from urllib.parse import quote import requests def _quote(value): return quote(value, '') class Client(object): """RabbitMQ Management plugin api Usage:: >>> client = Client('http://localhost:15672', '...
/rabbitman-0.1.0.tar.gz/rabbitman-0.1.0/rabbitman.py
0.655667
0.217524
rabbitman.py
pypi
# RabbitMark **RabbitMark** is a powerful desktop bookmark manager built on the Qt framework, designed for efficiently managing large collections of websites. ## Features * **Tag-based organization**. Folders don't work well for bookmarks; things usually belong in multiple places. * **Lightning-fast filter and ...
/rabbitmark-0.2.1.tar.gz/rabbitmark-0.2.1/README.md
0.792384
0.85747
README.md
pypi
from rabbitmq_admin.base import Resource from six.moves import urllib class AdminAPI(Resource): """ The entrypoint for interacting with the RabbitMQ Management HTTP API """ def overview(self): """ Various random bits of information that describe the whole system """ re...
/rabbitmq-admin-0.2.tar.gz/rabbitmq-admin-0.2/rabbitmq_admin/api.py
0.90283
0.202404
api.py
pypi
from urllib import parse from rabbitmq_admin.base import Resource class RabbitAPIClient(Resource): """ The entrypoint for interacting with the RabbitMQ Management HTTP API """ def _quote(self, value): """Quotes without saving characters.""" return parse.quote(value, safe='') def...
/rabbitmq_api_admin-0.4.0-py3-none-any.whl/rabbitmq_admin/api.py
0.895514
0.210462
api.py
pypi
import logging from typing import List, Text import requests from pyramda import map from rabbitmqbaselibrary.common.handlers import handle_rest_response, handle_rest_response_with_body class Binding(object): def __init__(self, obj: dict): self.source: Text = str(obj.get('source')) self.destina...
/rabbitmq-base-library-0.8.10.tar.gz/rabbitmq-base-library-0.8.10/rabbitmqbaselibrary/bindings/bindings.py
0.804137
0.150715
bindings.py
pypi
import inspect from typing import Iterable, Optional, Union from uuid import UUID, uuid4 from pydantic import BaseModel from starlette import status as http_code class MessageHeader(BaseModel): src: str dst: str class MessageStatus(BaseModel): message: str code: int class BaseMessage(BaseModel): ...
/rabbitmq_broker-1.2.2-py3-none-any.whl/rmq_broker/models.py
0.766031
0.184657
models.py
pypi
from collections import defaultdict from typing import Tuple from rmq_broker.async_chains.base import BaseChain as AsyncBaseChain from rmq_broker.async_chains.base import ChainManager from rmq_broker.chains.base import BaseChain from rmq_broker.schemas import ProcessedBrokerMessage, UnprocessedBrokerMessage from rmq_b...
/rabbitmq_broker-1.2.2-py3-none-any.whl/rmq_broker/documentation/base.py
0.455199
0.178884
base.py
pypi
from enum import Enum from typing import Any, Dict, List, Optional, Union try: from pydantic import AnyUrl, EmailStr, Field from pydantic.main import BaseModel from pydantic.networks import email_validator # noqa F401 except ImportError: print( "Для использования чейна генерации документации ...
/rabbitmq_broker-1.2.2-py3-none-any.whl/rmq_broker/documentation/models.py
0.828315
0.258202
models.py
pypi
import logging from abc import ABC, abstractmethod from pydantic.error_wrappers import ValidationError from starlette import status from rmq_broker.models import ErrorMessage, ProcessedMessage, UnprocessedMessage from rmq_broker.schemas import ( BrokerMessageHeader, ProcessedBrokerMessage, UnprocessedBrok...
/rabbitmq_broker-1.2.2-py3-none-any.whl/rmq_broker/async_chains/base.py
0.535584
0.327709
base.py
pypi
import logging from abc import abstractmethod from pydantic.error_wrappers import ValidationError from rmq_broker.async_chains.base import BaseChain as AsyncBaseChain from rmq_broker.async_chains.base import ChainManager as AsyncChainManager from rmq_broker.models import ErrorMessage, ProcessedMessage, UnprocessedMes...
/rabbitmq_broker-1.2.2-py3-none-any.whl/rmq_broker/chains/base.py
0.592077
0.209753
base.py
pypi
import functools import logging from pika.exchange_type import ExchangeType from pika.frame import Method from typing import Union from rabbitmq_client.defs import ( QueueParams, QueueBindParams, ConsumeOK, ConsumeParams, ExchangeParams ) from rabbitmq_client.connection import ( RMQConnection,...
/rabbitmq-client-2.4.0.tar.gz/rabbitmq-client-2.4.0/rabbitmq_client/consumer.py
0.810104
0.158272
consumer.py
pypi
from typing import Protocol from pika.spec import BasicProperties class Consumption(Protocol): """ This Protocol is called by a Worker to consume the XML body of a RabbitMQ message. """ def __init__( self, properties: BasicProperties, body: bytes, delivery_tag: in...
/rabbitmq_consume-1.0.0-py3-none-any.whl/rabbitmq_consume/consumption.py
0.911335
0.332825
consumption.py
pypi
def _async_call(fn): """ 内部异步调用 :param fn: :return: """ import threading def wrapper(*args, **kwargs): threading.Thread(target=fn, args=args, kwargs=kwargs).start() return wrapper class RabbitConsumer: """ RabbitMQ Simple Consumer """ def __init__(self, host:...
/rabbitplus-0.0.1.tar.gz/rabbitplus-0.0.1/rabbitplus.py
0.552057
0.206754
rabbitplus.py
pypi
![pybind11 logo](https://github.com/pybind/pybind11/raw/master/docs/pybind11-logo.png) # pybind11 — Seamless operability between C++11 and Python [![Documentation Status](https://readthedocs.org/projects/pybind11/badge/?version=master)](http://pybind11.readthedocs.org/en/master/?badge=master) [![Documentation Status]...
/rabbitsketch-0.0.2.tar.gz/rabbitsketch-0.0.2/pybind11/README.md
0.905513
0.834002
README.md
pypi
from typing import List from dataclasses import dataclass @dataclass class RabboniCmd: length: int = 0 command: int = 0 data: int = 0 def __repr__(self): return f'<RabboniCmd length: {self.length}, command: {self.command}, data: {self.data}>' @property def payload(self): cmd_...
/rabboni_multi_python_sdk-0.1.0-py3-none-any.whl/rabboni_multi_python_sdk/command.py
0.496826
0.277754
command.py
pypi
from datetime import datetime from pathlib import PurePath from typing import Optional from urllib.parse import parse_qs from slugify import slugify from uritools import uricompose, urisplit # type: ignore def canonicalize_show(show: str) -> str: """Get the slug for a show. Uses [python-slugify](https://gi...
/rabe_cridlib-0.10.1-py3-none-any.whl/cridlib/lib.py
0.921118
0.762855
lib.py
pypi
import logging import os from datetime import datetime from opentelemetry._logs import set_logger_provider from opentelemetry.exporter.otlp.proto.grpc._log_exporter import OTLPLogExporter from opentelemetry.sdk._logs import LoggerProvider, LoggingHandler from opentelemetry.sdk._logs.export import ( BatchLogRecordP...
/rabe_nowplaying-2.16.1-py3-none-any.whl/nowplaying/otel.py
0.476336
0.153042
otel.py
pypi
# RABIES: Rodent Automated Bold Improvement of EPI Sequences. RABIES is an open source image processing pipeline for rodent fMRI. It conducts state-of-the-art preprocessing and confound correction, and supplies standard resting-state functional connectivity analyses. Visit our documentation at <https://rabies.readthed...
/rabies-0.4.7.tar.gz/rabies-0.4.7/README.md
0.85496
0.922761
README.md
pypi
# This file generates steps of registration between two images and attempts to compensate # For ANTs' dependency on the resolution of the file # We do this by defining two scales to step over # blur_scale, which is the real-space steps in blurring we will do # shrink_scale, which is the subsampling scale that is 1/2 ...
/rabies-0.4.7.tar.gz/rabies-0.4.7/minc-toolkit-extras/ants_generate_iterations.py
0.511229
0.410815
ants_generate_iterations.py
pypi
from argparse import ArgumentParser import os import numpy as np import SimpleITK as sitk if __name__ == "__main__": parser = ArgumentParser() parser.add_argument("-o", "--output", type=str, help=""" Name of output average file. """) ...
/rabies-0.4.7.tar.gz/rabies-0.4.7/optimized_antsMultivariateTemplateConstruction/modelbuild_averager.py
0.541651
0.292706
modelbuild_averager.py
pypi
from selenium.webdriver.common.by import By from selenium.common.exceptions import ( NoSuchElementException, UnexpectedTagNameException, ) from selenium.webdriver.support.ui import * import rabird.core.cstring as cstring class BaseEditor(object): def __init__(self, webelement): self._element = web...
/rabird.selenium-0.12.5.zip/rabird.selenium-0.12.5/rabird/selenium/ui.py
0.625209
0.172939
ui.py
pypi
from selenium.webdriver.support.expected_conditions import * import re import six import warnings class C(dict): """ Simple condition wrapper class to help simplify coding of match conditions. """ def __init__(self, condition, **kwargs): kwargs.setdefault("required", True) kwargs[...
/rabird.selenium-0.12.5.zip/rabird.selenium-0.12.5/rabird/selenium/expected_conditions.py
0.642432
0.156234
expected_conditions.py
pypi
## Reproducible Analyses for Bioinformatics Rabix is an open source implementation of the specification being developed on the [Common Workflow Language mailing list](https://groups.google.com/forum/#!forum/common-workflow-language). CWL is an informal task force consisting of people from various organizations that h...
/rabix-0.8.0.tar.gz/rabix-0.8.0/README.md
0.509764
0.852322
README.md
pypi
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Gaussian(Distribution): """ Gaussian distribution class for calculating and visualizing a Gaussian distribution. Attributes: mean (float) representing the mean value of the distribution stdev (float) representing ...
/rac_distributions-0.1.tar.gz/rac_distributions-0.1/rac_distributions/Gaussiandistribution.py
0.688364
0.853058
Gaussiandistribution.py
pypi
from datetime import datetime import elasticsearch_dsl as es from dateutil import parser from elasticsearch.helpers import streaming_bulk from .analyzers import base_analyzer class ResolveException(Exception): pass class DateField(es.Date): """Custom Date field to support indexing year-only dates and date...
/rac_es-1.0.0-py3-none-any.whl/rac_es/documents.py
0.897942
0.474996
documents.py
pypi
import random import logging from decimal import Decimal, ROUND_HALF_UP from math import nan def _clamp(x, min_val, max_val): """ Force a number between bounds. Args: x (float): input value to be clamped. min_val (float): lower bound. max_val (float): upper bound. Returns: ...
/raccoon-cluster-0.5.1.tar.gz/raccoon-cluster-0.5.1/raccoon/optim/de.py
0.809464
0.565779
de.py
pypi
import os import math import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.colors import LinearSegmentedColormap import seaborn as sns import pandas as pd mpl.use('Agg') sns.set_style("darkgrid") class Palettes: nupal = ['#247ba0', '#70c1b3', '#b2dbbf', '#f3ffbd', '#ff714...
/raccoon-cluster-0.5.1.tar.gz/raccoon-cluster-0.5.1/raccoon/utils/plots.py
0.715126
0.468183
plots.py
pypi
import time from datetime import datetime, timedelta, timezone from timeit import default_timer as timer from typing import Union import pytz class StopWatch(object): _started_at: Union[datetime, None] = None _stopped_at: Union[datetime, None] = None _start_timer: Union[timer, None] = None _end_timer...
/raccoon_simple_stopwatch-0.0.3.tar.gz/raccoon_simple_stopwatch-0.0.3/raccoon_simple_stopwatch/stopwatch.py
0.843959
0.322339
stopwatch.py
pypi
from datetime import datetime, timedelta import re import argparse TIME_FORMAT = '%Y-%m-%d_%I:%M:%S.%f' START_FILE = "//start.log" END_FILE = "//end.log" ABBREV_FILE = "//abbreviations.txt" def get_data_for_report(folder: str) -> tuple: """ Read data needed for report from files on disc. Parameters: ...
/race_rep-0.0.1-py3-none-any.whl/report.py
0.557243
0.239016
report.py
pypi
import os from dataclasses import dataclass from datetime import datetime from typing import Dict, List from .constants import ABBR_FILE, START_LOG, STOP_LOG, TIME_FORMAT from .exeptions import ValidationError from .file_process import abbr_conversion, file_conversion, log_conversion slicing_time_m_s_ss = slice(2, -3...
/race_report_2023-0.1.0-py3-none-any.whl/report_generate/report.py
0.592902
0.167866
report.py
pypi
# Report of Monaco 2018 Racing ## Installation Clone this repository to your local machine: Use the manager [pip](https://pip.pypa.io/en/stable/) to install package: ```bash pip install race-report ``` ## Summary Application that read data from **3 files**, order racers by time and print report that shows 2 tables...
/race_report-1.0.0.tar.gz/race_report-1.0.0/README.md
0.562297
0.804137
README.md
pypi
from datetime import datetime, timedelta from prettytable import PrettyTable from termcolor import colored TABLE_FIELD_NAMES = ["Place", "Driver name", "Team", "Best lap"] TIME_FORMAT = "%Y-%m-%d_%H:%M:%S.%f" NUMBER_TOP_DRIVERS = 15 # The number of drivers who will be in the TOP table def abbr_decoder(path_to_fil...
/race_report-1.0.0.tar.gz/race_report-1.0.0/race_report/report.py
0.777638
0.380644
report.py
pypi
import argparse import os from typing import Callable from race_report.report import abbr_decoder, drivers_best_lap, build_report, print_report AVAILABLE_FILE_NAMES = ['abbreviations.txt', 'end.log', 'start.log'] def parse_arguments(): """Parse command line arguments. """ parser = argparse.ArgumentParser( ...
/race_report-1.0.0.tar.gz/race_report-1.0.0/race_report/report_cli.py
0.542136
0.208018
report_cli.py
pypi
TYRE_COMPOUND = { 16: 'C5', # super soft 17: 'C4', 18: 'C3', 19: 'C2', 20: 'C1', # hard 7: 'intermediates', 8: 'wet', # F1 Classic 9: 'dry', 10: 'wet', # F2 11: 'super soft', 12: 'soft', 13: 'medium', 14: 'hard', 15: 'wet', } WEATHER = { 0: 'clear',...
/race_strategist-0.0.1.tar.gz/race_strategist-0.0.1/race_strategist/constants.py
0.474631
0.354712
constants.py
pypi
import logging from typing import List, Union from race_strategist.config import RecorderConfiguration from race_strategist.connectors.influxdb.connector import InfluxDBConnector from race_strategist.connectors.influxdb.processor import InfluxDBProcessor from race_strategist.connectors.kafka.connector import KafkaConn...
/race_strategist-0.0.1.tar.gz/race_strategist-0.0.1/race_strategist/recorder.py
0.793306
0.216053
recorder.py
pypi
from abc import ABC, abstractmethod from typing import Dict, List from race_strategist.session.session import Drivers, Driver, CurrentLaps, Lap, Session from race_strategist.constants import TEAMS, DRIVERS, TRACK_IDS, SESSION_TYPE class Processor(ABC): def __init__(self, session: Session, drivers: Drivers, laps:...
/race_strategist-0.0.1.tar.gz/race_strategist-0.0.1/race_strategist/modelling/processor.py
0.751101
0.159283
processor.py
pypi
TYRE_COMPOUND = { 16: 'C5', # super soft 17: 'C4', 18: 'C3', 19: 'C2', 20: 'C1', # hard 7: 'intermediates', 8: 'wet', # F1 Classic 9: 'dry', 10: 'wet', # F2 11: 'super soft', 12: 'soft', 13: 'medium', 14: 'hard', 15: 'wet', } WEATHER = { 0: 'clear'...
/race_strategist-0.0.1.tar.gz/race_strategist-0.0.1/race_strategist/telemetry/constants.py
0.493409
0.387719
constants.py
pypi
import socket from typing import Union, Dict from telemetry_f1_2021.cleaned_packets import HEADER_FIELD_TO_PACKET_TYPE, PacketHeader class TelemetryFeed: _player_car_index: Union[int, None] = None _player_team: str _socket = None teammate: Dict teammate_index: int = -1 player_index: int = -1 ...
/race_strategist-0.0.1.tar.gz/race_strategist-0.0.1/race_strategist/telemetry/listener.py
0.624752
0.169303
listener.py
pypi
from abc import ABC, abstractmethod from typing import Dict, List from race_strategist.session.session import Drivers, Driver, CurrentLaps, Lap, Session from race_strategist.telemetry.constants import TEAMS, DRIVERS, TRACK_IDS, SESSION_TYPE class Processor(ABC): def __init__(self, session: Session, drivers: Driv...
/race_strategist-0.0.1.tar.gz/race_strategist-0.0.1/race_strategist/packet_processing/processor.py
0.75037
0.156652
processor.py
pypi
[![Test Python package](https://github.com/lucharo/raceplotly/actions/workflows/python-package-test.yml/badge.svg)](https://github.com/lucharo/raceplotly/actions/workflows/python-package-test.yml) [![PyPI version](https://badge.fury.io/py/raceplotly.svg)](https://badge.fury.io/py/raceplotly) [![Python 3.8](https://img....
/raceplotly-0.1.7.tar.gz/raceplotly-0.1.7/README.md
0.735737
0.978281
README.md
pypi
import re from datetime import datetime def check_abbreviations(abbrevs_file_path: str) -> dict: """ Reads in a file of race abbreviations and returns a dictionary containing the race abbreviations as well as the corresponding racer and team names. Parameters: - abbrevs_file_pa...
/races-reports-generator-1.0.0.tar.gz/races-reports-generator-1.0.0/src/races_reports_generator/main.py
0.796649
0.664704
main.py
pypi
import json import uuid class RaceHandler: """ Standard race handler. You should use this class as a basis for creating your own handler that can consume incoming messages, react to race data changes, and send stuff back to the race room. """ # This is used by `should_stop` to determine w...
/racetime-bot-2.0.0.tar.gz/racetime-bot-2.0.0/racetime_bot/handler.py
0.679604
0.31321
handler.py
pypi
from pathlib import Path import fnmatch from typing import List, Iterable DEFAULT_IGNORE_PATTERNS = [ '*.zip', '.git', '*.pyc', '__pycache__', '.gitignore', '/.racetrackignore', '/plugin-manifest.yaml', ] class FilenameMatcher: """ A matcher checking if the file path matches one o...
/racetrack-client-2.18.0.tar.gz/racetrack-client-2.18.0/racetrack_client/plugin/bundler/filename_matcher.py
0.837952
0.420421
filename_matcher.py
pypi
from datetime import datetime, timezone from typing import Optional def datetime_to_timestamp(dt: datetime) -> int: """Convert datetime.datetime to integer timestamp in seconds""" return int(dt.timestamp()) def timestamp_to_datetime(timestamp: int) -> datetime: """Convert integer timestamp in seconds to...
/racetrack-client-2.18.0.tar.gz/racetrack-client-2.18.0/racetrack_client/utils/time.py
0.906621
0.493531
time.py
pypi
import re from typing import Callable, List, Optional, TypeVar T = TypeVar("T") class SemanticVersion: """ Version numbering adhering to Semantic Versioning Specification (SemVer) It should match `MAJOR.MINOR.PATCH[LABEL]` format, eg.: - 1.2.3 - 10.0.1-alpha - 0.0.0-dev """ version_...
/racetrack-client-2.18.0.tar.gz/racetrack-client-2.18.0/racetrack_client/utils/semver.py
0.877556
0.394463
semver.py
pypi
import dataclasses from datetime import date, datetime import json from pathlib import Path, PosixPath from pydantic import BaseModel from typing import Dict, List, Type, TypeVar import yaml T = TypeVar("T", bound=BaseModel) def parse_dict_datamodel( obj_dict: Dict, clazz: Type[T], ) -> T: """ Cast...
/racetrack-client-2.18.0.tar.gz/racetrack-client-2.18.0/racetrack_client/utils/datamodel.py
0.830285
0.540863
datamodel.py
pypi
from functools import total_ordering import re @total_ordering class Quantity: _suffix_multipliers = { 'E': 1e18, 'P': 1e15, 'T': 1e12, 'G': 1e9, 'M': 1e6, 'k': 1e3, '': 1, 'm': 1e-3, 'u': 1e-6, 'n': 1e-9, 'p': 1e-12, ...
/racetrack-client-2.18.0.tar.gz/racetrack-client-2.18.0/racetrack_client/utils/quantity.py
0.856092
0.302288
quantity.py
pypi
import io import subprocess import sys import threading from pathlib import Path from typing import Optional, Callable from racetrack_client.log.logs import get_logger logger = get_logger(__name__) def shell( cmd: str, workdir: Optional[Path] = None, print_stdout: bool = True, read_bytes: bool = Fa...
/racetrack-client-2.18.0.tar.gz/racetrack-client-2.18.0/racetrack_client/utils/shell.py
0.651577
0.16872
shell.py
pypi