This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import open3d as o3d | |
| import numpy as np | |
| import time | |
| # 点群を生成 | |
| pcd = o3d.geometry.PointCloud() | |
| pcd.points = o3d.utility.Vector3dVector(np.random.rand(1000, 3)) | |
| # ビジュアライザーの設定 | |
| vis = o3d.visualization.Visualizer() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ファイルパス | |
| whitelist_file="whitelist.txt" | |
| raw_dir="input" | |
| extracted_dir="extracted" | |
| # extractedディレクトリが存在しない場合は作成する | |
| if [ ! -d "$extracted_dir" ]; then | |
| mkdir "$extracted_dir" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import tkinter as tk | |
| import PySimpleGUI as sg | |
| def main(order_title_init, supplement_title_init): | |
| # Set GUI theme | |
| sg.theme("DefaultNoMoreNagging") | |
| # Layout of text fields and buttons |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| input_file="$1" | |
| N="$2" | |
| output_dir="${3:-.}" | |
| # Get image width | |
| width=$(ffprobe -v error -select_streams v:0 -show_entries stream=width -of csv=p=0 "$input_file") | |
| # Calculate width of each segment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| def np_class2one_hot(category_array: np.ndarray, n_classes: int) -> np.ndarray: | |
| res = np.eye(n_classes)[np.array(category_array).reshape(-1)] | |
| return res.reshape(list(category_array.shape) + [n_classes]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import shutil | |
| import argparse | |
| import numpy as np | |
| from pathlib import Path | |
| from scripts.utils import get_image_pathes | |
| SCRIPT_DIR = str(Path(__file__).parent) | |
| USERNAME = os.getenv("USER") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import shutil | |
| import cv2 | |
| import numpy as np | |
| from pathlib import Path | |
| from tqdm import tqdm | |
| import pdb | |
| def get_image_pathes(input_dir_pathlib: Path): | |
| extf = [".jpg", ".png"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from pyudev import Context | |
| import errno | |
| import sys | |
| from select import select | |
| from time import sleep | |
| # Based on below code | |
| # https://github.com/econsysqtcam/qtcam/blob/6b9d31bb7fa9ecf619987cc1433c1ac2398706fe/src/see3cam_cu20.cpp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| $ python ndarray_median_with_completion.py | |
| [[1 2 1] | |
| [2 1 2] | |
| [1 2 1]] | |
| ''' | |
| from typing import List | |
| import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import toml | |
| import click | |
| from collections import OrderedDict | |
| from ruamel import yaml # "import yaml" cannot deal with nested list | |
| import pdb | |
| import copy | |
| SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) |
NewerOlder