metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "plot_4_walks.py",
"repo_name": "Samreay/ChainConsumer",
"repo_path": "ChainConsumer_extracted/ChainConsumer-master/docs/examples/plot_4_walks.py",
"type": "Python"
} | """
# Introduction to Walks
Want to see if your chain is behaving nicely? Use a walk!
"""
from chainconsumer import Chain, ChainConsumer, Truth, make_sample
# Here's a sample dataset
df_1 = make_sample(num_dimensions=4, seed=1, randomise_mean=True, num_points=10000)
# And now we give this to chainconsumer
c = Chain... | SamreayREPO_NAMEChainConsumerPATH_START.@ChainConsumer_extracted@ChainConsumer-master@docs@examples@plot_4_walks.py@.PATH_END.py |
{
"filename": "find_sycl_config.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/third_party/xla/third_party/tsl/third_party/gpus/find_sycl_config.py",
"type": "Python"
} | # Copyright 2024 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@third_party@xla@third_party@tsl@third_party@gpus@find_sycl_config.py@.PATH_END.py |
{
"filename": "Sinc.py",
"repo_name": "dokester/BayesicFitting",
"repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/source/kernels/Sinc.py",
"type": "Python"
} | import numpy as numpy
import math
from .Kernel import Kernel
__author__ = "Do Kester"
__year__ = 2017
__license__ = "GPL3"
__version__ = "0.9"
__maintainer__ = "Do"
__status__ = "Development"
# *
# * This file is part of the BayesicFitting package.
# *
# * BayesicFitting is free software: you can redistrib... | dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@source@kernels@Sinc.py@.PATH_END.py |
{
"filename": "custom_functions.py",
"repo_name": "AarhusCosmology/connect_public",
"repo_path": "connect_public_extracted/connect_public-main/source/custom_functions.py",
"type": "Python"
} | # Custom loss and activation functions
import tensorflow as tf
import numpy as np
class LossFunctions():
def __init__(self, ell):
self.ell = ell
def cosmic_variance(self, y_actual, y_pred):
Var = tf.constant(2/(2 * self.ell + 1), dtype=tf.float32)
loss = tf.divide(tf.square(y_actual-... | AarhusCosmologyREPO_NAMEconnect_publicPATH_START.@connect_public_extracted@connect_public-main@source@custom_functions.py@.PATH_END.py |
{
"filename": "accumulate.py",
"repo_name": "TianlaiProject/tlpipe",
"repo_path": "tlpipe_extracted/tlpipe-master/tlpipe/timestream/accumulate.py",
"type": "Python"
} | """Accumulate data.
Inheritance diagram
-------------------
.. inheritance-diagram:: Accum
:parts: 2
"""
import os
import numpy as np
import h5py
import timestream_task
from tlpipe.container.timestream import Timestream
from tlpipe.utils.path_util import input_path, output_path
from caput import mpiutil
from cap... | TianlaiProjectREPO_NAMEtlpipePATH_START.@tlpipe_extracted@tlpipe-master@tlpipe@timestream@accumulate.py@.PATH_END.py |
{
"filename": "_cumulative.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/histogram/_cumulative.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Cumulative(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "histogram"
_path_str = "histogram.cumulative"
_valid_props = {"currentbin", "direction",... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@histogram@_cumulative.py@.PATH_END.py |
{
"filename": "_coloraxis.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram/marker/line/_coloraxis.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(
self, plotly_name="coloraxis", parent_name="histogram.marker.line", **kwargs
):
super(ColoraxisValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram@marker@line@_coloraxis.py@.PATH_END.py |
{
"filename": "miri_mrs.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/photom/miri_mrs.py",
"type": "Python"
} | import logging
import numpy as np
from scipy.interpolate import RegularGridInterpolator
from gwcs.wcstools import grid_from_bounding_box
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
# Set of routines to find a correction for a time-wavelength
# photometric response that is particularly significant a... | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@photom@miri_mrs.py@.PATH_END.py |
{
"filename": "_textcase.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/legendgrouptitle/font/_textcase.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="textcase",
parent_name="treemap.legendgrouptitle.font",
**kwargs,
):
super(TextcaseValidator, self).__init__(
plot... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@legendgrouptitle@font@_textcase.py@.PATH_END.py |
{
"filename": "test_neighbors.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/neighbors/tests/test_neighbors.py",
"type": "Python"
} | import re
import warnings
from itertools import product
import joblib
import numpy as np
import pytest
from scipy.sparse import issparse
from sklearn import (
config_context,
datasets,
metrics,
neighbors,
)
from sklearn.base import clone
from sklearn.exceptions import EfficiencyWarning, NotFittedError... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@neighbors@tests@test_neighbors.py@.PATH_END.py |
{
"filename": "base.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/agents/agent_toolkits/base.py",
"type": "Python"
} | from langchain_core.tools import BaseToolkit
__all__ = ["BaseToolkit"]
| langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@agents@agent_toolkits@base.py@.PATH_END.py |
{
"filename": "ctypeslib.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/ctypeslib.py",
"type": "Python"
} | """
============================
``ctypes`` Utility Functions
============================
See Also
--------
load_library : Load a C library.
ndpointer : Array restype/argtype with verification.
as_ctypes : Create a ctypes array from an ndarray.
as_array : Create an ndarray from a ctypes array.
References
----------
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@ctypeslib.py@.PATH_END.py |
{
"filename": "test_magnpratio.py",
"repo_name": "light-curve/light-curve-python",
"repo_path": "light-curve-python_extracted/light-curve-python-master/light-curve/tests/light_curve_py/features/test_magnpratio.py",
"type": "Python"
} | import numpy as np
from numpy.testing import assert_allclose
from light_curve.light_curve_py import MagnitudePercentageRatio
def test_magnpratio_1():
m = np.arange(1.0, 11.0)
feature = MagnitudePercentageRatio()
feature2 = MagnitudePercentageRatio(quantile_numerator=0.4, quantile_denominator=0.05)
ac... | light-curveREPO_NAMElight-curve-pythonPATH_START.@light-curve-python_extracted@light-curve-python-master@light-curve@tests@light_curve_py@features@test_magnpratio.py@.PATH_END.py |
{
"filename": "conftest.py",
"repo_name": "D-arioSpace/astroquery",
"repo_path": "astroquery_extracted/astroquery-main/docs/conftest.py",
"type": "Python"
} | import os
from pathlib import Path
import pytest
@pytest.fixture(autouse=True)
def tmp_doctest_path(request, tmp_path):
"""Run doctests in isolated temp dir so outputs do not end up in repo"""
# Trigger ONLY for doctestplus
doctest_plugin = request.config.pluginmanager.getplugin("doctestplus")
if isi... | D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@docs@conftest.py@.PATH_END.py |
{
"filename": "test_caldb.py",
"repo_name": "kpicteam/kpic_pipeline",
"repo_path": "kpic_pipeline_extracted/kpic_pipeline-main/tests/test_caldb.py",
"type": "Python"
} | import kpicdrp.caldb as caldb
import os
from kpicdrp.data import Background, BadPixelMap
# Filepaths for a BadPixelMap file and a Background file - must change these
bp1path = "../../public_kpic_data/20200928_backgrounds/calib/20200928_persistent_badpix_nobars_tint4.42584_coadds1.fits"
bkgd1path ="../../public_kpic_da... | kpicteamREPO_NAMEkpic_pipelinePATH_START.@kpic_pipeline_extracted@kpic_pipeline-main@tests@test_caldb.py@.PATH_END.py |
{
"filename": "python-reference_pool_set_group_id.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/python-reference_pool_set_group_id.md",
"type": "Markdown"
} | # set_group_id
{% include [set_group_id-set_group_id__desc](../_includes/work_src/reusage-python/set_group_id__desc.md) %}
## {{ dl--invoke-format }} {#call-format}
```
set_group_id(group_id)
```
## {{ dl--parameters }} {#parameters}
### group_id
#### Description
Group identifiers for all input objects. Support... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@python-reference_pool_set_group_id.md@.PATH_END.py |
{
"filename": "_thickness.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/streamtube/colorbar/_thickness.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="thickness", parent_name="streamtube.colorbar", **kwargs
):
super(ThicknessValidator, self).__init__(
plotly_name=plotly_name,
par... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@streamtube@colorbar@_thickness.py@.PATH_END.py |
{
"filename": "_separatethousands.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/marker/colorbar/_separatethousands.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self,
plotly_name="separatethousands",
parent_name="bar.marker.colorbar",
**kwargs
):
super(SeparatethousandsValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@marker@colorbar@_separatethousands.py@.PATH_END.py |
{
"filename": "_shadowsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/outsidetextfont/_shadowsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="shadowsrc", parent_name="bar.outsidetextfont", **kwargs
):
super(ShadowsrcValidator, self).__init__(
plotly_name=plotly_name,
parent... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@outsidetextfont@_shadowsrc.py@.PATH_END.py |
{
"filename": "_familysrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/textfont/_familysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="familysrc", parent_name="scattercarpet.textfont", **kwargs
):
super(FamilysrcValidator, self).__init__(
plotly_name=plotly_name,
par... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@textfont@_familysrc.py@.PATH_END.py |
{
"filename": "colors.py",
"repo_name": "moeyensj/atm",
"repo_path": "atm_extracted/atm-master/atm/analysis/colors.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import numpy as np
import pandas as pd
from ..config import Config
__all__ = ["calcColors",
"calcModelColors",
"calcColorResiduals"]
def calcColors(obs, observations, columnMapping=Config.columnMapping):
"""
Calculates colors using magnitude... | moeyensjREPO_NAMEatmPATH_START.@atm_extracted@atm-master@atm@analysis@colors.py@.PATH_END.py |
{
"filename": "phase_set.py",
"repo_name": "RTIP/artip",
"repo_path": "artip_extracted/artip-master/src/main/python/models/phase_set.py",
"type": "Python"
} | import numpy
import math
class PhaseSet:
INVALID_ANGULAR_DISPERSION = -1
def __init__(self, phases):
self._phases = phases
def _avg_sine(self):
sines = numpy.sin(self._phases)
return numpy.nanmean(sines)
def _avg_cosine(self):
cosines = numpy.cos(self._phases)
... | RTIPREPO_NAMEartipPATH_START.@artip_extracted@artip-master@src@main@python@models@phase_set.py@.PATH_END.py |
{
"filename": "test_scalar_ctors.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/core/tests/test_scalar_ctors.py",
"type": "Python"
} | """
Test the scalar constructors, which also do type-coercion
"""
import pytest
import numpy as np
from numpy.testing import (
assert_equal, assert_almost_equal, assert_warns,
)
class TestFromString:
def test_floating(self):
# Ticket #640, floats from string
fsingle = np.single('1.234')
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@core@tests@test_scalar_ctors.py@.PATH_END.py |
{
"filename": "delayopt.py",
"repo_name": "radiocosmology/draco",
"repo_path": "draco_extracted/draco-master/draco/analysis/delayopt.py",
"type": "Python"
} | """Helper functions for the delay PS estimation via ML/MAP optimisation."""
from typing import Protocol
import numpy as np
import scipy.linalg as la
from scipy.optimize import minimize
from ..util import tools
class OptFunc(Protocol):
"""A protocol for a function and its gradients to optimise.
The functio... | radiocosmologyREPO_NAMEdracoPATH_START.@draco_extracted@draco-master@draco@analysis@delayopt.py@.PATH_END.py |
{
"filename": "CustomizableRegion.py",
"repo_name": "marblestation/iSpec",
"repo_path": "iSpec_extracted/iSpec-master/ispec/gui/CustomizableRegion.py",
"type": "Python"
} | #
# This file is part of iSpec.
# Copyright Sergi Blanco-Cuaresma - http://www.blancocuaresma.com/s/
#
# iSpec is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | marblestationREPO_NAMEiSpecPATH_START.@iSpec_extracted@iSpec-master@ispec@gui@CustomizableRegion.py@.PATH_END.py |
{
"filename": "example_torus.py",
"repo_name": "GalacticDynamics-Oxford/Agama",
"repo_path": "Agama_extracted/Agama-master/py/example_torus.py",
"type": "Python"
} | #!/usr/bin/python
# illustrate the use of Torus Machine for transformation from action/angle to position/velocity
import agama, numpy, matplotlib.pyplot as plt
ax = plt.subplots(2,2, figsize=(15,10))[1]
pot = agama.Potential(type='Spheroid', gamma=0, beta=5, alpha=2, mass=10, axisratioz=.6) # flattened Plummer
act = n... | GalacticDynamics-OxfordREPO_NAMEAgamaPATH_START.@Agama_extracted@Agama-master@py@example_torus.py@.PATH_END.py |
{
"filename": "advanced_plotting.ipynb",
"repo_name": "vaexio/vaex",
"repo_path": "vaex_extracted/vaex-master/docs/source/guides/advanced_plotting.ipynb",
"type": "Jupyter Notebook"
} | <style>
pre {
white-space: pre-wrap !important;
}
.table-striped > tbody > tr:nth-of-type(odd) {
background-color: #f9f9f9;
}
.table-striped > tbody > tr:nth-of-type(even) {
background-color: white;
}
.table-striped td, .table-striped th, .table-striped tr {
border: 1px solid black;
border-collapse: co... | vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@docs@source@guides@advanced_plotting.ipynb@.PATH_END.py |
{
"filename": "choose-the-required-implementation-for-more-details.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage-common-phrases/choose-the-required-implementation-for-more-details.md",
"type": "Markdown"
} |
Choose the implementation for more details.
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage-common-phrases@choose-the-required-implementation-for-more-details.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "dirac-institute/asterogap",
"repo_path": "asterogap_extracted/asterogap-main/asterogap/__init__.py",
"type": "Python"
} |
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
from asterogap.GP import *
from asterogap.run_gp import *
| dirac-instituteREPO_NAMEasterogapPATH_START.@asterogap_extracted@asterogap-main@asterogap@__init__.py@.PATH_END.py |
{
"filename": "lineprofile.py",
"repo_name": "sibirrer/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/LightModel/Profiles/lineprofile.py",
"type": "Python"
} | import numpy as np
__all__ = ["LineProfile"]
class LineProfile(object):
"""Horizontal line segment class.
The line extends `length` arcseconds from
(`start_x`, `start_y`) at an angle `angle` degrees to the horizontal. Line `width`
is centered in the perpendicular direction, e.g. a profile with 1 ar... | sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@LightModel@Profiles@lineprofile.py@.PATH_END.py |
{
"filename": "basispursuit.py",
"repo_name": "cvxopt/cvxopt",
"repo_path": "cvxopt_extracted/cvxopt-master/examples/book/chap6/basispursuit.py",
"type": "Python"
} | # Figures 6.21-23, pages 335-337.
# Basis pursuit.
from cvxopt import matrix, mul, div, cos, sin, exp, sqrt
from cvxopt import blas, lapack, solvers
try: import pylab
except ImportError: pylab_installed = False
else: pylab_installed = True
# Basis functions are Gabor pulses: for k = 0,...,K-1,
#
# exp(-(t - k *... | cvxoptREPO_NAMEcvxoptPATH_START.@cvxopt_extracted@cvxopt-master@examples@book@chap6@basispursuit.py@.PATH_END.py |
{
"filename": "_showticksuffix.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/heatmap/colorbar/_showticksuffix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="showticksuffix", parent_name="heatmap.colorbar", **kwargs
):
super(ShowticksuffixValidator, self).__init__(
plotly_name=plotly_name,... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@heatmap@colorbar@_showticksuffix.py@.PATH_END.py |
{
"filename": "powerMapsSandbox.py",
"repo_name": "oliverphilcox/HADES",
"repo_path": "HADES_extracted/HADES-master/tile_creation/powerMapsSandbox.py",
"type": "Python"
} |
from flipper import *
from flipperPol import *
import healpy
import aveTools
import pickle
import scipy.ndimage.filters
p = flipperDict.flipperDict()
p.read_from_file(sys.argv[1])
import matplotlib.pyplot as plt
tqus = ['T', 'Q', 'U']
goodMap = pickle.load( open(p['workDir'] + p['basename'] + 'goodMap.pkl', 'r')... | oliverphilcoxREPO_NAMEHADESPATH_START.@HADES_extracted@HADES-master@tile_creation@powerMapsSandbox.py@.PATH_END.py |
{
"filename": "_ticksuffix.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/marker/colorbar/_ticksuffix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="ticksuffix",
parent_name="scatterpolar.marker.colorbar",
**kwargs,
):
super(TicksuffixValidator, self).__init__(
plo... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@marker@colorbar@_ticksuffix.py@.PATH_END.py |
{
"filename": "test_whl.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/python-package/ut/medium/test_whl.py",
"type": "Python"
} | import pytest
import yatest.common
import shutil
import os
import zipfile
PYTHON_PACKAGE_DIR = os.path.join("catboost", "python-package")
def test_wheel():
try:
import catboost_pytest_lib # noqa
except ImportError:
pytest.skip('test_wheel requires YA build')
shutil.copy(yatest.common.s... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@python-package@ut@medium@test_whl.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattercarpet/marker/colorbar/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._ypad import YpadValidator
from ._yanchor import YanchorValidator
from ._y import YValidator
from ._xpad import XpadValidator
from ._xanchor import XanchorValidator
from ._x import XValidator
from ._title import TitleValidator
from ._tickwi... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattercarpet@marker@colorbar@__init__.py@.PATH_END.py |
{
"filename": "update_book_plan.py",
"repo_name": "simonsobs/sotodlib",
"repo_path": "sotodlib_extracted/sotodlib-master/sotodlib/site_pipeline/update_book_plan.py",
"type": "Python"
} | import argparse
import datetime as dt
import time
from typing import Optional
from sotodlib.io.imprinter import Imprinter
from sotodlib.site_pipeline.monitor import Monitor
from sotodlib.site_pipeline.util import init_logger
logger = init_logger(__name__, "update_book_plan: ")
def main(
config: str,
min_ctim... | simonsobsREPO_NAMEsotodlibPATH_START.@sotodlib_extracted@sotodlib-master@sotodlib@site_pipeline@update_book_plan.py@.PATH_END.py |
{
"filename": "inTransit.py",
"repo_name": "sczesla/PyAstronomy",
"repo_path": "PyAstronomy_extracted/PyAstronomy-master/src/pyasl/asl/inTransit.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
from __future__ import print_function, division
import numpy as np
from PyAstronomy.pyaC import pyaErrors as PE
from PyAstronomy import pyasl
from .keplerOrbit import KeplerEllipse
from .astroTimeLegacy import helio_jd, daycnv
from . import observatory as pyaobs
from . import eq2hor
from . impor... | sczeslaREPO_NAMEPyAstronomyPATH_START.@PyAstronomy_extracted@PyAstronomy-master@src@pyasl@asl@inTransit.py@.PATH_END.py |
{
"filename": "_reversescale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnel/marker/_reversescale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="reversescale", parent_name="funnel.marker", **kwargs
):
super(ReversescaleValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnel@marker@_reversescale.py@.PATH_END.py |
{
"filename": "astroMassDistribution.py",
"repo_name": "CosmoStatGW/MGCosmoPop",
"repo_path": "MGCosmoPop_extracted/MGCosmoPop-master/MGCosmoPop/population/astro/astroMassDistribution.py",
"type": "Python"
} | #!/usr/bin/env python3
# Copyright (c) 2021 Michele Mancarella <michele.mancarella@unige.ch>
#
# All rights reserved. Use of this source code is governed by a modified BSD
# license that can be found in the LICENSE file.
from ..ABSpopulation import BBHDistFunction
import numpy as np
import scipy.stats as ss
f... | CosmoStatGWREPO_NAMEMGCosmoPopPATH_START.@MGCosmoPop_extracted@MGCosmoPop-master@MGCosmoPop@population@astro@astroMassDistribution.py@.PATH_END.py |
{
"filename": "fit_7dq2.py",
"repo_name": "vijayvarma392/surfinBH",
"repo_path": "surfinBH_extracted/surfinBH-master/surfinBH/_fit_evaluators/fit_7dq2.py",
"type": "Python"
} | import numpy as np
from surfinBH import surfinBH
from surfinBH._lal_spin_evolution import evolve_pn_spins
import surfinBH._utils as utils
import warnings
#=============================================================================
class Fit7dq2(surfinBH.SurFinBH):
""" A class for the surfinBH7dq2 model presented... | vijayvarma392REPO_NAMEsurfinBHPATH_START.@surfinBH_extracted@surfinBH-master@surfinBH@_fit_evaluators@fit_7dq2.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "ejhigson/nestcheck",
"repo_path": "nestcheck_extracted/nestcheck-master/README.md",
"type": "Markdown"
} | nestcheck
=========
_______________________________________
.---.__ / \
/ /6|__\ --= Check your nest(ed sampling results)! |
\ \/--` \_______________________________________/
/ \\
/ )\
... | ejhigsonREPO_NAMEnestcheckPATH_START.@nestcheck_extracted@nestcheck-master@README.md@.PATH_END.py |
{
"filename": "_xsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/_xsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="xsrc", parent_name="scatter", **kwargs):
super(XsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@_xsrc.py@.PATH_END.py |
{
"filename": "ms_sink_provider.py",
"repo_name": "ratt-ru/montblanc",
"repo_path": "montblanc_extracted/montblanc-master/montblanc/impl/rime/tensorflow/sinks/ms_sink_provider.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015 Simon Perkins
#
# This file is part of montblanc.
#
# This program 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 2 of the L... | ratt-ruREPO_NAMEmontblancPATH_START.@montblanc_extracted@montblanc-master@montblanc@impl@rime@tensorflow@sinks@ms_sink_provider.py@.PATH_END.py |
{
"filename": "_pullsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/pie/_pullsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class PullsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="pullsrc", parent_name="pie", **kwargs):
super(PullsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@pie@_pullsrc.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "cajohare/NeutrinoFog",
"repo_path": "NeutrinoFog_extracted/NeutrinoFog-main/src/__init__.py",
"type": "Python"
} | __all__ = ["Params","LabFuncs","WIMPFuncs","NeutrinoFuncs","PlotFuncs","Like"]
| cajohareREPO_NAMENeutrinoFogPATH_START.@NeutrinoFog_extracted@NeutrinoFog-main@src@__init__.py@.PATH_END.py |
{
"filename": "augmentation-args.md",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/docs/en/macros/augmentation-args.md",
"type": "Markdown"
} | | Argument | Type | Default | Range | Description |
| ----------------- | ------- | ------------- | ------------- | --------------------... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@macros@augmentation-args.md@.PATH_END.py |
{
"filename": "cuda_lu_pivots_to_permutation.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/jax/_src/internal_test_util/export_back_compat_test_data/cuda_lu_pivots_to_permutation.py",
"type": "Python"
} | # Copyright 2024 The JAX Authors.
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@internal_test_util@export_back_compat_test_data@cuda_lu_pivots_to_permutation.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "orlox/mesa_input_data",
"repo_path": "mesa_input_data_extracted/mesa_input_data-master/2016_binary_models/mesa-23.7.3-update/README.md",
"type": "Markdown"
} | # 2016 binary models
**MESA version: 22.11.1**
This is an update to the files to run them on version 22.11.1.
The section on opacity tables and nets (2 and 3) are unchanged, for those the files
on the upper directory should be used.
To easily download these files, simply use
```
svn export https://github.com/orlox/me... | orloxREPO_NAMEmesa_input_dataPATH_START.@mesa_input_data_extracted@mesa_input_data-master@2016_binary_models@mesa-23.7.3-update@README.md@.PATH_END.py |
{
"filename": "copy.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/copy.py",
"type": "Python"
} | """Generic (shallow and deep) copying operations.
Interface summary:
import copy
x = copy.copy(y) # make a shallow copy of y
x = copy.deepcopy(y) # make a deep copy of y
For module specific errors, copy.Error is raised.
The difference between shallow and deep copying is only relev... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@copy.py@.PATH_END.py |
{
"filename": "subch_res_compare.py",
"repo_name": "AMReX-Astro/Castro",
"repo_path": "Castro_extracted/Castro-main/Exec/science/subchandra/analysis/subch_res_compare.py",
"type": "Python"
} | #!/usr/bin/env python3
import argparse
import os
import sys
from functools import reduce
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.axes_grid1 import ImageGrid
import yt
from yt.fields.derived_field import ValidateSpatial
from yt.frontends.boxlib.api import CastroDataset
f... | AMReX-AstroREPO_NAMECastroPATH_START.@Castro_extracted@Castro-main@Exec@science@subchandra@analysis@subch_res_compare.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/pyzmq/py2/zmq/tests/__init__.py",
"type": "Python"
} | # Copyright (c) PyZMQ Developers.
# Distributed under the terms of the Modified BSD License.
import sys
import time
from threading import Thread
from unittest import TestCase
try:
from unittest import SkipTest
except ImportError:
from unittest2 import SkipTest
from pytest import mark
import zmq
from zmq.util... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pyzmq@py2@zmq@tests@__init__.py@.PATH_END.py |
{
"filename": "_thickness.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/treemap/pathbar/_thickness.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="thickness", parent_name="treemap.pathbar", **kwargs
):
super(ThicknessValidator, self).__init__(
plotly_name=plotly_name,
parent_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@treemap@pathbar@_thickness.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "psheehan/pdspy",
"repo_path": "pdspy_extracted/pdspy-master/pdspy/spectroscopy/__init__.py",
"type": "Python"
} | from .spectroscopy import Spectrum
from .find_lines import find_lines
from .line_flux import line_flux
from .read_spectrum import read_spectrum
from .btsettl_photometry import btsettl_photometry
from .freefree import freefree
| psheehanREPO_NAMEpdspyPATH_START.@pdspy_extracted@pdspy-master@pdspy@spectroscopy@__init__.py@.PATH_END.py |
{
"filename": "test_subclass.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/arrays/categorical/test_subclass.py",
"type": "Python"
} | from pandas import Categorical
import pandas._testing as tm
class SubclassedCategorical(Categorical):
pass
class TestCategoricalSubclassing:
def test_constructor(self):
sc = SubclassedCategorical(["a", "b", "c"])
assert isinstance(sc, SubclassedCategorical)
tm.assert_categorical_equa... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@arrays@categorical@test_subclass.py@.PATH_END.py |
{
"filename": "predefined_types.py",
"repo_name": "itseez/opencv",
"repo_path": "opencv_extracted/opencv-master/modules/python/src2/typing_stubs_generation/predefined_types.py",
"type": "Python"
} | from .nodes.type_node import (
AliasTypeNode, AliasRefTypeNode, PrimitiveTypeNode,
ASTNodeTypeNode, NDArrayTypeNode, NoneTypeNode, SequenceTypeNode,
TupleTypeNode, UnionTypeNode, AnyTypeNode, ConditionalAliasTypeNode
)
# Set of predefined types used to cover cases when library doesn't
# directly exports a ... | itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@modules@python@src2@typing_stubs_generation@predefined_types.py@.PATH_END.py |
{
"filename": "test_webhook.py",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/crossbar/bridge/rest/test/test_webhook.py",
"type": "Python"
} | #####################################################################################
#
# Copyright (c) typedef int GmbH
# SPDX-License-Identifier: EUPL-1.2
#
#####################################################################################
import json
from twisted.internet.defer import inlineCallbacks
from cr... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@bridge@rest@test@test_webhook.py@.PATH_END.py |
{
"filename": "basedatatypes.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/basedatatypes.py",
"type": "Python"
} | import collections
from collections import OrderedDict
import re
import warnings
from contextlib import contextmanager
from copy import deepcopy, copy
import itertools
from functools import reduce
from _plotly_utils.utils import (
_natural_sort_strings,
_get_int_type,
split_multichar,
split_string_posi... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@basedatatypes.py@.PATH_END.py |
{
"filename": "confidence_intervals_bck.py",
"repo_name": "lucaborsato/trades",
"repo_path": "trades_extracted/trades-master/pytrades/to_be_discarded/confidence_intervals_bck.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# no more "zero" integer division bugs!:P
from pytrades_lib import f90trades
import ancillary as anc
import constants as cst # local constants module
import sys
# import argparse
# import time
import os
import numpy as np # array
import h5py
# import glob
# ============... | lucaborsatoREPO_NAMEtradesPATH_START.@trades_extracted@trades-master@pytrades@to_be_discarded@confidence_intervals_bck.py@.PATH_END.py |
{
"filename": "boss_qsos_figs.py",
"repo_name": "desihub/desisim",
"repo_path": "desisim_extracted/desisim-main/py/desisim/qso_template/boss_qsos_figs.py",
"type": "Python"
} | """
#;+
#; NAME:
#; boss_qso_figs
#; Version 1.0
#;
#; PURPOSE:
#; Module for making figures with the BOSS QSO fit outpus
#; 02-Dec-2014 by JXP
#;-
#;------------------------------------------------------------------------------
"""
from __future__ import print_function, absolute_import, division
import numpy ... | desihubREPO_NAMEdesisimPATH_START.@desisim_extracted@desisim-main@py@desisim@qso_template@boss_qsos_figs.py@.PATH_END.py |
{
"filename": "_z.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/projection/_z.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ZValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="z", parent_name="scatter3d.projection", **kwargs):
super(ZValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
d... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@projection@_z.py@.PATH_END.py |
{
"filename": "_cauto.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/line/_cauto.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CautoValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="cauto", parent_name="scatter3d.line", **kwargs):
super(CautoValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@line@_cauto.py@.PATH_END.py |
{
"filename": "detection.py",
"repo_name": "LSSTDESC/BlendingToolKit",
"repo_path": "BlendingToolKit_extracted/BlendingToolKit-main/btk/metrics/detection.py",
"type": "Python"
} | """Implementation of detection metrics."""
from typing import Dict
import numpy as np
from btk.metrics.base import Metric
from btk.metrics.utils import effmat
class DetectionMetric(Metric):
"""Base class for detection metrics."""
def _get_data(
self, n_matches: np.ndarray, n_true: np.ndarray, n_pr... | LSSTDESCREPO_NAMEBlendingToolKitPATH_START.@BlendingToolKit_extracted@BlendingToolKit-main@btk@metrics@detection.py@.PATH_END.py |
{
"filename": "_shadowsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/streamtube/hoverlabel/font/_shadowsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="shadowsrc",
parent_name="streamtube.hoverlabel.font",
**kwargs,
):
super(ShadowsrcValidator, self).__init__(
plotly_name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@streamtube@hoverlabel@font@_shadowsrc.py@.PATH_END.py |
{
"filename": "_linepositionsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/hoverlabel/font/_linepositionsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="linepositionsrc",
parent_name="scatter3d.hoverlabel.font",
**kwargs,
):
super(LinepositionsrcValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@hoverlabel@font@_linepositionsrc.py@.PATH_END.py |
{
"filename": "base_experiment.py",
"repo_name": "freelunchtheorem/Conditional_Density_Estimation",
"repo_path": "Conditional_Density_Estimation_extracted/Conditional_Density_Estimation-master/cde/evaluation/simulation_eval/base_experiment.py",
"type": "Python"
} | import argparse
from cde.model_fitting.ConfigRunner import ConfigRunner
from cde.model_fitting.ConfigRunnerLogProb import ConfigRunnerLogProb
RESULTS_FILE = 'results.pkl'
KEYS_OF_INTEREST = [
'task_name', 'estimator', 'simulator', 'n_observations', 'center_sampling_method', 'x_noise_std',
'y_noise_std', 'nd... | freelunchtheoremREPO_NAMEConditional_Density_EstimationPATH_START.@Conditional_Density_Estimation_extracted@Conditional_Density_Estimation-master@cde@evaluation@simulation_eval@base_experiment.py@.PATH_END.py |
{
"filename": "_bgcolorsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/hoverlabel/_bgcolorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="bgcolorsrc", parent_name="funnel.hoverlabel", **kwargs
):
super(BgcolorsrcValidator, self).__init__(
plotly_name=plotly_name,
paren... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@hoverlabel@_bgcolorsrc.py@.PATH_END.py |
{
"filename": "_tick0.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/splom/marker/colorbar/_tick0.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class Tick0Validator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self, plotly_name="tick0", parent_name="splom.marker.colorbar", **kwargs
):
super(Tick0Validator, self).__init__(
plotly_name=plotly_name,
parent_name=pare... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@splom@marker@colorbar@_tick0.py@.PATH_END.py |
{
"filename": "_angleref.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/marker/_angleref.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AnglerefValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="angleref", parent_name="scatter.marker", **kwargs):
super(AnglerefValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@marker@_angleref.py@.PATH_END.py |
{
"filename": "cross_validate_sun.py",
"repo_name": "andycasey/ges-idr5",
"repo_path": "ges-idr5_extracted/ges-idr5-master/cross_validate_sun.py",
"type": "Python"
} |
"""
Cross-validate ensemble model on the sun.
"""
import yaml
import logging
import os
import matplotlib.pyplot as plt
import numpy as np
from glob import glob
from code import (GESDatabase, plot, summary)
from astropy.table import Table
# Initialize logging.
logger = logging.getLogger("ges.idr5.qc")
logger.setLeve... | andycaseyREPO_NAMEges-idr5PATH_START.@ges-idr5_extracted@ges-idr5-master@cross_validate_sun.py@.PATH_END.py |
{
"filename": "cosmology.py",
"repo_name": "JesusTorrado/extrapops",
"repo_path": "extrapops_extracted/extrapops-main/extrapops/cosmology.py",
"type": "Python"
} | """
.. module:: cosmology
:Synopsis: Basic cosmological computations used throughout the code.
:Author: Jesus Torrado (partially based on work with collaborators, see README)
"""
from copy import deepcopy
import numpy as np
from scipy import integrate, interpolate
import extrapops.constants as const
# Values used... | JesusTorradoREPO_NAMEextrapopsPATH_START.@extrapops_extracted@extrapops-main@extrapops@cosmology.py@.PATH_END.py |
{
"filename": "_yaxis.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/_yaxis.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(self, plotly_name="yaxis", parent_name="funnel", **kwargs):
super(YaxisValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
df... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@_yaxis.py@.PATH_END.py |
{
"filename": "test_system.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/tests/blocks/test_system.py",
"type": "Python"
} | import pendulum
import pytest
from pydantic import Secret as PydanticSecret
from pydantic import SecretStr
from pydantic_extra_types.pendulum_dt import DateTime as PydanticDateTime
from prefect.blocks.system import DateTime, Secret
def test_datetime(ignore_prefect_deprecation_warnings):
DateTime(value=PydanticDa... | PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@blocks@test_system.py@.PATH_END.py |
{
"filename": "_tickformatstop.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/scatterternary/marker/colorbar/_tickformatstop.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Tickformatstop(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatterternary.marker.colorbar"
_path_str = "scatterternary.marker.colorbar.tickformatst... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@scatterternary@marker@colorbar@_tickformatstop.py@.PATH_END.py |
{
"filename": "install_lib.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/setuptools/command/install_lib.py",
"type": "Python"
} | import os
import imp
from itertools import product, starmap
import distutils.command.install_lib as orig
class install_lib(orig.install_lib):
"""Don't add compiled flags to filenames of non-Python files"""
def run(self):
self.build()
outfiles = self.install()
if outfiles is not None:
... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@setuptools@command@install_lib.py@.PATH_END.py |
{
"filename": "file.py",
"repo_name": "hera-team/librarian",
"repo_path": "librarian_extracted/librarian-main/librarian_server/file.py",
"type": "Python"
} | # Copyright 2016-2017 the HERA Collaboration
# Licensed under the BSD License.
"Files."
__all__ = str(
"""
File
FileInstance
FileEvent
"""
).split()
import datetime
import json
import os.path
import sys
from flask import flash, redirect, render_template, url_for
from sqlalchemy.engine.row import Row
from sqlalc... | hera-teamREPO_NAMElibrarianPATH_START.@librarian_extracted@librarian-main@librarian_server@file.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "ahadjigeorghiou/TESSPositionalProbability",
"repo_path": "TESSPositionalProbability_extracted/TESSPositionalProbability-master/CandidateSet/__init__.py",
"type": "Python"
} | ahadjigeorghiouREPO_NAMETESSPositionalProbabilityPATH_START.@TESSPositionalProbability_extracted@TESSPositionalProbability-master@CandidateSet@__init__.py@.PATH_END.py | |
{
"filename": "__init__.py",
"repo_name": "simonsobs/apluggy",
"repo_path": "apluggy_extracted/apluggy-main/tests/__init__.py",
"type": "Python"
} | simonsobsREPO_NAMEapluggyPATH_START.@apluggy_extracted@apluggy-main@tests@__init__.py@.PATH_END.py | |
{
"filename": "toktest.py",
"repo_name": "hgrecco/pint",
"repo_path": "pint_extracted/pint-master/pint/toktest.py",
"type": "Python"
} | from __future__ import annotations
import tokenize
from pint.pint_eval import _plain_tokenizer, uncertainty_tokenizer
tokenizer = _plain_tokenizer
input_lines = [
"( 8.0 + / - 4.0 ) e6 m",
"( 8.0 ± 4.0 ) e6 m",
"( 8.0 + / - 4.0 ) e-6 m",
"( nan + / - 0 ) e6 m",
"( nan ± 4.0 ) m",
"8.0 + / - ... | hgreccoREPO_NAMEpintPATH_START.@pint_extracted@pint-master@pint@toktest.py@.PATH_END.py |
{
"filename": "_title.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/volume/colorbar/_title.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TitleValidator(_plotly_utils.basevalidators.TitleValidator):
def __init__(self, plotly_name="title", parent_name="volume.colorbar", **kwargs):
super(TitleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@volume@colorbar@_title.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "KeplerGO/PyKE",
"repo_path": "PyKE_extracted/PyKE-master/setup.py",
"type": "Python"
} | #!/usr/bin/env python
import os
import sys
from setuptools import setup
# Prepare and send a new release to PyPI
if "release" in sys.argv[-1]:
os.system("python setup.py sdist")
os.system("twine upload dist/*")
os.system("rm -rf dist/pyketools*")
sys.exit()
# Load the __version__ variable without imp... | KeplerGOREPO_NAMEPyKEPATH_START.@PyKE_extracted@PyKE-master@setup.py@.PATH_END.py |
{
"filename": "_lineposition.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contourcarpet/colorbar/tickfont/_lineposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator):
def __init__(
self,
plotly_name="lineposition",
parent_name="contourcarpet.colorbar.tickfont",
**kwargs,
):
super(LinepositionValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contourcarpet@colorbar@tickfont@_lineposition.py@.PATH_END.py |
{
"filename": "test_flatfield.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/flatfield/tests/test_flatfield.py",
"type": "Python"
} | import pytest
import numpy as np
from astropy.io import fits
from astropy.table import Table
from stdatamodels.jwst import datamodels
from jwst.assign_wcs import AssignWcsStep
from jwst.assign_wcs.tests.test_nirspec import create_nirspec_ifu_file
from jwst.flatfield import FlatFieldStep
from jwst.flatfield.flat_field... | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@flatfield@tests@test_flatfield.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py2/IPython/sphinxext/__init__.py",
"type": "Python"
} | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py2@IPython@sphinxext@__init__.py@.PATH_END.py | |
{
"filename": "Globals.py",
"repo_name": "CosmoStatGW/MGCosmoPop",
"repo_path": "MGCosmoPop_extracted/MGCosmoPop-master/MGCosmoPop/Globals.py",
"type": "Python"
} |
import os
#dirName = os.path.join( os.path.dirname(os.path.abspath(__file__)), '..' )
dirName = os.path.dirname( os.path.dirname(os.path.abspath(__file__)))
#print('Directory: %s' %dirName)
dataPath=os.path.join(dirName, 'data')
#print('Data Directory: %s' %dataPath)
detectorPath=os.path.join(dataPath, 'detectors'... | CosmoStatGWREPO_NAMEMGCosmoPopPATH_START.@MGCosmoPop_extracted@MGCosmoPop-master@MGCosmoPop@Globals.py@.PATH_END.py |
{
"filename": "question5_regularisation_MDN.py",
"repo_name": "freelunchtheorem/Conditional_Density_Estimation",
"repo_path": "Conditional_Density_Estimation_extracted/Conditional_Density_Estimation-master/cde/evaluation/simulation_eval/question5_regularisation_MDN.py",
"type": "Python"
} | import matplotlib as mpl
mpl.use("PS") # handles X11 server detection (required to run on console)
import numpy as np
from cde.model_fitting.GoodnessOfFitResults import GoodnessOfFitResults
from cde.evaluation.simulation_eval import base_experiment
from ml_logger import logger
EXP_PREFIX = 'question5_regularisation_... | freelunchtheoremREPO_NAMEConditional_Density_EstimationPATH_START.@Conditional_Density_Estimation_extracted@Conditional_Density_Estimation-master@cde@evaluation@simulation_eval@question5_regularisation_MDN.py@.PATH_END.py |
{
"filename": "test_from_hub.py",
"repo_name": "mwalmsley/zoobot",
"repo_path": "zoobot_extracted/zoobot-main/tests/test_from_hub.py",
"type": "Python"
} | import pytest
import timm
import torch
def test_get_encoder():
model = timm.create_model("hf_hub:mwalmsley/zoobot-encoder-efficientnet_b0", pretrained=True)
assert model(torch.rand(1, 3, 224, 224)).shape == (1, 1280)
def test_get_finetuned():
# checkpoint_loc = 'https://huggingface.co/mwalmsley/zoobot-... | mwalmsleyREPO_NAMEzoobotPATH_START.@zoobot_extracted@zoobot-main@tests@test_from_hub.py@.PATH_END.py |
{
"filename": "source_tests.py",
"repo_name": "swagnercarena/paltas",
"repo_path": "paltas_extracted/paltas-main/test/source_tests.py",
"type": "Python"
} | import numpy as np
import unittest
import os
from paltas.Sources.source_base import SourceBase
from paltas.Sources.sersic import SingleSersicSource, DoubleSersicData
from paltas.Sources.galaxy_catalog import GalaxyCatalog
from paltas.Sources.cosmos import COSMOSCatalog, COSMOSSersicCatalog, unfits
from paltas.Sources.c... | swagnercarenaREPO_NAMEpaltasPATH_START.@paltas_extracted@paltas-main@test@source_tests.py@.PATH_END.py |
{
"filename": "pull_request_template.md",
"repo_name": "danieljprice/phantom",
"repo_path": "phantom_extracted/phantom-master/.github/pull_request_template.md",
"type": "Markdown"
} | Type of PR:
Bug fix / new physics / modification to existing code / other
Description:
Give a short description of the change.
Testing:
Describe how you have tested the change
Did you run the bots? yes/no
Did you update relevant documentation in the docs directory? yes/no | danieljpriceREPO_NAMEphantomPATH_START.@phantom_extracted@phantom-master@.github@pull_request_template.md@.PATH_END.py |
{
"filename": "ex-2.32.py",
"repo_name": "mpi4py/mpi4py",
"repo_path": "mpi4py_extracted/mpi4py-master/demo/mpi-ref-v1/ex-2.32.py",
"type": "Python"
} | # Jacobi computation, using persistent requests
from mpi4py import MPI
try:
import numpy
except ImportError:
raise SystemExit
n = 5 * MPI.COMM_WORLD.Get_size()
# compute number of processes and myrank
p = MPI.COMM_WORLD.Get_size()
myrank = MPI.COMM_WORLD.Get_rank()
# compute size of local block
m = n//p
if... | mpi4pyREPO_NAMEmpi4pyPATH_START.@mpi4py_extracted@mpi4py-master@demo@mpi-ref-v1@ex-2.32.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/sparse/__init__.py",
"type": "Python"
} | """
=====================================
Sparse matrices (:mod:`scipy.sparse`)
=====================================
.. currentmodule:: scipy.sparse
SciPy 2-D sparse matrix package for numeric data.
Contents
========
Sparse matrix classes
---------------------
.. autosummary::
:toctree: generated/
bsr_matr... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@sparse@__init__.py@.PATH_END.py |
{
"filename": "_lineposition.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/annotation/font/_lineposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator):
def __init__(
self,
plotly_name="lineposition",
parent_name="layout.scene.annotation.font",
**kwargs,
):
super(LinepositionValidator, self).__init__(
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@annotation@font@_lineposition.py@.PATH_END.py |
{
"filename": "cifar.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/datasets/cifar.py",
"type": "Python"
} | """Utilities common to CIFAR10 and CIFAR100 datasets."""
import _pickle as cPickle
def load_batch(fpath, label_key="labels"):
"""Internal utility for parsing CIFAR data.
Args:
fpath: path the file to parse.
label_key: key for label data in the retrieve
dictionary.
Returns:
... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@datasets@cifar.py@.PATH_END.py |
{
"filename": "_numpy_testing_noseclasses.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py2/IPython/external/decorators/_numpy_testing_noseclasses.py",
"type": "Python"
} | # IPython: modified copy of numpy.testing.noseclasses, so
# IPython.external._decorators works without numpy being installed.
# These classes implement a "known failure" error class.
import os
from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin
class KnownFailureTest(Exception):
'''Raise this excep... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py2@IPython@external@decorators@_numpy_testing_noseclasses.py@.PATH_END.py |
{
"filename": "test_chemical_formulas.py",
"repo_name": "rennehan/yt-swift",
"repo_path": "yt-swift_extracted/yt-swift-main/yt/utilities/tests/test_chemical_formulas.py",
"type": "Python"
} | from numpy.testing import assert_allclose, assert_equal
from yt.utilities.chemical_formulas import ChemicalFormula, compute_mu
from yt.utilities.periodic_table import periodic_table
_molecules = (
("H2O_p1", (("H", 2), ("O", 1)), 1),
("H2O_m1", (("H", 2), ("O", 1)), -1),
("H2O", (("H", 2), ("O", 1)), 0),
... | rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@utilities@tests@test_chemical_formulas.py@.PATH_END.py |
{
"filename": "_colorscale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/marker/line/_colorscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator):
def __init__(
self, plotly_name="colorscale", parent_name="funnel.marker.line", **kwargs
):
super(ColorscaleValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@marker@line@_colorscale.py@.PATH_END.py |
{
"filename": "myscale.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/vectorstores/myscale.ipynb",
"type": "Jupyter Notebook"
} | # MyScale
>[MyScale](https://docs.myscale.com/en/overview/) is a cloud-based database optimized for AI applications and solutions, built on the open-source [ClickHouse](https://github.com/ClickHouse/ClickHouse).
This notebook shows how to use functionality related to the `MyScale` vector database.
## Setting up env... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@vectorstores@myscale.ipynb@.PATH_END.py |
{
"filename": "test__datasource.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/lib/tests/test__datasource.py",
"type": "Python"
} | import os
import pytest
from tempfile import mkdtemp, mkstemp, NamedTemporaryFile
from shutil import rmtree
import numpy.lib._datasource as datasource
from numpy.testing import assert_, assert_equal, assert_raises
import urllib.request as urllib_request
from urllib.parse import urlparse
from urllib.error import URLEr... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@lib@tests@test__datasource.py@.PATH_END.py |
{
"filename": "bm25.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/retrievers/bm25.ipynb",
"type": "Jupyter Notebook"
} | # BM25
>[BM25 (Wikipedia)](https://en.wikipedia.org/wiki/Okapi_BM25) also known as the `Okapi BM25`, is a ranking function used in information retrieval systems to estimate the relevance of documents to a given search query.
>
>`BM25Retriever` retriever uses the [`rank_bm25`](https://github.com/dorianbrown/rank_bm25) ... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@retrievers@bm25.ipynb@.PATH_END.py |
{
"filename": "widgets.py",
"repo_name": "scalessim/scalessim",
"repo_path": "scalessim_extracted/scalessim-main/scalessim/widgets.py",
"type": "Python"
} | import ipywidgets as widgets
def mode_select(start=0):
opts=['SED: 2.0-5.2', 'K: 1.95-2.45','L: 2.9-4.15','M: 4.5-5.2', 'H2O: 2.0-3.7','CH4: 3.1-3.5']
scalesmode=widgets.Dropdown(
options=opts,
value=opts[start],
description='Mode:',
disabled=False,
)
return scalesmode
... | scalessimREPO_NAMEscalessimPATH_START.@scalessim_extracted@scalessim-main@scalessim@widgets.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.