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
import copy from dataclasses import is_dataclass, dataclass, Field from itertools import zip_longest from typing import TypeVar, Type, Optional, Mapping, Any, Union, List from typing_extensions import TypeAlias from .config import Config from .data import Data, DictData from .dataclasses import ( get_default_value...
/scale_sensor_fusion_io-0.3.2-py3-none-any.whl/scale_sensor_fusion_io/validation/dacite_internal/core.py
0.690246
0.241243
core.py
pypi
from typing import Any, Type, Optional, Set, Dict, List from .types import is_union def _name(type_: Type) -> str: return ( type_.__name__ if hasattr(type_, "__name__") and not is_union(type_) else str(type_) ) class DaciteError(Exception): pass class DaciteFieldError(DaciteErr...
/scale_sensor_fusion_io-0.3.2-py3-none-any.whl/scale_sensor_fusion_io/validation/dacite_internal/exceptions.py
0.911756
0.155687
exceptions.py
pypi
import pprint from dataclasses import asdict, dataclass from enum import Enum from typing import Callable, Generic, List, Literal, Optional, TypeVar, Union import numpy as np import scale_sensor_fusion_io.validation.dacite_internal as _dacite from scale_json_binary import read_file from scale_sensor_fusion_io.models i...
/scale_sensor_fusion_io-0.3.2-py3-none-any.whl/scale_sensor_fusion_io/validation/parser/sfs.py
0.797872
0.215619
sfs.py
pypi
import numpy as np import pandas as pd from scipy.spatial.transform import Rotation # Utils def points_to_df(points): positions = points['positions'].reshape(-1, 3) return pd.DataFrame({ 'x': positions[:, 0], 'y': positions[:, 1], 'z': positions[:, 2], 'intensity': points['intensities'], 'time...
/scale_sensor_fusion_io-0.3.2-py3-none-any.whl/scale_sensor_fusion_io/utils/downsample.py
0.561936
0.44083
downsample.py
pypi
import os import numpy.typing as npt from typing import Any, List, Iterable, Optional, Union from dataclasses import dataclass from subprocess import Popen, PIPE from tqdm import tqdm import ffmpeg from turbojpeg import TurboJPEG turbo_jpeg = TurboJPEG() @dataclass class VideoWriter: target_file: str fps: O...
/scale_sensor_fusion_io-0.3.2-py3-none-any.whl/scale_sensor_fusion_io/utils/generate_video.py
0.733547
0.234122
generate_video.py
pypi
from enum import Enum from typing import cast import dacite from scale_json_binary import JSONBinaryEncoder import scale_sensor_fusion_io.models from scale_sensor_fusion_io.model_converters import from_scene_spec_sfs from ..spec import SFS encoder = JSONBinaryEncoder() def _fix_data_shape(scene: SFS.Scene) -> SFS....
/scale_sensor_fusion_io-0.3.2-py3-none-any.whl/scale_sensor_fusion_io/loaders/sfs_loader.py
0.864009
0.230876
sfs_loader.py
pypi
from enum import Enum from typing import Optional, cast import dacite from scale_json_binary import JSONBinaryEncoder from ..spec import BS5 encoder = JSONBinaryEncoder() def _fix_data_shape(scene: BS5.Scene) -> BS5.Scene: """ When reading via dacite, the numpy arrays aren't correctly shaped (since that's ...
/scale_sensor_fusion_io-0.3.2-py3-none-any.whl/scale_sensor_fusion_io/loaders/bs5_loader.py
0.878738
0.235295
bs5_loader.py
pypi
import logging import json LOG_MESSAGES = { "PathNotFound": "The file path does not exist.", "UnreadableFile": "The file was not readable.", "MalformedJson": "The trigger(s) definition has malformed JSON.", "InvalidType": "The trigger definition is an invalid input type.", "InvalidAutotagDims": "T...
/scale-smartcapture-0.5.tar.gz/scale-smartcapture-0.5/smartcapture/logger.py
0.549157
0.21713
logger.py
pypi
import base64 import json import requests from typing import List, Union, Tuple from .trigger import Trigger from .logger import Logger, LOG_MESSAGES from .constants import SMARTCAPTURE_ENDPOINT class SmartCaptureClient: def __init__( self, device_name: str, api_key: str = "", ext...
/scale-smartcapture-0.5.tar.gz/scale-smartcapture-0.5/smartcapture/client.py
0.810179
0.158402
client.py
pypi
import json import time from typing import Tuple from .scql import SCQLPredicate from .logger import Logger, LOG_MESSAGES class Trigger: def __init__( self, trigger_id: str, predicate: str, metadata: dict, logger: Logger ) -> None: """ Args: trigger_id: Unique identifier to ide...
/scale-smartcapture-0.5.tar.gz/scale-smartcapture-0.5/smartcapture/trigger.py
0.801392
0.271929
trigger.py
pypi
import numpy as np from typing import Any, Tuple, TYPE_CHECKING from smartcapture.utils import getFromDict from .logger import LOG_MESSAGES if TYPE_CHECKING: from smartcapture.trigger import Trigger class SCQLPredicate: def __init__(self, predicate: Any, autotags: dict, trigger: "Trigger"): self.pred...
/scale-smartcapture-0.5.tar.gz/scale-smartcapture-0.5/smartcapture/scql.py
0.619471
0.355915
scql.py
pypi
# Python SCALE Codec [![Build Status](https://img.shields.io/github/actions/workflow/status/polkascan/py-scale-codec/unittests.yml?branch=master)](https://github.com/polkascan/py-scale-codec/actions/workflows/unittests.yml?query=workflow%3A%22Run+unit+tests%22) [![Latest Version](https://img.shields.io/pypi/v/scalecod...
/scalecodec-1.2.6.tar.gz/scalecodec-1.2.6/README.md
0.703142
0.776496
README.md
pypi
from typing import Union import numpy as np import scipy.linalg from scipy.linalg import cholesky from scipy.sparse import csc_matrix, csr_matrix from scipy.sparse.linalg import LinearOperator, aslinearoperator from sklearn.decomposition import TruncatedSVD from sklearn.utils.extmath import randomized_range_finder __...
/scaled_preconditioners-0.1.1-py3-none-any.whl/scaled_preconditioners/approximation.py
0.947697
0.759627
approximation.py
pypi
import numpy as np import scipy.sparse from scipy.sparse import identity as sparse_identity from scipy.sparse.linalg import LinearOperator from scaled_preconditioners.approximation import Factor, approximate __all__ = ["compute_preconditioner", "Factor"] def compute_preconditioner( factor: Factor, psd_term:...
/scaled_preconditioners-0.1.1-py3-none-any.whl/scaled_preconditioners/preconditioner.py
0.936692
0.522994
preconditioner.py
pypi
# Scaled This project is aiming the target that provides simple and efficient and reliable way for distributing computing framework, centralized scheduler and stable protocol when client and worker talking to scheduler # Introduction The goal for this project should be as simple as possible - It built on top of zmq -...
/scaled-0.56.tar.gz/scaled-0.56/README.md
0.41052
0.907885
README.md
pypi
from datetime import datetime import time import singer import json import re import collections import inflection from decimal import Decimal from datetime import datetime logger = singer.get_logger() def validate_config(config): """Validates config""" errors = [] required_config_keys = [ 's3_...
/scalefree-target-s3-json-0.2.tar.gz/scalefree-target-s3-json-0.2/target_s3_json/utils.py
0.638835
0.218523
utils.py
pypi
[![Build Status](https://travis-ci.org/steveniemitz/scales.svg?branch=master)](https://travis-ci.org/steveniemitz/scales) # scales A protocol agnostic RPC client stack for python. ## Features * Built in support for HTTP, Thrift, ThriftMux, Kafka, and Redis (experimental). * Extensible stack for easy support of other ...
/scales-rpc-2.0.1.tar.gz/scales-rpc-2.0.1/README.md
0.482429
0.917709
README.md
pypi
import functools import sys import gevent from gevent import Greenlet from gevent.event import AsyncResult as g_AsyncResult class NamedGreenlet(Greenlet): def __init__(self, run=None, *args, **kwargs): self.name = None Greenlet.__init__(self, run, *args, **kwargs) @classmethod def spawn(cls, name, *ar...
/scales-rpc-2.0.1.tar.gz/scales-rpc-2.0.1/scales/asynchronous.py
0.640973
0.207877
asynchronous.py
pypi
import functools import random try: from gevent.lock import RLock # pylint: disable=E0611 except ImportError: from gevent.coros import RLock from .base import ( LoadBalancerSink, NoMembersError ) from ..asynchronous import AsyncResult from ..constants import ( ChannelState, Int, MessageProperties, Sin...
/scales-rpc-2.0.1.tar.gz/scales-rpc-2.0.1/scales/loadbalancer/heap.py
0.695752
0.167661
heap.py
pypi
from abc import (ABCMeta, abstractmethod) from six import string_types class ServerSetProvider(ABCMeta('ABCMeta', (object,), {})): """Base class for providing a set of servers, as well as optionally notifying the pool of servers joining and leaving the set.""" @abstractmethod def Initialize(self, on_join, on_...
/scales-rpc-2.0.1.tar.gz/scales-rpc-2.0.1/scales/loadbalancer/serverset.py
0.849878
0.200127
serverset.py
pypi
from __future__ import absolute_import from thrift.protocol.TJSONProtocol import TJSONProtocol, JTYPES, CTYPES from thrift.Thrift import TType from ..compat import BytesIO try: import simplejson as json except ImportError: import json class TFastJSONProtocol(TJSONProtocol): class InitContext(object): """...
/scales-rpc-2.0.1.tar.gz/scales-rpc-2.0.1/scales/thrift/protocol.py
0.707607
0.192027
protocol.py
pypi
import matplotlib.pyplot as plt import numpy as np def _get_fret_number(string, note): """ Returns the fret number of a given note on a given string """ pitches = [('A', 0), ('Bbb', 0), ('G##', 0), ('A#', 1), ('Bb', 1), ('Cbb', 1), ('B', 2), ('Cb', 2), ('A##', 2), ...
/scales.py-0.1.4.tar.gz/scales.py-0.1.4/scales.py
0.666931
0.645567
scales.py
pypi
# Scaleup Scale-up Suite Automation. This library provides a set of high level methods for scripting automation of Dynochem(R) and Reaction Lab(TM) models through the ```RunScript Automation``` interface. These methods wrap the COM calls to Scale-up Suite's ```ModelAutomation.exe``` allowing end users to write shorter...
/scaleup-1.0.27.tar.gz/scaleup-1.0.27/README.md
0.829561
0.911219
README.md
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.bridge import ( Region, ) from scaleway_core.utils import ( StrEnumMeta, ) class ListCredentialsRequestOrderBy(str, Enum, metaclass=St...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/mnq/v1alpha1/types.py
0.891457
0.233226
types.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from dateutil import parser from .types import ( NamespaceProtocol, Credential, CredentialNATSCredsFile, CredentialSQSSNSCreds, CredentialSummary, CredentialSummarySQSSNSCreds, ListCredentialsResponse, ListN...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/mnq/v1alpha1/marshalling.py
0.736211
0.240451
marshalling.py
pypi
from typing import List, Optional from scaleway_core.api import API from scaleway_core.bridge import ( Region, ) from scaleway_core.utils import ( fetch_all_pages_async, random_name, validate_path_param, ) from .types import ( ListCredentialsRequestOrderBy, ListNamespacesRequestOrderBy, Na...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/mnq/v1alpha1/api.py
0.923497
0.167117
api.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.bridge import ( TimeSeries, ) from scaleway_core.utils import ( StrEnumMeta, ) class CockpitStatus(str, Enum, metaclass=StrEnumMeta): ...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/cockpit/v1beta1/types.py
0.859457
0.200538
types.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from scaleway_core.bridge import ( unmarshal_TimeSeries, ) from scaleway_core.utils import ( OneOfPossibility, resolve_one_of, ) from dateutil import parser from .types import ( GrafanaUserRole, Cockpit, CockpitEndp...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/cockpit/v1beta1/marshalling.py
0.758958
0.180612
marshalling.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.bridge import ( Money, ) from scaleway_core.utils import ( StrEnumMeta, ) class DownloadInvoiceRequestFileType(str, Enum, metaclass=St...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/billing/v2alpha1/types.py
0.901759
0.258478
types.py
pypi
from typing import Any, Dict from scaleway_core.bridge import ( unmarshal_Money, ) from dateutil import parser from .types import ( GetConsumptionResponse, GetConsumptionResponseConsumption, Invoice, ListInvoicesResponse, ) def unmarshal_GetConsumptionResponseConsumption( data: Any, ) -> Get...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/billing/v2alpha1/marshalling.py
0.761494
0.296393
marshalling.py
pypi
from datetime import datetime from typing import List, Optional from scaleway_core.api import API from scaleway_core.bridge import ( ScwFile, unmarshal_ScwFile, ) from scaleway_core.utils import ( fetch_all_pages_async, validate_path_param, ) from .types import ( DownloadInvoiceRequestFileType, ...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/billing/v2alpha1/api.py
0.829768
0.175485
api.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.bridge import ( Region, ) from scaleway_core.utils import ( StrEnumMeta, ) class ListSecretsRequestOrderBy(str, Enum, metaclass=StrEnu...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/secret/v1alpha1/types.py
0.910491
0.308034
types.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from scaleway_core.utils import ( OneOfPossibility, resolve_one_of, ) from dateutil import parser from .types import ( Product, SecretType, AccessSecretVersionResponse, ListSecretVersionsResponse, ListSecretsRes...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/secret/v1alpha1/marshalling.py
0.75487
0.185689
marshalling.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.bridge import ( Zone, ) from scaleway_core.utils import ( StrEnumMeta, ) class ListImagesRequestOrderBy(str, Enum, metaclass=StrEnumMe...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/marketplace/v2/types.py
0.89963
0.251602
types.py
pypi
from typing import Any, Dict from dateutil import parser from .types import ( Category, Image, ListCategoriesResponse, ListImagesResponse, ListLocalImagesResponse, ListVersionsResponse, LocalImage, Version, ) def unmarshal_Category(data: Any) -> Category: if type(data) is not dic...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/marketplace/v2/marshalling.py
0.806167
0.32178
marshalling.py
pypi
from typing import List, Optional from scaleway_core.api import API from scaleway_core.bridge import ( Zone, ) from scaleway_core.utils import ( OneOfPossibility, fetch_all_pages_async, resolve_one_of, validate_path_param, ) from .types import ( ListImagesRequestOrderBy, ListLocalImagesReq...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/marketplace/v2/api.py
0.929304
0.240953
api.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from typing import List, Optional from scaleway_core.bridge import ( Zone, ) @dataclass class GetImageResponse: image: Optional[Image] @dataclass class GetVersionResponse: version: Optional[Version] @d...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/marketplace/v1/types.py
0.904777
0.497192
types.py
pypi
from typing import Any, Dict from dateutil import parser from .types import ( GetImageResponse, GetVersionResponse, Image, ListImagesResponse, ListVersionsResponse, LocalImage, Organization, Version, ) def unmarshal_LocalImage(data: Any) -> LocalImage: if type(data) is not dict: ...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/marketplace/v1/marshalling.py
0.807309
0.288757
marshalling.py
pypi
from typing import List, Optional from scaleway_core.api import API from scaleway_core.utils import ( fetch_all_pages_async, validate_path_param, ) from .types import ( GetImageResponse, GetVersionResponse, Image, ListImagesResponse, ListVersionsResponse, ) from .marshalling import ( u...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/marketplace/v1/api.py
0.935043
0.206334
api.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from scaleway_core.utils import ( OneOfPossibility, resolve_one_of, ) from dateutil import parser from .types import ( PATRuleProtocol, DHCP, DHCPEntry, Gateway, GatewayNetwork, GatewayType, IP, List...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/vpcgw/v1/marshalling.py
0.735167
0.174797
marshalling.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from scaleway_core.utils import ( OneOfPossibility, resolve_one_of, ) from dateutil import parser from .types import ( APIKey, Application, Group, JWT, ListAPIKeysResponse, ListApplicationsResponse, List...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/iam/v1alpha1/marshalling.py
0.693784
0.168788
marshalling.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.bridge import ( Region, ) from scaleway_core.utils import ( StrEnumMeta, ) class ListPrivateNetworksRequestOrderBy(str, Enum, metaclas...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/vpc/v2/types.py
0.926462
0.311761
types.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from scaleway_core.utils import ( OneOfPossibility, resolve_one_of, ) from dateutil import parser from .types import ( AddSubnetsResponse, DeleteSubnetsResponse, ListPrivateNetworksResponse, ListVPCsResponse, Pr...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/vpc/v2/marshalling.py
0.757077
0.197851
marshalling.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.bridge import ( Zone, ) from scaleway_core.utils import ( StrEnumMeta, ) class ListPrivateNetworksRequestOrderBy(str, Enum, metaclass=...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/vpc/v1/types.py
0.916213
0.367242
types.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from dateutil import parser from .types import ( ListPrivateNetworksResponse, PrivateNetwork, CreatePrivateNetworkRequest, UpdatePrivateNetworkRequest, ) def unmarshal_PrivateNetwork(data: Any) -> PrivateNetwork: if t...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/vpc/v1/marshalling.py
0.724675
0.176317
marshalling.py
pypi
from typing import List, Optional from scaleway_core.api import API from scaleway_core.bridge import ( Zone, ) from scaleway_core.utils import ( fetch_all_pages_async, random_name, validate_path_param, ) from .types import ( ListPrivateNetworksRequestOrderBy, ListPrivateNetworksResponse, P...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/vpc/v1/api.py
0.932982
0.237764
api.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.bridge import ( TimeSeries, Zone, ) from scaleway_core.utils import ( StrEnumMeta, ) class AvailableClusterSettingPropertyType(str...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/redis/v1/types.py
0.891705
0.296794
types.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from scaleway_core.bridge import ( unmarshal_TimeSeries, ) from scaleway_core.utils import ( OneOfPossibility, resolve_one_of, ) from dateutil import parser from .types import ( ACLRule, ACLRuleSpec, AddAclRulesResp...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/redis/v1/marshalling.py
0.76934
0.15925
marshalling.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.bridge import ( Region, ) from scaleway_core.utils import ( StrEnumMeta, ) class DomainLastStatusRecordStatus(str, Enum, metaclass=Str...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/tem/v1alpha1/types.py
0.877503
0.187058
types.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from dateutil import parser from .types import ( CreateEmailRequestAddress, CreateEmailRequestAttachment, CreateEmailResponse, Domain, DomainLastStatus, DomainLastStatusDkimRecord, DomainLastStatusSpfRecord, ...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/tem/v1alpha1/marshalling.py
0.710226
0.30527
marshalling.py
pypi
from datetime import datetime from typing import Awaitable, List, Optional, Union from scaleway_core.api import API from scaleway_core.bridge import ( Region, ) from scaleway_core.utils import ( WaitForOptions, fetch_all_pages_async, validate_path_param, wait_for_resource_async, ) from .types impo...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/tem/v1alpha1/api.py
0.863377
0.152064
api.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.bridge import ( Region, ) from scaleway_core.utils import ( StrEnumMeta, ) class ImageStatus(str, Enum, metaclass=StrEnumMeta): UN...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/registry/v1/types.py
0.901271
0.247669
types.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from scaleway_core.utils import ( OneOfPossibility, resolve_one_of, ) from dateutil import parser from .types import ( ImageVisibility, Image, ListImagesResponse, ListNamespacesResponse, ListTagsResponse, Na...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/registry/v1/marshalling.py
0.739422
0.249059
marshalling.py
pypi
from typing import Awaitable, List, Optional, Union from scaleway_core.api import API from scaleway_core.bridge import ( Region, ) from scaleway_core.utils import ( WaitForOptions, fetch_all_pages_async, random_name, validate_path_param, wait_for_resource_async, ) from .types import ( Imag...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/registry/v1/api.py
0.907166
0.154217
api.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.utils import ( StrEnumMeta, ) class ListProjectsRequestOrderBy(str, Enum, metaclass=StrEnumMeta): CREATED_AT_ASC = "created_at_asc" ...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/account/v2/types.py
0.887394
0.260013
types.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from dateutil import parser from .types import ( ListProjectsResponse, Project, CreateProjectRequest, UpdateProjectRequest, ) def unmarshal_Project(data: Any) -> Project: if type(data) is not dict: raise TypeE...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/account/v2/marshalling.py
0.737347
0.178777
marshalling.py
pypi
from typing import List, Optional from scaleway_core.api import API from scaleway_core.utils import ( fetch_all_pages_async, random_name, validate_path_param, ) from .types import ( ListProjectsRequestOrderBy, ListProjectsResponse, Project, CreateProjectRequest, UpdateProjectRequest, )...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/account/v2/api.py
0.899909
0.184712
api.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.utils import ( StrEnumMeta, ) class ListProjectsRequestOrderBy(str, Enum, metaclass=StrEnumMeta): CREATED_AT_ASC = "created_at_asc" ...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/account/v3/types.py
0.889918
0.246522
types.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from dateutil import parser from .types import ( ListProjectsResponse, Project, ProjectApiCreateProjectRequest, ProjectApiUpdateProjectRequest, ) def unmarshal_Project(data: Any) -> Project: if type(data) is not dict:...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/account/v3/marshalling.py
0.725065
0.161618
marshalling.py
pypi
from typing import List, Optional from scaleway_core.api import API from scaleway_core.utils import ( fetch_all_pages_async, random_name, validate_path_param, ) from .types import ( ListProjectsRequestOrderBy, ListProjectsResponse, Project, ProjectApiCreateProjectRequest, ProjectApiUpd...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/account/v3/api.py
0.917238
0.156234
api.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.bridge import ( Zone, ) from scaleway_core.utils import ( StrEnumMeta, ) class FlexibleIPStatus(str, Enum, metaclass=StrEnumMeta): ...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/flexibleip/v1alpha1/types.py
0.877805
0.224693
types.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from dateutil import parser from .types import ( MACAddressType, AttachFlexibleIPsResponse, DetachFlexibleIPsResponse, FlexibleIP, ListFlexibleIPsResponse, MACAddress, CreateFlexibleIPRequest, UpdateFlexible...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/flexibleip/v1alpha1/marshalling.py
0.761272
0.174797
marshalling.py
pypi
from typing import List from .types import ( ImageState, IpState, PrivateNICState, SecurityGroupState, ServerState, SnapshotState, TaskStatus, VolumeServerState, VolumeState, ) IMAGE_TRANSIENT_STATUSES: List[ImageState] = [ ImageState.CREATING, ] """ Lists transient statutes o...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/instance/v1/content.py
0.685002
0.278226
content.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from typing import Dict, List, Optional from scaleway_core.bridge import ( Zone, ) from .types import ( Arch, BootType, Bootscript, Image, ImageState, PlacementGroup, PrivateNIC, Secu...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/instance/v1/types_private.py
0.911308
0.250111
types_private.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.bridge import ( Money, Region, ) from scaleway_core.utils import ( StrEnumMeta, ) class DnsRecordStatus(str, Enum, metaclass=StrEn...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/webhosting/v1alpha1/types.py
0.852199
0.184584
types.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from scaleway_core.bridge import ( unmarshal_Money, ) from dateutil import parser from .types import ( DnsRecord, DnsRecords, Hosting, HostingCpanelUrls, HostingOption, ListHostingsResponse, ListOffersRespon...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/webhosting/v1alpha1/marshalling.py
0.729134
0.214013
marshalling.py
pypi
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import List, Optional from scaleway_core.bridge import ( Zone, ) from scaleway_core.utils import ( StrEnumMeta, ) class ListServersRequestOrderBy(str, Enum, metaclass=StrEnumM...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/applesilicon/v1alpha1/types.py
0.89391
0.287737
types.py
pypi
from typing import Any, Dict from scaleway_core.profile import ProfileDefaults from dateutil import parser from .types import ( ListOSResponse, ListServerTypesResponse, ListServersResponse, OS, Server, ServerType, ServerTypeCPU, ServerTypeDisk, ServerTypeMemory, CreateServerReq...
/scaleway_async-1.1.0-py3-none-any.whl/scaleway_async/applesilicon/v1alpha1/marshalling.py
0.744563
0.25281
marshalling.py
pypi
from __future__ import annotations import dataclasses import logging import os from dataclasses import dataclass from typing import Optional, Type, TypeVar import sys import yaml from scaleway_core import __version__ from scaleway_core.profile.file import CONFIG_PROPERTIES_TO_PROFILE from .env import ENV_KEY_SCW_CON...
/scaleway_core-1.1.0.tar.gz/scaleway_core-1.1.0/scaleway_core/profile/profile.py
0.732305
0.184418
profile.py
pypi
from typing import Any, Awaitable, Callable, Dict, List, Optional, Type, TypeVar T = TypeVar("T") def _build_fetcher_args( args: Dict[str, Any], page: Optional[int], ) -> Dict[str, Any]: """ Builds the arguments to pass to the fetcher function. """ return { **args, "page": pag...
/scaleway_core-1.1.0.tar.gz/scaleway_core-1.1.0/scaleway_core/utils/fetch_all_pages.py
0.898873
0.303138
fetch_all_pages.py
pypi
import asyncio import inspect import math import random import time from dataclasses import dataclass from typing import ( Any, Awaitable, Callable, Dict, Generator, Generic, Optional, TypeVar, Union, ) system_random = random.SystemRandom() T = TypeVar("T") U = TypeVar("U") WaitFo...
/scaleway_core-1.1.0.tar.gz/scaleway_core-1.1.0/scaleway_core/utils/waiter.py
0.851876
0.364382
waiter.py
pypi
import random ADJECTIVES = [ "admiring", "adoring", "affectionate", "agitated", "amazing", "angry", "awesome", "beautiful", "blissful", "bold", "boring", "brave", "busy", "charming", "clever", "cool", "compassionate", "competent", "condescend...
/scaleway_core-1.1.0.tar.gz/scaleway_core-1.1.0/scaleway_core/utils/random_name.py
0.499512
0.567038
random_name.py
pypi
from dataclasses import dataclass from datetime import datetime from typing import Any, Dict, List from dateutil import parser @dataclass class TimeSeriesPoint: """ Represents a point in a TimeSeries. """ timestamp: datetime """ Date of the point. """ value: float """ Value o...
/scaleway_core-1.1.0.tar.gz/scaleway_core-1.1.0/scaleway_core/bridge/timeseries.py
0.929015
0.678024
timeseries.py
pypi
from scalib.metrics import SNR, Ttest from scalib.modeling import LDAClassifier from scalib.attacks import FactorGraph, BPState from scalib.postprocessing import rank_accuracy from utils import sbox, gen_traces import numpy as np def main(): nc = 256 npoi = 2 # Parameters std = 2 ntraces_a = 40 ...
/scalib-0.5.5.tar.gz/scalib-0.5.5/examples/aes_attack.py
0.764276
0.403156
aes_attack.py
pypi
from contextlib import contextmanager from .termui import get_terminal_size from .parser import split_opt from ._compat import term_len # Can force a width. This is used by the test system FORCED_WIDTH = None def measure_table(rows): widths = {} for row in rows: for idx, col in enumerate(row): ...
/scalr-ctl-7.16.2.tar.gz/scalr-ctl-7.16.2/scalrctl/click/formatting.py
0.800497
0.26781
formatting.py
pypi
import math import random import time import uuid from typing import List from scalr.cloud import CloudAdapter, CloudInstance from scalr.config import PolicyConfig, ScaleDownSelectionEnum, ScalingConfig from scalr.log import log from scalr.policy.factory import PolicyAdapterFactory class Scalr: def __init__(self...
/scalr-ngine-0.16.0.tar.gz/scalr-ngine-0.16.0/scalr/scalr.py
0.686895
0.176778
scalr.py
pypi
import base64 import os from dataclasses import asdict from typing import List, Optional import requests from scalr.cloud import CloudAdapter, GenericCloudInstance from scalr.log import log VULTR_API_KEY: str = str(os.getenv("VULTR_API_KEY")) class Vultr: VULTR_API_URL: str = "https://api.vultr.com/v2" de...
/scalr-ngine-0.16.0.tar.gz/scalr-ngine-0.16.0/scalr/cloud/adapters/vultr.py
0.772187
0.163813
vultr.py
pypi
from dataclasses import dataclass from typing import List from scalr.cloud import CloudAdapter, CloudInstance from scalr.log import log import digitalocean @dataclass class DigitalOceanCloudInstance(CloudInstance): droplet: digitalocean.Droplet def __repr__(self) -> str: return str(self.droplet.nam...
/scalr-ngine-0.16.0.tar.gz/scalr-ngine-0.16.0/scalr/cloud/adapters/digitalocean.py
0.840554
0.163679
digitalocean.py
pypi
class AgentStatus(object): """The main status container object, holding references to all other status elements. """ def __init__(self): # The time (in seconds past epoch) when the agent process was launched. self.launch_time = None # The user name the agent process is running unde...
/scalyr-agent-2-2.0.0.beta.3.tar.gz/scalyr-agent-2-2.0.0.beta.3/scalyr_agent/agent_status.py
0.709422
0.407481
agent_status.py
pypi
from threading import Lock import scalyr_agent.scalyr_logging as scalyr_logging from scalyr_agent.util import StoppableThread log = scalyr_logging.getLogger(__name__) class ScalyrMonitor(StoppableThread): """The base class for all monitors used by the agent. An instance of a monitor will be created for e...
/scalyr-agent-2-2.0.0.beta.3.tar.gz/scalyr-agent-2-2.0.0.beta.3/scalyr_agent/scalyr_monitor.py
0.688468
0.366987
scalyr_monitor.py
pypi
import re from cStringIO import StringIO from scalyr_agent.json_lib import JsonConversionException, JsonObject, JsonArray # Used below to escape characters found in strings when # writing strings as a JSON string. ESCAPES = { ord('"'): ('\\"', u'\\"'), ord('\\'): ('\\\\', u'\\\\'), ord('\b'): ('\\b', u'\...
/scalyr-agent-2-2.0.0.beta.3.tar.gz/scalyr-agent-2-2.0.0.beta.3/scalyr_agent/json_lib/serializer.py
0.613005
0.1982
serializer.py
pypi
import cStringIO import errno import socket import SocketServer import struct import time class ServerProcessor(SocketServer.ThreadingMixIn, SocketServer.TCPServer): """Base class for simple servers that only need to accept incoming connections, perform some actions on individual commands, and return no outp...
/scalyr-agent-2-2.0.0.beta.3.tar.gz/scalyr-agent-2-2.0.0.beta.3/scalyr_agent/monitor_utils/server_processors.py
0.717705
0.332229
server_processors.py
pypi
import os import re import threading import time import scalyr_agent.third_party.tcollector.tcollector as tcollector from Queue import Empty from scalyr_agent.scalyr_monitor import ScalyrMonitor from scalyr_agent.third_party.tcollector.tcollector import ReaderThread from scalyr_agent.json_lib.objects import JsonObject...
/scalyr-agent-2-2.0.0.beta.3.tar.gz/scalyr-agent-2-2.0.0.beta.3/scalyr_agent/builtin_monitors/linux_system_metrics.py
0.731442
0.281399
linux_system_metrics.py
pypi
import re import os from scalyr_agent.scalyr_monitor import ScalyrMonitor # Pattern that matches the first line of a string first_line_pattern = re.compile('[^\r\n]+') # ShellMonitor implementation class ShellMonitor(ScalyrMonitor): """A Scalyr agent monitor which executes a specified shell command, and recor...
/scalyr-agent-2-2.0.0.beta.3.tar.gz/scalyr-agent-2-2.0.0.beta.3/scalyr_agent/builtin_monitors/shell_monitor.py
0.437944
0.277754
shell_monitor.py
pypi
import datetime as dt from scam.CommManager import CommManager class CLI: def __init__(self): try: self.cm = CommManager() except BaseException as e: print('Error: {0}'.format(str(e))) # This function retrieves the reservation requested by the user, either by name or b...
/scam_me-0.2.1-py3-none-any.whl/scam/CLI.py
0.437583
0.189784
CLI.py
pypi
from keras import Model import numpy as np from scam.exceptions import InvalidState from scam.utils import resize_activations, normalize_activations class ScoreCAM: def __init__(self, model_input, last_conv_output, softmax_output, input_shape, cam_batch_size=None): """ Prepares class activation m...
/scam_net_rewintous-0.0.1-py3-none-any.whl/scam/keras.py
0.909636
0.565179
keras.py
pypi
import scamp from inspect import signature from functools import partial from typing import Callable class KeyPlane: """ Abstraction used to transform keyboard input into a two-dimensional control space. Each key pressed corresponds to a vertical and horizontal position, which is passed to the callback ...
/scamp_extensions-0.3.5.post1-py3-none-any.whl/scamp_extensions/interaction/key_plane.py
0.862496
0.518851
key_plane.py
pypi
from __future__ import annotations import itertools from fractions import Fraction from typing import Sequence from expenvelope.envelope import Envelope, SavesToJSON from scamp_extensions.utilities.sequences import multi_option_method from .utilities import ratio_to_cents import math from numbers import Real import lo...
/scamp_extensions-0.3.5.post1-py3-none-any.whl/scamp_extensions/pitch/scale.py
0.964472
0.590897
scale.py
pypi
from typing import Sequence, Dict from numbers import Real from scamp_extensions.utilities.sequences import multi_option_function import math # ----------------------------------------------- Pitch Space Conversions --------------------------------------------- @multi_option_function def ratio_to_cents(ratio: Real...
/scamp_extensions-0.3.5.post1-py3-none-any.whl/scamp_extensions/pitch/utilities.py
0.951684
0.808559
utilities.py
pypi
from typing import List from mido import MidiFile from collections import namedtuple Note = namedtuple("Note", "track channel pitch volume start_time length") def scrape_midi_file_to_note_list(midi_file_path) -> List[Note]: """ Scrapes a list of :class:`Note` objects from all of the tracks of the given MIDI...
/scamp_extensions-0.3.5.post1-py3-none-any.whl/scamp_extensions/parsing/midi.py
0.833223
0.42185
midi.py
pypi
from numbers import Real from typing import Tuple, Callable, Sequence from scamp import EnvelopeSegment, Performance, PerformancePart import drawsvg from scamp import Envelope # -------------------------------------------------- Color/gradients -------------------------------------------------- _default_cm_envelope...
/scamp_extensions-0.3.5.post1-py3-none-any.whl/scamp_extensions/engraving/note_graph.py
0.859752
0.374791
note_graph.py
pypi
from typing import MutableMapping, Any, Tuple from functools import lru_cache import random class LSystem: """ Simple implementation of an LSystem. Each generation is a string consisting of an alphabet of characters. Optionally, these characters can be assigned meanings. :param seed_string: the init...
/scamp_extensions-0.3.5.post1-py3-none-any.whl/scamp_extensions/process/l_systems.py
0.935516
0.600745
l_systems.py
pypi
import random def random_walk(start_value, step=1, turn_around_chance=0.5, clamp_min=None, clamp_max=None): """ Returns a generator starting on `start_value` that randomly walks between `clamp_min` and `clamp_max`, using a step size of `step`, and turning around with probability `turn_around_chance` ...
/scamp_extensions-0.3.5.post1-py3-none-any.whl/scamp_extensions/process/generators.py
0.904277
0.409929
generators.py
pypi
from typing import Sequence, Union, Callable from clockblocks import current_clock, Clock from expenvelope import Envelope, EnvelopeSegment from expenvelope.envelope import T class TimeVaryingParameter(Envelope): """ A simple wrapper around :class:`~expenvelope.envelope.Envelope` that is aware of the current...
/scamp_extensions-0.3.5.post1-py3-none-any.whl/scamp_extensions/utilities/time_varying_parameter.py
0.976197
0.552117
time_varying_parameter.py
pypi
from scamp.utilities import is_x_pow_of_y, floor_x_to_pow_of_y, ceil_x_to_pow_of_y, round_x_to_pow_of_y, \ floor_to_multiple, ceil_to_multiple, round_to_multiple, is_multiple, prime_factor, is_prime from math import gcd import math from expenvelope import EnvelopeSegment from numbers import Real from .sequences im...
/scamp_extensions-0.3.5.post1-py3-none-any.whl/scamp_extensions/utilities/math.py
0.949389
0.477189
math.py
pypi
from __future__ import annotations import logging from collections import namedtuple from clockblocks import Clock from scamp import ScampInstrument, Session, SpellingPolicy, NoteProperties, NoteHandle, ChordHandle from scamp.utilities import NoteProperty from typing import Sequence, Optional, Union, Tuple _PresetIn...
/scamp_extensions-0.3.5.post1-py3-none-any.whl/scamp_extensions/playback/multi_preset_instrument.py
0.919769
0.227266
multi_preset_instrument.py
pypi
from scamp.playback_implementations import OSCPlaybackImplementation from .sc_lang import SCLangInstance from scamp.instruments import ScampInstrument, Ensemble from scamp.utilities import resolve_path class SCPlaybackImplementation(OSCPlaybackImplementation): """ A subclass of :class:`~scamp.playback_imple...
/scamp_extensions-0.3.5.post1-py3-none-any.whl/scamp_extensions/playback/supercollider/sc_playback_implementation.py
0.864982
0.27064
sc_playback_implementation.py
pypi
from numbers import Real from typing import List, Union, Sequence from .metric_structure import MeterArithmeticGroup, INT_OR_FLOAT def indispensability_array_from_expression(meter_arithmetic_expression: str, normalize: bool = False, break_up_large_numbers: bool = False, ...
/scamp_extensions-0.3.5.post1-py3-none-any.whl/scamp_extensions/rhythm/indispensability.py
0.929368
0.633339
indispensability.py
pypi
from __future__ import unicode_literals, division, print_function import logging import struct from .parsing import Parser from .errors import InvalidFormat, EmptyRead logger = logging.getLogger(__name__) class WartsRecord(object): """Base class for a Warts record. This class should not be instanciated d...
/scamper-pywarts-0.2.1.tar.gz/scamper-pywarts-0.2.1/warts/base.py
0.734501
0.332771
base.py
pypi
from __future__ import unicode_literals, division, print_function import struct import ctypes from collections import namedtuple import logging import socket import six from .errors import ParseError, InvalidFormat, EmptyRead, IncompleteRead, ReadError logger = logging.getLogger(__name__) # Represents an ICMP ext...
/scamper-pywarts-0.2.1.tar.gz/scamper-pywarts-0.2.1/warts/parsing.py
0.698329
0.352954
parsing.py
pypi