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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sunnypilot/sunnypilot | https://github.com/sunnypilot/sunnypilot | null | null | null | null | 1,922 | null | null | mit | null | null | null | null | null | null | null | common/transformations/model.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:27.450031 | import numpy as np
from openpilot.common.transformations.orientation import rot_from_euler
from openpilot.common.transformations.camera import get_view_frame_from_calib_frame, view_frame_from_device_frame, _ar_ox_fisheye
# segnet
SEGNET_SIZE = (512, 384)
# MED model
MEDMODEL_INPUT_SIZE = (512, 256)
MEDMODEL_YUV_SIZE... |
sunnypilot/sunnypilot | https://github.com/sunnypilot/sunnypilot | null | null | null | null | 1,922 | null | null | mit | null | null | null | null | null | null | null | common/transformations/orientation.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:27.554285 | import numpy as np
from collections.abc import Callable
from openpilot.common.transformations.transformations import (ecef_euler_from_ned_single,
euler2quat_single,
euler2rot_single,
... |
sunnypilot/sunnypilot | https://github.com/sunnypilot/sunnypilot | null | null | null | null | 1,922 | null | null | mit | null | null | null | null | null | null | null | common/tests/test_simple_kalman.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:31.231569 | from openpilot.common.simple_kalman import KF1D
class TestSimpleKalman:
def setup_method(self):
dt = 0.01
x0_0 = 0.0
x1_0 = 0.0
A0_0 = 1.0
A0_1 = dt
A1_0 = 0.0
A1_1 = 1.0
C0_0 = 1.0
C0_1 = 0.0
K0_0 = 0.12287673
K1_0 = 0.29666309
self.kf = KF1D(x0=[[x0_0], [x1_0]],
... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | __init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.013513 | "A package to build a machine learning model for trading and stock price prediction"
import aialpha.data_processor as data_processor
import aialpha.models as models
|
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | models/autoencoder.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.014804 | import tensorflow as tf
from keras.layers import Input, Dense
from keras.models import Model
from keras import regularizers
import pandas as pd
import numpy as np
class AutoEncoder:
def __init__(self, encoding_dim, input_shape):
self.encoding_dim = encoding_dim
self.input_shape = input_shape
... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data_processor/data_processing.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.016202 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
class DataProcessing:
def __init__(self, split):
self.split = split
def make_features(self, file_path, window, csv_path, make_y=True, verbose=True, save_csv=False):
df = pd.read_csv(f"{file_path}", index_col=0)
... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data_processor/base_bars.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.025470 | import pandas as pd
import numpy as np
class BaseBars:
def __init__(self, file_path, output_path, method, threshold, batch_size=20000000):
self.file_path = file_path
self.output_path = output_path
self.method = method
self.threshold = threshold
self.batch_size = batch_size... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | news_scrubbing/ewms.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.036843 | import pandas as pd
import numpy as np
import bokeh
#import vader
pd.options.mode.chained_assignment = None
df = pd.read_csv('export.csv')
df2=df[['Title','Date','Title Sentiment','Body Sentiment']]
df2['Weighted Sentiment'] = pd.Series(np.random.randn(len(df2['Title'])), index=df2.index)
for i in range(len(df2['T... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | models/nnmodel.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.038043 | import keras.layers as kl
from keras.models import Model
from keras import regularizers
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
class NNModel:
def __init__(self, input_shape):
self.input_shape = input_shape
def make_model(self):
input_data = kl.Input(shape=(1, se... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | news_scrubbing/apiprocessing.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.039861 | import time
import datetime
import csv
import aylien_news_api
from aylien_news_api.rest import ApiException
def fetch_new_stories(params={}):
fetched_stories = []
stories = None
while stories is None or len(stories) > 0:
response = api_instance.list_stories(**params)
stories = response.stories
params['curs... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | news_scrubbing/enhanced scrubbing.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.040840 | from random import randint
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
from textblob import TextBlob
import numpy as np
import pandas as pd
import nltk
import datetime as dt
indentifiers = ['IN', 'CC', 'CD']
pd.options.mode.chained_assignment = None
analyser = SentimentIntensityAnalyzer()
P... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | bar_sample.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.045264 | import pandas as pd
import numpy as np
from data_processor.base_bars import BaseBars
print('Creating tick bars...')
base = BaseBars("data/raw_data/price_vol.csv", "data/processed_data/price_bars/tick_bars.csv", "tick", 10)
base.batch_run()
print('Creating dollar bars...')
base = BaseBars("data/raw_data/price_vol.cs... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | models/rfmodel.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.045773 | import pandas as pd
import numpy as np
from sklearn.ensemble import RandomForestClassifier as RF
from sklearn.ensemble import BaggingClassifier as BC
from sklearn.metrics import f1_score
from sklearn.metrics import log_loss
class RFModel:
def __init__(self, input_shape):
self.input_shape = input_shape
... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | pca_auto.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.611557 | from models.autoencoder import AutoEncoder
from models.nnmodel import NNModel
from models.rfmodel import RFModel
from data_processor.data_processing import DataProcessing
import pandas as pd
import numpy as np
from sklearn.preprocessing import MinMaxScaler
import matplotlib.pyplot as plt
from sklearn.decomposition imp... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | run_full.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.621888 | from models.autoencoder import AutoEncoder
from models.nnmodel import NNModel
from models.rfmodel import RFModel
from data_processor.data_processing import DataProcessing
import pandas as pd
import numpy as np
from sklearn.preprocessing import MinMaxScaler
import matplotlib.pyplot as plt
# print('Processing data...'... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | run.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.622397 | from models.autoencoder import AutoEncoder
from models.nnmodel import NNModel
from models.rfmodel import RFModel
from data_processor.data_processing import DataProcessing
import pandas as pd
import numpy as np
from sklearn.preprocessing import MinMaxScaler
import matplotlib.pyplot as plt
from data_processor.base_bars ... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | news_scrubbing/newskeep.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.626196 | import apiprocessing
import pandas as pd
import numpy as np
from collections import deque
datax = deque()
for story in apiprocessing.stories:
x = list()
x.append(story.title)
x.append(story.source.name)
x.append(story.published_at.date())
x.append(story.sentiment.title.score)
x.append(story.se... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | twitter_scrubbing/twitter.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.626744 | import os
os.environ['R_HOME'] = r'C:\Program Files\R\R-3.5.1'
os.environ['R_USER'] = r'C:\Users\Xue Yao\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\rpy2'
import rpy2.robjects as robjects
directory = r'C:\Users\Xue Yao\Documents\News Scrubbing\Twitter Scrubbing\twitter.R'
r_source = robjects.r['sou... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | twitter_scrubbing/twittersentimentcalculator.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.632687 | import pandas as pd
import numpy as np
from textblob import TextBlob
pd.options.mode.chained_assignment = None
df = pd.read_csv('twitter.csv')
n = 0
sentiment = 0
df['New sentiment'] = pd.Series(np.random.randn(len(df['sentiment'])), index=df.index)
print(df)
for i in range(len(df)):
text = TextBlob(df.iloc[i][2])
... |
VivekPa/AIAlpha | https://github.com/VivekPa/AIAlpha | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | test.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:34.633496 | import pandas as pd
import numpy as np
df = pd.read_csv('data/raw_data/price_vol.csv', index_col=0)
print(df.shape)
sample_data = df.iloc[:1000000, :]
sample_data.to_csv('sample_data/raw_data/price_vol.csv') |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | agents/libero/eval_magma_libero.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:36.935550 | import os
import numpy as np
import draccus
from dataclasses import dataclass
from typing import Optional, Tuple
import tqdm
from libero.libero import benchmark
from libero_env_utils import (
get_libero_env,
get_libero_dummy_action,
get_libero_obs,
get_max_steps,
set_seed_everywhere
)
from libero_m... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | agents/robot_traj/utils/visualizer.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:36.949527 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import os
import numpy as np
import imageio
import torch
from matplotlib import cm
import torch.nn.functional as F
import ... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | agents/robot_traj/app.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:36.956644 | # --------------------------------------------------------
# Magma - Multimodal AI Agent at Microsoft Research
# Copyright (c) 2025 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Jianwei Yang (jianwyan@microsoft.com)
# --------------------------------------------------------
import os
import wa... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | agents/ui_agent/util/box_annotator.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:36.961037 | from typing import List, Optional, Union, Tuple
import cv2
import numpy as np
from supervision.detection.core import Detections
from supervision.draw.color import Color, ColorPalette
class BoxAnnotator:
"""
A class for drawing bounding boxes on an image using detections provided.
Attribute... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | agents/libero/libero_magma_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:36.962266 | import os
import json
import torch
import numpy as np
from magma.image_processing_magma import MagmaImageProcessor
from magma.processing_magma import MagmaProcessor
from magma.modeling_magma import MagmaForConditionalGeneration
def get_magma_model(model_name):
processor = MagmaProcessor.from_pretrained(model_name,... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | agents/libero/libero_env_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:36.964529 | """Utils for evaluating policies in LIBERO simulation environments."""
import math
import os
import torch
import random
from PIL import Image
import imageio
import numpy as np
import tensorflow as tf
from libero.libero import get_libero_path
from libero.libero.envs import OffScreenRenderEnv
def resize_image(img, resi... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | agents/ui_agent/app.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:36.966319 | # --------------------------------------------------------
# Magma - Multimodal AI Agent at Microsoft Research
# Copyright (c) 2025 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Jianwei Yang (jianwyan@microsoft.com)
# --------------------------------------------------------
from typing import ... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | agents/game_agent/app.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:36.975867 | # --------------------------------------------------------
# Magma - Multimodal AI Agent at Microsoft Research
# Copyright (c) 2025 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Jianwei Yang (jianwyan@microsoft.com)
# --------------------------------------------------------
import pygame
impor... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | agents/ui_agent/util/omniparser.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:36.976368 | from util.utils import get_som_labeled_img, get_caption_model_processor, get_yolo_model, check_ocr_box
import torch
from PIL import Image
import io
import base64
from typing import Dict
class Omniparser(object):
def __init__(self, config: Dict):
self.config = config
device = 'cuda' if torch.cuda.is_... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | agents/ui_agent/util/process_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:37.542175 | import re
# is instruction English
def is_english_simple(text):
try:
text.encode(encoding='utf-8').decode('ascii')
except UnicodeDecodeError:
return False
else:
return True
# bbox -> point (str)
def bbox_2_point(bbox, dig=2):
# bbox [left, top, right, bottom]
point = [(bbox... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:37.572708 | # datasets
from .epic import epic
from .ego4d import ego4d
from .openx import openx
from .openx_magma import openx_magma
from .magma import magma
from .llava import llava
from .seeclick import seeclick
# (joint) datasets
from .dataset import build_joint_dataset
# data collators
from .data_collator import DataCollator... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | agents/ui_agent/util/utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:37.573913 | # from ultralytics import YOLO
import os
import io
import base64
import time
from PIL import Image, ImageDraw, ImageFont
import json
import requests
# utility function
import os
import json
import sys
import os
import cv2
import numpy as np
# %matplotlib inline
from matplotlib import pyplot as plt
import easyocr
from ... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/conversations.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:37.579960 | import torch
import torchvision
import re
import cv2
import numpy as np
import os
import yaml
from PIL import Image
from data.utils.visual_trace import visual_trace
from data.utils.som_tom import som_prompting, tom_prompting
import torchvision.io as tv_io
import torchvision
import time
import random
from decord import ... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | agents/ui_agent/util/som.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:37.581585 | import torch
from ultralytics import YOLO
from PIL import Image
import io
import base64
device = 'cuda'
from PIL import Image, ImageDraw, ImageFont
import numpy as np
import networkx as nx
# import cv2
font_path = "agents/ui_agent/util/arial.ttf"
class MarkHelper:
def __init__(self):
self.markSize_dic... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/data_collator.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:37.582708 | import torch
from dataclasses import dataclass, field
from magma.processing_magma import MagmaProcessor
from typing import Dict, Optional, Sequence, List
import transformers
from data.utils.constants import IGNORE_INDEX, IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN
@dataclass
c... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/dataset.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:37.610017 | import os
import copy
from dataclasses import dataclass, field
import json
import logging
import pathlib
from typing import Dict, Optional, Sequence, List
import pandas as pd
import torch
import deepspeed
import glob
import pandas as pd
import transformers
import tokenizers
import random
import re
import cv2
from torch... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/data_item.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:37.637354 | import json
import yaml
import torch
import random
import os
import glob
import pickle
from datasets import load_dataset
from .openx import OpenXDataItem
from tqdm import tqdm
class DataItem:
"""
Curate data items from all data sources
"""
def __init__(self, training_size=-1, local_run=False):
... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/ego4d/data_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:37.657480 | import torch
import torchvision
import re
import cv2
import numpy as np
import os
import yaml
from tqdm import tqdm
from PIL import Image
from data.utils.visual_trace import visual_trace
from data.utils.som_tom import som_prompting, tom_prompting
from data.conversations import Constructor
import logging
logger = loggin... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/llava/data_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:38.394359 | import torch
import torchvision
import re
import cv2
import numpy as np
import os
import yaml
from tqdm import tqdm
from PIL import Image
from data.utils.visual_trace import visual_trace
from data.utils.som_tom import som_prompting, tom_prompting
from data.conversations import Constructor
class LlaVA(Constructor):
... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/epic/data_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:38.395570 | import torch
import torchvision
import re
import cv2
import numpy as np
import os
import yaml
from PIL import Image
from data.conversations import Constructor
class EpicKitchen(Constructor):
def __init__(self, **kwargs):
super(EpicKitchen, self).__init__(**kwargs)
# load settings from settings.yaml... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/magma/data_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:38.433378 | import torch
import torchvision
import re
import cv2
import numpy as np
import os
import yaml
from tqdm import tqdm
from PIL import Image
from data.conversations import Constructor
class Magma(Constructor):
def __init__(self, **kwargs):
super(Magma, self).__init__(**kwargs)
# load settings from set... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/action_tokenizer.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:38.534958 | """
action_tokenizer.py
Extension class; wraps base LLM/VLM tokenizer with logic to discretize and tokenize continuous robot actions.
"""
from typing import List, Union
import numpy as np
from transformers import PreTrainedTokenizerBase
class ActionTokenizer:
def __init__(
self, tokenizer: PreTrainedTo... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/conf/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:38.547886 | from .datasets import DatasetConfig, DatasetRegistry
from .models import ModelConfig, ModelRegistry
from .vla import VLAConfig, VLARegistry
|
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/conf/datasets.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:38.711591 | """
datasets.py
Draccus Dataclass Definition for a DatasetConfig object, with various registered subclasses for each dataset variant
and processing scheme. A given dataset variant (e.g., `llava-lightning`) configures the following attributes:
- Dataset Variant (Identifier) --> e.g., "llava-v15"
- Align Stage D... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/data_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:38.988046 |
import torch
import torchvision
import re
import cv2
import numpy as np
import os
import yaml
import logging
from PIL import Image
import torch.distributed as dist
from data.utils.visual_trace import visual_trace
from data.utils.som_tom import som_prompting, tom_prompting
from data.conversations import Constructor
fro... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/conf/vla.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:38.988803 | """
vla.py
Draccus Dataclass Definition for a VLAConfig object, with various registered subclasses for each VLA experiment and
model configuration thereof. A given VLA model (`policy`) configures the following attributes:
- Data Mixture (e.g., Bridge, OXE_MAGIC_SOUP, etc.)
- Base VLM from Prismatic Registry (e... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/conf/models.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:38.996677 | """
models.py
Draccus Dataclass Definition for a ModelConfig object, with various registered subclasses for each model family and
variant thereof. A given model variant configures the following attributes:
- Pretrained Visual Representation (e.g., OpenAI CLIP ViT-L/14) + Pretrained LLM Backbone (e.g., LLaMa-2 7B)
... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/datasets.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.120197 | """
datasets.py
Lightweight PyTorch Dataset Definition for wrapping RLDS TFDS Pipeline; just defines transform from RLDS default
format to OpenVLA, IterableDataset shim.
"""
from dataclasses import dataclass
from pathlib import Path
from typing import Any, Dict, Tuple, Type
import collections
import os
import numpy a... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/rlds/dataset.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.151636 | """
dataset.py
Core interface script for configuring and initializing RLDS datasets.
"""
import copy
import inspect
import json
from functools import partial
from typing import Callable, Dict, List, Optional, Tuple, Union
import logging
import torch.distributed as dist
import dlimp as dl
import numpy as np
import te... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/rlds/datasets_latent.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.182188 | """
dataset.py
Core interface script for configuring and initializing RLDS datasets.
"""
import copy
import inspect
import json
from functools import partial
from typing import Callable, Dict, List, Optional, Tuple, Union
import dlimp as dl
import numpy as np
import tensorflow as tf
import tensorflow_datasets as tfd... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/rlds/obs_transforms.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.210150 | """
obs_transforms.py
Contains observation-level transforms used in the orca data pipeline.
These transforms operate on the "observation" dictionary, and are applied at a per-frame level.
"""
from typing import Dict, Tuple, Union
import dlimp as dl
import tensorflow as tf
from absl import logging
# ruff: noqa: B0... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/rlds/oxe/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.283025 | from .materialize import get_oxe_dataset_kwargs_and_weights
from .mixtures import OXE_NAMED_MIXTURES
|
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/rlds/oxe/materialize.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.564381 | """
materialize.py
Factory class for initializing Open-X Embodiment dataset kwargs and other parameters; provides and exports functions for
clear control flow.
"""
from copy import deepcopy
from pathlib import Path
from typing import Any, Dict, List, Tuple
from data.openx.datasets.rlds.oxe.configs import OXE_DATASET... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/rlds/oxe/mixtures.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.620939 | """
mixtures.py
Defines a registry of dataset mixtures and weights for the Open-X Embodiment Datasets. Each dataset is associated with
a float "sampling weight"
"""
from typing import Dict, List, Tuple
# fmt: off
OXE_NAMED_MIXTURES: Dict[str, List[Tuple[str, float]]] = {
# === Bridge V2 Dataset ===
"bridge":... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/rlds/oxe/configs.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.637434 | """
configs.py
Defines per-dataset configuration (kwargs) for each dataset in Open-X Embodiment.
Configuration adopts the following structure:
image_obs_keys:
primary: primary external RGB
secondary: secondary external RGB
wrist: wrist RGB
depth_obs_keys:
primary: primary exte... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/rlds/oxe/transforms.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.678032 | """
transforms.py
Defines a registry of per-dataset standardization transforms for each dataset in Open-X Embodiment.
Transforms adopt the following structure:
Input: Dictionary of *batched* features (i.e., has leading time dimension)
Output: Dictionary `step` =>> {
"observation": {
<image... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/rlds/oxe/utils/droid_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.692816 | """Episode transforms for DROID dataset."""
from typing import Any, Dict
import tensorflow as tf
import tensorflow_graphics.geometry.transformation as tfg
def rmat_to_euler(rot_mat):
return tfg.euler.from_rotation_matrix(rot_mat)
def euler_to_rmat(euler):
return tfg.rotation_matrix_3d.from_euler(euler)
... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/rlds/traj_transforms.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.733531 | """
traj_transforms.py
Contains trajectory transforms used in the orca data pipeline. Trajectory transforms operate on a dictionary
that represents a single trajectory, meaning each tensor has the same leading dimension (the trajectory length).
"""
import logging
from typing import Dict
import tensorflow as tf
def... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/rlds/utils/data_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.736801 | """
data_utils.py
Additional RLDS-specific data utilities.
"""
import hashlib
import json
import os
from enum import Enum
from typing import Any, Callable, Dict, List, Optional, Tuple
import dlimp as dl
import numpy as np
import tensorflow as tf
from tqdm import tqdm
import logging
# from prismatic.logging import i... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/rlds/utils/goal_relabeling.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.817420 | """
goal_relabeling.py
Contains simple goal relabeling logic for BC use-cases where rewards and next_observations are not required.
Each function should add entries to the "task" dict.
"""
from typing import Dict
import tensorflow as tf
from data.openx.datasets.rlds.utils.data_utils import tree_merge
def uniform(... |
microsoft/Magma | https://github.com/microsoft/Magma | null | null | null | null | 1,920 | null | null | mit | null | null | null | null | null | null | null | data/openx/datasets/rlds/utils/task_augmentation.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:39.845409 | """
task_augmentation.py
Contains basic logic for randomly zeroing out keys in the task specification.
"""
from typing import Dict
import tensorflow as tf
from data.openx.datasets.rlds.utils.data_utils import to_padding
def delete_task_conditioning(traj: Dict, keep_image_prob: float) -> Dict:
"""
Randomly... |
glamp/bashplotlib | https://github.com/glamp/bashplotlib | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | bashplotlib/scatterplot.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:42.142182 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Plotting terminal based scatterplots
"""
from __future__ import print_function
import csv
import sys
import optparse
from .utils.helpers import *
from .utils.commandhelp import scatter
def get_scale(series, is_y=False, steps=20):
min_val = min(series)
max_va... |
glamp/bashplotlib | https://github.com/glamp/bashplotlib | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | bashplotlib/utils/helpers.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:42.144945 | #!/usr/bin/evn python
# -*- coding: utf-8 -*-
"""
Various helpful function for bashplotlib
"""
import sys
isiterable = lambda x: hasattr(x, '__iter__') or hasattr(x, '__getitem__')
bcolours = {
"white": '\033[97m',
"aqua": '\033[96m',
"pink": '\033[95m',
"blue": '\033[94m',
"yellow": ... |
glamp/bashplotlib | https://github.com/glamp/bashplotlib | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | bashplotlib/utils/commandhelp.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:42.146740 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Usage messages for bashplotlib system commands
"""
hist = {
"usage": """hist is a command for making histograms. it accepts a series of values in one of the following formats:
1) txt file w/ 1 column of numbers
2) standard in piped from another com... |
glamp/bashplotlib | https://github.com/glamp/bashplotlib | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | bashplotlib/histogram.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:42.147192 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Plotting terminal based histograms
"""
from __future__ import print_function
from __future__ import division
import os
import sys
import math
import optparse
from os.path import dirname
from .utils.helpers import *
from .utils.commandhelp import hist
def calc_bins(... |
glamp/bashplotlib | https://github.com/glamp/bashplotlib | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | setup.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:42.178925 | #!/usr/bin/env python
from setuptools import find_packages, setup
with open("README.rst") as fh:
long_description = fh.read()
setup(
name="bashplotlib",
version="0.6.5",
author="Greg Lamp",
author_email="lamp.greg@gmail.com",
url="https://github.com/glamp/bashplotlib",
license="BSD",
... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | detr/models/backbone.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:44.425663 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Backbone modules.
"""
from collections import OrderedDict
import torch
import torch.nn.functional as F
import torchvision
from torch import nn
from torchvision.models._utils import IntermediateLayerGetter
from typing import Dict, List
from uti... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | detr/models/transformer.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:44.431135 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
DETR Transformer class.
Copy-paste from torch.nn.Transformer with modifications:
* positional encodings are passed in MHattention
* extra LN at the end of encoder is removed
* decoder returns a stack of activations from all decoding... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | constants.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:44.432303 | import pathlib
### Task parameters
DATA_DIR = '<put your data dir here>'
SIM_TASK_CONFIGS = {
'sim_transfer_cube_scripted':{
'dataset_dir': DATA_DIR + '/sim_transfer_cube_scripted',
'num_episodes': 50,
'episode_len': 400,
'camera_names': ['top']
},
'sim_transfer_cube_human'... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | detr/models/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:44.438727 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from .detr_vae import build as build_vae
from .detr_vae import build_cnnmlp as build_cnnmlp
def build_ACT_model(args):
return build_vae(args)
def build_CNNMLP_model(args):
return build_cnnmlp(args) |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | detr/util/box_ops.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:44.439299 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Utilities for bounding box manipulation and GIoU.
"""
import torch
from torchvision.ops.boxes import box_area
def box_cxcywh_to_xyxy(x):
x_c, y_c, w, h = x.unbind(-1)
b = [(x_c - 0.5 * w), (y_c - 0.5 * h),
(x_c + 0.5 * w), (y_... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | detr/models/detr_vae.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:44.441658 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
DETR model and criterion classes.
"""
import torch
from torch import nn
from torch.autograd import Variable
from .backbone import build_backbone
from .transformer import build_transformer, TransformerEncoder, TransformerEncoderLayer
import nump... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | detr/setup.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:44.464136 | from distutils.core import setup
from setuptools import find_packages
setup(
name='detr',
version='0.0.0',
packages=find_packages(),
license='MIT License',
long_description=open('README.md').read(),
) |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | detr/models/position_encoding.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:44.466613 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Various positional encodings for the transformer.
"""
import math
import torch
from torch import nn
from util.misc import NestedTensor
import IPython
e = IPython.embed
class PositionEmbeddingSine(nn.Module):
"""
This is a more standar... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | detr/main.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:44.501118 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import argparse
from pathlib import Path
import numpy as np
import torch
from .models import build_ACT_model, build_CNNMLP_model
import IPython
e = IPython.embed
def get_args_parser():
parser = argparse.ArgumentParser('Set transformer detecto... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | ee_sim_env.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:45.040534 | import numpy as np
import collections
import os
from constants import DT, XML_DIR, START_ARM_POSE
from constants import PUPPET_GRIPPER_POSITION_CLOSE
from constants import PUPPET_GRIPPER_POSITION_UNNORMALIZE_FN
from constants import PUPPET_GRIPPER_POSITION_NORMALIZE_FN
from constants import PUPPET_GRIPPER_VELOCITY_NOR... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | policy.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:45.044738 | import torch.nn as nn
from torch.nn import functional as F
import torchvision.transforms as transforms
from detr.main import build_ACT_model_and_optimizer, build_CNNMLP_model_and_optimizer
import IPython
e = IPython.embed
class ACTPolicy(nn.Module):
def __init__(self, args_override):
super().__init__()
... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | detr/util/plot_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:45.079013 | """
Plotting utilities to visualize training logs.
"""
import torch
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from pathlib import Path, PurePath
def plot_logs(logs, fields=('class_error', 'loss_bbox_unscaled', 'mAP'), ewm_col=0, log_name='log.txt'):
'''
Func... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | detr/util/misc.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:45.087161 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Misc functions, including distributed helpers.
Mostly copy-paste from torchvision references.
"""
import os
import subprocess
import time
from collections import defaultdict, deque
import datetime
import pickle
from packaging import version
fro... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | imitate_episodes.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:45.087842 | import torch
import numpy as np
import os
import pickle
import argparse
import matplotlib.pyplot as plt
from copy import deepcopy
from tqdm import tqdm
from einops import rearrange
from constants import DT
from constants import PUPPET_GRIPPER_JOINT_OPEN
from utils import load_data # data functions
from utils import sa... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | sim_env.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:45.105081 | import numpy as np
import os
import collections
import matplotlib.pyplot as plt
from dm_control import mujoco
from dm_control.rl import control
from dm_control.suite import base
from constants import DT, XML_DIR, START_ARM_POSE
from constants import PUPPET_GRIPPER_POSITION_UNNORMALIZE_FN
from constants import MASTER_G... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | scripted_policy.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:45.107086 | import numpy as np
import matplotlib.pyplot as plt
from pyquaternion import Quaternion
from constants import SIM_TASK_CONFIGS
from ee_sim_env import make_ee_sim_env
import IPython
e = IPython.embed
class BasePolicy:
def __init__(self, inject_noise=False):
self.inject_noise = inject_noise
self.st... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:45.115917 | import numpy as np
import torch
import os
import h5py
from torch.utils.data import TensorDataset, DataLoader
import IPython
e = IPython.embed
class EpisodicDataset(torch.utils.data.Dataset):
def __init__(self, episode_ids, dataset_dir, camera_names, norm_stats):
super(EpisodicDataset).__init__()
s... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | record_sim_episodes.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:45.124174 | import time
import os
import numpy as np
import argparse
import matplotlib.pyplot as plt
import h5py
from constants import PUPPET_GRIPPER_POSITION_NORMALIZE_FN, SIM_TASK_CONFIGS
from ee_sim_env import make_ee_sim_env
from sim_env import make_sim_env, BOX_POSE
from scripted_policy import PickAndTransferPolicy, Insertio... |
tonyzhaozh/act | https://github.com/tonyzhaozh/act | null | null | null | null | 1,918 | null | null | mit | null | null | null | null | null | null | null | visualize_episodes.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:45.124642 | import os
import numpy as np
import cv2
import h5py
import argparse
import matplotlib.pyplot as plt
from constants import DT
import IPython
e = IPython.embed
JOINT_NAMES = ["waist", "shoulder", "elbow", "forearm_roll", "wrist_angle", "wrist_rotate"]
STATE_NAMES = JOINT_NAMES + ["gripper"]
def load_hdf5(dataset_dir,... |
corpnewt/GenSMBIOS | https://github.com/corpnewt/GenSMBIOS | null | null | null | null | 1,917 | null | null | mit | null | null | null | null | null | null | null | Scripts/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:46.939150 | from os.path import dirname, basename, isfile
import glob
modules = glob.glob(dirname(__file__)+"/*.py")
__all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] |
corpnewt/GenSMBIOS | https://github.com/corpnewt/GenSMBIOS | null | null | null | null | 1,917 | null | null | mit | null | null | null | null | null | null | null | Scripts/downloader.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:46.939770 | import sys, os, time, ssl, gzip, multiprocessing
from io import BytesIO
# Python-aware urllib stuff
try:
from urllib.request import urlopen, Request
import queue as q
except ImportError:
# Import urllib2 to catch errors
import urllib2
from urllib2 import urlopen, Request
import Queue as q
TERMI... |
corpnewt/GenSMBIOS | https://github.com/corpnewt/GenSMBIOS | null | null | null | null | 1,917 | null | null | mit | null | null | null | null | null | null | null | Scripts/plist.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:46.955809 | ### ###
# Imports #
### ###
import datetime, os, plistlib, struct, sys, itertools, binascii
from io import BytesIO
if sys.version_info < (3,0):
# Force use of StringIO instead of cStringIO as the latter
# has issues with Unicode strings
from StringIO import StringIO
else:
from io import String... |
corpnewt/GenSMBIOS | https://github.com/corpnewt/GenSMBIOS | null | null | null | null | 1,917 | null | null | mit | null | null | null | null | null | null | null | GenSMBIOS.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:46.956532 | #!/usr/bin/env python
import os, subprocess, shlex, sys, tempfile, shutil, random, uuid, zipfile, json, binascii
from Scripts import downloader, plist, run, utils
from collections import OrderedDict
# Import from secrets - or fall back on random.SystemRandom()
# functions if on python 2
try:
from secrets import ran... |
corpnewt/GenSMBIOS | https://github.com/corpnewt/GenSMBIOS | null | null | null | null | 1,917 | null | null | mit | null | null | null | null | null | null | null | Scripts/run.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:46.965307 | import sys, subprocess, time, threading, shlex
try:
from Queue import Queue, Empty
except:
from queue import Queue, Empty
ON_POSIX = 'posix' in sys.builtin_module_names
class Run:
def __init__(self):
return
def _read_output(self, pipe, q):
try:
for line in ... |
corpnewt/GenSMBIOS | https://github.com/corpnewt/GenSMBIOS | null | null | null | null | 1,917 | null | null | mit | null | null | null | null | null | null | null | Scripts/utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:46.995900 | import sys, os, time, re, json, datetime, ctypes, subprocess
if os.name == "nt":
# Windows
import msvcrt
else:
# Not Windows \o/
import select
class Utils:
def __init__(self, name = "Python Script"):
self.name = name
# Init our colors before we need to print anything
cwd =... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/core/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.020405 | """
Core functionality for the Word Document Server.
This package contains the core functionality modules used by the Word Document Server.
"""
from word_document_server.core.styles import ensure_heading_style, ensure_table_style, create_style
from word_document_server.core.protection import add_protection_info, veri... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | setup_mcp.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.046249 | # Import necessary Python standard libraries
import os
import json
import subprocess
import sys
import shutil
import platform
def check_prerequisites():
"""
Check if necessary prerequisites are installed
Returns:
tuple: (python_ok, uv_installed, uvx_installed,... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/core/footnotes.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.047662 | """
Consolidated footnote functionality for Word documents.
This module combines all footnote implementations with proper namespace handling and Word compliance.
"""
import os
import zipfile
import tempfile
from typing import Optional, Tuple, Dict, Any, List
from lxml import etree
from docx import Document
from docx.o... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.049848 | """
Word Document Server - MCP server for Microsoft Word document manipulation.
This package provides tools for creating, reading, and manipulating Microsoft Word
documents through the Model Context Protocol (MCP).
Features:
- Document creation and management
- Content addition (headings, paragraphs, tables, images)... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | __init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.050720 | """Office Word MCP Server package entry point."""
from word_document_server.main import run_server
__all__ = ["run_server"]
|
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/core/protection.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.088508 | """
Document protection functionality for Word Document Server.
"""
import os
import json
import hashlib
import datetime
from typing import Dict, List, Tuple, Optional, Any
def add_protection_info(doc_path: str, protection_type: str, password_hash: str,
sections: Optional[List[str]] = None,
... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | tests/test_convert_to_pdf.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.089026 | import asyncio
from pathlib import Path
import pytest
from docx import Document
# Target for testing: convert_to_pdf (async function)
from word_document_server.tools.extended_document_tools import convert_to_pdf
def _make_sample_docx(path: Path) -> None:
"""Generates a simple .docx file in a temporary directory... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | test_formatting.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.153383 | """
Test script for add_paragraph and add_heading formatting parameters.
"""
import asyncio
from docx import Document
from word_document_server.tools.content_tools import add_paragraph, add_heading
from word_document_server.tools.document_tools import create_document
async def test_formatting():
"""Test the new f... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/core/comments.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.158532 | """
Core comment extraction functionality for Word documents.
This module provides low-level functions to extract and process comments
from Word documents using the python-docx library.
"""
import datetime
from typing import Dict, List, Optional, Any
from docx import Document
from docx.document import Document as Docu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.