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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/02-intermediate/convolutional_neural_network/main.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:24.434533 | import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
# Device configuration
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
# Hyper parameters
num_epochs = 5
num_classes = 10
batch_size = 100
learning_rate = 0.001
# MNIST dataset
train_dataset = ... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/02-intermediate/language_model/data_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:24.436615 | import torch
import os
class Dictionary(object):
def __init__(self):
self.word2idx = {}
self.idx2word = {}
self.idx = 0
def add_word(self, word):
if not word in self.word2idx:
self.word2idx[word] = self.idx
self.idx2word[self.idx] = word
... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/01-basics/pytorch_basics/main.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:24.437733 | import torch
import torchvision
import torch.nn as nn
import numpy as np
import torchvision.transforms as transforms
# ================================================================== #
# Table of Contents #
# ========================================================... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/01-basics/logistic_regression/main.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:24.439284 | import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
# Hyper-parameters
input_size = 28 * 28 # 784
num_classes = 10
num_epochs = 5
batch_size = 100
learning_rate = 0.001
# MNIST dataset (images and labels)
train_dataset = torchvision.datasets.MNIST(root='../../data', ... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/02-intermediate/language_model/main.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:24.440183 | # Some part of the code was referenced from below.
# https://github.com/pytorch/examples/tree/master/word_language_model
import torch
import torch.nn as nn
import numpy as np
from torch.nn.utils import clip_grad_norm_
from data_utils import Dictionary, Corpus
# Device configuration
device = torch.device('cuda' if to... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/01-basics/feedforward_neural_network/main.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:24.441336 | import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
# Device configuration
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# Hyper-parameters
input_size = 784
hidden_size = 500
num_classes = 10
num_epochs = 5
batch_size = 100
learning_rate = 0.001
... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/02-intermediate/deep_residual_network/main.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:24.473151 | # ---------------------------------------------------------------------------- #
# An implementation of https://arxiv.org/pdf/1512.03385.pdf #
# See section 4.2 for the model architecture on CIFAR-10 #
# Some part of the code was referenced from below ... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/03-advanced/generative_adversarial_network/main.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:24.986411 | import os
import torch
import torchvision
import torch.nn as nn
from torchvision import transforms
from torchvision.utils import save_image
# Device configuration
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# Hyper-parameters
latent_size = 64
hidden_size = 256
image_size = 784
num_epochs = ... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/03-advanced/image_captioning/data_loader.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:25.008696 | import torch
import torchvision.transforms as transforms
import torch.utils.data as data
import os
import pickle
import numpy as np
import nltk
from PIL import Image
from build_vocab import Vocabulary
from pycocotools.coco import COCO
class CocoDataset(data.Dataset):
"""COCO Custom Dataset compatible with torch.u... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/03-advanced/image_captioning/build_vocab.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:25.035707 | import nltk
import pickle
import argparse
from collections import Counter
from pycocotools.coco import COCO
class Vocabulary(object):
"""Simple vocabulary wrapper."""
def __init__(self):
self.word2idx = {}
self.idx2word = {}
self.idx = 0
def add_word(self, word):
if not wo... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/03-advanced/image_captioning/resize.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:25.060755 | import argparse
import os
from PIL import Image
def resize_image(image, size):
"""Resize an image to the given size."""
return image.resize(size, Image.ANTIALIAS)
def resize_images(image_dir, output_dir, size):
"""Resize the images in 'image_dir' and save into 'output_dir'."""
if not os.path.exists(o... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/03-advanced/image_captioning/model.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:25.061404 | import torch
import torch.nn as nn
import torchvision.models as models
from torch.nn.utils.rnn import pack_padded_sequence
class EncoderCNN(nn.Module):
def __init__(self, embed_size):
"""Load the pretrained ResNet-152 and replace top fc layer."""
super(EncoderCNN, self).__init__()
resnet =... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/03-advanced/image_captioning/sample.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:25.068166 | import torch
import matplotlib.pyplot as plt
import numpy as np
import argparse
import pickle
import os
from torchvision import transforms
from build_vocab import Vocabulary
from model import EncoderCNN, DecoderRNN
from PIL import Image
# Device configuration
device = torch.device('cuda' if torch.cuda.is_available... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/03-advanced/neural_style_transfer/main.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:25.075892 | from __future__ import division
from torchvision import models
from torchvision import transforms
from PIL import Image
import argparse
import torch
import torchvision
import torch.nn as nn
import numpy as np
# Device configuration
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
def load_image(... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/03-advanced/image_captioning/train.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:25.101227 | import argparse
import torch
import torch.nn as nn
import numpy as np
import os
import pickle
from data_loader import get_loader
from build_vocab import Vocabulary
from model import EncoderCNN, DecoderRNN
from torch.nn.utils.rnn import pack_padded_sequence
from torchvision import transforms
# Device configuration
de... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/03-advanced/variational_autoencoder/main.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:25.108753 | import os
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
from torchvision import transforms
from torchvision.utils import save_image
# Device configuration
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# Create a directory if not exists
sample_dir = 'sam... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/04-utils/tensorboard/logger.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:25.146698 | # Code referenced from https://gist.github.com/gyglim/1f8dfb1b5c82627ae3efcfbbadb9f514
import tensorflow as tf
import numpy as np
import scipy.misc
try:
from StringIO import StringIO # Python 2.7
except ImportError:
from io import BytesIO # Python 3.x
class Logger(object):
def __init__(self... |
yunjey/pytorch-tutorial | https://github.com/yunjey/pytorch-tutorial | null | null | null | null | 32,309 | null | null | mit | null | null | null | null | null | null | null | tutorials/04-utils/tensorboard/main.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:25.660832 | import torch
import torch.nn as nn
import torchvision
from torchvision import transforms
from logger import Logger
# Device configuration
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# MNIST dataset
dataset = torchvision.datasets.MNIST(root='../../data',
... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/datasets/fairseqmmdataset.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:28.301890 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
TODO (huxu): fairseq wrapper class for all dataset you defined: mostly MMDataset.
"""
from collections import OrderedDict
from torch.util... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/evaluators/predictor.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:28.307296 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import random
import json
import numpy as np
import torch
import pickle
import math
from tqdm import tqdm
class Predictor(object):... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/evaluators/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:28.311661 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .metric import *
from .evaluator import *
# experimental.
try:
from .expmetric import *
except ImportError:
pass
|
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/evaluators/evaluator.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:28.312847 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import glob
import numpy as np
from . import metric as metric_path
from . import predictor as predictor_path
class Evaluator(objec... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:28.316771 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
try:
# fairseq user dir
from .datasets import FairseqMMDataset
from .losses import FairseqCriterion
from .models import Fairseq... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/datasets/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:28.318488 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .mmdataset import *
try:
from .fairseqmmdataset import *
except ImportError:
pass
|
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/locallaunch.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:28.319635 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import os
from omegaconf import OmegaConf
from mmpt.utils import recursive_config, overwrite_dir
from mmpt_cli.localjob impor... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/datasets/mmdataset.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:28.322140 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
from collections import OrderedDict
from torch.utils.data import Dataset
from torch.utils.data.dataloader import default_collat... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/evaluators/metric.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:28.334510 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import json
class Metric(object):
def __init__(self, config, metric_names):
self.metric_names = metric_names
... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/losses/fairseqmmloss.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.185117 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
TODO (huxu): a general fairseq criterion for all your pre-defined losses.
"""
from fairseq.criterions import FairseqCriterion, register_c... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/losses/nce.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.186286 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
softmax-based NCE loss, used by this project.
"""
import torch
from torch import nn
from .loss import Loss
class NCE(Loss):
def _... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/models/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.187379 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .mmfusion import *
from .transformermodel import *
from .mmfusionnlg import *
try:
from .fairseqmmmodel import *
except ImportError:
... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/modules/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.300082 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .mm import *
try:
from .expmm import *
except ImportError:
pass
|
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/losses/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.348695 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .loss import *
from .nce import *
try:
from .fairseqmmloss import *
except ImportError:
pass
try:
from .expnce import *
exce... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/models/mmfusionnlg.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.412582 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors, Facebook AI Research authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the L... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/models/fairseqmmmodel.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.429828 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from fairseq.models import (
BaseFairseqModel,
register_model,
register_model_architecture
)
@register_model("mmmodel")
class Fa... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/losses/loss.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.460945 | # Copyright (c) Facebook, Inc. All Rights Reserved
import torch
from torch import nn
class Loss(object):
def __call__(self, *args, **kwargs):
raise NotImplementedError
# Dummy Loss for testing.
class DummyLoss(Loss):
def __init__(self):
self.loss = nn.CrossEntropyLoss()
def __call__(s... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/modules/retri.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.788662 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import numpy as np
import pickle
import time
try:
import faiss
except ImportError:
pass
from collections import defaultdict... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/modules/vectorpool.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.820164 | # Copyright (c) Facebook, Inc. All Rights Reserved
import torch
import os
import numpy as np
import pickle
from . import retri
from ..utils import get_local_rank
class VectorPool(object):
"""
Base class of retrieval space.
"""
def __init__(self, config):
from transformers import AutoConfig
... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/modules/mm.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.823550 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/processors/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.912336 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .processor import *
from .how2processor import *
from .how2retriprocessor import *
from .dsprocessor import *
try:
from .rawvideopr... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/processors/dedupprocessor.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.913952 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import random
import json
import pickle
from tqdm import tqdm
import os
import numpy as np
class CaptionDedupProcessor(object):
"""remov... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/models/mmfusion.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:29.997076 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/processors/how2processor.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.009487 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/models/transformermodel.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.025506 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/processors/dsprocessor.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.026755 | # Copyright (c) Facebook, Inc. All Rights Reserved
"""
Processors for all downstream (ds) tasks.
"""
import json
import os
import pickle
import random
import math
import numpy as np
import torch
from collections import defaultdict
from .processor import (
MetaProcessor,
VideoProcessor,
TextProcessor,
... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/processors/how2retriprocessor.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.042656 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .how2processor import (
ShardedHow2MetaProcessor,
ShardedVideoProcessor,
ShardedTextProcessor,
VariedLenAligner,
Over... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/processors/models/s3dg.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.343088 | # This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Contains a PyTorch definition for Gated Separable 3D network (S3D-G)
with a text module for computing joint text-video embedding from raw text
and video input. The following code will enable y... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/processors/processor.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.435588 | # Copyright (c) Facebook, Inc. All Rights Reserved
import numpy as np
import os
import torch
class Processor(object):
"""
A generic processor for video (codec, feature etc.) and text.
"""
def __call__(self, **kwargs):
raise NotImplementedError
class MetaProcessor(Processor):
"""
A ... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/tasks/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.450982 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .task import *
from .vlmtask import *
from .retritask import *
try:
from .fairseqmmtask import *
except ImportError:
pass
try:
... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/tasks/fairseqmmtask.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.469005 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
make a general fairseq task for MM pretraining.
"""
import random
from fairseq.tasks import LegacyFairseqTask, register_task
from .task ... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/tasks/milncetask.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.548310 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
from .task import Task
class MILNCETask(Task):
def reshape_subsample(self, sample):
if (
hasattr(self.... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/tasks/task.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.581058 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
from .. import tasks
from .. import models
from .. import losses
from ..datasets import MMDataset
from .. import processors
cla... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/tasks/vlmtask.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.607457 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
from .task import Task
class VLMTask(Task):
"""A VLM task for reproducibility.
the collator split subsamples into two s... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/tasks/retritask.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.615638 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import torch
import pickle
import random
from tqdm import tqdm
from torch.utils.data import DataLoader
from torch.utils.data.distrib... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/utils/load_config.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.630107 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import omegaconf
from omegaconf import OmegaConf
def load_config(args=None, config_file=None, overwrite_fairseq=False):
"""TODO... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/utils/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.638663 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import random
import numpy as np
import torch
from .shardedtensor import *
from .load_config import *
def set_seed(seed=43211):
random.s... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt/utils/shardedtensor.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:30.938853 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import pickle
import numpy as np
class ShardedTensor(object):
def __init__(self, data, starts):
self.data = data
... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt_cli/localjob.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:31.033459 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
from mmpt.utils import recursive_config
class BaseJob(object):
def __init__(self, yaml_file, dryrun=False):
self.yaml_... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/mmpt_cli/predict.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:31.034523 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import glob
import argparse
import pprint
import omegaconf
from omegaconf import OmegaConf
from torch.utils.data import DataLoader
... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/scripts/text_token_extractor/pretokenization.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:31.060159 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import pickle
import os
import argparse
import numpy as np
from torch.utils.data import Dataset, DataLoader
from mmpt.processors import PKLJS... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/scripts/video_feature_extractor/extract.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:31.129439 | # Copyright Howto100M authors.
# Copyright (c) Facebook, Inc. All Rights Reserved
import torch as th
import torch.nn.functional as F
import math
import numpy as np
import argparse
from torch.utils.data import DataLoader
from model import get_model
from preprocessing import Preprocessing
from random_sequence_shuffler ... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/scripts/video_feature_extractor/model.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:31.138507 | # Copyright (c) Howto100M authors and Facebook, Inc. All Rights Reserved
import torch as th
from torch import nn
class GlobalAvgPool(nn.Module):
def __init__(self):
super(GlobalAvgPool, self).__init__()
def forward(self, x):
return th.mean(x, dim=[-2, -1])
def get_model(args):
assert ... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/scripts/video_feature_extractor/preprocessing.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:31.212916 | # Copyright Howto100m authors.
# Copyright (c) Facebook, Inc. All Rights Reserved
import torch as th
class Normalize(object):
def __init__(self, mean, std):
self.mean = th.FloatTensor(mean).view(1, 3, 1, 1)
self.std = th.FloatTensor(std).view(1, 3, 1, 1)
def __call__(self, tensor):
t... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/scripts/video_feature_extractor/pathbuilder.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:31.230771 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import urllib.parse
import json
import pandas as pd
from tqdm import tqdm
# TODO: extending to other datasets.
supported_formats =... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/scripts/video_feature_extractor/shard_feature.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:31.241330 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import os
import pickle
from mmpt.utils import ShardedTensor
class Shard(object):
def __init__(
self,
... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/scripts/video_feature_extractor/random_sequence_shuffler.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:31.261692 | # Copyright (c) Facebook, Inc. All Rights Reserved
import numpy as np
from torch.utils.data.sampler import Sampler
class RandomSequenceSampler(Sampler):
def __init__(self, n_sample, seq_len):
self.n_sample = n_sample
self.seq_len = seq_len
def _pad_ind(self, ind):
zeros = np.zeros(... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/scripts/video_feature_extractor/videoreader.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:31.545355 | # Copyright Howto100M authors.
# Copyright (c) Facebook, Inc. All Rights Reserved
import torch as th
import pandas as pd
import os
import numpy as np
import ffmpeg
import random
from torch.utils.data import Dataset
class VideoLoader(Dataset):
"""modified from how2's video_feature_extractor."""
def __init__(... |
facebookresearch/fairseq | https://github.com/facebookresearch/fairseq | null | null | null | null | 32,213 | null | null | mit | null | null | null | null | null | null | null | examples/MMPT/setup.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:31.647945 | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="mmpt",
version="0.0.1",
author="Hu Xu, Po-yao Huang",
author_email="huxu@fb.com",
description="A package for multimodal pretraining.",
long_description=long_description,
long_descr... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | cookbook/copilot-sdk/python/recipe/managing_local_files.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:34.445732 | #!/usr/bin/env python3
import asyncio
import os
from copilot import (
CopilotClient,
SessionConfig,
MessageOptions,
SessionEvent,
PermissionHandler,
)
async def main():
# Create and start client
client = CopilotClient()
await client.start()
# Create session
session = await cli... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | cookbook/copilot-sdk/python/recipe/persisting_sessions.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:34.453529 | #!/usr/bin/env python3
import asyncio
from copilot import CopilotClient, SessionConfig, MessageOptions, PermissionHandler
async def main():
client = CopilotClient()
await client.start()
# Create session with a memorable ID
session = await client.create_session(SessionConfig(
session_id="user-... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | cookbook/copilot-sdk/python/recipe/pr_visualization.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:34.455549 | #!/usr/bin/env python3
import asyncio
import subprocess
import sys
import os
import re
from copilot import (
CopilotClient,
SessionConfig,
MessageOptions,
SessionEvent,
PermissionHandler,
)
# ============================================================================
# Git & GitHub Detection
# ==... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | cookbook/copilot-sdk/python/recipe/multiple_sessions.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:34.460054 | #!/usr/bin/env python3
import asyncio
from copilot import CopilotClient, SessionConfig, MessageOptions, PermissionHandler
async def main():
client = CopilotClient()
await client.start()
# Create multiple independent sessions
session1 = await client.create_session(SessionConfig(model="gpt-5",
... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | cookbook/copilot-sdk/python/recipe/error_handling.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:34.460591 | #!/usr/bin/env python3
import asyncio
from copilot import CopilotClient, SessionConfig, MessageOptions, PermissionHandler
async def main():
client = CopilotClient()
try:
await client.start()
session = await client.create_session(SessionConfig(model="gpt-5",
on_permission_request=Permi... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | cookbook/copilot-sdk/python/recipe/ralph_loop.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:34.467550 | #!/usr/bin/env python3
"""
Ralph loop: autonomous AI task loop with fresh context per iteration.
Two modes:
- "plan": reads PROMPT_plan.md, generates/updates IMPLEMENTATION_PLAN.md
- "build": reads PROMPT_build.md, implements tasks, runs tests, commits
Each iteration creates a fresh session so the agent always o... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | cookbook/copilot-sdk/python/recipe/accessibility_report.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:34.468471 | #!/usr/bin/env python3
import asyncio
from copilot import (
CopilotClient,
SessionConfig,
MessageOptions,
SessionEvent,
PermissionHandler,
)
# ============================================================================
# Main Application
# =========================================================... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | cookbook/copilot-sdk/python/recipe/pyinstaller_frozen_build.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:34.477296 | """
PyInstaller / Frozen Build Compatibility
=========================================
Demonstrates how to create a CopilotClient that works correctly inside
a PyInstaller (or Nuitka) frozen executable.
Run normally:
python pyinstaller_frozen_build.py
Build with PyInstaller:
pyinstaller --onefile pyinstaller_... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | cookbook/copilot-sdk/python/recipe/error_recovery_hooks.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:34.488912 | """
Error Recovery Hooks
====================
Demonstrates how to classify tool results and SDK errors, then use hooks
to keep the LLM investigating instead of giving up on failure.
Run:
python error_recovery_hooks.py
Requirements:
pip install copilot-sdk
"""
import asyncio
from enum import Enum
from copilo... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | plugins/eyeball/skills/eyeball/tools/eyeball.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:34.532771 | #!/usr/bin/env python3
"""
Eyeball - Document analysis with inline source screenshots.
Converts source documents (Word, PDF, web URL) to PDF, renders pages as images,
searches for cited text, highlights matching regions, and assembles an output
Word document with analysis text interleaved with source screenshots.
Usa... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/acquire-codebase-knowledge/scripts/scan.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.084075 | #!/usr/bin/env python3
"""
scan.py — Collect project discovery information for the acquire-codebase-knowledge skill.
Run from the project root directory.
Usage: python3 scan.py [OPTIONS]
Options:
--output FILE Write output to FILE instead of stdout
--help Show this message and exit
Exit codes:
0 Su... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/datanalysis-credit-risk/references/func.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.087910 | """Data processing functions module"""
import pandas as pd
import numpy as np
import toad
from typing import List, Dict, Tuple
import tqdm
from datetime import datetime
try:
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment
HAS_OPENPYXL = True
except:
HAS_OPENPYXL =... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/code-tour/scripts/generate_from_docs.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.106069 | #!/usr/bin/env python3
"""
Generate a tour skeleton from repo documentation (README, CONTRIBUTING, docs/).
Reads README.md (and optionally CONTRIBUTING.md, docs/) to extract:
- File and directory references
- Architecture / structure sections
- Setup instructions (becomes an orientation step)
- External links ... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/azure-architecture-autopilot/scripts/cli.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.111512 | #!/usr/bin/env python3
"""CLI for azure-architecture-autopilot diagram engine."""
import argparse
import json
import sys
import os
import subprocess
import shutil
from pathlib import Path
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from generator import generate_diagram
def main():
parser = ar... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/datanalysis-credit-risk/references/analysis.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.137363 | """Variable selection and analysis module - simplified version
PSI calculation is reused in func.py, analysis.py only handles variable selection
"""
import pandas as pd
import numpy as np
import toad
from typing import List, Dict, Tuple
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignm... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/datanalysis-credit-risk/scripts/example.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.152291 | #!/usr/bin/env python3
"""
Execution script
Version: 1.0.0
Last modified: 02-03-2026
"""
import os, sys
import time
import pandas as pd
from typing import Dict, List, Optional, Any, Callable
import numpy as np
import multiprocessing
# =============================================================================
# Syst... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/draw-io-diagram-generator/scripts/validate-drawio.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.154389 | #!/usr/bin/env python3
"""
validate-drawio.py — Validate the XML structure of a .drawio diagram file.
Usage:
python scripts/validate-drawio.py <path-to-file.drawio>
Exit codes:
0 All checks passed
1 One or more validation errors found
"""
from __future__ import annotations
import sys
import xml.etree.E... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/draw-io-diagram-generator/scripts/add-shape.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.159195 | #!/usr/bin/env python3
"""
add-shape.py — Add a new vertex shape to an existing .drawio diagram file.
Usage:
python scripts/add-shape.py <diagram.drawio> <label> <x> <y> [options]
Examples:
python scripts/add-shape.py docs/flowchart.drawio "New Step" 400 300
python scripts/add-shape.py docs/arch.drawio "D... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/azure-architecture-autopilot/scripts/generator.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.197929 | #!/usr/bin/env python3
"""
Azure Interactive Architecture Diagram Generator v3
Generates interactive HTML diagrams with Azure official icons (Base64 inline).
"""
import json
from datetime import datetime
from icons import get_icon_data_uri
_HAS_OFFICIAL_ICONS = True
# Azure service icons: SVG, colors + official icon... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/code-tour/scripts/validate_tour.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.206263 | #!/usr/bin/env python3
"""
CodeTour validator — bundled with the code-tour skill.
Checks a .tour file for:
- Valid JSON
- Required fields (title, steps, description per step)
- File paths that actually exist in the repo
- Line numbers within file bounds
- Selection ranges within file bounds
- Directory pat... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/excalidraw-diagram-generator/scripts/add-arrow.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.645478 | #!/usr/bin/env python3
"""
Add arrows (connections) between elements in Excalidraw diagrams.
Usage:
python add-arrow.py <diagram_path> <from_x> <from_y> <to_x> <to_y> [OPTIONS]
Options:
--style {solid|dashed|dotted} Arrow line style (default: solid)
--color HEX Arrow color (default... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/eval-driven-dev/resources/verify_step6_completion.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.655807 | #!/usr/bin/env python3
"""Validate that eval-driven-dev Step 6 artifacts are complete.
Usage:
python verify_step6_completion.py /path/to/pixie_qa/results/<test_id>
"""
from __future__ import annotations
import argparse
import json
import sys
from pathlib import Path
ENTRY_REQUIRED_FILES = ("evaluations.jsonl",)... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.672533 | #!/usr/bin/env python3
"""
Add icons from Excalidraw libraries to diagrams.
This script reads an icon JSON file from an Excalidraw library, transforms its coordinates
to a target position, generates unique IDs, and adds it to an existing Excalidraw diagram.
Works with any Excalidraw library (AWS, GCP, Azure, Kubernete... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.695484 | #!/usr/bin/env python3
"""
Excalidraw Library Splitter
This script splits an Excalidraw library file (*.excalidrawlib) into individual
icon JSON files and generates a reference.md file for easy lookup.
The script expects the following structure:
skills/excalidraw-diagram-generator/libraries/{icon-set-name}/
{ic... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/eyeball/tools/eyeball.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.729706 | #!/usr/bin/env python3
"""
Eyeball - Document analysis with inline source screenshots.
Converts source documents (Word, PDF, web URL) to PDF, renders pages as images,
searches for cited text, highlights matching regions, and assembles an output
Word document with analysis text interleaved with source screenshots.
Usa... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/publish-to-pages/scripts/convert-pdf.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.730619 | #!/usr/bin/env python3
"""Convert a PDF to an HTML presentation.
Each page is rendered as a PNG image (via pdftoppm). Supports external assets
mode for large files to avoid huge single-file HTML.
Requirements: poppler-utils (pdftoppm)
"""
import argparse
import base64
import glob
import os
import subprocess
import s... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/nano-banana-pro-openrouter/scripts/generate_image.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.731236 | #!/usr/bin/env python3
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "openai",
# ]
# ///
"""
Generate or edit images via OpenRouter using openai-python.
"""
import argparse
import base64
import mimetypes
import os
from pathlib import Path
from openai import OpenAI
# Configuration
MAX_INPUT_IMAG... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/terraform-azurerm-set-diff-analyzer/scripts/analyze_plan.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.757701 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Terraform Plan Analyzer for AzureRM Set-type Attributes
Analyzes terraform plan JSON output to distinguish between:
- Order-only changes (false positives) in Set-type attributes
- Actual additions/deletions/modifications
Usage:
terraform show -json plan.tfplan | ... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/publish-to-pages/scripts/convert-pptx.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.761003 | #!/usr/bin/env python3
"""Convert a PPTX file to an HTML presentation with formatting preserved.
Supports external assets mode for large files to avoid huge single-file HTML.
"""
import argparse
import base64
import io
import os
import re
import sys
from pathlib import Path
def _ensure_pptx():
try:
from p... |
github/awesome-copilot | https://github.com/github/awesome-copilot | null | null | null | null | 32,025 | null | null | mit | null | null | null | null | null | null | null | skills/python-pypi-package-builder/scripts/scaffold.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:35.871443 | #!/usr/bin/env python3
"""
scaffold.py — Generate a production-grade Python PyPI package structure.
Usage:
python scaffold.py --name my-package
python scaffold.py --name my-package --layout src
python scaffold.py --name my-package --build hatchling
Options:
--name PyPI package name (lowercase, hy... |
eriklindernoren/ML-From-Scratch | https://github.com/eriklindernoren/ML-From-Scratch | null | null | null | null | 31,414 | null | null | mit | null | null | null | null | null | null | null | mlfromscratch/examples/apriori.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:38.241526 | from __future__ import division, print_function
import numpy as np
from mlfromscratch.unsupervised_learning import Apriori
def main():
# Demo transaction set
# Example 2: https://en.wikipedia.org/wiki/Apriori_algorithm
transactions = np.array([[1, 2, 3, 4], [1, 2, 4], [1, 2], [2, 3, 4], [2, 3], [3, 4], [2... |
eriklindernoren/ML-From-Scratch | https://github.com/eriklindernoren/ML-From-Scratch | null | null | null | null | 31,414 | null | null | mit | null | null | null | null | null | null | null | mlfromscratch/deep_learning/neural_network.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:38.250321 | from __future__ import print_function, division
from terminaltables import AsciiTable
import numpy as np
import progressbar
from mlfromscratch.utils import batch_iterator
from mlfromscratch.utils.misc import bar_widgets
class NeuralNetwork():
"""Neural Network. Deep Learning base model.
Parameters:
-----... |
eriklindernoren/ML-From-Scratch | https://github.com/eriklindernoren/ML-From-Scratch | null | null | null | null | 31,414 | null | null | mit | null | null | null | null | null | null | null | mlfromscratch/deep_learning/loss_functions.py | null | null | null | null | null | null | Python | 2026-05-04T02:24:38.259905 | from __future__ import division
import numpy as np
from mlfromscratch.utils import accuracy_score
from mlfromscratch.deep_learning.activation_functions import Sigmoid
class Loss(object):
def loss(self, y_true, y_pred):
return NotImplementedError()
def gradient(self, y, y_pred):
raise NotImplem... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.