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 collections.abc import hashlib import pathlib from typing import Any, Optional from ...query import QuerySpecification from ...serde import pydantic_jsonable_dict from .delegate import FileDelegate, S3Credentials from .progress import ( NoopProgressMonitorFactory, ProgressMonitorFactory, ) from .record ...
/roboto_sdk-0.1.27.tar.gz/roboto_sdk-0.1.27/src/roboto_sdk/domain/files/file.py
0.868604
0.154663
file.py
pypi
import abc from typing import Optional import tqdm class ProgressMonitor(abc.ABC): @abc.abstractmethod def update(self, uploaded_bytes: int): raise NotImplementedError("update") @abc.abstractmethod def close(self): raise NotImplementedError("close") @abc.abstractmethod def ...
/roboto_sdk-0.1.27.tar.gz/roboto_sdk-0.1.27/src/roboto_sdk/domain/files/progress.py
0.835416
0.245277
progress.py
pypi
import abc from typing import Any, Optional from .record import ( OrgInviteRecord, OrgRecord, OrgRoleName, OrgRoleRecord, OrgType, ) class OrgDelegate(abc.ABC): @abc.abstractmethod def create_org( self, creator_user_id: Optional[str], name: str, org_type: ...
/roboto_sdk-0.1.27.tar.gz/roboto_sdk-0.1.27/src/roboto_sdk/domain/orgs/delegate.py
0.710729
0.158663
delegate.py
pypi
import abc import datetime from typing import Any, Optional import pydantic from ...auth import Permissions from ...http import PaginatedList from ...query import QuerySpecification from ...serde import pydantic_jsonable_dict from ...time import utcnow from ...updates import ( MetadataChangeset, UpdateConditi...
/roboto_sdk-0.1.27.tar.gz/roboto_sdk-0.1.27/src/roboto_sdk/domain/datasets/delegate.py
0.804406
0.17676
delegate.py
pypi
import collections.abc from typing import Any, Optional from ...domain.actions import ( Action, ActionDelegate, ComputeRequirements, ContainerParameters, Invocation, InvocationDataSource, InvocationDelegate, InvocationSource, ) from ...query import ( ConditionType, QuerySpecifi...
/roboto_sdk-0.1.27.tar.gz/roboto_sdk-0.1.27/src/roboto_sdk/domain/triggers/trigger.py
0.913624
0.185799
trigger.py
pypi
import datetime import enum import json from typing import Optional import pydantic from ...serde import pydantic_jsonable_dict from .action_container_resources import ( ComputeRequirements, ContainerParameters, ) class InvocationDataSourceType(enum.Enum): """Source of data for an Action's InputBinding"...
/roboto_sdk-0.1.27.tar.gz/roboto_sdk-0.1.27/src/roboto_sdk/domain/actions/invocation_record.py
0.82425
0.224757
invocation_record.py
pypi
import base64 import enum import json import typing from pydantic.generics import GenericModel from ..logging import default_logger logger = default_logger() Model = typing.TypeVar("Model") class PaginatedList(GenericModel, typing.Generic[Model]): """ A list of records pulled from a paginated result set. ...
/roboto_sdk-0.1.27.tar.gz/roboto_sdk-0.1.27/src/roboto_sdk/http/response.py
0.829285
0.326835
response.py
pypi
import argparse import enum import shlex import typing import pydantic from ...domain.actions import ( ComputeRequirements, ContainerParameters, ) from ..command import KeyValuePairsAction from .exceptions import ParseError class DockerInstructionForm(enum.Enum): """The form of a CMD instruction.""" ...
/roboto_sdk-0.1.27.tar.gz/roboto_sdk-0.1.27/src/roboto_sdk/cli/common_args/actions.py
0.637482
0.197793
actions.py
pypi
import argparse import json import typing from ...domain.datasets import Dataset from ...query import ( Comparator, Condition, ConditionGroup, ConditionOperator, QuerySpecification, ) from ..command import ( KeyValuePairsAction, RobotoCommand, ) from ..common_args import add_org_arg from .....
/roboto_sdk-0.1.27.tar.gz/roboto_sdk-0.1.27/src/roboto_sdk/cli/datasets/search.py
0.42919
0.175786
search.py
pypi
import argparse import json from ...domain.datasets import Dataset from ...updates import MetadataChangeset from ..command import ( KeyValuePairsAction, RobotoCommand, ) from ..common_args import add_org_arg from ..context import CLIContext from .shared_helpdoc import DATASET_ID_HELP def update( args: ar...
/roboto_sdk-0.1.27.tar.gz/roboto_sdk-0.1.27/src/roboto_sdk/cli/datasets/update.py
0.538255
0.155848
update.py
pypi
import json import re from typing import Any, Optional from ..http import HttpError from ..serde import safe_dict_drill __ORG_MESSAGE_PATTERN = re.compile(r"did not provide a org for single-org operation.") class RobotoDomainException(Exception): """ Expected exceptions from the Roboto domain entity object...
/roboto_sdk-0.1.27.tar.gz/roboto_sdk-0.1.27/src/roboto_sdk/exceptions/domain.py
0.763396
0.178025
domain.py
pypi
from __future__ import annotations from dataclasses import dataclass, field from enum import Enum from pathlib import Path from typing import BinaryIO, List, NewType, Optional, Union from typing_extensions import Literal from .url import URL Token = NewType('Token', str) UserID = NewType('UserID', int) ChatID = New...
/roboto-telegram-0.4.0.tar.gz/roboto-telegram-0.4.0/roboto/api_types.py
0.894444
0.264109
api_types.py
pypi
from dataclasses import asdict, fields, is_dataclass from enum import Enum from typing import ( Any, Dict, List, Optional, Type, TypeVar, Union, cast, get_type_hints, overload, ) from typing_extensions import Literal from typing_inspect import get_args, get_origin, is_optional_t...
/roboto-telegram-0.4.0.tar.gz/roboto-telegram-0.4.0/roboto/datautil.py
0.944318
0.367838
datautil.py
pypi
from collections import ChainMap from dataclasses import dataclass from enum import Enum from typing import Any, Awaitable, Callable, Dict, Optional, Union from asks import Session from asks.multipart import MultipartData from asks.response_objects import Response from typing_extensions import Literal, Protocol from ...
/roboto-telegram-0.4.0.tar.gz/roboto-telegram-0.4.0/roboto/http_api.py
0.961678
0.175786
http_api.py
pypi
import json from dataclasses import dataclass from typing import Generic, List, Optional, TypeVar, Union, cast from .api_types import ( BotCommand, CallbackQueryID, ChatAction, ChatID, ChatPermissions, DiceEmoji, FileID, InlineKeyboardMarkup, InlineMessageID, InputFile, Inpu...
/roboto-telegram-0.4.0.tar.gz/roboto-telegram-0.4.0/roboto/request_types.py
0.91283
0.171546
request_types.py
pypi
from __future__ import annotations import logging import os from dataclasses import asdict, dataclass, replace from pathlib import PurePath from typing import Final, Iterable, Mapping import toml from experimental.scie.config import Command, Config, File, Interpreter, LiftConfig from experimental.scie.subsystems imp...
/robotpajamas.pants.scie-0.0.2-py3-none-any.whl/experimental/scie/rules.py
0.593727
0.185947
rules.py
pypi
from __future__ import annotations import logging from dataclasses import dataclass import toml logger = logging.getLogger(__name__) @dataclass(frozen=True) class Config: lift: LiftConfig def __post_init__(self): if isinstance(self.lift, dict): logger.warning(f"LIFT: {self.lift}") ...
/robotpajamas.pants.scie-0.0.2-py3-none-any.whl/experimental/scie/config.py
0.849113
0.183082
config.py
pypi
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np def get_normal(vertices, triangles): ''' calculate normal direction in each vertex Args: vertices: [nver, 3] triangles: [ntri, 3] Returns: normal: [nver, ...
/robotpipe-0.0.4-cp39-cp39-win_amd64.whl/heimarobot/insightface/thirdparty/face3d/mesh_numpy/light.py
0.723016
0.615579
light.py
pypi
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import os from skimage import io ## TODO ## TODO: c++ version def read_obj(obj_name): ''' read mesh ''' return 0 # ------------------------- write def write_asc(path, vertices): ''' ...
/robotpipe-0.0.4-cp39-cp39-win_amd64.whl/heimarobot/insightface/thirdparty/face3d/mesh_numpy/io.py
0.460046
0.224778
io.py
pypi
import numpy as np from .. import mesh ''' TODO: a clear document. Given: image_points, 3D Model, Camera Matrix(s, R, t2d) Estimate: shape parameters, expression parameters Inference: projected_vertices = s*P*R(mu + shape + exp) + t2d --> image_points s*P*R*shape + s*P*R(mu + exp) + t2d --> image_poitns ...
/robotpipe-0.0.4-cp39-cp39-win_amd64.whl/heimarobot/insightface/thirdparty/face3d/morphable_model/fit.py
0.478285
0.723578
fit.py
pypi
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import scipy.io as sio from .. import mesh from . import fit from . import load class MorphabelModel(object): """docstring for MorphabelModel model: nver: number of vertices. ntri:...
/robotpipe-0.0.4-cp39-cp39-win_amd64.whl/heimarobot/insightface/thirdparty/face3d/morphable_model/morphabel_model.py
0.697918
0.307215
morphabel_model.py
pypi
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import scipy.io as sio ### --------------------------------- load BFM data def load_BFM(model_path): ''' load BFM 3DMM model Args: model_path: path to BFM model. Return...
/robotpipe-0.0.4-cp39-cp39-win_amd64.whl/heimarobot/insightface/thirdparty/face3d/morphable_model/load.py
0.748352
0.426859
load.py
pypi
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import os from skimage import io from time import time from .cython import mesh_core_cython ## TODO ## TODO: c++ version def read_obj(obj_name): ''' read mesh ''' return 0 # -----------...
/robotpipe-0.0.4-cp39-cp39-win_amd64.whl/heimarobot/insightface/thirdparty/face3d/mesh/io.py
0.558086
0.212968
io.py
pypi
import cv2 import numpy as np from skimage import transform as trans arcface_dst = np.array( [[38.2946, 51.6963], [73.5318, 51.5014], [56.0252, 71.7366], [41.5493, 92.3655], [70.7299, 92.2041]], dtype=np.float32) def estimate_norm(lmk, image_size=112,mode='arcface'): assert lmk.shape == (5, 2) a...
/robotpipe-0.0.4-cp39-cp39-win_amd64.whl/heimarobot/insightface/utils/face_align.py
0.403332
0.532547
face_align.py
pypi
import os import hashlib import requests from tqdm import tqdm def check_sha1(filename, sha1_hash): """Check whether the sha1 hash of the file content matches the expected hash. Parameters ---------- filename : str Path to the file. sha1_hash : str Expected sha1 hash in hexadecimal...
/robotpipe-0.0.4-cp39-cp39-win_amd64.whl/heimarobot/insightface/utils/download.py
0.688468
0.308946
download.py
pypi
import cv2 import math import numpy as np from skimage import transform as trans def transform(data, center, output_size, scale, rotation): scale_ratio = scale rot = float(rotation) * np.pi / 180.0 #translation = (output_size/2-center[0]*scale_ratio, output_size/2-center[1]*scale_ratio) t1 = trans.Sim...
/robotpipe-0.0.4-cp39-cp39-win_amd64.whl/heimarobot/insightface/utils/transform.py
0.442637
0.533884
transform.py
pypi
import os import os.path as osp import errno def get_model_dir(name, root='~/.insightface'): root = os.path.expanduser(root) model_dir = osp.join(root, 'models', name) return model_dir def makedirs(path): """Create directory recursively if not exists. Similar to `makedir -p`, you can skip checkin...
/robotpipe-0.0.4-cp39-cp39-win_amd64.whl/heimarobot/insightface/utils/filesystem.py
0.606964
0.164819
filesystem.py
pypi
from __future__ import division import numpy as np import cv2 import onnx import onnxruntime from ..utils import face_align __all__ = [ 'ArcFaceONNX', ] class ArcFaceONNX: def __init__(self, model_file=None, session=None): assert model_file is not None self.model_file = model_file se...
/robotpipe-0.0.4-cp39-cp39-win_amd64.whl/heimarobot/insightface/model_zoo/arcface_onnx.py
0.460046
0.15241
arcface_onnx.py
pypi
import datetime from robotpt_common_utils import math_tools NUM_DAYS_IN_A_WEEK = 7 def subtract_days(start_date, end_date): if ( not (type(start_date) == type(end_date) == datetime.date) and not (type(start_date) == type(end_date) == datetime.datetime) ): raise TypeError("Inp...
/robotpt-common-utils-0.0.8.tar.gz/robotpt-common-utils-0.0.8/robotpt_common_utils/dates.py
0.568775
0.244543
dates.py
pypi
import wpilib from adis16470 import ADIS16470_IMU, ADIS16470CalibrationTime KYAW_DEFAULT = "Z-Axis" KYAW_X_AXIS = "X-Axis" KYAW_Y_AXIS = "Y-Axis" class MyRobot(wpilib.TimedRobot): def robotInit(self): self.timer = wpilib.Timer() self.m_imu = ADIS16470_IMU() self.m_yawSelected = KYAW_...
/robotpy-adi-2021.0.0.tar.gz/robotpy-adi-2021.0.0/examples/adis16470/robot.py
0.549399
0.241814
robot.py
pypi
import importlib.util from os.path import join, dirname from pkg_resources import iter_entry_points import sys from typing import Dict, List, Optional, Set import warnings def _hacky_entrypoint_loader(module_name): # load the root parent spec pkgs = module_name.split(".") spec = importlib.util.find_spec(p...
/robotpy_build-2023.1.2-py3-none-any.whl/robotpy_build/pkgcfg_provider.py
0.579519
0.24271
pkgcfg_provider.py
pypi
from distutils.util import get_platform as _get_platform from dataclasses import dataclass, field from typing import List import re import typing # wpilib platforms at https://github.com/wpilibsuite/native-utils/blob/master/src/main/java/edu/wpi/first/nativeutils/WPINativeUtilsExtension.java @dataclass class WPILibMa...
/robotpy_build-2023.1.2-py3-none-any.whl/robotpy_build/platforms.py
0.743913
0.187393
platforms.py
pypi
from os.path import abspath, join, dirname from typing import Any, Dict, List, Optional _root = abspath(dirname(__file__)) def get_include_dirs() -> Optional[List[str]]: return [join(_root, "pybind11", "include"), join(_root, "include")] def get_library_dirs() -> Optional[List[str]]: pass def get_type_c...
/robotpy_build-2023.1.2-py3-none-any.whl/robotpy_build/pkgcfg.py
0.732209
0.229676
pkgcfg.py
pypi
import yaml from .hooks_datacfg import ( ClassData, EnumData, HooksDataYaml, PropData, FunctionData, ) from typing import Dict, Optional class GeneratorData: """ Used by the hooks to retrieve user-specified generation data, and report to the user that there is data missing """ ...
/robotpy_build-2023.1.2-py3-none-any.whl/robotpy_build/generator_data.py
0.610802
0.336522
generator_data.py
pypi
from commands1 import Command, CommandGroup, ConditionalCommand from commandbased.cancelcommand import CancelCommand import inspect __all__ = ["IF", "ELIF", "ELSE", "WHILE", "RETURN", "BREAK", "CommandFlow"] class ConditionalFlow(ConditionalCommand): def __init__(self, name, onTrue, onFalse, condition): ...
/robotpy_commands_v1-2022.4.1.0-cp37-cp37m-macosx_10_14_x86_64.whl/commandbased/flowcontrol.py
0.641647
0.157234
flowcontrol.py
pypi
import os.path import time import threading import cv2 import numpy as np import logging logger = logging.getLogger("cscore.storage") class ImageWriter: """ Creates a thread that periodically writes images to a specified directory. Useful for looking at images after a match has completed. The ...
/robotpy_cscore-2023.4.3.0-cp38-cp38-macosx_10_16_x86_64.whl/cscore/imagewriter.py
0.708112
0.275154
imagewriter.py
pypi
hal_version = "2019.4.1" wpiutil_version = "2019.4.1" frc_site = "http://first.wpi.edu/FRC/roborio/maven/release" frc_site_dev = "http://first.wpi.edu/FRC/roborio/maven/development" hal_site = "%s/edu/wpi/first/hal/hal-cpp" % frc_site wpiutil_site = "%s/edu/wpi/first/wpiutil/wpiutil-cpp" % frc_site hal_libs = "hal...
/robotpy-hal-roborio-2019.2.3.tar.gz/robotpy-hal-roborio-2019.2.3/hal_impl/distutils.py
0.411229
0.266077
distutils.py
pypi
from . import data hal_data = data.hal_data from . import functions as fns def notify_new_ds_data(): """Called when driver station data is modified""" data.hooks.notifyDSData() def set_autonomous(enabled, game_specific_message=None): """Only designed to be called on transition""" if game_specific_...
/robotpy-hal-sim-2019.2.3.tar.gz/robotpy-hal-sim-2019.2.3/hal_impl/mode_helpers.py
0.59749
0.326097
mode_helpers.py
pypi
import typing from ._pathfinder import Segment, pathfinder_modify_swerve, pathfinder_modify_tank __all__ = ["SwerveModifier", "TankModifier"] class SwerveModifier: """ The Swerve Modifier will take in a Source Trajectory and spit out 4 trajectories, 1 for each wheel on the drive. This is commonl...
/robotpy_pathfinder-0.2.6-cp35-cp35m-win_amd64.whl/pathfinder/modifiers.py
0.83508
0.515925
modifiers.py
pypi
import math import typing from ._pathfinder import ( DistanceFollower as _DistanceFollower, EncoderFollower as _EncoderFollower, EncoderConfig, FollowerConfig, Segment, pathfinder_follow_distance2, pathfinder_follow_encoder2, ) __all__ = ["DistanceFollower", "EncoderFollower"] class Dist...
/robotpy_pathfinder-0.2.6-cp35-cp35m-win_amd64.whl/pathfinder/followers.py
0.883312
0.441071
followers.py
pypi
import pickle import socket from robotpy_toolkit_7407.subsystem import Subsystem from robotpy_toolkit_7407.network.objects import RobotStatusPacket, NetworkObject from robotpy_toolkit_7407.utils import logger class Network: """ ### SCHEMA: # Robot status: - UDP status packet is sent by the robot to ...
/robotpy-toolkit-7407-0.3.2.tar.gz/robotpy-toolkit-7407-0.3.2/robotpy_toolkit_7407/network/network_system.py
0.702632
0.231337
network_system.py
pypi
from robotpy_toolkit_7407.unum import Unum unit = Unum.unit m = M = unit("m", 0, "meter") Ym = YM = unit("Ym", 10**24 * m, "yottameter") Zm = ZM = unit("Zm", 10**21 * m, "zettameter") Em = EM = unit("Em", 10**18 * m, "exameter") Pm = PM = unit("Pm", 10**15 * m, "petameter") Tm = TM = unit("Tm", 10**12 * m, "terameter"...
/robotpy-toolkit-7407-0.3.2.tar.gz/robotpy-toolkit-7407-0.3.2/robotpy_toolkit_7407/unum/units/si/base.py
0.595375
0.441131
base.py
pypi
from math import pi from robotpy_toolkit_7407.unum import Unum from robotpy_toolkit_7407.unum.units.si import * unit = Unum.unit min = MIN = unit( 'min' , 60 * s , 'minute' ) h = H = unit( 'h' , 60 * MIN , 'hour' ) d ...
/robotpy-toolkit-7407-0.3.2.tar.gz/robotpy-toolkit-7407-0.3.2/robotpy_toolkit_7407/unum/units/others/__init__.py
0.650578
0.221551
__init__.py
pypi
import math from robotpy_toolkit_7407.unum import Unum from wpimath.geometry import Rotation2d, Pose2d, Translation2d from wpimath.kinematics import SwerveDrive4Odometry, SwerveDrive4Kinematics, SwerveModuleState from robotpy_toolkit_7407.oi.joysticks import JoystickAxis from robotpy_toolkit_7407.subsystem import Sub...
/robotpy-toolkit-7407-0.3.2.tar.gz/robotpy-toolkit-7407-0.3.2/robotpy_toolkit_7407/subsystem_templates/drivetrain/swerve_drivetrain.py
0.772616
0.469338
swerve_drivetrain.py
pypi
from robotpy_toolkit_7407.unum import Unum from robotpy_toolkit_7407.command import SubsystemCommand, T from robotpy_toolkit_7407.motors.ctre_motors import talon_sensor_vel_unit from robotpy_toolkit_7407.subsystem_templates.drivetrain.differential_drivetrain import DifferentialDrivetrain from robotpy_toolkit_7407.util...
/robotpy-toolkit-7407-0.3.2.tar.gz/robotpy-toolkit-7407-0.3.2/robotpy_toolkit_7407/subsystem_templates/drivetrain/differential_drivetrain_commands.py
0.622
0.4133
differential_drivetrain_commands.py
pypi
import inspect import logging.config import os from robotpy_toolkit_7407.utils.color import Color, NoColor """ Logger utility for debugging. Example usage: utils.logger.Logger.log_info("testing") """ def get_default_logging(): return { "version": 1, "formatters": { "standard": ...
/robotpy-toolkit-7407-0.3.2.tar.gz/robotpy-toolkit-7407-0.3.2/robotpy_toolkit_7407/utils/logger.py
0.504639
0.165762
logger.py
pypi
from __future__ import annotations from dataclasses import dataclass from typing import Optional import ctre from robotpy_toolkit_7407.unum import Unum from robotpy_toolkit_7407.motor import PIDMotor from robotpy_toolkit_7407.utils.units import rad, rev, s @dataclass class TalonConfig: k_P: Optional[float] = N...
/robotpy-toolkit-7407-0.3.2.tar.gz/robotpy-toolkit-7407-0.3.2/robotpy_toolkit_7407/motors/ctre_motors.py
0.886137
0.182189
ctre_motors.py
pypi
from dataclasses import dataclass from typing import Optional from rev import CANSparkMax, SparkMaxPIDController, SparkMaxRelativeEncoder from robotpy_toolkit_7407.unum import Unum from robotpy_toolkit_7407.motor import PIDMotor from robotpy_toolkit_7407.utils.units import rev, minute @dataclass class SparkMaxConfi...
/robotpy-toolkit-7407-0.3.2.tar.gz/robotpy-toolkit-7407-0.3.2/robotpy_toolkit_7407/motors/rev_motors.py
0.894564
0.246154
rev_motors.py
pypi
import logging from typing import Any, Dict, Optional logger = logging.getLogger(__name__) class MagicInjectError(ValueError): pass def get_injection_requests( type_hints: Dict[str, type], cname: str, component: Optional[Any] = None ) -> Dict[str, type]: """ Given a dict of type hints, filter it to...
/robotpy_wpilib_utilities-2023.1.0-py3-none-any.whl/magicbot/inject.py
0.871919
0.287187
inject.py
pypi
import logging class MagicComponent: """ To automagically retrieve variables defined in your base robot object, you can add the following:: class MyComponent: # other variables 'imported' automatically from MagicRobot elevator_motor: Talon other_component: MyO...
/robotpy_wpilib_utilities-2023.1.0-py3-none-any.whl/magicbot/magiccomponent.py
0.599368
0.320163
magiccomponent.py
pypi
from functools import partial import wpilib class Toggle: """Utility class for joystick button toggle Usage:: foo = Toggle(joystick, 3) if foo: toggleFunction() if foo.on: onToggle() if foo.off: offToggle() """ class _SteadyDeb...
/robotpy_wpilib_utilities-2023.1.0-py3-none-any.whl/robotpy_ext/control/toggle.py
0.874305
0.470068
toggle.py
pypi
class Unit(object): """The class for all of the units here""" def __init__(self, base_unit, base_to_unit, unit_to_base): """ Unit constructor, used as a mechanism to convert between various measurements :param base_unit: The instance of Unit to base conversions from. If None, then assum...
/robotpy_wpilib_utilities-2023.1.0-py3-none-any.whl/robotpy_ext/common_drivers/units.py
0.932607
0.561215
units.py
pypi
import math import wpilib from wpilib.simulation import AnalogInputSim from .distance_sensors import SharpIR2Y0A02, SharpIR2Y0A21, SharpIR2Y0A41 class SharpIR2Y0A02Sim: """ An easy to use simulation interface for a Sharp GP2Y0A02YK0F """ def __init__(self, sensor: SharpIR2Y0A02) -> None: as...
/robotpy_wpilib_utilities-2023.1.0-py3-none-any.whl/robotpy_ext/common_drivers/distance_sensors_sim.py
0.823506
0.62986
distance_sensors_sim.py
pypi
import wpilib import math class SharpIR2Y0A02: """ Sharp GP2Y0A02YK0F is an analog IR sensor capable of measuring distances from 20cm to 150cm. Output distance is measured in centimeters. Distance is calculated using the following equation derived from the graph provided in the datasheet:: ...
/robotpy_wpilib_utilities-2023.1.0-py3-none-any.whl/robotpy_ext/common_drivers/distance_sensors.py
0.855263
0.73544
distance_sensors.py
pypi
import wpilib from . import driver_base from . import units class MaxSonarEZPulseWidth(driver_base.DriverBase): """ This is a driver for the MaxSonar EZ series of sonar sensors, using the pulse-width output of the sensor. To use this driver, pin 2 on the sensor must be mapped to a dio pin. """ ...
/robotpy_wpilib_utilities-2023.1.0-py3-none-any.whl/robotpy_ext/common_drivers/xl_max_sonar_ez.py
0.87724
0.501099
xl_max_sonar_ez.py
pypi
import wpilib import logging from typing import List, Tuple logger = logging.getLogger("simple_watchdog") __all__ = ["SimpleWatchdog"] class SimpleWatchdog: """A class that's a wrapper around a watchdog timer. When the timer expires, a message is printed to the console and an optional user-provided cal...
/robotpy_wpilib_utilities-2023.1.0-py3-none-any.whl/robotpy_ext/misc/simple_watchdog.py
0.908019
0.355747
simple_watchdog.py
pypi
import math kInchesPerFoot = 12.0 kMetersPerInch = 0.0254 kSecondsPerMinute = 60 kMillisecondsPerSecond = 1000 kKilogramsPerLb = 0.453592 def metersToFeet(meters: float) -> float: """Converts given meters to feet. :param meters: The meters to convert to feet. :returns: Feet converted from meters. ...
/robotpy_wpimath-2023.4.3.1-cp38-cp38-win_amd64.whl/wpimath/units.py
0.93711
0.909184
units.py
pypi
from os.path import abspath, join, dirname _root = abspath(dirname(__file__)) libinit_import = "wpimath._impl._init_wpimath_cpp" depends = ['wpiutil'] pypi_package = 'robotpy-wpimath' def get_include_dirs(): return [join(_root, "include"), join(_root, "rpy-include"), join(_root, "src"), join(_root, "src", "eigen...
/robotpy_wpimath-2023.4.3.1-cp38-cp38-win_amd64.whl/wpimath/_impl/pkgcfg.py
0.516839
0.286667
pkgcfg.py
pypi
import numpy as np import RobotRaconteur as RR from typing import NamedTuple class JointTrajectoryLimits(NamedTuple): j_max: np.array a_max: np.array v_max: np.array x_min: np.array x_max: np.array class JointTrajectoryPositionRequest(NamedTuple): current_position: np.array current_veloci...
/robotraconteur_abstract_robot-0.2.1-py3-none-any.whl/robotraconteur_abstract_robot/trapezoidal_joint_trajectory_generator.py
0.864454
0.52829
trapezoidal_joint_trajectory_generator.py
pypi
from enum import Enum import traceback from turtle import down import RobotRaconteur as RR RRN = RR.RobotRaconteurNode.s from RobotRaconteurCompanion.Util.RobotUtil import RobotUtil from RobotRaconteurCompanion.Util.DateTimeUtil import DateTimeUtil from RobotRaconteurCompanion.Util.GeometryUtil import GeometryUtil from...
/robotraconteur_abstract_robot-0.2.1-py3-none-any.whl/robotraconteur_abstract_robot/abstract_robot.py
0.876039
0.418935
abstract_robot.py
pypi
import numpy as np from scipy.interpolate import CubicSpline import RobotRaconteur as RR class JointTrajectoryInterpolator: def __init__(self, info): self._joint_names = [j.joint_identifier.name for j in info.joint_info] self._joint_min = np.array([j.joint_limits.lower for j in info.joint_info]) ...
/robotraconteur_abstract_robot-0.2.1-py3-none-any.whl/robotraconteur_abstract_robot/joint_trajectory_interpolator.py
0.815526
0.45647
joint_trajectory_interpolator.py
pypi
"""处理程序运行的各种参数.""" import os class SQLOptions(object): """处理程序运行的各种参数.""" def __init__(self): self.m_SQL_OptionList = [] self.m_SQL_OptionList.append({"Name": "WHENEVER_SQLERROR", "Value": "CONTINUE", "Comments": '', ...
/robotslacker-sqlcli-noodbc-0.0.4.tar.gz/robotslacker-sqlcli-noodbc-0.0.4/sqlcli/sqloption.py
0.42322
0.196248
sqloption.py
pypi
from collections import namedtuple __all__ = [] def export(defn): """Decorator to explicitly mark functions that are exposed in a lib.""" globals()[defn.__name__] = defn __all__.append(defn.__name__) return defn SpecialCommand = namedtuple( "SpecialCommand", [ "handler", "co...
/robotslacker-sqlcli-noodbc-0.0.4.tar.gz/robotslacker-sqlcli-noodbc-0.0.4/sqlcli/commandanalyze.py
0.691706
0.15633
commandanalyze.py
pypi
"""处理程序运行的各种参数.""" import os class SQLOptions(object): """处理程序运行的各种参数.""" def __init__(self): self.m_SQL_OptionList = [] self.m_SQL_OptionList.append({"Name": "WHENEVER_SQLERROR", "Value": "CONTINUE", "Comments": '', ...
/robotslacker-sqlcli-0.2.65.tar.gz/robotslacker-sqlcli-0.2.65/sqlcli/sqloption.py
0.42322
0.196248
sqloption.py
pypi
from collections import namedtuple __all__ = [] def export(defn): """Decorator to explicitly mark functions that are exposed in a lib.""" globals()[defn.__name__] = defn __all__.append(defn.__name__) return defn SpecialCommand = namedtuple( "SpecialCommand", [ "handler", "co...
/robotslacker-sqlcli-0.2.65.tar.gz/robotslacker-sqlcli-0.2.65/sqlcli/commandanalyze.py
0.691706
0.15633
commandanalyze.py
pypi
# Robots Exclusion Standard Parser for Python The `robotspy` Python module implements a parser for `robots.txt` files. The recommended class to use is `robots.RobotsParser`. A thin facade `robots.RobotFileParser` can also be used as a substitute for [`urllib.robotparser.RobotFileParser`](https://docs.python.org/3/li...
/robotspy-0.7.0.tar.gz/robotspy-0.7.0/README.md
0.4917
0.870212
README.md
pypi
import argparse import pathlib import sys import urllib.parse import robots def init_cli() -> argparse.ArgumentParser: """Initialize the argument parser to handle the command line interface.""" cli: argparse.ArgumentParser = argparse.ArgumentParser( usage="%(prog)s <robotstxt> <useragent> <path>", ...
/robotspy-0.7.0.tar.gz/robotspy-0.7.0/robots/__main__.py
0.517571
0.179674
__main__.py
pypi
import time from typing import List from . import parser def gen_lines(lines: List[str]): """Instantiate a generator from a list""" return (line for line in lines) class RobotFileParser(parser.RobotsParser): """Thin wrapper on RobotsParser to enable some level of compatibility with urllib.robotparse...
/robotspy-0.7.0.tar.gz/robotspy-0.7.0/robots/robotparser.py
0.820901
0.364664
robotparser.py
pypi
StatusChecker ============= .. contents:: :local: Introduction ------------ StatusChecker is a tool for validating that executed `Robot Framework`_ test cases have expected statuses and log messages. It is mainly useful for Robot Framework test library developers who want to use Robot Framework to also test their...
/robotstatuschecker-3.0.1.tar.gz/robotstatuschecker-3.0.1/README.rst
0.844473
0.692837
README.rst
pypi
Python unittest test suite for Robot Framework ============================================== This is an experimental package for wrapping Robot Framework test suites into Python unittest suites to make it possible to run Robot Framework tests as `plone.testing`_'s layered test suites: .. code:: python import un...
/robotsuite-2.3.1.tar.gz/robotsuite-2.3.1/README.rst
0.831006
0.76432
README.rst
pypi
import ast import astunparse import inspect import json import warnings from tqdm import TqdmExperimentalWarning # Filter out the TqdmExperimentalWarning warnings.filterwarnings("ignore", category=TqdmExperimentalWarning) def analyze_code(code): # Parse the code using the ast module tree = ast.parse(code) ...
/roboweb_server-0.1.42-py3-none-any.whl/roboweb_server/static/deprecated_analyzer.py
0.550124
0.270452
deprecated_analyzer.py
pypi
import ast import astunparse # Import the astunparse module import inspect import json import warnings from tqdm import TqdmExperimentalWarning # Filter out the TqdmExperimentalWarning warnings.filterwarnings("ignore", category=TqdmExperimentalWarning) requestJson = """ {{requestJson}} """ def analyze_code(code): ...
/roboweb_server-0.1.42-py3-none-any.whl/roboweb_server/static/prompt_eng.py
0.506836
0.278742
prompt_eng.py
pypi
<p align="center"><img width="70%" src="docs/source/\_static/img/parlai.png" /></p> -------------------------------------------------------------------------------- ParlAI (pronounced “par-lay”) is a framework for dialog AI research, implemented in Python. Its goal is to provide researchers: - a unified framework fo...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/README.md
0.46563
0.987735
README.md
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.worlds im...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/mturk/tasks/qualification_flow_example/worlds.py
0.688049
0.280857
worlds.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.worlds im...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/mturk/tasks/qa_data_collection/worlds.py
0.73914
0.24768
worlds.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. task_config = {} """A s...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/mturk/tasks/qa_data_collection/task_config.py
0.698124
0.568895
task_config.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. task_config = {} """A sh...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/mturk/tasks/model_evaluator/task_config.py
0.747339
0.471102
task_config.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import json import os impo...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/mturk/tasks/talkthewalk/worlds.py
0.660063
0.182098
worlds.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. task_config = {} """A sh...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/mturk/tasks/convai2_model_eval/task_config.py
0.763396
0.467028
task_config.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. task_config = {} """A sh...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/mturk/tasks/personachat/personachat_rephrase/task_config.py
0.769903
0.595022
task_config.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import pickle import os fr...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/mturk/tasks/personachat/personachat_chat/extract_and_save_personas.py
0.606382
0.151561
extract_and_save_personas.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. task_config = {} """A sh...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/mturk/tasks/personachat/personachat_chat/task_config.py
0.771069
0.527803
task_config.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. task_config = {} """A sh...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/mturk/tasks/personachat/personachat_collect_personas/task_config.py
0.766206
0.41834
task_config.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. task_config = {} """A sh...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/mturk/tasks/dealnodeal/task_config.py
0.549157
0.337859
task_config.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.worlds im...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/messenger/tasks/qa_data_collection/worlds.py
0.751511
0.381191
worlds.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import json import logging...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/messenger/core/message_sender.py
0.512205
0.290515
message_sender.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """This file contains a li...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/task_list.py
0.889271
0.416322
task_list.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.teachers...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/vqa_v2/agents.py
0.743075
0.167117
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # Download and build the d...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/mctest/build.py
0.626467
0.205097
build.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """This is a simple quest...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/mnist_qa/agents.py
0.833562
0.447762
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.teachers...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/cornell_movie/agents.py
0.712432
0.206514
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # Download and build the d...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/cornell_movie/build.py
0.654784
0.177383
build.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # Download and build the d...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/insuranceqa/build.py
0.681833
0.237698
build.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # Download and build the d...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/webquestions/build.py
0.674801
0.174692
build.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import os import json from...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/personality_captions/download_images.py
0.634204
0.242789
download_images.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # Download and build the d...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/qadailymail/build.py
0.631367
0.156266
build.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Teachers for the MovieD...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/moviedialog/agents.py
0.734024
0.285908
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.teachers...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/babi/agents.py
0.700178
0.18969
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.teachers...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/narrative_qa/agents.py
0.615203
0.166438
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # Download and build the d...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/opensubtitles/build_2018.py
0.613352
0.358269
build_2018.py
pypi