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 logging import typing from pathlib import Path import networkx as nx import rhasspynlu from rhasspyhermes.base import Message from rhasspyhermes.client import GeneratorType, HermesClient, TopicArgs from rhasspyhermes.intent import Intent, Slot, SlotRange from rhasspyhermes.nlu import ( NluError, NluInt...
/rhasspy-nlu-hermes-0.5.1.tar.gz/rhasspy-nlu-hermes-0.5.1/rhasspynlu_hermes/__init__.py
0.678859
0.24092
__init__.py
pypi
# Rhasspy Natural Language Understanding [![Continuous Integration](https://github.com/rhasspy/rhasspy-nlu/workflows/Tests/badge.svg)](https://github.com/rhasspy/rhasspy-nlu/actions) [![PyPI package version](https://img.shields.io/pypi/v/rhasspy-nlu.svg)](https://pypi.org/project/rhasspy-nlu) [![Python versions](https...
/rhasspy-nlu-0.4.0.tar.gz/rhasspy-nlu-0.4.0/README.md
0.642881
0.979016
README.md
pypi
import base64 import itertools import random import time import typing from collections import defaultdict from dataclasses import dataclass, field from datetime import datetime import networkx as nx from .intent import Entity, Intent, Recognition, RecognitionResult from .jsgf_graph import get_start_end_nodes from .u...
/rhasspy-nlu-0.4.0.tar.gz/rhasspy-nlu-0.4.0/rhasspynlu/fsticuffs.py
0.727007
0.337586
fsticuffs.py
pypi
import itertools import json import logging import re import shutil import subprocess import tempfile import typing from collections import defaultdict from enum import Enum from pathlib import Path PronunciationsType = typing.Dict[str, typing.List[typing.List[str]]] _LOGGER = logging.getLogger(__name__) # ---------...
/rhasspy-nlu-0.4.0.tar.gz/rhasspy-nlu-0.4.0/rhasspynlu/g2p.py
0.633864
0.23793
g2p.py
pypi
import re import typing from dataclasses import dataclass, field from enum import Enum @dataclass class Substitutable: """Indicates an expression may be replaced with some text.""" # Replacement text substitution: typing.Optional[typing.Union[str, typing.List[str]]] = None # Names of converters to a...
/rhasspy-nlu-0.4.0.tar.gz/rhasspy-nlu-0.4.0/rhasspynlu/jsgf.py
0.874466
0.423279
jsgf.py
pypi
import logging import re import shutil import subprocess import tempfile import typing from pathlib import Path import networkx as nx from .jsgf_graph import graph_to_fst from .ngram import get_intent_ngram_counts _LOGGER = logging.getLogger(__name__) # --------------------------------------------------------------...
/rhasspy-nlu-0.4.0.tar.gz/rhasspy-nlu-0.4.0/rhasspynlu/arpa_lm.py
0.603932
0.25422
arpa_lm.py
pypi
import typing from enum import Enum from pathlib import Path import grapheme import numpy as np # ----------------------------------------------------------------------------- class FixedSymbols(str, Enum): """Pseudo-graphemes with fixed indexes""" PAD = "<pad>" SOS = "<s>" EOS = "</s>" def _sigm...
/rhasspy-nlu-0.4.0.tar.gz/rhasspy-nlu-0.4.0/rhasspynlu/g2p_geepers.py
0.745028
0.373019
g2p_geepers.py
pypi
import copy import itertools import typing from collections import Counter, defaultdict, deque import networkx as nx from .jsgf_graph import get_start_end_nodes, lcm def get_intent_ngram_counts( graph: nx.DiGraph, pad_start="<s>", pad_end="</s>", order=3, balance_counts: bool = True, ) -> typing...
/rhasspy-nlu-0.4.0.tar.gz/rhasspy-nlu-0.4.0/rhasspynlu/ngram.py
0.756088
0.391173
ngram.py
pypi
import configparser import io import logging import re import typing from collections import defaultdict from dataclasses import dataclass, field from pathlib import Path from .const import IntentsType, ReplacementsType, SentencesType from .jsgf import ( Expression, ParseMetadata, Rule, RuleReference, ...
/rhasspy-nlu-0.4.0.tar.gz/rhasspy-nlu-0.4.0/rhasspynlu/ini_jsgf.py
0.717507
0.196479
ini_jsgf.py
pypi
import logging import re import typing from num2words import num2words from .jsgf import Expression, Sequence, SequenceType, SlotReference, Word _LOGGER = logging.getLogger(__name__) # 0..100, -100..100 NUMBER_RANGE_PATTERN = re.compile(r"^(-?[0-9]+)\.\.(-?[0-9]+)(,[0-9]+)?$") NUMBER_PATTERN = re.compile(r"^(-?[0-9...
/rhasspy-nlu-0.4.0.tar.gz/rhasspy-nlu-0.4.0/rhasspynlu/numbers.py
0.511229
0.339691
numbers.py
pypi
import base64 import gzip import io import math import typing from dataclasses import dataclass from pathlib import Path import networkx as nx from .const import IntentsType, ReplacementsType, SentencesType from .ini_jsgf import get_intent_counts, split_rules from .jsgf import ( Expression, RuleReference, ...
/rhasspy-nlu-0.4.0.tar.gz/rhasspy-nlu-0.4.0/rhasspynlu/jsgf_graph.py
0.670932
0.323808
jsgf_graph.py
pypi
import logging import subprocess import typing from dataclasses import dataclass from pathlib import Path from .const import IntentsType, ReplacementsType from .jsgf import Expression, Rule, Sentence, Sequence, SlotReference, walk_expression _LOGGER = logging.getLogger(__name__) # -----------------------------------...
/rhasspy-nlu-0.4.0.tar.gz/rhasspy-nlu-0.4.0/rhasspynlu/slots.py
0.842701
0.308893
slots.py
pypi
import dataclasses import datetime import typing from collections.abc import Mapping from dataclasses import dataclass, field from enum import Enum from numbers import Number from . import utils @dataclass class Entity: """Named entity from intent.""" entity: str value: typing.Any raw_value: str = "...
/rhasspy-nlu-0.4.0.tar.gz/rhasspy-nlu-0.4.0/rhasspynlu/intent.py
0.890175
0.302455
intent.py
pypi
import io import logging import typing from pathlib import Path import networkx as nx import rhasspynlu from rhasspynlu.jsgf import Expression, Word _LOGGER = logging.getLogger(__name__) # ----------------------------------------------------------------------------- def sentences_to_graph( sentences_dict: typi...
/rhasspy-server-hermes-2.5.10.tar.gz/rhasspy-server-hermes-2.5.10/rhasspyserver_hermes/train.py
0.781331
0.334005
train.py
pypi
import io import logging import re import subprocess import typing import wave from pathlib import Path import rhasspynlu WHITESPACE_PATTERN = re.compile(r"\s+") _LOGGER = logging.getLogger(__name__) # ----------------------------------------------------------------------------- class FunctionLoggingHandler(loggin...
/rhasspy-server-hermes-2.5.10.tar.gz/rhasspy-server-hermes-2.5.10/rhasspyserver_hermes/utils.py
0.704058
0.228651
utils.py
pypi
# Rhasspy Silence [![Continuous Integration](https://github.com/rhasspy/rhasspy-silence/workflows/Tests/badge.svg)](https://github.com/rhasspy/rhasspy-silence/actions) [![GitHub license](https://img.shields.io/github/license/rhasspy/rhasspy-silence.svg)](https://github.com/rhasspy/rhasspy-silence/blob/master/LICENSE) ...
/rhasspy-silence-0.4.0.tar.gz/rhasspy-silence-0.4.0/README.md
0.545044
0.912981
README.md
pypi
import typing from abc import ABC, abstractmethod from dataclasses import dataclass, field from enum import Enum class VoiceCommandResult(str, Enum): """Success/failure of voice command recognition.""" SUCCESS = "success" FAILURE = "failure" class VoiceCommandEventType(str, Enum): """Possible event...
/rhasspy-silence-0.4.0.tar.gz/rhasspy-silence-0.4.0/rhasspysilence/const.py
0.807385
0.188828
const.py
pypi
import audioop import logging import math import typing from collections import deque import webrtcvad from .const import ( SilenceMethod, VoiceCommand, VoiceCommandEvent, VoiceCommandEventType, VoiceCommandRecorder, VoiceCommandResult, ) _LOGGER = logging.getLogger(__name__) # -------------...
/rhasspy-silence-0.4.0.tar.gz/rhasspy-silence-0.4.0/rhasspysilence/__init__.py
0.775987
0.294025
__init__.py
pypi
import logging import time import typing from pathlib import Path import rhasspysnips_nlu from snips_nlu import SnipsNLUEngine from snips_nlu.default_configs import DEFAULT_CONFIGS from rhasspyhermes.base import Message from rhasspyhermes.client import GeneratorType, HermesClient, TopicArgs from rhasspyhermes.intent ...
/rhasspy-snips-nlu-hermes-0.5.1.tar.gz/rhasspy-snips-nlu-hermes-0.5.1/rhasspysnips_nlu_hermes/__init__.py
0.639961
0.2084
__init__.py
pypi
import io import logging import shutil import tempfile import typing from pathlib import Path import networkx as nx import rhasspynlu from rhasspynlu.intent import Entity, Intent, Recognition from snips_nlu import SnipsNLUEngine from snips_nlu.dataset import Dataset from snips_nlu.default_configs import DEFAULT_CONFIG...
/rhasspy-snips-nlu-0.3.0.tar.gz/rhasspy-snips-nlu-0.3.0/rhasspysnips_nlu/__init__.py
0.569972
0.347537
__init__.py
pypi
import asyncio import logging import queue import socket import tempfile import threading import typing from pathlib import Path import pocketsphinx from rhasspyhermes.audioserver import AudioFrame from rhasspyhermes.base import Message from rhasspyhermes.client import GeneratorType, HermesClient, TopicArgs from rhas...
/rhasspy-wake-pocketsphinx-hermes-0.3.0.tar.gz/rhasspy-wake-pocketsphinx-hermes-0.3.0/rhasspywake_pocketsphinx_hermes/__init__.py
0.635562
0.153549
__init__.py
pypi
import asyncio import logging import queue import socket import struct import threading import typing from pathlib import Path from rhasspyhermes.audioserver import AudioFrame from rhasspyhermes.base import Message from rhasspyhermes.client import GeneratorType, HermesClient, TopicArgs from rhasspyhermes.wake import (...
/rhasspy-wake-porcupine-hermes-0.3.0.tar.gz/rhasspy-wake-porcupine-hermes-0.3.0/rhasspywake_porcupine_hermes/__init__.py
0.618089
0.154823
__init__.py
pypi
import asyncio import logging import queue import socket import subprocess import threading import typing from pathlib import Path from rhasspyhermes.audioserver import AudioFrame from rhasspyhermes.base import Message from rhasspyhermes.client import GeneratorType, HermesClient, TopicArgs from rhasspyhermes.wake impo...
/rhasspy-wake-precise-hermes-0.3.0.tar.gz/rhasspy-wake-precise-hermes-0.3.0/rhasspywake_precise_hermes/__init__.py
0.686685
0.154249
__init__.py
pypi
# Rhasspy Wake Raven Hermes Implements `hermes/hotword` functionality from [Hermes protocol](https://docs.snips.ai/reference/hermes) using [Rhasspy Raven](https://github.com/rhasspy/raven). ## Requirements * Python 3.7 * [Rhasspy Raven](https://github.com/rhasspy/raven) ## Installation ```bash $ git clone https://...
/rhasspy-wake-raven-hermes-0.6.0.tar.gz/rhasspy-wake-raven-hermes-0.6.0/README.md
0.546012
0.724481
README.md
pypi
import argparse import asyncio import logging import typing from pathlib import Path import paho.mqtt.client as mqtt import rhasspyhermes.cli as hermes_cli from rhasspysilence import WebRtcVadRecorder from rhasspysilence.const import SilenceMethod from rhasspywake_raven import Raven, Template from . import WakeHermes...
/rhasspy-wake-raven-hermes-0.6.0.tar.gz/rhasspy-wake-raven-hermes-0.6.0/rhasspywake_raven_hermes/__main__.py
0.620852
0.152631
__main__.py
pypi
# Rhasspy Raven Wakeword System Wakeword detector based on the [Snips Personal Wake Word Detector](https://medium.com/snips-ai/machine-learning-on-voice-a-gentle-introduction-with-snips-personal-wake-word-detector-133bd6fb568e). The underlying implementation of Raven heavily borrows from [node-personal-wakeword](http...
/rhasspy-wake-raven-0.5.2.tar.gz/rhasspy-wake-raven-0.5.2/README.md
0.540439
0.796292
README.md
pypi
import io import wave from rhasspysilence import WebRtcVadRecorder # ----------------------------------------------------------------------------- def buffer_to_wav(buffer: bytes) -> bytes: """Wraps a buffer of raw audio data (16-bit, 16Khz mono) in a WAV""" with io.BytesIO() as wav_buffer: wav_file...
/rhasspy-wake-raven-0.5.2.tar.gz/rhasspy-wake-raven-0.5.2/rhasspywake_raven/utils.py
0.756987
0.369969
utils.py
pypi
import math import typing import numpy as np import scipy.spatial.distance class DynamicTimeWarping: """Computes DTW and holds results. Uses cosine distance and sakoe-chiba constraint by default. """ def __init__(self, distance_func: str = "cosine"): self.cost_matrix: typing.Optional[np.nda...
/rhasspy-wake-raven-0.5.2.tar.gz/rhasspy-wake-raven-0.5.2/rhasspywake_raven/dtw.py
0.849878
0.677207
dtw.py
pypi
import logging import math import time import typing from dataclasses import dataclass import numpy as np import python_speech_features import scipy.io.wavfile from rhasspysilence import WebRtcVadRecorder from .dtw import DynamicTimeWarping _LOGGER = logging.getLogger("rhasspy-wake-raven") # -----------------------...
/rhasspy-wake-raven-0.5.2.tar.gz/rhasspy-wake-raven-0.5.2/rhasspywake_raven/__init__.py
0.810816
0.442877
__init__.py
pypi
import asyncio import logging import queue import socket import threading import typing from dataclasses import dataclass from pathlib import Path from rhasspyhermes.audioserver import AudioFrame from rhasspyhermes.base import Message from rhasspyhermes.client import GeneratorType, HermesClient, TopicArgs from rhasspy...
/rhasspy-wake-snowboy-hermes-0.3.0.tar.gz/rhasspy-wake-snowboy-hermes-0.3.0/rhasspywake_snowboy_hermes/__init__.py
0.742235
0.230801
__init__.py
pypi
import os import numpy as np class PostProcessOpt(): """ The PostProcessOpt class provides methods to retrieve the fitness and population for the generations provided during the optimization. Parameters ---------- case : str Name of the case to be evaluated. eval_type : str ...
/rheia_meca2675-1.0.5.tar.gz/rheia_meca2675-1.0.5/src/rheia/POST_PROCESS/post_process.py
0.827932
0.447158
post_process.py
pypi
import os from pyDOE import lhs from rheia.CASES.determine_stoch_des_space import load_case, check_dictionary import rheia.UQ.pce as uq def get_design_variables(case): """ This function loads the design variable names and bounds out of the :file:`design_space.csv` file. Parameters ---------- ...
/rheia_meca2675-1.0.5.tar.gz/rheia_meca2675-1.0.5/src/rheia/UQ/uncertainty_quantification.py
0.712832
0.520862
uncertainty_quantification.py
pypi
import os import rheia.CASES.H2_MOBILITY.h2_mobility as lb def set_params(): """ Set the fixed parameters for each model evaluation. """ path = os.path.dirname(os.path.abspath(__file__)) filename_climate = os.path.join(os.path.abspath( os.path.join(path, ...
/rheia_meca2675-1.0.5.tar.gz/rheia_meca2675-1.0.5/src/rheia/CASES/H2_MOBILITY/case_description.py
0.731538
0.533337
case_description.py
pypi
import os import rheia.CASES.H2_POWER.h2_power as pv_h2 def set_params(): """ Set the fixed parameters for each model evaluation. """ path = os.path.dirname(os.path.abspath(__file__)) filename_climate = os.path.join(os.path.abspath( os.path.join(path, ...
/rheia_meca2675-1.0.5.tar.gz/rheia_meca2675-1.0.5/src/rheia/CASES/H2_POWER/case_description.py
0.715623
0.458531
case_description.py
pypi
# Load rheology data If you have a google account you can run this documentation notebook [Open in colab](https://colab.research.google.com/github/rheopy/rheofit/blob/master/docs/source/load_data.ipynb) ``` from IPython.display import clear_output !pip install git+https://github.com/rheopy/rheofit.git --upgrade cle...
/rheofit-0.1.3.tar.gz/rheofit-0.1.3/docs/source/load_data.ipynb
0.658418
0.869659
load_data.ipynb
pypi
from mpl_toolkits.axes_grid1 import Divider, Size from mpl_toolkits.axes_grid1.mpl_axes import Axes from itertools import cycle import matplotlib as mpl import matplotlib.pyplot as plt mpl.rcParams['text.latex.preamble'] = r'\usepackage{amsmath}' from math import log10, floor import sortednp as snp import numpy as np ...
/rheofit-0.1.3.tar.gz/rheofit-0.1.3/data/Manon/plot_function.py
0.526099
0.472805
plot_function.py
pypi
<a href="https://colab.research.google.com/github/rheopy/rheofit/blob/master/notebooks/index.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Rheofit notebooks index This index is the landing notebook for the colab badge * [Quickstart](Quickstar...
/rheofit-0.1.3.tar.gz/rheofit-0.1.3/notebooks/index.ipynb
0.885037
0.9842
index.ipynb
pypi
class VariantCandidate: def __init__(self, read_pair, var_type): self.supporting_reads = [] self.supporting_reads.append(read_pair) self.left_pos = read_pair.get_left_pos() self.inner_left = read_pair.get_left_pos() self.right_pos = read_pair.get_right_pos() ...
/rheos_common-0.0.7.tar.gz/rheos_common-0.0.7/rheos_common/model/variant_candidate.py
0.644001
0.393269
variant_candidate.py
pypi
import math from dataclasses import dataclass from typing import List, Dict, Tuple, Sequence, Any, Set @dataclass class PartitionRecord(object): contig: str left: int right: int partition: int class Partitioner(object): seq_dict: Dict[str, int] = { "1": 249250621, "2": 243199373,...
/rheos_common-0.0.7.tar.gz/rheos_common-0.0.7/rheos_common/model/partitioner.py
0.456894
0.279079
partitioner.py
pypi
from sortedcontainers import SortedDict from rheos_common.model.variant_candidate import VariantCandidate class VariantCandidateCollection: def __init__(self): self.variants = SortedDict() def add_variant_candidate(self, variant_candidate): self.variants[variant_candidate.get_center()...
/rheos_common-0.0.7.tar.gz/rheos_common-0.0.7/rheos_common/model/variant_candidate_collection.py
0.52074
0.152347
variant_candidate_collection.py
pypi
**RHESSysCalibrator** {#index} **Introduction** RHESSysCalibrator is a system for managing calibration sessions and run of RHESSys; A calibratration session contains one or more runs. Each run represents a distinct and uniformly random set of sensitiviy parameters. RHESSysCalibrator uses a database (in sqlite3 f...
/rhessyscalibrator-2.1.0.tar.gz/rhessyscalibrator-2.1.0/README.md
0.593845
0.721847
README.md
pypi
import sys import argparse import math import numpy as np import pandas as pd import statsmodels.api as sm import matplotlib.pyplot as plt import matplotlib from rhessysworkflows.rhessys import RHESSysOutput OBS_HEADER_STREAMFLOW = 'streamflow_mm' OBS_HEADER_PRECIP = 'precip_mm' PLOT_TYPE_STD = 'standard' PLOT_TYP...
/rhessysworkflows-1.34.tar.gz/rhessysworkflows-1.34/bin/RHESSysPlotMassbalance.py
0.468061
0.459076
RHESSysPlotMassbalance.py
pypi
import sys import argparse import math import numpy as np import pandas as pd import statsmodels.api as sm import matplotlib.pyplot as plt import matplotlib from rhessysworkflows.rhessys import RHESSysOutput PLOT_TYPE_STD = 'standard' PLOT_TYPE_LOGY = 'logy' PLOT_TYPE_CDF = 'cdf' PLOT_TYPE_SCATTER = 'scatter' PLOT_T...
/rhessysworkflows-1.34.tar.gz/rhessysworkflows-1.34/bin/RHESSysPlot.py
0.435902
0.328402
RHESSysPlot.py
pypi
import time import threading import logging class Pool(object): """A pool of available powershell objects.""" # We keep a few PowerShell instances around as setup is expensive # (around 4 seconds on my system). This way interfaces on top of this API # can be more responsive. # The algorithm is ...
/rhevm-api-0.9.0.tar.gz/rhevm-api-0.9.0/lib/rhevm/pool.py
0.685423
0.164181
pool.py
pypi
import functools import dask.array import numpy as np import pandas as pd import xarray as xr from dask import distributed as dd import rhg_compute_tools.utils def dataarrays_from_delayed(futures, client=None, **client_kwargs): """ Returns a list of xarray dataarrays from a list of futures of dataarrays ...
/rhg_compute_tools-1.3.tar.gz/rhg_compute_tools-1.3/rhg_compute_tools/xarray.py
0.879095
0.616647
xarray.py
pypi
import matplotlib.cm import numpy as np from matplotlib.colors import LinearSegmentedColormap try: _string_types = (str, unicode) except NameError: _string_types = (str,) def get_color_scheme(values, cmap=None, colors=None, levels=None, how=None): """ Generate a norm and color scheme from data P...
/rhg_compute_tools-1.3.tar.gz/rhg_compute_tools-1.3/rhg_compute_tools/design/plotting.py
0.926653
0.668015
plotting.py
pypi
import fsspec import os import re import yaml import tempfile import rasterio import numpy as np import pandas as pd import xarray as xr import geopandas as gpd from zarr.errors import GroupNotFoundError from contextlib import contextmanager import contextlib try: from gcsfs.retry import HttpError as GCSFSHttpErro...
/rhg_compute_tools-1.3.tar.gz/rhg_compute_tools-1.3/rhg_compute_tools/io_tools/readers.py
0.433382
0.234549
readers.py
pypi
import fsspec import git import xarray as xr import pandas as pd import dask from pathlib import Path import os import zarr from typing import Union import rhg_compute_tools.xarray from rhg_compute_tools.io_tools.readers import get_fs def _xr_document_repo_state(ds: xr.Dataset, repo_root=".") -> xr.Dataset: re...
/rhg_compute_tools-1.3.tar.gz/rhg_compute_tools-1.3/rhg_compute_tools/io_tools/writers.py
0.542621
0.280471
writers.py
pypi
from typing import List import numpy as np import rhino3dm from shapely.geometry import LineString, Point from rhino_shapely_interop.transformations import CoordTransform class RhCurv: """Wrapper for a rhino curve. Parameters ---------- curv : A rhino3dm.Curve Methods ------- r...
/rhino_shapley_interop-0.0.4-py3-none-any.whl/rhino_shapely_interop/rhino_wrappers.py
0.945298
0.521776
rhino_wrappers.py
pypi
import numpy as np class CoordTransform: """Class that is responsible for the tranformations between a 3d environment (x,y,z) and a 2d environment (x',y'). The 2d plane is derived from two vectors that define the 2d plane. Parameters ---------- vec1 : ndarray A 3d vector (x,y,z) in th...
/rhino_shapley_interop-0.0.4-py3-none-any.whl/rhino_shapely_interop/transformations.py
0.947332
0.91181
transformations.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]...
/rhino3dm-0.11.0.tar.gz/rhino3dm-0.11.0/src/lib/pybind11/README.md
0.905513
0.834002
README.md
pypi
import numpy as np from scipy import ndimage class Filters(): ''' Filters. ''' def __init__(self, spym_instance): self._spym = spym_instance def gauss(self, **kwargs): ''' Apply Gaussian smoothing filter. Args: size: size of the filter in pixels. ''' ...
/rhkpy-1.3.1-py3-none-any.whl/spym/process/filters.py
0.906818
0.806472
filters.py
pypi
import numpy as np class Level(): ''' Level. ''' def __init__(self, spym_instance): self._spym = spym_instance def fixzero(self, **kwargs): ''' Add a constant to all the data to move the minimum (or the mean value) to zero. Args: to_mean: bool, optional. If true ...
/rhkpy-1.3.1-py3-none-any.whl/spym/process/level.py
0.939436
0.815783
level.py
pypi
import os from . import rhksm4, omicronscala def load(filename, scaling=True): ''' Import data from common SPM file formats. Currently supported file formats are: * NeXus (.nx, .nxs). Package nxarray is needed. * RHK (.sm4). * Omicron Scala (.par). Args: filename: path to ...
/rhkpy-1.3.1-py3-none-any.whl/spym/io/load.py
0.673192
0.385259
load.py
pypi
from ._scala import OMICRONscala def load(parFile): '''This method load data and metadata associated to an Omicron SCALA .par file. Args: parFile: the name of the .par file to be loaded Returns: a container for the channels in the .par file with their data and metadata Ex...
/rhkpy-1.3.1-py3-none-any.whl/spym/io/omicronscala/_methods.py
0.800692
0.495789
_methods.py
pypi
import numpy as np import os class OMICRONscala: """This is the main class that represents an Omicron SCALA file Args: filepath: the name of the .par file to be opened """ def __init__(self, filepath): """Load data and metadata relative to the given .par file ...
/rhkpy-1.3.1-py3-none-any.whl/spym/io/omicronscala/_scala.py
0.696578
0.212681
_scala.py
pypi
from ._sm4 import RHKsm4 def load(sm4file): '''This method load data and metadata from an RHK .sm4 file. Args: sm4file: the name of the .sm4 file to be loaded Returns: a container for the pages in the .sm4 file with their data and metadata Examples: f = rhksm4.loa...
/rhkpy-1.3.1-py3-none-any.whl/spym/io/rhksm4/_methods.py
0.640523
0.457621
_methods.py
pypi
import numpy as np from enum import Enum ## Definition of types ## Object type class object_type(Enum): RHK_OBJECT_UNDEFINED = 0 RHK_OBJECT_PAGE_INDEX_HEADER = 1 RHK_OBJECT_PAGE_INDEX_ARRAY = 2 RHK_OBJECT_PAGE_HEADER = 3 RHK_OBJECT_PAGE_DATA = 4 RHK_OBJECT...
/rhkpy-1.3.1-py3-none-any.whl/spym/io/rhksm4/_sm4.py
0.403684
0.176494
_sm4.py
pypi
import matplotlib.pyplot as plt import hvplot.xarray class Plotting(): ''' Plotting. ''' def __init__(self, spym_instance): self._spym = spym_instance def plot(self, title=None, waterfall=False, waterfall_limit=15, **kwargs): ''' Plot data with custom parameters using matplotlib....
/rhkpy-1.3.1-py3-none-any.whl/spym/plotting/__init__.py
0.914003
0.763109
__init__.py
pypi
import sys import hashlib import logging logger = logging.getLogger(__name__) class Hasher(object): """ Create consistent SHA1 hash of a file. """ def __init__(self): super(Hasher, self).__init__() self.hashes = { 'SHA1': hashlib.sha1(), 'SHA256': hashlib.sha256() ...
/rho-crypto-0.5.2.tar.gz/rho-crypto-0.5.2/rho_crypto/hashing.py
0.424889
0.199991
hashing.py
pypi
# Rho ML __Rho ML__ provides a _thin_, _thoughtful_, and _proven_ interface for putting Data Science to work in production and enterprise-grade environments. [Rho](https://rho.ai "Rho AI") uses __Rho ML__ for workloads as varied as _NLP_, to _Computer Vision_ to _Decision Modeling_ for professional racing. We see __Rh...
/rho-ml-0.12.1.tar.gz/rho-ml-0.12.1/README.md
0.70202
0.752354
README.md
pypi
import glob import logging import os import tempfile import pickle from typing import Union import attr from rho_ml.model_locator import generate_model_locator, \ find_highest_compatible_version logger = logging.getLogger(__name__) @attr.s(auto_attribs=True, frozen=True) class StoredModel(object): """ Sto...
/rho-ml-0.12.1.tar.gz/rho-ml-0.12.1/rho_ml/serialization.py
0.799716
0.333042
serialization.py
pypi
import pickle from typing import Any, Callable, Optional, Union, Dict import attr from rho_ml import Version, StoredModel class ValidationFailedError(Exception): """ Error for when validation fails for either training or prediction input/output in a RhoModel. """ pass @attr.s(auto_attribs=True) class ...
/rho-ml-0.12.1.tar.gz/rho-ml-0.12.1/rho_ml/rho_model.py
0.931353
0.42656
rho_model.py
pypi
import logging import re from typing import List, Tuple, Union, Optional import attr logger = logging.getLogger(__name__) DEFAULT_MODEL_NAME_PATTERN = r"(.*)" DEFAULT_DELIMITER_PATTERN = r"\_" DEFAULT_VERSION_PATTERN = r"([\d\*]+\.[\d\*]+\.[\d\*]+.*)" def generate_model_locator( model_name: str, mod...
/rho-ml-0.12.1.tar.gz/rho-ml-0.12.1/rho_ml/model_locator.py
0.862916
0.201813
model_locator.py
pypi
import re import string from typing import List, Set from rho_pdf_diff.text_diff import DiffFilter, Diff class CapitalizationFilter(DiffFilter): """ Throw away changes which only differ by capitalization """ @staticmethod def remove_caps_only_diffs(diffs: List[Diff]) -> List[Diff]: def diffs_are...
/rho-pdf-diff-0.14.0.tar.gz/rho-pdf-diff-0.14.0/rho_pdf_diff/filter_rules.py
0.554712
0.552178
filter_rules.py
pypi
import collections import difflib import itertools import logging import random from typing import List, Tuple, Dict, Optional, Set, Sequence, Counter import attr import math import numpy from rho_pdf_diff.document import Page logger = logging.getLogger(__name__) @attr.s(auto_attribs=True) class PairSimilarityCach...
/rho-pdf-diff-0.14.0.tar.gz/rho-pdf-diff-0.14.0/rho_pdf_diff/image_construction/annealing_page_alignment.py
0.818773
0.253693
annealing_page_alignment.py
pypi
import logging import attr from reportlab.lib.colors import Color from reportlab.pdfgen.canvas import Canvas from typing import List, Iterator, Union, Dict, BinaryIO from rho_pdf_diff.document import Word, Page from rho_pdf_diff.text_diff import Diff logger = logging.getLogger(__name__) def build_blank_page_image(...
/rho-pdf-diff-0.14.0.tar.gz/rho-pdf-diff-0.14.0/rho_pdf_diff/image_construction/diff_mask.py
0.899332
0.489564
diff_mask.py
pypi
"""General utilities.""" import re from typing import Iterable, Union import numpy as np import matplotlib.pyplot as plt from matplotlib import colors as mpl_colors def pd_unique(arr): """Like pandas unique in that it preserves sort order. Saves having the pandas dependency.""" idx = np.unique(arr, retur...
/rho_plus-0.5.1.tar.gz/rho_plus-0.5.1/rho_plus/util.py
0.695752
0.456289
util.py
pypi
from .bokeh import rho_light, rho_dark from .bokeh import setup as bokeh_setup from .matplotlib import setup as mpl_setup import param import json import panel as pn import warnings from .util import is_curr_dark_bokeh def datagrid(df): """Renders a DataFrame as an interactive data grid using Perspective. Int...
/rho_plus-0.5.1.tar.gz/rho_plus-0.5.1/rho_plus/panel.py
0.835551
0.305568
panel.py
pypi
"""Plotly theming.""" import json import matplotlib as mpl import plotly.express as px import plotly.graph_objects as go import plotly.io as pio import plotly.graph_objects as go import numpy as np from .matplotlib import setup as mpl_setup from .sequential_palettes import SEQUENTIAL def register_themes(): ...
/rho_plus-0.5.1.tar.gz/rho_plus-0.5.1/rho_plus/plotly.py
0.763484
0.322126
plotly.py
pypi
"""Vega plot themes as config objects.""" import altair as alt from .colors import LIGHT_SHADES, DARK_SHADES, LIGHT_COLORS, DARK_COLORS from .matplotlib import rho_dark, rho_light from .matplotlib import setup as mpl_setup from .sequential_palettes import SEQUENTIAL import matplotlib.colors def color_values(theme):...
/rho_plus-0.5.1.tar.gz/rho_plus-0.5.1/rho_plus/vega.py
0.832407
0.524395
vega.py
pypi
import textwrap import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from .util import spread as rho_spread from .color_util import contrast_with def remove_crowded(ax=None): """Given an axis, removes the second and penultimate ticks if the distance between the final ticks and those ...
/rho_plus-0.5.1.tar.gz/rho_plus-0.5.1/rho_plus/matplotlib_tweaks.py
0.798972
0.535584
matplotlib_tweaks.py
pypi
"""Bokeh theme.""" import rho_plus import matplotlib.pyplot as plt from bokeh.themes import Theme themes = [] for is_dark in (True, False): _theme, cs = rho_plus.mpl_setup(is_dark) theme = plt.rcParams font = "'Source Sans 3', sans-serif" json = { "attrs": { "Figure": { ...
/rho_plus-0.5.1.tar.gz/rho_plus-0.5.1/rho_plus/bokeh.py
0.706292
0.395543
bokeh.py
pypi
"""Defines a distance search structure""" from __future__ import absolute_import, division, print_function, unicode_literals import abc as _abc import numpy as _np import scipy.sparse as _sparse import scipy.spatial.distance as _spatial_distance class MatrixMetricSearch(object): """A matrix representation out ...
/rho-pysparnn-0.4.2.tar.gz/rho-pysparnn-0.4.2/pysparnn/matrix_distance.py
0.966196
0.711581
matrix_distance.py
pypi
class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" class ApiTypeError(OpenApiException, TypeError): def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None): """ Raises an exception for TypeErrors Args: ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/exceptions.py
0.766468
0.278324
exceptions.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/kafka_request_list.py
0.517815
0.160759
kafka_request_list.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/list.py
0.542379
0.223335
list.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/values.py
0.5769
0.196325
values.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/metrics_instant_query_list.py
0.546496
0.182972
metrics_instant_query_list.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/supported_kafka_instance_types_list.py
0.531696
0.189859
supported_kafka_instance_types_list.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/kafka_promote_request.py
0.519278
0.191762
kafka_promote_request.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/fleetshard_parameter.py
0.506591
0.215433
fleetshard_parameter.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/kafka_request_payload.py
0.551332
0.161519
kafka_request_payload.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/metrics_range_query_list.py
0.534127
0.181426
metrics_range_query_list.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/cloud_region_list_all_of.py
0.622804
0.200108
cloud_region_list_all_of.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/enterprise_cluster_fleetshard_parameters.py
0.550849
0.18462
enterprise_cluster_fleetshard_parameters.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/supported_kafka_billing_model.py
0.525369
0.170784
supported_kafka_billing_model.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/supported_kafka_size_bytes_value_item.py
0.560012
0.204501
supported_kafka_size_bytes_value_item.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/cloud_provider_list.py
0.506347
0.156814
cloud_provider_list.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/service_account_all_of.py
0.494873
0.157914
service_account_all_of.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/service_account_list_item_all_of.py
0.495117
0.164449
service_account_list_item_all_of.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/error_list_all_of.py
0.601711
0.199035
error_list_all_of.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/enterprise_cluster_list_all_of.py
0.63023
0.206414
enterprise_cluster_list_all_of.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/supported_kafka_instance_type.py
0.575946
0.179315
supported_kafka_instance_type.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/sso_provider_all_of.py
0.516595
0.163512
sso_provider_all_of.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/version_metadata.py
0.52683
0.170784
version_metadata.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/service_account_list_all_of.py
0.594787
0.210908
service_account_list_all_of.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/service_account_request.py
0.584983
0.188529
service_account_request.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/object_reference.py
0.579281
0.190781
object_reference.py
pypi
import re # noqa: F401 import sys # noqa: F401 from rhoas_kafka_mgmt_sdk.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_typ...
/rhoas_sdks-1.0.5.tar.gz/rhoas_sdks-1.0.5/sdks/kafka_mgmt_sdk/rhoas_kafka_mgmt_sdk/model/range_query.py
0.566738
0.211987
range_query.py
pypi