repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/extractor/youtube/pot/__init__.py | yt_dlp/extractor/youtube/pot/__init__.py | # Trigger import of built-in providers
from ._builtin.memory_cache import MemoryLRUPCP as _MemoryLRUPCP # noqa: F401
from ._builtin.webpo_cachespec import WebPoPCSP as _WebPoPCSP # noqa: F401
| python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/extractor/youtube/pot/_provider.py | yt_dlp/extractor/youtube/pot/_provider.py | from __future__ import annotations
import abc
import enum
import functools
from yt_dlp.extractor.common import InfoExtractor
from yt_dlp.utils import NO_DEFAULT, bug_reports_message, classproperty, traverse_obj
from yt_dlp.version import __version__
# xxx: these could be generalized outside YoutubeIE eventually
cl... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/extractor/youtube/pot/cache.py | yt_dlp/extractor/youtube/pot/cache.py | """PUBLIC API"""
from __future__ import annotations
import abc
import dataclasses
import enum
import typing
from yt_dlp.extractor.youtube.pot._provider import (
IEContentProvider,
IEContentProviderError,
register_preference_generic,
register_provider_generic,
)
from yt_dlp.extractor.youtube.pot._regi... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/extractor/youtube/pot/provider.py | yt_dlp/extractor/youtube/pot/provider.py | """PUBLIC API"""
from __future__ import annotations
import abc
import copy
import dataclasses
import enum
import functools
import typing
import urllib.parse
from yt_dlp.cookies import YoutubeDLCookieJar
from yt_dlp.extractor.youtube.pot._provider import (
IEContentProvider,
IEContentProviderError,
regist... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/extractor/youtube/pot/_registry.py | yt_dlp/extractor/youtube/pot/_registry.py | from yt_dlp.globals import Indirect
_pot_providers = Indirect({})
_ptp_preferences = Indirect(set())
_pot_pcs_providers = Indirect({})
_pot_cache_providers = Indirect({})
_pot_cache_provider_preferences = Indirect(set())
_pot_memory_cache = Indirect({})
| python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/extractor/youtube/pot/_builtin/webpo_cachespec.py | yt_dlp/extractor/youtube/pot/_builtin/webpo_cachespec.py | from __future__ import annotations
from yt_dlp.extractor.youtube.pot._provider import BuiltinIEContentProvider
from yt_dlp.extractor.youtube.pot.cache import (
CacheProviderWritePolicy,
PoTokenCacheSpec,
PoTokenCacheSpecProvider,
register_spec,
)
from yt_dlp.extractor.youtube.pot.provider import (
... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/extractor/youtube/pot/_builtin/memory_cache.py | yt_dlp/extractor/youtube/pot/_builtin/memory_cache.py | from __future__ import annotations
import datetime as dt
import typing
from threading import Lock
from yt_dlp.extractor.youtube.pot._provider import BuiltinIEContentProvider
from yt_dlp.extractor.youtube.pot._registry import _pot_memory_cache
from yt_dlp.extractor.youtube.pot.cache import (
PoTokenCacheProvider,
... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/extractor/youtube/pot/_builtin/__init__.py | yt_dlp/extractor/youtube/pot/_builtin/__init__.py | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false | |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/compat/_legacy.py | yt_dlp/compat/_legacy.py | """ Do not use! """
import base64
import collections
import ctypes
import getpass
import html.entities
import html.parser
import http.client
import http.cookiejar
import http.cookies
import http.server
import itertools
import os
import shlex
import shutil
import socket
import struct
import subprocess
import tokenize
i... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/compat/shutil.py | yt_dlp/compat/shutil.py | # flake8: noqa: F405
from shutil import * # noqa: F403
from .compat_utils import passthrough_module
passthrough_module(__name__, 'shutil')
del passthrough_module
import sys
if sys.platform.startswith('freebsd'):
import errno
import os
import shutil
# Workaround for PermissionError when using rest... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/compat/_deprecated.py | yt_dlp/compat/_deprecated.py | """Deprecated - New code should avoid these"""
import warnings
from .compat_utils import passthrough_module
# XXX: Implement this the same way as other DeprecationWarnings without circular import
passthrough_module(__name__, '.._legacy', callback=lambda attr: warnings.warn(
DeprecationWarning(f'{__name__}.{attr} ... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/compat/__init__.py | yt_dlp/compat/__init__.py | import datetime as dt
import os
import xml.etree.ElementTree as etree
from .compat_utils import passthrough_module
passthrough_module(__name__, '._deprecated')
del passthrough_module
# HTMLParseError has been deprecated in Python 3.3 and removed in
# Python 3.5. Introducing dummy exception for Python >3.5 for compa... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/compat/imghdr.py | yt_dlp/compat/imghdr.py | def what(file=None, h=None):
"""Detect format of image (Currently supports jpeg, png, webp, gif only)
Ref: https://github.com/python/cpython/blob/3.11/Lib/imghdr.py
Ref: https://www.w3.org/Graphics/JPEG/itu-t81.pdf
"""
if h is None:
with open(file, 'rb') as f:
h = f.read(12)
... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/compat/compat_utils.py | yt_dlp/compat/compat_utils.py | import collections
import contextlib
import functools
import importlib
import sys
import types
_NO_ATTRIBUTE = object()
_Package = collections.namedtuple('Package', ('name', 'version'))
def get_package_info(module):
return _Package(
name=getattr(module, '_yt_dlp__identifier', module.__name__),
v... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/compat/urllib/request.py | yt_dlp/compat/urllib/request.py | # flake8: noqa: F405
from urllib.request import * # noqa: F403
from ..compat_utils import passthrough_module
passthrough_module(__name__, 'urllib.request')
del passthrough_module
import os
if os.name == 'nt':
# On older Python versions, proxies are extracted from Windows registry erroneously. [1]
# If the... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/compat/urllib/__init__.py | yt_dlp/compat/urllib/__init__.py | # flake8: noqa: F405
from urllib import * # noqa: F403
del request # noqa: F821
from . import request # noqa: F401
from ..compat_utils import passthrough_module
passthrough_module(__name__, 'urllib')
del passthrough_module
| python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/dependencies/Cryptodome.py | yt_dlp/dependencies/Cryptodome.py | from ..compat.compat_utils import passthrough_module
try:
import Cryptodome as _parent
except ImportError:
try:
import Crypto as _parent
except (ImportError, SyntaxError): # Old Crypto gives SyntaxError in newer Python
_parent = passthrough_module(__name__, 'no_Cryptodome')
__bool_... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/dependencies/__init__.py | yt_dlp/dependencies/__init__.py | # flake8: noqa: F401
"""Imports all optional dependencies for the project.
An attribute "_yt_dlp__identifier" may be inserted into the module if it uses an ambiguous namespace"""
try:
import brotlicffi as brotli
except ImportError:
try:
import brotli
except ImportError:
brotli = None
try:... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/utils/_jsruntime.py | yt_dlp/utils/_jsruntime.py | from __future__ import annotations
import abc
import dataclasses
import functools
import os.path
import sys
from ._utils import _get_exe_version_output, detect_exe_version, version_tuple
_FALLBACK_PATHEXT = ('.COM', '.EXE', '.BAT', '.CMD')
def _find_exe(basename: str) -> str:
if os.name != 'nt':
retur... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/utils/_legacy.py | yt_dlp/utils/_legacy.py | """No longer used and new code should not use. Exists only for API compat."""
import platform
import struct
import sys
import urllib.error
import urllib.parse
import urllib.request
import zlib
from ._utils import Popen, decode_base_n, preferredencoding
from .traversal import traverse_obj
from ..dependencies import cer... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/utils/networking.py | yt_dlp/utils/networking.py | from __future__ import annotations
import collections
import collections.abc
import random
import typing
import urllib.parse
import urllib.request
if typing.TYPE_CHECKING:
T = typing.TypeVar('T')
from ._utils import NO_DEFAULT, remove_start, format_field
from .traversal import traverse_obj
def random_user_agen... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/utils/_deprecated.py | yt_dlp/utils/_deprecated.py | """Deprecated - New code should avoid these"""
import base64
import hashlib
import hmac
import json
import warnings
from ..compat.compat_utils import passthrough_module
# XXX: Implement this the same way as other DeprecationWarnings without circular import
passthrough_module(__name__, '.._legacy', callback=lambda att... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/utils/progress.py | yt_dlp/utils/progress.py | from __future__ import annotations
import bisect
import threading
import time
class ProgressCalculator:
# Time to calculate the speed over (seconds)
SAMPLING_WINDOW = 3
# Minimum timeframe before to sample next downloaded bytes (seconds)
SAMPLING_RATE = 0.05
# Time before showing eta (seconds)
... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/utils/__init__.py | yt_dlp/utils/__init__.py | # flake8: noqa: F403
from ..compat.compat_utils import passthrough_module
passthrough_module(__name__, '._deprecated')
del passthrough_module
# isort: off
from .traversal import *
from ._utils import *
from ._utils import _configuration_args, _get_exe_version_output # noqa: F401
| python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/utils/_utils.py | yt_dlp/utils/_utils.py | import base64
import binascii
import calendar
import codecs
import collections
import collections.abc
import contextlib
import datetime as dt
import email.header
import email.utils
import enum
import errno
import functools
import hashlib
import hmac
import html.entities
import html.parser
import inspect
import io
impor... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | true |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/utils/traversal.py | yt_dlp/utils/traversal.py | from __future__ import annotations
import collections
import collections.abc
import contextlib
import functools
import http.cookies
import inspect
import itertools
import re
import typing
import xml.etree.ElementTree
from ._utils import (
IDENTITY,
NO_DEFAULT,
ExtractorError,
LazyList,
deprecation... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/utils/jslib/devalue.py | yt_dlp/utils/jslib/devalue.py | from __future__ import annotations
import array
import base64
import datetime as dt
import math
import re
from .._utils import parse_iso8601
TYPE_CHECKING = False
if TYPE_CHECKING:
import collections.abc
import typing
T = typing.TypeVar('T')
_ARRAY_TYPE_LOOKUP = {
'Int8Array': 'b',
'Uint8Array... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/utils/jslib/__init__.py | yt_dlp/utils/jslib/__init__.py | # Utility functions for handling web input based on commonly used JavaScript libraries
| python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/networking/_urllib.py | yt_dlp/networking/_urllib.py | from __future__ import annotations
import functools
import http.client
import io
import ssl
import urllib.error
import urllib.parse
import urllib.request
import urllib.response
import zlib
from urllib.request import (
DataHandler,
FileHandler,
FTPHandler,
HTTPCookieProcessor,
HTTPDefaultErrorHandle... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/networking/impersonate.py | yt_dlp/networking/impersonate.py | from __future__ import annotations
import re
from abc import ABC
from dataclasses import dataclass
from types import NoneType
from typing import Any
from .common import RequestHandler, register_preference, Request
from .exceptions import UnsupportedRequest
from ..utils import classproperty, join_nonempty
from ..utils... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/networking/common.py | yt_dlp/networking/common.py | from __future__ import annotations
import abc
import copy
import enum
import functools
import io
import typing
import urllib.parse
import urllib.request
import urllib.response
from collections.abc import Iterable, Mapping
from email.message import Message
from http import HTTPStatus
from types import NoneType
from ._... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/networking/websocket.py | yt_dlp/networking/websocket.py | from __future__ import annotations
import abc
from .common import RequestHandler, Response
class WebSocketResponse(Response):
def send(self, message: bytes | str):
"""
Send a message to the server.
@param message: The message to send. A string (str) is sent as a text frame, bytes is se... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/networking/exceptions.py | yt_dlp/networking/exceptions.py | from __future__ import annotations
import typing
from ..utils import YoutubeDLError
if typing.TYPE_CHECKING:
from .common import RequestHandler, Response
class RequestError(YoutubeDLError):
def __init__(
self,
msg: str | None = None,
cause: Exception | str | None = None,
han... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/networking/_requests.py | yt_dlp/networking/_requests.py | from __future__ import annotations
import functools
import http.client
import logging
import re
import warnings
from ..dependencies import brotli, requests, urllib3
from ..utils import bug_reports_message, int_or_none, variadic
from ..utils.networking import normalize_url, select_proxy
if requests is None:
raise... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/networking/_curlcffi.py | yt_dlp/networking/_curlcffi.py | from __future__ import annotations
import io
import itertools
import math
import re
import urllib.parse
from ._helper import InstanceStoreMixin
from ..utils.networking import select_proxy
from .common import (
Features,
Request,
Response,
register_preference,
register_rh,
)
from .exceptions import... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/networking/_helper.py | yt_dlp/networking/_helper.py | from __future__ import annotations
import contextlib
import functools
import os
import socket
import ssl
import sys
import typing
import urllib.parse
import urllib.request
from .exceptions import RequestError
from ..dependencies import certifi
from ..socks import ProxyType, sockssocket
if typing.TYPE_CHECKING:
f... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/networking/_websockets.py | yt_dlp/networking/_websockets.py | from __future__ import annotations
import contextlib
import functools
import io
import logging
import ssl
import sys
from ._helper import (
create_connection,
create_socks_proxy_socket,
make_socks_proxy_opts,
)
from ..utils.networking import select_proxy
from .common import Features, Response, register_rh... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/networking/__init__.py | yt_dlp/networking/__init__.py | # flake8: noqa: F401
import warnings
from .common import (
HEADRequest,
PATCHRequest,
PUTRequest,
Request,
RequestDirector,
RequestHandler,
Response,
)
# isort: split
# TODO: all request handlers should be safely imported
from . import _urllib
from ..utils import bug_reports_message
try:
... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/postprocessor/modify_chapters.py | yt_dlp/postprocessor/modify_chapters.py | import copy
import heapq
import os
from .common import PostProcessor
from .ffmpeg import FFmpegPostProcessor, FFmpegSubtitlesConvertorPP
from .sponsorblock import SponsorBlockPP
from ..utils import PostProcessingError, orderedSet, prepend_extension
_TINY_CHAPTER_DURATION = 1
DEFAULT_SPONSORBLOCK_CHAPTER_TITLE = '[Spo... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/postprocessor/sponsorblock.py | yt_dlp/postprocessor/sponsorblock.py | import hashlib
import json
import re
import urllib.parse
from .ffmpeg import FFmpegPostProcessor
class SponsorBlockPP(FFmpegPostProcessor):
# https://wiki.sponsor.ajay.app/w/Types
EXTRACTORS = {
'Youtube': 'YouTube',
}
POI_CATEGORIES = {
'poi_highlight': 'Highlight',
}
NON_SKI... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/postprocessor/metadataparser.py | yt_dlp/postprocessor/metadataparser.py | import re
from .common import PostProcessor
from ..utils import Namespace, filter_dict, function_with_repr
class MetadataParserPP(PostProcessor):
def __init__(self, downloader, actions):
super().__init__(downloader)
self._actions = []
for f in actions:
action, *args = f
... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/postprocessor/common.py | yt_dlp/postprocessor/common.py | import functools
import json
import os
from ..networking import Request
from ..networking.exceptions import HTTPError, network_exceptions
from ..utils import (
PostProcessingError,
RetryManager,
_configuration_args,
deprecation_warning,
)
from ..utils._utils import _ProgressState
class PostProcessorM... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/postprocessor/ffmpeg.py | yt_dlp/postprocessor/ffmpeg.py | import collections
import contextvars
import functools
import itertools
import json
import os
import re
import subprocess
import time
from .common import PostProcessor
from ..compat import imghdr
from ..utils import (
MEDIA_EXTENSIONS,
ISO639Utils,
Popen,
PostProcessingError,
_get_exe_version_outpu... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | true |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/postprocessor/movefilesafterdownload.py | yt_dlp/postprocessor/movefilesafterdownload.py | import os
from .common import PostProcessor
from ..compat import shutil
from ..utils import (
PostProcessingError,
make_dir,
)
class MoveFilesAfterDownloadPP(PostProcessor):
def __init__(self, downloader=None, downloaded=True):
PostProcessor.__init__(self, downloader)
self._downloaded = ... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/postprocessor/xattrpp.py | yt_dlp/postprocessor/xattrpp.py | import os
import sys
from .common import PostProcessor
from ..utils import (
PostProcessingError,
XAttrMetadataError,
XAttrUnavailableError,
hyphenate_date,
write_xattr,
)
class XAttrMetadataPP(PostProcessor):
"""Set extended attributes on downloaded file (if xattr support is found)
More... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/postprocessor/__init__.py | yt_dlp/postprocessor/__init__.py | # flake8: noqa: F401
from .common import PostProcessor
from .embedthumbnail import EmbedThumbnailPP
from .exec import ExecAfterDownloadPP, ExecPP
from .ffmpeg import (
FFmpegConcatPP,
FFmpegCopyStreamPP,
FFmpegEmbedSubtitlePP,
FFmpegExtractAudioPP,
FFmpegFixupDuplicateMoovPP,
FFmpegFixupDuratio... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/postprocessor/embedthumbnail.py | yt_dlp/postprocessor/embedthumbnail.py | import base64
import os
import re
import subprocess
from .common import PostProcessor
from .ffmpeg import FFmpegPostProcessor, FFmpegThumbnailsConvertorPP
from ..compat import imghdr
from ..dependencies import mutagen
from ..utils import (
Popen,
PostProcessingError,
check_executable,
encodeArgument,
... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/postprocessor/exec.py | yt_dlp/postprocessor/exec.py | from .common import PostProcessor
from ..utils import Popen, PostProcessingError, shell_quote, variadic
class ExecPP(PostProcessor):
def __init__(self, downloader, exec_cmd):
PostProcessor.__init__(self, downloader)
self.exec_cmd = variadic(exec_cmd)
def parse_cmd(self, cmd, info):
t... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/niconico.py | yt_dlp/downloader/niconico.py | import json
import threading
import time
from .common import FileDownloader
from .external import FFmpegFD
from ..networking import Request
from ..networking.websocket import WebSocketResponse
from ..utils import DownloadError, str_or_none, truncate_string
from ..utils.traversal import traverse_obj
class NiconicoLiv... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/fragment.py | yt_dlp/downloader/fragment.py | import concurrent.futures
import contextlib
import json
import math
import os
import struct
import time
from .common import FileDownloader
from .http import HttpFD
from ..aes import aes_cbc_decrypt_bytes, unpad_pkcs7
from ..networking import Request
from ..networking.exceptions import HTTPError, IncompleteRead
from ..... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/hls.py | yt_dlp/downloader/hls.py | import binascii
import io
import re
import urllib.parse
from . import get_suitable_downloader
from .external import FFmpegFD
from .fragment import FragmentFD
from .. import webvtt
from ..dependencies import Cryptodome
from ..utils import (
bug_reports_message,
parse_m3u8_attributes,
remove_start,
trave... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/http.py | yt_dlp/downloader/http.py | import os
import random
import time
from .common import FileDownloader
from ..networking import Request
from ..networking.exceptions import (
CertificateVerifyError,
HTTPError,
TransportError,
)
from ..utils import (
ContentTooShortError,
RetryManager,
ThrottledDownload,
int_or_none,
pa... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/common.py | yt_dlp/downloader/common.py | import contextlib
import errno
import functools
import os
import random
import re
import threading
import time
from ..minicurses import (
BreaklineStatusPrinter,
MultilineLogger,
MultilinePrinter,
QuietMultilinePrinter,
)
from ..utils import (
IDENTITY,
NO_DEFAULT,
LockingUnsupportedError,
... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/fc2.py | yt_dlp/downloader/fc2.py | import threading
from .common import FileDownloader
from .external import FFmpegFD
class FC2LiveFD(FileDownloader):
"""
Downloads FC2 live without being stopped. <br>
Note, this is not a part of public API, and will be removed without notice.
DO NOT USE
"""
def real_download(self, filename, ... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/f4m.py | yt_dlp/downloader/f4m.py | import base64
import io
import itertools
import struct
import time
import urllib.parse
from .fragment import FragmentFD
from ..compat import compat_etree_fromstring
from ..networking.exceptions import HTTPError
from ..utils import fix_xml_ampersands, xpath_text
class DataTruncatedError(Exception):
pass
class F... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/bunnycdn.py | yt_dlp/downloader/bunnycdn.py | import hashlib
import random
import threading
from .common import FileDownloader
from . import HlsFD
from ..networking import Request
from ..networking.exceptions import network_exceptions
class BunnyCdnFD(FileDownloader):
"""
Downloads from BunnyCDN with required pings
Note, this is not a part of public... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/websocket.py | yt_dlp/downloader/websocket.py | import asyncio
import contextlib
import os
import signal
import threading
from .common import FileDownloader
from .external import FFmpegFD
from ..dependencies import websockets
class FFmpegSinkFD(FileDownloader):
""" A sink to ffmpeg for downloading fragments in any form """
def real_download(self, filenam... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/mhtml.py | yt_dlp/downloader/mhtml.py | import io
import quopri
import re
import uuid
from .fragment import FragmentFD
from ..compat import imghdr
from ..utils import escapeHTML, formatSeconds, srt_subtitles_timecode, urljoin
from ..version import __version__ as YT_DLP_VERSION
class MhtmlFD(FragmentFD):
_STYLESHEET = '''\
html, body {
margin: 0;
... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/dash.py | yt_dlp/downloader/dash.py | import time
import urllib.parse
from . import get_suitable_downloader
from .fragment import FragmentFD
from ..utils import ReExtractInfo, update_url_query, urljoin
class DashSegmentsFD(FragmentFD):
"""
Download segments in a DASH manifest. External downloaders can take over
the fragment downloads by supp... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/rtsp.py | yt_dlp/downloader/rtsp.py | import os
import subprocess
from .common import FileDownloader
from ..utils import check_executable
class RtspFD(FileDownloader):
def real_download(self, filename, info_dict):
url = info_dict['url']
self.report_destination(filename)
tmpfilename = self.temp_name(filename)
if check... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/external.py | yt_dlp/downloader/external.py | import enum
import functools
import json
import os
import re
import subprocess
import sys
import tempfile
import time
import uuid
from .fragment import FragmentFD
from ..networking import Request
from ..postprocessor.ffmpeg import EXT_TO_OUT_FORMATS, FFmpegPostProcessor
from ..utils import (
Popen,
RetryManage... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/ism.py | yt_dlp/downloader/ism.py | import binascii
import io
import struct
import time
from .fragment import FragmentFD
from ..networking.exceptions import HTTPError
from ..utils import RetryManager
u8 = struct.Struct('>B')
u88 = struct.Struct('>Bx')
u16 = struct.Struct('>H')
u1616 = struct.Struct('>Hxx')
u32 = struct.Struct('>I')
u64 = struct.Struct(... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/__init__.py | yt_dlp/downloader/__init__.py | from ..utils import NO_DEFAULT, determine_protocol
def get_suitable_downloader(info_dict, params={}, default=NO_DEFAULT, protocol=None, to_stdout=False):
info_dict['protocol'] = determine_protocol(info_dict)
info_copy = info_dict.copy()
info_copy['to_stdout'] = to_stdout
protocols = (protocol or info... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/youtube_live_chat.py | yt_dlp/downloader/youtube_live_chat.py | import json
import time
from .fragment import FragmentFD
from ..networking.exceptions import HTTPError
from ..utils import (
RegexNotFoundError,
RetryManager,
dict_get,
int_or_none,
try_get,
)
from ..utils.networking import HTTPHeaderDict
class YoutubeLiveChatFD(FragmentFD):
""" Downloads You... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/downloader/rtmp.py | yt_dlp/downloader/rtmp.py | import os
import re
import subprocess
import time
from .common import FileDownloader
from ..utils import (
Popen,
check_executable,
encodeArgument,
get_exe_version,
)
def rtmpdump_version():
return get_exe_version(
'rtmpdump', ['--help'], r'(?i)RTMPDump\s*v?([0-9a-zA-Z._-]+)')
class Rtm... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/__pyinstaller/hook-yt_dlp.py | yt_dlp/__pyinstaller/hook-yt_dlp.py | import sys
from PyInstaller.utils.hooks import collect_submodules, collect_data_files
def pycryptodome_module():
try:
import Cryptodome # noqa: F401
except ImportError:
try:
import Crypto # noqa: F401
print('WARNING: Using Crypto since Cryptodome is not available. '
... | python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
yt-dlp/yt-dlp | https://github.com/yt-dlp/yt-dlp/blob/5a481d65fa99862110bb84d10a2f15f0cb47cab3/yt_dlp/__pyinstaller/__init__.py | yt_dlp/__pyinstaller/__init__.py | import os
def get_hook_dirs():
return [os.path.dirname(__file__)]
| python | Unlicense | 5a481d65fa99862110bb84d10a2f15f0cb47cab3 | 2026-01-04T14:38:15.430780Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/example_scenes.py | example_scenes.py | from manimlib import *
import numpy as np
# To watch one of these scenes, run the following:
# manimgl example_scenes.py OpeningManimExample
# Use -s to skip to the end and just save the final frame
# Use -w to write the animation to a file
# Use -o to write it to a file and open it once done
# Use -n <number> to skip... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/setup.py | setup.py | import setuptools
setuptools.setup() | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/typing.py | manimlib/typing.py | from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Union, Tuple, Annotated, Literal, Iterable, Dict
from colour import Color
import numpy as np
import re
try:
from typing_extensions import Self
except ImportError:
from typing import Self
# Abbreviations ... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/extract_scene.py | manimlib/extract_scene.py | from __future__ import annotations
import copy
import inspect
import sys
from manimlib.module_loader import ModuleLoader
from manimlib.config import manim_config
from manimlib.logger import log
from manimlib.scene.interactive_scene import InteractiveScene
from manimlib.scene.scene import Scene
from typing import TY... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/constants.py | manimlib/constants.py | from __future__ import annotations
import numpy as np
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import List
from manimlib.typing import ManimColor, Vect3
# See manimlib/default_config.yml
from manimlib.config import manim_config
DEFAULT_RESOLUTION: tuple[int, int] = manim_config.camera.... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/logger.py | manimlib/logger.py | import logging
from rich.logging import RichHandler
__all__ = ["log"]
FORMAT = "%(message)s"
logging.basicConfig(
level=logging.WARNING, format=FORMAT, datefmt="[%X]", handlers=[RichHandler()]
)
log = logging.getLogger("manimgl")
| python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/__main__.py | manimlib/__main__.py | #!/usr/bin/env python
from addict import Dict
from manimlib import __version__
from manimlib.config import manim_config
from manimlib.config import parse_cli
import manimlib.extract_scene
from manimlib.utils.cache import clear_cache
from manimlib.window import Window
from IPython.terminal.embed import KillEmbedded
... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/module_loader.py | manimlib/module_loader.py | from __future__ import annotations
import builtins
import importlib
import os
import sys
import sysconfig
from manimlib.config import manim_config
from manimlib.logger import log
Module = importlib.util.types.ModuleType
class ModuleLoader:
"""
Utility class to load a module from a file and handle its impor... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/config.py | manimlib/config.py | from __future__ import annotations
import argparse
import colour
import importlib
import inspect
import os
import sys
import yaml
from pathlib import Path
from ast import literal_eval
from addict import Dict
from manimlib.logger import log
from manimlib.utils.dict_ops import merge_dicts_recursively
from typing impor... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/__init__.py | manimlib/__init__.py | import pkg_resources
__version__ = pkg_resources.get_distribution("manimgl").version
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from manimlib.typing import *
from manimlib.constants import *
from manimlib.window import *
from manimlib.animation.animation import *
from manimlib.animation.composition im... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/shader_wrapper.py | manimlib/shader_wrapper.py | from __future__ import annotations
import copy
import os
import re
import OpenGL.GL as gl
import moderngl
import numpy as np
from functools import lru_cache
from manimlib.config import parse_cli
from manimlib.config import manim_config
from manimlib.utils.shaders import get_shader_code_from_file
from manimlib.utils.... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/window.py | manimlib/window.py | from __future__ import annotations
import numpy as np
import moderngl_window as mglw
from moderngl_window.context.pyglet.window import Window as PygletWindow
from moderngl_window.timers.clock import Timer
from functools import wraps
import screeninfo
from manimlib.constants import ASPECT_RATIO
from manimlib.constant... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/event_handler/event_listner.py | manimlib/event_handler/event_listner.py | from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Callable
from manimlib.event_handler.event_type import EventType
from manimlib.mobject.mobject import Mobject
class EventListener(object):
def __init__(
self,
mobject: Mobject,
... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/event_handler/event_dispatcher.py | manimlib/event_handler/event_dispatcher.py | from __future__ import annotations
import numpy as np
from manimlib.event_handler.event_listner import EventListener
from manimlib.event_handler.event_type import EventType
class EventDispatcher(object):
def __init__(self):
self.event_listners: dict[
EventType, list[EventListener]
] ... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/event_handler/__init__.py | manimlib/event_handler/__init__.py | from manimlib.event_handler.event_dispatcher import EventDispatcher
# This is supposed to be a Singleton
# i.e., during runtime there should be only one object of Event Dispatcher
EVENT_DISPATCHER = EventDispatcher()
| python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/event_handler/event_type.py | manimlib/event_handler/event_type.py | from enum import Enum
class EventType(Enum):
MouseMotionEvent = 'mouse_motion_event'
MousePressEvent = 'mouse_press_event'
MouseReleaseEvent = 'mouse_release_event'
MouseDragEvent = 'mouse_drag_event'
MouseScrollEvent = 'mouse_scroll_event'
KeyPressEvent = 'key_press_event'
KeyReleaseEvent... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/camera/camera_frame.py | manimlib/camera/camera_frame.py | from __future__ import annotations
import math
import warnings
import numpy as np
from scipy.spatial.transform import Rotation
from manimlib.constants import DEG, RADIANS
from manimlib.constants import FRAME_SHAPE
from manimlib.constants import DOWN, LEFT, ORIGIN, OUT, RIGHT, UP
from manimlib.constants import PI
fro... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/camera/camera.py | manimlib/camera/camera.py | from __future__ import annotations
import moderngl
import numpy as np
import OpenGL.GL as gl
from PIL import Image
from manimlib.camera.camera_frame import CameraFrame
from manimlib.constants import BLACK
from manimlib.constants import DEFAULT_RESOLUTION
from manimlib.constants import FRAME_HEIGHT
from manimlib.const... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/camera/__init__.py | manimlib/camera/__init__.py | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false | |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/scene/scene_embed.py | manimlib/scene/scene_embed.py | from __future__ import annotations
import inspect
import pyperclip
import traceback
from IPython.terminal import pt_inputhooks
from IPython.terminal.embed import InteractiveShellEmbed
from manimlib.animation.fading import VFadeInThenOut
from manimlib.config import manim_config
from manimlib.constants import RED
from... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/scene/interactive_scene.py | manimlib/scene/interactive_scene.py | from __future__ import annotations
import itertools as it
import numpy as np
import pyperclip
from IPython.core.getipython import get_ipython
from pyglet.window import key as PygletWindowKeys
from manimlib.animation.fading import FadeIn
from manimlib.config import manim_config
from manimlib.constants import DL, DOWN,... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/scene/__init__.py | manimlib/scene/__init__.py | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false | |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/scene/scene.py | manimlib/scene/scene.py | from __future__ import annotations
from collections import OrderedDict
import platform
import random
import time
from functools import wraps
from contextlib import contextmanager
from contextlib import ExitStack
import numpy as np
from tqdm.auto import tqdm as ProgressDisplay
from pyglet.window import key as PygletWi... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/scene/scene_file_writer.py | manimlib/scene/scene_file_writer.py | from __future__ import annotations
import os
import platform
import shutil
import subprocess as sp
import sys
import numpy as np
from pydub import AudioSegment
from tqdm.auto import tqdm as ProgressDisplay
from pathlib import Path
from manimlib.logger import log
from manimlib.mobject.mobject import Mobject
from mani... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/utils/file_ops.py | manimlib/utils/file_ops.py | from __future__ import annotations
import os
from pathlib import Path
import hashlib
import numpy as np
import validators
import urllib.request
import manimlib.utils.directories
from manimlib.utils.simple_functions import hash_string
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Iterabl... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/utils/tex_file_writing.py | manimlib/utils/tex_file_writing.py | from __future__ import annotations
import os
import re
import yaml
import subprocess
from functools import lru_cache
from pathlib import Path
import tempfile
from manimlib.utils.cache import cache_on_disk
from manimlib.config import manim_config
from manimlib.config import get_manim_dir
from manimlib.logger import l... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/utils/paths.py | manimlib/utils/paths.py | from __future__ import annotations
import math
import numpy as np
from manimlib.constants import OUT
from manimlib.utils.bezier import interpolate
from manimlib.utils.space_ops import get_norm
from manimlib.utils.space_ops import rotation_matrix_transpose
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/utils/tex.py | manimlib/utils/tex.py | from __future__ import annotations
import re
from functools import lru_cache
from manimlib.utils.tex_to_symbol_count import TEX_TO_SYMBOL_COUNT
@lru_cache
def num_tex_symbols(tex: str) -> int:
tex = remove_tex_environments(tex)
commands_pattern = r"""
(?P<sqrt>\\sqrt\[[0-9]+\])| # Special sqrt wi... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/utils/debug.py | manimlib/utils/debug.py | from __future__ import annotations
from manimlib.constants import BLACK
from manimlib.logger import log
from manimlib.mobject.numbers import Integer
from manimlib.mobject.types.vectorized_mobject import VGroup
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from manimlib.mobject.mobject import Mobject
def p... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/utils/iterables.py | manimlib/utils/iterables.py | from __future__ import annotations
from colour import Color
import numpy as np
import random
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Callable, Iterable, Sequence, TypeVar
T = TypeVar("T")
S = TypeVar("S")
def remove_list_redundancies(lst: Sequence[T]) -> list[T]:
"""... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/utils/rate_functions.py | manimlib/utils/rate_functions.py | from __future__ import annotations
import numpy as np
from manimlib.utils.bezier import bezier
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Callable
def linear(t: float) -> float:
return t
def smooth(t: float) -> float:
# Zero first and second derivatives at t=0 and t=1.
... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/utils/simple_functions.py | manimlib/utils/simple_functions.py | from __future__ import annotations
from functools import lru_cache
import hashlib
import inspect
import math
import numpy as np
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Callable, TypeVar, Iterable
from manimlib.typing import FloatArray
Scalable = TypeVar("Scalable", float, F... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
3b1b/manim | https://github.com/3b1b/manim/blob/e5298385edabb34a09cf63743c1a4ec983f1ab11/manimlib/utils/dict_ops.py | manimlib/utils/dict_ops.py | import itertools as it
import numpy as np
def merge_dicts_recursively(*dicts):
"""
Creates a dict whose keyset is the union of all the
input dictionaries. The value for each key is based
on the first dict in the list with that key.
dicts later in the list have higher priority
When values ar... | python | MIT | e5298385edabb34a09cf63743c1a4ec983f1ab11 | 2026-01-04T14:38:15.512738Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.