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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | llms/gguf_llm/generate.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:46.451658 | # Copyright © 2023 Apple Inc.
import argparse
import time
import mlx.core as mx
import models
def generate(
model: models.Model,
tokenizer: models.GGUFTokenizer,
prompt: str,
max_tokens: int,
temp: float = 0.0,
):
prompt = tokenizer.encode(prompt)
tic = time.time()
tokens = []
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 | llava/vision.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:46.481171 | # Copyright © 2024 Apple Inc.
import inspect
import math
from dataclasses import dataclass
from typing import Optional
import mlx.core as mx
import mlx.nn as nn
@dataclass
class VisionConfig:
model_type: str
num_hidden_layers: int = 24
hidden_size: int = 1024
intermediate_size: int = 4096
num_at... |
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 | llms/gguf_llm/models.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:46.598928 | # Copyright © 2023 Apple Inc.
from dataclasses import dataclass
from pathlib import Path
from typing import Dict, List, Optional, Tuple, Union
import mlx.core as mx
import mlx.nn as nn
import utils
from huggingface_hub import snapshot_download
@dataclass
class ModelArgs:
hidden_size: int
num_hidden_layers: ... |
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/dreambooth.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:48.094566 | # Copyright © 2024 Apple Inc.
import argparse
import time
from functools import partial
from pathlib import Path
import mlx.core as mx
import mlx.nn as nn
import mlx.optimizers as optim
import numpy as np
from mlx.nn.utils import average_gradients
from mlx.utils import tree_flatten, tree_map, tree_reduce
from PIL imp... |
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/utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:48.095395 | # Copyright © 2024 Apple Inc.
import mlx.core as mx
import numpy as np
def save_audio(file: str, audio: mx.array, sampling_rate: int):
"""
Save audio to a wave (.wav) file.
"""
from scipy.io.wavfile import write
audio = (audio * 32767).astype(mx.int16)
write(file, sampling_rate, np.array(aud... |
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/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:48.162263 | # Copyright © 2024 Apple Inc.
from .datasets import Dataset, load_dataset
from .flux import FluxPipeline
from .lora import LoRALinear
from .sampler import FluxSampler
from .trainer import Trainer
from .utils import (
load_ae,
load_clip,
load_clip_tokenizer,
load_flow_model,
load_t5,
load_t5_tok... |
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/clip.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:48.176236 | # Copyright © 2024 Apple Inc.
from dataclasses import dataclass
from typing import List, Optional
import mlx.core as mx
import mlx.nn as nn
_ACTIVATIONS = {"quick_gelu": nn.gelu_fast_approx, "gelu": nn.gelu}
@dataclass
class CLIPTextModelConfig:
num_layers: int = 23
model_dims: int = 1024
num_heads: in... |
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/autoencoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:48.246286 | # Copyright © 2024 Apple Inc.
from dataclasses import dataclass
from typing import List
import mlx.core as mx
import mlx.nn as nn
from mlx.nn.layers.upsample import upsample_nearest
@dataclass
class AutoEncoderParams:
resolution: int
in_channels: int
ch: int
out_ch: int
ch_mult: List[int]
nu... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | dots_ocr/model/inference.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:51.025314 | import requests
from dots_ocr.utils.image_utils import PILimage_to_base64
from openai import OpenAI
import os
def inference_with_vllm(
image,
prompt,
protocol="http",
ip="localhost",
port=8000,
temperature=0.1,
top_p=0.9,
max_completion_tokens=32768,
... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | demo/demo_vllm_svg.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:51.026397 | import argparse
from openai import OpenAI
from transformers.utils.versions import require_version
from PIL import Image
from dots_ocr.utils import dict_promptmode_to_prompt
from dots_ocr.model.inference import inference_with_vllm
parser = argparse.ArgumentParser()
parser.add_argument("--ip", type=str, default="local... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | demo/demo_vllm.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:51.028870 | import argparse
from openai import OpenAI
from transformers.utils.versions import require_version
from PIL import Image
from dots_ocr.utils import dict_promptmode_to_prompt
from dots_ocr.model.inference import inference_with_vllm
parser = argparse.ArgumentParser()
parser.add_argument("--ip", type=str, default="local... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | demo/demo_streamlit.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:51.031217 | """
Layout Inference Web Application
A Streamlit-based layout inference tool that supports image uploads and multiple backend inference engines.
"""
import streamlit as st
import json
import os
import io
import tempfile
from PIL import Image
import requests
# Local utility imports
# from utils import infer
from do... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | demo/demo_gradio_annotion.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:51.032439 | """
Layout Inference Web Application with Gradio - Annotation Version
A Gradio-based layout inference tool that supports image uploads and multiple backend inference engines.
This version adds an image annotation feature, allowing users to draw bounding boxes on an image and send both the image and the boxes to the mo... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | dots_ocr/parser.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:51.034144 | import os
import json
from tqdm import tqdm
from multiprocessing.pool import ThreadPool, Pool
import argparse
from dots_ocr.model.inference import inference_with_vllm
from dots_ocr.utils.consts import image_extensions, MIN_PIXELS, MAX_PIXELS
from dots_ocr.utils.image_utils import get_image_by_fitz_doc, fetch_image, s... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | demo/demo_hf.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:51.035134 | import os
if "LOCAL_RANK" not in os.environ:
os.environ["LOCAL_RANK"] = "0"
import torch
from transformers import AutoModelForCausalLM, AutoProcessor, AutoTokenizer
from qwen_vl_utils import process_vision_info
from dots_ocr.utils import dict_promptmode_to_prompt
def inference(image_path, prompt, model, processor... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | demo/demo_vllm_general.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:51.036134 | import argparse
from openai import OpenAI
from transformers.utils.versions import require_version
from PIL import Image
from dots_ocr.utils import dict_promptmode_to_prompt
from dots_ocr.model.inference import inference_with_vllm
parser = argparse.ArgumentParser()
parser.add_argument("--ip", type=str, default="local... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | demo/demo_gradio.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:51.037354 | """
Layout Inference Web Application with Gradio
A Gradio-based layout inference tool that supports image uploads and multiple backend inference engines.
It adopts a reference-style interface design while preserving the original inference logic.
"""
import gradio as gr
import json
import os
import io
import tempfile
... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | setup.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:52.808914 | from setuptools import setup, find_packages
# 从requirements.txt文件读取依赖
def parse_requirements(filename):
with open(filename, 'r', encoding='utf-8') as f:
return f.read().splitlines()
setup(
name='dots_ocr',
version='1.0',
packages=find_packages(),
include_package_data=True,
... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | dots_ocr/utils/demo_utils/display.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:52.809995 | import os
from PIL import Image
def is_valid_image_path(image_path):
"""
Checks if the image path is valid.
Args:
image_path: The path to the image.
Returns:
bool: True if the path is valid, False otherwise.
"""
if not os.path.exists(image_path):
return False
# C... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | dots_ocr/utils/image_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:53.269256 | import math
import base64
from PIL import Image
from typing import Tuple
import os
from dots_ocr.utils.consts import IMAGE_FACTOR, MIN_PIXELS, MAX_PIXELS
from dots_ocr.utils.doc_utils import fitz_doc_to_image
from io import BytesIO
import fitz
import requests
import copy
def round_by_factor(number: int, factor: int) ... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | dots_ocr/utils/prompts.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:53.269874 | dict_promptmode_to_prompt = {
# prompt_layout_all_en: parse all layout info in json format.
"prompt_layout_all_en": """Please output the layout information from the PDF image, including each layout element's bbox, its category, and the corresponding text content within the bbox.
1. Bbox format: [x1, y1, x2, y2... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | dots_ocr/utils/format_transformer.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:53.454031 | import os
import sys
import json
import re
from PIL import Image
from dots_ocr.utils.image_utils import PILimage_to_base64
def has_latex_markdown(text: str) -> bool:
"""
Checks if a string contains LaTeX markdown patterns.
Args:
text (str): The string to check.
Returns:
... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | dots_ocr/utils/layout_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:53.646915 | from PIL import Image
from typing import Dict, List
import fitz
from io import BytesIO
import json
from dots_ocr.utils.image_utils import smart_resize
from dots_ocr.utils.consts import MIN_PIXELS, MAX_PIXELS
from dots_ocr.utils.output_cleaner import OutputCleaner
# Define a color map (using RGBA format)
dict_layout... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | tools/elo_score_prompt.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:53.648254 | def construct_prompt(c1_text, c2_text):
"""
Constructs the complete Prompt sent to Gemini (English Version).
c1_text: Markdown text from Model 1
c2_text: Markdown text from Model 2
"""
prompt = f"""You are an expert in evaluating OCR content accuracy. Please compare the model outputs with t... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | tools/download_model.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:53.727586 | from argparse import ArgumentParser
import os
if __name__ == '__main__':
parser = ArgumentParser()
parser.add_argument('--type', '-t', type=str, default="huggingface")
parser.add_argument('--name', '-n', type=str, default="rednote-hilab/dots.mocr")
args = parser.parse_args()
script_dir = os.path.d... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | dots_ocr/utils/output_cleaner.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:53.728523 | #!/usr/bin/env python3
"""
Data Cleaning Script - Cleans all data using a simplified regex method and saves the results
Features:
1. Cleans all cases using a simplified regex method.
2. Saves the cleaned data for each case.
3. Ensures the relative order of dicts remains unchanged.
4. Generates a before-and-after clean... |
rednote-hilab/dots.ocr | https://github.com/rednote-hilab/dots.ocr | null | null | null | null | 8,535 | null | null | mit | null | null | null | null | null | null | null | dots_ocr/utils/doc_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:55.039184 | import fitz
import numpy as np
import enum
from pydantic import BaseModel, Field
from PIL import Image
class SupportedPdfParseMethod(enum.Enum):
OCR = 'ocr'
TXT = 'txt'
class PageInfo(BaseModel):
"""The width and height of page
"""
w: float = Field(description='the width of page')
h: float =... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | .vscode/.ropeproject/config.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:57.980644 | # The default ``config.py``
# flake8: noqa
def set_prefs(prefs):
"""This function is called before opening the project"""
# Specify which files and folders to ignore in the project.
# Changes to ignored resources are not added to the history and
# VCSs. Also they are not returned in `Project.get_fil... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/__main__.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:57.981583 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from .bypy import main
if __name__ == "__main__":
main()
# vim: tabstop=4 n... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/chkreq.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:57.982360 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import sys
from . import gvar
from .util import (iswindows, fixenc, bannerwar... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/monkey.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:57.984266 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
import sys
from functools import partial
from . import printer_console
from . import bypy
from . import printer
from . import cached
from . import util
try:
vi = sys.version_info
if vi[0] == 2:
import Tkinter
Tkinter
elif vi[0] == 3:
import tki... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/cached.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:57.985273 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import os
import time
import io
import hashlib
import binascii
from . import ... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/panapi.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:57.986233 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import os
import io
from . import const
from . import gvar
from .util import... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/gvar.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:57.987414 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import locale
import time
from . import const
## global variables
try:
Syste... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:57.988555 | #!/usr/bin/env python
# coding=utf-8
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from . import const
# expose package names
from .bypy import ByPy
ByPy
__title__ = const.__title__
__v... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/gui.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:57.989804 | #!/usr/bin/env python
# coding=utf-8
# A simple GUI for bypy, using Tkinter
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import sys
import threading
vi = sys.version_info
if vi[0] == 2:... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/const.py | null | null | null | null | null | null | Python | 2026-05-04T02:09:57.991075 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import sys
import os
# https://packaging.python.org/single_source_version/
__... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/termcolor.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:00.750801 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
# https://stackoverflow.com/questions/287871/print-in-terminal-with-colors-usi... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/struct.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:00.751748 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from .util import iswindows
# tree represented using dictionary, (Obsolete: O... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/test/__main__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:00.752801 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from .test import main
if __name__ == "__main__":
main()
|
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/printer_gui.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:00.754131 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import sys
from .tkutil import (
ColorMap, fgtag, bgtag,
Stretch, MyReadOnl... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/printer_util.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:00.861318 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# this file exists to avoid circular dependencies
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import os
import math
import... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/requester.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:00.926958 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import sys
import logging
import json
from functools import partial
import r... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/printer_console.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:01.544049 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import sys
import time
# unify Python 2 and 3
if sys.version_info[0] == 3:
r... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/printer.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:01.545138 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import time
from .termcolor import TermColor
from . import printer_console
p... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/test/test.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:02.408191 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# primitive sanity tests
# TODO: refactor and improve
# To Add:
# - Special file names (single quote)
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __f... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/util.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:02.458095 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
### imports
import os
import sys
import time
import io
import json
import ppri... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | genrst.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:02.545140 | #!/usr/bin/env python
import pypandoc
for md in ['HISTORY']:
pypandoc.convert_file(md + '.md', 'rst', outputfile=md + '.rst')
|
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | bypy/tkutil.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:02.569723 | #!/usr/bin/env python
# encoding: utf-8
# PYTHON_ARGCOMPLETE_OK
# from __future__ imports must occur at the beginning of the file
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import sys
vi = sys.version_info
if vi[0] == 2:
import ScrolledText as scrt
... |
houtianze/bypy | https://github.com/houtianze/bypy | null | null | null | null | 8,534 | null | null | mit | null | null | null | null | null | null | null | setup.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:06.618373 | #!/usr/bin/env python
# coding=utf-8
import io
import re
from setuptools import setup
# https://packaging.python.org/single_source_version/
# CAN'T believe there is no single *clean* way of retrieving the version.
def getmeta(path, encoding = 'utf8'):
with io.open(path, encoding = encoding) as fp:
content = fp.re... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/endpoints/constellation_endpoint.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:16.842176 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Constellation Client Endpoint
Wraps the existing Galaxy constellation client with AIP protocol abstractions.
"""
import logging
from typing import Any, Dict, Optional
from aip.endpoints.base import AIPEndpoint
from aip.protocol import AIPP... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/endpoints/client_endpoint.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:16.868661 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Device Client Endpoint
Wraps the existing UFO WebSocket client with AIP protocol abstractions.
"""
import logging
from typing import Any
from aip.endpoints.base import AIPEndpoint
from aip.protocol import AIPProtocol, HeartbeatProtocol, Re... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/endpoints/server_endpoint.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:16.869186 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Device Server Endpoint
Wraps the existing UFO server WebSocket handler with AIP protocol abstractions.
This maintains backward compatibility while providing the AIP interface.
"""
import logging
from typing import Any, Optional
from fastap... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/extensions/base.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:16.878551 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Base Extension Interface
Defines the interface for AIP extensions.
"""
from abc import ABC, abstractmethod
from typing import Any
class AIPExtension(ABC):
"""
Abstract base class for AIP extensions.
Extensions can customize p... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/extensions/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:16.891314 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
AIP Extension Support
Provides extension points for customizing AIP behavior.
"""
from .base import AIPExtension
from .middleware import LoggingExtension, MetricsExtension
__all__ = ["AIPExtension", "LoggingExtension", "MetricsExtension"]
|
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/endpoints/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:16.892271 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
AIP Endpoints
Provides endpoint implementations for Device Server, Device Client, and Constellation Client.
"""
from .base import AIPEndpoint
from .client_endpoint import DeviceClientEndpoint
from .constellation_endpoint import Constellatio... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/endpoints/base.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:16.954762 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Base AIP Endpoint
Provides the foundation for all AIP endpoint implementations.
"""
import logging
from abc import ABC, abstractmethod
from typing import Any, Dict, Optional
from aip.protocol import AIPProtocol
from aip.resilience import R... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/messages.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:16.959577 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Agent Interaction Protocol (AIP) - Message Definitions
This module defines the core message types and structures used in the Agent Interaction Protocol.
Messages are strongly typed using Pydantic for validation and serialization.
Message Fl... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:16.972751 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Agent Interaction Protocol (AIP)
A lightweight, persistent, and extensible messaging layer for multi-agent orchestration.
AIP provides:
- Long-lived agent sessions spanning multiple task executions
- Low-latency event propagation for dynami... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/extensions/middleware.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:16.973284 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
AIP Extension Middleware
Provides ready-to-use extensions for common use cases.
"""
import logging
import time
from typing import Any, Dict
from aip.extensions.base import AIPExtension
class LoggingExtension(AIPExtension):
"""
Ex... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/protocol/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:18.483392 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
AIP Protocol Layer
Implements the core protocol logic for the Agent Interaction Protocol.
"""
from .base import AIPProtocol, MessageHandler, ProtocolHandler
from .command import CommandProtocol
from .device_info import DeviceInfoProtocol
fr... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/protocol/registration.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:18.625756 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Registration Protocol
Handles agent registration and capability advertisement in the AIP system.
"""
import datetime
import logging
from typing import Any, Dict, Optional
from aip.messages import (
ClientMessage,
ClientMessageType,... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/protocol/command.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:18.671418 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Command Protocol
Handles command execution at a fine-grained level.
"""
import logging
from typing import List
from aip.messages import Command, Result
from aip.protocol.base import AIPProtocol
class CommandProtocol(AIPProtocol):
"""... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/protocol/base.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:18.688168 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Base Protocol Implementation
Provides the core AIP protocol abstractions and message handling infrastructure.
"""
import logging
from abc import ABC, abstractmethod
from typing import Any, Awaitable, Callable, Dict, List, Optional
from aip... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/protocol/heartbeat.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:18.717784 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Heartbeat Protocol
Handles periodic keepalive messages to maintain connection health.
"""
import asyncio
import datetime
import logging
from typing import Optional
from uuid import uuid4
from aip.messages import (
ClientMessage,
Cl... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/protocol/device_info.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:18.777257 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Device Info Protocol
Handles device information requests and responses.
"""
import datetime
import logging
from typing import Any, Dict, Optional
from uuid import uuid4
from aip.messages import (
ClientMessage,
ClientMessageType,
... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/resilience/timeout.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:19.068618 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Timeout Manager
Handles timeout enforcement for asynchronous operations in AIP.
"""
import asyncio
import logging
from typing import Any, Awaitable, Optional, TypeVar
T = TypeVar("T")
class TimeoutManager:
"""
Manages timeouts fo... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/transport/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:19.260493 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
AIP Transport Layer
Provides transport abstractions for the Agent Interaction Protocol.
Supports WebSocket and is extensible to other transports (HTTP/3, gRPC, etc.).
"""
from .adapters import (
FastAPIWebSocketAdapter,
WebSocketAda... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/transport/adapters.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:19.313348 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
WebSocket Adapter Interface
Provides a unified interface for different WebSocket implementations.
Uses the Adapter pattern to abstract away differences between:
- FastAPI WebSocket (server-side)
- websockets library (client-side)
Supports b... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/transport/websocket.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:19.323605 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
WebSocket Transport Implementation
Implements the Transport interface using WebSockets.
Provides reliable, bidirectional, full-duplex communication over a single TCP connection.
Supports both text frames (for JSON messages) and binary frames... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | config/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:19.370711 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
UFO² Configuration System
Modern, modular configuration system with type safety and backward compatibility.
"""
from config.config_loader import (
ConfigLoader,
get_ufo_config,
get_galaxy_config,
clear_config_cache,
)
from ... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/transport/base.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:19.391580 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Base Transport Interface
Defines the abstract interface for all AIP transports.
This allows AIP to work with different underlying communication mechanisms
while maintaining a consistent protocol layer.
"""
from abc import ABC, abstractmetho... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | config/config_loader.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:19.746758 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Modern Configuration Loader for UFO³ and Galaxy
Professional Software Engineering Design:
- ✅ Separation of Concerns: Modular YAML files for different config domains
- ✅ Backward Compatibility: Automatic fallback to legacy paths (ufo/config/... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/config/config.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:19.893705 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from ufo.config import Config
class Config(Config):
_instance = None
def __init__(self, config_path="dataflow/config/"):
"""
Initializes the Config class.
:param config_path: The path to the config file.
... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | config/config_schemas.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:19.898324 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Configuration Schema Definitions
Hybrid design: Fixed typed fields + dynamic field support.
"""
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional
@dataclass
class AgentConfig:
"""
Agent configur... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/__main__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:19.919252 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from dataflow import dataflow
if __name__ == "__main__":
# Execute the main script
dataflow.main()
|
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/data_flow_controller.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:20.003015 | import os
import time
import traceback
from enum import Enum
from typing import Any, Dict, Optional, List
from jsonschema import validate, ValidationError
import shutil
from dataflow.env.env_manager import WindowsAppEnv
from dataflow.instantiation.workflow.choose_template_flow import ChooseTemplateFlow
from dataflow.i... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/dataflow.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:20.114799 | import argparse
import os
import traceback
from ufo.utils import print_with_color
from dataflow.config.config import Config
_configs = Config.get_instance().config_data
def parse_args() -> argparse.Namespace:
"""
Parse command-line arguments. Automatically detect batch or single mode.
"""
parser = ar... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/env/env_manager.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:20.352407 | import logging
import platform
import re
from time import sleep
from typing import Optional, Tuple, Dict, TYPE_CHECKING, Any
import psutil
from fuzzywuzzy import fuzz
# Conditional imports for Windows-specific packages
if TYPE_CHECKING or platform.system() == "Windows":
from pywinauto import Desktop
from pywi... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/execution/agent/execute_agent.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:20.496826 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from ufo.agents.agent.app_agent import AppAgent
class ExecuteAgent(AppAgent):
"""
The Agent for task execution.
"""
def __init__(
self,
name: str,
process_name: str,
app_root_name: str,
):
... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/execution/agent/execute_eval_agent.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:20.556334 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from typing import Optional
from dataflow.prompter.execution.execute_eval_prompter import ExecuteEvalAgentPrompter
from ufo.agents.agent.evaluation_agent import EvaluationAgent
class ExecuteEvalAgent(EvaluationAgent):
"""
The Agent for ... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/execution/workflow/execute_flow.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:20.852719 | import os
import time
from typing import Any, Dict, List, Tuple
from dataflow.config.config import Config as InstantiationConfig
from dataflow.env.env_manager import WindowsAppEnv
from dataflow.execution.agent.execute_agent import ExecuteAgent
from dataflow.execution.agent.execute_eval_agent import ExecuteEvalAgent
fr... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/instantiation/agent/filter_agent.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:21.117622 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from typing import List
from dataflow.prompter.instantiation.filter_prompter import FilterPrompter
from ufo.agents.agent.basic import BasicAgent
class FilterAgent(BasicAgent):
"""
The Agent to evaluate the instantiated task is correct ... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/instantiation/agent/prefill_agent.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:21.121435 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from typing import Dict, List
from dataflow.prompter.instantiation.prefill_prompter import PrefillPrompter
from ufo.agents.agent.basic import BasicAgent
class PrefillAgent(BasicAgent):
"""
The Agent for task instantialization and acti... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/instantiation/agent/template_agent.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:21.145419 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from typing import Dict, List
from dataflow.prompter.instantiation.template_prompter import TemplatePrompter
from ufo.agents.agent.basic import BasicAgent
class TemplateAgent(BasicAgent):
"""
The Agent for choosing template.
"""
... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/instantiation/workflow/choose_template_flow.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:21.536666 | import json
import os
import random
import time
import warnings
from datetime import datetime
from pathlib import Path
from typing import Dict
from langchain.embeddings import CacheBackedEmbeddings
from langchain.storage import LocalFileStore
from langchain_community.embeddings import HuggingFaceEmbeddings
from langch... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/instantiation/workflow/filter_flow.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:21.619898 | import json
import logging
import os
import time
from typing import Dict, Tuple, Any
from dataflow.config.config import Config
from dataflow.instantiation.agent.filter_agent import FilterAgent
from ufo.module.basic import BaseSession
_configs = Config.get_instance().config_data
class FilterFlow:
"""
Class t... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/instantiation/workflow/prefill_flow.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:21.731704 | import json
import logging
import os
import time
from typing import Any, Dict, List, Tuple
from dataflow.config.config import Config
from dataflow.instantiation.agent.prefill_agent import PrefillAgent
from dataflow.env.env_manager import WindowsAppEnv
from ufo.agents.processors.app_agent_processor import AppAgentProce... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | dataflow/prompter/execution/execute_eval_prompter.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:22.105253 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import json
import os
from typing import Dict, List, Optional
from ufo.prompter.basic import BasicPrompter
from ufo.prompter.eva_prompter import EvaluationAgentPrompter
class ExecuteEvalAgentPrompter(EvaluationAgentPrompter):
"""
Execut... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/protocol/task_execution.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:22.597859 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Task Execution Protocol
Handles task assignment, execution coordination, and result reporting.
"""
import datetime
import logging
from typing import Any, List, Optional
from uuid import uuid4
from aip.messages import (
ClientMessage,
... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/resilience/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:22.598408 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
AIP Resilience Mechanisms
Provides connection resilience, reconnection strategies, heartbeat management,
and timeout handling for reliable agent communication.
"""
from .heartbeat_manager import HeartbeatManager
from .reconnection import Re... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/resilience/reconnection.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:22.628765 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Reconnection Strategy
Implements automatic reconnection with exponential backoff for handling
transient network failures and connection interruptions.
"""
import asyncio
import logging
from enum import Enum
from typing import TYPE_CHECKING,... |
microsoft/UFO | https://github.com/microsoft/UFO | null | null | null | null | 8,523 | null | null | mit | null | null | null | null | null | null | null | aip/resilience/heartbeat_manager.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:22.861405 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Heartbeat Manager
Manages periodic heartbeat messages to monitor connection health
and detect disconnections early.
"""
import asyncio
import logging
from typing import Dict, Optional
from aip.protocol.heartbeat import HeartbeatProtocol
... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | benchmarks/groupbyh2o.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:26.856877 | import vaex
from benchmarks.fixtures import generate_numerical
check = False
# in h2o we have (with n=1e8 and k=1e2)
# id1 - str with 1e2 different values
# id2 - str with 1e2 different values
# id3 - str with 1e2 different values
# id4 - int with 1e2 different values
# id5 - int with 1e2 different values
# id6 - in... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | benchmarks/groupby.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:26.858974 | import vaex
from benchmarks.fixtures import generate_numerical
class GroupbyBasic:
pretty_name = "Groupby benchmarks"
version = "1"
params = ([10**7, 5*10**7, 10**8],)
param_names = ['N']
def setup_cache(self):
# ensure the dataframe is generated
generate_numerical()
def se... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | benchmarks/from_csv.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:26.860229 | import glob
import os
from datetime import datetime
import vaex
def test_open_two_big_csv_convert():
big_and_biggest_csv = '/Users/byaminov/fun/datasets/test_yellow_tripdata/yellow_tripdata_2019-h1*.csv'
os.remove('/Users/byaminov/fun/datasets/test_yellow_tripdata/yellow_tripdata_2019-h1_01.csv.hdf5')
os... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | benchmarks/fixtures.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:26.861831 | import os
import numpy as np
import vaex.utils
def generate_strings(progress=False):
"""
Generate a dataframe with 10**8 rows and two columns: sequential numbers
and their string representations. The HDF5 file will be created at the path
~/.vaex/benchmark_strings.hdf5. If the file already exists thi... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | benchmarks/aggregates.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:26.863157 | import vaex
from benchmarks.fixtures import generate_numerical
class Aggregates:
pretty_name = "Performance of aggregates: stats, binby etc"
version = "1"
params = ([10**7, 5*10**7, 10**8],)
param_names = ['N']
def setup_cache(self):
# ensure the dataframe is generated
generate_... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | benchmarks/bookkeeping.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:26.864007 | import vaex
import numpy as np
# cache of dataframes
dfs = {}
dfs2 = {}
def time_create(n):
arr = np.random.random(size=(n, 10))
df = vaex.from_arrays(**{str(k):arr[k] for k in range(n)})
return df
time_create.params = [10, 50, 100, 1000]
def setup_copy(n):
dfs[n] = time_create(n)
def time_copy(n):... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | .releash.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:26.865068 | from releash import *
# these objects only tag when they are exe
gitpush = ReleaseTargetGitPush()
# core package
core = add_package("packages/vaex-core", "vaex-core")
version_core = VersionSource(core, '{path}/vaex/core/_version.py')
gittag_core = ReleaseTargetGitTagVersion(version_source=version_core, prefix='core-v'... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.