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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/nas/accuracy_predictor/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.228205 | # Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han
# International Conference on Learning Representations (ICLR), 2020.
from .acc_dataset import *
from .acc_predictor import *
from .arch_encoder import *
|
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/nas/search_algorithm/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.341136 | # Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han
# International Conference on Learning Representations (ICLR), 2020.
from .evolution import *
|
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/nas/efficiency_predictor/latency_lookup_table.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.351842 | # Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han
# International Conference on Learning Representations (ICLR), 2020.
import yaml
from ofa.utils import download_url, make_divisible, MyNetwork
__all__ = [
"count_conv_flop",
... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/nas/accuracy_predictor/arch_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.354422 | # Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han
# International Conference on Learning Representations (ICLR), 2020.
import random
import numpy as np
from ofa.imagenet_classification.networks import ResNets
__all__ = ["MobileNet... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/nas/accuracy_predictor/acc_predictor.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.357782 | # Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han
# International Conference on Learning Representations (ICLR), 2020.
import os
import numpy as np
import torch
import torch.nn as nn
__all__ = ["AccuracyPredictor"]
class Accuracy... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/nas/efficiency_predictor/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.358951 | # Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han
# International Conference on Learning Representations (ICLR), 2020.
import os
import copy
from .latency_lookup_table import *
class BaseEfficiencyModel:
def __init__(self, ofa... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/nas/accuracy_predictor/acc_dataset.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.402480 | # Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han
# International Conference on Learning Representations (ICLR), 2020.
import os
import json
import numpy as np
from tqdm import tqdm
import torch
import torch.utils.data
from ofa.uti... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/nas/search_algorithm/evolution.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.451757 | # Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han
# International Conference on Learning Representations (ICLR), 2020.
import copy
import random
import numpy as np
from tqdm import tqdm
__all__ = ["EvolutionFinder"]
class Evoluti... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/tutorial/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.694954 | from .accuracy_predictor import AccuracyPredictor
from .flops_table import FLOPsTable
from .latency_table import LatencyTable
from .evolution_finder import EvolutionFinder
from .imagenet_eval_helper import evaluate_ofa_subnet, evaluate_ofa_specialized
|
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/tutorial/accuracy_predictor.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.760110 | import torch.nn as nn
import torch
import copy
from ofa.utils import download_url
# Helper for constructing the one-hot vectors.
def construct_maps(keys):
d = dict()
keys = list(set(keys))
for k in keys:
if k not in d:
d[k] = len(list(d.keys()))
return d
ks_map = construct_maps... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/tutorial/evolution_finder.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.782621 | import copy
import random
from tqdm import tqdm
import numpy as np
__all__ = ["EvolutionFinder"]
class ArchManager:
def __init__(self):
self.num_blocks = 20
self.num_stages = 5
self.kernel_sizes = [3, 5, 7]
self.expand_ratios = [3, 4, 6]
self.depths = [2, 3, 4]
sel... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/tutorial/latency_table.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.953749 | import yaml
from ofa.utils import download_url
class LatencyEstimator(object):
def __init__(
self,
local_dir="~/.hancai/latency_tools/",
url="https://raw.githubusercontent.com/han-cai/files/master/proxylessnas/mobile_trim.yaml",
):
if url.startswith("http"):
fname =... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/utils/common_tools.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.957809 | # Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han
# International Conference on Learning Representations (ICLR), 2020.
import numpy as np
import os
import sys
import torch
try:
from urllib import urlretrieve
except ImportError:... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/utils/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.965797 | # Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han
# International Conference on Learning Representations (ICLR), 2020.
from .pytorch_modules import *
from .pytorch_utils import *
from .my_modules import *
from .flops_counter import ... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/tutorial/imagenet_eval_helper.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.971233 | import os.path as osp
import numpy as np
import math
from tqdm import tqdm
import torch.nn as nn
import torch.backends.cudnn as cudnn
import torch.utils.data
from torchvision import transforms, datasets
from ofa.utils import AverageMeter, accuracy
from ofa.model_zoo import ofa_specialized
from ofa.imagenet_classifica... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/utils/flops_counter.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.978761 | # Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han
# International Conference on Learning Representations (ICLR), 2020.
import torch
import torch.nn as nn
from .my_modules import MyConv2d
__all__ = ["profile"]
def count_convNd(m,... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/tutorial/flops_table.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:10.979345 | import time
import copy
import torch
import torch.nn as nn
import numpy as np
from ofa.utils.layers import *
__all__ = ["FLOPsTable"]
def rm_bn_from_net(net):
for m in net.modules():
if isinstance(m, nn.BatchNorm2d) or isinstance(m, nn.BatchNorm1d):
m.forward = lambda x: x
class FLOPsTable:... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/utils/layers.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:11.020041 | # Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han
# International Conference on Learning Representations (ICLR), 2020.
import torch
import torch.nn as nn
from collections import OrderedDict
from ofa.utils import get_same_padding, m... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/utils/my_dataloader/my_data_worker.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:11.595739 | r""""Contains definitions of the methods used by the _BaseDataLoaderIter workers.
These **needs** to be in global scope since Py2 doesn't support serializing
static methods.
"""
import torch
import random
import os
from collections import namedtuple
# from torch._six import queue
from torch.multiprocessing import Que... |
mit-han-lab/once-for-all | https://github.com/mit-han-lab/once-for-all | null | null | null | null | 1,947 | null | null | mit | null | null | null | null | null | null | null | ofa/utils/my_dataloader/my_data_loader.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:11.596457 | r"""Definition of the DataLoader and associated iterators that subclass _BaseDataLoaderIter
To support these two classes, in `./_utils` we define many utility methods and
functions to be run in multiprocessing. E.g., the data loading worker loop is
in `./_utils/worker.py`.
"""
import threading
import itertools
import... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_branch.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:13.674800 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl branch - List, create, edit or delete branches."""
from gitless import core
from . import helpers, pprint
def parser(subparsers, _):
"""Adds the branch parser to the given subparsers object."""
desc = '... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_checkout.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:13.694368 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl checkout - Checkout committed versions of files."""
from gitless import core
from . import helpers, pprint
def parser(subparsers, repo):
"""Adds the checkout parser to the given subparsers object."""
de... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/file_cmd.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:13.699192 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""Helper module for gl_{track, untrack, resolve}."""
from . import helpers, pprint
VOWELS = ('a', 'e', 'i', 'o', 'u')
def parser(help_msg, subcmd, subcmd_aliases=[]):
def f(subparsers, repo):
p = subparse... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:13.704546 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl - Main Gitless's command. Dispatcher to the other cmds."""
import sys
import argparse
import argcomplete
import traceback
import pygit2
from subprocess import CalledProcessError
from gitless import core
fro... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_fuse.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:13.717663 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl fuse - Fuse the divergent changes of a branch onto the current branch."""
from gitless import core
from . import helpers, pprint
def parser(subparsers, repo):
desc = 'fuse the divergent changes of a branc... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_diff.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:13.719224 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl diff - Show changes in files."""
import os
import tempfile
from . import helpers, pprint
def parser(subparsers, repo):
"""Adds the diff parser to the given subparsers object."""
desc = 'show changes to ... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/commit_dialog.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:13.726664 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""Gitless's commit dialog."""
import io
from locale import getpreferredencoding
import os
import subprocess
import sys
import shlex
from . import pprint
ENCODING = getpreferredencoding() or 'utf-8'
_COMMIT_FIL... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_commit.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:13.749132 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl commit - Record changes in the local repository."""
from gitless import core
from . import commit_dialog
from . import helpers, pprint
def parser(subparsers, repo):
"""Adds the commit parser to the given ... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_init.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:16.063494 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl init - Create an empty repo or make a clone."""
import os
from gitless import core
from . import pprint
def parser(subparsers, _):
"""Adds the init parser to the given subparsers object."""
desc = (
... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_status.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:16.064757 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl status - Show the status of files in the repo."""
import os
from gitless import core
from . import helpers, pprint
def parser(subparsers, repo):
"""Adds the status parser to the given subparsers object."... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_publish.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:16.066872 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl publish - Publish commits upstream."""
from . import helpers, pprint
def parser(subparsers, _):
"""Adds the publish parser to the given subparsers object."""
desc = 'publish commits upstream'
publish_p... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_resolve.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:16.067953 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl resolve - Mark a file with conflicts as resolved."""
from . import file_cmd
parser = file_cmd.parser('mark files with conflicts as resolved', 'resolve', ['rs'])
|
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_merge.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:16.069146 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl merge - Merge the divergent changes of one branch onto another."""
from gitless import core
from . import helpers, pprint
def parser(subparsers, repo):
desc = 'merge the divergent changes of one branch on... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_remote.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:16.070271 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl remote - List, create, edit or delete remotes."""
from . import pprint
def parser(subparsers, _):
"""Adds the remote parser to the given subparsers object."""
desc = 'list, create, edit or delete remotes... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_history.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:16.253735 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl history - Show commit history."""
import os
import tempfile
from . import helpers, pprint
def parser(subparsers, _):
"""Adds the history parser to the given subparsers object."""
desc = 'show commit his... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/helpers.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:16.710755 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""Some helpers for commands."""
import argparse
import os
import subprocess
import sys
import shlex
import shutil
from gitless import core
from . import pprint
def get_branch(branch_name, repo):
return _get_r... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_untrack.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:16.726181 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl untrack - Stop tracking changes to files."""
from . import file_cmd
parser = file_cmd.parser('stop tracking changes to files', 'untrack', ['un'])
|
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/core.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:16.727496 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""Gitless's library."""
import collections
import errno
import io
import itertools
import json
from locale import getpreferredencoding
import os
import re
import shutil
import sys
import pygit2
from subprocess i... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/pprint.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:16.763617 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""Module for pretty printing Gitless output."""
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from datetime import datetime, tzinfo, timedelta
from locale import getpreferreden... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/tests/test_core.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:16.780510 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""Core unit tests."""
from functools import wraps
import os
import shutil
import tempfile
import unittest
import argparse
import sys
from subprocess import CalledProcessError
from gitless import core
from gitless.... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/tests/test_e2e.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:16.838456 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""End-to-end test."""
import logging
import os
import re
import time
from subprocess import CalledProcessError
import sys
from gitless.tests import utils
try:
text = unicode
except NameError:
text = str
cla... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gl.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:18.904644 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
# This file is for PyInstaller
import sys
from gitless.cli import gl
if __name__ == '__main__':
sys.exit(gl.main())
|
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/tests/utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:18.905291 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""Utility library for tests."""
import io
from locale import getpreferredencoding
import logging
import os
import re
import shutil
import stat
import sys
import tempfile
import unittest
from subprocess import run,... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | setup.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:18.973719 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import ast
import re
import sys
from setuptools import setup
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('gitless/cli/gl.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))
# Build helper
... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_tag.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:19.323192 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl tag - List, create, edit or delete tags."""
from gitless import core
from . import helpers, pprint
def parser(subparsers, _):
"""Adds the tag parser to the given subparsers object."""
desc = 'list, crea... |
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_track.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:19.363176 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl track - Start tracking changes to files."""
from . import file_cmd
parser = file_cmd.parser('start tracking changes to files', 'track', ['tr'])
|
gitless-vcs/gitless | https://github.com/gitless-vcs/gitless | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | gitless/cli/gl_switch.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:19.494691 | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl switch - Switch branches."""
from . import pprint
def parser(subparsers, _):
"""Adds the switch parser to the given subparsers object."""
desc = 'switch branches'
switch_parser = subparsers.add_parser(... |
GuDaStudio/codexmcp | https://github.com/GuDaStudio/codexmcp | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | src/codexmcp/cli.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:21.578547 | """Console entry point for the Codex MCP server."""
from codexmcp.server import run
def main() -> None:
"""Start the Codex MCP server."""
run()
if __name__ == "__main__":
main()
|
GuDaStudio/codexmcp | https://github.com/GuDaStudio/codexmcp | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | src/codexmcp/server.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:21.671425 | """FastMCP server implementation for the Codex MCP project."""
from __future__ import annotations
import json
import os
import queue
import subprocess
import threading
import time
import uuid
from pathlib import Path
from typing import Annotated, Any, Dict, Generator, List, Literal, Optional
from mcp.server.fastmcp ... |
robertmartin8/MachineLearningStocks | https://github.com/robertmartin8/MachineLearningStocks | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | download_historical_prices.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:24.069318 | import os
from pandas_datareader import data as pdr
import pandas as pd
import fix_yahoo_finance as yf
yf.pdr_override()
START_DATE = "2003-08-01"
END_DATE = "2015-01-01"
def build_stock_dataset(start=START_DATE, end=END_DATE):
"""
Creates the dataset containing all stock prices
:returns: stock_prices.c... |
robertmartin8/MachineLearningStocks | https://github.com/robertmartin8/MachineLearningStocks | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | tests/test_datasets.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:24.071688 | import os
import pandas as pd
import parsing_keystats
import stock_prediction
import current_data
def test_forward_sample_dimensions():
"""
Check that the forward sample has been built correctly
"""
# Number of features + ['Date', 'Unix', 'Ticker', 'Price', 'stock_p_change', 'SP500', 'SP500_p_change'... |
robertmartin8/MachineLearningStocks | https://github.com/robertmartin8/MachineLearningStocks | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | tests/test_variables.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:24.072876 | import os
import parsing_keystats
import current_data
import stock_prediction
def test_statspath():
# Check that the statspath exists and is a directory
assert os.path.exists(current_data.statspath)
assert os.path.isdir(current_data.statspath)
assert parsing_keystats.statspath == current_data.statspa... |
robertmartin8/MachineLearningStocks | https://github.com/robertmartin8/MachineLearningStocks | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:24.073848 | def data_string_to_float(number_string):
"""
The result of our regex search is a number stored as a string, but we need a float.
- Some of these strings say things like '25M' instead of 25000000.
- Some have 'N/A' in them.
- Some are negative (have '-' in front of the numbers).
-... |
robertmartin8/MachineLearningStocks | https://github.com/robertmartin8/MachineLearningStocks | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | backtesting.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:24.074493 | # Preprocessing
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import precision_score
from utils import status_calc
def backtest():
"""
A simple backtest, which splits the dataset into a train... |
robertmartin8/MachineLearningStocks | https://github.com/robertmartin8/MachineLearningStocks | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | current_data.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:24.075221 | import pandas as pd
import os
import re
import time
import requests
import numpy as np
from tqdm import tqdm
from utils import data_string_to_float
# The path to your fundamental data
statspath = "intraQuarter/_KeyStats/"
# These are the features that will be parsed
features = [ # Valuation measures
"Market Cap"... |
robertmartin8/MachineLearningStocks | https://github.com/robertmartin8/MachineLearningStocks | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | parsing_keystats.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:24.075658 | import pandas as pd
import os
import time
import re
from datetime import datetime
from utils import data_string_to_float
from tqdm import tqdm
# The directory where individual html files are stored
statspath = "intraQuarter/_KeyStats/"
# The list of features to parse from the html files
features = [ # Valuation mea... |
robertmartin8/MachineLearningStocks | https://github.com/robertmartin8/MachineLearningStocks | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | tests/test_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:24.076098 | import pytest
import utils
def test_status_calc():
"""
Test the status_calc function which generates training labels
"""
assert utils.status_calc(50, 20, 12.2) == 1
assert utils.status_calc(12.003, 10, 15) == 0
assert utils.status_calc(-10, -30, 5) == 1
assert utils.status_calc(-31, -30, 1... |
robertmartin8/MachineLearningStocks | https://github.com/robertmartin8/MachineLearningStocks | null | null | null | null | 1,946 | null | null | mit | null | null | null | null | null | null | null | stock_prediction.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:24.216871 | import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from utils import data_string_to_float, status_calc
# The percentage by which a stock has to beat the S&P500 to be considered a 'buy'
OUTPERFORMANCE = 10
def build_data_set():
"""
Reads the keystats.csv file and prepares it for scikit-l... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/enums/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:27.400387 | """Contains methods for accessing the API Endpoints"""
import types
from . import bool_enum_tests_bool_enum_post, int_enum_tests_int_enum_post
class EnumsEndpoints:
@classmethod
def int_enum_tests_int_enum_post(cls) -> types.ModuleType:
"""
Int Enum
"""
return int_enum_tests_... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/config/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:27.407777 | """Contains methods for accessing the API Endpoints"""
import types
from . import content_type_override
class ConfigEndpoints:
@classmethod
def content_type_override(cls) -> types.ModuleType:
"""
Content Type Override
"""
return content_type_override
|
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/naming/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:27.409752 | """Contains methods for accessing the API Endpoints"""
import types
from . import hyphen_in_path, mixed_case, post_naming_property_conflict_with_import
class NamingEndpoints:
@classmethod
def post_naming_property_conflict_with_import(cls) -> types.ModuleType:
return post_naming_property_conflict_wit... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:27.415722 | """Contains methods for accessing the API"""
from .bodies import BodiesEndpoints
from .config import ConfigEndpoints
from .default import DefaultEndpoints
from .defaults import DefaultsEndpoints
from .enums import EnumsEndpoints
from .location import LocationEndpoints
from .naming import NamingEndpoints
from .paramete... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/defaults/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:27.416710 | """Contains methods for accessing the API Endpoints"""
import types
from . import defaults_tests_defaults_post
class DefaultsEndpoints:
@classmethod
def defaults_tests_defaults_post(cls) -> types.ModuleType:
"""
Defaults
"""
return defaults_tests_defaults_post
|
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/bodies/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:27.418527 | """Contains methods for accessing the API Endpoints"""
import types
from . import json_like, optional_body, post_bodies_multiple, refs
class BodiesEndpoints:
@classmethod
def post_bodies_multiple(cls) -> types.ModuleType:
"""
Test multiple bodies
"""
return post_bodies_multip... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:27.422833 | """ Generate a complete client and verify that it is correct """
import pytest
pytest.register_assert_rewrite("end_to_end_tests.end_to_end_test_helpers")
pytest.register_assert_rewrite("end_to_end_tests.functional_tests.helpers")
|
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/location/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:27.424586 | """Contains methods for accessing the API Endpoints"""
import types
from . import get_location_header_types, get_location_query_optionality
class LocationEndpoints:
@classmethod
def get_location_query_optionality(cls) -> types.ModuleType:
return get_location_query_optionality
@classmethod
d... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/default/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:27.425445 | """Contains methods for accessing the API Endpoints"""
import types
from . import (
get_common_parameters,
get_models_allof,
get_models_oneof_with_required_const,
post_common_parameters,
post_types_unions_duplicate_types,
reserved_parameters,
)
class DefaultEndpoints:
@classmethod
de... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/parameter_references/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:27.444080 | """Contains methods for accessing the API Endpoints"""
import types
from . import get_parameter_references_path_param
class ParameterReferencesEndpoints:
@classmethod
def get_parameter_references_path_param(cls) -> types.ModuleType:
"""
Test different types of parameter references
""... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/responses/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.019717 | """Contains methods for accessing the API Endpoints"""
import types
from . import (
default_status_code,
post_responses_unions_simple_before_complex,
reference_response,
status_code_patterns,
status_code_precedence,
text_response,
)
class ResponsesEndpoints:
@classmethod
def post_res... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tag1/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.022800 | """Contains methods for accessing the API Endpoints"""
import types
from . import get_tag_with_number
class Tag1Endpoints:
@classmethod
def get_tag_with_number(cls) -> types.ModuleType:
return get_tag_with_number
|
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tag2/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.043057 | """Contains methods for accessing the API Endpoints"""
import types
from . import get_tag_with_number
class Tag2Endpoints:
@classmethod
def get_tag_with_number(cls) -> types.ModuleType:
return get_tag_with_number
|
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/docstrings-on-attributes-golden-record/my_test_api_client/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.071628 | """A client library for accessing My Test API"""
from .client import AuthenticatedClient, Client
__all__ = (
"AuthenticatedClient",
"Client",
)
|
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/docstrings-on-attributes-golden-record/my_test_api_client/client.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.072184 | import ssl
from typing import Any
import httpx
from attrs import define, evolve, field
@define
class Client:
"""A class for keeping track of data related to the API
The following are accepted as keyword arguments and will be used to construct httpx Clients internally:
``base_url``: The base URL for... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/true_/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.075977 | """Contains methods for accessing the API Endpoints"""
import types
from . import false_
class True_Endpoints:
@classmethod
def false_(cls) -> types.ModuleType:
return false_
|
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/parameters/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.076839 | """Contains methods for accessing the API Endpoints"""
import types
from . import (
delete_common_parameters_overriding_param,
get_common_parameters_overriding_param,
get_same_name_multiple_locations_param,
multiple_path_parameters,
)
class ParametersEndpoints:
@classmethod
def get_common_pa... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/models/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.086890 | # Testing that we can access model-related information via Jinja variables.
# To avoid having to update this file in the golden record every time the test specs are changed,
# we won't include all the classes in this output - we'll just look for one of them.
# Using "alls"
# AModel
# Using "imports"
# from .a_mo... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tests/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.119569 | """Contains methods for accessing the API Endpoints"""
import types
from . import (
callback_test,
description_with_backslash,
get_basic_list_of_booleans,
get_basic_list_of_floats,
get_basic_list_of_integers,
get_basic_list_of_strings,
get_user_list,
json_body_tests_json_body_post,
... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/docstrings-on-attributes-golden-record/my_test_api_client/models/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.617174 | """Contains all the data models used in inputs/outputs"""
from .model_with_description import ModelWithDescription
from .model_with_no_description import ModelWithNoDescription
__all__ = (
"ModelWithDescription",
"ModelWithNoDescription",
)
|
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/docstrings-on-attributes-golden-record/my_test_api_client/errors.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.618489 | """Contains shared errors types that can be raised from API functions"""
class UnexpectedStatus(Exception):
"""Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True"""
def __init__(self, status_code: int, content: bytes):
self.status_cod... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/docstrings-on-attributes-golden-record/my_test_api_client/types.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.689185 | """Contains some shared types for properties"""
from collections.abc import Mapping, MutableMapping
from http import HTTPStatus
from typing import IO, BinaryIO, Generic, Literal, TypeVar
from attrs import define
class Unset:
def __bool__(self) -> Literal[False]:
return False
UNSET: Unset = Unset()
# ... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/docstrings-on-attributes-golden-record/my_test_api_client/models/model_with_description.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.690374 | from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from ..types import UNSET, Unset
T = TypeVar("T", bound="ModelWithDescription")
@_attrs_define
class ModelWithDescription:
""... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/generated_code_execution/test_defaults.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.704175 | import datetime
import uuid
from end_to_end_tests.functional_tests.helpers import (
with_generated_client_fixture,
with_generated_code_imports,
)
@with_generated_client_fixture(
"""
components:
schemas:
MyModel:
type: object
properties:
booleanProp: {"type": "boolean", "default": tr... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/generated_code_execution/test_path_parameters.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.710880 | from unittest.mock import MagicMock
import httpx
import pytest
from end_to_end_tests.functional_tests.helpers import (
with_generated_client_fixture,
with_generated_code_import,
)
@with_generated_client_fixture(
"""
paths:
"/items/{item_id}/details/{detail_id}":
get:
operationId: getItemDetail
... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/docstrings-on-attributes-golden-record/my_test_api_client/models/model_with_no_description.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.711681 | from __future__ import annotations
from collections.abc import Mapping
from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from ..types import UNSET, Unset
T = TypeVar("T", bound="ModelWithNoDescription")
@_attrs_define
class ModelWithNoDescription:
... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/generated_code_execution/test_docstrings.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.713308 | from typing import Any
from end_to_end_tests.functional_tests.helpers import (
with_generated_code_import,
with_generated_client_fixture,
)
class DocstringParser:
lines: list[str]
def __init__(self, item: Any):
self.lines = [line.lstrip() for line in item.__doc__.split("\n")]
def get_se... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/generated_code_execution/test_arrays.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.730209 | from end_to_end_tests.functional_tests.helpers import (
assert_model_decode_encode,
assert_model_property_type_hint,
with_generated_client_fixture,
with_generated_code_imports,
)
@with_generated_client_fixture(
"""
components:
schemas:
SimpleObject:
type: object
properties:
n... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/generated_code_execution/test_enums_and_consts.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:28.749806 | from typing import Literal
import pytest
from end_to_end_tests.functional_tests.helpers import (
assert_model_decode_encode,
assert_model_property_type_hint,
with_generated_client_fixture,
with_generated_code_imports,
)
@with_generated_client_fixture(
"""
components:
schemas:
MyEnum:
type... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/generated_code_execution/test_properties.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:29.224207 | import datetime
import uuid
import pytest
from end_to_end_tests.functional_tests.helpers import (
assert_model_decode_encode,
assert_model_property_type_hint,
with_generated_client_fixture,
with_generated_code_imports,
)
@with_generated_client_fixture(
"""
components:
schemas:
MyModel:
... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/generator_failure_cases/test_invalid_unions.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:29.576353 | from end_to_end_tests.functional_tests.helpers import assert_bad_schema, with_generated_client_fixture
@with_generated_client_fixture(
"""
components:
schemas:
UnionWithInvalidReference:
anyOf:
- $ref: "#/components/schemas/DoesntExist"
UnionWithInvalidDefault:
type: ["number", "integer"... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/generated_client.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:29.578478 | import importlib
import os
import re
import shutil
from pathlib import Path
import sys
import tempfile
from typing import Any
from attrs import define
import pytest
from click.testing import Result
from typer.testing import CliRunner
from openapi_python_client.cli import app
@define
class GeneratedClientContext:
... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/helpers.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:29.579707 | from typing import Any, Dict
import re
from click.testing import Result
import pytest
from end_to_end_tests.generated_client import generate_client_from_inline_spec, GeneratedClientContext
def with_generated_client_fixture(
openapi_spec: str,
name: str="generated_client",
config: str="",
extra_args:... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/generated_code_execution/test_unions.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:29.729608 | from end_to_end_tests.functional_tests.helpers import (
assert_model_decode_encode,
assert_model_property_type_hint,
with_generated_client_fixture,
with_generated_code_imports,
)
@with_generated_client_fixture(
"""
components:
schemas:
StringOrInt:
type: ["string", "integer"]
MyModel:
... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/generator_failure_cases/test_invalid_arrays.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:29.840027 | import pytest
from end_to_end_tests.functional_tests.helpers import assert_bad_schema, with_generated_client_fixture
@with_generated_client_fixture(
"""
components:
schemas:
ArrayWithNoItems:
type: array
ArrayWithInvalidItemsRef:
type: array
items:
$ref: "#/components/schemas/Does... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/generator_failure_cases/test_invalid_enums_and_consts.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:29.841056 | from end_to_end_tests.functional_tests.helpers import (
assert_bad_schema,
inline_spec_should_fail,
with_generated_client_fixture,
)
@with_generated_client_fixture(
"""
components:
schemas:
WithBadDefaultValue:
enum: ["A"]
default: "B"
WithBadDefaultType:
enum: ["A"]
defa... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/generator_failure_cases/test_invalid_spec_format.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:29.881626 | import pytest
from end_to_end_tests.functional_tests.helpers import (
inline_spec_should_fail,
)
class TestInvalidSpecFormats:
@pytest.mark.parametrize(
("filename_suffix", "content", "expected_error"),
(
(".yaml", "not a valid openapi document", "Failed to parse OpenAPI document")... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/generator_failure_cases/test_invalid_defaults.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:29.882604 | import pytest
from end_to_end_tests.functional_tests.helpers import assert_bad_schema, with_generated_client_fixture
@with_generated_client_fixture(
"""
components:
schemas:
WithBadBoolean:
properties:
badBoolean: {"type": "boolean", "default": "not a boolean"}
WithBadIntAsString:
prope... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/functional_tests/generator_failure_cases/test_invalid_references.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:30.191296 | import pytest
from end_to_end_tests.functional_tests.helpers import assert_bad_schema, with_generated_client_fixture
@with_generated_client_fixture(
"""
components:
schemas:
MyModel:
type: object
properties:
booleanProp: {"type": "boolean"}
stringProp: {"type": "string"}
... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/golden-record/my_test_api_client/api/bodies/json_like.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:30.219909 | from http import HTTPStatus
from typing import Any
import httpx
from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.json_like_body import JsonLikeBody
from ...types import UNSET, Response, Unset
def _get_kwargs(
*,
body: JsonLikeBody | Unset = UNSET,
) -> dict[str, Any]:
... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/golden-record/my_test_api_client/api/bodies/optional_body.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:30.321924 | from http import HTTPStatus
from typing import Any
import httpx
from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.optional_body_body import OptionalBodyBody
from ...types import UNSET, Response, Unset
def _get_kwargs(
*,
body: OptionalBodyBody | Unset = UNSET,
) -> dict... |
openapi-generators/openapi-python-client | https://github.com/openapi-generators/openapi-python-client | null | null | null | null | 1,942 | null | null | mit | null | null | null | null | null | null | null | end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py | null | null | null | null | null | null | Python | 2026-05-04T01:47:30.416442 | from http import HTTPStatus
from typing import Any
import httpx
from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.post_bodies_multiple_data_body import PostBodiesMultipleDataBody
from ...models.post_bodies_multiple_files_body import PostBodiesMultipleFilesBody
from ...models.post... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.