Skip to content

Instantly share code, notes, and snippets.

View partrita's full-sized avatar
๐ŸŽฏ
Focusing on hobby

Taeyoon Kim partrita

๐ŸŽฏ
Focusing on hobby
View GitHub Profile
@partrita
partrita / conver_notebooks_cli.py
Created June 16, 2025 02:22
python script for bulk pdf conversion. even faster.
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "click",
# "nbconvert[webpdf]",
# ]
# ///
import os
import subprocess
@partrita
partrita / config
Last active June 16, 2025 02:09
.config/i3/config
# ์ด ํŒŒ์ผ์€ i3-config-wizard(1)์— ์˜ํ•ด ์ž๋™์œผ๋กœ ์ƒ์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋ฎ์–ด์“ฐ์—ฌ์ง€์ง€ ์•Š์œผ๋ฏ€๋กœ ์›ํ•˜๋Š” ๋Œ€๋กœ ์ˆ˜์ •ํ•˜์‹ญ์‹œ์˜ค.
# ํ‚ค๋ณด๋“œ ๋ ˆ์ด์•„์›ƒ์„ ๋ณ€๊ฒฝํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ, ์ด ํŒŒ์ผ์„ ์‚ญ์ œํ•˜๊ณ  i3-config-wizard(1)๋ฅผ ๋‹ค์‹œ ์‹คํ–‰ํ•˜์‹ญ์‹œ์˜ค.
# i3 ์„ค์ • ํŒŒ์ผ (v4). https://i3wm.org/docs/userguide.html์„ ์ฐธ์กฐํ•˜์‹ญ์‹œ์˜ค.
# ๋ณ€์ˆ˜ ์„ค์ •
set $mod Mod1
set $refresh_i3status killall -SIGUSR1 i3status
# ==============================================================================
@partrita
partrita / config.yaml
Last active June 11, 2025 00:40
GlazeWM config.yaml
general:
# WM(์œˆ๋„์šฐ ๋งค๋‹ˆ์ €) ์‹œ์ž‘ ์‹œ ์‹คํ–‰ํ•  ๋ช…๋ น์–ด. ์Šคํฌ๋ฆฝํŠธ ์‹คํ–‰์ด๋‚˜ ๋‹ค๋ฅธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์‹คํ–‰์— ์œ ์šฉํ•จ.
# ์˜ˆ์‹œ: ์•„๋ž˜ ๋ช…๋ น์€ Zebar๋ฅผ ์‹คํ–‰ํ•จ.
startup_commands: ['shell-exec zebar']
# WM ์ข…๋ฃŒ ์ง์ „ ์‹คํ–‰ํ•  ๋ช…๋ น์–ด.
# ์˜ˆ์‹œ: ์•„๋ž˜ ๋ช…๋ น์€ Zebar๋ฅผ ์ข…๋ฃŒํ•จ.
shutdown_commands: ['shell-exec taskkill /IM zebar.exe /F']
# WM ์„ค์ • ํŒŒ์ผ์„ ๋‹ค์‹œ ๋ถˆ๋Ÿฌ์˜ฌ ๋•Œ ์‹คํ–‰ํ•  ๋ช…๋ น์–ด.
@partrita
partrita / README.md
Last active June 6, 2025 23:41
๋ชจ๋˜ ์‰˜ ๋ช…๋ น์–ด; ์ถœ์ฒ˜: https://cdecl.github.io/devops/moden-shell-command/

๋‹ค์Œ์€ ์ถœ์ฒ˜ ํŽ˜์ด์ง€์˜ ๋‚ด์šฉ์„ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ๊ฐ„์ถ”๋ฆฐ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

์™œ ๋ชจ๋˜ ์‰˜ ๋ช…๋ น์–ด๊ฐ€ ํ•„์š”ํ•œ๊ฐ€?

