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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MechanicalSoup/MechanicalSoup | https://github.com/MechanicalSoup/MechanicalSoup | null | null | null | null | 4,854 | null | null | mit | null | null | null | null | null | null | null | tests/setpath.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:29.572388 | """Add the main directory of the project to sys.path, so that
uninstalled version is tested."""
import os
import sys
TEST_DIR = os.path.abspath(os.path.dirname(__file__))
PROJ_DIR = os.path.dirname(TEST_DIR)
sys.path.insert(0, os.path.join(PROJ_DIR))
|
MechanicalSoup/MechanicalSoup | https://github.com/MechanicalSoup/MechanicalSoup | null | null | null | null | 4,854 | null | null | mit | null | null | null | null | null | null | null | setup.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:29.572834 | import re
from codecs import open # To use a consistent encoding
from os import path
from setuptools import setup # Always prefer setuptools over distutils
def strip(line):
"""Strip comments and whitespace from a line of text."""
return line.split('#', 1)[0].strip()
def requirements_from_file(filename):
... |
MechanicalSoup/MechanicalSoup | https://github.com/MechanicalSoup/MechanicalSoup | null | null | null | null | 4,854 | null | null | mit | null | null | null | null | null | null | null | tests/utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:29.627616 | from urllib.parse import parse_qsl
import requests_mock
import mechanicalsoup
"""
Utilities for testing MechanicalSoup.
"""
choose_submit_form = '''
<html>
<body>
<!-- vaguely based on Trac edit-page form -->
<form id="choose-submit-form" method="post" action="mock://form.com/post">
<textarea id="t... |
mzucker/noteshrink | https://github.com/mzucker/noteshrink | null | null | null | null | 4,847 | null | null | mit | null | null | null | null | null | null | null | noteshrink.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:31.850979 | #!/usr/bin/env python
'''Converts sequence of images to compact PDF while removing speckles,
bleedthrough, etc.
'''
# for some reason pylint complains about members being undefined :(
# pylint: disable=E1101
from __future__ import print_function
import sys
import os
import re
import subprocess
import shlex
from a... |
mzucker/noteshrink | https://github.com/mzucker/noteshrink | null | null | null | null | 4,847 | null | null | mit | null | null | null | null | null | null | null | setup.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:31.880738 | #!/usr/bin/env python
from __future__ import print_function
import os
import sys
from setuptools import setup
if sys.argv[-1] == "publish":
os.system("python setup.py sdist upload")
os.system("python setup.py bdist_wheel upload")
print("You probably want to also tag the version now:")
print(" git ta... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | log/classification/pointnet2_msg_normals/pointnet2_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:33.986606 | import torch
import torch.nn as nn
import torch.nn.functional as F
from time import time
import numpy as np
def timeit(tag, t):
print("{}: {}s".format(tag, time() - t))
return time()
def pc_normalize(pc):
l = pc.shape[0]
centroid = np.mean(pc, axis=0)
pc = pc - centroid
m = np.max(np.sqrt(np.s... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | data_utils/ModelNetDataLoader.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.007110 | '''
@author: Xu Yan
@file: ModelNet.py
@time: 2021/3/19 15:51
'''
import os
import numpy as np
import warnings
import pickle
from tqdm import tqdm
from torch.utils.data import Dataset
warnings.filterwarnings('ignore')
def pc_normalize(pc):
centroid = np.mean(pc, axis=0)
pc = pc - centroid
m = np.max(np.... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | log/part_seg/pointnet2_part_seg_msg/pointnet2_part_seg_msg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.015136 | import torch.nn as nn
import torch
import torch.nn.functional as F
from models.pointnet2_utils import PointNetSetAbstractionMsg,PointNetSetAbstraction,PointNetFeaturePropagation
class get_model(nn.Module):
def __init__(self, num_classes, normal_channel=False):
super(get_model, self).__init__()
if ... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | log/classification/pointnet2_ssg_wo_normals/pointnet2_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.025599 | import torch
import torch.nn as nn
import torch.nn.functional as F
from time import time
import numpy as np
def timeit(tag, t):
print("{}: {}s".format(tag, time() - t))
return time()
def pc_normalize(pc):
l = pc.shape[0]
centroid = np.mean(pc, axis=0)
pc = pc - centroid
m = np.max(np.sqrt(np.s... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | log/classification/pointnet2_ssg_wo_normals/pointnet2_cls_ssg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.032011 | import torch.nn as nn
import torch.nn.functional as F
from pointnet2_utils import PointNetSetAbstraction
class get_model(nn.Module):
def __init__(self,num_class,normal_channel=True):
super(get_model, self).__init__()
in_channel = 6 if normal_channel else 3
self.normal_channel = normal_chan... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | data_utils/collect_indoor3d_data.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.033464 | import os
import sys
from indoor3d_util import DATA_PATH, collect_point_label
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.dirname(BASE_DIR)
sys.path.append(BASE_DIR)
anno_paths = [line.rstrip() for line in open(os.path.join(BASE_DIR, 'meta/anno_paths.txt'))]
anno_paths = [os.path.join(DAT... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | data_utils/indoor3d_util.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.034525 | import numpy as np
import glob
import os
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.dirname(BASE_DIR)
sys.path.append(BASE_DIR)
DATA_PATH = os.path.join(ROOT_DIR, 'data','s3dis', 'Stanford3dDataset_v1.2_Aligned_Version')
g_classes = [x.rstrip() for x in open(os.path.join(BASE_... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | data_utils/S3DISDataLoader.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.039917 | import os
import numpy as np
from tqdm import tqdm
from torch.utils.data import Dataset
class S3DISDataset(Dataset):
def __init__(self, split='train', data_root='trainval_fullarea', num_point=4096, test_area=5, block_size=1.0, sample_rate=1.0, transform=None):
super().__init__()
self.num_point = ... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | data_utils/ShapeNetDataLoader.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.045351 | # *_*coding:utf-8 *_*
import os
import json
import warnings
import numpy as np
from torch.utils.data import Dataset
warnings.filterwarnings('ignore')
def pc_normalize(pc):
centroid = np.mean(pc, axis=0)
pc = pc - centroid
m = np.max(np.sqrt(np.sum(pc ** 2, axis=1)))
pc = pc / m
return pc
class Par... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | log/classification/pointnet2_msg_normals/pointnet2_cls_msg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.095271 | import torch.nn as nn
import torch.nn.functional as F
from pointnet2_utils import PointNetSetAbstractionMsg, PointNetSetAbstraction
class get_model(nn.Module):
def __init__(self,num_class,normal_channel=True):
super(get_model, self).__init__()
in_channel = 3 if normal_channel else 0
self.n... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | log/part_seg/pointnet2_part_seg_msg/pointnet2_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.559119 | import torch
import torch.nn as nn
import torch.nn.functional as F
from time import time
import numpy as np
def timeit(tag, t):
print("{}: {}s".format(tag, time() - t))
return time()
def pc_normalize(pc):
l = pc.shape[0]
centroid = np.mean(pc, axis=0)
pc = pc - centroid
m = np.max(np.sqrt(np.s... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | log/sem_seg/pointnet2_sem_seg/pointnet2_sem_seg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.566279 | import torch.nn as nn
import torch.nn.functional as F
from models.pointnet2_utils import PointNetSetAbstraction,PointNetFeaturePropagation
class get_model(nn.Module):
def __init__(self, num_classes):
super(get_model, self).__init__()
self.sa1 = PointNetSetAbstraction(1024, 0.1, 32, 9 + 3, [32, 32,... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | log/sem_seg/pointnet2_sem_seg/pointnet2_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.620278 | import torch
import torch.nn as nn
import torch.nn.functional as F
from time import time
import numpy as np
def timeit(tag, t):
print("{}: {}s".format(tag, time() - t))
return time()
def pc_normalize(pc):
l = pc.shape[0]
centroid = np.mean(pc, axis=0)
pc = pc - centroid
m = np.max(np.sqrt(np.s... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | log/sem_seg/pointnet_sem_seg/pointnet_sem_seg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.655089 | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.utils.data
import torch.nn.functional as F
from pointnet_utils import PointNetEncoder, feature_transform_reguliarzer
class get_model(nn.Module):
def __init__(self, num_class):
super(get_model, self).__init__()
self.k = num_cl... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | models/pointnet2_cls_ssg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.656543 | import torch.nn as nn
import torch.nn.functional as F
from pointnet2_utils import PointNetSetAbstraction
class get_model(nn.Module):
def __init__(self,num_class,normal_channel=True):
super(get_model, self).__init__()
in_channel = 6 if normal_channel else 3
self.normal_channel = normal_chan... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | models/pointnet2_part_seg_msg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.658123 | import torch.nn as nn
import torch
import torch.nn.functional as F
from models.pointnet2_utils import PointNetSetAbstractionMsg,PointNetSetAbstraction,PointNetFeaturePropagation
class get_model(nn.Module):
def __init__(self, num_classes, normal_channel=False):
super(get_model, self).__init__()
if ... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | models/pointnet2_part_seg_ssg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.659214 | import torch.nn as nn
import torch
import torch.nn.functional as F
from models.pointnet2_utils import PointNetSetAbstraction,PointNetFeaturePropagation
class get_model(nn.Module):
def __init__(self, num_classes, normal_channel=False):
super(get_model, self).__init__()
if normal_channel:
... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | models/pointnet2_cls_msg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.665785 | import torch.nn as nn
import torch.nn.functional as F
from pointnet2_utils import PointNetSetAbstractionMsg, PointNetSetAbstraction
class get_model(nn.Module):
def __init__(self,num_class,normal_channel=True):
super(get_model, self).__init__()
in_channel = 3 if normal_channel else 0
self.n... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | log/sem_seg/pointnet_sem_seg/pointnet2_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.671322 | import torch
import torch.nn as nn
import torch.nn.functional as F
from time import time
import numpy as np
def timeit(tag, t):
print("{}: {}s".format(tag, time() - t))
return time()
def pc_normalize(pc):
l = pc.shape[0]
centroid = np.mean(pc, axis=0)
pc = pc - centroid
m = np.max(np.sqrt(np.s... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | models/pointnet2_sem_seg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:34.725061 | import torch.nn as nn
import torch.nn.functional as F
from models.pointnet2_utils import PointNetSetAbstraction,PointNetFeaturePropagation
class get_model(nn.Module):
def __init__(self, num_classes):
super(get_model, self).__init__()
self.sa1 = PointNetSetAbstraction(1024, 0.1, 32, 9 + 3, [32, 32,... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | models/pointnet2_sem_seg_msg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.139762 | import torch.nn as nn
import torch.nn.functional as F
from models.pointnet2_utils import PointNetSetAbstractionMsg,PointNetFeaturePropagation
class get_model(nn.Module):
def __init__(self, num_classes):
super(get_model, self).__init__()
self.sa1 = PointNetSetAbstractionMsg(1024, [0.05, 0.1], [16,... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | models/pointnet2_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.177624 | import torch
import torch.nn as nn
import torch.nn.functional as F
from time import time
import numpy as np
def timeit(tag, t):
print("{}: {}s".format(tag, time() - t))
return time()
def pc_normalize(pc):
l = pc.shape[0]
centroid = np.mean(pc, axis=0)
pc = pc - centroid
m = np.max(np.sqrt(np.s... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | models/pointnet_sem_seg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.240553 | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.utils.data
import torch.nn.functional as F
from pointnet_utils import PointNetEncoder, feature_transform_reguliarzer
class get_model(nn.Module):
def __init__(self, num_class):
super(get_model, self).__init__()
self.k = num_cl... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | models/pointnet_cls.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.253248 | import torch.nn as nn
import torch.utils.data
import torch.nn.functional as F
from pointnet_utils import PointNetEncoder, feature_transform_reguliarzer
class get_model(nn.Module):
def __init__(self, k=40, normal_channel=True):
super(get_model, self).__init__()
if normal_channel:
channel... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | models/pointnet_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.268592 | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.utils.data
from torch.autograd import Variable
import numpy as np
import torch.nn.functional as F
class STN3d(nn.Module):
def __init__(self, channel):
super(STN3d, self).__init__()
self.conv1 = torch.nn.Conv1d(channel, 64, 1)... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | models/pointnet_part_seg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.269777 | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.utils.data
import torch.nn.functional as F
from pointnet_utils import STN3d, STNkd, feature_transform_reguliarzer
class get_model(nn.Module):
def __init__(self, part_num=50, normal_channel=True):
super(get_model, self).__init__()
... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | provider.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.285742 | import numpy as np
def normalize_data(batch_data):
""" Normalize the batch data, use coordinates of the block centered at origin,
Input:
BxNxC array
Output:
BxNxC array
"""
B, N, C = batch_data.shape
normal_data = np.zeros((B, N, C))
for b in range(B):
... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | test_classification.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.286685 | """
Author: Benny
Date: Nov 2019
"""
from data_utils.ModelNetDataLoader import ModelNetDataLoader
import argparse
import numpy as np
import os
import torch
import logging
from tqdm import tqdm
import sys
import importlib
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = BASE_DIR
sys.path.append(os.path.... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | test_semseg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.305135 | """
Author: Benny
Date: Nov 2019
"""
import argparse
import os
from data_utils.S3DISDataLoader import ScannetDatasetWholeScene
from data_utils.indoor3d_util import g_label2color
import torch
import logging
from pathlib import Path
import sys
import importlib
from tqdm import tqdm
import provider
import numpy as np
BAS... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | test_partseg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.308782 | """
Author: Benny
Date: Nov 2019
"""
import argparse
import os
from data_utils.ShapeNetDataLoader import PartNormalDataset
import torch
import logging
import sys
import importlib
from tqdm import tqdm
import numpy as np
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = BASE_DIR
sys.path.append(os.path.j... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | train_classification.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.710746 | """
Author: Benny
Date: Nov 2019
"""
import os
import sys
import torch
import numpy as np
import datetime
import logging
import provider
import importlib
import shutil
import argparse
from pathlib import Path
from tqdm import tqdm
from data_utils.ModelNetDataLoader import ModelNetDataLoader
BASE_DIR = os.path.dirna... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | train_partseg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.808312 | """
Author: Benny
Date: Nov 2019
"""
import argparse
import os
import torch
import datetime
import logging
import sys
import importlib
import shutil
import provider
import numpy as np
from pathlib import Path
from tqdm import tqdm
from data_utils.ShapeNetDataLoader import PartNormalDataset
BASE_DIR = os.path.dirname(... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | train_semseg.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.850210 | """
Author: Benny
Date: Nov 2019
"""
import argparse
import os
from data_utils.S3DISDataLoader import S3DISDataset
import torch
import datetime
import logging
from pathlib import Path
import sys
import importlib
import shutil
from tqdm import tqdm
import provider
import numpy as np
import time
BASE_DIR = os.path.dirna... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | visualizer/eulerangles.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.860136 | # emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the NiBabel package for the
# copyright and license terms.
#
### ### ### #... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | visualizer/show3d_balls.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.885342 | """ Original Author: Haoqiang Fan """
import numpy as np
import ctypes as ct
import cv2
import sys
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
showsz = 800
mousex, mousey = 0.5, 0.5
zoom = 1.0
changed = True
def onmouse(*args):
global mousex, mousey, changed
y = args[1]
x = args[2]
... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | visualizer/plyfile.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.886020 | # Copyright 2014 Darsh Ranjan
#
# This file is part of python-plyfile.
#
# python-plyfile is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any ... |
yanx27/Pointnet_Pointnet2_pytorch | https://github.com/yanx27/Pointnet_Pointnet2_pytorch | null | null | null | null | 4,840 | null | null | mit | null | null | null | null | null | null | null | visualizer/pc_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:35.915056 | """ Utility functions for processing point clouds.
Author: Charles R. Qi, Hao Su
Date: November 2016
"""
import os
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(BASE_DIR)
# Draw point cloud
from visualizer.eulerangles import euler2mat
# Point cloud IO
import numpy as np
from visua... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/collect/make_lite/make_lite.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.291843 | from criteria import (
contains_git_commit_hash,
contains_hyperlinks,
contains_image,
contains_issue_reference,
contains_non_modified_files,
contains_pytest_match_arg,
leq_n_files,
leq_n_hunks,
leq_n_words,
)
from datasets import load_dataset, disable_caching, DatasetDict
disable_ca... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/collect/cleanup/delete_gh_workflows.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.313163 | #!/usr/bin/env python3
import argparse
import os
import subprocess
def main(repo_url):
"""
Remove .github/workflows folder from all branches of a repo
Args:
repo_url (str): URL of the target repo
"""
# Get list of remote branches
branches_command = subprocess.run(
["git", "ls... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/collect/cleanup/remove_envs.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.324289 | #!/usr/bin/env python
import argparse
import os
import subprocess
from multiprocessing import Pool
def get_conda_env_names(output: str) -> list:
"""
Parse conda environments (`conda env list`) created for a particular conda installation
Args:
output (str): Output of `conda env list` command
... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/collect/get_tasks_pipeline.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.336025 | #!/usr/bin/env python3
"""Script to collect pull requests and convert them to candidate task instances"""
import argparse
import os
import traceback
from dotenv import load_dotenv
from multiprocessing import Pool
from swebench.collect.build_dataset import main as build_dataset
from swebench.collect.print_pulls impor... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/collect/build_dataset_ft.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.337196 | #!/usr/bin/env python3
import argparse
import glob
import json
import os
import random
from tqdm import tqdm
from datetime import datetime
def main(instances_path: str, output_path: str, eval_path: str, seed: int):
"""
Combine all non-eval task instances into a single fine tuning dataset
Args:
... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/collect/make_lite/criteria.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.338715 | import re
import requests
from swebench.collect.utils import PR_KEYWORDS
from unidiff import PatchSet
def contains_git_commit_hash(text: str) -> bool:
"""
Returns True if the text contains a git commit hash (40 character SHA-1 hash).
* Excludes commit hashes that are part of a URL.
"""
pattern_gi... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/collect/get_top_pypi.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.339582 | #!/usr/bin/env python3
import os
import json
import argparse
from bs4 import BeautifulSoup
from ghapi.core import GhApi
from selenium import webdriver
from selenium.webdriver.common.by import By
gh_token = os.environ.get("GITHUB_TOKEN")
if not gh_token:
msg = "Please set the GITHUB_TOKEN environment variable."
... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.370809 | __version__ = "4.1.0"
from swebench.collect.build_dataset import main as build_dataset
from swebench.collect.get_tasks_pipeline import main as get_tasks_pipeline
from swebench.collect.print_pulls import main as print_pulls
from swebench.harness.constants import (
KEY_INSTANCE_ID,
KEY_MODEL,
KEY_PREDICTION... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/collect/build_dataset.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.401454 | #!/usr/bin/env python3
import argparse
import json
import logging
import os
from typing import Optional
from swebench.collect.utils import (
extract_patches,
extract_problem_statement_and_hints,
Repo,
)
logging.basicConfig(
level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(messag... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/collect/make_repo/call_make_repo.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.892189 | #!/usr/bin/env python3
import subprocess
repos = ["Repos here"]
for repo in repos:
print(f"Making mirror repo for {repo}")
out_make = subprocess.run(
f"./make_repo.sh {repo}",
shell=True,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
if out_make.returncode !=... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/collect/print_pulls.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.917450 | #!/usr/bin/env python3
"""Given the `<owner/name>` of a GitHub repo, this script writes the raw information for all the repo's PRs to a single `.jsonl` file."""
from __future__ import annotations
import argparse
import json
import logging
import os
from datetime import datetime
from fastcore.xtras import obj2dict
f... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.948239 | from swebench.harness import (
docker_build,
docker_utils,
grading,
prepare_images,
remove_containers,
reporting,
run_evaluation,
utils,
constants,
dockerfiles,
log_parsers,
modal_eval,
test_spec,
)
__all__ = [
"docker_build",
"docker_utils",
"grading",
... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/constants/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.951225 | from enum import Enum
from pathlib import Path
from typing import TypedDict
from swebench.harness.constants.c import *
from swebench.harness.constants.go import *
from swebench.harness.constants.java import *
from swebench.harness.constants.javascript import *
from swebench.harness.constants.php import *
from swebench... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/constants/c.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.957317 | # Constants - Task Instance Installation Environment
SPECS_REDIS = {
"13115": {
"build": ["make distclean", "make"],
"test_cmd": ["TERM=dumb ./runtest --durable --single unit/scripting"],
},
"12472": {
"build": ["make distclean", "make"],
"test_cmd": [
'TERM=dumb ... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/collect/utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.962697 | from __future__ import annotations
import logging
import re
import requests
import time
from bs4 import BeautifulSoup
from ghapi.core import GhApi
from fastcore.net import HTTP404NotFoundError, HTTP403ForbiddenError
from typing import Callable, Iterator, Optional
from unidiff import PatchSet
logging.basicConfig(
... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/constants/go.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.985990 | # Constants - Task Instance Installation Environment
SPECS_CADDY = {
"6411": {
"docker_specs": {"go_version": "1.23.8"},
"install": ["go mod tidy"],
"test_cmd": ['go test -v . -run "TestReplacerNew*"'],
},
"6345": {
"docker_specs": {"go_version": "1.23.8"},
# compile ... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/constants/javascript.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:38.993930 | # Constants - Commonly Used Commands
TEST_XVFB_PREFIX = 'xvfb-run --server-args="-screen 0 1280x1024x24 -ac :99"'
XVFB_DEPS = [
"python3",
"python3-pip",
"xvfb",
"x11-xkb-utils",
"xfonts-100dpi",
"xfonts-75dpi",
"xfonts-scalable",
"xfonts-cyrillic",
"x11-apps",
"firefox",
]
X11_D... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/constants/java.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:39.006758 | from typing import List
import shlex
def make_lombok_pre_install_script(tests: List[str]) -> List[str]:
"""
There's no way to run individual tests out of the box, so this script
modifies the xml file that defines test scripts to run individual tests with
`ant test.instance`.
"""
tests_xml = "\... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/constants/php.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:39.023492 | # Constants - Task Instance Installation Environment
SPECS_PHPSPREADSHEET = {
"4313": {
"docker_specs": {"php_version": "8.3.16"},
"install": ["composer update", "composer install"],
"test_cmd": [
"./vendor/bin/phpunit --testdox --colors=never tests/PhpSpreadsheetTests/Reader/Ods... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/constants/python.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:39.486000 | # Constants - Testing Commands
TEST_PYTEST = "pytest --no-header -rA --tb=no -p no:cacheprovider"
TEST_PYTEST_VERBOSE = "pytest -rA --tb=long -p no:cacheprovider"
TEST_ASTROPY_PYTEST = "pytest -rA -vv -o console_output_style=classic --tb=no"
TEST_DJANGO = "./tests/runtests.py --verbosity 2 --settings=test_sqlite --para... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/constants/ruby.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:39.531818 | # Constants - Task Instance Installation Environment
FASTLANE_RSPEC_JQ_TRANSFORM = (
r"""tail -n +2 | jq -r '.examples[] | "\(.description) - \(.id) - \(.status)"'"""
)
FPM_RSPEC_JQ_TRANSFORM = (
r"""sed -n '/^{/,$p' | jq -r '.examples[] | "\(.description) - \(.status)"'"""
)
# Each test case runs multiple time... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/docker_build.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:39.533073 | from __future__ import annotations
import docker
import docker.errors
import logging
import sys
import traceback
from pathlib import Path
from swebench.harness.constants import (
BASE_IMAGE_BUILD_DIR,
DOCKER_USER,
ENV_IMAGE_BUILD_DIR,
INSTANCE_IMAGE_BUILD_DIR,
UTF8,
)
from swebench.harness.docker... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/constants/rust.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:39.550481 | from pathlib import Path
def _write_cargo_lock_script(filename: str) -> list[str]:
"""Generate pre_install commands to write Cargo.lock from fixtures."""
fixtures_dir = Path(__file__).parent / "fixtures"
cargo_lock_content = (fixtures_dir / filename).read_text()
return [
f"cat > Cargo.lock <<'... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/docker_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:39.553295 | from __future__ import annotations
import docker
import docker.errors
import os
import signal
import tarfile
import threading
import time
import traceback
from pathlib import Path
from docker.models.containers import Container
HEREDOC_DELIMITER = "EOF_1399519320" # different from dataset HEREDOC_DELIMITERs!
def c... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/dockerfiles/c.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:39.580124 | _DOCKERFILE_BASE_C = r"""
FROM --platform={platform} ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
# Uncomment deb-src lines. Only works on Ubuntu 22.04 and below
RUN sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list
# Includes dependencies for all C/C++ projects
RUN apt update && apt install -y ... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/dockerfiles/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:39.617245 | from swebench.harness.dockerfiles.c import (
_DOCKERFILE_BASE_C,
_DOCKERFILE_INSTANCE_C,
)
from swebench.harness.dockerfiles.go import (
_DOCKERFILE_BASE_GO,
_DOCKERFILE_INSTANCE_GO,
)
from swebench.harness.dockerfiles.java import (
_DOCKERFILE_BASE_JAVA,
_DOCKERFILE_INSTANCE_JAVA,
)
from sweben... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/dockerfiles/javascript.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:39.622791 | _DOCKERFILE_BASE_JS = r"""
FROM --platform={platform} ubuntu:{ubuntu_version}
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Install necessary packages
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
libssl-dev \
software-pro... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/dockerfiles/go.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:39.644841 | # We use a modern version of ubuntu as the base image because old golang images
# can cause problems with agent installations. For eg. old GLIBC versions.
_DOCKERFILE_BASE_GO = r"""
FROM --platform={platform} ubuntu:{ubuntu_version}
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
RUN apt update && apt install -y \
... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/dockerfiles/java.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:39.645405 | _DOCKERFILE_BASE_JAVA = r"""
FROM --platform={platform} maven:3.9-eclipse-temurin-{java_version}
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
RUN apt update && apt install -y \
wget \
git \
build-essential \
ant \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL -o mvnd.zip https://downloads.apache.org/mav... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/dockerfiles/php.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.099270 | _DOCKERFILE_BASE_PHP = r"""
FROM --platform={platform} php:{php_version}
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
RUN apt update && apt install -y \
wget \
git \
build-essential \
libgd-dev \
libzip-dev \
libgmp-dev \
libftp-dev \
libcurl4-openssl-dev \
&& apt-get -y autoc... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/grading.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.156708 | from typing import Any
from swebench.harness.constants import (
APPLY_PATCH_FAIL,
END_TEST_OUTPUT,
FAIL_ONLY_REPOS,
FAIL_TO_FAIL,
FAIL_TO_PASS,
KEY_INSTANCE_ID,
KEY_PREDICTION,
MAP_REPO_VERSION_TO_SPECS,
PASS_TO_FAIL,
PASS_TO_PASS,
RESET_FAILED,
START_TEST_OUTPUT,
TE... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/dockerfiles/python.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.158247 | _DOCKERFILE_BASE_PY = r"""
FROM --platform={platform} ubuntu:{ubuntu_version}
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
RUN apt update && apt install -y \
wget \
git \
build-essential \
libffi-dev \
libtiff-dev \
python3 \
python3-pip \
python-is-python3 \
jq \
curl \
locales \
locales-all \
tzdata \
&& rm -r... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/log_parsers/c.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.197378 | import re
import xml.etree.ElementTree as ET
from swebench.harness.constants import TestStatus
from swebench.harness.test_spec.test_spec import TestSpec
def parse_log_redis(log: str, test_spec: TestSpec) -> dict[str, str]:
"""
Args:
log (str): log content
Returns:
dict: test case to test ... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/dockerfiles/ruby.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.198240 | _DOCKERFILE_BASE_RUBY = r"""
FROM --platform={platform} ruby:{ruby_version}
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
RUN apt update && apt install -y \
wget \
git \
build-essential \
jq \
&& rm -rf /var/lib/apt/lists/*
RUN adduser --disabled-password --gecos 'dog' nonroot
"""
_DOCKERFILE_INSTANCE_RUBY = r"... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/log_parsers/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.209225 | from swebench.harness.log_parsers.c import MAP_REPO_TO_PARSER_C
from swebench.harness.log_parsers.go import MAP_REPO_TO_PARSER_GO
from swebench.harness.log_parsers.java import MAP_REPO_TO_PARSER_JAVA
from swebench.harness.log_parsers.javascript import MAP_REPO_TO_PARSER_JS
from swebench.harness.log_parsers.php import M... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/dockerfiles/rust.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.211099 | # If you change the base image, you need to rebuild all images (run with --force_rebuild)
_DOCKERFILE_BASE_RUST = r"""
FROM --platform={platform} rust:{rust_version}
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
RUN apt update && apt install -y \
wget \
git \
build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN ... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/log_parsers/go.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.212360 | import re
from swebench.harness.constants import TestStatus
from swebench.harness.test_spec.test_spec import TestSpec
def parse_log_gotest(log: str, test_spec: TestSpec) -> dict[str, str]:
"""
Parser for test logs generated with 'go test'
Args:
log (str): log content
test_spec (TestSpec):... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/log_parsers/java.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.271089 | import re
from swebench.harness.constants import TestStatus
from swebench.harness.test_spec.test_spec import TestSpec
def parse_log_maven(log: str, test_spec: TestSpec) -> dict[str, str]:
"""
Parser for test logs generated with 'mvn test'.
Annoyingly maven will not print the tests that have succeeded. For... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/log_parsers/php.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.685918 | import re
from swebench.harness.constants import TestStatus
from swebench.harness.test_spec.test_spec import TestSpec
def parse_log_phpunit(log: str, test_spec: TestSpec) -> dict[str, str]:
"""
Parser for phpunit logs with the --testdox option.
Args:
log (str): log content
test_spec (TestS... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/log_parsers/python.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.823282 | import re
from swebench.harness.constants import TestStatus
from swebench.harness.test_spec.test_spec import TestSpec
def parse_log_pytest(log: str, test_spec: TestSpec) -> dict[str, str]:
"""
Parser for test logs generated with PyTest framework
Args:
log (str): log content
Returns:
... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/log_parsers/ruby.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.831425 | import re
from swebench.harness.constants import TestStatus
from swebench.harness.test_spec.test_spec import TestSpec
def parse_log_minitest(log: str, test_spec: TestSpec) -> dict[str, str]:
"""
Args:
log (str): log content
Returns:
dict: test case to test status mapping
"""
test_... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/modal_eval/run_evaluation_modal_entrypoint.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.842135 | # Sandbox entrypoint script for running evals on Modal.
#
# In a perfect world, we would execute commands using the Sandbox directly, but Modal imposes
# a container stdio rate limit of 64 KiB/s. Some test harnesses exceed this limit which leads
# to "dropped container output" logs that interfere with parsing the test ... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/log_parsers/rust.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.843061 | import re
from swebench.harness.constants import TestStatus
from swebench.harness.test_spec.test_spec import TestSpec
def parse_log_cargo(log: str, test_spec: TestSpec) -> dict[str, str]:
"""
Args:
log (str): log content
Returns:
dict: test case to test status mapping
"""
test_sta... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/modal_eval/run_evaluation_modal.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.843722 | # This file contains logic for running evaluations on Modal: <https://modal.com/>.
from __future__ import annotations
import asyncio
import json
import modal
import modal.container_process
import modal.io_streams
import tenacity
import time
import traceback
from dataclasses import dataclass
from pathlib import Path
... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/modal_eval/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.869038 | from swebench.harness.modal_eval.run_evaluation_modal import run_instances_modal
from swebench.harness.modal_eval.utils import validate_modal_credentials
__all__ = [
"run_instances_modal",
"validate_modal_credentials",
]
|
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/remove_containers.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.869688 | import docker
import json
from argparse import ArgumentParser
"""
Script for removing containers associated with specified instance IDs.
"""
def main(instance_ids, predictions_path):
all_ids = set()
if predictions_path:
with open(predictions_path, "r") as f:
predictions = json.loads(f.re... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/prepare_images.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.881655 | import docker
import resource
from argparse import ArgumentParser
from swebench.harness.constants import KEY_INSTANCE_ID
from swebench.harness.docker_build import build_instance_images
from swebench.harness.docker_utils import list_images
from swebench.harness.test_spec.test_spec import make_test_spec
from swebench.h... |
SWE-bench/SWE-bench | https://github.com/SWE-bench/SWE-bench | null | null | null | null | 4,833 | null | null | mit | null | null | null | null | null | null | null | swebench/harness/modal_eval/utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:40.905960 | from pathlib import Path
def validate_modal_credentials():
"""
Validate that Modal credentials exist by checking for ~/.modal.toml file.
Raises an exception if credentials are not configured.
"""
modal_config_path = Path.home() / ".modal.toml"
if not modal_config_path.exists():
raise R... |
pywebio/PyWebIO | https://github.com/pywebio/PyWebIO | null | null | null | null | 4,822 | null | null | mit | null | null | null | null | null | null | null | demos/index.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:44.243847 | from config import charts_demo_host
from pywebio.output import put_markdown, put_row, put_html
from pywebio.session import info as session_info
index_md = r"""### Basic demo
The source code of the demos can be found [here](https://github.com/pywebio/PyWebIO/tree/dev/demos).
- [BMI calculation](./bmi): Calculating B... |
pywebio/PyWebIO | https://github.com/pywebio/PyWebIO | null | null | null | null | 4,822 | null | null | mit | null | null | null | null | null | null | null | demos/doc_demo.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:44.244413 | """
Run the example code in the documentation online
"""
import base64
from functools import partial
from os import path, listdir
from pywebio import start_server
from pywebio.platform import config
from pywebio.session import local as session_local, info as session_info
import pywebio_battery
#######################... |
pywebio/PyWebIO | https://github.com/pywebio/PyWebIO | null | null | null | null | 4,822 | null | null | mit | null | null | null | null | null | null | null | demos/gomoku_game.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:44.247108 | import time
from pywebio import session, start_server
from pywebio.output import *
goboard_size = 15
# -1 -> none, 0 -> black, 1 -> white
goboard = [
[-1] * goboard_size
for _ in range(goboard_size)
]
def winner(): # return winner piece, return None if no winner
for x in range(2, goboard_size - 2):
... |
pywebio/PyWebIO | https://github.com/pywebio/PyWebIO | null | null | null | null | 4,822 | null | null | mit | null | null | null | null | null | null | null | demos/bmi.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:44.248111 | from pywebio import start_server
from pywebio.input import *
from pywebio.output import *
from pywebio.session import info as session_info
def t(eng, chinese):
"""return English or Chinese text according to the user's browser language"""
return chinese if 'zh' in session_info.user_language else eng
def main... |
pywebio/PyWebIO | https://github.com/pywebio/PyWebIO | null | null | null | null | 4,822 | null | null | mit | null | null | null | null | null | null | null | demos/chat_room.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:44.252908 | import asyncio
from pywebio import start_server
from pywebio.input import *
from pywebio.output import *
from pywebio.session import defer_call, info as session_info, run_async
MAX_MESSAGES_CNT = 10 ** 4
chat_msgs = [] # The chat message history. The item is (name, message content)
online_users = set()
def t(eng,... |
pywebio/PyWebIO | https://github.com/pywebio/PyWebIO | null | null | null | null | 4,822 | null | null | mit | null | null | null | null | null | null | null | demos/__main__.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:44.254971 | import argparse
from os import path
from pywebio.platform import path_deploy
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-p", "--port", default=8080, help="run on the given port", type=int)
args = parser.parse_args()
here_dir = path.dirname(path.abspath(__file__... |
pywebio/PyWebIO | https://github.com/pywebio/PyWebIO | null | null | null | null | 4,822 | null | null | mit | null | null | null | null | null | null | null | demos/chatgpt.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:44.260561 | import json
import time
from typing import Dict, List
from openai import OpenAI, Stream
from openai.types.chat import ChatCompletionChunk
import pywebio_battery
from pywebio.input import *
from pywebio.output import *
from pywebio.pin import *
from pywebio.session import set_env, download
class ChatGPTStreamRespons... |
pywebio/PyWebIO | https://github.com/pywebio/PyWebIO | null | null | null | null | 4,822 | null | null | mit | null | null | null | null | null | null | null | demos/bokeh_app.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:44.261573 | from bokeh.io import output_notebook
from bokeh.io import show
from bokeh.layouts import column
from bokeh.models import ColumnDataSource, Slider
from bokeh.plotting import figure
from bokeh.sampledata.sea_surface_temperature import sea_surface_temperature
from pywebio import start_server
from pywebio.output import *
... |
pywebio/PyWebIO | https://github.com/pywebio/PyWebIO | null | null | null | null | 4,822 | null | null | mit | null | null | null | null | null | null | null | demos/config.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:44.289992 | # The deployment address of the demos module
demo_host = 'http://pywebio-demos.pywebio.online'
# The deployment address of https://github.com/wang0618/pywebio-chart-gallery repo
charts_demo_host = 'http://pywebio-charts.pywebio.online'
|
pywebio/PyWebIO | https://github.com/pywebio/PyWebIO | null | null | null | null | 4,822 | null | null | mit | null | null | null | null | null | null | null | demos/input_usage.py | null | null | null | null | null | null | Python | 2026-05-04T01:52:44.862921 | import json
from pywebio import start_server
from pywebio.input import *
from pywebio.output import *
from pywebio.session import set_env, info as session_info
def t(eng, chinese):
"""return English or Chinese text according to the user's browser language"""
return chinese if 'zh' in session_info.user_langua... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.