repo stringclasses 454
values | file_path stringlengths 5 201 | extension stringclasses 1
value | content stringlengths 8 509k | num_lines int64 3 16.9k | size_bytes int64 8 511k |
|---|---|---|---|---|---|
mlflow | mlflow/genai/agent_tester.py | .py | from __future__ import annotations
import inspect
import logging
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Callable
import pydantic
import mlflow
from mlflow.genai.judges.utils.invocation_utils import get_chat_completions_with_structured_output
from mlflow.utils.annotations import expe... | 456 | 15,912 |
wagtail | wagtail/admin/ui/editing_sessions.py | .py | from django.conf import settings
from wagtail.admin.ui.components import Component
class EditingSessionsModule(Component):
template_name = "wagtailadmin/shared/editing_sessions/module.html"
def __init__(
self,
current_session,
ping_url,
release_url,
other_sessions,
... | 51 | 1,615 |
mlflow | dev/clint/src/clint/rules/use_gh_token.py | .py | import ast
from clint.resolver import Resolver
from clint.rules.base import Rule
class UseGhToken(Rule):
def _message(self) -> str:
return "Use GH_TOKEN instead of GITHUB_TOKEN for the environment variable name."
@staticmethod
def check(node: ast.Call, resolver: Resolver) -> bool:
"""
... | 25 | 774 |
mlflow | tests/tracking/_model_registry/test_model_registry_client.py | .py | from unittest import mock
from unittest.mock import ANY
import pytest
from mlflow.entities.model_registry import (
ModelVersion,
ModelVersionTag,
RegisteredModel,
RegisteredModelTag,
)
from mlflow.exceptions import MlflowException
from mlflow.store.entities.paged_list import PagedList
from mlflow.stor... | 550 | 20,253 |
mlflow | tests/spark/autologging/datasource/test_spark_datasource_autologging_unit.py | .py | from unittest import mock
import pytest
import mlflow.spark
from mlflow.exceptions import MlflowException
from mlflow.spark.autologging import PythonSubscriber, _get_current_listener
@pytest.fixture
def mock_get_current_listener():
with mock.patch(
"mlflow.spark.autologging._get_current_listener", retur... | 61 | 2,114 |
mlflow | tests/store/tracking/sqlalchemy_store/test_sqlalchemy_store_eval_datasets.py | .py | import json
import time
from unittest import mock
import pytest
from mlflow.entities.dataset_record import DatasetRecord
from mlflow.exceptions import MlflowException
from mlflow.store.tracking.dbmodels.models import SqlEvaluationDatasetRecord
from mlflow.utils import mlflow_tags
from tests.store.tracking.sqlalchemy... | 1,022 | 36,867 |
pdm | src/pdm/installers/uv.py | .py | from __future__ import annotations
import os
import subprocess
from typing import Any
from pdm._types import HiddenText
from pdm.environments.local import PythonLocalEnvironment
from pdm.exceptions import PdmUsageError, ProjectError
from pdm.installers.base import BaseSynchronizer
from pdm.models.repositories import ... | 97 | 3,965 |
wandb | wandb/integration/tensorboard/log.py | .py | from __future__ import annotations
import io
import re
import time
from typing import TYPE_CHECKING, Any
import wandb
import wandb.util
from wandb.sdk.lib import telemetry
if TYPE_CHECKING:
import numpy as np
from wandb.sdk.internal.tb_watcher import TBHistory
# We have at least the default namestep and a ... | 354 | 14,055 |
clearml | examples/frameworks/tensorflow/absl_flags.py | .py | # ClearML - example code, absl parameter logging
#
import sys
from absl import app
from absl import flags
from absl import logging
from clearml import Task
FLAGS = flags.FLAGS
flags.DEFINE_string("echo", None, "Text to echo.")
flags.DEFINE_string("another_str", "My string", "A string", module_name="test")
# Connec... | 33 | 921 |
conda | conda/cli/main_pip.py | .py | # Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
"""PEP 621 compatible entry point used when `conda init` has not updated the user shell profile."""
import os
import sys
from logging import getLogger
log = getLogger(__name__)
def pip_installed_post_parse_hook(args, p):
from .. import C... | 34 | 872 |
attrs | src/attr/_version_info.py | .py | # SPDX-License-Identifier: MIT
from functools import total_ordering
from ._funcs import astuple
from ._make import attrib, attrs
@total_ordering
@attrs(eq=False, order=False, slots=True, frozen=True)
class VersionInfo:
"""
A version object that can be compared to tuple of length 1--4:
>>> attr.Version... | 90 | 2,222 |
pyomo | pyomo/opt/plugins/driver.py | .py | # ____________________________________________________________________________________
#
# Pyomo: Python Optimization Modeling Objects
# Copyright (c) 2008-2026 National Technology and Engineering Solutions of Sandia, LLC
# Under the terms of Contract DE-NA0003525 with National Technology and Engineering
# Solutions of... | 83 | 2,710 |
coveragepy | coverage/report.py | .py | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/coveragepy/coveragepy/blob/main/NOTICE.txt
"""Summary reporting"""
from __future__ import annotations
import string
import sys
from collections.abc import Iterable
from typing import IO, TYPE_CHECKING, A... | 308 | 10,998 |
cvxpy | cvxpy/reductions/solvers/defines.py | .py | """
Copyright 2013 Steven Diamond
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | 132 | 6,611 |
openvino | src/frontends/tensorflow/tests/test_models/models_pbtxt/undefined_input_shape.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import tensorflow.compat.v1 as tf
tf.reset_default_graph()
with tf.Session() as sess:
x = tf.placeholder(dtype=tf.float32, shape=None, name='x')
y = tf.placeholder(dtype=tf.float32, shape=[2, 3], name='y')
z = tf.placehold... | 18 | 545 |
sphinx | tests/roots/test-add_source_parser-conflicts-with-users-setting/conf.py | .py | import sys
from pathlib import Path
sys.path.insert(0, str(Path.cwd().resolve()))
from docutils.parsers import Parser
class DummyTestParser(Parser):
supported = ('dummy',)
extensions = ['source_parser']
source_suffix = {
'.rst': 'restructuredtext',
'.test': 'restructuredtext',
}
source_parsers = {
... | 21 | 349 |
wagtail | wagtail/documents/api/v2/serializers.py | .py | from rest_framework.fields import Field
from wagtail.api.v2.serializers import BaseSerializer
from wagtail.api.v2.utils import get_full_url
class DocumentDownloadUrlField(Field):
"""
Serializes the "download_url" field for documents.
Example:
"download_url": "http://api.example.com/documents/1/my_do... | 24 | 619 |
cvxpy | cvxpy/atoms/cummax.py | .py | """
Copyright 2017 Steven Diamond
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | 106 | 2,956 |
cvxpy | cvxpy/problems/objective.py | .py | """
Copyright 2013 Steven Diamond
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | 269 | 7,838 |
wagtail | wagtail/api/v3/tests/test_sites.py | .py | import json
from django.contrib.auth.models import Permission
from django.core.cache import cache
from django.test import TestCase
from django.urls import reverse
from wagtail.api.v3.tests.base import TestV3Base
from wagtail.models import Site
from wagtail.models.sites import (
SITE_ROOT_PATHS_CACHE_KEY,
SITE... | 348 | 13,063 |
beam | sdks/python/apache_beam/typehints/trivial_inference_test.py | .py | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 520 | 18,034 |
readthedocs.org | readthedocs/telemetry/tests/test_collectors.py | .py | from textwrap import dedent
from unittest import mock
from django.contrib.auth.models import User
from django.test import TestCase
from django_dynamic_fixture import get
from readthedocs.config.tests.test_config import get_build_config
from readthedocs.doc_builder.environments import DockerBuildEnvironment
from readt... | 207 | 6,645 |
returns | returns/primitives/laws.py | .py | from collections.abc import Callable, Sequence
from typing import ClassVar, Final, Generic, TypeVar, final
from returns.primitives.types import Immutable
_Caps = TypeVar('_Caps')
_ReturnType = TypeVar('_ReturnType')
_TypeArgType1 = TypeVar('_TypeArgType1')
_TypeArgType2 = TypeVar('_TypeArgType2')
_TypeArgType3 = Type... | 148 | 3,717 |
beam | sdks/python/apache_beam/coders/observable_test.py | .py | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 58 | 1,796 |
textual | src/textual/renderables/tint.py | .py | from __future__ import annotations
from typing import Iterable
from rich.console import RenderableType
from rich.segment import Segment
from rich.style import Style
from rich.terminal_theme import TerminalTheme
from textual.color import TRANSPARENT, Color
from textual.filter import ANSIToTruecolor
class Tint:
... | 87 | 2,605 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 124