๐ง
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [tool.ruff] | |
| line-length = 119 | |
| target-version = "py312" | |
| lint.select = ["PLE", "PLW", "E", "W", "F", "I", "Q", "UP", "C4", "PT"] | |
| [tool.mypy] | |
| python_version = "3.12" | |
| strict = false | |
| check_untyped_defs = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cat list.txt | xargs -n 1 -P (python3 -c "import multiprocessing as m;print(m.cpu_count()*2)") -I {} yt-dlp -N (python3 -c "import multiprocessing as m;print(m.cpu_count()*2)") \ | |
| --embed-thumbnail --embed-metadata --embed-subs --embed-chapters --embed-info-json -f "bestvideo+bestaudio" --merge-output-format "mp4" --write-subs --convert-subs srt --cookies-from-browser brave {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # License: MIT | |
| from collections.abc import Callable | |
| from functools import wraps | |
| from typing import Any, TypeVar | |
| from django.db import models | |
| from django.db.models.fields import reverse_related | |
| T = TypeVar("T", bound=models.Model) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ast | |
| from concurrent.futures import ProcessPoolExecutor | |
| from pathlib import Path | |
| import typer | |
| from rich import print | |
| from typer import Typer | |
| def is_method_parameter_type_hinted(node: ast.FunctionDef | ast.AsyncFunctionDef) -> bool: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import re | |
| from pathlib import Path | |
| from typing import Optional, cast | |
| import pysrt | |
| import typer | |
| from rich import print | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "runtime" | |
| "strings" | |
| "github.com/spf13/pflag" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import os | |
| import shutil | |
| import subprocess | |
| try: | |
| from rich.console import Console | |
| from rich.style import Style | |
| except ImportError: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ๋น์ ์ SrtTranslationGPT์ ๋๋ค. | |
| - ์ฌ์ฉ์๋ ๋น์ ์๊ฒ SRT ํ์ผ์ ์ ์ฒด๋ ์ผ๋ถ๋ฅผ ์ ๊ณต ํฉ๋๋ค. | |
| - ๋น์ ์ ๊ณผ์ ๋ SRT ์๋ง ํ์ผ์ ๋ฒ์ญ ๋๋ ์์ญํ๋ ๊ฒ์ ๋๋ค. | |
| - ๋ฒ์ญ๊ณผ ์์ญ์ ์์ฐ์ค๋ฌ์ด ๊ตฌ์ด์ฒด ํ๊ตญ์ด๋ก ์ด๋ฃจ์ด์ ธ์ผํฉ๋๋ค. | |
| - ์์ญ์ ๋ชฉ์ ์ ์ํ๊ฐ ์๋ ๋งฅ๋ฝ์ ๋ง์ง ์๋ ์ด์ํ ๋ง์ ๋งฅ๋ฝ์ ์์ฐ์ค๋ฝ๊ฒ ๋ฃ๋๊ฒ์ ๋ชฉ์ ์ด ์์ต๋๋ค. | |
| ๋น์ ์ ๋ชฉํ๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค. | |
| - ์ ๊ณต๋๋ ์๋ง์ ์์ฑ์ธ์ ๊ธฐ๋ฅ์ ํตํด ์์ฑ๋์์ ์ ์๊ธฐ ๋๋ฌธ์, ๋งฅ๋ฝ์ ์ด์ํ ๋ฌธ์ฅ์ด ์์ต๋๋ค. ์ด ๊ฒฝ์ฐ ๋งฅ๋ฝ์, ๊ทธ๋ฆฌ๊ณ ์ ๊ณต๋๋ ์ถ๊ฐ์ ์ธ ์์ฒญ ์ฌํญ์ ์ฐธ๊ณ ํด ์ ์ ํ ๋ด์ฉ์ผ๋ก ๋์ฒดํด์ ์์ญํด์ฃผ์ธ์. | |
| - ์ดํดํ ์ ์๋ ๋จ์ด๋ฅผ ์ ๊ฑฐ๋ ๋จ์ ์์ฐจ๋ ๊ธ์ง๋ฉ๋๋ค. ๋ชจ๋ ๋ฌธ์ฅ์ ํ๊ตญ์ธ์ด ์ดํดํ ์ ์๋ ์์ฐ์ค๋ฌ์ด ๋ฌธ์ฅ์ด์ด์ผํฉ๋๋ค.. | |
| - ์ผ๊ด์ฑ ์๊ณ ์ฝ๊ธฐ ํธํ ์์ฐ์ค๋ฌ์ด ๋ฒ์ญ์ ์ํด ์ต์ ์ ๋คํ์ธ์. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import TYPE_CHECKING, Optional | |
| def import_or_install(package: str, submodule: Optional[str] = None): | |
| try: | |
| if submodule: | |
| module = __import__(f"{package}.{submodule}", fromlist=[submodule]) | |
| else: | |
| module = __import__(package) | |
| return module |