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 / 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:
"""
ํŠน์ • ์†Œ์Šค์— ๋Œ€ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ํ‰๊ท , ํ‘œ์ค€ํŽธ์ฐจ, ๊ฐœ๋ณ„ ๋ฐ์ดํ„ฐ ํฌ์ธํŠธ์™€ ํ•จ๊ป˜ ํ”Œ๋กฏํ•ฉ๋‹ˆ๋‹ค.
@partrita
partrita / .aerospace.toml
Last active December 14, 2024 11:43
my personal aerospace setup. `alt` to `ctrl` key and move cursor to focused windows.
# Place a copy of this config to ~/.aerospace.toml
# After that, you can edit ~/.aerospace.toml to your liking
# You can use it to add commands that run after login to macOS user session.
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
# Available commands: https://nikitabobko.github.io/AeroSpace/commands
after-login-command = []
# You can use it to add commands that run after AeroSpace startup.
# 'after-startup-command' is run after 'after-login-command'
@partrita
partrita / MacOS_ Backtick.md
Last active November 11, 2024 11:26
MacOS ํ•œ๊ธ€ ํ‚ค๋ณด๋“œ์—์„œ Backtick ์„ค์ •๋ฒ•

macOS์—์„œ ํ•œ๊ธ€ ์ž…๋ ฅ ์ƒํƒœ์—์„œ ๋ฐฑํ‹ฑ(`) ํ‚ค๋ฅผ ๋ˆ„๋ฅด๋ฉด ์›ํ™”(โ‚ฉ) ๊ธฐํ˜ธ๊ฐ€ ์ž…๋ ฅ๋ฉ๋‹ˆ๋‹ค. ๋ฌผ๋ก  ์˜ต์…˜ ํ‚ค๋ฅผ ๋ˆ„๋ฅด๋ฉด ๋ฐฑํ‹ฑ์„ ์ž…๋ ฅํ•  ์ˆ˜๋Š” ์žˆ์ง€๋งŒ ๋งˆํฌ๋‹ค์šด ๋ฌธ์„œ ์ž‘์„ฑ์ด๋‚˜ ๊ฐœ๋ฐœ ์ž‘์—… ์‹œ ๋ถˆํŽธํ•จ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ๋ฌธ์ œ๋Š” ๊ฐ„๋‹จํ•œ ์„ค์ •์œผ๋กœ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ•ด๊ฒฐ๋ฒ•

  1. ~/Library ํด๋”๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.
  2. KeyBindings ํด๋”๋ฅผ ์ƒˆ๋กœ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
  3. ~/Library/KeyBindings ํด๋” ๋‚ด์— DefaultkeyBinding.dict ํŒŒ์ผ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
  4. DefaultkeyBinding.dict ํŒŒ์ผ์— ๋‹ค์Œ ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค:
@partrita
partrita / plot_ACTA.py
Created October 31, 2024 07:17
Generate chromatogram from old akta excel files.
import pandas as pd
import matplotlib.pyplot as plt
from typing import List, Tuple
import os
def read_excel_file(file_path: str) -> pd.DataFrame:
return pd.read_excel(file_path, index_col=False, skiprows=[0,1])
def rename_columns(df: pd.DataFrame) -> pd.DataFrame:
df.columns = ['ml', 'mAU', 'ml_%B', '%B', 'ml_pH', 'pH', 'ml_Frac', 'Frac']
@partrita
partrita / simStock.py
Created October 25, 2024 01:18
์ฃผ์‹ํˆฌ์ž ๋ฐฑํ…Œ์ŠคํŒ… ์ฝ”๋“œ
import FinanceDataReader as fdr
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
from typing import List, Dict, Any, Tuple
plt.rcParams['font.family'] = 'Malgun Gothic'
plt.rcParams['axes.unicode_minus'] = False
@partrita
partrita / png2gif.py
Last active September 30, 2024 06:43
๋‹ค์ˆ˜์˜ png ํŒŒ์ผ๋กœ gif ๋งŒ๋“œ๋Š” ํŒŒ์ด์ฌ ์Šคํฌ๋ฆฝํŠธ
import os
from PIL import Image
import argparse
from typing import List, Optional
def generate_gif(path: str, duration: int = 100) -> Optional[str]:
# PNG ํŒŒ์ผ๋งŒ ํ•„ํ„ฐ๋ง
img_list: List[str] = [f for f in os.listdir(path) if f.lower().endswith('.png')]
# ํŒŒ์ผ๋ช…์œผ๋กœ ์ •๋ ฌ