Skip to content

Instantly share code, notes, and snippets.

View minkj1992's full-sized avatar
🐋

Minwook Je minkj1992

🐋
View GitHub Profile

1. pyenv

for python versions

brew install pyenv
# e.g. pyenv install 3.12 
  • /.zshrc setup
@minkj1992
minkj1992 / const.md
Created September 17, 2024 11:45
Understanding `const` in C++: Internal Workings of Compile-Time vs. Runtime and Stack vs. Heap

Understanding const in C++: Internal Workings of Compile-Time vs. Runtime and Stack vs. Heap

Have you ever wondered how const works internally in C++? This article demystifies the behavior of const by exploring its internal workings in different scenarios: compile-time vs. runtime and stack vs. heap. We'll examine each case with simple code examples and concise explanations.

TL;DR

1. Compile-Time const Variables:

  • Values known at compile time.
  • Stored in RODATA, potentially optimized by the compiler.
  • Hardware-level memory protection may prevent modification.
  • Example: Global const variables.
@minkj1992
minkj1992 / dagcontext-ko.md
Created July 15, 2024 04:25
Airflow DAG 컨텍스트 이해하기: Task는 어떻게 자동으로 DAG를 찾에 연결되는가?

Q: DAG 컨텍스트가 태스크에 미치는 영향?

Airflow에서 with DAG(...) 구문을 사용할 때, DAG 컨텍스트가 생성되는데, 어째서 이 context가 명시적으로 DAG를 대입하지 않아도 t1, t2 같은 태스크들에 영향을 미치는지에 대해서 궁금증이 생겨 정리한 내용입니다.

만약 아래와 같은 dag안에 task들을 정의하는 코드가 있다고 할때,

with DAG(
    "tutorial",
 default_args={...},
@minkj1992
minkj1992 / dagcontext.md
Created July 15, 2024 04:23
Understanding the Airflow DAG Context: How Your Tasks Find Their DAG Automatically

Q: How does the DAG context affect tasks?

When using the with DAG(...) statement in Airflow, a DAG context is created. This article explains why this context affects tasks like t1 and t2 even if the DAG is not explicitly assigned to them.

Consider the following code defining tasks within a DAG:

with DAG(
    "tutorial",
 default_args={...},
@minkj1992
minkj1992 / trigger.md
Last active July 15, 2024 02:19
Airflow Trigger

Airflow의 trigger 개념을 올바르게 반영하여, scheduler, worker, task 등이 어떻게 상호작용하는지 설명해보자면

sequenceDiagram
    participant S as Scheduler
 participant W as Worker
@minkj1992
minkj1992 / dynamic_padding.ipynb
Created July 3, 2024 11:00
Dynamic Padding in pytorch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@minkj1992
minkj1992 / ubuntu.md
Last active May 13, 2024 03:59
Ubuntu useful cli

운영체제 확인법

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal
# cat /etc/os-release 
@minkj1992
minkj1992 / mf_tracking_server.excalidraw
Last active April 8, 2024 11:04
mlflow excalidraw
This file has been truncated, but you can view the full file.
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [
{
"id": "4rHbgk7ycp1eYGRpJRBPy",
"type": "image",
"x": -169.90679066596726,
@minkj1992
minkj1992 / go-version.md
Last active February 14, 2024 11:25
Golang version upgrade

m1, arm64 (silicon)

1. version upgrade

git clone https://github.com/udhos/update-golang
cd update-golang
sudo RELEASE=1.22.0 ./update-golang.sh
@minkj1992
minkj1992 / projects.md
Created February 2, 2024 11:31
mlflow project run
def load_project(directory):
    ...중략...
    
    python_env = yaml_obj.get(env_type.PYTHON)
    if python_env:
        python_env_path = os.path.join(directory, python_env)
        if not os.path.exists(python_env_path):