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
"""Image conversion between ROS and OpenCV formats.""" from __future__ import annotations import re import sys from contextlib import suppress from enum import IntEnum from itertools import product from typing import TYPE_CHECKING import cv2 # type: ignore import numpy from rosbags.typesys.types import sensor_msgs_...
/rosbags-image-0.9.1.tar.gz/rosbags-image-0.9.1/src/rosbags/image/image.py
0.816223
0.302076
image.py
pypi
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy of the # License at http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software distributed # under the Licens...
/rosco-toolbox-2.3.0.tar.gz/rosco-toolbox-2.3.0/ROSCO_toolbox/sim.py
0.832611
0.669974
sim.py
pypi
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy of the # License at http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software distributed # under the Licens...
/rosco-toolbox-2.3.0.tar.gz/rosco-toolbox-2.3.0/ROSCO_toolbox/turbine.py
0.789356
0.305697
turbine.py
pypi
ElastoDyn = {} # Blade 1 Tip Motions ElastoDyn['TipDxc1'] = False # (m); Blade 1 out-of-plane tip deflection (relative to the undeflected position); Directed along the xc1-axis ElastoDyn['OoPDefl1'] = False # (m); Blade 1 out-of-plane tip deflection (relative to the undeflected position); Dire...
/rosco-toolbox-2.3.0.tar.gz/rosco-toolbox-2.3.0/ROSCO_toolbox/ofTools/fast_io/FAST_vars_out.py
0.552298
0.728917
FAST_vars_out.py
pypi
# Author Tully Foote/tfoote@willowgarage.com from __future__ import print_function import os import sys import stat import subprocess import tempfile from .core import rd_debug if sys.hexversion > 0x03000000: # Python3 python3 = True else: python3 = False env = dict(os.environ) env['LANG'] = 'C' def re...
/rosdep-0.22.2.tar.gz/rosdep-0.22.2/src/rosdep2/shell_utils.py
0.47171
0.185467
shell_utils.py
pypi
# Author Ken Conley/kwc@willowgarage.com """ Base API for loading rosdep information by package or stack name. This API is decoupled from the ROS packaging system to enable multiple implementations of rosdep, including ones that don't rely on the ROS packaging system. This is necessary, for example, to implement a v...
/rosdep-0.22.2.tar.gz/rosdep-0.22.2/src/rosdep2/loader.py
0.856902
0.309506
loader.py
pypi
# Author Ken Conley/kwc@willowgarage.com """ Underlying model of rosdep data. The basic data model of rosdep is to store a dictionary of data indexed by view name (i.e. ROS stack name). This data includes a dictionary mapping rosdep dependency names to rules and the view dependencies. This is a lower-level represen...
/rosdep-0.22.2.tar.gz/rosdep-0.22.2/src/rosdep2/model.py
0.891764
0.586967
model.py
pypi
# Author William Woodall/wjwwood@gmail.com from collections import defaultdict class Resolution(dict): """A default dictionary for use in the :class:`DependencyGraph`.""" def __init__(self): super(Resolution, self).__init__() self['installer_key'] = None self['install_keys'] = [] ...
/rosdep-0.22.2.tar.gz/rosdep-0.22.2/src/rosdep2/dependency_graph.py
0.922395
0.289334
dependency_graph.py
pypi
from collections.abc import Sequence import numpy as np import pandas as pd ALPHA = np.exp(2 / 3 * np.pi * 1j) """complex: Phasor rotation operator `alpha`, which rotates a phasor vector counterclockwise by 120 degrees when multiplied by it.""" A = np.array( [ [1, 1, 1], [1, ALPHA**2, ALPHA], ...
/roseau_load_flow-0.5.0-py3-none-any.whl/roseau/load_flow/converters.py
0.943764
0.680786
converters.py
pypi
import unicodedata from enum import Enum, auto from typing import Union from typing_extensions import Self class RoseauLoadFlowExceptionCode(Enum): """Error codes used by Roseau Load Flow.""" # Generic BAD_GEOMETRY_TYPE = auto() BAD_PHASE = auto() BAD_ID_TYPE = auto() # Grounds and Potentia...
/roseau_load_flow-0.5.0-py3-none-any.whl/roseau/load_flow/exceptions.py
0.85817
0.19671
exceptions.py
pypi
import logging import warnings from abc import ABC from typing import TYPE_CHECKING, Any, ClassVar, NoReturn, Optional, TypeVar, Union import shapely from shapely.geometry import shape from shapely.geometry.base import BaseGeometry from roseau.load_flow.exceptions import RoseauLoadFlowException, RoseauLoadFlowExcepti...
/roseau_load_flow-0.5.0-py3-none-any.whl/roseau/load_flow/models/core.py
0.893555
0.291532
core.py
pypi
import logging from typing import Any, Optional from shapely import Point from roseau.load_flow.exceptions import RoseauLoadFlowException, RoseauLoadFlowExceptionCode from roseau.load_flow.models.branches import AbstractBranch from roseau.load_flow.models.buses import Bus from roseau.load_flow.models.transformers.par...
/roseau_load_flow-0.5.0-py3-none-any.whl/roseau/load_flow/models/transformers/transformers.py
0.93828
0.337449
transformers.py
pypi
import logging from typing import TYPE_CHECKING from roseau.load_flow.exceptions import RoseauLoadFlowException, RoseauLoadFlowExceptionCode from roseau.load_flow.models import ( AbstractBranch, AbstractLoad, Bus, Ground, Line, LineParameters, PotentialRef, Transformer, TransformerP...
/roseau_load_flow-0.5.0-py3-none-any.whl/roseau/load_flow/io/dict.py
0.846006
0.422505
dict.py
pypi
import json import logging from typing import TYPE_CHECKING import numpy as np import pandas as pd from roseau.load_flow.exceptions import RoseauLoadFlowException, RoseauLoadFlowExceptionCode from roseau.load_flow.models import ( AbstractBranch, AbstractLoad, Bus, Ground, LineParameters, Poten...
/roseau_load_flow-0.5.0-py3-none-any.whl/roseau/load_flow/io/dgs.py
0.595728
0.227544
dgs.py
pypi
import json import logging import re from abc import ABCMeta, abstractmethod from pathlib import Path from typing import Generic, TypeVar from typing_extensions import Self from roseau.load_flow.exceptions import RoseauLoadFlowException, RoseauLoadFlowExceptionCode from roseau.load_flow.typing import Id, JsonDict, St...
/roseau_load_flow-0.5.0-py3-none-any.whl/roseau/load_flow/utils/mixins.py
0.895999
0.368264
mixins.py
pypi
import numpy as np from roseau.load_flow.units import Q_ from roseau.load_flow.utils.types import ConductorType, InsulatorType, LineType PI = np.pi """The famous constant :math:`\\pi`.""" MU_0 = Q_(1.25663706212e-6, "H/m") """Magnetic permeability of the vacuum (H/m).""" EPSILON_0 = Q_(8.8541878128e-12, "F/m") """P...
/roseau_load_flow-0.5.0-py3-none-any.whl/roseau/load_flow/utils/constants.py
0.725065
0.494873
constants.py
pypi
import time import json import boto3 import hashlib import logging from airflow.providers.amazon.aws.hooks.base_aws import AwsGenericHook as AwsHook from airflow.providers.amazon.aws.waiters.base_waiter import BaseBotoWaiter def get_efs_filesystem(aws_conn_id, identifier, region = None, **context): """ Get E...
/rosecape_airflow-0.0.13-py3-none-any.whl/rosecape_airflow/aws/efs.py
0.524151
0.155238
efs.py
pypi
import pygame;import pygame_gui;from pygame_gui.ui_manager import UIManager;from pygame_gui.elements.ui_window import UIWindow;from pygame_gui.elements.ui_image import UIImage;from pygame.locals import *;import math;import random class Score: def __init__(self, font):self.player_1_score = 0;self.player_2_score = 0;...
/rosehip-1.1.0-py3-none-any.whl/Rosehip/apps/util/pong/__init__.py
0.408985
0.200851
__init__.py
pypi
[![snyk](https://snyk.io/test/github/ayman-m/rosetta/badge.svg)](https://snyk.io/test/github/my-soc/Rosetta) ![codeql](https://github.com/ayman-m/rosetta/actions/workflows/github-code-scanning/codeql/badge.svg) [![slack-community](https://img.shields.io/badge/Slack-4A154C?logo=slack&logoColor=white)](https://go-rosetta...
/rosetta-ce-1.6.4.tar.gz/rosetta-ce-1.6.4/README.md
0.800965
0.879768
README.md
pypi
from enum import Enum class ConverterFromEnum(Enum): CEF = 'cef' class ConverterToEnum(Enum): JSON = 'json' LEEF = 'leef' class Converter: @classmethod def convert(cls, from_type: ConverterFromEnum, to_type: ConverterToEnum, data: str) -> dict: """ Converts a CEF log message to...
/rosetta-ce-1.6.4.tar.gz/rosetta-ce-1.6.4/rosetta/rconverter.py
0.864009
0.374676
rconverter.py
pypi
from datetime import datetime import time import threading import socket import requests import warnings from typing import Optional from urllib3.exceptions import InsecureRequestWarning from rosetta.rfaker import Observables, Events class Sender: """ A class for sending fake data to a destination via a TCP ...
/rosetta-ce-1.6.4.tar.gz/rosetta-ce-1.6.4/rosetta/rsender.py
0.883676
0.300011
rsender.py
pypi
This package provides an implementation of **Rosetta**, a neural network-based model for predicting unasturated soil hydraulic parameters from basic soil characterization data. How to avoid installing this package ==================================== For most Rosetta use cases, we recommend using the web browser inte...
/rosetta-soil-0.1.1.tar.gz/rosetta-soil-0.1.1/README.rst
0.912026
0.806891
README.rst
pypi
from __future__ import annotations import pkg_resources from typing import NamedTuple, Sequence, Tuple, Union, Optional, List import numpy as np from . import ANN_Module from . import DB_Module Array1D = Union[np.ndarray] Array2D = Union[np.ndarray] ROSETTA_DB = pkg_resources.resource_filename("rosetta", "sqlite/R...
/rosetta-soil-0.1.1.tar.gz/rosetta-soil-0.1.1/rosetta/rosetta.py
0.883726
0.487185
rosetta.py
pypi
from packaging.version import Version import mrcz as _mrcz import logging from rsciio._docstrings import ( FILENAME_DOC, LAZY_DOC, ENDIANESS_DOC, RETURNS_DOC, SIGNAL_DOC, ) from rsciio.utils.tools import DTBox _logger = logging.getLogger(__name__) _POP_FROM_HEADER = [ "compressor", "MR...
/rosettasciio-0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/rsciio/mrcz/_api.py
0.723602
0.335922
_api.py
pypi
import logging from collections.abc import MutableMapping import dask.array as da import numcodecs import zarr from rsciio._docstrings import ( FILENAME_DOC, LAZY_DOC, RETURNS_DOC, SIGNAL_DOC, ) from rsciio._hierarchical import HierarchicalWriter, HierarchicalReader, version _logger = logging.getLo...
/rosettasciio-0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/rsciio/zspy/_api.py
0.742141
0.34715
_api.py
pypi
# The details of the format were taken from # https://www.biochem.mpg.de/doc_tom/TOM_Release_2008/IOfun/tom_mrcread.html # and https://ami.scripps.edu/software/mrctools/mrc_specification.php import logging import importlib.util import xml.etree.ElementTree as ET from pathlib import Path from copy import deepcopy imp...
/rosettasciio-0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/rsciio/jobinyvon/_api.py
0.873768
0.33158
_api.py
pypi
import os import logging import warnings import datetime import dateutil import numpy as np import dask from dask.diagnostics import ProgressBar from skimage import dtype_limits from rsciio._docstrings import ( FILENAME_DOC, LAZY_DOC, ENDIANESS_DOC, MMAP_DOC, RETURNS_DOC, SIGNAL_DOC, ) from r...
/rosettasciio-0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/rsciio/blockfile/_api.py
0.551815
0.288155
_api.py
pypi
import numpy as np import os import scipy from datetime import datetime from rsciio._docstrings import FILENAME_DOC, RETURNS_DOC def _cnv_time(timestr): try: t = datetime.strptime(timestr.decode(), "%H:%M:%S.%f") dt = t - datetime(t.year, t.month, t.day) r = float(dt.seconds) + float(dt...
/rosettasciio-0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/rsciio/dens/_api.py
0.47244
0.299361
_api.py
pypi
import numpy as np import os from datetime import datetime as dt import csv import logging from rsciio._docstrings import FILENAME_DOC, RETURNS_DOC _logger = logging.getLogger(__name__) # At some point, if there is another readerw, whith also use csv file, it will # be necessary to mention the other reader in this...
/rosettasciio-0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/rsciio/impulse/_api.py
0.482185
0.212784
_api.py
pypi
import os import logging import numpy as np from rsciio._docstrings import FILENAME_DOC, RETURNS_DOC _logger = logging.getLogger(__name__) no_netcdf = False try: from netCDF4 import Dataset which_netcdf = "netCDF4" except Exception: try: from netCDF3 import Dataset which_netcdf = "ne...
/rosettasciio-0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/rsciio/netcdf/_api.py
0.565779
0.309441
_api.py
pypi
# The details of the format were taken from # https://www.biochem.mpg.de/doc_tom/TOM_Release_2008/IOfun/tom_mrcread.html # and https://ami.scripps.edu/software/mrctools/mrc_specification.php import os import logging import numpy as np from rsciio._docstrings import ( FILENAME_DOC, LAZY_DOC, ENDIANESS_DO...
/rosettasciio-0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/rsciio/mrc/_api.py
0.729134
0.335201
_api.py
pypi
import bz2 import math import numpy as np import copy import os import struct import io from datetime import datetime from dateutil import tz import tifffile import xml.etree.ElementTree as ET from rsciio._docstrings import FILENAME_DOC, LAZY_DOC, RETURNS_DOC def element_symbol(z): elements = [ "", ...
/rosettasciio-0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/rsciio/phenom/_api.py
0.443118
0.310315
_api.py
pypi
import numpy as np from dask.array import Array from rsciio.utils.array import get_numpy_kwargs rgba8 = np.dtype({"names": ["R", "G", "B", "A"], "formats": ["u1", "u1", "u1", "u1"]}) rgb8 = np.dtype({"names": ["R", "G", "B"], "formats": ["u1", "u1", "u1"]}) rgba16 = np.dtype({"names": ["R", "G", "B", "A"], "format...
/rosettasciio-0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/rsciio/utils/rgb_tools.py
0.746693
0.452052
rgb_tools.py
pypi
import datetime from dateutil import tz, parser import logging import numpy as np _logger = logging.getLogger(__name__) def serial_date_to_ISO_format(serial): """ Convert serial_date to a tuple of string (date, time, time_zone) in ISO format. By default, the serial date is converted in local time zone....
/rosettasciio-0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/rsciio/utils/date_time_tools.py
0.883412
0.298907
date_time_tools.py
pypi
from packaging.version import Version import warnings import numpy as np import skimage from skimage.exposure.exposure import intensity_range, _output_dtype def rescale_intensity(image, in_range="image", out_range="dtype"): """Return image after stretching or shrinking its intensity levels. The desired inte...
/rosettasciio-0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/rsciio/utils/skimage_exposure.py
0.948632
0.71408
skimage_exposure.py
pypi
# rosewater [![PyPI version](https://badge.fury.io/py/rosewater.svg)](https://badge.fury.io/py/rosewater) **rosewater** assigns genes to (super-) enhancer output from [ROSE](https://bitbucket.org/young_computation/rose/src/master/) in an expression-aware manner. It allows users to set a TPM threshold to filter genes ...
/rosewater-0.1.1.tar.gz/rosewater-0.1.1/README.md
0.698535
0.983629
README.md
pypi
from pathlib import Path import pandas as pd import pybedtools as pyb from pybedtools.featurefuncs import TSS import click def parse_annotation(anno_gtf, out_dir): # Get base filename. base = Path(anno_gtf).stem anno = pyb.BedTool(anno_gtf) all_tss = anno.filter(lambda b: b[2] == "transcript").each(...
/rosewater-0.1.1.tar.gz/rosewater-0.1.1/rosewater.py
0.553747
0.527317
rosewater.py
pypi
import matplotlib.pyplot as graph __version__ = '1.2021.10.02' # Major.YYYY.MM.DD import numpy as np colors_538 = [ '#30a2da', '#fc4f30', '#e5ae38', '#6d904f', '#8b8b8b', ] def plot_roc_curve( prediction_probability, true, label='', plot_curve_only=False, ...
/rosey-graph-1.2021.10.2.tar.gz/rosey-graph-1.2021.10.2/rosey_graph/__init__.py
0.844601
0.50531
__init__.py
pypi
import tensorflow.keras as k import tensorflow.keras.backend as K class Fusion(k.regularizers.Regularizer): """ Base class for all of the fusion regularizers. Fused Lasso -> https://web.stanford.edu/group/SOL/papers/fused-lasso-JRSSB.pdf Absolute Fused Lasso -> http://www.kdd.org/kdd2016/papers/files/...
/rosey-keras-1.20210930.tar.gz/rosey-keras-1.20210930/rosey_keras/regularizers.py
0.912194
0.559952
regularizers.py
pypi
import tensorflow as tf import tensorflow.keras as k import tensorflow.keras.backend as K def _diff(x): return x[1:] - x[:-1] def _wasserstein_distance(a, b): """ Wasserstein distance function :param a: data points from distribution A :param b: data points from distribution B :return: "...
/rosey-keras-1.20210930.tar.gz/rosey-keras-1.20210930/rosey_keras/losses.py
0.947381
0.727855
losses.py
pypi
import numpy as np import pandas as pd __version__ = '1.2021.10.01.1336' def solve_n_bins(x): """ Uses the Freedman Diaconis Rule for generating the number of bins required https://en.wikipedia.org/wiki/Freedman%E2%80%93Diaconis_rule Bin Size = 2 IQR(x) / (n)^(1/3) """ from scipy.stats impor...
/rosey-stats-1.2021.10.1.1336.tar.gz/rosey-stats-1.2021.10.1.1336/rosey_stats/__init__.py
0.864325
0.736235
__init__.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 ...
/roshan_dist_pack-1.2.tar.gz/roshan_dist_pack-1.2/roshan_dist_pack/Gaussiandistribution.py
0.688364
0.853058
Gaussiandistribution.py
pypi
from __future__ import print_function import json import logging # Python 2/3 compatibility import list try: from collections import UserDict except ImportError: from UserDict import UserDict LOGGER = logging.getLogger('roslibpy') __all__ = ['Message', 'ServiceRequest', 'ServiceRespons...
/roslibpy_vincentbaetenpxl-1.1.1.tar.gz/roslibpy_vincentbaetenpxl-1.1.1/src/roslibpy/core.py
0.849535
0.181517
core.py
pypi
from __future__ import print_function import logging import math from . import Service from . import ServiceRequest from . import Topic __all__ = ['TFClient'] LOGGER = logging.getLogger('roslibpy.tf') class TFClient(object): """A TF Client that listens to TFs from tf2_web_republisher. Args: ros (...
/roslibpy_vincentbaetenpxl-1.1.1.tar.gz/roslibpy_vincentbaetenpxl-1.1.1/src/roslibpy/tf.py
0.765856
0.1585
tf.py
pypi
Examples ======== Getting started with **roslibpy** is simple. The following examples will help you on the first steps using it to connect to a ROS environment. Before you start, make sure you have ROS and `rosbridge` running (see :ref:`ros-setup`). These examples assume ROS is running on the same computer where you ...
/roslibpy_vincentbaetenpxl-1.1.1.tar.gz/roslibpy_vincentbaetenpxl-1.1.1/docs/examples.rst
0.92686
0.78436
examples.rst
pypi
Examples ======== Getting started with **roslibpy** is simple. The following examples will help you on the first steps using it to connect to a ROS environment. Before you start, make sure you have ROS and `rosbridge` running (see :ref:`ros-setup`). These examples assume ROS is running on the same computer where you ...
/roslibpy-1.5.0.tar.gz/roslibpy-1.5.0/docs/examples.rst
0.926204
0.783906
examples.rst
pypi
from .registry import converts_from_numpy, converts_to_numpy from geometry_msgs.msg import Transform, Vector3, Quaternion, Point, Pose from . import numpify import numpy as np # basic types @converts_to_numpy(Vector3) def vector3_to_numpy(msg, hom=False): if hom: return np.array([msg.x, msg.y, msg.z, 0]) else: ...
/rosnumpy-0.0.5.2-py3-none-any.whl/ros_numpy/geometry.py
0.466846
0.514888
geometry.py
pypi
import roslib.message import rospy import re import base64 import sys python3 = True if sys.hexversion > 0x03000000 else False python_to_ros_type_map = { 'bool' : ['bool'], 'int' : ['int8', 'byte', 'uint8', 'char', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'...
/rospy_message_converter-0.5.2.tar.gz/rospy_message_converter-0.5.2/src/rospy_message_converter/message_converter.py
0.428233
0.192103
message_converter.py
pypi
from typing import Literal AllLiteral = Literal["all"] AnyLiteral = Literal["any"] ARPLiteral = Literal[ "disabled", "enabled", "local-proxy-arp", "proxy-arp", "reply-only" ] IPProtocol = Literal[ "dccp", "ddp", "egp", "encap", "etherip", "ggp", "gre", "hmp", "icmp", "icmpv6...
/rosrestpy-0.10.0.tar.gz/rosrestpy-0.10.0/ros/_literals.py
0.476336
0.291233
_literals.py
pypi
try: import ujson as json except ImportError: import json # type: ignore[no-redef] from attr import define from requests import Session from requests.auth import HTTPBasicAuth from typing import Any, Dict, List, Type, TypeVar from . import ( InterfaceModule, IPModule, PPPModule, QueueModule, ...
/rosrestpy-0.10.0.tar.gz/rosrestpy-0.10.0/ros/ros.py
0.779532
0.207797
ros.py
pypi
from typing import List, Literal, Union from ros._base import BaseModule, BaseProps from ros._literals import AnyLiteral, IPProtocol, MACProtocol, PortLiteral from .bandwith_server import BandwithServer from .bandwith_test import BandwithTest from .ip_scan import IPScan from .netwatch import Netwatch from .ping impor...
/rosrestpy-0.10.0.tar.gz/rosrestpy-0.10.0/ros/tool/__init__.py
0.721841
0.223123
__init__.py
pypi
import numpy as np import pandas as pd from matplotlib import pyplot as plt from scipy.interpolate import interp1d from scipy.optimize import linprog from statsmodels.distributions.empirical_distribution import ECDF __all__ = ["in_hull", "transforms", "mapping", "sampler"] def in_hull(points, x): """ Param...
/ross_ml-0.0.1-py3-none-any.whl/rossml/random_sampler.py
0.668772
0.522872
random_sampler.py
pypi
import shutil import webbrowser from pathlib import Path from pickle import dump, load import numpy as np import pandas as pd from plotly import graph_objects as go from plotly.figure_factory import create_scatterplotmatrix from plotly.subplots import make_subplots from scipy.stats import (chisquare, entropy, ks_2samp...
/ross_ml-0.0.1-py3-none-any.whl/rossml/pipeline.py
0.847274
0.432003
pipeline.py
pypi
# ROSS Report This package aims to build a report for [ROSS](https://github.com/ross-rotordynamics/ross), a rotordynamics python package. ## Quick start to graphics submodule The ross-report's structure is very simple, in the highest level we have an object called Layout, which constructs the whole html page. Layout...
/ross-report-0.0.1.tar.gz/ross-report-0.0.1/README.md
0.73431
0.878887
README.md
pypi
import black __all__ = ["Config"] class _Dict: """Set keys and values as attribute for the Config object. Subclass to organize nested dictionaries and set each key / value as attribute for the config object. Return ------ A dictionary as attribute for the Config() object. Examples ...
/ross-report-0.0.1.tar.gz/ross-report-0.0.1/report/config.py
0.934133
0.44089
config.py
pypi
from pathlib import Path import report import base64 as b64 from plotly.graph_objs import Figure class CSS: def __init__(self, path=Path(report.__file__).parent / "style.css"): self.path = Path(path) def __str__(self): with open(self.path) as css_file: css_code = css_file.read() ...
/ross-report-0.0.1.tar.gz/ross-report-0.0.1/report/graphics.py
0.796411
0.167287
graphics.py
pypi
import os import warnings from inspect import signature import numpy as np import toml from numpy.polynomial import Polynomial from plotly import graph_objects as go from scipy import interpolate as interpolate from ross.element import Element from ross.fluid_flow import fluid_flow as flow from ross.fluid_flow.fluid_...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/bearing_seal_element.py
0.842183
0.552238
bearing_seal_element.py
pypi
import os from pathlib import Path import numpy as np import toml from plotly import graph_objects as go from ross.element import Element from ross.units import check_units __all__ = ["PointMass"] class PointMass(Element): """A point mass element. This class will create a point mass element. This elem...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/point_mass.py
0.909926
0.672795
point_mass.py
pypi
import inspect import warnings from functools import wraps from pathlib import Path import pint new_units_path = Path(__file__).parent / "new_units.txt" ureg = pint.get_application_registry() if isinstance(ureg.get(), pint.registry.LazyRegistry): ureg = pint.UnitRegistry() ureg.load_definitions(str(new_units_...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/units.py
0.575111
0.38318
units.py
pypi
import os from pathlib import Path import numpy as np import toml from plotly import graph_objects as go from ross.element import Element from ross.units import check_units from ross.utils import read_table_file __all__ = ["DiskElement", "DiskElement6DoF"] class DiskElement(Element): """A disk element. Th...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/disk_element.py
0.849535
0.478346
disk_element.py
pypi
from pathlib import Path import numpy as np import toml from .units import check_units __all__ = ["Material", "steel"] ROSS_PATH = Path(__file__).parent AVAILABLE_MATERIALS_PATH = ROSS_PATH / "available_materials.toml" class Material: """Material used on shaft and disks. Class used to create a material a...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/materials.py
0.897922
0.468061
materials.py
pypi
from plotly import graph_objects as go from plotly import io as pio # tableau colors tableau_colors = { "blue": "#1f77b4", "orange": "#ff7f0e", "green": "#2ca02c", "red": "#d62728", "purple": "#9467bd", "brown": "#8c564b", "pink": "#e377c2", "gray": "#7f7f7f", "olive": "#bcbd22", ...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/plotly_theme.py
0.58439
0.533458
plotly_theme.py
pypi
import re import numpy as np import pandas as pd from plotly import graph_objects as go class DataNotFoundError(Exception): """ An exception indicating that the data could not be found in the file. """ pass def read_table_file(file, element, sheet_name=0, n=0, sheet_type="Model"): """Instantia...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/utils.py
0.717408
0.371336
utils.py
pypi
import inspect from abc import ABC, abstractmethod from collections import namedtuple from pathlib import Path import pandas as pd import toml class Element(ABC): """Element class. This class is a general abstract class to be implemented in other files, in order to create specific elements for the user....
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/element.py
0.881449
0.461623
element.py
pypi
from ross.shaft_element import ShaftElement from ross.stochastic.st_materials import ST_Material from ross.stochastic.st_results_elements import plot_histogram from ross.units import Q_, check_units __all__ = ["ST_ShaftElement", "st_shaft_example"] class ST_ShaftElement: """Random shaft element. Creates an ...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/stochastic/st_shaft_element.py
0.921873
0.435181
st_shaft_element.py
pypi
import numpy as np from ross.bearing_seal_element import BearingElement from ross.fluid_flow import fluid_flow as flow from ross.fluid_flow.fluid_flow_coefficients import ( calculate_stiffness_and_damping_coefficients, ) from ross.stochastic.st_results_elements import plot_histogram from ross.units import check_un...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/stochastic/st_bearing_seal_element.py
0.915299
0.640355
st_bearing_seal_element.py
pypi
import copy import inspect from abc import ABC from collections.abc import Iterable from pathlib import Path import numpy as np import toml from plotly import express as px from plotly import graph_objects as go from plotly.subplots import make_subplots from ross.plotly_theme import tableau_colors from ross.units imp...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/stochastic/st_results.py
0.905766
0.400456
st_results.py
pypi
from copy import copy import numpy as np from plotly import graph_objects as go from plotly import io as pio from plotly.subplots import make_subplots from scipy.stats import gaussian_kde from ross.plotly_theme import tableau_colors def plot_histogram( attribute_dict, label={}, var_list=[], histogram_kwargs=Non...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/stochastic/st_results_elements.py
0.907765
0.490419
st_results_elements.py
pypi
from ross.point_mass import PointMass from ross.stochastic.st_results_elements import plot_histogram from ross.units import check_units __all__ = ["ST_PointMass", "st_pointmass_example"] class ST_PointMass: """Random point mass element. Creates an object containing a list with random instances of PointMass....
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/stochastic/st_point_mass.py
0.939311
0.607838
st_point_mass.py
pypi
from collections.abc import Iterable import numpy as np from ross.rotor_assembly import Rotor from ross.stochastic.st_bearing_seal_element import ST_BearingElement from ross.stochastic.st_disk_element import ST_DiskElement from ross.stochastic.st_point_mass import ST_PointMass from ross.stochastic.st_results import (...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/stochastic/st_rotor_assembly.py
0.839964
0.413714
st_rotor_assembly.py
pypi
from collections.abc import Iterable import numpy as np from ross.materials import Material from ross.stochastic.st_results_elements import plot_histogram from ross.units import check_units __all__ = ["ST_Material"] class ST_Material: """Create instance of Material with random parameters. Class used to cr...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/stochastic/st_materials.py
0.936263
0.563138
st_materials.py
pypi
import numpy as np from ross.disk_element import DiskElement from ross.stochastic.st_materials import ST_Material from ross.stochastic.st_results_elements import plot_histogram from ross.units import check_units __all__ = ["ST_DiskElement", "st_disk_example"] class ST_DiskElement: """Random disk element. C...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/stochastic/st_disk_element.py
0.903471
0.332161
st_disk_element.py
pypi
import sys import numpy as np import scipy as sp from ross.fluid_flow.fluid_flow_coefficients import find_equilibrium_position from ross.fluid_flow.fluid_flow_geometry import ( calculate_attitude_angle, calculate_eccentricity_ratio, calculate_rotor_load, external_radius_function, internal_radius_f...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/fluid_flow/fluid_flow.py
0.831725
0.809201
fluid_flow.py
pypi
import numpy as np from scipy.optimize import least_squares, root def calculate_attitude_angle(eccentricity_ratio): """Calculates the attitude angle based on the eccentricity ratio. Suitable only for short bearings. Parameters ---------- eccentricity_ratio: float The ratio between the jour...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/fluid_flow/fluid_flow_geometry.py
0.953405
0.782455
fluid_flow_geometry.py
pypi
import numpy as np from plotly import graph_objects as go from ross.plotly_theme import tableau_colors def plot_eccentricity(fluid_flow_object, z=0, fig=None, scale_factor=1.0, **kwargs): """Plot the rotor eccentricity. This function assembles pressure graphic along the z-axis. The first few plots are o...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/fluid_flow/fluid_flow_graphics.py
0.953546
0.769167
fluid_flow_graphics.py
pypi
import sys from math import isnan import numpy as np from scipy import integrate from scipy.optimize import least_squares from ross.fluid_flow.fluid_flow_geometry import move_rotor_center, move_rotor_center_abs def calculate_oil_film_force(fluid_flow_object, force_type=None): """This function calculates the for...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/fluid_flow/fluid_flow_coefficients.py
0.795817
0.581392
fluid_flow_coefficients.py
pypi
from abc import ABC, abstractmethod import numpy as np import plotly.graph_objects as go import scipy as sp from ross.results import TimeResponseResults from ross.units import Q_ __all__ = ["Defect"] class Defect(ABC): def __init__(self): pass @abstractmethod def run(self): pass d...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/defects/abs_defect.py
0.934328
0.533519
abs_defect.py
pypi
import time from pathlib import Path import numpy as np import pandas as pd import scipy.integrate import scipy.linalg import ross from ross.units import Q_, check_units from .abs_defect import Defect from .integrate_solver import Integrator __all__ = [ "Crack", ] class Crack(Defect): """Contains a :cite:...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/defects/crack.py
0.852767
0.592431
crack.py
pypi
import numpy as np class Integrator: """A series of Runge-Kutta time integration algorithms. Calculates the time response for the rotors input to the routine. Parameters ---------- x0 : float Initial time y0 : float Initial condition for the integration x : float ...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/defects/integrate_solver.py
0.927248
0.695629
integrate_solver.py
pypi
import time import numpy as np import scipy.integrate import scipy.linalg import ross from ross.units import Q_, check_units from .abs_defect import Defect from .integrate_solver import Integrator __all__ = [ "Rubbing", ] class Rubbing(Defect): """Contains a rubbing model for applications on finite elemen...
/ross-rotordynamics-1.4.2.tar.gz/ross-rotordynamics-1.4.2/ross/defects/rubbing.py
0.830766
0.600013
rubbing.py
pypi
from termcolor import colored # coloured standard output from rocket import rocket import matplotlib.pyplot as plt # module used for graphing class graph: # uses the rocket helper functions to make lists of x2, a2, v2 and values, which will be eventually displayed on graphs with time. def drawGraph(self,vectors...
/rosshill-physics-0.23.tar.gz/rosshill-physics-0.23/physics/graph.py
0.476336
0.682382
graph.py
pypi
import os import shutil import warnings import subprocess import torch import atomium import tempfile import numpy as np import pandas as pd import concurrent.futures from Bio.SeqUtils import seq1 from zipfile import ZipFile from rossmann_toolbox.utils import sharpen_preds, corr_seq, custom_warning from rossmann_toolb...
/rossmann-toolbox-0.1.0.tar.gz/rossmann-toolbox-0.1.0/rossmann_toolbox/rtb.py
0.485112
0.172974
rtb.py
pypi
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F class GATLayer(nn.Module): ''' single head variation of edge-gat ''' def __init__(self, in_dim_n, in_dim_e, out_dim_n, out_dim_e, attention_scaler = 'softmax', **kw_args): super().__init__() ...
/rossmann-toolbox-0.1.0.tar.gz/rossmann-toolbox-0.1.0/rossmann_toolbox/models/edge_gat_layer.py
0.926362
0.509703
edge_gat_layer.py
pypi
import copy import random from packaging import version import torch import dgl import numpy as np import pandas as pd import networkx as nx from .bio_params import LABEL_DICT, ACIDS_MAP_DEF, SS_MAP_EXT, CM_THRESHOLD def collate(samples): (graphs, labels) = map(list, zip(*samples)) batched_graph = dgl.batch...
/rossmann-toolbox-0.1.0.tar.gz/rossmann-toolbox-0.1.0/rossmann_toolbox/utils/graph_loader_opt.py
0.455441
0.411879
graph_loader_opt.py
pypi
import pandas as pd import numpy as np import os from allennlp.commands.elmo import ElmoEmbedder class SeqVec: def __init__(self, model_dir, cuda_device=-1, tokens_per_batch=16000): """ Wrapper for efficient embedding of protein sequences with SeqVec (Heinzinger et al., 2019) :param model...
/rossmann-toolbox-0.1.0.tar.gz/rossmann-toolbox-0.1.0/rossmann_toolbox/utils/seqvec.py
0.689515
0.413892
seqvec.py
pypi
from collections.abc import Iterable import numpy as np import warnings from scipy.signal import find_peaks from itertools import groupby def custom_warning(message, category, filename, lineno, file=None, line=None): print(f'{filename}:{lineno} - {message}') def sharpen_preds(probs, sep=15, min_prob=0.5): "...
/rossmann-toolbox-0.1.0.tar.gz/rossmann-toolbox-0.1.0/rossmann_toolbox/utils/utils.py
0.58261
0.298491
utils.py
pypi
import random import pandas as pd import numpy as np class SeqChunker: def __init__(self, data, W_size=64, batch_size=64, shuffle=True, neg_frac=1, data_encoders=None, label_encoders=None, data_cols=None, label_cols=None): """ Generates sequence chunks of fixed sized window with d...
/rossmann-toolbox-0.1.0.tar.gz/rossmann-toolbox-0.1.0/rossmann_toolbox/utils/generators.py
0.694303
0.481759
generators.py
pypi
from math import gcd from typing import Dict, List, Optional from collections import defaultdict, namedtuple from dataclasses import dataclass, InitVar, field as f from lxml.etree import _ElementTree from .helpers import SPEC_KEYS, MultiDict, str_int ANY_SPEC = {'*'} Title = namedtuple('Title', ['name', 'value']) Col...
/rosstat-flc-1.3.1.tar.gz/rosstat-flc-1.3.1/rosstat/report.py
0.712632
0.267008
report.py
pypi
import operator from copy import deepcopy from itertools import chain from functools import reduce from .value import nullablefloat from .specific import Specific from ..exceptions import NoElemToCompareError, NoFormatForRowError from ....helpers import SPEC_KEYS OPERATOR_MAP = { '<': operator.lt, '<=': operat...
/rosstat-flc-1.3.1.tar.gz/rosstat-flc-1.3.1/rosstat/validators/control/parser/elements.py
0.533884
0.178526
elements.py
pypi
class Specific: def __init__(self, key, specs): self._key = key self._specs = set(specs) self._default = None def __repr__(self): return "<Specific {} default={}>".format(self._specs, self._default) def __iter__(self): return iter(self._specs) def __contains__(...
/rosstat-flc-1.3.1.tar.gz/rosstat-flc-1.3.1/rosstat/validators/control/parser/specific.py
0.678966
0.286581
specific.py
pypi
from itertools import chain from collections import namedtuple from ..parser import parser from ..exceptions import ( ConditionExprError, RuleExprError, PrevPeriodNotImpl, StopEvaluation ) ControlParams = namedtuple('ControlParams', ('is_rule', 'formats', ...
/rosstat-flc-1.3.1.tar.gz/rosstat-flc-1.3.1/rosstat/validators/control/inspectors/formula.py
0.587825
0.159152
formula.py
pypi
from ..base import AbstractValidator from .inspectors import ValueInspector, SpecInspector from .exceptions import (FormatError, DuplicateError, EmptyRowError, EmptyColumnError, NoSectionReportError, NoSectionTemplateError, NoRuleError) class FormatValidator(AbstractV...
/rosstat-flc-1.3.1.tar.gz/rosstat-flc-1.3.1/rosstat/validators/format/format.py
0.443962
0.173533
format.py
pypi
class FormatError(Exception): pass # --- class NoSectionReportError(FormatError): def __init__(self, sec_code): self.code = '1' self.msg = 'Раздел {} отсутствует в отчёте'.format(sec_code) class DuplicateError(FormatError): def __init__(self, sec_code, row_code, counter): self....
/rosstat-flc-1.3.1.tar.gz/rosstat-flc-1.3.1/rosstat/validators/format/exceptions.py
0.421314
0.192312
exceptions.py
pypi
from ..exceptions import (ValueBaseError, ValueNotNumberError, ValueBadFormat, ValueNotInRangeError, ValueNotInListError, ValueNotInDictError, ValueLengthError) class ValueInspector: def __init__(self, params, catalogs): self._catalogs = catalogs ...
/rosstat-flc-1.3.1.tar.gz/rosstat-flc-1.3.1/rosstat/validators/format/inspectors/value.py
0.406744
0.212252
value.py
pypi
# rossum [![PyPI - version](https://img.shields.io/pypi/v/rossum.svg)](https://pypi.python.org/pypi/rossum) [![Build Status](https://travis-ci.com/rossumai/rossum.svg?branch=master)](https://travis-ci.com/rossumai/rossum) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github...
/rossum-3.15.0.tar.gz/rossum-3.15.0/README.md
0.483892
0.937096
README.md
pypi
from kedro.pipeline import Pipeline, node from .nodes import * def create_pipeline(): return Pipeline([ node( func=create_features_targets, inputs=dict(instances="instances", target_ind_params="params:target_ind_params", feature_ind_p...
/rostam_pack-0.7-py3-none-any.whl/rostam_pack/pipelines/ml_app/pipeline.py
0.72526
0.233903
pipeline.py
pypi
import pandas as pd import logging from moosir_feature.model_validations.basic_parameter_searcher import ParameterSearcher from moosir_feature.model_validations.benchmarking import NaiveModel, run_benchmarking from moosir_feature.model_validations.model_validator import CustomTsCv from moosir_feature.transformers.mana...
/rostam_pack-0.7-py3-none-any.whl/rostam_pack/pipelines/ml_app/nodes.py
0.44348
0.158956
nodes.py
pypi
import argparse import sys from pathlib import Path import yaml from src.callbacks import get_callbacks, get_callbacks_pdb from src.preprocessing import DataPreprocessor from src.structurecontainer import StructureContainer from src.visualization.visualizator import Visualizator class LoadConfFile(argparse.Action)...
/rostspace-0.1.1-py3-none-any.whl/src/app.py
0.418222
0.165559
app.py
pypi
import sys from colorsys import hls_to_rgb import numpy as np import pandas as pd import plotly.graph_objects as go from matplotlib import cm from pandas import DataFrame from .base import init_app from .pdb import init_app_pdb class Visualizator: SYMBOLS = [ "circle", "square", "diamond...
/rostspace-0.1.1-py3-none-any.whl/src/visualization/visualizator.py
0.632049
0.375535
visualizator.py
pypi
import dash_bootstrap_components as dbc import plotly.graph_objects as go from dash import Dash, dcc, html metric_options = [ "euclidean", "cosine", "manhattan", "chebyshev", "minkowski", "canberra", "braycurtis", "haversine", "mahalanobis", "wminkowski", "seuclidean", ...
/rostspace-0.1.1-py3-none-any.whl/src/visualization/base.py
0.632957
0.231072
base.py
pypi