metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "feature_request.md", "repo_name": "smirik/resonances", "repo_path": "resonances_extracted/resonances-main/.github/ISSUE_TEMPLATE/feature_request.md", "type": "Markdown" }
--- name: Feature request about: Suggest an idea for this project title: '' labels: '' assignees: '' --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and con...
smirikREPO_NAMEresonancesPATH_START.@resonances_extracted@resonances-main@.github@ISSUE_TEMPLATE@feature_request.md@.PATH_END.py
{ "filename": "_open.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/ohlc/_open.py", "type": "Python" }
import _plotly_utils.basevalidators class OpenValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="open", parent_name="ohlc", **kwargs): super(OpenValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_ty...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@ohlc@_open.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/indicator/stream/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._token import TokenValidator from ._maxpoints import MaxpointsValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@indicator@stream@__init__.py@.PATH_END.py
{ "filename": "flavor_transformation.py", "repo_name": "SNEWS2/snewpy", "repo_path": "snewpy_extracted/snewpy-main/python/snewpy/flavor_transformation.py", "type": "Python" }
# -*- coding: utf-8 -*- """Supernova oscillation physics for flavors e, X, e-bar, X-bar. For measured mixing angles and latest global analysis results, visit http://www.nu-fit.org/. """ from abc import abstractmethod, ABC import numpy as np from astropy import units as u from astropy import constants as c from .neu...
SNEWS2REPO_NAMEsnewpyPATH_START.@snewpy_extracted@snewpy-main@python@snewpy@flavor_transformation.py@.PATH_END.py
{ "filename": "test_base.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/partners/openai/tests/integration_tests/embeddings/test_base.py", "type": "Python" }
"""Test OpenAI embeddings.""" import numpy as np import openai from langchain_openai.embeddings.base import OpenAIEmbeddings def test_langchain_openai_embedding_documents() -> None: """Test openai embeddings.""" documents = ["foo bar"] embedding = OpenAIEmbeddings() output = embedding.embed_document...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@partners@openai@tests@integration_tests@embeddings@test_base.py@.PATH_END.py
{ "filename": "test_dataset.py", "repo_name": "n-claes/legolas", "repo_path": "legolas_extracted/legolas-master/tests/pylbo_tests/test_dataset.py", "type": "Python" }
import numpy as np import pytest from pylbo.exceptions import BackgroundNotPresent, MatricesNotPresent ds_v112_ev_guess = -0.14360602 + 0.00688731j ds_v112_ev_idx = 158 def test_ds_iterable(ds_v112): gen = [i for i in ds_v112] assert len(gen) == 1 assert gen.pop() == ds_v112 def test_ds_has_efs(ds_v112...
n-claesREPO_NAMElegolasPATH_START.@legolas_extracted@legolas-master@tests@pylbo_tests@test_dataset.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "aneeshnaik/spam", "repo_path": "spam_extracted/spam-master/data/__init__.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created: 2018 Author: A. P. Naik Description: 'data' submodule of spam package. See README for details and usage examples. Attributes ---------- SPARCGalaxy : class Main object containing all relevant data for each SPARC galaxy. names_full : list of strings, lengt...
aneeshnaikREPO_NAMEspamPATH_START.@spam_extracted@spam-master@data@__init__.py@.PATH_END.py
{ "filename": "finite_diff.py", "repo_name": "neuraloperator/neuraloperator", "repo_path": "neuraloperator_extracted/neuraloperator-main/neuralop/losses/finite_diff.py", "type": "Python" }
import torch """ finite_diff.py implements utilities for computing derivatives via finite-difference method """ #Set fix{x,y,z}_bnd if function is non-periodic in {x,y,z} direction #x: (*, s) #y: (*, s) def central_diff_1d(x, h, fix_x_bnd=False): """central_diff_1d computes the first spatial derivative of x us...
neuraloperatorREPO_NAMEneuraloperatorPATH_START.@neuraloperator_extracted@neuraloperator-main@neuralop@losses@finite_diff.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "clwainwright/CosmoTransitions", "repo_path": "CosmoTransitions_extracted/CosmoTransitions-master/cosmoTransitions/__init__.py", "type": "Python" }
__version__ = "2.0.2"
clwainwrightREPO_NAMECosmoTransitionsPATH_START.@CosmoTransitions_extracted@CosmoTransitions-master@cosmoTransitions@__init__.py@.PATH_END.py
{ "filename": "representation.py", "repo_name": "astro-informatics/s2scat", "repo_path": "s2scat_extracted/s2scat-main/s2scat/representation.py", "type": "Python" }
from jax import jit import jax.numpy as jnp from functools import partial from typing import List import s2wav from s2scat.utility import statistics, reorder, normalisation from s2scat.operators import spherical from s2scat import compression @partial(jit, static_argnums=(1, 2, 3, 4, 7, 8, 9)) def scatter( flm: j...
astro-informaticsREPO_NAMEs2scatPATH_START.@s2scat_extracted@s2scat-main@s2scat@representation.py@.PATH_END.py
{ "filename": "_subunitwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/geo/_subunitwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class SubunitwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="subunitwidth", parent_name="layout.geo", **kwargs): super(SubunitwidthValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@geo@_subunitwidth.py@.PATH_END.py
{ "filename": "analysis_test_matiasfile_18092020.py", "repo_name": "kumikokotera/GRAND_tools", "repo_path": "GRAND_tools_extracted/GRAND_tools-master/grid_shape/tools/analysis_test_matiasfile_18092020.py", "type": "Python" }
import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.colors import LogNorm import numpy as np import os import json from grid_shape import diff_spec as diff_spec from grid_shape import grids as grids from grid_shape import utils_analysis as ua from grid_shape import layout as layout from ...
kumikokoteraREPO_NAMEGRAND_toolsPATH_START.@GRAND_tools_extracted@GRAND_tools-master@grid_shape@tools@analysis_test_matiasfile_18092020.py@.PATH_END.py
{ "filename": "T01test_python_vs_cpp.py", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioMC/test/SignalProp/T01test_python_vs_cpp.py", "type": "Python" }
import matplotlib.pyplot as plt import numpy as np import time from NuRadioMC.SignalProp import analyticraytracing as ray from NuRadioMC.utilities import medium from NuRadioReco.utilities import units import logging from numpy import testing logging.basicConfig(level=logging.INFO) logger = logging.getLogger('test_raytr...
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioMC@test@SignalProp@T01test_python_vs_cpp.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "gammapy/gammapy", "repo_path": "gammapy_extracted/gammapy-main/gammapy/maps/region/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst from .geom import RegionGeom from .ndmap import RegionNDMap __all__ = [ "RegionGeom", "RegionNDMap", ]
gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@maps@region@__init__.py@.PATH_END.py
{ "filename": "anatomy.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/showcase/anatomy.py", "type": "Python" }
""" =================== Anatomy of a figure =================== This figure shows the name of several matplotlib elements composing a figure """ import matplotlib.pyplot as plt import numpy as np from matplotlib.patches import Circle from matplotlib.patheffects import withStroke from matplotlib.ticker import AutoMi...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@showcase@anatomy.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "maayane/catsHTM", "repo_path": "catsHTM_extracted/catsHTM-master/build/lib/catsHTM/__init__.py", "type": "Python" }
__version__='0.1.16' from .script import * #import all functions from the __all__ in script.py, the moment you do import catsHTM
maayaneREPO_NAMEcatsHTMPATH_START.@catsHTM_extracted@catsHTM-master@build@lib@catsHTM@__init__.py@.PATH_END.py
{ "filename": "errors.py", "repo_name": "plazar/coast_guard", "repo_path": "coast_guard_extracted/coast_guard-master/errors.py", "type": "Python" }
""" This file contains custom errors and warnings for the CoastGuard timing pipeline. Patrick Lazarus, Nov. 10, 2011 """ import colour import log class CoastGuardError(Exception): def __init__(self, msg, logit=True): if logit: log.log(msg, 'error') super(CoastGuardError, self).__ini...
plazarREPO_NAMEcoast_guardPATH_START.@coast_guard_extracted@coast_guard-master@errors.py@.PATH_END.py
{ "filename": "__main__.py", "repo_name": "NuSpaceSim/nupyprop", "repo_path": "nupyprop_extracted/nupyprop-main/src/nupyprop/__main__.py", "type": "Python" }
import sys if __name__ == "__main__": from nupyprop.scripts.run import main as _main sys.exit(_main())
NuSpaceSimREPO_NAMEnupypropPATH_START.@nupyprop_extracted@nupyprop-main@src@nupyprop@__main__.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/ohlc/legendgrouptitle/_font.py", "type": "Python" }
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="ohlc.legendgrouptitle", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@ohlc@legendgrouptitle@_font.py@.PATH_END.py
{ "filename": "test_orbit_astrometry_triple.py", "repo_name": "iancze/PSOAP", "repo_path": "PSOAP_extracted/PSOAP-master/tests/test_orbit_astrometry_triple.py", "type": "Python" }
import pytest import os import pkg_resources import numpy as np from psoap import orbit_astrometry from psoap import constants as C import matplotlib.pyplot as plt import matplotlib # Create plots of all of the orbits # Create plots of all of the orbits # If it doesn't already exist, create a "plots/basic/" director...
ianczeREPO_NAMEPSOAPPATH_START.@PSOAP_extracted@PSOAP-master@tests@test_orbit_astrometry_triple.py@.PATH_END.py
{ "filename": "event.py", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioReco/framework/event.py", "type": "Python" }
from __future__ import absolute_import, division, print_function import pickle import NuRadioReco.framework.station import NuRadioReco.framework.radio_shower import NuRadioReco.framework.hybrid_information import NuRadioReco.framework.particle import NuRadioReco.framework.parameters as parameters import NuRadioReco.uti...
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioReco@framework@event.py@.PATH_END.py
{ "filename": "sphinx_util.py", "repo_name": "dmlc/xgboost", "repo_path": "xgboost_extracted/xgboost-master/doc/sphinx_util.py", "type": "Python" }
# -*- coding: utf-8 -*- """Helper utility function for customization.""" import os import subprocess import sys READTHEDOCS_BUILD = (os.environ.get('READTHEDOCS', None) is not None) if not os.path.exists('web-data'): subprocess.call('rm -rf web-data;' + 'git clone https://github.com/dmlc/web-data'...
dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@doc@sphinx_util.py@.PATH_END.py
{ "filename": "NestedGridRedistributeNodesInst.cc.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/Distributed/NestedGridRedistributeNodesInst.cc.py", "type": "Python" }
text = """ //------------------------------------------------------------------------------ // Explicit instantiation. //------------------------------------------------------------------------------ #include "Geometry/Dimension.hh" #include "Distributed/NestedGridRedistributeNodes.cc" namespace Spheral { template c...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@Distributed@NestedGridRedistributeNodesInst.cc.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "javicarron/pynkowski", "repo_path": "pynkowski_extracted/pynkowski-main/README.md", "type": "Markdown" }
<img src="logo.png" width="100"> # Pynkowski A Python package to compute Minkowski Functionals and other higher order statistics of input fields, as well as their expected values for different kinds of fields. The **statistics** currently supported by this package are: - Minkowski functionals. - Maxima and minima ...
javicarronREPO_NAMEpynkowskiPATH_START.@pynkowski_extracted@pynkowski-main@README.md@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/textfont/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="size", parent_name="bar.textfont", **kwargs): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ar...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@textfont@_size.py@.PATH_END.py
{ "filename": "targetpixelfile.py", "repo_name": "KeplerGO/lightkurve", "repo_path": "lightkurve_extracted/lightkurve-main/src/lightkurve/targetpixelfile.py", "type": "Python" }
"""Defines TargetPixelFile, KeplerTargetPixelFile, and TessTargetPixelFile.""" from __future__ import division import datetime import os import warnings import logging import collections from astropy.io import fits from astropy.io.fits import Undefined, BinTableHDU from astropy.nddata import Cutout2D from astropy.ta...
KeplerGOREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@src@lightkurve@targetpixelfile.py@.PATH_END.py
{ "filename": "_variantsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattersmith/textfont/_variantsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scattersmith.textfont", **kwargs ): super(VariantsrcValidator, self).__init__( plotly_name=plotly_name, p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattersmith@textfont@_variantsrc.py@.PATH_END.py
{ "filename": "points.md", "repo_name": "RozanskiT/HANDY", "repo_path": "HANDY_extracted/HANDY-master/docs/points.md", "type": "Markdown" }
# HANDY - (Special) Points in normalization process ## Table of Contents * [Home](index.md) * [Install](install.md) * [Basics](basics.md) * [Regions and ranges](regions.md) * [Points](points.md) * [Radial velocity correction](radialVelocity.md) * [Grids](grids.md) ## What are Special Points? Special Po...
RozanskiTREPO_NAMEHANDYPATH_START.@HANDY_extracted@HANDY-master@docs@points.md@.PATH_END.py
{ "filename": "_textposition.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/pie/_textposition.py", "type": "Python" }
import _plotly_utils.basevalidators class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="pie", **kwargs): super(TextpositionValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@pie@_textposition.py@.PATH_END.py
{ "filename": "graph_store.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/graphs/graph_store.py", "type": "Python" }
from abc import abstractmethod from typing import Any, Dict, List from langchain_community.graphs.graph_document import GraphDocument class GraphStore: """Abstract class for graph operations.""" @property @abstractmethod def get_schema(self) -> str: """Return the schema of the Graph database...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@graphs@graph_store.py@.PATH_END.py
{ "filename": "_mathtext_data.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py3/matplotlib/_mathtext_data.py", "type": "Python" }
""" font data tables for truetype and afm computer modern fonts """ from __future__ import annotations latex_to_bakoma = { '\\__sqrt__' : ('cmex10', 0x70), '\\bigcap' : ('cmex10', 0x5c), '\\bigcup' : ('cmex10', 0x5b), '\\bigodot' : ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py3@matplotlib@_mathtext_data.py@.PATH_END.py
{ "filename": "__positron_spectra.py", "repo_name": "LoganAMorrison/Hazma", "repo_path": "Hazma_extracted/Hazma-master/hazma/__positron_spectra.py", "type": "Python" }
""" Module for computing positron spectra. @author: Logan Morrison and Adam Coogan """ from typing import overload, Union, Callable, List, Optional import warnings from hazma.spectra import ( dnde_positron_charged_pion as positron_charged_pion, dnde_positron_muon as positron_muon, ) from hazma._positron.positr...
LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@hazma@__positron_spectra.py@.PATH_END.py
{ "filename": "test_argparse.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/_core/tests/test_argparse.py", "type": "Python" }
""" Tests for the private NumPy argument parsing functionality. They mainly exists to ensure good test coverage without having to try the weirder cases on actual numpy functions but test them in one place. The test function is defined in C to be equivalent to (errors may not always match exactly, and could be adjusted...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@_core@tests@test_argparse.py@.PATH_END.py
{ "filename": "_separatethousands.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmapbox/colorbar/_separatethousands.py", "type": "Python" }
import _plotly_utils.basevalidators class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="choroplethmapbox.colorbar", **kwargs, ): super(SeparatethousandsValidator, self).__init...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmapbox@colorbar@_separatethousands.py@.PATH_END.py
{ "filename": "test_adaptation.py", "repo_name": "blackjax-devs/blackjax", "repo_path": "blackjax_extracted/blackjax-main/tests/adaptation/test_adaptation.py", "type": "Python" }
import jax import jax.numpy as jnp import numpy as np import optax import pytest import blackjax from blackjax.adaptation import window_adaptation from blackjax.adaptation.base import get_filter_adapt_info_fn, return_all_adapt_info from blackjax.util import run_inference_algorithm @pytest.mark.parametrize( "num_...
blackjax-devsREPO_NAMEblackjaxPATH_START.@blackjax_extracted@blackjax-main@tests@adaptation@test_adaptation.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "simonsobs/nextline-rdb", "repo_path": "nextline-rdb_extracted/nextline-rdb-main/src/nextline_rdb/alembic/models/rev_4dc6a93dfed8/__init__.py", "type": "Python" }
__all__ = [ 'NAMING_CONVENTION', 'Model', 'ReprMixin', 'repr_val', 'Hello', 'Run', 'Trace', 'Prompt', 'CurrentScript', 'Script', 'Stdout', ] from .base import NAMING_CONVENTION, Model, ReprMixin, repr_val from .model_hello import Hello from .model_prompt import Prompt from ...
simonsobsREPO_NAMEnextline-rdbPATH_START.@nextline-rdb_extracted@nextline-rdb-main@src@nextline_rdb@alembic@models@rev_4dc6a93dfed8@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "macrocosme/shwirl", "repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/util/fonts/__init__.py", "type": "Python" }
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2015, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -------------------------------------------------------------------------...
macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@util@fonts@__init__.py@.PATH_END.py
{ "filename": "opt_DM.py", "repo_name": "askap-craco/CELEBI", "repo_path": "CELEBI_extracted/CELEBI-main/beamform/opt_DM.py", "type": "Python" }
from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser from dedisperse import dedisperse import numpy as np import matplotlib.pyplot as plt def _main(): args = get_args() X = np.load(args.x) Y = np.load(args.y) DMs = np.arange(args.minDM, args.maxDM+args.DMstep, args.DMstep) peaks = ...
askap-cracoREPO_NAMECELEBIPATH_START.@CELEBI_extracted@CELEBI-main@beamform@opt_DM.py@.PATH_END.py
{ "filename": "test_rbfinterp.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/interpolate/tests/test_rbfinterp.py", "type": "Python" }
import pickle import pytest import numpy as np from numpy.linalg import LinAlgError from scipy._lib._array_api import xp_assert_close from scipy.stats.qmc import Halton from scipy.spatial import cKDTree # type: ignore[attr-defined] from scipy.interpolate._rbfinterp import ( _AVAILABLE, _SCALE_INVARIANT, _NAME_TO_M...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@interpolate@tests@test_rbfinterp.py@.PATH_END.py
{ "filename": "lg4_envs.py", "repo_name": "mit-ll/spacegym-kspdg", "repo_path": "spacegym-kspdg_extracted/spacegym-kspdg-main/src/kspdg/private_src/python3_9/Darwin_arm64/kspdg_envs/lbg1/lg4_envs.py", "type": "Python" }
# Pyarmor 8.5.11 (trial), 000000, non-profits, 2024-12-09T10:19:40.569956 from kspdg.private_src.python3_9.Darwin_arm64.pyarmor_runtime_000000 import __pyarmor__ __pyarmor__(__name__, __file__, b'PY000000\x00\x03\t\x00a\r\r\n\x80\x00\x01\x00\x08\x00\x00\x00\x04\x00\x00\x00@\x00\x00\x00d%\x00\x00\x12\t\x04\x00\xad,Ii}P\...
mit-llREPO_NAMEspacegym-kspdgPATH_START.@spacegym-kspdg_extracted@spacegym-kspdg-main@src@kspdg@private_src@python3_9@Darwin_arm64@kspdg_envs@lbg1@lg4_envs.py@.PATH_END.py
{ "filename": "test_preprocess.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/core/tests/test_preprocess.py", "type": "Python" }
# import os # from copy import deepcopy from itertools import count import os import astrodata from astrodata.testing import ad_compare import gemini_instruments import numpy as np import pytest from astrodata.testing import ad_compare, download_from_archive from geminidr.core.primitives_preprocess import Preprocess ...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@core@tests@test_preprocess.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "geoffryan/afterglowpy", "repo_path": "afterglowpy_extracted/afterglowpy-master/README.md", "type": "Markdown" }
# Numeric GRB Afterglow models A Python 3 module to calculate GRB afterglow light curves and spectra. Details of the methods can be found in [Ryan et al 2020](https://ui.adsabs.harvard.edu/abs/2020ApJ...896..166R/abstract). Builds on [van Eerten & MacFadyen 2010](https://arxiv.org/abs/1006.5125) and [van Eerten 2018](...
geoffryanREPO_NAMEafterglowpyPATH_START.@afterglowpy_extracted@afterglowpy-master@README.md@.PATH_END.py
{ "filename": "multithreading.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/packages/vaex-core/vaex/multithreading.py", "type": "Python" }
# -*- coding: utf-8 -*- from __future__ import division, print_function import asyncio import threading import multiprocessing from warnings import warn import vaex.utils import logging import concurrent.futures import time import vaex.settings from .itertools import buffer logger = logging.getLogger("vaex.multithrea...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-core@vaex@multithreading.py@.PATH_END.py
{ "filename": "models.py", "repo_name": "shaoshanglqy/shap-shapley", "repo_path": "shap-shapley_extracted/shap-shapley-master/shap/benchmark/models.py", "type": "Python" }
import sklearn import sklearn.ensemble import gc from sklearn.preprocessing import StandardScaler class KerasWrap(object): """ A wrapper that allows us to set parameters in the constructor and do a reset before fitting. """ def __init__(self, model, epochs, flatten_output=False): self.model = model...
shaoshanglqyREPO_NAMEshap-shapleyPATH_START.@shap-shapley_extracted@shap-shapley-master@shap@benchmark@models.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/coloraxis/colorbar/title/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._font import Font else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@coloraxis@colorbar@title@__init__.py@.PATH_END.py
{ "filename": "SolverEWDialog.py", "repo_name": "marblestation/iSpec", "repo_path": "iSpec_extracted/iSpec-master/ispec/gui/dialogs/SolverEWDialog.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@dialogs@SolverEWDialog.py@.PATH_END.py
{ "filename": "add_rfi.py", "repo_name": "cosmo-ethz/hide", "repo_path": "hide_extracted/hide-master/hide/plugins/add_rfi.py", "type": "Python" }
# HIDE is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # HIDE is distributed in the hope that it will be useful, # but WITHOUT ANY W...
cosmo-ethzREPO_NAMEhidePATH_START.@hide_extracted@hide-master@hide@plugins@add_rfi.py@.PATH_END.py
{ "filename": "tfstep.py", "repo_name": "hpparvi/opents", "repo_path": "opents_extracted/opents-master/src/tfstep.py", "type": "Python" }
# OpenTS: Open exoplanet transit search pipeline. # Copyright (C) 2015-2020 Hannu Parviainen # # 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 3 of the License, or # (at yo...
hpparviREPO_NAMEopentsPATH_START.@opents_extracted@opents-master@src@tfstep.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "geodynamics/burnman", "repo_path": "burnman_extracted/burnman-main/contrib/CHRU2014/__init__.py", "type": "Python" }
# intentionally left empty
geodynamicsREPO_NAMEburnmanPATH_START.@burnman_extracted@burnman-main@contrib@CHRU2014@__init__.py@.PATH_END.py
{ "filename": "brewster_G395H_template.py", "repo_name": "substellar/brewster", "repo_path": "brewster_extracted/brewster-master/brewster_G395H_template.py", "type": "Python" }
#!/usr/bin/env python """This is Brewster: the golden retriever of smelly atmospheres""" from __future__ import print_function import multiprocessing import time import numpy as np import scipy as sp import emcee import testkit import ciamod import TPmod import settings import os import gc import sys import pickle fr...
substellarREPO_NAMEbrewsterPATH_START.@brewster_extracted@brewster-master@brewster_G395H_template.py@.PATH_END.py
{ "filename": "test_scale.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/robust/tests/test_scale.py", "type": "Python" }
""" Test functions for models.robust.scale """ import os import numpy as np from numpy.random import standard_normal from numpy.testing import assert_almost_equal, assert_equal, assert_allclose import pytest import pandas as pd from scipy.stats import norm as Gaussian from scipy import stats import statsmodels.api...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@robust@tests@test_scale.py@.PATH_END.py
{ "filename": "test_ldp_extended.py", "repo_name": "lwa-project/lsl", "repo_path": "lsl_extracted/lsl-main/tests/test_ldp_extended.py", "type": "Python" }
""" Extended unit test for the lsl.reader.ldp module. """ import os import unittest import tempfile import shutil import subprocess from lsl.reader import ldp from lsl.reader import errors from lsl.reader.utils import SplitFileWrapper from lsl.common.data_access import download_file __version__ = "0.1" __author__ ...
lwa-projectREPO_NAMElslPATH_START.@lsl_extracted@lsl-main@tests@test_ldp_extended.py@.PATH_END.py
{ "filename": "codespaces.md", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/doc/devel/codespaces.md", "type": "Markdown" }
# Contributing to Matplotlib using GitHub codespaces * For a general overview of contributing to Matplotlib, see https://matplotlib.org/devdocs/devel/index.html * For instructions on how to submit Pull Requests using GitHub codespaces, see https://matplotlib.org/devdocs/devel/contribute.html#contributing-code * For ...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@doc@devel@codespaces.md@.PATH_END.py
{ "filename": "python-reference_catboostregressor_grid_search.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/python-reference_catboostregressor_grid_search.md", "type": "Markdown" }
# grid_search {% include [grid_search-grid-search__div__desc](../_includes/work_src/reusage-python/grid-search__div__desc.md) %} ## {{ dl--invoke-format }} {#method-call-format} ```python grid_search(param_grid, X, y=None, cv=3, partition_random_seed=0, ca...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@python-reference_catboostregressor_grid_search.md@.PATH_END.py
{ "filename": "celerite_rotation.py", "repo_name": "LucaMalavolta/PyORBIT", "repo_path": "PyORBIT_extracted/PyORBIT-main/pyorbit/models/celerite_rotation.py", "type": "Python" }
from pyorbit.subroutines.common import np, OrderedSet from pyorbit.models.abstract_model import AbstractModel from pyorbit.keywords_definitions import * try: from pyorbit.models.celerite_term import celerite, SHOTerm except (ModuleNotFoundError,ImportError): pass class Celerite_Rotation(AbstractModel): ...
LucaMalavoltaREPO_NAMEPyORBITPATH_START.@PyORBIT_extracted@PyORBIT-main@pyorbit@models@celerite_rotation.py@.PATH_END.py
{ "filename": "test_martini.py", "repo_name": "kyleaoman/martini", "repo_path": "martini_extracted/martini-main/tests/test_martini.py", "type": "Python" }
import os import pytest import numpy as np from martini.martini import Martini, GlobalProfile, _BaseMartini from martini.datacube import DataCube, HIfreq from martini.beams import GaussianBeam from test_sph_kernels import simple_kernels from martini.sph_kernels import _CubicSplineKernel, _GaussianKernel, DiracDeltaKern...
kyleaomanREPO_NAMEmartiniPATH_START.@martini_extracted@martini-main@tests@test_martini.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="pie.hoverlabel.font", **kwargs ): super(StyleValidator, self).__init__( plotly_name=plotly_name, parent_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@pie@hoverlabel@font@_style.py@.PATH_END.py
{ "filename": "image_dataset_utils_test.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/utils/image_dataset_utils_test.py", "type": "Python" }
import os import numpy as np from keras.src import backend from keras.src import testing from keras.src.utils import image_dataset_utils from keras.src.utils import image_utils from keras.src.utils.module_utils import tensorflow as tf class ImageDatasetFromDirectoryTest(testing.TestCase): def _get_images(self, ...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@utils@image_dataset_utils_test.py@.PATH_END.py
{ "filename": "calculate_splus_filters.py", "repo_name": "splus-collab/splus_filters", "repo_path": "splus_filters_extracted/splus_filters-master/calculate_splus_filters.py", "type": "Python" }
#!/usr/bin/env python3 import numpy as np from scipy.interpolate import interp1d import matplotlib.pyplot as plt import os import sys import argparse import pandas as pd from astropy.io import fits, ascii import glob import colorlog import logging from dust_laws import CCM def get_logger( name: str, loglevel...
splus-collabREPO_NAMEsplus_filtersPATH_START.@splus_filters_extracted@splus_filters-master@calculate_splus_filters.py@.PATH_END.py
{ "filename": "_tickcolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/xaxis/_tickcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__(self, plotly_name="tickcolor", parent_name="layout.xaxis", **kwargs): super(TickcolorValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@xaxis@_tickcolor.py@.PATH_END.py
{ "filename": "_global_imports.py", "repo_name": "ThomasEdwardRiley/xpsi-pre-transfer", "repo_path": "xpsi-pre-transfer_extracted/xpsi-pre-transfer-master/xpsi/PostProcessing/_global_imports.py", "type": "Python" }
from __future__ import division, print_function __all__ = ["make_verbose", "verbose", "fragile", "_verbose", "_warning", "xpsiError", "random_seed", "fix_random_seed", "getdist", "nestcheck", "OrderedDict", ...
ThomasEdwardRileyREPO_NAMExpsi-pre-transferPATH_START.@xpsi-pre-transfer_extracted@xpsi-pre-transfer-master@xpsi@PostProcessing@_global_imports.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/library/cpp/string_utils/base64/bench/metrics/main.py", "type": "Python" }
import yatest.common as yc def test_export_metrics(metrics): metrics.set_benchmark(yc.execute_benchmark('library/cpp/string_utils/base64/bench/bench'))
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@library@cpp@string_utils@base64@bench@metrics@main.py@.PATH_END.py
{ "filename": "parasite_axes.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py2/mpl_toolkits/axes_grid1/parasite_axes.py", "type": "Python" }
from __future__ import (absolute_import, division, print_function, unicode_literals) import six from matplotlib import ( artist as martist, collections as mcoll, transforms as mtransforms, rcParams) from matplotlib.axes import subplot_class_factory from matplotlib.transforms import Bbo...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py2@mpl_toolkits@axes_grid1@parasite_axes.py@.PATH_END.py
{ "filename": "random_initializers.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/initializers/random_initializers.py", "type": "Python" }
import math from keras.src import ops from keras.src.api_export import keras_export from keras.src.backend import random from keras.src.initializers.initializer import Initializer from keras.src.saving import serialization_lib class RandomInitializer(Initializer): def __init__(self, seed=None): self._ini...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@initializers@random_initializers.py@.PATH_END.py
{ "filename": "contour.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/mayavi/filters/contour.py", "type": "Python" }
# Author: Prabhu Ramachandran <prabhu [at] aero . iitb . ac . in> # Copyright (c) 2008, Prabhu Ramachandran # License: BSD Style. # Enthought library imports. from traits.api import Instance # Local imports. from mayavi.components.contour import Contour as ContourComponent from mayavi.core.pipeline_info import Pipel...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@filters@contour.py@.PATH_END.py
{ "filename": "_tickmode.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/carpet/aaxis/_tickmode.py", "type": "Python" }
import _plotly_utils.basevalidators class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="tickmode", parent_name="carpet.aaxis", **kwargs): super(TickmodeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@carpet@aaxis@_tickmode.py@.PATH_END.py
{ "filename": "_visible.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/annotation/_visible.py", "type": "Python" }
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.annotation", **kwargs ): super(VisibleValidator, self).__init__( plotly_name=plotly_name, parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@annotation@_visible.py@.PATH_END.py
{ "filename": "intensity_profiles.py", "repo_name": "delinea/LDCU", "repo_path": "LDCU_extracted/LDCU-main/intensity_profiles.py", "type": "Python" }
import os import pickle import numpy as np from uncertainties import ufloat import tqdm import matplotlib from matplotlib import pyplot as plt from astropy.io import fits from astropy import table import get_lds_with_errors_v3 as glds LINECOLOR = matplotlib.rcParams["ytick.color"] # Compute and store intensity pro...
delineaREPO_NAMELDCUPATH_START.@LDCU_extracted@LDCU-main@intensity_profiles.py@.PATH_END.py
{ "filename": "WebSocket-Compliance-Testing.md", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/docs-old/pages/administration/production/WebSocket-Compliance-Testing.md", "type": "Markdown" }
title: WebSocket Compliance Testing toc: [Documentation, Administration, Going to Production, WebSocket Compliance Testing] # WebSocket Compliance Testing Crossbar.io has best-in-class compliance to the WebSocket protocol (RFC6455). > Compliance is testified via the [**Autobahn**Testsuite](http://autobahn.ws/testsui...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@docs-old@pages@administration@production@WebSocket-Compliance-Testing.md@.PATH_END.py
{ "filename": "two_dim.py", "repo_name": "PhaseTracer/PhaseTracer", "repo_path": "PhaseTracer_extracted/PhaseTracer-master/example/xSM/plot_scripts/two_dim.py", "type": "Python" }
""" 2d plots for paper ================== """ import click import matplotlib import matplotlib.pyplot as plt import numpy as np from plot_fun import fun_diff, fun_gamma_line from three_dim import add_max_num_legend, max_num_cmap from style import style @click.command() @click.argument("plot_type") @click.argument("s...
PhaseTracerREPO_NAMEPhaseTracerPATH_START.@PhaseTracer_extracted@PhaseTracer-master@example@xSM@plot_scripts@two_dim.py@.PATH_END.py
{ "filename": "_symmetric.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram/error_y/_symmetric.py", "type": "Python" }
import _plotly_utils.basevalidators class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="symmetric", parent_name="histogram.error_y", **kwargs ): super(SymmetricValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram@error_y@_symmetric.py@.PATH_END.py
{ "filename": "ImageDraw.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pillow/py2/PIL/ImageDraw.py", "type": "Python" }
# # The Python Imaging Library # $Id$ # # drawing interface operations # # History: # 1996-04-13 fl Created (experimental) # 1996-08-07 fl Filled polygons, ellipses. # 1996-08-13 fl Added text support # 1998-06-28 fl Handle I and F images # 1998-12-29 fl Added arc; use arc primitive to draw ellipses # 1999-01...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pillow@py2@PIL@ImageDraw.py@.PATH_END.py
{ "filename": "_deprecations.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/_deprecations.py", "type": "Python" }
import warnings warnings.filterwarnings( "default", r"plotly\.graph_objs\.\w+ is deprecated", DeprecationWarning ) class Data(list): """ plotly.graph_objs.Data is deprecated. Please replace it with a list or tuple of instances of the following types - plotly.graph_objs.Scatter - plotl...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@_deprecations.py@.PATH_END.py
{ "filename": "_width.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram/marker/line/_width.py", "type": "Python" }
import _plotly_utils.basevalidators class WidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="width", parent_name="histogram.marker.line", **kwargs ): super(WidthValidator, self).__init__( plotly_name=plotly_name, parent_name=p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram@marker@line@_width.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "changhoonhahn/pySpectrum", "repo_path": "pySpectrum_extracted/pySpectrum-master/setup.py", "type": "Python" }
import os import numpy as np from numpy.distutils.core import setup from numpy.distutils.core import Extension __version__ = '0.0' try: if 'NERSC_HOST' in os.environ.keys(): if os.environ['NERSC_HOST'] == 'edison': ext = Extension(name='estimator', sources=['pyspectrum...
changhoonhahnREPO_NAMEpySpectrumPATH_START.@pySpectrum_extracted@pySpectrum-master@setup.py@.PATH_END.py
{ "filename": "_meta.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergl/_meta.py", "type": "Python" }
import _plotly_utils.basevalidators class MetaValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="meta", parent_name="scattergl", **kwargs): super(MetaValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, array_ok...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergl@_meta.py@.PATH_END.py
{ "filename": "test_minres.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/sparse/linalg/_isolve/tests/test_minres.py", "type": "Python" }
import numpy as np from numpy.linalg import norm from numpy.testing import assert_equal, assert_allclose, assert_ from scipy.sparse.linalg._isolve import minres from pytest import raises as assert_raises def get_sample_problem(): # A random 10 x 10 symmetric matrix rng = np.random.RandomState(1234) matri...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@sparse@linalg@_isolve@tests@test_minres.py@.PATH_END.py
{ "filename": "blsstep.py", "repo_name": "hpparvi/opents", "repo_path": "opents_extracted/opents-master/src/blsstep.py", "type": "Python" }
# OpenTS: Open exoplanet transit search pipeline. # Copyright (C) 2015-2020 Hannu Parviainen # # 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 3 of the License, or # (at yo...
hpparviREPO_NAMEopentsPATH_START.@opents_extracted@opents-master@src@blsstep.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "jrenaud90/TidalPy", "repo_path": "TidalPy_extracted/TidalPy-main/TidalPy/Extending/burnman/__init__.py", "type": "Python" }
from .package import burnman, Material, Mineral, material_property, dictionarize_formula, formula_mass, burnman_installed from .build import build_burnman_world from .burnman_world import BurnManWorld
jrenaud90REPO_NAMETidalPyPATH_START.@TidalPy_extracted@TidalPy-main@TidalPy@Extending@burnman@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/coloraxis/colorbar/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._tickfont import Tickfont from ._tickformatstop import Tickformatstop from ._title import Title from . import title else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@coloraxis@colorbar@__init__.py@.PATH_END.py
{ "filename": "test_flow_run_notification_policies.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/server/orchestration/api/test_flow_run_notification_policies.py", "type": "Python" }
from typing import List from uuid import uuid4 import pytest from prefect.server import models, schemas from prefect.server.schemas.core import FlowRunNotificationPolicy from prefect.utilities.pydantic import parse_obj_as @pytest.fixture async def completed_policy(session, notifier_block): policy = ( aw...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@server@orchestration@api@test_flow_run_notification_policies.py@.PATH_END.py
{ "filename": "_domain.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/treemap/_domain.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Domain(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "treemap" _path_str = "treemap.domain" _valid_props = {"column", "row", "x", "y"} # colu...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@treemap@_domain.py@.PATH_END.py
{ "filename": "GSPHHydroBase.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/PYB11/GSPH/GSPHHydroBase.py", "type": "Python" }
#------------------------------------------------------------------------------- # GSPHHydroBase #------------------------------------------------------------------------------- from PYB11Generator import * from GenericRiemannHydro import * from RestartMethods import * @PYB11template("Dimension") @PYB11module("Spheral...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@GSPH@GSPHHydroBase.py@.PATH_END.py
{ "filename": "bug_report.md", "repo_name": "handley-lab/anesthetic", "repo_path": "anesthetic_extracted/anesthetic-master/.github/ISSUE_TEMPLATE/bug_report.md", "type": "Markdown" }
--- name: Bug report about: Create a report to help us improve labels: --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behaviour. **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable...
handley-labREPO_NAMEanestheticPATH_START.@anesthetic_extracted@anesthetic-master@.github@ISSUE_TEMPLATE@bug_report.md@.PATH_END.py
{ "filename": "_z.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/caps/_z.py", "type": "Python" }
import _plotly_utils.basevalidators class ZValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="z", parent_name="volume.caps", **kwargs): super(ZValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, data_class...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@caps@_z.py@.PATH_END.py
{ "filename": "_gantt.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/figure_factory/_gantt.py", "type": "Python" }
from numbers import Number import copy from plotly import exceptions, optional_imports import plotly.colors as clrs from plotly.figure_factory import utils import plotly.graph_objects as go pd = optional_imports.get_module("pandas") REQUIRED_GANTT_KEYS = ["Task", "Start", "Finish"] def _get_corner_points(x0, y0, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@figure_factory@_gantt.py@.PATH_END.py
{ "filename": "test_stitching.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/modules/stitching/misc/python/test/test_stitching.py", "type": "Python" }
#!/usr/bin/env python import cv2 as cv import numpy as np from tests_common import NewOpenCVTests class stitching_test(NewOpenCVTests): def test_simple(self): img1 = self.get_sample('stitching/a1.png') img2 = self.get_sample('stitching/a2.png') stitcher = cv.Stitcher.create(cv.Stitcher_...
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@modules@stitching@misc@python@test@test_stitching.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/annotation/hoverlabel/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._font import FontValidator from ._bordercolor import BordercolorValidator from ._bgcolor import BgcolorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@annotation@hoverlabel@__init__.py@.PATH_END.py
{ "filename": "do_llh_inFoV4pc_pix.py", "repo_name": "Swift-BAT/NITRATES", "repo_path": "NITRATES_extracted/NITRATES-main/nitrates/archive/do_llh_inFoV4pc_pix.py", "type": "Python" }
import numpy as np from astropy.io import fits from astropy.table import Table from astropy.wcs import WCS import os import argparse import logging, traceback import time import pandas as pd from ..analysis_seeds.bkg_rate_estimation import rate_obj_from_sqltab from ..lib.sqlite_funcs import ( get_conn, write_r...
Swift-BATREPO_NAMENITRATESPATH_START.@NITRATES_extracted@NITRATES-main@nitrates@archive@do_llh_inFoV4pc_pix.py@.PATH_END.py
{ "filename": "ifort.py", "repo_name": "duvall3/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/ifort.py", "type": "Python" }
"""SCons.Tool.ifort Tool-specific initialization for newer versions of the Intel Fortran Compiler for Linux/Windows (and possibly Mac OS X). There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) ...
duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@ifort.py@.PATH_END.py
{ "filename": "inspectdata.ipynb", "repo_name": "yongsukyee/uncertain_blackholemass", "repo_path": "uncertain_blackholemass_extracted/uncertain_blackholemass-main/uncertain_blackholemass/notebooks/inspectdata.ipynb", "type": "Jupyter Notebook" }
# Inspect SDSS DR16 Quasar Samples ```python import sys sys.path.append("..") from astropy.io import fits from pathlib import Path import matplotlib.pyplot as plt import numpy as np import pandas as pd from lib.dataset_sdssquasarspec import SDSSQuasarSpecDataset from lib.get_config import get_config cfg = get_confi...
yongsukyeeREPO_NAMEuncertain_blackholemassPATH_START.@uncertain_blackholemass_extracted@uncertain_blackholemass-main@uncertain_blackholemass@notebooks@inspectdata.ipynb@.PATH_END.py
{ "filename": "test_atek2015.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/examples/lit/test_atek2015.py", "type": "Python" }
""" test_atek2015.py Author: Jordan Mirocha Affiliation: University of Colorado at Boulder Created on: Fri Nov 6 13:33:37 PST 2015 Description: Compare to their Figure 8. """ import ares import numpy as np import matplotlib.pyplot as pl # Remember: they are stored as the log10! atek15 = ares.util.read_lit('atek2...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@examples@lit@test_atek2015.py@.PATH_END.py
{ "filename": "_borderwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmap/colorbar/_borderwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="choroplethmap.colorbar", **kwargs ): super(BorderwidthValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmap@colorbar@_borderwidth.py@.PATH_END.py
{ "filename": "ah_bootstrap.py", "repo_name": "GBTSpectroscopy/gbtpipe", "repo_path": "gbtpipe_extracted/gbtpipe-master/ah_bootstrap.py", "type": "Python" }
""" This bootstrap module contains code for ensuring that the astropy_helpers package will be importable by the time the setup.py script runs. It also includes some workarounds to ensure that a recent-enough version of setuptools is being used for the installation. This module should be the first thing imported in th...
GBTSpectroscopyREPO_NAMEgbtpipePATH_START.@gbtpipe_extracted@gbtpipe-master@ah_bootstrap.py@.PATH_END.py
{ "filename": "_dtickrange.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/marker/colorbar/tickformatstop/_dtickrange.py", "type": "Python" }
import _plotly_utils.basevalidators class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scattergl.marker.colorbar.tickformatstop", **kwargs, ): super(DtickrangeValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@marker@colorbar@tickformatstop@_dtickrange.py@.PATH_END.py
{ "filename": "create_cylinder.py", "repo_name": "andizq/sf3dmodels", "repo_path": "sf3dmodels_extracted/sf3dmodels-master/sf3dmodels/create_cylinder.py", "type": "Python" }
from __future__ import print_function from .Utils import * import numpy as np def velocity(M,R_l,r_seg,r): #(Big mass,Low mass position,Particle position) R_h = R_l + r_seg #High mass position = Low mass position + The segment between both masses r_rel = np.array(R_h) - np.array(r...
andizqREPO_NAMEsf3dmodelsPATH_START.@sf3dmodels_extracted@sf3dmodels-master@sf3dmodels@create_cylinder.py@.PATH_END.py
{ "filename": "_side.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/isosurface/colorbar/title/_side.py", "type": "Python" }
import _plotly_utils.basevalidators class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="isosurface.colorbar.title", **kwargs ): super(SideValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@isosurface@colorbar@title@_side.py@.PATH_END.py
{ "filename": "filters.py", "repo_name": "simonsobs/nemo", "repo_path": "nemo_extracted/nemo-main/nemo/filters.py", "type": "Python" }
""" This module defines several filter classes, together with a function that uses them to filter maps. New base classes can be derived from the overall base class :obj:`MapFilter`. There are two main classes of filter that are currently implemented - :obj:`MatchedFilter` and :obj:`RealSpaceMatchedFilter`. There are...
simonsobsREPO_NAMEnemoPATH_START.@nemo_extracted@nemo-main@nemo@filters.py@.PATH_END.py
{ "filename": "trainable_segmentation.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/skimage/future/trainable_segmentation.py", "type": "Python" }
from skimage.feature import multiscale_basic_features try: from sklearn.exceptions import NotFittedError from sklearn.ensemble import RandomForestClassifier has_sklearn = True except ImportError: has_sklearn = False class NotFittedError(Exception): pass class TrainableSegmenter: """...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@future@trainable_segmentation.py@.PATH_END.py
{ "filename": "test_astradb.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/vectorstores/test_astradb.py", "type": "Python" }
""" Test of Astra DB vector store class `AstraDB` Required to run this test: - a recent `astrapy` Python package available - an Astra DB instance; - the two environment variables set: export ASTRA_DB_API_ENDPOINT="https://<DB-ID>-us-east1.apps.astra.datastax.com" export ASTRA_DB_APPLICATION...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@vectorstores@test_astradb.py@.PATH_END.py