Skip to content

Instantly share code, notes, and snippets.

@ysuito
ysuito / simple_GPIO_rec2_lightweight.py
Created March 20, 2024 12:44
撮影高速化試行
import cv2
import os
import time
import RPi.GPIO as GPIO
import sys
from picamera2 import Picamera2
import libcamera
import numpy as np
timelog = time.time()
@ysuito
ysuito / RPiCamV3LowLatency.py
Last active March 20, 2024 02:47
RPi Cam V3 Low Latency Test
from picamera2 import Picamera2, Metadata
from gpiozero import LED
import time
led = LED(21)
picam2 = Picamera2()
config = picam2.create_still_configuration(main={"size": (320, 240)}, buffer_count=1,queue=False)
picam2.configure(config)
#!/bin/bash
set -e
USER=user
groupadd -g $(stat -c '%g' /tmp/.X11-unix/X0) $USER
useradd -g $(stat -c '%g' /tmp/.X11-unix/X0) -u $(stat -c '%u' /tmp/.X11-unix/X0) -m $USER
echo $@ > /tmp.sh
su $USER -c "sh /tmp.sh"
rm /tmp.sh
@ysuito
ysuito / pipenv_usage.md
Last active June 14, 2018 07:49
pipenv usage

INSTALL

sudo pacman -S python-pip
pip install --user pipenv
-- echo "set PATH ~/.local/bin $PATH" >> ~/.config/fish/config.fish --
echo "set PATH ~/.local/bin $PATH" >> ~/.config/fish/conf.d/000-env.fish
-- fisher pipenv --

USAGE

cd project_folder
pipenv install --python 3.6

@ysuito
ysuito / quick-fish-chef.fish
Created December 6, 2017 03:17
quick fish cli enviroment prepairation script.
# Usage:"fish quick-fish-chef.fish"
# install fisherman
curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs git.io/fisher
# install plugins
fisher install z
fisher install 0rax/fish-bd
fisher install oh-my-fish/plugin-balias
fisher install oh-my-fish/plugin-extract
@ysuito
ysuito / quick-fish-recipe.md
Last active December 6, 2017 03:18
quick fish shell cli enviroment recipe

quick-fish-recipe

quick fish shell cli enviroment recipe

Requirement

  • fish
  • fzf
  • git

Refer the following url to install fzf.

https://github.com/junegunn/fzf

EXAMPLE

@ysuito
ysuito / quick-setup-memo.md
Last active December 6, 2017 11:12
quick setup devel env

quick-setup-memo

quick setup devel env

venv usage

python3 -m venv [PATH]
source [PATH]/bin/activate.fish
pip install {LIB}
pip freeze
deactivate