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')]
# 파일명으로 정렬