repo_full_name
stringlengths
6
93
repo_url
stringlengths
25
112
repo_api_url
stringclasses
28 values
owner
stringclasses
28 values
repo_name
stringclasses
28 values
description
stringclasses
28 values
stars
int64
617
98.8k
forks
int64
31
355
watchers
int64
990
999
license
stringclasses
2 values
default_branch
stringclasses
2 values
repo_created_at
timestamp[s]date
2012-07-24 23:12:50
2025-06-16 08:07:28
repo_updated_at
timestamp[s]date
2026-02-23 15:23:15
2026-05-03 18:52:12
repo_topics
listlengths
0
13
repo_languages
unknown
is_fork
bool
1 class
open_issues
int64
3
104
file_path
stringlengths
3
208
file_name
stringclasses
509 values
file_extension
stringclasses
1 value
file_size_bytes
int64
101
84k
file_url
stringclasses
627 values
file_raw_url
stringclasses
627 values
file_sha
stringclasses
624 values
language
stringclasses
8 values
parsed_at
stringdate
2026-05-04 01:12:36
2026-05-04 19:41:55
text
stringlengths
100
102k
pdm-project/pdm
https://github.com/pdm-project/pdm
null
null
null
null
8,608
null
null
mit
null
null
null
null
null
null
null
src/pdm/cli/commands/venv/backends.py
null
null
null
null
null
null
Python
2026-05-04T02:09:20.808805
from __future__ import annotations import abc import os import shutil import subprocess import sys from functools import cached_property from pathlib import Path from typing import TYPE_CHECKING, Any from pdm import termui from pdm.cli.commands.venv.utils import get_venv_prefix from pdm.exceptions import PdmUsageErro...
pdm-project/pdm
https://github.com/pdm-project/pdm
null
null
null
null
8,608
null
null
mit
null
null
null
null
null
null
null
src/pdm/cli/commands/update.py
null
null
null
null
null
null
Python
2026-05-04T02:09:20.809460
from __future__ import annotations import argparse from collections import defaultdict from typing import TYPE_CHECKING from pdm.cli.commands.base import BaseCommand from pdm.cli.filters import GroupSelection from pdm.cli.hooks import HookManager from pdm.cli.options import ( frozen_lockfile_option, groups_gr...
pdm-project/pdm
https://github.com/pdm-project/pdm
null
null
null
null
8,608
null
null
mit
null
null
null
null
null
null
null
src/pdm/cli/commands/venv/activate.py
null
null
null
null
null
null
Python
2026-05-04T02:09:20.836588
from __future__ import annotations import platform import shlex from pathlib import Path from typing import TYPE_CHECKING import shellingham from pdm.cli.commands.base import BaseCommand from pdm.cli.commands.venv.utils import get_venv_with_name from pdm.cli.options import verbose_option from pdm.models.venv import ...
pdm-project/pdm
https://github.com/pdm-project/pdm
null
null
null
null
8,608
null
null
mit
null
null
null
null
null
null
null
src/pdm/cli/commands/venv/create.py
null
null
null
null
null
null
Python
2026-05-04T02:09:20.837355
from __future__ import annotations import argparse from typing import TYPE_CHECKING from pdm.cli.commands.base import BaseCommand from pdm.cli.commands.venv.backends import BACKENDS from pdm.cli.options import verbose_option if TYPE_CHECKING: from argparse import ArgumentParser, Namespace from pdm.project i...
pdm-project/pdm
https://github.com/pdm-project/pdm
null
null
null
null
8,608
null
null
mit
null
null
null
null
null
null
null
src/pdm/cli/commands/use.py
null
null
null
null
null
null
Python
2026-05-04T02:09:20.866353
from __future__ import annotations import argparse from pdm import termui from pdm.cli.commands.base import BaseCommand from pdm.cli.hooks import HookManager from pdm.cli.options import skip_option from pdm.exceptions import NoPythonVersion from pdm.models.caches import JSONFileCache from pdm.models.python import Pyt...
pdm-project/pdm
https://github.com/pdm-project/pdm
null
null
null
null
8,608
null
null
mit
null
null
null
null
null
null
null
src/pdm/cli/commands/venv/purge.py
null
null
null
null
null
null
Python
2026-05-04T02:09:20.948715
from __future__ import annotations import shutil from pathlib import Path from typing import TYPE_CHECKING from pdm import termui from pdm.cli.commands.base import BaseCommand from pdm.cli.commands.venv.utils import iter_central_venvs from pdm.cli.options import verbose_option if TYPE_CHECKING: from argparse imp...
pdm-project/pdm
https://github.com/pdm-project/pdm
null
null
null
null
8,608
null
null
mit
null
null
null
null
null
null
null
src/pdm/cli/commands/venv/remove.py
null
null
null
null
null
null
Python
2026-05-04T02:09:21.153133
from __future__ import annotations import shutil from pathlib import Path from typing import TYPE_CHECKING from pdm import termui from pdm.cli.commands.base import BaseCommand from pdm.cli.commands.venv.utils import get_venv_with_name from pdm.cli.options import verbose_option if TYPE_CHECKING: from argparse imp...
pdm-project/pdm
https://github.com/pdm-project/pdm
null
null
null
null
8,608
null
null
mit
null
null
null
null
null
null
null
src/pdm/cli/commands/venv/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:09:21.265315
from __future__ import annotations import base64 import hashlib from pathlib import Path from typing import TYPE_CHECKING from findpython import BaseProvider, PythonVersion from pdm.exceptions import PdmUsageError from pdm.models.venv import VirtualEnv if TYPE_CHECKING: import sys from collections.abc impor...
Johnserf-Seed/TikTokDownload
https://github.com/Johnserf-Seed/TikTokDownload
null
null
null
null
8,596
null
null
mit
null
null
null
null
null
null
null
GUI/resource.py
null
null
null
null
null
null
Python
2026-05-04T02:09:24.073877
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.15.2) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x22\x3e\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x...
Johnserf-Seed/TikTokDownload
https://github.com/Johnserf-Seed/TikTokDownload
null
null
null
null
8,596
null
null
mit
null
null
null
null
null
null
null
Server/Server.py
null
null
null
null
null
null
Python
2026-05-04T02:09:24.074488
#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @Description:Server.py @Date :2023/02/25 17:03:32 @Author :JohnserfSeed @version :0.0.1 @License :MIT License @Github :https://github.com/johnserf-seed @Mail :johnserf-seed@foxmail.com ------------------------------------------------- Change ...
Johnserf-Seed/TikTokDownload
https://github.com/Johnserf-Seed/TikTokDownload
null
null
null
null
8,596
null
null
mit
null
null
null
null
null
null
null
TikTokTool.py
null
null
null
null
null
null
Python
2026-05-04T02:09:24.110856
#!/usr/bin/env python # -*- encoding: utf-8 -*- """ @Description:TikTokTool.py @Date :2022/07/29 23:19:14 @Author :JohnserfSeed @version :1.6 @License :MIT License @Github :https://github.com/johnserf-seed @Mail :johnserf-seed@foxmail.com ------------------------------------------------- Chang...
Johnserf-Seed/TikTokDownload
https://github.com/Johnserf-Seed/TikTokDownload
null
null
null
null
8,596
null
null
mit
null
null
null
null
null
null
null
Server/s_v_web_id.py
null
null
null
null
null
null
Python
2026-05-04T02:09:24.111318
import time import random def create_s_v_web_id(): e = list("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") t = len(e) n = base36_encode(int(time.time()*1000)) # Convert timestamp to base 36 r = [''] * 36 r[8] = r[13] = r[18] = r[23] = "_" r[14] = "4" for i in range(36...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/appdirs.py
null
null
null
null
null
null
Python
2026-05-04T02:09:26.934691
# -*- coding: utf-8 -*- # type: ignore # Copyright (c) 2005-2010 ActiveState Software Inc. # Copyright (c) 2013 Eddy Petrișor ''' # This is the MIT license Copyright (c) 2010 ActiveState Software Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documen...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/cli.py
null
null
null
null
null
null
Python
2026-05-04T02:09:26.946180
"""jc - JSON Convert JC cli module """ import io import sys import os import re from datetime import datetime, timezone import textwrap import shlex import subprocess from typing import List, Dict, Iterable, Union, Optional, TextIO from types import ModuleType from .lib import ( __version__, parser_info, all_parse...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/lib.py
null
null
null
null
null
null
Python
2026-05-04T02:09:26.949223
"""jc - JSON Convert lib module""" import sys import os import re import importlib from typing import List, Iterable, Optional, Union, Iterator from types import ModuleType from .jc_types import ParserInfoType, JSONDictType from jc import appdirs from jc import utils __version__ = '1.25.6' parsers: List[str] = [ ...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
doc2md.py
null
null
null
null
null
null
Python
2026-05-04T02:09:26.950350
#!/usr/bin/env python3 """ Convert parser doc string to markdown """ import sys import importlib from inspect import isfunction, signature, cleandoc import yapf # type: ignore ignore_lib_functions = [ 'cast', 'wraps', 'lru_cache', 'namedtuple' ] mod_path = sys.argv[1] mod_name = mod_path.split('.')[...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/exceptions.py
null
null
null
null
null
null
Python
2026-05-04T02:09:26.973994
"""jc - JSON Convert exceptions""" class ParseError(Exception): pass class LibraryNotInstalled(Exception): pass
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/jc_types.py
null
null
null
null
null
null
Python
2026-05-04T02:09:26.974991
"""jc - JSON Convert lib module""" import sys from typing import Any, Dict, List, Tuple, Iterator, Optional, Union CustomColorType = Dict[Any, str] JSONDictType = Dict[str, Any] StreamingOutputType = Iterator[Union[JSONDictType, Tuple[BaseException, str]]] if sys.version_info >= (3, 8): from typing import TypedD...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:09:26.977342
"""JC - JSON Convert * kellyjonbrazil@gmail.com This package converts the output of many standard unix command line tools and file-types to dictionaries and lists of dictionaries. ## Interactive Documentation Using `jc` in your python programs: >>> help('jc') >>> help('jc.lib') >>> jc.get_help('parser_...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/cli_data.py
null
null
null
null
null
null
Python
2026-05-04T02:09:27.008437
"""jc - JSON Convert cli_data module""" from typing import List, Dict long_options_map: Dict[str, List[str]] = { '--about': ['a', 'about jc'], '--force-color': ['C', 'force color output (overrides -m)'], '--debug': ['d', 'debug (double for verbose debug)'], '--help': ['h', 'help (--help --parser_name f...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
build-completions.py
null
null
null
null
null
null
Python
2026-05-04T02:09:27.009843
#!/usr/bin/env python3 # build Bash and Zsh completion scripts and add to the completions folder from jc.shell_completions import bash_completion, zsh_completion with open('completions/jc_bash_completion.sh', 'w') as f: print(bash_completion(), file=f) with open('completions/jc_zsh_completion.sh', 'w') as f: ...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/airport_s.py
null
null
null
null
null
null
Python
2026-05-04T02:09:32.890925
r"""jc - JSON Convert `airport -s` command output parser The `airport` program can be found at `/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport`. Usage (cli): $ airport -s | jc --airport-s or $ jc airport -s Usage (module): import jc result = jc.parse('ai...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/acpi.py
null
null
null
null
null
null
Python
2026-05-04T02:09:32.892155
r"""jc - JSON Convert `acpi` command output parser Usage (cli): $ acpi -V | jc --acpi or $ jc acpi -V Usage (module): import jc result = jc.parse('acpi', acpi_command_output) Schema: [ { "type": string, "id": int...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/amixer.py
null
null
null
null
null
null
Python
2026-05-04T02:09:32.921913
r"""jc - JSON Convert `amixer sget` command output parser Usage (cli): $ amixer sget <control_name> | jc --amixer $ amixer sget Master | jc --amixer $ amixer sget Capture | jc --amixer $ amixer sget Speakers | jc --amixer Usage (module): import jc result = jc.parse('amixer', <amixer_sget_com...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asciitable_m.py
null
null
null
null
null
null
Python
2026-05-04T02:09:32.922643
r"""jc - JSON Convert `asciitable-m` parser This parser converts various styles of ASCII and Unicode text tables with multi-line rows. Tables must have a header row and separator line between rows. For example: ╒══════════╤═════════╤════════╕ │ foo │ bar baz │ fiz │ │ │ │ buz ...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asciitable.py
null
null
null
null
null
null
Python
2026-05-04T02:09:32.924307
r"""jc - JSON Convert `asciitable` parser This parser converts ASCII and Unicode text tables with single-line rows. Column headers must be at least two spaces apart from each other and must be unique. For best results, column headers should be left-justified. If column separators are present, then non-left-justified ...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/apt_cache_show.py
null
null
null
null
null
null
Python
2026-05-04T02:09:32.975643
r"""jc - JSON Convert `apt-cache show` command parser Usage (cli): $ apt-cache show | jc --apt-cache-show Usage (module): import jc result = jc.parse('apt_cache_show', apt_cache_show_output) Schema: [ { "package": string, "version": string, ...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/airport.py
null
null
null
null
null
null
Python
2026-05-04T02:09:33.087586
r"""jc - JSON Convert `airport -I` command output parser The `airport` program can be found at `/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport`. Usage (cli): $ airport -I | jc --airport or $ jc airport -I Usage (module): import jc result = jc.parse('airp...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/arp.py
null
null
null
null
null
null
Python
2026-05-04T02:09:33.717988
r"""jc - JSON Convert `arp` command output parser Supports `arp` and `arp -a` output. Usage (cli): $ arp | jc --arp or $ jc arp Usage (module): import jc result = jc.parse('arp', arp_command_output) Schema: [ { "name": string, "address": string, "h...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/apt_get_sqq.py
null
null
null
null
null
null
Python
2026-05-04T02:09:33.801131
r"""jc - JSON Convert `apt-get -sqq` command output parser Requires the `-sqq` options in `apt-get`. Usage (cli): $ apt-get -sqq upgrade | jc --apt-get-sqq or $ jc apt-get -sqq full-upgrade Usage (module): import jc result = jc.parse('apt_get_sqq', apt_get_sqq_command_output) Schema: [ ...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/_iri.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.062698
# coding: utf-8 """ Functions to convert unicode IRIs into ASCII byte string URIs and back. Exports the following items: - iri_to_uri() - uri_to_iri() """ from __future__ import unicode_literals, division, absolute_import, print_function from encodings import idna # noqa import codecs import re from ._errors im...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/_int.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.084096
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function def fill_width(bytes_, width): """ Ensure a byte string representing a positive integer is a specific width (in bytes) :param bytes_: The integer byte string :param width: The desir...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/_teletex_codec.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.172191
# coding: utf-8 """ Implementation of the teletex T.61 codec. Exports the following items: - register() """ from __future__ import unicode_literals, division, absolute_import, print_function import codecs class TeletexCodec(codecs.Codec): def encode(self, input_, errors='strict'): return codecs.char...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/_types.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.174541
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import inspect def chr_cls(num): return bytes([num]) def type_name(value): """ Returns a user-readable name for the type of an object :param value: A value to get the type name of :retur...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/algos.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.331385
# coding: utf-8 """ ASN.1 type classes for various algorithms using in various aspects of public key cryptography. Exports the following items: - AlgorithmIdentifier() - AnyAlgorithmIdentifier() - DigestAlgorithm() - DigestInfo() - DSASignature() - EncryptionAlgorithm() - HmacAlgorithm() - KdfAlgorithm() - P...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/cms.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.393620
# coding: utf-8 """ ASN.1 type classes for cryptographic message syntax (CMS). Structures are also compatible with PKCS#7. Exports the following items: - AuthenticatedData() - AuthEnvelopedData() - CompressedData() - ContentInfo() - DigestedData() - EncryptedData() - EnvelopedData() - SignedAndEnvelopedData()...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.630430
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function from .version import __version__, __version_info__ __all__ = [ '__version__', '__version_info__', 'load_order', ] def load_order(): """ Returns a list of the module and sub-module names for asn1cry...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/_errors.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.631525
# coding: utf-8 """ Exports the following items: - unwrap() - APIException() """ from __future__ import unicode_literals, division, absolute_import, print_function import re import textwrap class APIException(Exception): """ An exception indicating an API has been removed from asn1crypto """ pa...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/crl.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.662921
# coding: utf-8 """ ASN.1 type classes for certificate revocation lists (CRL). Exports the following items: - CertificateList() Other type classes are defined that help compose the types listed above. """ from __future__ import unicode_literals, division, absolute_import, print_function import hashlib from .algo...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/_inet.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.672908
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import socket import struct from ._errors import unwrap from ._types import type_name def inet_ntop(address_family, packed_ip): """ Windows compatibility shim for socket.inet_ntop(). :param address_family...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/csr.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.718108
# coding: utf-8 """ ASN.1 type classes for certificate signing requests (CSR). Exports the following items: - CertificationRequest() Other type classes are defined that help compose the types listed above. """ from __future__ import unicode_literals, division, absolute_import, print_function from .algos import Si...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/keys.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.779560
# coding: utf-8 """ ASN.1 type classes for public and private keys. Exports the following items: - DSAPrivateKey() - ECPrivateKey() - EncryptedPrivateKeyInfo() - PrivateKeyInfo() - PublicKeyInfo() - RSAPrivateKey() - RSAPublicKey() Other type classes are defined that help compose the types listed above. """ ...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/ocsp.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.926021
# coding: utf-8 """ ASN.1 type classes for the online certificate status protocol (OCSP). Exports the following items: - OCSPRequest() - OCSPResponse() Other type classes are defined that help compose the types listed above. """ from __future__ import unicode_literals, division, absolute_import, print_function f...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/parser.py
null
null
null
null
null
null
Python
2026-05-04T02:09:34.987241
# coding: utf-8 """ Functions for parsing and dumping using the ASN.1 DER encoding. Exports the following items: - emit() - parse() - peek() Other type classes are defined that help compose the types listed above. """ from __future__ import unicode_literals, division, absolute_import, print_function import sys ...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/pdf.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.205679
# coding: utf-8 """ ASN.1 type classes for PDF signature structures. Adds extra oid mapping and value parsing to asn1crypto.x509.Extension() and asn1crypto.xms.CMSAttribute(). """ from __future__ import unicode_literals, division, absolute_import, print_function from .cms import CMSAttributeType, CMSAttribute from ....
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/pem.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.210330
# coding: utf-8 """ Encoding DER to PEM and decoding PEM to DER. Exports the following items: - armor() - detect() - unarmor() """ from __future__ import unicode_literals, division, absolute_import, print_function from io import BytesIO import base64 import re from ._errors import unwrap from ._types import ty...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/tsp.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.232606
# coding: utf-8 """ ASN.1 type classes for the time stamp protocol (TSP). Exports the following items: - TimeStampReq() - TimeStampResp() Also adds TimeStampedData() support to asn1crypto.cms.ContentInfo(), TimeStampedData() and TSTInfo() support to asn1crypto.cms.EncapsulatedContentInfo() and some oids and value ...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/pkcs12.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.314786
# coding: utf-8 """ ASN.1 type classes for PKCS#12 files. Exports the following items: - CertBag() - CrlBag() - Pfx() - SafeBag() - SecretBag() Other type classes are defined that help compose the types listed above. """ from __future__ import unicode_literals, division, absolute_import, print_function from ....
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/util.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.317097
# coding: utf-8 """ Miscellaneous data helpers, including functions for converting integers to and from bytes and UTC timezone. Exports the following items: - OrderedDict() - int_from_bytes() - int_to_bytes() - timezone.utc - utc_with_dst - create_timezone() - inet_ntop() - inet_pton() - uri_to_iri() - iri_...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/x509.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.362542
# coding: utf-8 """ ASN.1 type classes for X.509 certificates. Exports the following items: - Attributes() - Certificate() - Extensions() - GeneralName() - GeneralNames() - Name() Other type classes are defined that help compose the types listed above. """ from __future__ import unicode_literals, division, ab...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/asn1crypto/version.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.393030
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function __version__ = '1.5.1' __version_info__ = (1, 5, 1)
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/blkid.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.538483
r"""jc - JSON Convert `blkid` command output parser Usage (cli): $ blkid | jc --blkid or $ jc blkid Usage (module): import jc result = jc.parse('blkid', blkid_command_output) Schema: [ { "device": string, "uuid": s...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/bluetoothctl.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.605072
r"""jc - JSON Convert `bluetoothctl` command output parser Supports the following `bluetoothctl` subcommands: - `bluetoothctl list` - `bluetoothctl show` - `bluetoothctl show <ctrl>` - `bluetoothctl devices` - `bluetoothctl info <dev>` Usage (cli): $ bluetoothctl info <dev> | jc --bluetoothctl or $ jc bluet...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/broken_parser.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.775064
r"""jc - JSON Convert broken parser - for testing purposes only""" import non_existent_library class info(): """Provides parser metadata (version, author, etc.)""" version = '1.0' description = 'broken parser' author = 'N/A' author_email = 'N/A' compatible = ['linux', 'darwin', 'cygwin', 'win32...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/cbt.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.788188
r"""jc - JSON Convert `cbt` command output parser (Google Bigtable) Parses the human-, but not machine-, friendly output of the cbt command (for Google's Bigtable). No effort is made to convert the data types of the values in the cells. The `timestamp_epoch` calculated timestamp field is naive. (i.e. based on the lo...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/cef.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.825156
r"""jc - JSON Convert CEF string parser This parser conforms to the Microfocus Arcsight CEF specification. This parser will accept a single CEF string or multiple CEF string lines. Any text before "CEF" will be ignored. Syslog and CEF escaped characters (`\\`, `\\"`, `\\]`, `\\|`, `\\=`, `\\%`, `\\#`, `\\n`, and `\\r...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/certbot.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.889015
r"""jc - JSON Convert `certbot` command output parser Supports the following `certbot` commands: - `certbot show_account` - `certbot certificates` Verbose options are not supported. Usage (cli): $ certbot show_account | jc --certbot $ certbot certificates | jc --certbot or $ jc certbot show_account ...
kellyjonbrazil/jc
https://github.com/kellyjonbrazil/jc
null
null
null
null
8,592
null
null
mit
null
null
null
null
null
null
null
jc/parsers/cef_s.py
null
null
null
null
null
null
Python
2026-05-04T02:09:35.935413
r"""jc - JSON Convert CEF string output streaming parser > This streaming parser outputs JSON Lines (cli) or returns an Iterable of > Dictionaries (module) This parser conforms to the Microfocus Arcsight CEF specification. This parser will accept a single CEF string or multiple CEF string lines. Any text before "CEF...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
clip/clip.py
null
null
null
null
null
null
Python
2026-05-04T02:09:41.450283
from typing import Tuple from image_processor import CLIPImageProcessor from model import CLIPModel from tokenizer import CLIPTokenizer def load(model_dir: str) -> Tuple[CLIPModel, CLIPTokenizer, CLIPImageProcessor]: model = CLIPModel.from_pretrained(model_dir) tokenizer = CLIPTokenizer.from_pretrained(model...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
clip/image_processor.py
null
null
null
null
null
null
Python
2026-05-04T02:09:41.485515
# Copyright © 2023-2024 Apple Inc. import json from pathlib import Path from typing import List, Tuple import mlx.core as mx import numpy as np from PIL.Image import Image class CLIPImageProcessor: """ A simple port of https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/im...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
bert/model.py
null
null
null
null
null
null
Python
2026-05-04T02:09:41.493727
import argparse from pathlib import Path from typing import List, Optional, Tuple import mlx.core as mx import mlx.nn as nn from mlx.utils import tree_unflatten from transformers import AutoConfig, AutoTokenizer, PreTrainedTokenizerBase class TransformerEncoderLayer(nn.Module): """ A transformer encoder laye...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
clip/convert.py
null
null
null
null
null
null
Python
2026-05-04T02:09:41.495282
# Copyright © 2023-2024 Apple Inc. import argparse import json import shutil from pathlib import Path from typing import Any, Dict, Union import mlx.core as mx import torch from huggingface_hub import snapshot_download def make_shards(weights: dict, max_file_size_gb: int = 5) -> list: max_file_size_bytes = max_...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
clip/hf_preproc.py
null
null
null
null
null
null
Python
2026-05-04T02:09:41.503504
import mlx.core as mx import transformers from PIL import Image import clip hf_model = "openai/clip-vit-base-patch32" mlx_model = "mlx_model" model, *_ = clip.load(mlx_model) processor = transformers.CLIPProcessor.from_pretrained(hf_model) inputs = processor( text=["a photo of a cat", "a photo of a dog"], i...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
cifar/main.py
null
null
null
null
null
null
Python
2026-05-04T02:09:41.504944
import argparse import time from functools import partial import mlx.core as mx import mlx.nn as nn import mlx.optimizers as optim import resnet from dataset import get_cifar10 parser = argparse.ArgumentParser(add_help=True) parser.add_argument( "--arch", type=str, default="resnet20", choices=[f"resne...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
bert/test.py
null
null
null
null
null
null
Python
2026-05-04T02:09:41.506011
import argparse from typing import List import model import numpy as np from transformers import AutoModel, AutoTokenizer def run_torch(bert_model: str, batch: List[str]): tokenizer = AutoTokenizer.from_pretrained(bert_model) torch_model = AutoModel.from_pretrained(bert_model) torch_tokens = tokenizer(ba...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
bert/convert.py
null
null
null
null
null
null
Python
2026-05-04T02:09:41.521543
import argparse import numpy from transformers import AutoModel def replace_key(key: str) -> str: key = key.replace(".layer.", ".layers.") key = key.replace(".self.key.", ".key_proj.") key = key.replace(".self.query.", ".query_proj.") key = key.replace(".self.value.", ".value_proj.") key = key.re...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
cifar/resnet.py
null
null
null
null
null
null
Python
2026-05-04T02:09:41.551330
""" Implementation of ResNets for CIFAR-10 as per the original paper [https://arxiv.org/abs/1512.03385]. Configurations include ResNet-20, ResNet-32, ResNet-44, ResNet-56, ResNet-110, ResNet-1202. """ import mlx.core as mx import mlx.nn as nn from mlx.utils import tree_flatten __all__ = [ "ResNet", "resnet20"...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
cifar/dataset.py
null
null
null
null
null
null
Python
2026-05-04T02:09:41.562087
import mlx.core as mx import numpy as np from mlx.data.datasets import load_cifar10 def get_cifar10(batch_size, root=None): tr = load_cifar10(root=root) mean = np.array([0.485, 0.456, 0.406]).reshape((1, 1, 3)) std = np.array([0.229, 0.224, 0.225]).reshape((1, 1, 3)) def normalize(x): x = x....
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
clip/linear_probe.py
null
null
null
null
null
null
Python
2026-05-04T02:09:42.285389
# Mirror of the Linear Probe Evaluation Script # from the official CLIP Repository. import mlx.core as mx import numpy as np from image_processor import CLIPImageProcessor from mlx.data.datasets import load_cifar10 from model import CLIPModel from PIL import Image from sklearn.linear_model import LogisticRegression fr...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
clip/test.py
null
null
null
null
null
null
Python
2026-05-04T02:09:42.369649
import unittest import mlx.core as mx import model import numpy as np import torch import transformers from image_processor import CLIPImageProcessor from PIL import Image from tokenizer import CLIPTokenizer from transformers import AutoTokenizer from transformers.image_processing_utils import ChannelDimension MLX_PA...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
cvae/dataset.py
null
null
null
null
null
null
Python
2026-05-04T02:09:42.378749
# Copyright © 2023-2024 Apple Inc. from mlx.data.datasets import load_mnist def mnist(batch_size, img_size, root=None): # load train and test sets using mlx-data load_fn = load_mnist tr = load_fn(root=root, train=True) test = load_fn(root=root, train=False) # number of image channels is 1 for MN...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
encodec/convert.py
null
null
null
null
null
null
Python
2026-05-04T02:09:42.438366
# Copyright © 2024 Apple Inc. import argparse import json from pathlib import Path from textwrap import dedent from types import SimpleNamespace from typing import Any, Dict, Union import mlx.core as mx import mlx.nn as nn from huggingface_hub import snapshot_download import encodec def fetch_from_hub(hf_repo: str...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
cvae/main.py
null
null
null
null
null
null
Python
2026-05-04T02:09:42.440639
# Copyright © 2023-2024 Apple Inc. import argparse import time from functools import partial from pathlib import Path import dataset import mlx.core as mx import mlx.nn as nn import mlx.optimizers as optim import numpy as np import vae from mlx.utils import tree_flatten from PIL import Image def grid_image_from_bat...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
clip/tokenizer.py
null
null
null
null
null
null
Python
2026-05-04T02:09:42.472131
# Copyright © 2023-2024 Apple Inc. import json from pathlib import Path from typing import Any import mlx.core as mx import regex class CLIPTokenizer: """A simple port of CLIPTokenizer from https://github.com/huggingface/transformers/ .""" def __init__(self, bpe_ranks, vocab): self.bpe_ranks = bpe_...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
encodec/benchmarks/bench_mx.py
null
null
null
null
null
null
Python
2026-05-04T02:09:42.490296
# Copyright © 2024 Apple Inc. import time import mlx.core as mx from encodec import EncodecModel model, processor = EncodecModel.from_pretrained("mlx-community/encodec-48khz-float32") audio = mx.random.uniform(shape=(288000, 2)) feats, mask = processor(audio) mx.eval(model, feats, mask) @mx.compile def fun(): ...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
clip/model.py
null
null
null
null
null
null
Python
2026-05-04T02:09:42.508609
# Copyright © 2023-2024 Apple Inc. import glob import json import logging import math from dataclasses import dataclass from pathlib import Path from typing import Optional import mlx.core as mx import mlx.nn as nn from mlx.core import linalg as LA from mlx.nn.losses import cross_entropy @dataclass class CLIPVision...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
encodec/benchmarks/bench_pt.py
null
null
null
null
null
null
Python
2026-05-04T02:09:43.237744
# Copyright © 2024 Apple Inc. import time import numpy as np import torch from transformers import AutoProcessor, EncodecModel processor = AutoProcessor.from_pretrained("facebook/encodec_48khz") audio = np.random.uniform(size=(2, 288000)).astype(np.float32) pt_model = EncodecModel.from_pretrained("facebook/encodec_...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
cvae/vae.py
null
null
null
null
null
null
Python
2026-05-04T02:09:43.267465
# Copyright © 2023-2024 Apple Inc. import math import mlx.core as mx import mlx.nn as nn # from https://github.com/ml-explore/mlx-examples/blob/main/stable_diffusion/stable_diffusion/unet.py def upsample_nearest(x, scale: int = 2): B, H, W, C = x.shape x = mx.broadcast_to(x[:, :, None, :, None, :], (B, H, s...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
flux/flux/datasets.py
null
null
null
null
null
null
Python
2026-05-04T02:09:43.825335
import json from pathlib import Path from PIL import Image class Dataset: def __getitem__(self, index: int): raise NotImplementedError() def __len__(self): raise NotImplementedError() class LocalDataset(Dataset): prompt_key = "prompt" def __init__(self, dataset: str, data_file): ...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
flux/flux/flux.py
null
null
null
null
null
null
Python
2026-05-04T02:09:43.923685
# Copyright © 2024 Apple Inc. from typing import Tuple import mlx.core as mx import mlx.nn as nn from mlx.utils import tree_unflatten from tqdm import tqdm from .lora import LoRALinear from .sampler import FluxSampler from .utils import ( load_ae, load_clip, load_clip_tokenizer, load_flow_model, ...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
encodec/example.py
null
null
null
null
null
null
Python
2026-05-04T02:09:43.955465
# Copyright © 2024 Apple Inc. import mlx.core as mx from utils import load_audio, save_audio from encodec import EncodecModel # Load the 48 KHz model and preprocessor. model, processor = EncodecModel.from_pretrained("mlx-community/encodec-48khz-float32") # Load an audio file audio = load_audio("/path/to/audio", mod...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
encodec/encodec.py
null
null
null
null
null
null
Python
2026-05-04T02:09:44.104542
# Copyright © 2024 Apple Inc. import functools import json import math from pathlib import Path from types import SimpleNamespace from typing import List, Optional, Tuple, Union import mlx.core as mx import mlx.nn as nn import numpy as np _lstm_kernel = mx.fast.metal_kernel( name="lstm", input_names=["x", "h...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
encodec/test.py
null
null
null
null
null
null
Python
2026-05-04T02:09:44.159948
# Copyright © 2024 Apple Inc. import mlx.core as mx import numpy as np import torch from transformers import AutoProcessor from transformers import EncodecModel as PTEncodecModel from encodec import EncodecModel, preprocess_audio def compare_processors(): np.random.seed(0) audio_length = 95500 audio = n...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
flux/flux/layers.py
null
null
null
null
null
null
Python
2026-05-04T02:09:44.409973
# Copyright © 2024 Apple Inc. import math from dataclasses import dataclass from functools import partial from typing import List, Optional, Tuple import mlx.core as mx import mlx.nn as nn def _rope(pos: mx.array, dim: int, theta: float): scale = mx.arange(0, dim, 2, dtype=mx.float32) / dim omega = 1.0 / (t...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
flux/flux/lora.py
null
null
null
null
null
null
Python
2026-05-04T02:09:44.540184
# Copyright © 2024 Apple Inc. import math import mlx.core as mx import mlx.nn as nn class LoRALinear(nn.Module): @staticmethod def from_base( linear: nn.Linear, r: int = 8, dropout: float = 0.0, scale: float = 1.0, ): output_dims, input_dims = linear.weight.shape ...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
flux/flux/model.py
null
null
null
null
null
null
Python
2026-05-04T02:09:44.587724
# Copyright © 2024 Apple Inc. from dataclasses import dataclass from typing import Optional import mlx.core as mx import mlx.nn as nn from mlx.nn.layers.distributed import shard_inplace, shard_linear from .layers import ( DoubleStreamBlock, EmbedND, LastLayer, MLPEmbedder, SingleStreamBlock, ...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
flux/flux/sampler.py
null
null
null
null
null
null
Python
2026-05-04T02:09:44.656017
# Copyright © 2024 Apple Inc. import math from functools import lru_cache import mlx.core as mx class FluxSampler: def __init__(self, name: str, base_shift: float = 0.5, max_shift: float = 1.15): self._base_shift = base_shift self._max_shift = max_shift self._schnell = "schnell" in name ...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
flux/flux/t5.py
null
null
null
null
null
null
Python
2026-05-04T02:09:44.786598
# Copyright © 2024 Apple Inc. import math from dataclasses import dataclass from typing import List, Optional, Tuple import mlx.core as mx import mlx.nn as nn _SHARED_REPLACEMENT_PATTERNS = [ (".block.", ".layers."), (".k.", ".key_proj."), (".o.", ".out_proj."), (".q.", ".query_proj."), (".v.", "...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
flux/flux/tokenizers.py
null
null
null
null
null
null
Python
2026-05-04T02:09:44.982240
# Copyright © 2024 Apple Inc. import mlx.core as mx import regex from sentencepiece import SentencePieceProcessor class CLIPTokenizer: """A simple port of CLIPTokenizer from https://github.com/huggingface/transformers/ .""" def __init__(self, bpe_ranks, vocab, max_length=77): self.max_length = max_l...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
flux/flux/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:09:45.169438
# Copyright © 2024 Apple Inc. import json import os from dataclasses import dataclass from pathlib import Path from typing import Optional, Union import mlx.core as mx from huggingface_hub import hf_hub_download from .autoencoder import AutoEncoder, AutoEncoderParams from .clip import CLIPTextModel, CLIPTextModelCon...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
flux/flux/trainer.py
null
null
null
null
null
null
Python
2026-05-04T02:09:45.192324
import mlx.core as mx import numpy as np from PIL import Image, ImageFile from tqdm import tqdm from .datasets import Dataset from .flux import FluxPipeline class Trainer: def __init__(self, flux: FluxPipeline, dataset: Dataset, args): self.flux = flux self.dataset = dataset self.args = ...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
flux/generate_interactive.py
null
null
null
null
null
null
Python
2026-05-04T02:09:45.243722
import argparse import mlx.core as mx import mlx.nn as nn import numpy as np from PIL import Image from tqdm import tqdm from flux import FluxPipeline def print_zero(group, *args, **kwargs): if group.rank() == 0: flush = kwargs.pop("flush", True) print(*args, **kwargs, flush=flush) def quantiz...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
flux/txt2image.py
null
null
null
null
null
null
Python
2026-05-04T02:09:45.428453
# Copyright © 2024 Apple Inc. import argparse import mlx.core as mx import mlx.nn as nn import numpy as np from PIL import Image from tqdm import tqdm from flux import FluxPipeline def to_latent_size(image_size): h, w = image_size h = ((h + 15) // 16) * 16 w = ((w + 15) // 16) * 16 if (h, w) != im...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
gcn/datasets.py
null
null
null
null
null
null
Python
2026-05-04T02:09:45.605496
import os import tarfile import mlx.core as mx import numpy as np import requests import scipy.sparse as sparse """ Preprocessing follows the same implementation as in: https://github.com/tkipf/gcn https://github.com/senadkurtisi/pytorch-GCN/tree/main """ def download_cora(): """Downloads the cora dataset into ...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
gcn/gcn.py
null
null
null
null
null
null
Python
2026-05-04T02:09:45.766437
import mlx.nn as nn class GCNLayer(nn.Module): def __init__(self, in_features, out_features, bias=True): super(GCNLayer, self).__init__() self.linear = nn.Linear(in_features, out_features, bias) def __call__(self, x, adj): x = self.linear(x) return adj @ x class GCN(nn.Modul...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
gcn/main.py
null
null
null
null
null
null
Python
2026-05-04T02:09:45.842602
import time from argparse import ArgumentParser from functools import partial import mlx.core as mx import mlx.nn as nn import mlx.optimizers as optim from datasets import load_data, train_val_test_mask from mlx.utils import tree_flatten from gcn import GCN def loss_fn(y_hat, y, weight_decay=0.0, parameters=None): ...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
llava/generate.py
null
null
null
null
null
null
Python
2026-05-04T02:09:45.872556
# Copyright © 2024 Apple Inc. import argparse import codecs from pathlib import Path import mlx.core as mx import requests from PIL import Image from transformers import AutoProcessor from llava import LlavaModel def parse_arguments(): parser = argparse.ArgumentParser( description="Generate text from a...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
llava/language.py
null
null
null
null
null
null
Python
2026-05-04T02:09:46.002143
# Copyright © 2024 Apple Inc. import inspect from dataclasses import dataclass from typing import Dict, Optional, Tuple, Union import mlx.core as mx import mlx.nn as nn @dataclass class TextConfig: model_type: str hidden_size: int = 4096 num_hidden_layers: int = 32 intermediate_size: int = 11008 ...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
llava/llava.py
null
null
null
null
null
null
Python
2026-05-04T02:09:46.199510
# Copyright © 2024 Apple Inc. import glob import inspect import json from dataclasses import dataclass from pathlib import Path from typing import Optional import mlx.core as mx import mlx.nn as nn import numpy as np from huggingface_hub import snapshot_download from language import LanguageModel, TextConfig from vis...
ml-explore/mlx-examples
https://github.com/ml-explore/mlx-examples
null
null
null
null
8,562
null
null
mit
null
null
null
null
null
null
null
llava/test.py
null
null
null
null
null
null
Python
2026-05-04T02:09:46.391194
# Copyright © 2024 Apple Inc. import unittest import mlx.core as mx import requests import torch from PIL import Image from transformers import AutoProcessor, LlavaForConditionalGeneration from llava import LlavaModel MODEL_PATH = "llava-hf/llava-1.5-7b-hf" PROMPT = "USER: <image>\nWhat are these?\nASSISTANT:" IMAG...