Skip to content

Instantly share code, notes, and snippets.

View seongyooncho's full-sized avatar
๐ŸŽฏ
Focusing

Seongyoon Cho seongyooncho

๐ŸŽฏ
Focusing
View GitHub Profile
@seongyooncho
seongyooncho / redirect.sh
Last active November 10, 2025 01:50
opencv411
# --- A) core ํƒญ ์ค€๋น„ (extract๊ฐ€ ํžˆ์Šคํ† ๋ฆฌ๋ฅผ ํ•„์š”๋กœ ํ•จ)
export HOMEBREW_NO_INSTALL_FROM_API=1
brew tap homebrew/core || true
git -C "$(brew --repo homebrew/core)" fetch --unshallow --tags 2>/dev/null || \
git -C "$(brew --repo homebrew/core)" fetch --tags
# --- B) ๋‚ด ๋กœ์ปฌ ํƒญ ๋งŒ๋“ค๊ธฐ
brew tap-new $USER/local-tap
# --- C) opencv 4.11 ์ถ”์ถœ(4.11.1 ์šฐ์„ , ์•ˆ๋˜๋ฉด 4.11.0) ๋ฐ ์„ค์น˜
ffplay -probesize 32 -vf "rotate=PI" rtsp://admin:EdgePTZ%[email protected]/Stream/Live/101?transportmode=unicast&profile=ONFProfileToken_101
libcamera-hello -t 0
@seongyooncho
seongyooncho / apt.md
Created July 22, 2025 13:09
rpi setup
Commandline: apt install -y python3-picamera2 libcamera-apps
Commandline: apt install vim
Commandline: apt install -y python3-opencv
Commandline: apt install netcat-openbsd
Commandline: apt install libgtk2.0-dev libcanberra-gtk-module
Commandline: apt install libcap-dev
Commandline: apt install -y libcamera-dev libcamera-apps python3-libcamera
Commandline: apt install fonts-nanum fonts-noto-cjk
Commandline: apt install wmctrl xdotool
@seongyooncho
seongyooncho / convert.py
Created February 23, 2025 06:26
Extract body weight from Apple Health Export and save to csv.
import xml.etree.ElementTree as ET
import csv
from datetime import datetime
def export_body_mass_to_csv(xml_file, csv_file):
context = ET.iterparse(xml_file, events=("end",))
with open(csv_file, 'w', newline='', encoding='utf-8') as f:
writer = csv.writer(f)
writer.writerow(['Date', 'Weight'])

MotionScoreServer Documentation

MotionScoreServer๋Š” C++๋กœ ์ž‘์„ฑ๋œ ๊ฐ„๋‹จํ•œ HTTP ์„œ๋ฒ„๋กœ, ์˜ค๋ฒ„๋ ˆ์ด ์ œ์–ด์™€ ์šด๋™ ์‹œ์ž‘/์ข…๋ฃŒ ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

์„œ๋ฒ„ ์‹คํ–‰

๋นŒ๋“œ๋œ ์‹คํ–‰ ํŒŒ์ผ์ธ MotionScoreServer๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ์„œ๋ฒ„๊ฐ€ ์ž๋™์œผ๋กœ ํฌํŠธ 8080์—์„œ ์‹œ์ž‘๋ฉ๋‹ˆ๋‹ค.

./MotionScoreServer
@seongyooncho
seongyooncho / mems.md
Last active January 22, 2020 02:38
mems

bool setAngle(double x, double y, long timeout)

Set angle of MEMS mirrors. It returns when MEMS mirror finishes targeting. This method is synchronous.

  • Return value: true when setting angle successfully, false when timeout occured or otherwise.
  • x: Radian angle in x axis.
  • y: Radian angle in y axis.
  • timeout: timeout in microseconds.

(Optional) bool getAngle(double& x, double& y)

Return current angle of MEMS mirrors. This method synchronous.

  • Return value: true when getting angle successfully, false otherwise.
import time
import numpy as np
a = np.zeros((1080 * 4, 1920, 3))
last_time = time.time() * 1000
for i in range(1000) :
np.save('{}.npy'.format(i), a)
now = time.time() * 1000
auto node = ClippingRectangleNode::create(Rect(-100, -100, 200, 200));
auto sprite = Sprite::create("HelloWorld.png");
node->addChild(sprite);
[
{
"title":"Shawshank Redemption",
"category_id":1,
"synopsis":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim venom",
"thumbnail_image_url":"http://lge.com/sdk/shawshank_redemption_thumbnail.jpg",
"full_image_url":"http://lge.com/sdk/shawshank_redemption_full.jpg",
"video_url":"http://lge.com/sdk/shawshank_redemption_video.mp4"
},
{