Skip to content

Instantly share code, notes, and snippets.

View DNG.py
# -*- coding: utf-8 -*-
"""
Created on Sun May 9 20:45:45 2021
@author: youak
"""
import glob
files=glob.glob("*.DNG")
is_rig_cam=True #meshroom では depth推定できないような配置のrigカメラは逆効果っぽい(dence画像作成時にコケる)
View dead.py
from cmdstanpy import CmdStanModel
import os
with open("test.stan","w") as f:
print("""
data {
}
parameters {
real A;
}
model {
View YDLIDAR_X4_backround_subtraction.py
# -*- coding: utf-8 -*-
"""
Example implimentation for YDLIDAR X4
"""
#pip install pyserial-asyncio
import serial_asyncio
import asyncio
import time
#spyderとかipython環境で使うときはシステムですでにasyncio使ってて喧嘩するので
View YDLIDAR_X4.py
# -*- coding: utf-8 -*-
"""
Example implimentation for YDLIDAR X4
"""
#pip install pyserial-asyncio
import serial_asyncio
import asyncio
import time
#spyderとかipython環境で使うときはシステムですでにasyncio使ってて喧嘩するので
View isotherm.py
"""
isotherm functions
See: https://www.jstage.jst.go.jp/article/oleoscience/2/5/2_275/_pdf
Important variables
C:濃度
W:吸着量
S=W+C
"""
View screen_to_artnet.py
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import asyncio
import nest_asyncio
nest_asyncio.apply()
loop = asyncio.get_event_loop()
View install_pytorch.txt
#Microsoft storepython3.8をインストール
#windowsのファイル名255文字制限を解除しておく (以下のlongfilepath.regを実行)
#コマンドラインから以下を実行
pip install -U pip
pip install jupyterlab
#以下のpipコマンドはhttps://pytorch.org/get-started/locally/で作る。
pip install torch===1.7.0+cu110 torchvision===0.8.1+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
View ROS2-realsense-insltall-log.sh
#install ROS2 for linux Mint(as ubuntu18)
#https://gbiggs.github.io/rosjp_ros2_intro/computer_prep_linux.html
sudo apt update
sudo apt install -y curl gnupg2 lsb-release
curl http://repo.ros2.org/repos.key | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu bionic main" > /etc/apt/sources.list.d/ros2-latest.list'
export CHOOSE_ROS_DISTRO=dashing
sudo apt update
sudo apt install -y ros-${CHOOSE_ROS_DISTRO}-desktop python3-argcomplete
View mask-hotaru.cpp
//#define FASTLED_ALLOW_INTERRUPTS 0
#define FASTLED_ESP32_I2S 1
#include <M5Atom.h>
#define HANA_PIN 22
#define LED_PIN 25
#define COLOR_ORDER RGB
View in_study.shader
Shader "Custom/aurora"
{
Properties
{
_MainTex ("NormalMap", 2D) = "white" {}
}
SubShader
{