Skip to content

Instantly share code, notes, and snippets.

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

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

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

ゴール

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

前提条件

  • Python 3.0以上
@oddmutou
oddmutou / channels.yml
Last active February 11, 2020 02:13
mirakurunの設定(KTV-FSPCIE,東京都港区)
- name: TOKYO MX
type: GR
channel: '16'
- name: チバテレ
type: GR
channel: '17'
- name: tvk
type: GR
channel: '18'
- name: テレ玉
@tejaskhot
tejaskhot / shapenet_synset_list
Created June 24, 2018 00:44
List of category names and their id in the ShapeNet dataset
04379243 table
03593526 jar
04225987 skateboard
02958343 car
02876657 bottle
04460130 tower
03001627 chair
02871439 bookshelf
02942699 camera
02691156 airplane
@kyrs
kyrs / opencv_tensor.cc
Last active February 15, 2024 12:44
File Takes an Image Mat file as an input and convert it to tensor.
/*
Following file take opencv mat file as an input and run inception model on it
Created by : Kumar Shubham
Date : 27-03-2016
*/
//Loading Opencv fIles for processing
#include <opencv2/opencv.hpp>

DockerでROSを動かす Tutorials

roscoreを起動する

docker run -h master -it --rm --name master --env ROS_HOSTNAME=master osrf/ros:jade-desktop-full roscore

talkerを起動する

#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 15/01/15
@author: Sammy Pfeiffer
# Software License Agreement (BSD License)
#
# Copyright (c) 2016, PAL Robotics, S.L.
# All rights reserved.
@AminaKeldibek
AminaKeldibek / Multiple camera calibration procedure.md
Last active March 12, 2022 08:31
Multiple camera calibration

The document provides description on calibration of three Kinect for Microsoft sensors connected to one computer with several usb controllers. Three cameras setup is shown below:

![Figure 1] (http://i.imgur.com/sdOWbVl.jpg)

Intrinsic, extrinsic, and Kinect2Kinect calibration is performed to know the position of each sensor in the space. Our setup is ROS Indigo with Ubuntu 14.04. freenect_launch and camera_pose ROS packages are used. Camera_pose package provides the pipeline to calibrate the relative 6D poses between multiple camera's. freenect_launch package contains launch files for using OpenNI-compliant devices in ROS. It creates a nodelet graph to transform raw data from the device driver into point clouds, disparity images, and other products suitable for processing and visualization. It is installed with catkin as follows:

# Prep
@polamjag
polamjag / amazon-calc.js
Last active September 7, 2022 11:23 — forked from arcatdmz/amazon-csv.js
Amazon で使った金額の合計を出す奴 (2014-2016 年バージョン)
// Amazon で使った金額の合計を出す奴
//
// 使い方:
// 1. 全部コピーする (右上の Raw をクリックした先でやるのが楽)
// 2. Amazon の注文履歴ページ ( https://www.amazon.co.jp/gp/css/order-history/ ) を開く
// 3. F12 または 右クリ→要素の検証 とかで出てくる開発者ツールのコンソール (JavaScript REPL) にペースト
// 4. エンターで実行
// (Firefox はなんか allow pasting とタイプしろみたいなことを言われるので従う)
// 5. しばらく待つと alert で合計金額を表示
//