Dataset Viewer
Auto-converted to Parquet Duplicate
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
public-apis/public-apis
https://github.com/public-apis/public-apis/blob/a58c76cd32ef345da3e4b7252c7b47275e866ae7/scripts/tests/__init__.py
scripts/tests/__init__.py
# -*- coding: utf-8 -*-
python
MIT
a58c76cd32ef345da3e4b7252c7b47275e866ae7
2026-01-04T14:38:15.124778Z
false
public-apis/public-apis
https://github.com/public-apis/public-apis/blob/a58c76cd32ef345da3e4b7252c7b47275e866ae7/scripts/tests/test_validate_format.py
scripts/tests/test_validate_format.py
# -*- coding: utf-8 -*- import unittest from validate.format import error_message from validate.format import get_categories_content from validate.format import check_alphabetical_order from validate.format import check_title from validate.format import check_description, max_description_length from validate.format i...
python
MIT
a58c76cd32ef345da3e4b7252c7b47275e866ae7
2026-01-04T14:38:15.124778Z
false
public-apis/public-apis
https://github.com/public-apis/public-apis/blob/a58c76cd32ef345da3e4b7252c7b47275e866ae7/scripts/tests/test_validate_links.py
scripts/tests/test_validate_links.py
# -*- coding: utf-8 -*- import unittest from validate.links import find_links_in_text from validate.links import check_duplicate_links from validate.links import fake_user_agent from validate.links import get_host_from_link from validate.links import has_cloudflare_protection class FakeResponse(): def __init__(...
python
MIT
a58c76cd32ef345da3e4b7252c7b47275e866ae7
2026-01-04T14:38:15.124778Z
false
public-apis/public-apis
https://github.com/public-apis/public-apis/blob/a58c76cd32ef345da3e4b7252c7b47275e866ae7/scripts/validate/format.py
scripts/validate/format.py
# -*- coding: utf-8 -*- import re import sys from string import punctuation from typing import List, Tuple, Dict # Temporary replacement # The descriptions that contain () at the end must adapt to the new policy later punctuation = punctuation.replace('()', '') anchor = '###' auth_keys = ['apiKey', 'OAuth', 'X-Masha...
python
MIT
a58c76cd32ef345da3e4b7252c7b47275e866ae7
2026-01-04T14:38:15.124778Z
false
public-apis/public-apis
https://github.com/public-apis/public-apis/blob/a58c76cd32ef345da3e4b7252c7b47275e866ae7/scripts/validate/links.py
scripts/validate/links.py
# -*- coding: utf-8 -*- import re import sys import random from typing import List, Tuple import requests from requests.models import Response def find_links_in_text(text: str) -> List[str]: """Find links in a text and return a list of URLs.""" link_pattern = re.compile(r'((?:https?://|www\d{0,3}[.]|[a-z0-...
python
MIT
a58c76cd32ef345da3e4b7252c7b47275e866ae7
2026-01-04T14:38:15.124778Z
false
public-apis/public-apis
https://github.com/public-apis/public-apis/blob/a58c76cd32ef345da3e4b7252c7b47275e866ae7/scripts/validate/__init__.py
scripts/validate/__init__.py
# -*- coding: utf-8 -*- from validate import format from validate import links
python
MIT
a58c76cd32ef345da3e4b7252c7b47275e866ae7
2026-01-04T14:38:15.124778Z
false
deepseek-ai/DeepSeek-V3
https://github.com/deepseek-ai/DeepSeek-V3/blob/9b4e9788e4a3a731f7567338ed15d3ec549ce03b/inference/convert.py
inference/convert.py
import os import shutil from argparse import ArgumentParser from glob import glob from tqdm import tqdm, trange import torch from safetensors.torch import safe_open, save_file mapping = { "embed_tokens": ("embed", 0), "input_layernorm": ("attn_norm", None), "post_attention_layernorm": ("ffn_norm", None),...
python
MIT
9b4e9788e4a3a731f7567338ed15d3ec549ce03b
2026-01-04T14:38:15.450976Z
false
deepseek-ai/DeepSeek-V3
https://github.com/deepseek-ai/DeepSeek-V3/blob/9b4e9788e4a3a731f7567338ed15d3ec549ce03b/inference/model.py
inference/model.py
import math from dataclasses import dataclass from typing import Tuple, Optional, Literal import torch from torch import nn import torch.nn.functional as F import torch.distributed as dist from kernel import act_quant, weight_dequant, fp8_gemm world_size = 1 rank = 0 block_size = 128 gemm_impl: Literal["bf16", "fp8...
python
MIT
9b4e9788e4a3a731f7567338ed15d3ec549ce03b
2026-01-04T14:38:15.450976Z
true
deepseek-ai/DeepSeek-V3
https://github.com/deepseek-ai/DeepSeek-V3/blob/9b4e9788e4a3a731f7567338ed15d3ec549ce03b/inference/generate.py
inference/generate.py
import os import json from argparse import ArgumentParser from typing import List import torch import torch.distributed as dist from transformers import AutoTokenizer from safetensors.torch import load_model from model import Transformer, ModelArgs def sample(logits, temperature: float = 1.0): """ Samples a...
python
MIT
9b4e9788e4a3a731f7567338ed15d3ec549ce03b
2026-01-04T14:38:15.450976Z
false
deepseek-ai/DeepSeek-V3
https://github.com/deepseek-ai/DeepSeek-V3/blob/9b4e9788e4a3a731f7567338ed15d3ec549ce03b/inference/kernel.py
inference/kernel.py
from typing import Tuple, Optional import torch import triton import triton.language as tl from triton import Config @triton.jit def act_quant_kernel(x_ptr, y_ptr, s_ptr, BLOCK_SIZE: tl.constexpr, scale_fmt: tl.constexpr): """ Quantizes the input tensor `x_ptr` and stores the result in `y_ptr` and the scalin...
python
MIT
9b4e9788e4a3a731f7567338ed15d3ec549ce03b
2026-01-04T14:38:15.450976Z
false
deepseek-ai/DeepSeek-V3
https://github.com/deepseek-ai/DeepSeek-V3/blob/9b4e9788e4a3a731f7567338ed15d3ec549ce03b/inference/fp8_cast_bf16.py
inference/fp8_cast_bf16.py
import os import json from argparse import ArgumentParser from glob import glob from tqdm import tqdm import torch from safetensors.torch import load_file, save_file from kernel import weight_dequant def main(fp8_path, bf16_path): """ Converts FP8 weights to BF16 and saves the converted weights. This fu...
python
MIT
9b4e9788e4a3a731f7567338ed15d3ec549ce03b
2026-01-04T14:38:15.450976Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown-mcp/src/markitdown_mcp/__main__.py
packages/markitdown-mcp/src/markitdown_mcp/__main__.py
import contextlib import sys import os from collections.abc import AsyncIterator from mcp.server.fastmcp import FastMCP from starlette.applications import Starlette from mcp.server.sse import SseServerTransport from starlette.requests import Request from starlette.routing import Mount, Route from starlette.types import...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown-mcp/src/markitdown_mcp/__about__.py
packages/markitdown-mcp/src/markitdown_mcp/__about__.py
# SPDX-FileCopyrightText: 2024-present Adam Fourney <adamfo@microsoft.com> # # SPDX-License-Identifier: MIT __version__ = "0.0.1a4"
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown-mcp/src/markitdown_mcp/__init__.py
packages/markitdown-mcp/src/markitdown_mcp/__init__.py
# SPDX-FileCopyrightText: 2024-present Adam Fourney <adamfo@microsoft.com> # # SPDX-License-Identifier: MIT from .__about__ import __version__ __all__ = [ "__version__", ]
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown-mcp/tests/__init__.py
packages/markitdown-mcp/tests/__init__.py
# SPDX-FileCopyrightText: 2024-present Adam Fourney <adamfo@microsoft.com> # # SPDX-License-Identifier: MIT
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/_exceptions.py
packages/markitdown/src/markitdown/_exceptions.py
from typing import Optional, List, Any MISSING_DEPENDENCY_MESSAGE = """{converter} recognized the input as a potential {extension} file, but the dependencies needed to read {extension} files have not been installed. To resolve this error, include the optional dependency [{feature}] or [all] when installing MarkItDown....
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/_uri_utils.py
packages/markitdown/src/markitdown/_uri_utils.py
import base64 import os from typing import Tuple, Dict from urllib.request import url2pathname from urllib.parse import urlparse, unquote_to_bytes def file_uri_to_path(file_uri: str) -> Tuple[str | None, str]: """Convert a file URI to a local file path""" parsed = urlparse(file_uri) if parsed.scheme != "f...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/__main__.py
packages/markitdown/src/markitdown/__main__.py
# SPDX-FileCopyrightText: 2024-present Adam Fourney <adamfo@microsoft.com> # # SPDX-License-Identifier: MIT import argparse import sys import codecs from textwrap import dedent from importlib.metadata import entry_points from .__about__ import __version__ from ._markitdown import MarkItDown, StreamInfo, DocumentConvert...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/_stream_info.py
packages/markitdown/src/markitdown/_stream_info.py
from dataclasses import dataclass, asdict from typing import Optional @dataclass(kw_only=True, frozen=True) class StreamInfo: """The StreamInfo class is used to store information about a file stream. All fields can be None, and will depend on how the stream was opened. """ mimetype: Optional[str] = N...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/__about__.py
packages/markitdown/src/markitdown/__about__.py
# SPDX-FileCopyrightText: 2024-present Adam Fourney <adamfo@microsoft.com> # # SPDX-License-Identifier: MIT __version__ = "0.1.4"
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/_markitdown.py
packages/markitdown/src/markitdown/_markitdown.py
import mimetypes import os import re import sys import shutil import traceback import io from dataclasses import dataclass from importlib.metadata import entry_points from typing import Any, List, Dict, Optional, Union, BinaryIO from pathlib import Path from urllib.parse import urlparse from warnings import warn import...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/__init__.py
packages/markitdown/src/markitdown/__init__.py
# SPDX-FileCopyrightText: 2024-present Adam Fourney <adamfo@microsoft.com> # # SPDX-License-Identifier: MIT from .__about__ import __version__ from ._markitdown import ( MarkItDown, PRIORITY_SPECIFIC_FILE_FORMAT, PRIORITY_GENERIC_FILE_FORMAT, ) from ._base_converter import DocumentConverterResult, Document...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/_base_converter.py
packages/markitdown/src/markitdown/_base_converter.py
from typing import Any, BinaryIO, Optional from ._stream_info import StreamInfo class DocumentConverterResult: """The result of converting a document to Markdown.""" def __init__( self, markdown: str, *, title: Optional[str] = None, ): """ Initialize the Do...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/converters/_bing_serp_converter.py
packages/markitdown/src/markitdown/converters/_bing_serp_converter.py
import re import base64 import binascii from urllib.parse import parse_qs, urlparse from typing import Any, BinaryIO from bs4 import BeautifulSoup from .._base_converter import DocumentConverter, DocumentConverterResult from .._stream_info import StreamInfo from ._markdownify import _CustomMarkdownify ACCEPTED_MIME_T...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/converters/_llm_caption.py
packages/markitdown/src/markitdown/converters/_llm_caption.py
from typing import BinaryIO, Union import base64 import mimetypes from .._stream_info import StreamInfo def llm_caption( file_stream: BinaryIO, stream_info: StreamInfo, *, client, model, prompt=None ) -> Union[None, str]: if prompt is None or prompt.strip() == "": prompt = "Write a detailed caption fo...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/converters/_wikipedia_converter.py
packages/markitdown/src/markitdown/converters/_wikipedia_converter.py
import re import bs4 from typing import Any, BinaryIO from .._base_converter import DocumentConverter, DocumentConverterResult from .._stream_info import StreamInfo from ._markdownify import _CustomMarkdownify ACCEPTED_MIME_TYPE_PREFIXES = [ "text/html", "application/xhtml", ] ACCEPTED_FILE_EXTENSIONS = [ ...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/converters/_plain_text_converter.py
packages/markitdown/src/markitdown/converters/_plain_text_converter.py
import sys from typing import BinaryIO, Any from charset_normalizer import from_bytes from .._base_converter import DocumentConverter, DocumentConverterResult from .._stream_info import StreamInfo # Try loading optional (but in this case, required) dependencies # Save reporting of any exceptions for later _dependency...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/converters/_transcribe_audio.py
packages/markitdown/src/markitdown/converters/_transcribe_audio.py
import io import sys from typing import BinaryIO from .._exceptions import MissingDependencyException # Try loading optional (but in this case, required) dependencies # Save reporting of any exceptions for later _dependency_exc_info = None try: # Suppress some warnings on library import import warnings wi...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/converters/_epub_converter.py
packages/markitdown/src/markitdown/converters/_epub_converter.py
import os import zipfile from defusedxml import minidom from xml.dom.minidom import Document from typing import BinaryIO, Any, Dict, List from ._html_converter import HtmlConverter from .._base_converter import DocumentConverterResult from .._stream_info import StreamInfo ACCEPTED_MIME_TYPE_PREFIXES = [ "applica...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/converters/_csv_converter.py
packages/markitdown/src/markitdown/converters/_csv_converter.py
import csv import io from typing import BinaryIO, Any from charset_normalizer import from_bytes from .._base_converter import DocumentConverter, DocumentConverterResult from .._stream_info import StreamInfo ACCEPTED_MIME_TYPE_PREFIXES = [ "text/csv", "application/csv", ] ACCEPTED_FILE_EXTENSIONS = [".csv"] c...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/converters/_html_converter.py
packages/markitdown/src/markitdown/converters/_html_converter.py
import io from typing import Any, BinaryIO, Optional from bs4 import BeautifulSoup from .._base_converter import DocumentConverter, DocumentConverterResult from .._stream_info import StreamInfo from ._markdownify import _CustomMarkdownify ACCEPTED_MIME_TYPE_PREFIXES = [ "text/html", "application/xhtml", ] AC...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/converters/_pdf_converter.py
packages/markitdown/src/markitdown/converters/_pdf_converter.py
import sys import io from typing import BinaryIO, Any from .._base_converter import DocumentConverter, DocumentConverterResult from .._stream_info import StreamInfo from .._exceptions import MissingDependencyException, MISSING_DEPENDENCY_MESSAGE # Try loading optional (but in this case, required) dependencies # Sa...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
microsoft/markitdown
https://github.com/microsoft/markitdown/blob/dde250a456d178fe344fce17ef10d00fe929f680/packages/markitdown/src/markitdown/converters/_ipynb_converter.py
packages/markitdown/src/markitdown/converters/_ipynb_converter.py
from typing import BinaryIO, Any import json from .._base_converter import DocumentConverter, DocumentConverterResult from .._exceptions import FileConversionException from .._stream_info import StreamInfo CANDIDATE_MIME_TYPE_PREFIXES = [ "application/json", ] ACCEPTED_FILE_EXTENSIONS = [".ipynb"] class IpynbC...
python
MIT
dde250a456d178fe344fce17ef10d00fe929f680
2026-01-04T14:38:15.496810Z
false
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
239

Models trained or fine-tuned on Shuu12121/github-file-programs-dataset-python