metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "chap2.md", "repo_name": "federicomarulli/CosmoBolognaLib", "repo_path": "CosmoBolognaLib_extracted/CosmoBolognaLib-master/External/CLASS/doc/input/chap2.md", "type": "Markdown" }
Where to find information and documentation on CLASS? ====================================================== Author: Julien Lesgourgues * __For what the code can actually compute__: all possible input parameters, all coded cosmological models, all functionalities, all observables, etc.: read the file `explanatory.in...
federicomarulliREPO_NAMECosmoBolognaLibPATH_START.@CosmoBolognaLib_extracted@CosmoBolognaLib-master@External@CLASS@doc@input@chap2.md@.PATH_END.py
{ "filename": "_visible.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/error_y/_visible.py", "type": "Python" }
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="scattergl.error_y", **kwargs ): super(VisibleValidator, self).__init__( plotly_name=plotly_name, parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@error_y@_visible.py@.PATH_END.py
{ "filename": "_fill.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/volume/caps/y/_fill.py", "type": "Python" }
import _plotly_utils.basevalidators class FillValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="fill", parent_name="volume.caps.y", **kwargs): super(FillValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, e...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@volume@caps@y@_fill.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "NannyML/nannyml", "repo_path": "nannyml_extracted/nannyml-main/nannyml/plots/blueprints/__init__.py", "type": "Python" }
# Author: Niels Nuyttens <niels@nannyml.com> # # # License: Apache Software License 2.0
NannyMLREPO_NAMEnannymlPATH_START.@nannyml_extracted@nannyml-main@nannyml@plots@blueprints@__init__.py@.PATH_END.py
{ "filename": "tensor_utils.py", "repo_name": "freelunchtheorem/Conditional_Density_Estimation", "repo_path": "Conditional_Density_Estimation_extracted/Conditional_Density_Estimation-master/cde/utils/tf_utils/tensor_utils.py", "type": "Python" }
import operator import numpy as np def flatten_tensors(tensors): if len(tensors) > 0: return np.concatenate([np.reshape(x, [-1]) for x in tensors]) else: return np.asarray([]) def unflatten_tensors(flattened, tensor_shapes): tensor_sizes = list(map(int, map(np.prod, tensor_shapes))) i...
freelunchtheoremREPO_NAMEConditional_Density_EstimationPATH_START.@Conditional_Density_Estimation_extracted@Conditional_Density_Estimation-master@cde@utils@tf_utils@tensor_utils.py@.PATH_END.py
{ "filename": "_bgcolorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/cone/hoverlabel/_bgcolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="cone.hoverlabel", **kwargs ): super(BgcolorsrcValidator, self).__init__( plotly_name=plotly_name, parent_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@cone@hoverlabel@_bgcolorsrc.py@.PATH_END.py
{ "filename": "load.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/fast/load.py", "type": "Python" }
import logging from pyspedas.utilities.dailynames import dailynames from pyspedas.utilities.download import download from pytplot import time_clip as tclip from pytplot import cdf_to_tplot from .config import CONFIG def load( trange=["1996-12-01", "1996-12-02"], instrument="dcf", datatype="", level="...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@fast@load.py@.PATH_END.py
{ "filename": "_showticksuffix.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showticksuffix.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="mesh3d.colorbar", **kwargs ): super(ShowticksuffixValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@mesh3d@colorbar@_showticksuffix.py@.PATH_END.py
{ "filename": "test_ui_url.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/events/jinja_filters/test_ui_url.py", "type": "Python" }
from datetime import timedelta from uuid import uuid4 import jinja2 import pytest from pendulum import DateTime from prefect.events.schemas.events import ReceivedEvent, Resource from prefect.server.events.jinja_filters import ui_url from prefect.server.events.schemas.automations import Automation, EventTrigger, Postu...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@events@jinja_filters@test_ui_url.py@.PATH_END.py
{ "filename": "test_ellipsoid.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/data_objects/tests/test_ellipsoid.py", "type": "Python" }
import numpy as np from numpy.testing import assert_array_less from yt.testing import fake_random_ds def setup(): from yt.config import ytcfg ytcfg["yt", "log_level"] = 50 ytcfg["yt", "internals", "within_testing"] = True def _difference(x1, x2, dw): rel = x1 - x2 rel[rel > dw / 2.0] -= dw ...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@data_objects@tests@test_ellipsoid.py@.PATH_END.py
{ "filename": "plot2d.py", "repo_name": "treecode/Bonsai", "repo_path": "Bonsai_extracted/Bonsai-master/tools/density_estimator/plot2d.py", "type": "Python" }
import sys import os import numpy as np import matplotlib.pylab as plt import math def plot2D(x, y, z, zmin= None, zmax= None, xlim=None, ylim=None, nx = 200, ny = 200): if zmin == None: zmin = min(z) if zmax == None: zmax = max(z) for i in range(len(z)): z[i] = min(z[i], zmax) z[i] = max(z[i]...
treecodeREPO_NAMEBonsaiPATH_START.@Bonsai_extracted@Bonsai-master@tools@density_estimator@plot2d.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "mikecokina/elisa", "repo_path": "elisa_extracted/elisa-master/src/elisa/analytics/params/conf.py", "type": "Python" }
import numpy as np from astropy.time import Time from ... import units as u from ... atm import atm_file_prefix_to_quantity_list from ... import settings PARAM_PARSER = '@' NUISANCE_PARSER = 'nuisance' TEMPERATURES = atm_file_prefix_to_quantity_list("temperature", settings.ATM_ATLAS) METALLICITY = atm_file_prefix_t...
mikecokinaREPO_NAMEelisaPATH_START.@elisa_extracted@elisa-master@src@elisa@analytics@params@conf.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "n-claes/legolas", "repo_path": "legolas_extracted/legolas-master/post_processing/pylbo/utilities/datfiles/__init__.py", "type": "Python" }
n-claesREPO_NAMElegolasPATH_START.@legolas_extracted@legolas-master@post_processing@pylbo@utilities@datfiles@__init__.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "DifferentiableUniverseInitiative/sbi_lens", "repo_path": "sbi_lens_extracted/sbi_lens-main/sbi_lens/simulator/utils.py", "type": "Python" }
import itertools from functools import partial from pathlib import Path import astropy.units as u import jax import jax.numpy as jnp import jax_cosmo as jc import numpy as np import numpyro import numpyro.distributions as dist import tensorflow_probability as tfp from lenstools import ConvergenceMap from numpyro impor...
DifferentiableUniverseInitiativeREPO_NAMEsbi_lensPATH_START.@sbi_lens_extracted@sbi_lens-main@sbi_lens@simulator@utils.py@.PATH_END.py
{ "filename": "_namelengthsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymap/hoverlabel/_namelengthsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="densitymap.hoverlabel", **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymap@hoverlabel@_namelengthsrc.py@.PATH_END.py
{ "filename": "maximum_mass.py", "repo_name": "nuclear-multimessenger-astronomy/nmma", "repo_path": "nmma_extracted/nmma-main/nmma/tests/maximum_mass.py", "type": "Python" }
from argparse import Namespace import os from pathlib import Path import pytest from ..joint import maximum_mass_constraint @pytest.fixture(scope="module") def args(): workingDir = os.path.dirname(__file__) dataDir = os.path.join(workingDir, "data") priorDir = Path(__file__).resolve().parent.parent.paren...
nuclear-multimessenger-astronomyREPO_NAMEnmmaPATH_START.@nmma_extracted@nmma-main@nmma@tests@maximum_mass.py@.PATH_END.py
{ "filename": "ArithmeticFieldList_PYB11.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/PYB11/FieldList/ArithmeticFieldList_PYB11.py", "type": "Python" }
""" Spheral ArithmeticFieldList module. Provides the ArithmeticFieldList classes. """ from PYB11Generator import * from SpheralCommon import * from spheralDimensions import * dims = spheralDimensions() from ArithmeticFieldList import * from MinMaxFieldList import * #-------------------------------------------------...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@FieldList@ArithmeticFieldList_PYB11.py@.PATH_END.py
{ "filename": "baseconfig.py", "repo_name": "SBU-COSMOLIKE/CAMBLateDE", "repo_path": "CAMBLateDE_extracted/CAMBLateDE-main/build/lib/camb/baseconfig.py", "type": "Python" }
import os import os.path as osp import sys import platform import ctypes from ctypes import Structure, POINTER, byref, c_int, c_double, c_bool, c_float from numpy.ctypeslib import ndpointer import numpy as np def ndpointer_or_null(*args, **kwargs): # allows passing None to fortran optional arguments # from ht...
SBU-COSMOLIKEREPO_NAMECAMBLateDEPATH_START.@CAMBLateDE_extracted@CAMBLateDE-main@build@lib@camb@baseconfig.py@.PATH_END.py
{ "filename": "example_IFS.py", "repo_name": "SAIL-Labs/AMICAL", "repo_path": "AMICAL_extracted/AMICAL-main/doc/example_IFS.py", "type": "Python" }
""" @author: Anthony Soulain (UGA - IPAG) ------------------------------------------------------------------------- AMICAL: Aperture Masking Interferometry Calibration and Analysis Library ------------------------------------------------------------------------- In this example, we provide a way to clean and extract ...
SAIL-LabsREPO_NAMEAMICALPATH_START.@AMICAL_extracted@AMICAL-main@doc@example_IFS.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "tgrassi/prizmo", "repo_path": "prizmo_extracted/prizmo-main/src_py/ChiantiPy/core/tests/__init__.py", "type": "Python" }
tgrassiREPO_NAMEprizmoPATH_START.@prizmo_extracted@prizmo-main@src_py@ChiantiPy@core@tests@__init__.py@.PATH_END.py
{ "filename": "_lenmode.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/icicle/marker/colorbar/_lenmode.py", "type": "Python" }
import _plotly_utils.basevalidators class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="icicle.marker.colorbar", **kwargs ): super(LenmodeValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@icicle@marker@colorbar@_lenmode.py@.PATH_END.py
{ "filename": "test_dtype.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/skimage/util/tests/test_dtype.py", "type": "Python" }
import numpy as np import itertools from skimage import ( img_as_float, img_as_float32, img_as_float64, img_as_int, img_as_uint, img_as_ubyte, ) from skimage.util.dtype import _convert from skimage._shared._warnings import expected_warnings from skimage._shared import testing from skimage._shar...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@util@tests@test_dtype.py@.PATH_END.py
{ "filename": "watchlists.md", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/docs/source/core_functions/watchlists.md", "type": "Markdown" }
# Watchlists A watchlist is a set of points in the sky, together with a radius in arcseconds, which can be the same for all sources, or different for each. It is assumed to be a list of "interesting" sources, so that any transient that falls within the radius of one of the sources might indicate activity of that so...
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@docs@source@core_functions@watchlists.md@.PATH_END.py
{ "filename": "builtin_surface.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/mayavi/sources/builtin_surface.py", "type": "Python" }
""" A module that allows a user to create one of several standard VTK poly data sources. """ #Author: Suyog Dutt Jain <suyog.jain@aero.iitb.ac.in> # Prabhu Ramachandran <prabhu_r@users.sf.net> # Copyright (c) 2008, Enthought, Inc. # License: BSD Style. # Enthought library imports. from traits.api import Insta...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@sources@builtin_surface.py@.PATH_END.py
{ "filename": "_sizesrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_sizesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatter.hoverlabel.font", **kwargs ): super(SizesrcValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@hoverlabel@font@_sizesrc.py@.PATH_END.py
{ "filename": "_borderwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattercarpet/marker/colorbar/_borderwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scattercarpet.marker.colorbar", **kwargs ): super(BorderwidthValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattercarpet@marker@colorbar@_borderwidth.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolar/marker/gradient/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._typesrc import TypesrcValidator from ._type import TypeValidator from ._colorsrc import ColorsrcValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolar@marker@gradient@__init__.py@.PATH_END.py
{ "filename": "_tickvalssrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickvalssrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.ternary.aaxis", **kwargs ): super(TickvalssrcValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@ternary@aaxis@_tickvalssrc.py@.PATH_END.py
{ "filename": "test_analytic_kinematics.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_GalKin/test_analytic_kinematics.py", "type": "Python" }
import pytest from lenstronomy.GalKin.analytic_kinematics import AnalyticKinematics import numpy as np from lenstronomy.GalKin.numeric_kinematics import NumericKinematics from astropy.cosmology import FlatLambdaCDM import numpy.testing as npt class TestAnalyticKinematics(object): def setup_method(self): p...
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_GalKin@test_analytic_kinematics.py@.PATH_END.py
{ "filename": "_thickness.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/mesh3d/colorbar/_thickness.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="mesh3d.colorbar", **kwargs ): super(ThicknessValidator, self).__init__( plotly_name=plotly_name, parent_...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@mesh3d@colorbar@_thickness.py@.PATH_END.py
{ "filename": "test_npairs_3d.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/mock_observables/pair_counters/test_pair_counters/test_npairs_3d.py", "type": "Python" }
""" """ from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import pytest from astropy.utils.misc import NumpyRNGContext from pathlib import Path from ..npairs_3d import npairs_3d from ..pairs import npairs as pure_python_brute_force_npairs_3d from ...tests.cf_helper...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@mock_observables@pair_counters@test_pair_counters@test_npairs_3d.py@.PATH_END.py
{ "filename": "_california_housing.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/datasets/_california_housing.py", "type": "Python" }
"""California housing dataset. The original database is available from StatLib http://lib.stat.cmu.edu/datasets/ The data contains 20,640 observations on 9 variables. This dataset contains the average house value as target variable and the following input variables (features): average income, housing average ag...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@datasets@_california_housing.py@.PATH_END.py
{ "filename": "hist_mutual.py", "repo_name": "rodluger/planetplanet", "repo_path": "planetplanet_extracted/planetplanet-master/scripts/hist_mutual.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' hist_mutual.py |github| ----------------------- Histograms of the mutual transit events in TRAPPIST-1. Shows histograms of the fractional depth and duration of these events for all pairs of planets. TRAPPIST-1b ~~~~~~~~~~~ .. image:: /b_mutual.jpg :width...
rodlugerREPO_NAMEplanetplanetPATH_START.@planetplanet_extracted@planetplanet-master@scripts@hist_mutual.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "mamartinod/grip", "repo_path": "grip_extracted/grip-main/setup.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='grip-nulling', version='1.5.0', author='M.-A. Martinod', description='Self-calibration data reduction tools for nulling interferometry', long_description='GRIP is a novel data reduction methods provi...
mamartinodREPO_NAMEgripPATH_START.@grip_extracted@grip-main@setup.py@.PATH_END.py
{ "filename": "object_registration.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/saving/object_registration.py", "type": "Python" }
import inspect from keras.src.api_export import keras_export from keras.src.backend.common import global_state GLOBAL_CUSTOM_OBJECTS = {} GLOBAL_CUSTOM_NAMES = {} @keras_export( [ "keras.saving.CustomObjectScope", "keras.saving.custom_object_scope", "keras.utils.CustomObjectScope", ...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@saving@object_registration.py@.PATH_END.py
{ "filename": "stis_reduction-wasp-121b-paper.ipynb", "repo_name": "natalieallen/stis_pipeline", "repo_path": "stis_pipeline_extracted/stis_pipeline-main/stis_reduction-wasp-121b-paper.ipynb", "type": "Jupyter Notebook" }
```python from STIS_pipeline_functions import * ``` ```python # read in data and calibration files - the test directory I have has # two different instruments so I just quickly sort those data_files_430 = sorted(glob.glob("wasp-121/HST/G430L/*/*flt.fits")) data_files_750 = sorted(glob.glob("wasp-121/HST/G750L/*/*flt...
natalieallenREPO_NAMEstis_pipelinePATH_START.@stis_pipeline_extracted@stis_pipeline-main@stis_reduction-wasp-121b-paper.ipynb@.PATH_END.py
{ "filename": "conf.py", "repo_name": "desihub/redrock", "repo_path": "redrock_extracted/redrock-main/doc/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # redrock documentation build configuration file, created by # sphinx-quickstart on Tue Dec 9 10:43:33 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
desihubREPO_NAMEredrockPATH_START.@redrock_extracted@redrock-main@doc@conf.py@.PATH_END.py
{ "filename": "copy_script.py", "repo_name": "ThibeauWouters/TurboPE-BNS", "repo_path": "TurboPE-BNS_extracted/TurboPE-BNS-main/JS_estimate/GW170817_TaylorF2/varied_runs/outdir/68916/copy_script.py", "type": "Python" }
import psutil p = psutil.Process() p.cpu_affinity([0]) import os os.environ["CUDA_VISIBLE_DEVICES"] = "3" os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.10" from jimgw.jim import Jim from jimgw.single_event.detector import H1, L1, V1 from jimgw.single_event.likelihood import HeterodynedTransientLikelihoodFD from ji...
ThibeauWoutersREPO_NAMETurboPE-BNSPATH_START.@TurboPE-BNS_extracted@TurboPE-BNS-main@JS_estimate@GW170817_TaylorF2@varied_runs@outdir@68916@copy_script.py@.PATH_END.py
{ "filename": "_x.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/marker/colorbar/_x.py", "type": "Python" }
import _plotly_utils.basevalidators class XValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="x", parent_name="scattergl.marker.colorbar", **kwargs ): super(XValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@marker@colorbar@_x.py@.PATH_END.py
{ "filename": "dataset_utils.py", "repo_name": "pyDANDIA/pyDANDIA", "repo_path": "pyDANDIA_extracted/pyDANDIA-main/pyDANDIA/dataset_utils.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Created on Fri Jun 7 14:39:29 2019 @author: rstreet """ import pipeline_setup from os import path class DataCollection: """Class describing a collection of datasets for a single field pointing""" def __init__(self): self.primary_ref = None self.red_dir = None ...
pyDANDIAREPO_NAMEpyDANDIAPATH_START.@pyDANDIA_extracted@pyDANDIA-main@pyDANDIA@dataset_utils.py@.PATH_END.py
{ "filename": "test_variable.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/cli/test_variable.py", "type": "Python" }
import sys import pytest from sqlalchemy.ext.asyncio import AsyncSession from typer import Exit from prefect.server.models.variables import create_variable from prefect.server.schemas.actions import VariableCreate from prefect.testing.cli import invoke_and_assert @pytest.fixture(autouse=True) def interactive_consol...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@cli@test_variable.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "facebookresearch/faiss", "repo_path": "faiss_extracted/faiss-main/contrib/README.md", "type": "Markdown" }
# The contrib modules The contrib directory contains helper modules for Faiss for various tasks. ## Code structure The contrib directory gets compiled in the module faiss.contrib. Note that although some of the modules may depend on additional modules (eg. GPU Faiss, pytorch, hdf5), they are not necessarily compile...
facebookresearchREPO_NAMEfaissPATH_START.@faiss_extracted@faiss-main@contrib@README.md@.PATH_END.py
{ "filename": "mv-processing-methods.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage-missing-values/mv-processing-methods.md", "type": "Markdown" }
- "Forbidden" — Missing values are not supported, their presence is interpreted as an error. - "Min" — Missing values are processed as the minimum value (less than all other values) for the feature. It is guaranteed that a split that separates missing values from all other values is considered when selecting trees. - "...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage-missing-values@mv-processing-methods.md@.PATH_END.py
{ "filename": "cldf.py", "repo_name": "CosmoLike/cocoa", "repo_path": "cocoa_extracted/cocoa-main/Cocoa/external_modules/code/planck/code/plc_3.0/plc-3.1/src/python/clik/cldf.py", "type": "Python" }
import os import os.path as osp import shutil as shu try: from astropy.io import fits as pf except ImportError as e: # try pyfits then import pyfits as pf import re import numpy as nm def pack256(*li): rr="" for l in li: rr += l+'\0'*(256-len(l)) return rr def is_cldf(name): f = open(name) try...
CosmoLikeREPO_NAMEcocoaPATH_START.@cocoa_extracted@cocoa-main@Cocoa@external_modules@code@planck@code@plc_3.0@plc-3.1@src@python@clik@cldf.py@.PATH_END.py
{ "filename": "modspeclist.py", "repo_name": "spacetelescope/hstaxe", "repo_path": "hstaxe_extracted/hstaxe-main/hstaxe/axesim/modspeclist.py", "type": "Python" }
""" See LICENSE.txt """ import os import sys import math from astropy.io import fits from stwcs.wcsutil import HSTWCS from hstaxe.axeerror import aXeSIMError from hstaxe.axesrc.axeiol import InputObjectList class MagColList(InputObjectList): """Subclass for lists with magnitude columns This class loads ASCII ...
spacetelescopeREPO_NAMEhstaxePATH_START.@hstaxe_extracted@hstaxe-main@hstaxe@axesim@modspeclist.py@.PATH_END.py
{ "filename": "everest.py", "repo_name": "lightkurve/lightkurve", "repo_path": "lightkurve_extracted/lightkurve-main/src/lightkurve/io/everest.py", "type": "Python" }
"""Reader for K2 EVEREST light curves.""" from ..lightcurve import KeplerLightCurve from ..utils import KeplerQualityFlags from .generic import read_generic_lightcurve def read_everest_lightcurve( filename, flux_column="flux", quality_bitmask="default", **kwargs ): """Read an EVEREST light curve file. M...
lightkurveREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@src@lightkurve@io@everest.py@.PATH_END.py
{ "filename": "gfall.py", "repo_name": "tardis-sn/carsus", "repo_path": "carsus_extracted/carsus-master/carsus/io/kurucz/gfall.py", "type": "Python" }
import re import logging import numpy as np import pandas as pd from carsus.util import parse_selected_species from carsus.io.util import read_from_buffer CARSUS_DATA_GFALL_URL = "https://github.com/tardis-sn/carsus-data-kurucz/raw/main/linelists/gfall/gfall.dat?raw=true" GFALL_AIR_THRESHOLD = 200 # [nm], wavelength...
tardis-snREPO_NAMEcarsusPATH_START.@carsus_extracted@carsus-master@carsus@io@kurucz@gfall.py@.PATH_END.py
{ "filename": "test_config.py", "repo_name": "gammapy/gammapy", "repo_path": "gammapy_extracted/gammapy-main/gammapy/analysis/tests/test_config.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst from pathlib import Path import pytest from astropy.coordinates import Angle from astropy.time import Time from astropy.units import Quantity from pydantic import ValidationError from gammapy.analysis.config import AnalysisConfig, GeneralConfig from gammap...
gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@analysis@tests@test_config.py@.PATH_END.py
{ "filename": "_measure.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/waterfall/_measure.py", "type": "Python" }
import _plotly_utils.basevalidators class MeasureValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="measure", parent_name="waterfall", **kwargs): super(MeasureValidator, 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@waterfall@_measure.py@.PATH_END.py
{ "filename": "test_compile.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/partners/chroma/tests/integration_tests/test_compile.py", "type": "Python" }
import pytest # type: ignore[import-not-found] @pytest.mark.compile def test_placeholder() -> None: """Used for compiling integration tests without running any real tests.""" pass
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@partners@chroma@tests@integration_tests@test_compile.py@.PATH_END.py
{ "filename": "2-1-combining-multiple-quarters.ipynb", "repo_name": "lightkurve/lightkurve", "repo_path": "lightkurve_extracted/lightkurve-main/docs/source/tutorials/2-creating-light-curves/2-1-combining-multiple-quarters.ipynb", "type": "Jupyter Notebook" }
# Combining multiple quarters of *Kepler* data ## Learning Goals By the end of this tutorial, you will: - Understand a *Kepler* Quarter. - Understand how to download multiple quarters of data at once. - Learn how to normalize *Kepler* data. - Understand how to combine multiple quarters of data. ## Introduction T...
lightkurveREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@docs@source@tutorials@2-creating-light-curves@2-1-combining-multiple-quarters.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/histogram/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._cumulative import Cumulative from ._error_x import ErrorX from ._error_y import ErrorY from ._hoverlabel import Hoverlabel from ._insidetextfont import Insidetextfont from ._legendgrouptitle import...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@histogram@__init__.py@.PATH_END.py
{ "filename": "_cosmo_interp_astropy_v5.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/Cosmo/_cosmo_interp_astropy_v5.py", "type": "Python" }
import astropy from scipy.integrate import quad if float(astropy.__version__[0]) < 5.0: Warning( "This routines are only supported for astropy version >=5. Current version is %s." % astropy.__version__ ) else: from astropy.cosmology.utils import vectorize_redshift_method class CosmoInterp...
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@Cosmo@_cosmo_interp_astropy_v5.py@.PATH_END.py
{ "filename": "pick_on_surface.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/examples/mayavi/data_interaction/pick_on_surface.py", "type": "Python" }
""" Example showing how to pick data on a surface, going all the way back to the index in the numpy arrays. In this example, two views of the same data are shown. One with the data on a sphere, the other with the data flat. We use the 'on_mouse_pick' method of the scene to register a callback on clicking on the spher...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@examples@mayavi@data_interaction@pick_on_surface.py@.PATH_END.py
{ "filename": "groups.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/io/fits/hdu/groups.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see PYFITS.rst import sys import numpy as np from astropy.io.fits.column import FITS2NUMPY, ColDefs, Column from astropy.io.fits.fitsrec import FITS_rec, FITS_record from astropy.io.fits.util import _is_int, _is_pseudo_integer, _pseudo_zero from astropy.utils import la...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@io@fits@hdu@groups.py@.PATH_END.py
{ "filename": "test_queryutils.py", "repo_name": "sdss/marvin", "repo_path": "marvin_extracted/marvin-main/tests/tools/test_queryutils.py", "type": "Python" }
# !usr/bin/env python2 # -*- coding: utf-8 -*- # # Licensed under a 3-clause BSD license. # # @Author: Brian Cherinka # @Date: 2017-05-24 18:27:50 # @Last modified by: Brian Cherinka # @Last Modified time: 2018-11-16 14:35:44 from __future__ import absolute_import, division, print_function import itertools import...
sdssREPO_NAMEmarvinPATH_START.@marvin_extracted@marvin-main@tests@tools@test_queryutils.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "simonsobs/TeleView", "repo_path": "TeleView_extracted/TeleView-main/tvapi/tvapi/__init__.py", "type": "Python" }
simonsobsREPO_NAMETeleViewPATH_START.@TeleView_extracted@TeleView-main@tvapi@tvapi@__init__.py@.PATH_END.py
{ "filename": "_text.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/contour/colorbar/title/_text.py", "type": "Python" }
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="text", parent_name="contour.colorbar.title", **kwargs ): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name=par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@contour@colorbar@title@_text.py@.PATH_END.py
{ "filename": "model.py", "repo_name": "GijsMulders/epos", "repo_path": "epos_extracted/epos-master/EPOS/plot/model.py", "type": "Python" }
import matplotlib.pyplot as plt import numpy as np import scipy.stats from matplotlib import gridspec from . import helpers from EPOS.population import periodradius from EPOS.fitfunctions import brokenpowerlaw1D # Kepler obs # Kepler pdf mass # kepler pdf radius # Kepler pdf inner (M/R ??) fmt_symbol= {'ls':'', 'mar...
GijsMuldersREPO_NAMEeposPATH_START.@epos_extracted@epos-master@EPOS@plot@model.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/gemini_instruments/ghost/tests/__init__.py", "type": "Python" }
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@gemini_instruments@ghost@tests@__init__.py@.PATH_END.py
{ "filename": "_side.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/line/colorbar/title/_side.py", "type": "Python" }
import _plotly_utils.basevalidators class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scatter3d.line.colorbar.title", **kwargs ): super(SideValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@line@colorbar@title@_side.py@.PATH_END.py
{ "filename": "alignment_pixels.py", "repo_name": "adolliou/euispice_coreg", "repo_path": "euispice_coreg_extracted/euispice_coreg-main/euispice_coreg/pxlshift/alignment_pixels.py", "type": "Python" }
import warnings import numpy as np from astropy.io import fits from ..utils import rectify from ..utils import c_correlate from tqdm import tqdm from ..utils import matrix_transform import astropy.units as u from astropy.time import Time from ..utils import Util class AlignmentPixels: def __init__(self, large_f...
adolliouREPO_NAMEeuispice_coregPATH_START.@euispice_coreg_extracted@euispice_coreg-main@euispice_coreg@pxlshift@alignment_pixels.py@.PATH_END.py
{ "filename": "history_fitting_script.py", "repo_name": "ArgonneCPAC/diffstar", "repo_path": "diffstar_extracted/diffstar-main/scripts/history_fitting_script.py", "type": "Python" }
"""Script to fit Bolshoi or Multidark MAHs with a smooth model.""" import argparse import os import subprocess from time import time import h5py import numpy as np from mpi4py import MPI from diffstar.data_loaders.load_smah_data import ( BEBOP, TASSO, load_bolshoi_data, load_bolshoi_small_data, lo...
ArgonneCPACREPO_NAMEdiffstarPATH_START.@diffstar_extracted@diffstar-main@scripts@history_fitting_script.py@.PATH_END.py
{ "filename": "clearml.py", "repo_name": "ultralytics/ultralytics", "repo_path": "ultralytics_extracted/ultralytics-main/ultralytics/utils/callbacks/clearml.py", "type": "Python" }
# Ultralytics YOLO 🚀, AGPL-3.0 license from ultralytics.utils import LOGGER, SETTINGS, TESTS_RUNNING try: assert not TESTS_RUNNING # do not log pytest assert SETTINGS["clearml"] is True # verify integration is enabled import clearml from clearml import Task assert hasattr(clearml, "__version__...
ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@ultralytics@utils@callbacks@clearml.py@.PATH_END.py
{ "filename": "nndc.py", "repo_name": "tardis-sn/carsus", "repo_path": "carsus_extracted/carsus-master/carsus/io/nuclear/nndc.py", "type": "Python" }
import logging import pandas as pd from pathlib import Path import subprocess DECAY_DATA_SOURCE_DIR = Path.home() / "Downloads" / "carsus-data-nndc" DECAY_DATA_FINAL_DIR = Path.home() / "Downloads" / "tardis-data" / "decay-data" NNDC_SOURCE_URL = "https://github.com/tardis-sn/carsus-data-nndc" logger = logging.get...
tardis-snREPO_NAMEcarsusPATH_START.@carsus_extracted@carsus-master@carsus@io@nuclear@nndc.py@.PATH_END.py
{ "filename": "cat_hsc_nep.py", "repo_name": "HETDEX/elixer", "repo_path": "elixer_extracted/elixer-main/elixer/cat_hsc_nep.py", "type": "Python" }
from __future__ import print_function """ This is for a special, restricted use of HSC data in the NEP Updated 2024-02-xx Substantial re-organization of prior early data. See bottom of this file for notes on that earlier version """ try: from elixer import global_config as G from elixer import science_ima...
HETDEXREPO_NAMEelixerPATH_START.@elixer_extracted@elixer-main@elixer@cat_hsc_nep.py@.PATH_END.py
{ "filename": "s3arrow.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/packages/vaex-core/vaex/file/s3arrow.py", "type": "Python" }
import os import io from .s3 import patch_profile import pyarrow as pa import pyarrow.fs from . import split_options, FileProxy, split_scheme from .cache import FileSystemHandlerCached from ..cache import fingerprint region_cache = {} fs_arrow_cache = {} def glob(path, fs_options={}): from .s3 import glob ...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-core@vaex@file@s3arrow.py@.PATH_END.py
{ "filename": "deconvolve_vis.py", "repo_name": "SKA-INAF/caesar", "repo_path": "caesar_extracted/caesar-master/scripts/deconvolve_vis.py", "type": "Python" }
#!/usr/bin/env python ################################################## ### MODULE IMPORT ################################################## ## STANDARD MODULES import os import sys import subprocess import string import time import signal from threading import Thread import datetime import numpy as np impor...
SKA-INAFREPO_NAMEcaesarPATH_START.@caesar_extracted@caesar-master@scripts@deconvolve_vis.py@.PATH_END.py
{ "filename": "MetroTool.py", "repo_name": "lsst-ts/ts_phosim", "repo_path": "ts_phosim_extracted/ts_phosim-main/python/lsst/ts/phosim/utils/MetroTool.py", "type": "Python" }
# This file is part of ts_phosim. # # Developed for the LSST Telescope and Site Systems. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: y...
lsst-tsREPO_NAMEts_phosimPATH_START.@ts_phosim_extracted@ts_phosim-main@python@lsst@ts@phosim@utils@MetroTool.py@.PATH_END.py
{ "filename": "_nbinsy.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2dcontour/_nbinsy.py", "type": "Python" }
import _plotly_utils.basevalidators class NbinsyValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="nbinsy", parent_name="histogram2dcontour", **kwargs ): super(NbinsyValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2dcontour@_nbinsy.py@.PATH_END.py
{ "filename": "airbyte.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/document_loaders/airbyte.py", "type": "Python" }
from typing import Any, Callable, Iterator, Mapping, Optional from langchain_core.documents import Document from langchain_core.utils.utils import guard_import from langchain_community.document_loaders.base import BaseLoader RecordHandler = Callable[[Any, Optional[str]], Document] class AirbyteCDKLoader(BaseLoader...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@document_loaders@airbyte.py@.PATH_END.py
{ "filename": "_textcase.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/colorbar/tickfont/_textcase.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="surface.colorbar.tickfont", **kwargs ): super(TextcaseValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@colorbar@tickfont@_textcase.py@.PATH_END.py
{ "filename": "DataGeneration.py", "repo_name": "wlxu/RelicClass", "repo_path": "RelicClass_extracted/RelicClass-master/RealSpaceInterface/Calc2D/DataGeneration.py", "type": "Python" }
import logging import numpy as np import cv2 from Calc2D.rFourier import realFourier, realInverseFourier def GenerateGaussianData(sigma, size, points, A=1): xr = np.linspace(-size / 2.0, size / 2.0, points) yr = np.linspace(-size / 2.0, size / 2.0, points) step = xr[1] - xr[0] x, y = np.meshgrid( ...
wlxuREPO_NAMERelicClassPATH_START.@RelicClass_extracted@RelicClass-master@RealSpaceInterface@Calc2D@DataGeneration.py@.PATH_END.py
{ "filename": "emulator_analysis_convergence.py", "repo_name": "dylancromer/maszcal", "repo_path": "maszcal_extracted/maszcal-main/scripts/emulator_analysis_convergence.py", "type": "Python" }
import datetime import numpy as np import pathos.pools as pp from sklearn.gaussian_process.kernels import Matern import supercubos import maszcal.cosmology import maszcal.corrections import maszcal.data.sims import maszcal.data.obs import maszcal.density import maszcal.fitutils import maszcal.lensing import maszcal.lik...
dylancromerREPO_NAMEmaszcalPATH_START.@maszcal_extracted@maszcal-main@scripts@emulator_analysis_convergence.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pyzmq/py2/zmq/green/eventloop/__init__.py", "type": "Python" }
from zmq.green.eventloop.ioloop import IOLoop __all__ = ['IOLoop']
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pyzmq@py2@zmq@green@eventloop@__init__.py@.PATH_END.py
{ "filename": "msvc9compiler.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/distutils/msvc9compiler.py", "type": "Python" }
import os from distutils.msvc9compiler import MSVCCompiler as _MSVCCompiler from .system_info import platform_bits def _merge(old, new): """Concatenate two environment paths avoiding repeats. Here `old` is the environment string before the base class initialize function is called and `new` is the string...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@distutils@msvc9compiler.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermapbox/selected/marker/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._size import SizeValidator from ._opacity import OpacityValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_i...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermapbox@selected@marker@__init__.py@.PATH_END.py
{ "filename": "test_jump.py", "repo_name": "nanograv/PINT", "repo_path": "PINT_extracted/PINT-master/tests/test_jump.py", "type": "Python" }
"""Tests for jump model component """ import logging import os import pytest import pytest import astropy.units as u import numpy as np import pint.models.model_builder as mb import pint.toa as toa from pint.residuals import Residuals from pinttestdata import datadir from pint.models import parameter as p from pint....
nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@tests@test_jump.py@.PATH_END.py
{ "filename": "base.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/evaluation/exact_match/base.py", "type": "Python" }
import string from typing import Any, List from langchain.evaluation.schema import StringEvaluator class ExactMatchStringEvaluator(StringEvaluator): """Compute an exact match between the prediction and the reference. Examples ---------- >>> evaluator = ExactMatchChain() >>> evaluator.evaluate_st...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@evaluation@exact_match@base.py@.PATH_END.py
{ "filename": "test_erfinv.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/special/tests/test_erfinv.py", "type": "Python" }
import numpy as np from numpy.testing import assert_allclose, assert_equal import pytest import scipy.special as sc class TestInverseErrorFunction: def test_compliment(self): # Test erfcinv(1 - x) == erfinv(x) x = np.linspace(-1, 1, 101) assert_allclose(sc.erfcinv(1 - x), sc.erfinv(x), rt...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@special@tests@test_erfinv.py@.PATH_END.py
{ "filename": "_fresnel.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/surface/lighting/_fresnel.py", "type": "Python" }
import _plotly_utils.basevalidators class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="fresnel", parent_name="surface.lighting", **kwargs): super(FresnelValidator, 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@surface@lighting@_fresnel.py@.PATH_END.py
{ "filename": "calc_act_general.ipynb", "repo_name": "gomesdasilva/ACTIN2", "repo_path": "ACTIN2_extracted/ACTIN2-master/docs/calc_act_general.ipynb", "type": "Jupyter Notebook" }
## Using ACTIN with any spectra In this tutorial we will learn how to use `ACTIN` for spectrographs other than the ones included or when we only have access to wavelength and flux vectors. ```python from actin2 import ACTIN actin = ACTIN() ``` Let's use the test spectra that come with `ACTIN` as an example to extr...
gomesdasilvaREPO_NAMEACTIN2PATH_START.@ACTIN2_extracted@ACTIN2-master@docs@calc_act_general.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/utils/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This subpackage contains developer-oriented utilities used by Astropy. Public functions and classes in this subpackage are safe to be used by other packages, but this subpackage is for utilities that are primarily of use for developers or to implement...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@utils@__init__.py@.PATH_END.py
{ "filename": "test_grid.py", "repo_name": "nanograv/PINT", "repo_path": "PINT_extracted/PINT-master/tests/test_grid.py", "type": "Python" }
"""Test chi^2 gridding routines""" import concurrent.futures import pytest import astropy.units as u import numpy as np import pint.config import pint.gridutils import pint.models.parameter as param from pint.fitter import GLSFitter, WLSFitter, DownhillWLSFitter, DownhillGLSFitter from pint.models.model_builder impo...
nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@tests@test_grid.py@.PATH_END.py
{ "filename": "data.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/tests/test_optional/test_matplotlylib/data/data.py", "type": "Python" }
D = dict( x1=[0, 1, 2, 3, 4, 5], y1=[10, 20, 50, 80, 100, 200], x2=[0, 1, 2, 3, 4, 5, 6], y2=[1, 4, 8, 16, 32, 64, 128], )
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@tests@test_optional@test_matplotlylib@data@data.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "sdss/lvmagp", "repo_path": "lvmagp_extracted/lvmagp-main/python/lvmagp/guide/offset/__init__.py", "type": "Python" }
""" TODO: write docs """ __title__ = "Guide Offset" from .base import GuideOffset from .pwi import GuideOffsetPWI
sdssREPO_NAMElvmagpPATH_START.@lvmagp_extracted@lvmagp-main@python@lvmagp@guide@offset@__init__.py@.PATH_END.py
{ "filename": "snsedextend_README.md", "repo_name": "jpierel14/SNSED_Repository", "repo_path": "SNSED_Repository_extracted/SNSED_Repository-master/SEDs.H18-WFIRST/NON1A.H18-WFIRST/snsedextend_README.md", "type": "Markdown" }
J.R. Pierel & S.Rodney 2017.04.26 __SUMMARY__ Extrapolate SED up to J, H and K bands, allowing user to define V-J, V-H and/or V-K. Extrapolation is improvement upon previous method in that it chooses a linear slope such that the integration of the J (H,K) band will correspond to the user-defined V-J (V-H,V-K). The ...
jpierel14REPO_NAMESNSED_RepositoryPATH_START.@SNSED_Repository_extracted@SNSED_Repository-master@SEDs.H18-WFIRST@NON1A.H18-WFIRST@snsedextend_README.md@.PATH_END.py
{ "filename": "wrightomega.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/special/_precompute/wrightomega.py", "type": "Python" }
import numpy as np try: import mpmath except ImportError: pass def mpmath_wrightomega(x): return mpmath.lambertw(mpmath.exp(x), mpmath.mpf('-0.5')) def wrightomega_series_error(x): series = x desired = mpmath_wrightomega(x) return abs(series - desired) / desired def wrightomega_exp_error(...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@special@_precompute@wrightomega.py@.PATH_END.py
{ "filename": "test_resource.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/io/votable/tests/test_resource.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst # LOCAL import io from astropy.io.votable import parse from astropy.utils.data import get_pkg_data_filename def test_resource_groups(): # Read the VOTABLE votable = parse(get_pkg_data_filename("data/resource_groups.xml")) resource = votable...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@io@votable@tests@test_resource.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "threeML/hawc_hal", "repo_path": "hawc_hal_extracted/hawc_hal-master/hawc_hal/convenience_functions/__init__.py", "type": "Python" }
threeMLREPO_NAMEhawc_halPATH_START.@hawc_hal_extracted@hawc_hal-master@hawc_hal@convenience_functions@__init__.py@.PATH_END.py
{ "filename": "survey_paper.py", "repo_name": "gbrammer/unicorn", "repo_path": "unicorn_extracted/unicorn-master/survey_paper.py", "type": "Python" }
import os #import pyfits import astropy.io.fits as pyfits import numpy as np import glob import shutil import matplotlib.pyplot as plt USE_PLOT_GUI=False from matplotlib.figure import Figure from matplotlib.backends.backend_agg import FigureCanvasAgg import matplotlib import threedhst import threedhst.eazyPy as eaz...
gbrammerREPO_NAMEunicornPATH_START.@unicorn_extracted@unicorn-master@survey_paper.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/textfont/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter3d.textfont", **kwargs): super(ColorValidator, 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@scatter3d@textfont@_color.py@.PATH_END.py
{ "filename": "test_cache.py", "repo_name": "D-arioSpace/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/tests/test_cache.py", "type": "Python" }
import requests import os import pytest from time import mktime from datetime import datetime from astropy.config import paths from astroquery.query import QueryWithLogin from astroquery import cache_conf URL1 = "http://fakeurl.edu" URL2 = "http://fakeurl.ac.uk" TEXT1 = "Penguin" TEXT2 = "Walrus" def _create_res...
D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@tests@test_cache.py@.PATH_END.py
{ "filename": "riess2020.py", "repo_name": "ggalloni/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/H0/riess2020.py", "type": "Python" }
from cobaya.likelihoods.base_classes import H0 class riess2020(H0): r""" Local $H_0$ measurement from \cite{Riess:2020fzl}. """ pass
ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@H0@riess2020.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "cdslaborg/paramonte", "repo_path": "paramonte_extracted/paramonte-main/benchmark/fortran/pm_distUnif/setUnifRand_vs_random_number/main.py", "type": "Python" }
#!/usr/bin/env python import matplotlib.pyplot as plt import pandas as pd import numpy as np fontsize = 14 df = pd.read_csv("main.out") #################################################################################################################################### #### Plot the runtimes. #######################...
cdslaborgREPO_NAMEparamontePATH_START.@paramonte_extracted@paramonte-main@benchmark@fortran@pm_distUnif@setUnifRand_vs_random_number@main.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "annadeg/jwst-msafit", "repo_path": "jwst-msafit_extracted/jwst-msafit-main/msafit/__init__.py", "type": "Python" }
from . import fpa from . import model from . import fitting from . import lsf
annadegREPO_NAMEjwst-msafitPATH_START.@jwst-msafit_extracted@jwst-msafit-main@msafit@__init__.py@.PATH_END.py
{ "filename": "rayleigh.py", "repo_name": "pcubillos/pyratbay", "repo_path": "pyratbay_extracted/pyratbay-master/pyratbay/atmosphere/rayleigh/rayleigh.py", "type": "Python" }
# Copyright (c) 2021 Patricio Cubillos # Pyrat Bay is open-source software under the GNU GPL-2.0 license (see LICENSE) __all__ = [ 'Dalgarno', 'Lecavelier', ] import numpy as np from ... import tools as pt class Dalgarno(): """ Rayleigh-scattering model from Dalgarno (1962), Kurucz (1970), and Da...
pcubillosREPO_NAMEpyratbayPATH_START.@pyratbay_extracted@pyratbay-master@pyratbay@atmosphere@rayleigh@rayleigh.py@.PATH_END.py
{ "filename": "exp.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/testing/op_tests/exp.py", "type": "Python" }
# Copyright 2019 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@tensorflow@lite@testing@op_tests@exp.py@.PATH_END.py
{ "filename": "cloud_run_v2.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/integrations/prefect-gcp/prefect_gcp/models/cloud_run_v2.py", "type": "Python" }
import time from typing import Dict, List, Literal, Optional # noinspection PyProtectedMember from googleapiclient.discovery import Resource from pydantic import BaseModel, Field class SecretKeySelector(BaseModel): """ SecretKeySelector is a data model for specifying a GCP secret to inject into a Cloud R...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@integrations@prefect-gcp@prefect_gcp@models@cloud_run_v2.py@.PATH_END.py
{ "filename": "_value.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/heatmap/colorbar/tickformatstop/_value.py", "type": "Python" }
import _plotly_utils.basevalidators class ValueValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="value", parent_name="heatmap.colorbar.tickformatstop", **kwargs, ): super(ValueValidator, self).__init__( plotly_name=plo...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@heatmap@colorbar@tickformatstop@_value.py@.PATH_END.py