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
# Creating and deploying a bot with Robo AI's Bot Manager Tool This tutorial intends to give you an overview of how to create and deploy a simple Rasa chatbot using Robo AI's Bot Manager Command Line Tool. For any doubts you might have, please refer to our [README](../README.md) and if you cannot find the answer to yo...
/robo-bot-0.1.3.1.tar.gz/robo-bot-0.1.3/docs/create_deploy_bot.md
0.477067
0.977586
create_deploy_bot.md
pypi
import os import logging from typing import Any, Dict, Optional, Text from rasa.nlu import utils from rasa.nlu.classifiers.classifier import IntentClassifier from rasa.nlu.constants import INTENT from rasa.utils.common import raise_warning from rasa.nlu.config import RasaNLUModelConfig from rasa.nlu.training_data impo...
/robo-bot-0.1.3.1.tar.gz/robo-bot-0.1.3/robo_bot_cli/initial_structure/initial_project/custom/components/exact_match_classifier/exact_match_classifier.py
0.787605
0.227351
exact_match_classifier.py
pypi
import math import os from os.path import dirname, isfile, join from shutil import copyfile import click import pkg_resources from questionary import Choice, prompt from robo_ai.model.assistant.assistant import Assistant from robo_ai.model.assistant.assistant_list_response import ( AssistantListResponse, ) from r...
/robo-bot-0.1.3.1.tar.gz/robo-bot-0.1.3/robo_bot_cli/commands/connect.py
0.489259
0.153042
connect.py
pypi
import gym from gym import error, spaces, utils from gym.utils import seeding import os import pybullet as p import pybullet_data import math import numpy as np import random class PandaEnv(gym.Env): metadata = {'render.modes': ['human']} def __init__(self): p.connect(p.GUI) p.resetDebugVisua...
/robo_env-0.0.1.tar.gz/robo_env-0.0.1/robo_env/envs/robo_env.py
0.537284
0.327534
robo_env.py
pypi
import numpy as np import yaml import os import copy class UR(): """Universal Robots utilities class. Attributes: max_joint_positions (np.array): Maximum joint position values (rad)`. min_joint_positions (np.array): Minimum joint position values (rad)`. max_joint_velocities (np.arra...
/robo-gym-1.0.0.tar.gz/robo-gym-1.0.0/robo_gym/utils/ur_utils.py
0.874158
0.611672
ur_utils.py
pypi
import math import numpy as np from scipy.spatial.transform import Rotation as R def normalize_angle_rad(a): """Normalize angle (in radians) to +-pi Args: a (float): Angle (rad). Returns: float: Normalized angle (rad). """ return (a + math.pi) % (2 * math.pi) - math.pi def poi...
/robo-gym-1.0.0.tar.gz/robo-gym-1.0.0/robo_gym/utils/utils.py
0.928757
0.887156
utils.py
pypi
import sys, time, math, copy import numpy as np import gym from gym import spaces, logger from gym.utils import seeding from robo_gym.utils import utils, mir100_utils from robo_gym.utils.exceptions import InvalidStateError, RobotServerError import robo_gym_server_modules.robot_server.client as rs_client from robo_gym....
/robo-gym-1.0.0.tar.gz/robo-gym-1.0.0/robo_gym/envs/mir100/mir100.py
0.749454
0.431165
mir100.py
pypi
import os, copy, json import numpy as np import gym from typing import Tuple from robo_gym_server_modules.robot_server.grpc_msgs.python import robot_server_pb2 from robo_gym.envs.simulation_wrapper import Simulation from robo_gym.envs.ur.ur_base_avoidance_env import URBaseAvoidanceEnv DEBUG = True MINIMUM_DISTANCE = 0...
/robo-gym-1.0.0.tar.gz/robo-gym-1.0.0/robo_gym/envs/ur/ur_avoidance_iros.py
0.880206
0.35502
ur_avoidance_iros.py
pypi
import copy import numpy as np import gym from typing import Tuple from robo_gym.utils import ur_utils from robo_gym.utils.exceptions import InvalidStateError, RobotServerError, InvalidActionError import robo_gym_server_modules.robot_server.client as rs_client from robo_gym_server_modules.robot_server.grpc_msgs.python ...
/robo-gym-1.0.0.tar.gz/robo-gym-1.0.0/robo_gym/envs/ur/ur_base_env.py
0.818302
0.323768
ur_base_env.py
pypi
import numpy as np from typing import Tuple from robo_gym_server_modules.robot_server.grpc_msgs.python import robot_server_pb2 from robo_gym.envs.simulation_wrapper import Simulation from robo_gym.envs.ur.ur_base_avoidance_env import URBaseAvoidanceEnv # base, shoulder, elbow, wrist_1, wrist_2, wrist_3 JOINT_POSITIONS...
/robo-gym-1.0.0.tar.gz/robo-gym-1.0.0/robo_gym/envs/ur/ur_avoidance_basic.py
0.857291
0.420302
ur_avoidance_basic.py
pypi
[![License: MIT](https://img.shields.io/badge/License-MIT-pink.svg)](https://opensource.org/licenses/MIT) # ROBO.AI Bot Runtime manager CLI tool # <img align="right" width="200" height="200" alt="robo-bot" src="robo-bot.png"></img> This tool allows anyone to create, train, deploy, monitor and manage a Rasa based bot ...
/roboai_cli-1.1.2-py3-none-any.whl/README.md
0.486088
0.931213
README.md
pypi
import os import logging from typing import Any, Dict, Optional, Text from rasa.nlu import utils from rasa.nlu.classifiers.classifier import IntentClassifier from rasa.nlu.constants import INTENT from rasa.utils.common import raise_warning from rasa.nlu.config import RasaNLUModelConfig from rasa.nlu.training_data impo...
/roboai_cli-1.1.2-py3-none-any.whl/roboai_cli/initial_structure/initial_project/custom/components/exact_match_classifier/exact_match_classifier.py
0.787605
0.227351
exact_match_classifier.py
pypi
from requests import get, post from typing import Any, Text, Dict, List from rasa_sdk import Action, Tracker from rasa_sdk.events import SlotSet from rasa_sdk.executor import CollectingDispatcher class ParlaiAPI: def create_world(self): url = "http://158.177.139.34:8081/create_world" world_id = g...
/roboai_cli-1.1.2-py3-none-any.whl/roboai_cli/initial_structure/initial_project/actions/action_parlai_fallback.py
0.50293
0.161883
action_parlai_fallback.py
pypi
from os.path import join import subprocess import sys import click from roboai_cli.util.cli import print_info def get_index(lista: list, value: str) -> int: """ Get the list index of a given value if it exists. Args: lista (list): list to get the index from value (str): value to search ...
/roboai_cli-1.1.2-py3-none-any.whl/roboai_cli/util/helpers.py
0.42656
0.321274
helpers.py
pypi
import click import os from os.path import join, abspath from datetime import datetime from roboai_cli.util.cli import print_info from roboai_cli.util.helpers import check_installed_packages @click.command(name="train", help="Train Rasa models for the required bots.") @click.argument("languages", nargs=-1,) @click.o...
/roboai_cli-1.1.2-py3-none-any.whl/roboai_cli/commands/train.py
0.464173
0.187411
train.py
pypi
import json from os import listdir, system from os.path import abspath, join, exists, isdir, basename import tempfile import shutil import yaml import ast import click import pandas as pd from roboai_cli.util.cli import print_info @click.command(name="data", help="Utility command to split, export and import data.")...
/roboai_cli-1.1.2-py3-none-any.whl/roboai_cli/commands/data.py
0.449634
0.205037
data.py
pypi
import math import os from os.path import dirname, isfile, join from shutil import copyfile import click import pkg_resources from questionary import Choice, prompt from robo_ai.model.assistant.assistant import Assistant from robo_ai.model.assistant.assistant_list_response import ( AssistantListResponse, ) from r...
/roboai_cli-1.1.2-py3-none-any.whl/roboai_cli/commands/connect.py
0.483648
0.150684
connect.py
pypi
import numpy import math class Quaternion: def __init__(self, scalar: float = 1.0, vector=None): if vector is None: vector = [1, 1, 1] self._scalar = round(scalar, 3) self._vector = numpy.array(vector) @classmethod def fromAngleAndVector(cls, angle: float = 0.0, v=None...
/robobase_package-1.0.0-py3-none-any.whl/robobase/quaternion.py
0.908594
0.557303
quaternion.py
pypi
class Point: def __init__(self, coords=None): if coords is None: coords = [0, 0] self.x = coords[0] self.y = coords[1] def coord(self): return [self.x, self.y] class Triangle: def __init__(self, points=None): if points is None: points = [P...
/robobase_package-1.0.0-py3-none-any.whl/robobase/trianglealg.py
0.878497
0.389779
trianglealg.py
pypi
import re import requests from bs4 import BeautifulSoup from werkzeug.utils import cached_property from requests.packages.urllib3.util.retry import Retry from robobrowser import helpers from robobrowser import exceptions from robobrowser.compat import urlparse from robobrowser.forms.form import Form from robobrowser.c...
/robobro-0.5.3-py3-none-any.whl/robobrowser/browser.py
0.793986
0.187486
browser.py
pypi
import re from bs4 import BeautifulSoup from bs4.element import Tag from robobrowser.compat import string_types, iteritems def match_text(text, tag): if isinstance(text, string_types): return text in tag.text if isinstance(text, re._pattern_type): return text.search(tag.text) def find_all(...
/robobro-0.5.3-py3-none-any.whl/robobrowser/helpers.py
0.631367
0.159087
helpers.py
pypi
import re import collections from werkzeug.datastructures import OrderedMultiDict from robobrowser.compat import iteritems, encode_if_py2 from . import fields from .. import helpers from .. import exceptions _tags = ['input', 'textarea', 'select'] _tag_ptn = re.compile( '|'.join(_tags), re.I ) def _group_...
/robobro-0.5.3-py3-none-any.whl/robobrowser/forms/form.py
0.711932
0.316369
form.py
pypi
import re import requests import urllib.parse from bs4 import BeautifulSoup from werkzeug.utils import cached_property from requests.packages.urllib3.util.retry import Retry from robobrowser import helpers from robobrowser import exceptions from robobrowser.forms.form import Form from robobrowser.cache import RoboHTTP...
/robobrowser-jmr-0.5.4a1.tar.gz/robobrowser-jmr-0.5.4a1/robobrowser/browser.py
0.779909
0.165222
browser.py
pypi
import re from bs4 import BeautifulSoup from bs4.element import Tag def find_all(soup, name=None, attrs=None, recursive=True, text=None, limit=None, **kwargs): """The `find` and `find_all` methods of `BeautifulSoup` don't handle the `text` parameter combined with other parameters. This is neces...
/robobrowser-jmr-0.5.4a1.tar.gz/robobrowser-jmr-0.5.4a1/robobrowser/helpers.py
0.64512
0.150372
helpers.py
pypi
import re import collections from werkzeug.datastructures import OrderedMultiDict from . import fields from .. import helpers from .. import exceptions _tags = ['input', 'textarea', 'select'] _tag_ptn = re.compile( '|'.join(_tags), re.I ) def _group_flat_tags(tag, tags): """Extract tags sharing the sam...
/robobrowser-jmr-0.5.4a1.tar.gz/robobrowser-jmr-0.5.4a1/robobrowser/forms/form.py
0.734215
0.322446
form.py
pypi
import re from bs4 import BeautifulSoup from bs4.element import Tag from robobrowser.compat import string_types, iteritems def match_text(text, tag): if isinstance(text, string_types): return text in tag.text if isinstance(text, re.Pattern): return text.search(tag.text) def find_all(soup, ...
/robobrowserdash-0.6.1.tar.gz/robobrowserdash-0.6.1/robobrowser/helpers.py
0.633183
0.15961
helpers.py
pypi
import re import collections from werkzeug.datastructures import OrderedMultiDict from robobrowser.compat import iteritems, encode_if_py2 from . import fields from .. import helpers from .. import exceptions _tags = ['input', 'textarea', 'select'] _tag_ptn = re.compile( '|'.join(_tags), re.I ) def _group_...
/robobrowserdash-0.6.1.tar.gz/robobrowserdash-0.6.1/robobrowser/forms/form.py
0.711932
0.316369
form.py
pypi
from typing import List import cv2 import numpy as np class ShuffleVariable(object): FLOAT_TYPE: str = "float" STRING_TYPE: str = "string" BIG_STRING_TYPE: str = "bigstring" BOOL_TYPE: str = "bool" CHART_TYPE: str = "chart" SLIDER_TYPE: str = "slider" IN_VAR: str = "in" OUT_VAR: str =...
/robocad-py-0.0.2.1.tar.gz/robocad-py-0.0.2.1/robocad/shufflecad/shared.py
0.813831
0.299272
shared.py
pypi
import multiprocessing import argparse from itertools import chain from datasets import load_dataset from transformers import AutoTokenizer class CFG: SEED: int = 42 SEQ_LEN: int = 8192 # context length make it larger or smaller depending on your task NUM_CPU: int = multiprocessing.cpu_count() HF_ACCOU...
/robocat-0.0.2-py3-none-any.whl/roboCAT/tokenize.py
0.440229
0.203708
tokenize.py
pypi
import os import sys from typing import Callable, Dict, Iterator, List, Optional, Union from playwright.sync_api import ( Browser, BrowserContext, BrowserType, Error, Page, Playwright, sync_playwright, ) from robocorp.tasks import session_cache, task_cache from ._browser_engines import ( ...
/robocorp_browser-2.1.0.tar.gz/robocorp_browser-2.1.0/src/robocorp/browser/_browser_context.py
0.671147
0.164181
_browser_context.py
pypi
from typing import Literal, Optional, Union from playwright.sync_api import ( Browser, BrowserContext, ElementHandle, Locator, Page, Playwright, ) from ._browser_engines import BrowserEngine __version__ = "2.1.0" version_info = [int(x) for x in __version__.split(".")] def configure(**kwargs...
/robocorp_browser-2.1.0.tar.gz/robocorp_browser-2.1.0/src/robocorp/browser/__init__.py
0.940237
0.569254
__init__.py
pypi
from typing import List from logging import getLogger log = getLogger(__name__) class _ArgDispatcher: def __init__(self): self._name_to_func = {} self.argparser = self._create_argparser() def _dispatch(self, parsed) -> int: if not parsed.command: self.argparser.print_help...
/robocorp_core-0.1.3.tar.gz/robocorp_core-0.1.3/src/robo/_argdispatch.py
0.588653
0.195095
_argdispatch.py
pypi
from pathlib import Path from typing import Tuple import json import os import sys import traceback from ._argdispatch import arg_dispatch # Note: the args must match the 'dest' on the configured argparser. @arg_dispatch.register(name="list") def list_tasks( path: str, ) -> int: """ Prints the tasks ava...
/robocorp_core-0.1.3.tar.gz/robocorp_core-0.1.3/src/robo/cli.py
0.62601
0.228049
cli.py
pypi
from contextlib import contextmanager from pathlib import Path from typing import Optional, Sequence, Union, List, Any from ._protocols import ITask import typing if typing.TYPE_CHECKING: from robo_log import Filter # @UnusedImport def read_filters_from_pyproject_toml(context, path: Path) -> List["Filter"]: ...
/robocorp_core-0.1.3.tar.gz/robocorp_core-0.1.3/src/robo/_log_auto_setup.py
0.75401
0.175609
_log_auto_setup.py
pypi
import json import logging import os import sys from pathlib import Path from typing import Any, List, Optional import webview # type: ignore from robocorp_dialog.bridge import Bridge # type: ignore LOGGER = logging.getLogger(__name__) def static() -> str: # NB: pywebview uses sys.argv[0] as base base = P...
/robocorp-dialog-0.5.3.tar.gz/robocorp-dialog-0.5.3/robocorp_dialog/dialog.py
0.546738
0.169922
dialog.py
pypi
from typing import TYPE_CHECKING, Any, List, Optional, Union from PIL import Image from typing_extensions import deprecated from robocorp.excel._types import PathType from robocorp.excel.tables import Table, Tables if TYPE_CHECKING: from robocorp.excel.workbook import Workbook class Worksheet: """Common cl...
/robocorp_excel-0.4.0.tar.gz/robocorp_excel-0.4.0/src/robocorp/excel/worksheet.py
0.711431
0.328637
worksheet.py
pypi
import copy import csv import logging import re from collections import OrderedDict, namedtuple from enum import Enum from itertools import groupby, zip_longest from keyword import iskeyword from numbers import Number from operator import itemgetter from typing import (Any, Callable, Dict, Generator, Iterable, List, Na...
/robocorp_excel-0.4.0.tar.gz/robocorp_excel-0.4.0/src/robocorp/excel/tables.py
0.856632
0.364042
tables.py
pypi
from typing import Literal, Optional from robocorp.excel._types import PathType from robocorp.excel._workbooks import XlsWorkbook, XlsxWorkbook, _load_workbook from robocorp.excel.workbook import Workbook def create_workbook( fmt: Literal["xlsx", "xls"] = "xlsx", sheet_name: Optional[str] = None, ) -> Workbo...
/robocorp_excel-0.4.0.tar.gz/robocorp_excel-0.4.0/src/robocorp/excel/excel.py
0.82251
0.405625
excel.py
pypi
import re from pathlib import Path from typing import Optional, Union from urllib.parse import unquote, urlparse import requests PathLike = Union[str, Path] CHUNK_SIZE = 32768 def download( url: str, path: Optional[PathLike] = None, overwrite: bool = False, ) -> Path: """Download a file from the gi...
/robocorp_http-0.4.0-py3-none-any.whl/robocorp/http/_http.py
0.765593
0.222573
_http.py
pypi
import sys from typing import List, Optional, Union from selenium.common.exceptions import ( # type: ignore JavascriptException, TimeoutException, ) from selenium.webdriver.support.ui import WebDriverWait # type: ignore from typing_extensions import Literal, TypedDict from inspector_commons.bridge.bridge_br...
/robocorp_inspector_commons-0.10.2-py3-none-any.whl/inspector_commons/bridge/bridge_recorder.py
0.683525
0.196344
bridge_recorder.py
pypi
import os import sys from pathlib import Path from typing import Optional import pytest from robocorp import log from robocorp.log.protocols import Status from robocorp.log.pyproject_config import ( PyProjectInfo, read_pyproject_toml, read_robocorp_auto_log_config, ) from robocorp.log.redirect import setup...
/robocorp_log_pytest-0.0.1.tar.gz/robocorp_log_pytest-0.0.1/src/robocorp/log_pytest/__init__.py
0.576184
0.198666
__init__.py
pypi
import logging import os.path import platform import sys import threading from typing import Dict, List, Optional, Sequence log = logging.getLogger(__name__) def normcase(s, NORMCASE_CACHE={}): try: return NORMCASE_CACHE[s] except Exception: normalized = NORMCASE_CACHE[s] = s.lower() ...
/robocorp_log-2.7.0-py3-none-any.whl/robocorp/log/_rewrite_filtering.py
0.547222
0.192805
_rewrite_filtering.py
pypi
from dataclasses import dataclass from pathlib import Path from typing import Any, List, Optional from robocorp import log from robocorp.log.protocols import IContextErrorReport @dataclass class PyProjectInfo: pyproject: Path toml_contents: dict def read_pyproject_toml(path: Path) -> Optional[PyProjectInfo...
/robocorp_log-2.7.0-py3-none-any.whl/robocorp/log/pyproject_config.py
0.861203
0.255727
pyproject_config.py
pypi
import datetime import json from logging import getLogger from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple from .protocols import IReadLines # Whenever the decoding changes we should bump up this version. # 0.0.4: accepting continue/break elements DOC_VERSION = "0.0.4" # name, libname, source,...
/robocorp_log-2.7.0-py3-none-any.whl/robocorp/log/_decoder.py
0.795618
0.184088
_decoder.py
pypi
import os.path import sys import platform import logging from typing import Sequence, Optional, List, Dict import threading log = logging.getLogger(__name__) def normcase(s, NORMCASE_CACHE={}): try: return NORMCASE_CACHE[s] except: normalized = NORMCASE_CACHE[s] = s.lower() return no...
/robocorp_logging-0.0.9.tar.gz/robocorp_logging-0.0.9/src/robo_log/_rewrite_filtering.py
0.580709
0.189053
_rewrite_filtering.py
pypi
import ast from functools import partial import itertools import sys from typing import ( Iterator, Optional, List, Tuple, Generic, TypeVar, ) import typing import ast as ast_module class _NodesProviderVisitor(ast_module.NodeVisitor): def __init__(self, on_node=lambda node: None): ...
/robocorp_logging-0.0.9.tar.gz/robocorp_logging-0.0.9/src/robo_log/_ast_utils.py
0.49292
0.187263
_ast_utils.py
pypi
from typing import Optional, Sequence, Dict from collections import namedtuple import enum import robo_log _ROBO_LOG_MODULE_NAME = robo_log.__name__ # Examples: # Filter("mymodule.ignore", kind="exclude") # Filter("mymodule.rpa", kind="full_log") # Filter("RPA", kind="log_on_project_call") Filter = namedtuple("Filter...
/robocorp_logging-0.0.9.tar.gz/robocorp_logging-0.0.9/src/robo_log/_config.py
0.894156
0.273933
_config.py
pypi
import json import logging import mimetypes import os from functools import lru_cache from pathlib import Path from typing import TYPE_CHECKING, Optional, Union from ._client import AssetNotFound, AssetUploadFailed if TYPE_CHECKING: from ._client import AssetsClient from ._requests import Response __version_...
/robocorp_storage-0.3.2-py3-none-any.whl/robocorp/storage/__init__.py
0.881405
0.157979
__init__.py
pypi
import typing from pathlib import Path from types import TracebackType from typing import Any, Callable, Optional, Sequence, Set, TypeVar, Union ExcInfo = tuple[type[BaseException], BaseException, TracebackType] OptExcInfo = Union[ExcInfo, tuple[None, None, None]] T = TypeVar("T") Y = TypeVar("Y", covariant=True) ...
/robocorp_tasks-2.1.3-py3-none-any.whl/robocorp/tasks/_protocols.py
0.833866
0.224778
_protocols.py
pypi
import json import os import sys import threading import traceback from pathlib import Path from typing import List, Sequence, Union from ._argdispatch import arg_dispatch as _arg_dispatch # Note: the args must match the 'dest' on the configured argparser. @_arg_dispatch.register(name="list") def list_tasks( pat...
/robocorp_tasks-2.1.3-py3-none-any.whl/robocorp/tasks/_commands.py
0.641535
0.209187
_commands.py
pypi
from logging import getLogger from typing import List log = getLogger(__name__) class _ArgDispatcher: def __init__(self): self._name_to_func = {} self.argparser = self._create_argparser() def _dispatch(self, parsed) -> int: if not parsed.command: self.argparser.print_help...
/robocorp_tasks-2.1.3-py3-none-any.whl/robocorp/tasks/_argdispatch.py
0.837487
0.195748
_argdispatch.py
pypi
from pathlib import Path from typing import Optional from ._protocols import ITask __version__ = "2.1.3" version_info = [int(x) for x in __version__.split(".")] def task(func): """ Decorator for tasks (entry points) which can be executed by `robocorp.tasks`. i.e.: If a file such as tasks.py has th...
/robocorp_tasks-2.1.3-py3-none-any.whl/robocorp/tasks/__init__.py
0.891793
0.478773
__init__.py
pypi
from pathlib import Path from typing import Optional, Sequence class RunConfig: def __init__( self, output_dir: Path, path: Path, task_names: Sequence[str], max_log_files: int, max_log_file_size: str, console_colors: str, log_output_to_stdout: str, ...
/robocorp_tasks-2.1.3-py3-none-any.whl/robocorp/tasks/_config.py
0.859413
0.236797
_config.py
pypi
import base64 import binascii import copy import json import logging import os from abc import ABCMeta, abstractmethod from typing import Callable, Tuple from cryptography.exceptions import InvalidTag from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes, serializat...
/robocorp_vault-1.2.0-py3-none-any.whl/robocorp/vault/_adapters.py
0.896458
0.167729
_adapters.py
pypi
from contextlib import nullcontext from functools import lru_cache from typing import Any from ._errors import RobocorpVaultError from ._secrets import SecretContainer __version__ = "1.2.0" version_info = [int(x) for x in __version__.split(".")] @lru_cache def _get_vault(): from ._vault import Vault return...
/robocorp_vault-1.2.0-py3-none-any.whl/robocorp/vault/__init__.py
0.89278
0.370709
__init__.py
pypi
import logging from typing import Callable, Optional, Union, cast from robocorp.tasks import get_current_task, task_cache from ._adapters import BaseAdapter, FileAdapter, RobocorpAdapter from ._context import Context from ._exceptions import ( ApplicationException, BusinessException, EmptyQueue, to_ex...
/robocorp_workitems-1.3.2.tar.gz/robocorp_workitems-1.3.2/src/robocorp/workitems/__init__.py
0.89317
0.23824
__init__.py
pypi
import importlib import json import os from pathlib import Path from typing import Any, Optional from ._types import JSONType # Sentinel value for undefined argument UNDEFINED = object() def required_env(name: str, default: Any = UNDEFINED) -> str: """Load required environment variable. Args: name:...
/robocorp_workitems-1.3.2.tar.gz/robocorp_workitems-1.3.2/src/robocorp/workitems/_utils.py
0.643665
0.186984
_utils.py
pypi
import json import logging import os from pathlib import Path from typing import Any, Literal, Optional, Union from robocorp.workitems._exceptions import EmptyQueue from robocorp.workitems._types import State from robocorp.workitems._utils import JSONType, json_dumps, resolve_path from ._base import BaseAdapter Sour...
/robocorp_workitems-1.3.2.tar.gz/robocorp_workitems-1.3.2/src/robocorp/workitems/_adapters/_file.py
0.799247
0.175927
_file.py
pypi
from ev3dev2.button import Button from ev3dev2.sound import Sound from ev3dev2.led import Leds from ev3dev2.motor import SpeedPercent from math import sin, cos, tan # ev3dev API Reference: # https://ev3dev-lang.readthedocs.io/projects/python-ev3dev/en/stable/spec.html # # RoboCup Module Example # ExampleProject() ...
/robocup_tools-0.0.1-py3-none-any.whl/RoboCup/__init__.py
0.620277
0.356167
__init__.py
pypi
# Roboflow Python --- ![roboflow logo](https://media.roboflow.com/homepage/cv_pipeline_compact.png?updatedAt=1679939317160) <div align="center"> <a href="https://youtube.com/roboflow"> <img src="https://media.roboflow.com/notebooks/template/icons/purple/youtube.png?ik-sdk-version=javasc...
/roboflow-1.1.4.tar.gz/roboflow-1.1.4/README.md
0.552781
0.906777
README.md
pypi
import base64 import io import os import requests import urllib from PIL import Image import json from roboflow.config import OBJECT_DETECTION_MODEL from roboflow.util.prediction import PredictionGroup from roboflow.util.image_utils import check_image_url class ObjectDetectionModel: def __init__(self, api_key,...
/roboflowtest-0.0.2-py3-none-any.whl/roboflow/models/object_detection.py
0.673729
0.327561
object_detection.py
pypi
from typing import Literal import torch import torch.nn.functional as F from torch import Tensor, nn from roboformer.models.opt.model import OPT SamplingMode = Literal["multinomial", "greedy", "nucleus"] def sample_step(next_logits: Tensor, mode: str, nucleus_prob: float) -> Tensor: """Does a single sampling s...
/models/opt/sampling.py
0.950227
0.594728
sampling.py
pypi
import os import re import urllib from pathlib import Path from typing import Iterator USER_AGENT = "minopt" def _get_model_dir() -> Path: model_dir_env = os.environ.get("MODEL_DIR_NAME", "MODEL_DIR") if model_dir_env in os.environ: return Path(os.environ["MODEL_DIR"]) raise KeyError( "In...
/models/opt/utils.py
0.755997
0.240618
utils.py
pypi
from enum import Flag from polymetis import GripperInterface from mj_envs.robot.hardware_base import hardwareBase import numpy as np import argparse import time class Robotiq(hardwareBase): def __init__(self, name, ip_address, **kwargs): self.name = name self.ip_address = ip_address self.r...
/robohive-0.3.0-py3-none-any.whl/mj_envs/robot/hardware_robotiq.py
0.606498
0.177526
hardware_robotiq.py
pypi
DESC = ''' Helper script to record/examine a rollout's openloop effects (render/ playback/ recover) on an environment\n > Examine options:\n - Record: Record an execution. (Useful for kinesthetic demonstrations on hardware)\n - Render: Render back the execution. (sim.forward)\n - Playback: Playback th...
/robohive-0.3.0-py3-none-any.whl/mj_envs/utils/examine_rollout.py
0.526586
0.222415
examine_rollout.py
pypi
import numpy as np # For testing whether a number is close to zero _FLOAT_EPS = np.finfo(np.float64).eps _EPS4 = _FLOAT_EPS * 4.0 def mulQuat(qa, qb): res = np.zeros(4) res[0] = qa[0]*qb[0] - qa[1]*qb[1] - qa[2]*qb[2] - qa[3]*qb[3] res[1] = qa[0]*qb[1] + qa[1]*qb[0] + qa[2]*qb[3] - qa[3]*qb[2] res[2] ...
/robohive-0.3.0-py3-none-any.whl/mj_envs/utils/quat_math.py
0.615203
0.782746
quat_math.py
pypi
import numpy as np import os import glob import pickle import h5py import skvideo.io from PIL import Image import click from mj_envs.utils.dict_utils import flatten_dict, dict_numpify import json # Useful to check the horizon for teleOp / Hardware experiments def plot_horizon(paths, env, fileName_prefix=None): im...
/robohive-0.3.0-py3-none-any.whl/mj_envs/utils/paths_utils.py
0.542621
0.30252
paths_utils.py
pypi
DESC = """ TUTORIAL: Calculate min jerk trajectory using IK \n - NOTE: written for franka_busbin_v0.xml model and might not be too generic EXAMPLE:\n - python tutorials/ik_minjerk_trajectory.py --sim_path envs/arms/franka/assets/franka_busbin_v0.xml\n """ from mujoco_py import load_model_from_path, MjSim, MjVi...
/robohive-0.3.0-py3-none-any.whl/mj_envs/tutorials/ik_minjerk_trajectory.py
0.561936
0.396594
ik_minjerk_trajectory.py
pypi
DESC = ''' Tutorial: Demonstrate how to use the RoboHive's Robot class in isolation. This usecase is common in scenarios where the entire env definitions aren't required for experiments. In this tutorial we demonstate how we can use the RoboHive's Franka Robot in the real world using specifications available in a hardw...
/robohive-0.3.0-py3-none-any.whl/mj_envs/tutorials/examine_robot.py
0.663451
0.6488
examine_robot.py
pypi
import gym from gym.envs.registration import register import collections from copy import deepcopy from flatten_dict import flatten, unflatten # Update base_dict using update_dict def update_dict(base_dict:dict, update_dict:dict, override_keys:list=None): """ Update a dict using another dict. INPUTS: ...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/env_variants.py
0.748812
0.288281
env_variants.py
pypi
import collections import gym import numpy as np from mj_envs.envs.myo.base_v0 import BaseV0 class ReachEnvV0(BaseV0): DEFAULT_OBS_KEYS = ['qpos', 'qvel', 'tip_pos', 'reach_err'] DEFAULT_RWD_KEYS_AND_WEIGHTS = { "reach": 1.0, "bonus": 4.0, "penalty": 50, } def __init__(self...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/myo/reach_v0.py
0.516108
0.307715
reach_v0.py
pypi
import collections import numpy as np import gym from mj_envs.envs.myo.base_v0 import BaseV0 from mj_envs.envs.env_base import get_sim from mj_envs.utils.quat_math import euler2quat from mj_envs.utils.vector_math import calculate_cosine from os import sendfile class PenTwirlFixedEnvV0(BaseV0): DEFAULT_OBS_KEYS =...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/myo/pen_v0.py
0.587588
0.270118
pen_v0.py
pypi
import collections import numpy as np import gym from mj_envs.envs.myo.base_v0 import BaseV0 from mj_envs.utils.quat_math import mat2euler, euler2quat class ReorientEnvV0(BaseV0): DEFAULT_OBS_KEYS = ['hand_qpos', 'hand_qvel', 'obj_pos', 'goal_pos', 'pos_err', 'obj_rot', 'goal_rot', 'rot_err'] DEFAULT_RWD_KEY...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/myo/reorient_v0.py
0.638159
0.398319
reorient_v0.py
pypi
import collections import numpy as np import gym from mj_envs.envs.myo.base_v0 import BaseV0 class KeyTurnEnvV0(BaseV0): DEFAULT_OBS_KEYS = ['hand_qpos', 'hand_qvel', 'key_qpos', 'key_qvel', 'IFtip_approach', 'THtip_approach'] DEFAULT_RWD_KEYS_AND_WEIGHTS= { 'key_turn':1.0, 'IFtip_approach':...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/myo/key_turn_v0.py
0.659295
0.24701
key_turn_v0.py
pypi
import collections import numpy as np import gym from mj_envs.envs.myo.base_v0 import BaseV0 class ObjHoldFixedEnvV0(BaseV0): DEFAULT_OBS_KEYS = ['hand_qpos', 'hand_qvel', 'obj_pos', 'obj_err'] DEFAULT_RWD_KEYS_AND_WEIGHTS = { "goal_dist": 100.0, "bonus": 4.0, "penalty": 10, } ...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/myo/obj_hold_v0.py
0.61855
0.305639
obj_hold_v0.py
pypi
import collections import gym import numpy as np from mj_envs.envs.myo.base_v0 import BaseV0 from mj_envs.envs.env_base import get_sim class PoseEnvV0(BaseV0): DEFAULT_OBS_KEYS = ['qpos', 'qvel', 'pose_err'] DEFAULT_RWD_KEYS_AND_WEIGHTS = { "pose": 1.0, "bonus": 4.0, "act_reg": 1.0, ...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/myo/pose_v0.py
0.68721
0.24899
pose_v0.py
pypi
import collections from traceback import print_tb import numpy as np import gym from mj_envs.envs.myo.base_v0 import BaseV0 from mj_envs.utils.quat_math import mat2euler, euler2quat class ReorientEnvV0(BaseV0): DEFAULT_OBS_KEYS = ['hand_qpos', 'hand_qvel', 'obj_pos', 'goal_pos', 'pos_err', 'obj_rot', 'goal_rot',...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/myo/myochallenge/reorient_v0.py
0.581303
0.284065
reorient_v0.py
pypi
from gym.envs.registration import register import os curr_dir = os.path.dirname(os.path.abspath(__file__)) import numpy as np # MyoChallenge Die: Trial env register(id='myoChallengeDieReorientDemo-v0', entry_point='mj_envs.envs.myo.myochallenge.reorient_v0:ReorientEnvV0', max_episode_steps=150, ...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/myo/myochallenge/__init__.py
0.500977
0.162247
__init__.py
pypi
import collections import gym import numpy as np from mj_envs.utils.quat_math import euler2quat from mj_envs.envs.relay_kitchen.multi_task_base_v1 import KitchenBase class FrankaSlideFixed(KitchenBase): OBJ_INTERACTION_SITES = ( "slide_site", ) OBJ_JNT_NAMES = ( "slidedoor_joint", ) ...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/relay_kitchen/franka_slide_v1.py
0.473414
0.308711
franka_slide_v1.py
pypi
import collections import gym import numpy as np from mj_envs.envs.relay_kitchen.multi_task_base_v1 import KitchenBase # ToDo: Get these details from key_frame DEMO_RESET_QPOS = np.array( [ 1.01020992e-01, -1.76349747e00, 1.88974607e00, -2.47661710e00, 3.25189114e-01, ...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/relay_kitchen/franka_kitchen_v1.py
0.476336
0.412412
franka_kitchen_v1.py
pypi
import os from gym.envs.registration import register CURR_DIR = os.path.dirname(os.path.abspath(__file__)) # Kitchen-V3 ============================================================================ # In this version of the environment, the observations consist of the # distance between end effector and all relevent ob...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/multi_task/substeps9/__init__.py
0.47658
0.319652
__init__.py
pypi
import collections import gym import numpy as np from mj_envs.envs.multi_task.multi_task_base_v1 import KitchenBase # ToDo: Get these details from key_frame DEMO_RESET_QPOS = np.array( [ 1.01020992e-01, -1.76349747e00, 1.88974607e00, -2.47661710e00, 3.25189114e-01, ...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/multi_task/common/franka_kitchen_v1.py
0.45302
0.423279
franka_kitchen_v1.py
pypi
import collections import gym import numpy as np from mj_envs.utils.quat_math import euler2quat from mj_envs.envs.multi_task.multi_task_base_v1 import KitchenBase class FrankaAppliance(KitchenBase): ROBOT_JNT_NAMES = ( "panda0_joint1", "panda0_joint2", "panda0_joint3", "panda0_joi...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/multi_task/common/franka_appliance_v1.py
0.716219
0.320462
franka_appliance_v1.py
pypi
import gym import numpy as np from mj_envs.envs import env_base from mj_envs.utils.xml_utils import reassign_parent import os import collections class FrankaRobotiqData(env_base.MujocoEnv): DEFAULT_OBS_KEYS = [ 't' # dummy key ] DEFAULT_RWD_KEYS_AND_WEIGHTS = { "none": -0.0, # d...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/fm/franka_robotiq_data_v0.py
0.436142
0.184584
franka_robotiq_data_v0.py
pypi
import gym import numpy as np from mj_envs.envs import env_base from mj_envs.utils.xml_utils import reassign_parent import os import collections class FrankaEEPose(env_base.MujocoEnv): DEFAULT_OBS_KEYS = [ 'qp', 'qv', 'pose_err' ] DEFAULT_RWD_KEYS_AND_WEIGHTS = { "pose": -1.0, "bon...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/fm/franka_ee_pose_v0.py
0.539469
0.232397
franka_ee_pose_v0.py
pypi
from gym.envs.registration import register import numpy as np import os curr_dir = os.path.dirname(os.path.abspath(__file__)) # Reach to fixed target # register( # id='DManusReachFixed-v0', # entry_point='mj_envs.envs.fm.franka_ee_pose_v0:FMReachEnvFixed', # max_episode_steps=50, #50steps*40Skip*2ms = 4s #...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/fm/__init__.py
0.453988
0.208985
__init__.py
pypi
import gym import numpy as np from mj_envs.envs import env_base from mj_envs.utils.xml_utils import reassign_parent import os import collections class TrackEnv(env_base.MujocoEnv): DEFAULT_OBS_KEYS = [ 'qp', 'qv', 'pose_err' ] DEFAULT_RWD_KEYS_AND_WEIGHTS = { "pose": -1.0, "bonus":...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/dexman/track.py
0.436142
0.250317
track.py
pypi
import collections import gym import numpy as np from mj_envs.envs import env_base from mj_envs.utils.quat_math import mat2euler, euler2quat class ReorientBaseV0(env_base.MujocoEnv): DEFAULT_OBS_KEYS = [ 'qp', 'qv', 'reach_pos_err', 'reach_rot_err' ] DEFAULT_RWD_KEYS_AND_WEIGHTS = { "reac...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/claws/reorient_v0.py
0.64646
0.362715
reorient_v0.py
pypi
import collections import gym import numpy as np from mj_envs.envs import env_base class ReachBaseV0(env_base.MujocoEnv): DEFAULT_OBS_KEYS = [ 'qp', 'qv', 'reach_err' ] DEFAULT_RWD_KEYS_AND_WEIGHTS = { "reach": -1.0, "bonus": 4.0, "penalty": -50, } def __init__(...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/arms/reach_base_v0.py
0.546738
0.266375
reach_base_v0.py
pypi
import collections import gym import numpy as np from mj_envs.envs import env_base class PushBaseV0(env_base.MujocoEnv): DEFAULT_OBS_KEYS = [ 'qp', 'qv', 'object_err', 'target_err' ] DEFAULT_RWD_KEYS_AND_WEIGHTS = { "object_dist": -1.0, "target_dist": -1.0, "bonus": 4.0, ...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/arms/push_base_v0.py
0.610686
0.238495
push_base_v0.py
pypi
import collections import gym import numpy as np from mj_envs.envs import env_base from mj_envs.utils.quat_math import euler2quat class PickPlaceV0(env_base.MujocoEnv): DEFAULT_OBS_KEYS = [ 'qp', 'qv', 'object_err', 'target_err' ] DEFAULT_RWD_KEYS_AND_WEIGHTS = { "object_dist": -1.0, ...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/arms/pick_place_v0.py
0.579995
0.282495
pick_place_v0.py
pypi
import collections import gym import numpy as np from mj_envs.utils.quat_math import * from mj_envs.envs import env_base # OBS_KEYS = ['hand_jnt', 'obj_vel', 'palm_pos', 'obj_pos', 'obj_rot', 'target_pos', 'nail_impact'] # DAPG DEFAULT_OBS_KEYS = ['hand_jnt', 'obj_vel', 'palm_pos', 'obj_pos', 'obj_rot', 'target_pos',...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/hand_manipulation_suite/hammer_v1.py
0.465145
0.255634
hammer_v1.py
pypi
import collections import gym import numpy as np from mj_envs.utils.vector_math import calculate_cosine from mj_envs.utils.quat_math import euler2quat from mj_envs.envs import env_base DEFAULT_OBS_KEYS = ['hand_jnt', 'obj_pos', 'obj_vel', 'obj_rot', 'obj_des_rot', 'obj_err_pos', 'obj_err_rot'] DEFAULT_RWD_KEYS_AND_W...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/hand_manipulation_suite/pen_v1.py
0.478773
0.249299
pen_v1.py
pypi
import collections import gym import numpy as np from mj_envs.envs import env_base # NOTES: # 1. why is qpos[0] not a part of the obs? ==> Hand translation isn't consistent due to randomization. Palm pos is a good substitute # OBS_KEYS = ['hand_jnt', 'latch_pos', 'door_pos', 'palm_pos', 'handle_pos', 'reach_err',...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/hand_manipulation_suite/door_v1.py
0.475849
0.364042
door_v1.py
pypi
import collections import enum import gym import numpy as np from mj_envs.envs import env_base # Define the task enum class Task(enum.Enum): MOVE_TO_LOCATION = 0 BAODING_CW = 1 BAODING_CCW = 2 # Choose task WHICH_TASK = Task.BAODING_CCW class BaodingFixedEnvV1(env_base.MujocoEnv): DEFAULT_OBS_KEYS =...
/robohive-0.3.0-py3-none-any.whl/mj_envs/envs/hand_manipulation_suite/baoding_v1.py
0.590425
0.262109
baoding_v1.py
pypi
import requests import os import sseclient from datetime import datetime import urllib.parse class RKClient: """Main class for interacting with IDM. See Documentation for details.""" def __init__( self, creds: dict, server: str = "https://idm.robokami.com", **kwargs ) -> None: """Initiali...
/robokami_py-0.12-py3-none-any.whl/robokami/main.py
0.797478
0.222151
main.py
pypi
import copy from datetime import datetime from robokami.main import RKClient def prepare_order( d: dict, price: int | float = None, lots: int = None, demo: bool = True, order_note: str = None, order_status: str = None, ): """Wrapper function for sending trade order. Args: d (d...
/robokami_py-0.12-py3-none-any.whl/robokami/order.py
0.68763
0.259268
order.py
pypi
from greent.node_types import node_types, DRUG_NAME, DISEASE_NAME, UNSPECIFIED from greent.util import Text from greent.program import Program from greent.program import QueryDefinition class Transition: def __init__(self, last_type, next_type, min_path_length, max_path_length): self.in_type = last_type ...
/robokop-interfaces-0.91.tar.gz/robokop-interfaces-0.91/greent/userquery.py
0.645455
0.265953
userquery.py
pypi
import json import graphene from graphene import resolve_only_args from datetime import datetime, timedelta from dateutil.parser import parse as parse_date from greent.core import GreenT from greent.translator import Translation # http://graphql.org/learn/introspection/ ''' class ExposureInterface (graphene.Interface...
/robokop-interfaces-0.91.tar.gz/robokop-interfaces-0.91/greent/schema.py
0.567218
0.195306
schema.py
pypi
import logging import traceback from collections import defaultdict from greent.graph_components import KNode, KEdge from greent.util import LoggingUtil logger = LoggingUtil.init_logging(__file__, level=logging.DEBUG) class QueryDefinition: """Defines a query""" def __init__(self): self.start_values ...
/robokop-interfaces-0.91.tar.gz/robokop-interfaces-0.91/greent/program.py
0.649467
0.223292
program.py
pypi