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
try: from micropython import const except ImportError: def const(n): return n from rgb_display.rgb import DisplayDevice __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/jrmoser/RGB_Display.git" _SETCOLUMN = const(0x15) _SETROW = const(0x75) _WRITERAM = const(0x5C) _READRAM = const(0x5D) _SETREMAP =...
/rgb-display-0.0.5.tar.gz/rgb-display-0.0.5/rgb_display/ssd1351.py
0.489748
0.162446
ssd1351.py
pypi
try: import struct except ImportError: import ustruct as struct try: from micropython import const except ImportError: def const(n): return n from rgb_display.rgb import DisplayDevice __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/jrmoser/RGB_Display.git" _NOP = const(0x00) _SWRESET = con...
/rgb-display-0.0.5.tar.gz/rgb-display-0.0.5/rgb_display/st7789.py
0.455441
0.190159
st7789.py
pypi
try: from micropython import const except ImportError: def const(n): return n from rgb_display.rgb import DisplayDevice __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/jrmoser/RGB_Display.git" _SWRESET = const(0x01) _SLPOUT = const(0x11) _NORON = const(0x13) _INVOFF = const(0x20) _INVON = const(0x...
/rgb-display-0.0.5.tar.gz/rgb-display-0.0.5/rgb_display/hx8357.py
0.564219
0.156362
hx8357.py
pypi
try: import struct except ImportError: import ustruct as struct from rgb_display.rgb import DisplayDevice __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/jrmoser/RGB_Display.git" class ILI9341(DisplayDevice): """ A simple driver for the ILI9341/ILI9340-based displays. >>> import busi...
/rgb-display-0.0.5.tar.gz/rgb-display-0.0.5/rgb_display/ili9341.py
0.495361
0.20953
ili9341.py
pypi
import digitalio import board from PIL import Image, ImageDraw, ImageFont import adafruit_rgb_display.ili9341 as ili9341 import adafruit_rgb_display.st7789 as st7789 # pylint: disable=unused-import import adafruit_rgb_display.hx8357 as hx8357 # pylint: disable=unused-import import adafruit_rgb_display.st7735 as st773...
/rgb-display-0.0.5.tar.gz/rgb-display-0.0.5/examples/rgb_display_pillow_demo.py
0.606032
0.183685
rgb_display_pillow_demo.py
pypi
import time import subprocess import digitalio import board from PIL import Image, ImageDraw, ImageFont import adafruit_rgb_display.ili9341 as ili9341 import adafruit_rgb_display.st7789 as st7789 # pylint: disable=unused-import import adafruit_rgb_display.hx8357 as hx8357 # pylint: disable=unused-import import adafru...
/rgb-display-0.0.5.tar.gz/rgb-display-0.0.5/examples/rgb_display_pillow_stats.py
0.450601
0.152379
rgb_display_pillow_stats.py
pypi
import digitalio import board from PIL import Image, ImageDraw import adafruit_rgb_display.ili9341 as ili9341 import adafruit_rgb_display.st7789 as st7789 # pylint: disable=unused-import import adafruit_rgb_display.hx8357 as hx8357 # pylint: disable=unused-import import adafruit_rgb_display.st7735 as st7735 # pylint...
/rgb-display-0.0.5.tar.gz/rgb-display-0.0.5/examples/rgb_display_pillow_image.py
0.484136
0.182553
rgb_display_pillow_image.py
pypi
# -*- coding: utf-8 -*- import time import subprocess import digitalio import board from PIL import Image, ImageDraw, ImageFont import adafruit_rgb_display.st7789 as st7789 # Configuration for CS and DC pins (these are FeatherWing defaults on M0/M4): cs_pin = digitalio.DigitalInOut(board.CE0) dc_pin = digitalio.Dig...
/rgb-display-0.0.5.tar.gz/rgb-display-0.0.5/examples/rgb_display_minipitftstats.py
0.406862
0.21626
rgb_display_minipitftstats.py
pypi
# rgbloom This Python script retrieves RGB magnitudes computed from low resolution spectra published in *Gaia* DR3, following the work described in [Carrasco et al. (2023)](#3). These magnitudes are given in the standard system defined by [Cardiel et al. (2021a)](#1). This code is an updated version of [rgblues](htt...
/rgbloom-1.3.tar.gz/rgbloom-1.3/README.md
0.511473
0.90355
README.md
pypi
# rgblues This Python script predicts RGB magnitudes from *Gaia* EDR3 photometric data. These magnitudes are given in the standard system defined by [Cardiel et al. (2021a)](#1). The code performs a cone search defined by coordinates right ascension and declination on the sky and a search radius. The predictions m...
/rgblues-1.1.tar.gz/rgblues-1.1/README.md
0.474388
0.928733
README.md
pypi
from .basedataset import BaseRGBTDataet,_basepath from rgbt.utils import * import os from rgbt.metrics import PR,SR class RGBT210(BaseRGBTDataet): """ RGBT210 dataset is the subset of RGBT234.\r `Weighted Sparse Representation Regularized Graph Learning for RGB-T Object Tracking.`\r [Paper](https://dl....
/dataset/rgbt210_dataset.py
0.72027
0.211661
rgbt210_dataset.py
pypi
from rgbt.dataset.basedataset import BaseRGBTDataet, TrackerResult,_basepath from rgbt.utils import * import os from rgbt.metrics import MPR,MSR class RGBT234(BaseRGBTDataet): """ RGBT234 dataset: `RGB-T Object Tracking: Benchmark and Baseline.`\r [Paper.](https://arxiv.org/abs/1805.08982) \r [Download...
/dataset/rgbt234_dataset.py
0.812682
0.249219
rgbt234_dataset.py
pypi
from .basedataset import BaseRGBTDataet,_basepath from rgbt.utils import * import os from rgbt.metrics import MPR_GTOT,MSR_GTOT class GTOT(BaseRGBTDataet): """ Publication: `Learning collaborative sparse representation for grayscale-thermal tracking` 2016\\ IEEE Transactions on Image Processing \\ [Dow...
/dataset/gtot_dataset.py
0.822153
0.276573
gtot_dataset.py
pypi
# HBP: RGBW Color Space Converter Between HSL / RGB / HSi / HSV / HEX ## Specifically For LED Based Projects ![HBP]( https://raw.githubusercontent.com/iamh2o/rgbw_colorspace_converter/main/images/bar21.png ) [![wakatime](https://wakatime.com/badge/github/iamh2o/rgbw_colorspace_converter.svg)](https://wakatime.com/badg...
/rgbw_colorspace_converter-0.1.3.tar.gz/rgbw_colorspace_converter-0.1.3/README.md
0.728362
0.877791
README.md
pypi
# RGCosm - Reverse Geocode for OpenStreetmap [![Upload Python Package](https://github.com/BlackCatDevel0per/rgcosm/actions/workflows/python-publish.yml/badge.svg)](https://github.com/BlackCatDevel0per/rgcosm/actions/workflows/python-publish.yml) A Python library for offline reverse geocoding from osm(.pbf) GIS convert...
/rgcosm-0.0.5.tar.gz/rgcosm-0.0.5/README.md
0.631594
0.796253
README.md
pypi
[![logo](https://raw.githubusercontent.com/ResonantGeoData/ResonantGeoData/main/logos/RGD_Logo.png)](https://github.com/ResonantGeoData/ResonantGeoData/) # rgd_client - Resonant GeoDataClient The **rgd_client** Python package is a well typed, easy to use, and extendable Python client for Resonant GeoData APIs. # In...
/rgd-client-0.3.11.tar.gz/rgd-client-0.3.11/README.md
0.557725
0.856212
README.md
pypi
from pathlib import Path from typing import Dict, List, Optional, Tuple, Union import validators from .session import RgdClientSession from .types import DATETIME_OR_STR_TUPLE, SEARCH_PREDICATE_CHOICE from .utils import download_checksum_file_to_path, spatial_search_params class RgdPlugin: """The base plugin th...
/rgd-client-0.3.11.tar.gz/rgd-client-0.3.11/rgd_client/plugin.py
0.915119
0.219976
plugin.py
pypi
from datetime import datetime import json from json.decoder import JSONDecodeError from pathlib import Path from typing import Dict, Generator, Iterator, List, Optional, Tuple, Union from geomet import wkt import requests from requests import Response, Session from .types import DATETIME_OR_STR_TUPLE, SEARCH_PREDICAT...
/rgd-client-0.3.11.tar.gz/rgd-client-0.3.11/rgd_client/utils.py
0.809765
0.188903
utils.py
pypi
from dataclasses import dataclass from pathlib import Path import tempfile import time from typing import Dict, Iterable, Iterator, List, Optional, Tuple, Union from rgd_client.plugin import RgdPlugin from rgd_client.types import DATETIME_OR_STR_TUPLE, SEARCH_PREDICATE_CHOICE from rgd_client.utils import ( downloa...
/rgd-imagery-client-0.3.11.tar.gz/rgd-imagery-client-0.3.11/rgd_imagery_client/plugin.py
0.919715
0.233619
plugin.py
pypi
from glob import glob from math import ceil from shutil import copyfile import numpy as np from joblib import Parallel, delayed, cpu_count from sklearn.base import ClassifierMixin, RegressorMixin, is_classifier from sklearn.exceptions import NotFittedError from rgf import utils ALGORITHMS = ("RGF", "RGF_Opt", "RGF_...
/rgf_python-3.12.0.tar.gz/rgf_python-3.12.0/rgf/rgf_model.py
0.856002
0.517815
rgf_model.py
pypi
import os from math import ceil import numpy as np from joblib import cpu_count from sklearn.base import ClassifierMixin, RegressorMixin, is_classifier from sklearn.exceptions import NotFittedError from rgf import utils ALGORITHMS = ("rgf", "epsilon-greedy") LOSSES = ("LS", "MODLS", "LOGISTIC") fastrgf_estimator_d...
/rgf_python-3.12.0.tar.gz/rgf_python-3.12.0/rgf/fastrgf_model.py
0.758332
0.567997
fastrgf_model.py
pypi
from rgkit.render.settings import settings as render_settings from rgkit.render.utils import rgb_to_hex, blend_colors, compute_color class HighlightSprite(object): def __init__(self, loc, target, render): self.location = loc self.target = target self.renderer = render self.hlt_squa...
/rgkit_py3-1.1.1.tar.gz/rgkit_py3-1.1.1/rgkit/render/highlightsprite.py
0.721841
0.17434
highlightsprite.py
pypi
"""Evaluate a review graph mining algorithm with the amazon dataset. """ # pylint: disable=invalid-name from __future__ import absolute_import, division import logging from logging import getLogger import sys import dsargparse import amazon LOGGER = getLogger(__name__) #-------------------------- # Loading algorithm...
/rgmining-amazon-dataset-0.5.1.tar.gz/rgmining-amazon-dataset-0.5.1/example.py
0.767559
0.439687
example.py
pypi
from __future__ import division import datetime import json from os.path import exists, join import site import sys import zipfile _DATE_FORMAT = "%B %d, %Y" """Data format in the dataset. """ CATEGORIES = [ "cameras", "laptops", "mobilephone", "tablets", "TVs", "video_surveillance"] """Categories this dataset h...
/rgmining-amazon-dataset-0.5.1.tar.gz/rgmining-amazon-dataset-0.5.1/amazon.py
0.618896
0.33734
amazon.py
pypi
"""Mixins for algebraic classes. """ import copy import json class ImmutableAdditiveGroup(object): # Needs, __add__, __neg__, __eq__, def __add__(self, _): raise NotImplementedError("Subclasses must implement __add__.") def __sub__(self, other): return self + (-other) def __neg__(s...
/rgmining-common-0.9.1.tar.gz/rgmining-common-0.9.1/common/helper.py
0.800107
0.209652
helper.py
pypi
import gc from functools import wraps import sys def print_args(output=sys.stdout): """Decorate a function so that print arguments before calling it. Args: output: writable to print args. (Default: sys.stdout) """ def decorator(func): """The decorator function. """ @wrap...
/rgmining-common-0.9.1.tar.gz/rgmining-common-0.9.1/common/decorator.py
0.510985
0.230616
decorator.py
pypi
"""Provide helper functions and classes. """ # pylint: disable=invalid-name from __future__ import absolute_import try: from itertools import imap, ifilter except ImportError: imap = map ifilter = filter import json import sys from functools import wraps from collections import namedtuple from dataset_io.c...
/rgmining-dataset-io-0.9.2.tar.gz/rgmining-dataset-io-0.9.2/dataset_io/helper.py
0.751101
0.548432
helper.py
pypi
import csv from os import path from numpy import random _DATA_FILE = "rating.csv" def _fullpath(filename): """Compute the full path of a given filename. Args: filename: Filename. Returns: The full path of the given filename. """ return path.join(path.dirname(__file__), filename) c...
/rgmining-dataset-io-0.9.2.tar.gz/rgmining-dataset-io-0.9.2/dataset_io/sampler.py
0.865551
0.448306
sampler.py
pypi
"""Load review data formatted in JSON to a graph object. """ # pylint: disable=invalid-name from __future__ import absolute_import import json try: from itertools import imap, ifilter except ImportError: imap = map ifilter = filter from dataset_io.helper import convert_date from dataset_io.helper import nor...
/rgmining-dataset-io-0.9.2.tar.gz/rgmining-dataset-io-0.9.2/dataset_io/loader.py
0.882782
0.597549
loader.py
pypi
from fraud_eagle.labels import ProductLabel, ReviewLabel, UserLabel # pylint: disable=too-many-branches def psi(u_label: UserLabel, p_label: ProductLabel, r_label: ReviewLabel, epsilon: float) -> float: """Likelihood of a pair of user and product. The likelihood is dependent on the review of the user gives t...
/rgmining_fraud_eagle-0.10.3.tar.gz/rgmining_fraud_eagle-0.10.3/fraud_eagle/likelihood.py
0.917078
0.68433
likelihood.py
pypi
"""Define prior beliefs of users and products. """ from typing import Final import numpy as np from fraud_eagle.labels import ProductLabel, UserLabel _LOG_2: Final = float(np.log(2.0)) """Precomputed value, the logarithm of 2.0.""" def phi_u(_u_label: UserLabel) -> float: """Logarithm of a prior belief of a us...
/rgmining_fraud_eagle-0.10.3.tar.gz/rgmining_fraud_eagle-0.10.3/fraud_eagle/prior.py
0.947817
0.808521
prior.py
pypi
"""Provide a bipartite graph class implementing Fraud Eagle algorithm. """ from functools import lru_cache from logging import getLogger from typing import Any, Final, Optional, cast import networkx as nx import numpy as np from fraud_eagle.labels import ProductLabel, ReviewLabel, UserLabel from fraud_eagle.likelihoo...
/rgmining_fraud_eagle-0.10.3.tar.gz/rgmining_fraud_eagle-0.10.3/fraud_eagle/graph.py
0.972165
0.564909
graph.py
pypi
"""Provide a review graph which runs Fraudar algorithm. """ import tempfile from bisect import bisect_left from collections import defaultdict from typing import Any, Final, Protocol import numpy as np from fraudar.export import greedy from fraudar.export.greedy import logWeightedAveDegree class Node: """Node o...
/rgmining_fraudar-0.7.3.tar.gz/rgmining_fraudar-0.7.3/fraudar/graph.py
0.960473
0.610541
graph.py
pypi
import random import numpy as np from scipy import sparse from .MinTree import MinTree np.set_printoptions(linewidth=160) # given 2 lists corresponding to the edge source and destination, # this returns the sparse matrix representation of the data # @profile def listToSparseMatrix(edgesSource, edgesDest): m = ...
/rgmining_fraudar-0.7.3.tar.gz/rgmining_fraudar-0.7.3/fraudar/export/greedy.py
0.652463
0.513303
greedy.py
pypi
"""Implementations of histogram review and summary classes. """ from __future__ import absolute_import from collections import defaultdict import numbers import numpy as np from review.base import Review from review.base import Summary class HistoReview(Review): """Vector Review. """ __slots__ = ("_v") ...
/rgmining-review-0.9.2.tar.gz/rgmining-review-0.9.2/review/histogram.py
0.888581
0.432723
histogram.py
pypi
"""Implementations of scalar review and summary classes. """ from __future__ import absolute_import import numbers import numpy as np from review.base import Review from review.base import Summary class AverageReview(Review): """Scalar review. Args: v: a float value representing review score. The...
/rgmining-review-0.9.2.tar.gz/rgmining-review-0.9.2/review/scalar.py
0.968336
0.437523
scalar.py
pypi
"""Defines abstract Review and Summary classes. """ import math import numbers class _ImmutableAdditiveGroup(object): """Immutable additive group. Subclass must implement __add__, __neg__, and __eq__, then this class complements __sub__ and __ne__. """ __slots__ = () def __add__(self, _): ...
/rgmining-review-0.9.2.tar.gz/rgmining-review-0.9.2/review/base.py
0.913046
0.459804
base.py
pypi
:description: This package provides 4 algorithms for review graph mining project. Mutually Reinforcing Analysis (MRA) algorithm is an algorithm we've introduced in DEXA 2011, Repeated Improvement Analysis (RIA) algorithm is an algorithm we've introduced in DEIM 2015. .. _top: Repeated Improvement Analysis...
/rgmining-ria-0.9.6.tar.gz/rgmining-ria-0.9.6/docs/source/index.rst
0.957298
0.767864
index.rst
pypi
from __future__ import absolute_import, division import json from logging import getLogger import math import numpy as np import networkx as nx from common import memoized from ria.credibility import WeightedCredibility from review import AverageSummary LOGGER = getLogger(__name__) class _Node(object): """Abs...
/rgmining-ria-0.9.6.tar.gz/rgmining-ria-0.9.6/ria/bipartite.py
0.919832
0.267837
bipartite.py
pypi
from __future__ import absolute_import from ria import bipartite class Reviewer(bipartite.Reviewer): """Reviewer which uses normalized summations for updated anomalous scores. This reviewer will update its anomalous score by computing summation of partial anomalous scores instead of using a weighted aver...
/rgmining-ria-0.9.6.tar.gz/rgmining-ria-0.9.6/ria/bipartite_sum.py
0.936952
0.611585
bipartite_sum.py
pypi
from __future__ import absolute_import import numpy as np from common import memoized class UniformCredibility(object): """Uniform credibility assigns 1 for every product. Formally, this credibility is defined by .. math:: {\\rm cred}(p) = 1, where *p* is a product. Uniform credibilit...
/rgmining-ria-0.9.6.tar.gz/rgmining-ria-0.9.6/ria/credibility.py
0.956533
0.513546
credibility.py
pypi
"""Implementation of RSD. """ from collections.abc import Collection from functools import cache from typing import Final, NamedTuple, Optional import networkx as nx import numpy as np def _scale(v: float) -> float: """Scaling a given value. The output is defined by .. math:: {\\rm scale}(v) =...
/rgmining_rsd-0.3.3.tar.gz/rgmining_rsd-0.3.3/rsd/graph.py
0.965682
0.610337
graph.py
pypi
"""Analyze and handle datasets. """ from __future__ import absolute_import import datetime import logging from os import path import sys from common.writer import JSONWriter, CSVWriter import dataset_io import dsargparse import ria import numpy as np import helper # Input type def file_or_list(value): """Argume...
/rgmining-script-0.6.1.tar.gz/rgmining-script-0.6.1/dataset.py
0.786582
0.447943
dataset.py
pypi
from __future__ import absolute_import import logging import sys import dsargparse import dataset_io import helper def analyze(graph, output=sys.stdout, loop=20, threshold=10**-5): """Execute iteration. The iteration ends if the number of iteration reaches the given maximum number of iteration, loop, o...
/rgmining-script-0.6.1.tar.gz/rgmining-script-0.6.1/analyze.py
0.701202
0.473901
analyze.py
pypi
from logging import getLogger _LOGGER = getLogger(__name__) """Logger. """ ALGORITHMS = {} """Dictionary of installed algorithms. Keys are the names of the installed algorithms, and the associated value is the graph creation function of that dataset. """ # Load and register RIA. try: import ria except ImportEr...
/rgmining-script-0.6.1.tar.gz/rgmining-script-0.6.1/helper/algorithms.py
0.847968
0.233728
algorithms.py
pypi
import functools from logging import getLogger import dataset_io _LOGGER = getLogger(__name__) """Logger. """ DATASETS = {} """Dictionary of installed datasets. Keys are the names of the installed datasets, and the associated values are load function of that dataset. """ def ignore_kwargs(func): """Decorator t...
/rgmining-script-0.6.1.tar.gz/rgmining-script-0.6.1/helper/datasets.py
0.73678
0.332446
datasets.py
pypi
:description: Explaining the basic usage of the analyze command. Analyze command usage ======================= .. raw:: html <div class="addthis_inline_share_toolbox"></div> The basic usage of this command is .. code:: sh $ analyze <dataset-specifier> <dataset-parameters> <method-specifier> <method-parame...
/rgmining-script-0.6.1.tar.gz/rgmining-script-0.6.1/docs/source/analyze.rst
0.921225
0.847968
analyze.rst
pypi
"""Evaluate a review graph mining algorithm with the synthetic dataset. """ # pylint: disable=invalid-name from __future__ import absolute_import, division import json import logging from logging import getLogger import math from os import path import sys import dsargparse from matplotlib import pyplot import numpy as...
/rgmining-synthetic-dataset-0.9.3.tar.gz/rgmining-synthetic-dataset-0.9.3/synthetic_evaluation.py
0.858081
0.434101
synthetic_evaluation.py
pypi
from __future__ import division from contextlib import closing import datetime import json from os.path import exists, join import site import sys import tarfile _DATE_FORMAT = "%B %d, %Y" """Data format in the dataset. """ def _files(tar): """Yields a file in the tar file. """ info = tar.next() whi...
/rgmining-tripadvisor-dataset-0.5.6.tar.gz/rgmining-tripadvisor-dataset-0.5.6/tripadvisor.py
0.60778
0.319838
tripadvisor.py
pypi
"""Evaluate a review graph mining algorithm with the Trip Advisor dataset. """ # pylint: disable=invalid-name from __future__ import absolute_import, division import logging from logging import getLogger import sys import dsargparse import tripadvisor LOGGER = getLogger(__name__) #-------------------------- # Loadin...
/rgmining-tripadvisor-dataset-0.5.6.tar.gz/rgmining-tripadvisor-dataset-0.5.6/sample.py
0.77586
0.455925
sample.py
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 ...
/rgmrcy_distributions-0.1.0.tar.gz/rgmrcy_distributions-0.1.0/rgmrcy_distributions/Gaussiandistribution.py
0.688364
0.853058
Gaussiandistribution.py
pypi
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # bu...
/smali/visitor.py
0.874104
0.23268
visitor.py
pypi
[![license](https://img.shields.io/github/license/RedisGears/rgsync.svg)](https://github.com/RedisGears/rgsync) [![CircleCI](https://circleci.com/gh/RedisGears/rgsync/tree/master.svg?style=svg)](https://circleci.com/gh/RedisGears/rgsync/tree/master) ![GitHub Actions](https://github.com/redisgears/rgsync/actions/workflo...
/rgsync-1.2.0.tar.gz/rgsync-1.2.0/README.md
0.408513
0.92297
README.md
pypi
from rgtracker.record import * from rgtracker.tracker import * from rgtracker.common import * from rgtracker.website import * from rgtracker.section import * from rgtracker.page import * from rgtracker.device import * from rgtracker.pageviews import * from redisgears import log # Pageviews Rotation Jobs - CMS pagevie...
/rgtracker-0.0.1.1.226.tar.gz/rgtracker-0.0.1.1.226/src/jobs/megastar.py
0.587943
0.167968
megastar.py
pypi
from __future__ import absolute_import, print_function, unicode_literals # stdlib import time import subprocess from multiprocessing import Lock import traceback import requests from typing import List, Tuple, Dict, Optional from . import logutil # 3rd party import koji import koji_cli.lib import wrapt logger = lo...
/rh_doozer-1.2.27-py3-none-any.whl/doozerlib/brew.py
0.774242
0.207215
brew.py
pypi
from __future__ import absolute_import, print_function, unicode_literals import json from tenacity import retry, stop_after_attempt, wait_fixed from urllib import request RHCOS_BASE_URL = "https://releases-rhcos-art.cloud.privileged.psi.redhat.com/storage/releases" def rhcos_release_url(version, arch="x86_64", priva...
/rh_doozer-1.2.27-py3-none-any.whl/doozerlib/rhcos.py
0.49707
0.173603
rhcos.py
pypi
from __future__ import absolute_import, print_function, unicode_literals from future import standard_library standard_library.install_aliases() import yaml import logging import urllib.parse import os import shutil import io from . import exectools from .pushd import Dir from doozerlib import constants SCHEMES = ['s...
/rh_doozer-1.2.27-py3-none-any.whl/doozerlib/gitdata.py
0.555918
0.219411
gitdata.py
pypi
from __future__ import absolute_import, print_function, unicode_literals from future.utils import as_native_str import glob import json import os import re import shutil import threading import yaml import io from functools import wraps from dockerfile_parse import DockerfileParser from doozerlib import brew, exectool...
/rh_doozer-1.2.27-py3-none-any.whl/doozerlib/operator_metadata.py
0.703753
0.169166
operator_metadata.py
pypi
from __future__ import absolute_import, print_function, unicode_literals import os import io from future.standard_library import install_aliases install_aliases() from urllib.parse import urlparse import requests from doozerlib.logutil import getLogger from doozerlib.util import mkdirs, is_in_directory from doozerlib....
/rh_doozer-1.2.27-py3-none-any.whl/doozerlib/source_modifications.py
0.717012
0.197251
source_modifications.py
pypi
import glob import io import json import os import re import threading import yaml from dockerfile_parse import DockerfileParser from doozerlib import brew, exectools, logutil, pushd class OLMBundle(object): """This class is responsible for generating bundle containers out of previously built operators Ever...
/rh_doozer-1.2.27-py3-none-any.whl/doozerlib/olm/bundle.py
0.595022
0.27075
bundle.py
pypi
from __future__ import absolute_import, print_function, unicode_literals import click import datetime from multiprocessing import cpu_count from multiprocessing.dummy import Pool as ThreadPool import re from errata_tool import Erratum from kerberos import GSSError # ---------------------------------------------------...
/rh_elliott-1.0.15-py3-none-any.whl/elliottlib/util.py
0.562537
0.152947
util.py
pypi
from __future__ import absolute_import, print_function, unicode_literals from future import standard_library standard_library.install_aliases() from errata_tool import ErrataConnector import datetime import json import ssl import re from elliottlib import exceptions, constants, brew, logutil, bzutil from elliottlib.uti...
/rh_elliott-1.0.15-py3-none-any.whl/elliottlib/errata.py
0.555918
0.16398
errata.py
pypi
from __future__ import absolute_import, print_function, unicode_literals from . import logutil import os from io import BytesIO import collections import tarfile import pygit2 import errata_tool import koji import logging from . import constants from future.standard_library import install_aliases install_aliases() from...
/rh_elliott-1.0.15-py3-none-any.whl/elliottlib/tarball_sources.py
0.662796
0.226473
tarball_sources.py
pypi
from __future__ import absolute_import, print_function, unicode_literals # stdlib from subprocess import check_output, CalledProcessError import json # ours from elliottlib.exceptions import ElliottFatalError def get_bug_list(working_dir, old, new): """ Get fixed bugzilla IDs between two payloads. Needs to ...
/rh_elliott-1.0.15-py3-none-any.whl/elliottlib/openshiftclient.py
0.54577
0.216798
openshiftclient.py
pypi
from __future__ import absolute_import, print_function, unicode_literals from future.utils import as_native_str from future.standard_library import install_aliases install_aliases() from urllib.parse import urlparse import yaml import ruamel.yaml import ruamel.yaml.util import logging import os import shutil from . im...
/rh_elliott-1.0.15-py3-none-any.whl/elliottlib/gitdata.py
0.568536
0.215392
gitdata.py
pypi
from __future__ import absolute_import, print_function, unicode_literals from future.utils import as_native_str # stdlib from future import standard_library standard_library.install_aliases() from time import sleep import urllib.parse from elliottlib import logutil # ours from . import constants from elliottlib impor...
/rh_elliott-1.0.15-py3-none-any.whl/elliottlib/bzutil.py
0.628179
0.253081
bzutil.py
pypi
from __future__ import absolute_import, print_function, unicode_literals import asyncio import json import shlex import subprocess import time from . import assertion, logutil, pushd SUCCESS = 0 logger = logutil.getLogger(__name__) class RetryException(Exception): """ Provide a custom exception for retry ...
/rh_elliott-1.0.15-py3-none-any.whl/elliottlib/exectools.py
0.61231
0.321154
exectools.py
pypi
from validator import support from schema import Schema, Optional, Use, And, Or, SchemaError def image_schema(file): valid_arches = [ 'x86_64', ] valid_modification_actions = [ 'command', 'replace', ] valid_modification_commands = [ 'update-console-sources', ]...
/rh-ocp-build-data-validator-0.0.8.tar.gz/rh-ocp-build-data-validator-0.0.8/validator/schema/image_schema.py
0.421433
0.228146
image_schema.py
pypi
import numpy as np from .non_dimension import toone from .check_func import array_check def __variability(data: np.ndarray) -> np.ndarray: array_check(data=data) length, _ = data.shape ave_x = np.mean(data, axis=0) diff = data - ave_x sum_var = np.sum(diff**2, axis=0) / (length - 1) return np....
/Rh-s-PyTool-0.3.0.tar.gz/Rh-s-PyTool-0.3.0/src/index_calmeth/weights.py
0.768038
0.747224
weights.py
pypi
import numpy as np from .non_dimension import toone from .check_func import array_check def topsis( data_origin: np.ndarray, weights: list[int | float] | np.ndarray ) -> np.matrix | None: """计算优劣解距离法得分矩阵,weights为权重矩阵。 Args: data_origin (np.ndarray): 待计算数据 weights (np.ndarray): 权重数组 ...
/Rh-s-PyTool-0.3.0.tar.gz/Rh-s-PyTool-0.3.0/src/index_calmeth/evaluation.py
0.832373
0.757032
evaluation.py
pypi
from math import radians, cos, sin, asin, sqrt from .classdefine import Addr from .special import ZXCITIES def lookup(name: str, level: str | None = None) -> str | None: """根据地名简称查找全称 Args: name (str): 待查找地名 level (str | None): 查询区域的行政等级,包括province、city、county三级。默认值为None,当为None时不区分查找范围,因此很可能...
/Rh-s-PyTool-0.3.0.tar.gz/Rh-s-PyTool-0.3.0/src/cp_lookup/mainfunc.py
0.539226
0.3671
mainfunc.py
pypi
from random import randint def formatar_cpf(cpf): return "%s.%s.%s-%s" % (cpf[0:3], cpf[3:6], cpf[6:9], cpf[9:11]) def generate(formatar=False): """ * Essa função gera um número de CPF válido. * @param {Boolean} formatar define se o número do CPF deve ser gerado com os pontos e hífen. * @retu...
/rh_util-1.5.4.tar.gz/rh_util-1.5.4/rh_util/cpf/services.py
0.472927
0.44354
services.py
pypi
import ctypes from . import basetypes # Python 2/3 compatibility try: _basestring = basestring except NameError: _basestring = str _cf = ctypes.cdll.LoadLibrary('/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation') def declare_cf_type(type_name, base_type): class CFType(base_type): ...
/rh.osx-0.1.1.tar.gz/rh.osx-0.1.1/rh/osx/corefoundation.py
0.525125
0.215475
corefoundation.py
pypi
[![Build Status](https://travis-ci.org/biocore/rhapsody.svg?branch=master)](https://travis-ci.org/biocore/rhapsody) # rhapsody Neural networks for estimating microbe-metabolite interactions through their co-occurence probabilities. # Installation Rhapsody can be installed via pypi as follows ``` pip install rhapsod...
/rhapsody-0.4.0.tar.gz/rhapsody-0.4.0/README.md
0.453746
0.980986
README.md
pypi
import logging import shutil import subprocess import tempfile import typing from pathlib import Path import networkx as nx import rhasspynlu _LOGGER = logging.getLogger("rhasspyasr_deepspeech") def train( graph: nx.DiGraph, language_model: typing.Union[str, Path], scorer_path: typing.Union[str, Path], ...
/rhasspy-asr-deepspeech-0.4.1.tar.gz/rhasspy-asr-deepspeech-0.4.1/rhasspyasr_deepspeech/train.py
0.578091
0.265863
train.py
pypi
import io import logging import math import time import typing import wave from pathlib import Path import deepspeech import numpy as np from rhasspyasr import Transcriber, Transcription, TranscriptionToken _LOGGER = logging.getLogger(__name__) # ----------------------------------------------------------------------...
/rhasspy-asr-deepspeech-0.4.1.tar.gz/rhasspy-asr-deepspeech-0.4.1/rhasspyasr_deepspeech/transcribe.py
0.793106
0.264109
transcribe.py
pypi
import gzip import logging import os import threading import typing from collections import defaultdict from dataclasses import dataclass, field from pathlib import Path from queue import Queue import networkx as nx import rhasspyasr_kaldi import rhasspynlu from rhasspyasr import Transcriber, Transcription from rhassp...
/rhasspy-asr-kaldi-hermes-0.7.1.tar.gz/rhasspy-asr-kaldi-hermes-0.7.1/rhasspyasr_kaldi_hermes/__init__.py
0.672977
0.186132
__init__.py
pypi
# Rhasspy ASR Kaldi [![Continous Integration](https://github.com/rhasspy/rhasspy-asr-kaldi/workflows/Tests/badge.svg)](https://github.com/rhasspy/rhasspy-asr-kaldi/actions) [![GitHub license](https://img.shields.io/github/license/rhasspy/rhasspy-asr-kaldi.svg)](https://github.com/rhasspy/rhasspy-asr-kaldi/blob/master/...
/rhasspy-asr-kaldi-0.6.1.tar.gz/rhasspy-asr-kaldi-0.6.1/README.md
0.53777
0.885086
README.md
pypi
import logging import os import shlex import shutil import subprocess import tempfile import typing from enum import Enum from pathlib import Path import networkx as nx import rhasspynlu from rhasspynlu.g2p import PronunciationsType _DIR = Path(__file__).parent _LOGGER = logging.getLogger(__name__) # ---------------...
/rhasspy-asr-kaldi-0.6.1.tar.gz/rhasspy-asr-kaldi-0.6.1/rhasspyasr_kaldi/train.py
0.63023
0.268196
train.py
pypi
# Rhasspy ASR Pocketsphinx Hermes MQTT Service [![Continous Integration](https://github.com/rhasspy/rhasspy-asr-pocketsphinx-hermes/workflows/Tests/badge.svg)](https://github.com/rhasspy/rhasspy-asr-pocketsphinx-hermes/actions) [![GitHub license](https://img.shields.io/github/license/rhasspy/rhasspy-asr-pocketsphinx-h...
/rhasspy-asr-pocketsphinx-hermes-0.4.0.tar.gz/rhasspy-asr-pocketsphinx-hermes-0.4.0/README.md
0.449876
0.701815
README.md
pypi
import gzip import logging import os import tempfile import typing from collections import defaultdict from dataclasses import dataclass, field from pathlib import Path import networkx as nx import rhasspyasr_pocketsphinx import rhasspynlu from rhasspyasr import Transcriber from rhasspynlu.g2p import PronunciationsTyp...
/rhasspy-asr-pocketsphinx-hermes-0.4.0.tar.gz/rhasspy-asr-pocketsphinx-hermes-0.4.0/rhasspyasr_pocketsphinx_hermes/__init__.py
0.680879
0.173183
__init__.py
pypi
import logging import shutil import tempfile import typing from pathlib import Path import networkx as nx import rhasspynlu from rhasspynlu.g2p import PronunciationsType _DIR = Path(__file__).parent _LOGGER = logging.getLogger(__name__) # ------------------------------------------------------------------- def trai...
/rhasspy-asr-pocketsphinx-0.3.1.tar.gz/rhasspy-asr-pocketsphinx-0.3.1/rhasspyasr_pocketsphinx/train.py
0.60054
0.315551
train.py
pypi
import io import logging import os import time import typing import wave from pathlib import Path import pocketsphinx from rhasspyasr import Transcriber, Transcription, TranscriptionToken _LOGGER = logging.getLogger(__name__) # ----------------------------------------------------------------------------- class Poc...
/rhasspy-asr-pocketsphinx-0.3.1.tar.gz/rhasspy-asr-pocketsphinx-0.3.1/rhasspyasr_pocketsphinx/transcribe.py
0.793146
0.219379
transcribe.py
pypi
import dataclasses import typing from dataclasses import dataclass, field from enum import Enum from . import utils @dataclass class Entity: """Named entity from intent.""" entity: str value: str raw_value: str = "" start: int = 0 raw_start: int = 0 end: int = 0 raw_end: int = 0 ...
/rhasspy_client-1.1.1-py3-none-any.whl/rhasspyclient/intent.py
0.899905
0.336277
intent.py
pypi
import json import logging import sqlite3 import typing from pathlib import Path import networkx as nx import rhasspynlu from rhasspynlu.jsgf import Sentence import rhasspyfuzzywuzzy from rhasspyhermes.base import Message from rhasspyhermes.client import GeneratorType, HermesClient, TopicArgs from rhasspyhermes.inten...
/rhasspy-fuzzywuzzy-hermes-0.6.1.tar.gz/rhasspy-fuzzywuzzy-hermes-0.6.1/rhasspyfuzzywuzzy_hermes/__init__.py
0.68742
0.224385
__init__.py
pypi
import argparse import json import logging import os import sqlite3 import sys import typing from pathlib import Path import rhasspynlu from rhasspynlu.intent import Recognition from . import recognize as fuzzywuzzy_recognize from . import train as fuzzywuzzy_train _LOGGER = logging.getLogger(__name__) # ----------...
/rhasspy-fuzzywuzzy-0.4.0.tar.gz/rhasspy-fuzzywuzzy-0.4.0/rhasspyfuzzywuzzy/__main__.py
0.574275
0.204243
__main__.py
pypi
import json import logging import sqlite3 import time import typing import networkx as nx import rapidfuzz.process as fuzzy_process import rapidfuzz.utils as fuzz_utils import rhasspynlu from rhasspynlu.intent import Recognition from .train import train _LOGGER = logging.getLogger(__name__) # ----------------------...
/rhasspy-fuzzywuzzy-0.4.0.tar.gz/rhasspy-fuzzywuzzy-0.4.0/rhasspyfuzzywuzzy/__init__.py
0.675765
0.22531
__init__.py
pypi
import argparse import asyncio import logging import re from copy import deepcopy from dataclasses import dataclass from typing import Awaitable, Callable, Dict, List, Optional, Union import paho.mqtt.client as mqtt import rhasspyhermes.cli as hermes_cli from rhasspyhermes.client import HermesClient from rhasspyhermes...
/rhasspy-hermes-app-1.1.2.tar.gz/rhasspy-hermes-app-1.1.2/rhasspyhermes_app/__init__.py
0.758689
0.188249
__init__.py
pypi
import re from dataclasses import dataclass from .base import Message @dataclass class IntentGraphRequest(Message): """Request publication of intent graph from training. .. admonition:: MQTT message Topic ``rhasspy/train/getIntentGraph`` Payload (JSON) .. list-table:: ...
/rhasspy-hermes-0.6.2.tar.gz/rhasspy-hermes-0.6.2/rhasspyhermes/train.py
0.854339
0.198064
train.py
pypi
from dataclasses import dataclass from .base import Message @dataclass class HandleToggleOn(Message): """Enable intent handling. .. admonition:: MQTT message Topic ``rhasspy/handle/toggleOn`` Payload (JSON) .. list-table:: :widths: 10 10 80 :header-rows: 1 ...
/rhasspy-hermes-0.6.2.tar.gz/rhasspy-hermes-0.6.2/rhasspyhermes/handle.py
0.865906
0.189784
handle.py
pypi
import typing from dataclasses import dataclass from dataclasses_json import LetterCase, dataclass_json from rhasspyhermes.base import Message @dataclass class G2pPronounce(Message): """Get phonetic pronunciation for words. The response is sent in a :class:`G2pPhonemes` message. .. admonition:: MQTT m...
/rhasspy-hermes-0.6.2.tar.gz/rhasspy-hermes-0.6.2/rhasspyhermes/g2p.py
0.864925
0.34065
g2p.py
pypi
import typing from abc import ABCMeta from dataclasses_json import DataClassJsonMixin, LetterCase, dataclass_json @dataclass_json(letter_case=LetterCase.CAMEL) class Message(DataClassJsonMixin, metaclass=ABCMeta): """Base class for Hermes messages. All classes implementing Hermes messages are subclasses of ...
/rhasspy-hermes-0.6.2.tar.gz/rhasspy-hermes-0.6.2/rhasspyhermes/base.py
0.880566
0.284011
base.py
pypi
import re import typing from dataclasses import dataclass from enum import Enum from dataclasses_json import LetterCase, dataclass_json from .base import Message class HotwordToggleReason(str, Enum): """Reason for hotword toggle on/off.""" UNKNOWN = "" """Overrides all other reasons.""" DIALOGUE_SE...
/rhasspy-hermes-0.6.2.tar.gz/rhasspy-hermes-0.6.2/rhasspyhermes/wake.py
0.847527
0.199425
wake.py
pypi
import typing from collections.abc import Mapping from dataclasses import dataclass from enum import Enum from dataclasses_json import DataClassJsonMixin, LetterCase, dataclass_json from dataclasses_json.core import Json from .base import Message class DialogueActionType(str, Enum): """Type of session init obje...
/rhasspy-hermes-0.6.2.tar.gz/rhasspy-hermes-0.6.2/rhasspyhermes/dialogue.py
0.883475
0.210138
dialogue.py
pypi
import re import typing from dataclasses import dataclass from enum import Enum from .base import Message from .nlu import AsrToken class AsrToggleReason(str, Enum): """Reason for ASR toggle on/off. Values ------ UNKNOWN Overrides all other reasons DIALOGUE_SESSION Dialogue sess...
/rhasspy-hermes-0.6.2.tar.gz/rhasspy-hermes-0.6.2/rhasspyhermes/asr.py
0.84346
0.18451
asr.py
pypi
import typing from dataclasses import dataclass from dataclasses_json import LetterCase, dataclass_json from .base import Message @dataclass class TtsSay(Message): """Send text to be spoken by the text to speech component. Note ---- This is a low-level message. You should use the dialogue manager'...
/rhasspy-hermes-0.6.2.tar.gz/rhasspy-hermes-0.6.2/rhasspyhermes/tts.py
0.767516
0.198336
tts.py
pypi
import typing from dataclasses import dataclass from dataclasses_json import LetterCase, dataclass_json @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class Intent: """Intent object with a name and confidence score.""" intent_name: str """The name of the detected intent.""" confidence_scor...
/rhasspy-hermes-0.6.2.tar.gz/rhasspy-hermes-0.6.2/rhasspyhermes/intent.py
0.888172
0.666587
intent.py
pypi
import re import typing from dataclasses import dataclass from dataclasses_json import LetterCase, dataclass_json from .base import Message from .intent import Intent, Slot @dataclass class NluQuery(Message): """Request intent recognition from NLU component. .. admonition:: MQTT message Topic ...
/rhasspy-hermes-0.6.2.tar.gz/rhasspy-hermes-0.6.2/rhasspyhermes/nlu.py
0.852675
0.224778
nlu.py
pypi
import audioop import io import re import time import typing import wave from dataclasses import dataclass from enum import Enum from .base import Message @dataclass class AudioFrame(Message): """Recorded frame of audio. Attributes ---------- wav_bytes: bytes Recorded audio frame in WAV form...
/rhasspy-hermes-0.6.2.tar.gz/rhasspy-hermes-0.6.2/rhasspyhermes/audioserver.py
0.849815
0.368377
audioserver.py
pypi
import logging import os import ssl import typing from enum import Enum from urllib.parse import urljoin from uuid import uuid4 import aiohttp from rhasspyhermes.base import Message from rhasspyhermes.client import GeneratorType, HermesClient from rhasspyhermes.handle import HandleToggleOff, HandleToggleOn from rhassp...
/rhasspy-homeassistant-hermes-0.2.1.tar.gz/rhasspy-homeassistant-hermes-0.2.1/rhasspyhomeassistant_hermes/__init__.py
0.677474
0.152095
__init__.py
pypi