text
stringlengths
24
1.04M
metadata
stringlengths
233
497
### File: autoware_v2x_msgs/msg/VirtualTrafficLightState.msg builtin_interfaces/Time stamp string type string id bool approval bool is_finalized # if finalization isn't required, always set to true
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_v2x_msgs/msg/VirtualTrafficLightState.msg", "license": "apache-2.0", "size": 137}
### File: autoware_v2x_msgs/msg/VirtualTrafficLightStateArray.msg builtin_interfaces/Time stamp autoware_v2x_msgs/VirtualTrafficLightState[] states
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_v2x_msgs/msg/VirtualTrafficLightStateArray.msg", "license": "apache-2.0", "size": 82}
### File: autoware_vehicle_msgs/CMakeLists.txt cmake_minimum_required(VERSION 3.5) project(autoware_vehicle_msgs) if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 14) endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) endif() find_package(...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/CMakeLists.txt", "license": "apache-2.0", "size": 979}
### File: autoware_vehicle_msgs/msg/ActuationCommand.msg float64 accel_cmd float64 brake_cmd float64 steer_cmd
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/ActuationCommand.msg", "license": "apache-2.0", "size": 54}
### File: autoware_vehicle_msgs/msg/ActuationCommandStamped.msg std_msgs/Header header autoware_vehicle_msgs/ActuationCommand actuation
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/ActuationCommandStamped.msg", "license": "apache-2.0", "size": 72}
### File: autoware_vehicle_msgs/msg/ActuationStatus.msg float64 accel_status float64 brake_status float64 steer_status
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/ActuationStatus.msg", "license": "apache-2.0", "size": 63}
### File: autoware_vehicle_msgs/msg/ActuationStatusStamped.msg std_msgs/Header header autoware_vehicle_msgs/ActuationStatus status
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/ActuationStatusStamped.msg", "license": "apache-2.0", "size": 68}
### File: autoware_vehicle_msgs/msg/BatteryStatus.msg builtin_interfaces/Time stamp float32 energy_level
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/BatteryStatus.msg", "license": "apache-2.0", "size": 51}
### File: autoware_vehicle_msgs/msg/ControlMode.msg std_msgs/Header header uint8 MANUAL = 0 uint8 AUTO = 1 uint8 AUTO_STEER_ONLY = 2 uint8 AUTO_PEDAL_ONLY = 3 int32 data
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/ControlMode.msg", "license": "apache-2.0", "size": 118}
### File: autoware_vehicle_msgs/msg/Engage.msg builtin_interfaces/Time stamp bool engage
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/Engage.msg", "license": "apache-2.0", "size": 42}
### File: autoware_vehicle_msgs/msg/RawControlCommand.msg float64 steering_angle float64 steering_angle_velocity float64 throttle float64 brake
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/RawControlCommand.msg", "license": "apache-2.0", "size": 86}
### File: autoware_vehicle_msgs/msg/RawVehicleCommand.msg std_msgs/Header header autoware_vehicle_msgs/RawControlCommand control autoware_vehicle_msgs/Shift shift int32 emergency
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/RawVehicleCommand.msg", "license": "apache-2.0", "size": 121}
### File: autoware_vehicle_msgs/msg/Shift.msg uint8 NONE=0 uint8 PARKING=1 uint8 REVERSE=2 uint8 NEUTRAL=3 uint8 DRIVE=4 uint8 LOW=5 int32 data
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/Shift.msg", "license": "apache-2.0", "size": 98}
### File: autoware_vehicle_msgs/msg/ShiftStamped.msg std_msgs/Header header autoware_vehicle_msgs/Shift shift
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/ShiftStamped.msg", "license": "apache-2.0", "size": 57}
### File: autoware_vehicle_msgs/msg/Steering.msg std_msgs/Header header float32 data
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/Steering.msg", "license": "apache-2.0", "size": 36}
### File: autoware_vehicle_msgs/msg/TurnSignal.msg std_msgs/Header header uint8 NONE = 0 uint8 LEFT = 1 uint8 RIGHT = 2 uint8 HAZARD = 3 int32 data
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/TurnSignal.msg", "license": "apache-2.0", "size": 98}
### File: autoware_vehicle_msgs/msg/VehicleCommand.msg std_msgs/Header header autoware_control_msgs/ControlCommand control autoware_vehicle_msgs/Shift shift int32 emergency
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "omnetpp-msg", "repo_name": "minhanghuang/tier4_autoware_msgs", "path": "autoware_vehicle_msgs/msg/VehicleCommand.msg", "license": "apache-2.0", "size": 118}
### File: docs/conf.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Sphinx Configuration.""" project = 'Rosbags' copyright = '2020-2024, Ternaris' # noqa: A001 author = 'Ternaris' autoapi_python_use_implicit_namespaces = True autodoc_typehints = 'description' extensions = [ 'sphinx....
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "docs/conf.py", "license": "apache-2.0", "size": 429}
### File: docs/examples/edit_message_definition.py """Example: Edit message definition. Between ROS1 and ROS2 the CameraInfo message definition has changed. The D, K, R, and P field names have been changed from upper case to lower case. This example shows how to downgrade the messages in a rosbag1 to the proper messag...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "docs/examples/edit_message_definition.py", "license": "apache-2.0", "size": 3197}
### File: docs/examples/edit_rosbags_edit_timestamps.py """Example: Edit timestamps.""" from __future__ import annotations from typing import TYPE_CHECKING, cast from rosbags.interfaces import ConnectionExtRosbag2 from rosbags.rosbag2 import Reader, Writer from rosbags.typesys import Stores, get_typestore if TYPE_C...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "docs/examples/edit_rosbags_edit_timestamps.py", "license": "apache-2.0", "size": 1624}
### File: docs/examples/edit_rosbags_remove_topic.py """Example: Remove topic.""" from __future__ import annotations from typing import TYPE_CHECKING, cast from rosbags.interfaces import ConnectionExtRosbag2 from rosbags.rosbag2 import Reader, Writer if TYPE_CHECKING: from pathlib import Path def remove_topic...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "docs/examples/edit_rosbags_remove_topic.py", "license": "apache-2.0", "size": 1143}
### File: docs/examples/register_types_files.py """Example: Register types from msg files.""" from pathlib import Path from rosbags.typesys import Stores, get_types_from_msg, get_typestore def guess_msgtype(path: Path) -> str: """Guess message type name from path.""" name = path.relative_to(path.parents[2])...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "docs/examples/register_types_files.py", "license": "apache-2.0", "size": 845}
### File: docs/examples/register_types_rosbag1.py """Example: Register rosbag1 types.""" from __future__ import annotations from typing import TYPE_CHECKING from rosbags.rosbag1 import Reader from rosbags.typesys import Stores, get_types_from_msg, get_typestore if TYPE_CHECKING: from pathlib import Path def p...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "docs/examples/register_types_rosbag1.py", "license": "apache-2.0", "size": 792}
### File: docs/examples/register_types_string.py """Example: Register type from definition string.""" from rosbags.serde import serialize_cdr from rosbags.typesys import Stores, get_types_from_msg, get_typestore # Your custom message definition STRIDX_MSG = """ string string uint32 index """ typestore = get_typestor...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "docs/examples/register_types_string.py", "license": "apache-2.0", "size": 570}
### File: docs/examples/save_images_rosbag1.py """Example: Save images as rosbag1.""" import numpy as np from rosbags.rosbag1 import Writer from rosbags.typesys import Stores, get_typestore from rosbags.typesys.stores.ros1_noetic import ( builtin_interfaces__msg__Time as Time, sensor_msgs__msg__CompressedImag...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "docs/examples/save_images_rosbag1.py", "license": "apache-2.0", "size": 1293}
### File: docs/examples/save_images_rosbag2.py """Save multiple images in rosbag2.""" import numpy as np from rosbags.rosbag2 import Writer from rosbags.typesys import Stores, get_typestore from rosbags.typesys.stores.ros2_foxy import ( builtin_interfaces__msg__Time as Time, sensor_msgs__msg__CompressedImage ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "docs/examples/save_images_rosbag2.py", "license": "apache-2.0", "size": 1162}
### File: docs/examples/use_with_native.py """Example: Message instance conversion.""" from __future__ import annotations import importlib from typing import TypeVar import numpy as np T = TypeVar('T') NATIVE_CLASSES: dict[str, type] = {} def to_native(msg: object) -> object: """Convert rosbags message to na...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "docs/examples/use_with_native.py", "license": "apache-2.0", "size": 1667}
### File: src/rosbags/convert/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbags file format conversion. Conversion function transforms files from rosbag1 format to the latest rosbag2 format. It automatically matches ROS1 message types to their ROS2 counterparts and adds cust...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/convert/__init__.py", "license": "apache-2.0", "size": 424}
### File: src/rosbags/convert/__main__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """CLI tool for rosbag conversion.""" from __future__ import annotations from .cli import main if __name__ == '__main__': main()
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/convert/__main__.py", "license": "apache-2.0", "size": 207}
### File: src/rosbags/convert/commands.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbag1 to Rosbag2 Converter.""" from __future__ import annotations from importlib import import_module from typing import TYPE_CHECKING, Annotated, cast from rosbags.typesys import Stores, get_typesto...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/convert/commands.py", "license": "apache-2.0", "size": 7244}
### File: src/rosbags/convert/converter.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbag1 to Rosbag2 Converter.""" from __future__ import annotations from functools import partial from typing import TYPE_CHECKING, cast import numpy as np from rosbags.highlevel.anyreader import Any...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/convert/converter.py", "license": "apache-2.0", "size": 16074}
### File: src/rosbags/convert/declinate.py # Copyright 2016 - 2023 Ternaris # SPDX-License-Identifier: Apache-2.0 """Command line interface definition.""" from __future__ import annotations from .commands import command COMMAND = command
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/convert/declinate.py", "license": "apache-2.0", "size": 198}
### File: src/rosbags/highlevel/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Highlevel interfaces for rosbags.""" from .anyreader import AnyReader, AnyReaderError __all__ = [ 'AnyReader', 'AnyReaderError', ]
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/highlevel/__init__.py", "license": "apache-2.0", "size": 215}
### File: src/rosbags/highlevel/anyreader.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Tools for reading all rosbag versions with unified api.""" # pyright: strict, reportUnreachable=false from __future__ import annotations import functools import operator import warnings from context...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/highlevel/anyreader.py", "license": "apache-2.0", "size": 8621}
### File: src/rosbags/interfaces/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Shared interfaces.""" from __future__ import annotations from collections.abc import Callable from dataclasses import dataclass from enum import Enum from typing import TYPE_CHECKING, Generic, NamedT...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/interfaces/__init__.py", "license": "apache-2.0", "size": 3473}
### File: src/rosbags/interfaces/typing.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbags typing.""" from enum import IntEnum, auto from typing import Literal, TypeAlias, TypeVar T = TypeVar('T') class Nodetype(IntEnum): """Parse tree node types. The first four match the ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/interfaces/typing.py", "license": "apache-2.0", "size": 1172}
### File: src/rosbags/rosbag1/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbags support for rosbag1 files. Readers and writers provide access to metadata and raw message content saved in the rosbag1 format. Supported versions: - Rosbag1 v2.0 """ from .reader import Read...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/rosbag1/__init__.py", "license": "apache-2.0", "size": 415}
### File: src/rosbags/rosbag1/reader.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbag1 v2.0 reader.""" # pyright: strict, reportUnreachable=false from __future__ import annotations import heapq import os import re import struct import sys from bz2 import decompress as bz2_decompres...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/rosbag1/reader.py", "license": "apache-2.0", "size": 21333}
### File: src/rosbags/rosbag1/writer.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbag1 writer.""" # pyright: strict, reportUnreachable=false from __future__ import annotations import struct import warnings from bz2 import compress as bz2_compress from collections import defaultdict...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/rosbag1/writer.py", "license": "apache-2.0", "size": 13030}
### File: src/rosbags/rosbag2/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbags support for rosbag2 files. Readers and writers provide access to metadata and raw message content saved in the rosbag2 format. """ from .errors import ReaderError from .reader import Reader fro...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/rosbag2/__init__.py", "license": "apache-2.0", "size": 396}
### File: src/rosbags/rosbag2/errors.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbag2 errors.""" from __future__ import annotations class ReaderError(Exception): """Reader Error.""" args: tuple[str]
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/rosbag2/errors.py", "license": "apache-2.0", "size": 207}
### File: src/rosbags/rosbag2/metadata.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbag2 metadata.""" from __future__ import annotations from io import StringIO from typing import TYPE_CHECKING, TypedDict from ruamel.yaml import YAML from rosbags.interfaces import ( Qos, Q...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/rosbag2/metadata.py", "license": "apache-2.0", "size": 5743}
### File: src/rosbags/rosbag2/reader.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbag2 reader.""" # pyright: strict, reportUnreachable=false from __future__ import annotations from pathlib import Path from tempfile import TemporaryDirectory from typing import TYPE_CHECKING, Protoco...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/rosbag2/reader.py", "license": "apache-2.0", "size": 10720}
### File: src/rosbags/rosbag2/storage_mcap.py # Copyright 2020 - 2024 Ternarisstorage # SPDX-License-Identifier: Apache-2.0 """Mcap storage.""" from __future__ import annotations import heapq import struct from io import BytesIO from struct import iter_unpack, unpack_from from typing import TYPE_CHECKING, NamedTuple,...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/rosbag2/storage_mcap.py", "license": "apache-2.0", "size": 18168}
### File: src/rosbags/rosbag2/storage_sqlite3.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Sqlite3 storage.""" from __future__ import annotations import sqlite3 from typing import TYPE_CHECKING, cast from rosbags.typesys.msg import get_types_from_msg from rosbags.typesys.store import ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/rosbag2/storage_sqlite3.py", "license": "apache-2.0", "size": 5858}
### File: src/rosbags/rosbag2/writer.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbag2 writer.""" # pyright: strict, reportUnreachable=false from __future__ import annotations import sqlite3 import warnings from enum import IntEnum, auto from io import StringIO from pathlib import ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/rosbag2/writer.py", "license": "apache-2.0", "size": 14139}
### File: src/rosbags/serde/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbags message serialization and deserialization. Serializers and deserializers convert between python messages objects and the common rosbag serialization formats. Computationally cheap functions convert...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/serde/__init__.py", "license": "apache-2.0", "size": 673}
### File: src/rosbags/serde/deprecated.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Deprecated functions.""" from __future__ import annotations import sys import warnings from typing import TYPE_CHECKING if TYPE_CHECKING: from rosbags.typesys.store import Typestore depmsg = """ ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/serde/deprecated.py", "license": "apache-2.0", "size": 3091}
### File: src/rosbags/serde/errors.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Serialization and Deserialization Errors.""" class SerdeError(Exception): """Serialization and Deserialization Error."""
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/serde/errors.py", "license": "apache-2.0", "size": 201}
### File: src/rosbags/typesys/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbags Type System. The type system manages ROS message types and ships all standard ROS2 distribution message types by default. The system supports custom message types through parsers that dynamically...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/typesys/__init__.py", "license": "apache-2.0", "size": 877}
### File: src/rosbags/typesys/__main__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Tool to update builtin types shipped with rosbags.""" from __future__ import annotations from itertools import groupby from os import walk from pathlib import Path from typing import TYPE_CHECKING from...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/typesys/__main__.py", "license": "apache-2.0", "size": 3620}
### File: src/rosbags/typesys/base.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Types and helpers used by message definition converters.""" from __future__ import annotations import keyword from typing import TYPE_CHECKING if TYPE_CHECKING: from rosbags.interfaces.typing import Ty...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/typesys/base.py", "license": "apache-2.0", "size": 1337}
### File: src/rosbags/typesys/deprecated.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Deprecated functions.""" from __future__ import annotations import warnings from typing import TYPE_CHECKING from .stores import Stores, get_typestore if TYPE_CHECKING: from rosbags.interfaces.t...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/typesys/deprecated.py", "license": "apache-2.0", "size": 955}
### File: src/rosbags/typesys/idl.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """IDL Parser. Grammar, parse tree visitor and conversion functions for message definitions in `IDL`_ format. .. _IDL: https://www.omg.org/spec/IDL/About-IDL/ """ from __future__ import annotations import re...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/typesys/idl.py", "license": "apache-2.0", "size": 16027}
### File: src/rosbags/typesys/msg.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """MSG Parser. Grammar, parse tree visitor and conversion functions for message definitions in `MSG`_ format. It also supports concatened message definitions as found in Rosbag1 connection information. .. _MSG:...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/typesys/msg.py", "license": "apache-2.0", "size": 9699}
### File: src/rosbags/typesys/peg.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """PEG Parser. Parsing expression grammar inspired parser for simple EBNF-like notations. It implements just enough features to support parsing of the different ROS message definition formats. """ from __futur...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/typesys/peg.py", "license": "apache-2.0", "size": 9608}
### File: src/rosbags/typesys/store.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Type store.""" from __future__ import annotations import json import sys from hashlib import md5, sha256 from importlib.util import module_from_spec, spec_from_loader from itertools import starmap from str...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/typesys/store.py", "license": "apache-2.0", "size": 17784}
### File: src/rosbags/typesys/stores/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Concrete store implementations.""" from enum import Enum from importlib import import_module from rosbags.typesys.store import Typestore class Stores(Enum): """All builtin stores.""" E...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/typesys/stores/__init__.py", "license": "apache-2.0", "size": 1033}
### File: src/rosbags/typesys/stores/latest.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Latest typestore.""" from .ros2_jazzy import * # noqa: F403
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/typesys/stores/latest.py", "license": "apache-2.0", "size": 136}
### File: src/rosbags/typesys/types.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """DEPRECATED.""" from __future__ import annotations import warnings from rosbags.typesys.stores.ros2_foxy import * # noqa: F403 message = """ Importing from 'rosbags.typesys.types' is deprecated. Use a sp...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "src/rosbags/typesys/types.py", "license": "apache-2.0", "size": 459}
### File: tests/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Test Package."""
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tests/__init__.py", "license": "apache-2.0", "size": 91}
### File: tests/rosbags/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbags Test Package."""
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tests/rosbags/__init__.py", "license": "apache-2.0", "size": 99}
### File: tests/rosbags/convert/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Convert Test Package."""
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tests/rosbags/convert/__init__.py", "license": "apache-2.0", "size": 99}
### File: tests/rosbags/highlevel/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Highlevel Test Package."""
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tests/rosbags/highlevel/__init__.py", "license": "apache-2.0", "size": 101}
### File: tests/rosbags/rosbag1/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbag1 Test Package."""
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tests/rosbags/rosbag1/__init__.py", "license": "apache-2.0", "size": 99}
### File: tests/rosbags/rosbag2/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Rosbag2 Test Package."""
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tests/rosbags/rosbag2/__init__.py", "license": "apache-2.0", "size": 99}
### File: tests/rosbags/serde/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Serde Test Package."""
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tests/rosbags/serde/__init__.py", "license": "apache-2.0", "size": 97}
### File: tests/rosbags/typesys/__init__.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Typesys Test Package."""
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tests/rosbags/typesys/__init__.py", "license": "apache-2.0", "size": 99}
### File: tests/rosbags/typesys/cdr.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Reference CDR Message Serializer and Deserializer.""" from __future__ import annotations import sys from struct import Struct, pack_into, unpack_from from typing import TYPE_CHECKING, cast import numpy as...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tests/rosbags/typesys/cdr.py", "license": "apache-2.0", "size": 13848}
### File: tests/rosbags/typesys/common.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Common Test Content.""" import numpy as np from rosbags.typesys.stores.latest import ( builtin_interfaces__msg__Time as Time, geometry_msgs__msg__Point32 as Point32, geometry_msgs__msg__Poly...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tests/rosbags/typesys/common.py", "license": "apache-2.0", "size": 3560}
### File: tests/rosbags/typesys/conftest.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Test Fixturest.""" from __future__ import annotations import sys from typing import TYPE_CHECKING, cast from unittest.mock import patch import numpy as np import pytest if sys.version_info >= (3, 12...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tests/rosbags/typesys/conftest.py", "license": "apache-2.0", "size": 1798}
### File: tools/bench/Dockerfile FROM ros:rolling RUN apt-get update \ && apt-get upgrade -y \ && apt-get install -y \ python3-lz4 \ python3-numpy \ python3-ruamel.yaml \ python3-zstandard COPY src/rosbags /opt/ros/rolling/lib/python3.12/site-packages/rosbags COPY tools/bench/bench.py / CMD...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Dockerfile", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tools/bench/Dockerfile", "license": "apache-2.0", "size": 334}
### File: tools/bench/bench.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Check and benchmark rosbag2 read implementations.""" from __future__ import annotations import sys from math import isnan from pathlib import Path from timeit import timeit from typing import TYPE_CHECKING, cast ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tools/bench/bench.py", "license": "apache-2.0", "size": 5357}
### File: tools/compare/Dockerfile FROM ros:rolling RUN apt-get update \ && apt-get upgrade -y \ && apt-get install -y \ python3-pip \ python3-rosbag COPY tools/compare/compare.py / CMD ["/usr/bin/python3", "/compare.py", "/rosbag1", "/rosbag2"]
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Dockerfile", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tools/compare/Dockerfile", "license": "apache-2.0", "size": 228}
### File: tools/compare/compare.py # Copyright 2020 - 2024 Ternaris # SPDX-License-Identifier: Apache-2.0 """Tool checking if contents of two rosbags are equal.""" from __future__ import annotations import array import math import sys from pathlib import Path from typing import TYPE_CHECKING from unittest.mock import...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/ternaris-rosbags", "path": "tools/compare/compare.py", "license": "apache-2.0", "size": 5651}
### File: setup.py try: from setuptools import setup except ImportError: from distutils.core import setup import toml with open("README.rst") as readme_file: readme_string = readme_file.read() setup( name="toml", version=toml.__version__, description="Python Library for Tom's Obvious, Minimal...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/toml", "path": "setup.py", "license": "mit", "size": 1485}
### File: tests/decoding_test.py """Decodes toml and outputs it as tagged JSON""" import datetime import json import sys import toml if sys.version_info < (3,): _range = xrange # noqa: F821 iteritems = dict.iteritems else: unicode = str _range = range basestring = str unichr = chr iterite...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/toml", "path": "tests/decoding_test.py", "license": "mit", "size": 1738}
### File: tests/decoding_test.sh #!/bin/sh export PYTHONPATH=`pwd` python tests/decoding_test.py
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/toml", "path": "tests/decoding_test.sh", "license": "mit", "size": 65}
### File: tests/decoding_test2.sh #!/bin/sh export PYTHONPATH=`pwd` python2 tests/decoding_test.py
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/toml", "path": "tests/decoding_test2.sh", "license": "mit", "size": 66}
### File: tests/decoding_test3.sh #!/bin/sh export PYTHONPATH=`pwd` python3 tests/decoding_test.py
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/toml", "path": "tests/decoding_test3.sh", "license": "mit", "size": 66}
### File: toml/__init__.py """Python module which parses and emits TOML. Released under the MIT license. """ from toml import encoder from toml import decoder __version__ = "0.10.2" _spec_ = "0.5.0" load = decoder.load loads = decoder.loads TomlDecoder = decoder.TomlDecoder TomlDecodeError = decoder.TomlDecodeError...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/toml", "path": "toml/__init__.py", "license": "mit", "size": 723}
### File: toml/__init__.pyi from toml import decoder as decoder, encoder as encoder load = decoder.load loads = decoder.loads TomlDecoder = decoder.TomlDecoder TomlDecodeError = decoder.TomlDecodeError TomlPreserveCommentDecoder = decoder.TomlPreserveCommentDecoder dump = encoder.dump dumps = encoder.dumps TomlEncoder...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/toml", "path": "toml/__init__.pyi", "license": "mit", "size": 603}
### File: toml/decoder.py import datetime import io from os import linesep import re import sys from toml.tz import TomlTz if sys.version_info < (3,): _range = xrange # noqa: F821 else: unicode = str _range = range basestring = str unichr = chr def _detect_pathlib_path(p): if (3, 4) <= sys....
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/toml", "path": "toml/decoder.py", "license": "mit", "size": 38942}
### File: toml/decoder.pyi from toml.tz import TomlTz as TomlTz from typing import Any, Optional unicode = str basestring = str unichr = chr FNFError = FileNotFoundError FNFError = IOError TIME_RE: Any class TomlDecodeError(ValueError): msg: Any = ... doc: Any = ... pos: Any = ... lineno: Any = ... ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/toml", "path": "toml/decoder.pyi", "license": "mit", "size": 2003}
### File: toml/encoder.py import datetime import re import sys from decimal import Decimal from toml.decoder import InlineTableDict if sys.version_info >= (3,): unicode = str def dump(o, f, encoder=None): """Writes out dict as toml to a file Args: o: Object to dump into toml f: File des...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/toml", "path": "toml/encoder.py", "license": "mit", "size": 9940}
### File: toml/encoder.pyi from toml.decoder import InlineTableDict as InlineTableDict from typing import Any, Optional unicode = str def dump(o: Mapping[str, Any], f: IO[str], encoder: TomlEncoder = ...) -> str: ... def dumps(o: Mapping[str, Any], encoder: TomlEncoder = ...) -> str: ... class TomlEncoder: prese...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/toml", "path": "toml/encoder.pyi", "license": "mit", "size": 1234}
### File: toml/ordered.py from collections import OrderedDict from toml import TomlEncoder from toml import TomlDecoder class TomlOrderedDecoder(TomlDecoder): def __init__(self): super(self.__class__, self).__init__(_dict=OrderedDict) class TomlOrderedEncoder(TomlEncoder): def __init__(self): ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/toml", "path": "toml/ordered.py", "license": "mit", "size": 354}
### File: toml/ordered.pyi from toml import TomlDecoder as TomlDecoder, TomlEncoder as TomlEncoder class TomlOrderedDecoder(TomlDecoder): def __init__(self) -> None: ... class TomlOrderedEncoder(TomlEncoder): def __init__(self) -> None: ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/toml", "path": "toml/ordered.pyi", "license": "mit", "size": 224}
### File: toml/tz.py from datetime import tzinfo, timedelta class TomlTz(tzinfo): def __init__(self, toml_offset): if toml_offset == "Z": self._raw_offset = "+00:00" else: self._raw_offset = toml_offset self._sign = -1 if self._raw_offset[0] == '-' else 1 se...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/toml", "path": "toml/tz.py", "license": "mit", "size": 701}
### File: toml/tz.pyi from datetime import tzinfo from typing import Any class TomlTz(tzinfo): def __init__(self, toml_offset: Any) -> None: ... def __deepcopy__(self, memo: Any): ... def tzname(self, dt: Any): ... def utcoffset(self, dt: Any): ... def dst(self, dt: Any): ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/toml", "path": "toml/tz.pyi", "license": "mit", "size": 276}
### File: bindings/clean_plugins #!/usr/bin/env bash # Tmux key-binding script. # Scripts intended to be used via the command line are in `bin/` directory. CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" SCRIPTS_DIR="$CURRENT_DIR/../scripts" HELPERS_DIR="$SCRIPTS_DIR/helpers" source "$HELPERS_DIR/tmu...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/tpm", "path": "bindings/clean_plugins", "license": "mit", "size": 485}
### File: bindings/install_plugins #!/usr/bin/env bash # Tmux key-binding script. # Scripts intended to be used via the command line are in `bin/` directory. CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" SCRIPTS_DIR="$CURRENT_DIR/../scripts" HELPERS_DIR="$SCRIPTS_DIR/helpers" source "$HELPERS_DIR/t...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/tpm", "path": "bindings/install_plugins", "license": "mit", "size": 487}
### File: bindings/update_plugins #!/usr/bin/env bash # Tmux key-binding script. # Scripts intended to be used via the command line are in `bin/` directory. # This script: # - shows a list of installed plugins # - starts a prompt to enter the name of the plugin that will be updated CURRENT_DIR="$( cd "$( dirname "${...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/tpm", "path": "bindings/update_plugins", "license": "mit", "size": 1242}
### File: scripts/check_tmux_version.sh #!/usr/bin/env bash VERSION="$1" UNSUPPORTED_MSG="$2" get_tmux_option() { local option=$1 local default_value=$2 local option_value=$(tmux show-option -gqv "$option") if [ -z "$option_value" ]; then echo "$default_value" else echo "$option_value" fi } # Ensures a mes...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/tpm", "path": "scripts/check_tmux_version.sh", "license": "mit", "size": 1928}
### File: scripts/clean_plugins.sh #!/usr/bin/env bash CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" HELPERS_DIR="$CURRENT_DIR/helpers" source "$HELPERS_DIR/plugin_functions.sh" source "$HELPERS_DIR/utility.sh" if [ "$1" == "--tmux-echo" ]; then # tmux-specific echo functions source "$HELPERS_DIR/...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/tpm", "path": "scripts/clean_plugins.sh", "license": "mit", "size": 1016}
### File: scripts/helpers/plugin_functions.sh # using @tpm_plugins is now deprecated in favor of using @plugin syntax tpm_plugins_variable_name="@tpm_plugins" # manually expanding tilde char or `$HOME` variable. _manual_expansion() { local path="$1" local expanded_tilde="${path/#\~/$HOME}" echo "${expanded_tilde/#\...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/tpm", "path": "scripts/helpers/plugin_functions.sh", "license": "mit", "size": 2814}
### File: scripts/helpers/shell_echo_functions.sh echo_ok() { echo "$*" } echo_err() { fail_helper "$*" }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/tpm", "path": "scripts/helpers/shell_echo_functions.sh", "license": "mit", "size": 59}
### File: scripts/helpers/tmux_echo_functions.sh _has_emacs_mode_keys() { $(tmux show -gw mode-keys | grep -q emacs) } tmux_echo() { local message="$1" tmux run-shell "echo '$message'" } echo_ok() { tmux_echo "$*" } echo_err() { tmux_echo "$*" } end_message() { if _has_emacs_mode_keys; then local continue_k...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/tpm", "path": "scripts/helpers/tmux_echo_functions.sh", "license": "mit", "size": 444}
### File: scripts/helpers/tmux_utils.sh HELPERS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "$HELPERS_DIR/plugin_functions.sh" reload_tmux_environment() { tmux source-file $(_get_user_tmux_conf) >/dev/null 2>&1 }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/tpm", "path": "scripts/helpers/tmux_utils.sh", "license": "mit", "size": 194}
### File: scripts/helpers/utility.sh ensure_tpm_path_exists() { mkdir -p "$(tpm_path)" } fail_helper() { local message="$1" echo "$message" >&2 FAIL="true" } exit_value_helper() { if [ "$FAIL" == "true" ]; then exit 1 else exit 0 fi }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/tpm", "path": "scripts/helpers/utility.sh", "license": "mit", "size": 211}