Skip to content

Instantly share code, notes, and snippets.

@3panda
3panda / python_create-python-package.md
Last active February 5, 2024 08:23
Python 自作モジュールのパッケージ化

Python 自作モジュールのパッケージ化

Pythonで作られた自作のモジュールのパッケージ化について調べました。

ゴール

自作ライブラリをProjectのフォルダーの中に入れずに利用できるようにする

前提条件

  • Python 3.0以上
@audrow
audrow / ros2_publish_single_pointcloud2.py
Last active January 3, 2023 06:41
ROS2 PointCloud2 Publisher #open-robotics
# A way of reproducing https://github.com/ros2/rviz/issues/322
#
# Code source:
# https://github.com/SebastianGrans/ROS2-Point-Cloud-Demo/blob/79ef97fc92147a0d550543a69541139097cc3b35/pcd_demo/pcd_publisher/pcd_publisher_node.py
import rclpy
from rclpy.node import Node
import sensor_msgs.msg as sensor_msgs
import std_msgs.msg as std_msgs
@rvvincelli
rvvincelli / Dynamic LCB
Last active June 1, 2021 02:23
Dynamic implementation for the emukit LCB acquisition
from emukit.core.interfaces import IModel, IDifferentiable
import numpy as np
from typing import Union
class DynamicNegativeLowerConfidenceBound(NegativeLowerConfidenceBound):
def __init__(self, model: Union[IModel, IDifferentiable],input_space_size: int, delta: float) -> None:
"""
This acquisition computes the negative lower confidence bound for a given input point. This is the same
as optimizing the upper confidence bound if we would maximize instead of minimizing the objective function.
For information as well as some theoretical insights see:
Gaussian Process Optimization in the Bandit Setting: No Regret and Experimental Design