๋ชจ๋˜ ์‰˜ ๋ช…๋ น์–ด๋Š” Rust, Go์™€ ๊ฐ™์€ ์ตœ์‹  ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด๋กœ ๊ฐœ๋ฐœ๋˜์–ด ๋›ฐ์–ด๋‚œ ์†๋„์™€ ํšจ์œจ์„ฑ์„ ์ž๋ž‘ํ•˜๋ฉฐ, ์‚ฌ์šฉ์ž ์นœํ™”์ ์ธ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์ฃผ์š” ์žฅ์ ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • ์†๋„: Rust ๊ธฐ๋ฐ˜ ๋„๊ตฌ๋“ค์€ ๋ณ‘๋ ฌ ์ฒ˜๋ฆฌ๋ฅผ ํ†ตํ•ด ๊ธฐ์กด ๋ช…๋ น์–ด๋ณด๋‹ค ํ›จ์”ฌ ๋น ๋ฅธ ์„ฑ๋Šฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  • ๊ฐ€๋…์„ฑ: ์ปฌ๋Ÿฌ ์ถœ๋ ฅ๊ณผ ์ง๊ด€์ ์ธ ๊ฒฐ๊ณผ๋ฌผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ํ›จ์”ฌ ์‰ฝ๊ฒŒ ํŒŒ์•…ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์œ ์‚ฌํ•œ ๋ฌธ๋ฒ•: ๊ธฐ์กด ๋ช…๋ น์–ด์™€ ์œ ์‚ฌํ•œ ๋ฌธ๋ฒ•์„ ์ฑ„ํƒํ•˜์—ฌ ํ•™์Šต ๊ณก์„ ์ด ์™„๋งŒํ•˜๋ฉฐ ๋น ๋ฅด๊ฒŒ ์ ์‘ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ํ™•์žฅ๋œ ๊ธฐ๋Šฅ: Git ํ†ตํ•ฉ, ์œ ๋‹ˆ์ฝ”๋“œ ์ง€์›, ํ–ฅ์ƒ๋œ ์ •๊ทœ ํ‘œํ˜„์‹ ๋“ฑ ์ตœ์‹  ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์— ํ•„์š”ํ•œ ๊ธฐ๋Šฅ๋“ค์„ ๊ธฐ๋ณธ์œผ๋กœ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
@partrita
partrita / learn_duckdb.py
Created June 6, 2025 02:02
duckdb ๊ฐ€ ๊ทธ๋ ‡๊ฒŒ ์ข‹๋‹ค๋˜๋ฐ
import duckdb
import os
# ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ํŒŒ์ผ ๊ฒฝ๋กœ ์„ค์ •
db_file_path = '../data/my_database.duckdb'
# ํŒŒ์ผ ๊ธฐ๋ฐ˜ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์—ฐ๊ฒฐ
con = duckdb.connect(database=db_file_path)
# CSV ํŒŒ์ผ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ
@partrita
partrita / config.toml
Created February 24, 2025 00:26
Helix editor config files.
# ์—๋””ํ„ฐ์˜ ์ „์ฒด์ ์ธ ํ…Œ๋งˆ ์„ค์ •
theme = "nord"
[editor]
# ์ค„ ๋์— ํ‘œ์‹œํ•  ์ตœ์†Œ ์ง„๋‹จ ์ˆ˜์ค€
end-of-line-diagnostics = "hint"
# ๋งˆ์šฐ์Šค ์‚ฌ์šฉ ๋น„ํ™œ์„ฑํ™”
mouse = false
# ํŠธ๋ฃจ ์ปฌ๋Ÿฌ ์ง€์› ํ™œ์„ฑํ™”
true-color = true
@partrita
partrita / .wezterm.lua
Last active January 21, 2025 21:39
My wezterm config file for cross platform.
local wezterm = require("wezterm")
local config = wezterm.config_builder()
--local gpus = wezterm.gui.enumerate_gpus[0]
-- ๋ Œ๋”๋ง ์„ค์ •
--config.front_end = "Software"
--config.webgpu_preferred_adapter = gpus[0]
config.front_end = "WebGpu"
config.webgpu_power_preference = "HighPerformance"
@partrita
partrita / README.md
Created January 4, 2025 09:58
pip ํ™˜๊ฒฝ ์ •๋ฆฌํ•˜๊ธฐ

๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ pip, setuptools, wheel์„ ์ œ์™ธํ•œ ๋ชจ๋“  ํŒจํ‚ค์ง€๋ฅผ ์ œ๊ฑฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

pip list --format=freeze | grep -v "pip\|setuptools\|wheel" | cut -d "=" -f 1 | xargs -n1 pip uninstall -y

์ด ๋ช…๋ น์–ด์˜ ์ž‘๋™ ๋ฐฉ์‹์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค:

  1. pip list --format=freeze: ์„ค์น˜๋œ ๋ชจ๋“  ํŒจํ‚ค์ง€๋ฅผ "package==version" ํ˜•์‹์œผ๋กœ ๋‚˜์—ดํ•ฉ๋‹ˆ๋‹ค.
@partrita
partrita / README.md
Last active January 13, 2025 01:15
~/.config/starship.toml

Configuration

All configuration for starship is done in this TOML file:

starship preset nerd-font-symbols -o ~/.config/starship.toml

To get started configuring starship, edit the following file: ~/.config/starship.toml.

@partrita
partrita / plot_strip_errorbar_mean.py
Created December 24, 2024 06:29
Snippet for strip and errorbar mean plot.
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np
from typing import Tuple
def plot_data(combined_tidy_df: pd.DataFrame, source: str, title: str, figsize: Tuple[int, int]) -> None:
"""
ํŠน์ • ์†Œ์Šค์— ๋Œ€ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ํ‰๊ท , ํ‘œ์ค€ํŽธ์ฐจ, ๊ฐœ๋ณ„ ๋ฐ์ดํ„ฐ ํฌ์ธํŠธ์™€ ํ•จ๊ป˜ ํ”Œ๋กฏํ•ฉ๋‹ˆ๋‹ค.