metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "test_waste_free_smc.py", "repo_name": "blackjax-devs/blackjax", "repo_path": "blackjax_extracted/blackjax-main/tests/smc/test_waste_free_smc.py", "type": "Python" }
"""Test the tempered SMC steps and routine""" import functools import chex import jax import jax.numpy as jnp import numpy as np import pytest from absl.testing import absltest import blackjax import blackjax.smc.resampling as resampling from blackjax import adaptive_tempered_smc, tempered_smc from blackjax.smc impo...
blackjax-devsREPO_NAMEblackjaxPATH_START.@blackjax_extracted@blackjax-main@tests@smc@test_waste_free_smc.py@.PATH_END.py
{ "filename": "_y0.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/box/_y0.py", "type": "Python" }
import _plotly_utils.basevalidators class Y0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="y0", parent_name="box", **kwargs): super(Y0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwargs.pop...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@box@_y0.py@.PATH_END.py
{ "filename": "crd_trans.py", "repo_name": "dullemond/radmc3d-2.0", "repo_path": "radmc3d-2.0_extracted/radmc3d-2.0-master/python/radmc3dPy/radmc3dPy/crd_trans.py", "type": "Python" }
""" This module contains functions for coordinate transformations (e.g. rotation). For help on the syntax or functionality of each function see the help of the individual functions """ from __future__ import absolute_import from __future__ import print_function import traceback try: import numpy as np except Impor...
dullemondREPO_NAMEradmc3d-2.0PATH_START.@radmc3d-2.0_extracted@radmc3d-2.0-master@python@radmc3dPy@radmc3dPy@crd_trans.py@.PATH_END.py
{ "filename": "test_st_prompt_list.py", "repo_name": "simonsobs/nextline-rdb", "repo_path": "nextline-rdb_extracted/nextline-rdb-main/src/nextline_rdb/models/strategies/tests/test_st_prompt_list.py", "type": "Python" }
from typing import Optional, TypedDict from hypothesis import Phase, given, note, settings from hypothesis import strategies as st from nextline_test_utils import safe_compare as sc from nextline_test_utils.strategies import st_none_or, st_ranges from ... import Model, Run from .. import ( st_model_prompt_list, ...
simonsobsREPO_NAMEnextline-rdbPATH_START.@nextline-rdb_extracted@nextline-rdb-main@src@nextline_rdb@models@strategies@tests@test_st_prompt_list.py@.PATH_END.py
{ "filename": "helpers.py", "repo_name": "spacetelescope/calcos", "repo_path": "calcos_extracted/calcos-master/tests/helpers.py", "type": "Python" }
"""CALCOS regression test helpers.""" import os import sys import pytest from ci_watson.artifactory_helpers import get_bigdata from ci_watson.hst_helpers import raw_from_asn, ref_from_image, download_crds from astropy.io import fits from astropy.io.fits import FITSDiff __all__ = ['calref_from_image', 'BaseCOS'] d...
spacetelescopeREPO_NAMEcalcosPATH_START.@calcos_extracted@calcos-master@tests@helpers.py@.PATH_END.py
{ "filename": "find_stars.py", "repo_name": "ucl-exoplanets/pylightcurve", "repo_path": "pylightcurve_extracted/pylightcurve-master/pylightcurve/images/find_stars.py", "type": "Python" }
__all__ = ['find_single_star'] import numpy as np import warnings from pylightcurve.analysis.gaussian import fit_two_d_gaussian from pylightcurve.analysis.distributions import one_d_distribution def find_single_star(data_array, predicted_x, predicted_y, mean=None, std=None, burn_limit=65000, star_std=2, ...
ucl-exoplanetsREPO_NAMEpylightcurvePATH_START.@pylightcurve_extracted@pylightcurve-master@pylightcurve@images@find_stars.py@.PATH_END.py
{ "filename": "Useful_Utilities.ipynb", "repo_name": "LSSTDESC/rail", "repo_path": "rail_extracted/rail-main/examples/core_examples/Useful_Utilities.ipynb", "type": "Jupyter Notebook" }
# Useful Utilities **Authors:** Olivia Lynn **Last Run Successfully:** September 20, 2023 This is a notebook that contains various utilities that may be used when working with RAIL. ## Setting Things Up ```python import rail ``` ### Listing imported stages (1/2) Let's list out our currently imported stages. Rig...
LSSTDESCREPO_NAMErailPATH_START.@rail_extracted@rail-main@examples@core_examples@Useful_Utilities.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ahmedfgad/GeneticAlgorithmPython", "repo_path": "GeneticAlgorithmPython_extracted/GeneticAlgorithmPython-master/pygad/utils/__init__.py", "type": "Python" }
from pygad.utils import parent_selection from pygad.utils import crossover from pygad.utils import mutation from pygad.utils import nsga2 __version__ = "1.2.1"
ahmedfgadREPO_NAMEGeneticAlgorithmPythonPATH_START.@GeneticAlgorithmPython_extracted@GeneticAlgorithmPython-master@pygad@utils@__init__.py@.PATH_END.py
{ "filename": "test_special.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/tests/ops/test_special.py", "type": "Python" }
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import pytest import torch from scipy.special import iv from torch import tensor from torch.autograd import grad from pyro.ops.special import get_quad_rule, log_beta, log_binomial, log_I1, safe_log from tests.common import assert_equa...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@tests@ops@test_special.py@.PATH_END.py
{ "filename": "scanner.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/scanner.py", "type": "Python" }
""" pygments.scanner ~~~~~~~~~~~~~~~~ This library implements a regex based scanner. Some languages like Pascal are easy to parse but have some keywords that depend on the context. Because of this it's impossible to lex that just by using a regular expression lexer like the `RegexLexer`. ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@scanner.py@.PATH_END.py
{ "filename": "clusters.py", "repo_name": "ICRAR/shark", "repo_path": "shark_extracted/shark-master/standard_plots/clusters.py", "type": "Python" }
# # ICRAR - International Centre for Radio Astronomy Research # (c) UWA - The University of Western Australia, 2018 # Copyright by UWA (in the framework of the ICRAR) # # 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 Fre...
ICRARREPO_NAMEsharkPATH_START.@shark_extracted@shark-master@standard_plots@clusters.py@.PATH_END.py
{ "filename": "filters.py", "repo_name": "astro-informatics/s2wav", "repo_path": "s2wav_extracted/s2wav-main/s2wav/filters.py", "type": "Python" }
from jax import jit import jax.numpy as jnp import torch import numpy as np from typing import Tuple from functools import partial from s2wav import samples def filters_axisym( L: int, J_min: int = 0, lam: float = 2.0 ) -> Tuple[np.ndarray, np.ndarray]: r"""Computes wavelet kernels :math:`\Psi^j_{\ell m}` and...
astro-informaticsREPO_NAMEs2wavPATH_START.@s2wav_extracted@s2wav-main@s2wav@filters.py@.PATH_END.py
{ "filename": "saveable_object.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/training/saving/saveable_object.py", "type": "Python" }
# Copyright 2015 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@python@training@saving@saveable_object.py@.PATH_END.py
{ "filename": "test_bookkeeping.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/core/tests/test_bookkeeping.py", "type": "Python" }
# pytest suite """ Tests for primitives_bookkeeping. This is a suite of tests to be run with pytest. To run: 1) Set the environment variable GEMPYTHON_TESTDATA to the path that contains the directories with the test data. Eg. /net/chara/data2/pub/gempython_testdata/ 2) From the ??? (location): p...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@core@tests@test_bookkeeping.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ggmichael/craterstats", "repo_path": "craterstats_extracted/craterstats-main/src/craterstats/sample/__init__.py", "type": "Python" }
ggmichaelREPO_NAMEcraterstatsPATH_START.@craterstats_extracted@craterstats-main@src@craterstats@sample@__init__.py@.PATH_END.py
{ "filename": "pi_pi_eta.py", "repo_name": "LoganAMorrison/Hazma", "repo_path": "Hazma_extracted/Hazma-master/hazma/vector_mediator/form_factors/pi_pi_eta.py", "type": "Python" }
""" F_{eta,pi,pi} = (1/Z) * BW(s, 0) [ a0*e^{i*p0}BW(q^2,0) + a1*e^{i*p1}BW(q^2,1) + a2*e^{i*p2}BW(q^2,2) ] Z = a0*e^{i*p0} + a1*e^{i*p1} + a2*e^{i*p2} """ from dataclasses import dataclass import numpy as np from scipy.integrate import quad from .cross_sections import width_to_cs from hazma.utils impo...
LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@hazma@vector_mediator@form_factors@pi_pi_eta.py@.PATH_END.py
{ "filename": "_legendgrouptitle.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/_legendgrouptitle.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="scattercarpet", **kwargs ): super(LegendgrouptitleValidator, self).__init__( plotly_name=plotly_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@_legendgrouptitle.py@.PATH_END.py
{ "filename": "make_figure_07.ipynb", "repo_name": "tcallister/learning-p-det", "repo_path": "learning-p-det_extracted/learning-p-det-main/figures/make_figure_07.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl import matplotlib.ticker mpl.style.use("plotting.mplstyle") import pandas as pd import sys sys.path.append('./../../pdet/') from pdet.emulator import * sys.path.append("./../code/") from training_routines import * from draw_new_inject...
tcallisterREPO_NAMElearning-p-detPATH_START.@learning-p-det_extracted@learning-p-det-main@figures@make_figure_07.ipynb@.PATH_END.py
{ "filename": "io.py", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/flax/io.py", "type": "Python" }
# Copyright 2024 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@flax@io.py@.PATH_END.py
{ "filename": "data_structures.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/frontends/exodus_ii/data_structures.py", "type": "Python" }
import numpy as np from yt.data_objects.index_subobjects.unstructured_mesh import UnstructuredMesh from yt.data_objects.static_output import Dataset from yt.data_objects.unions import MeshUnion from yt.funcs import setdefaultattr from yt.geometry.unstructured_mesh_handler import UnstructuredIndex from yt.utilities.fil...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@exodus_ii@data_structures.py@.PATH_END.py
{ "filename": "DQ_definitions.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/gemini/lookups/DQ_definitions.py", "type": "Python" }
import numpy as np datatype = np.uint16 max = np.iinfo(datatype).max good = datatype(0) bad_pixel = datatype(1) non_linear = datatype(2) saturated = datatype(4) cosmic_ray = datatype(8) no_data = datatype(16) overlap = datatype(32) unilluminated = datatype(64) fail = bad_pixel | saturated | cosmic_ray | no_data not_...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@gemini@lookups@DQ_definitions.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/wcs/wcsapi/utils.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import importlib import numpy as np __all__ = ["deserialize_class", "wcs_info_str"] def deserialize_class(tpl, construct=True): """ Deserialize classes recursively. """ if not isinstance(tpl, tuple) or len(tpl) != 3: raise Valu...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@wcs@wcsapi@utils.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "tvwenger/kd", "repo_path": "kd_extracted/kd-master/setup.py", "type": "Python" }
""" Copyright(C) 2017-2021 by Trey V. Wenger; tvwenger@gmail.com GNU General Public License v3 (GNU GPLv3) 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 you...
tvwengerREPO_NAMEkdPATH_START.@kd_extracted@kd-master@setup.py@.PATH_END.py
{ "filename": "increasebuffer.py", "repo_name": "CosmicFish/CosmicFish", "repo_path": "CosmicFish_extracted/CosmicFish-master/bundled/doxygen/src/increasebuffer.py", "type": "Python" }
# Since the internal token buffer of a generated flex file is hardcoded # to 16K, this script is used to increase the buffer size of a flex # generated scanner to 256K. import sys sys.stdout.write(sys.stdin.read(). replace('YY_BUF_SIZE 16384','YY_BUF_SIZE 262144'). replace('YY_READ_BUF_SIZE 8192','YY_READ_BUF_S...
CosmicFishREPO_NAMECosmicFishPATH_START.@CosmicFish_extracted@CosmicFish-master@bundled@doxygen@src@increasebuffer.py@.PATH_END.py
{ "filename": "_name.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/image/_name.py", "type": "Python" }
import _plotly_utils.basevalidators class NameValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="name", parent_name="layout.image", **kwargs): super(NameValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ed...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@image@_name.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ESDS-Leipzig/sen2nbar", "repo_path": "sen2nbar_extracted/sen2nbar-main/sen2nbar/__init__.py", "type": "Python" }
"""sen2nbar - Nadir BRDF Adjusted Reflectance (NBAR) for Sentinel-2 in Python""" __version__ = "2024.6.0" __author__ = "David Montero Loaiza <dml.mont@gmail.com>" __all__ = [] from . import *
ESDS-LeipzigREPO_NAMEsen2nbarPATH_START.@sen2nbar_extracted@sen2nbar-main@sen2nbar@__init__.py@.PATH_END.py
{ "filename": "_h_e_a_d.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/fonttools/fontTools/ttLib/tables/_h_e_a_d.py", "type": "Python" }
from fontTools.misc import sstruct from fontTools.misc.fixedTools import floatToFixedToStr, strToFixedToFloat from fontTools.misc.textTools import safeEval, num2binary, binary2num from fontTools.misc.timeTools import ( timestampFromString, timestampToString, timestampNow, ) from fontTools.misc.timeTools imp...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@fonttools@fontTools@ttLib@tables@_h_e_a_d.py@.PATH_END.py
{ "filename": "bayesian.ipynb", "repo_name": "sotzee/CPREX", "repo_path": "CPREX_extracted/CPREX-main/bayesian.ipynb", "type": "Jupyter Notebook" }
```python ``` ```python import numpy as np import scipy import toolbox import unitconvert from matplotlib_rc import * from load_all_data import * from cov import cov_ellipse_xy from pdf_plot import get_kde_1D,get_kde_2D,plot_density_2D Fw_exp=np.array([0.1304,0.368]) Fw_sig2=np.array([0.0052**2+0.002**2,0.013**2]...
sotzeeREPO_NAMECPREXPATH_START.@CPREX_extracted@CPREX-main@bayesian.ipynb@.PATH_END.py
{ "filename": "AmoebaFitter.py", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/source/AmoebaFitter.py", "type": "Python" }
import numpy as numpy import math from . import Tools from .MaxLikelihoodFitter import MaxLikelihoodFitter from .AnnealingAmoeba import AnnealingAmoeba __author__ = "Do Kester" __year__ = 2023 __license__ = "GPL3" __version__ = "3.1.0" __url__ = "https://www.bayesicfitting.nl" __status__ = "Perpetual Beta" # * # *...
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@source@AmoebaFitter.py@.PATH_END.py
{ "filename": "_xref.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/colorbar/_xref.py", "type": "Python" }
import _plotly_utils.basevalidators class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="surface.colorbar", **kwargs): super(XrefValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@colorbar@_xref.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "bwinkel/cygrid", "repo_path": "cygrid_extracted/cygrid-master/cygrid/__init__.py", "type": "Python" }
from .cygrid import * from .healpix import * from .hphashtab import * from .helpers import * from .mock import * from .init_testrunner import * from .version import version __version__ = version
bwinkelREPO_NAMEcygridPATH_START.@cygrid_extracted@cygrid-master@cygrid@__init__.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "Keck-DataReductionPipelines/KPF-Pipeline", "repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/setup.py", "type": "Python" }
from setuptools import setup, find_packages import re def get_property(prop, project): result = re.search(r'{}\s*=\s*[\'"]([^\'"]*)[\'"]'.format(prop), open(project + '/__init__.py').read()) return result.group(1) # reqs = [] # for line in open('requirements.txt', 'r').readlines(): # ...
Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@KPF-Pipeline-master@setup.py@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymap/legendgrouptitle/font/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="densitymap.legendgrouptitle.font", **kwargs, ): super(LinepositionValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymap@legendgrouptitle@font@_lineposition.py@.PATH_END.py
{ "filename": "test_orders.py", "repo_name": "chandra-marx/marxs", "repo_path": "marxs_extracted/marxs-main/marxs/missions/arcus/tests/test_orders.py", "type": "Python" }
# Licensed under GPL version 3 - see LICENSE.rst import numpy as np from marxs.source import PointSource, FixedPointing import astropy.units as u from astropy.coordinates import SkyCoord from marxs.math.utils import xyz2zxy from .. import Arcus import pytest e = 0.5 * u.keV mysource = PointSource(coords=SkyCoord(30...
chandra-marxREPO_NAMEmarxsPATH_START.@marxs_extracted@marxs-main@marxs@missions@arcus@tests@test_orders.py@.PATH_END.py
{ "filename": "kep51_posterior_vs_emcee.ipynb", "repo_name": "kemasuda/jnkepler", "repo_path": "jnkepler_extracted/jnkepler-main/examples/comparison_with_ttvfast+emcee/kep51_posterior_vs_emcee.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import matplotlib.pyplot as plt import dill import corner import pandas as pd ``` ```python import seaborn as sns sns.set(style='ticks', font_scale=1.6, font='times') plt.rcParams["figure.figsize"] = (12,6) from matplotlib import rc rc('text', usetex=True) ``` ```python #hmc = dill.loa...
kemasudaREPO_NAMEjnkeplerPATH_START.@jnkepler_extracted@jnkepler-main@examples@comparison_with_ttvfast+emcee@kep51_posterior_vs_emcee.ipynb@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcats/tickfont/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="parcats.tickfont", **kwargs ): super(LinepositionValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcats@tickfont@_lineposition.py@.PATH_END.py
{ "filename": "_colorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermap/cluster/_colorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattermap.cluster", **kwargs ): super(ColorsrcValidator, self).__init__( plotly_name=plotly_name, parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermap@cluster@_colorsrc.py@.PATH_END.py
{ "filename": "gasBinning.py", "repo_name": "GBTAmmoniaSurvey/GAS", "repo_path": "GAS_extracted/GAS-master/GAS/gasBinning.py", "type": "Python" }
import numpy as np from GAS.gridregion import channelShift import scipy.ndimage as nd import astropy.units as u from spectral_cube import SpectralCube from GAS import voronoi_2d_binning as v2d def BinByMask(DataCube, Mask = None, CentroidMap = None, CentroidAggregator = np.nanmean, x = None, y = None): ...
GBTAmmoniaSurveyREPO_NAMEGASPATH_START.@GAS_extracted@GAS-master@GAS@gasBinning.py@.PATH_END.py
{ "filename": "common.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/misc/common.py", "type": "Python" }
""" Functions which are common and require SciPy Base and Level 1 SciPy (special, linalg) """ from __future__ import division, print_function, absolute_import from numpy import arange, newaxis, hstack, product, array, fromstring __all__ = ['central_diff_weights', 'derivative', 'ascent', 'face'] def central_diff_we...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@misc@common.py@.PATH_END.py
{ "filename": "chat_template.py", "repo_name": "OpenAccess-AI-Collective/axolotl", "repo_path": "axolotl_extracted/axolotl-main/src/axolotl/prompt_strategies/chat_template.py", "type": "Python" }
""" HF Chat Templates prompt strategy """ import logging from typing import Any, Dict, List, Optional from transformers import ProcessorMixin from axolotl.prompt_tokenizers import PromptTokenizingStrategy from axolotl.prompters import IGNORE_TOKEN_ID, Prompter from axolotl.utils.chat_templates import get_chat_templa...
OpenAccess-AI-CollectiveREPO_NAMEaxolotlPATH_START.@axolotl_extracted@axolotl-main@src@axolotl@prompt_strategies@chat_template.py@.PATH_END.py
{ "filename": "loss.py", "repo_name": "Herculens/herculens", "repo_path": "herculens_extracted/herculens-main/herculens/Inference/legacy/loss.py", "type": "Python" }
# Defines the full loss function, from likelihood, prior and regularization terms # # Copyright (c) 2021, herculens developers and contributors __author__ = 'aymgal', 'austinpeel' import numpy as np import jax.numpy as jnp from jax import jit from herculens.Inference.legacy.base_differentiable import Differentiabl...
HerculensREPO_NAMEherculensPATH_START.@herculens_extracted@herculens-main@herculens@Inference@legacy@loss.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/arima/tests/__init__.py", "type": "Python" }
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@arima@tests@__init__.py@.PATH_END.py
{ "filename": "_minor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/yaxis/_minor.py", "type": "Python" }
import _plotly_utils.basevalidators class MinorValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="minor", parent_name="layout.yaxis", **kwargs): super(MinorValidator, 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@yaxis@_minor.py@.PATH_END.py
{ "filename": "anis_coefficients.py", "repo_name": "nanograv/enterprise", "repo_path": "enterprise_extracted/enterprise-master/enterprise/signals/anis_coefficients.py", "type": "Python" }
# anis_coefficients.py import healpy as hp import numpy as np import scipy.special as ss """ Script to compute the correlation basis-functions for various anisotropic configurations of the GW background energy-density -- Rutger van Haasteren (June 2014) -- Stephen Taylor (modifications, February 2016) """ def re...
nanogravREPO_NAMEenterprisePATH_START.@enterprise_extracted@enterprise-master@enterprise@signals@anis_coefficients.py@.PATH_END.py
{ "filename": "draw_contri_CO2.py", "repo_name": "fjdu/rac-2d", "repo_path": "rac-2d_extracted/rac-2d-master/utils_python/draw/draw_contri_CO2.py", "type": "Python" }
from matplotlib import * use('Agg') from matplotlib.pyplot import * from numpy import * from os.path import join as opj from glob import glob from parse_ana import * from long_function_definitions import * from my_script import * import drawing mycm = make_my_colormap(c_list=[(0.0, (0.5, 0.0, 0.5)), ...
fjduREPO_NAMErac-2dPATH_START.@rac-2d_extracted@rac-2d-master@utils_python@draw@draw_contri_CO2.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "djones1040/PythonPhot", "repo_path": "PythonPhot_extracted/PythonPhot-master/README.md", "type": "Markdown" }
PythonPhot PSF Fitting Photometry Tutorial ========= getpsf.py : Generates a point-spread function (PSF) from observed stars at specified locations. Uses the family of "peak fit" modules (pkfit, pkfit_noise, pkfit_norecent, etc) to fit a gaussian to each star and define an array of non-gaussian psf residu...
djones1040REPO_NAMEPythonPhotPATH_START.@PythonPhot_extracted@PythonPhot-master@README.md@.PATH_END.py
{ "filename": "GoodnessOfFitSingleResult.py", "repo_name": "freelunchtheorem/Conditional_Density_Estimation", "repo_path": "Conditional_Density_Estimation_extracted/Conditional_Density_Estimation-master/cde/model_fitting/GoodnessOfFitSingleResult.py", "type": "Python" }
from collections import OrderedDict import types class GoodnessOfFitSingleResult: def __init__(self, estimator_params, probabilistic_model_params, x_cond=None): self.cond_values = x_cond self.time_to_fit = None self.time_to_predict = None self.ndim_x = estimator_params["ndim_x"] self.ndim_y = e...
freelunchtheoremREPO_NAMEConditional_Density_EstimationPATH_START.@Conditional_Density_Estimation_extracted@Conditional_Density_Estimation-master@cde@model_fitting@GoodnessOfFitSingleResult.py@.PATH_END.py
{ "filename": "_xhoverformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/_xhoverformat.py", "type": "Python" }
import _plotly_utils.basevalidators class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="scatter3d", **kwargs): super(XhoverformatValidator, self).__init__( plotly_name=plotly_name, parent_name=parent...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@_xhoverformat.py@.PATH_END.py
{ "filename": "_nticks.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcoords/line/colorbar/_nticks.py", "type": "Python" }
import _plotly_utils.basevalidators class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="parcoords.line.colorbar", **kwargs ): super(NticksValidator, self).__init__( plotly_name=plotly_name, parent_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcoords@line@colorbar@_nticks.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/extern/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This packages contains python packages that are bundled with Astropy but are external to Astropy, and hence are developed in a separate source tree. Note that this package is distinct from the /cextern directory of the source code distribution, as tha...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@extern@__init__.py@.PATH_END.py
{ "filename": "_steps.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/slider/_steps.py", "type": "Python" }
import _plotly_utils.basevalidators class StepsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__(self, plotly_name="steps", parent_name="layout.slider", **kwargs): super(StepsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@slider@_steps.py@.PATH_END.py
{ "filename": "types.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/third_party/xla/xla/mlir_hlo/tests/python/types.py", "type": "Python" }
# Copyright 2021 The OpenXLA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@third_party@xla@xla@mlir_hlo@tests@python@types.py@.PATH_END.py
{ "filename": "E12_not_first.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/parso/py3/tests/normalizer_issue_files/E12_not_first.py", "type": "Python" }
# The issue numbers described in this file are part of the pycodestyle tracker # and not of parso. # Originally there were no issues in here, I (dave) added the ones that were # necessary and IMO useful. if ( x == ( 3 ) or y == 4): pass y = x == 2 \ or x == 3 #: E129+1:4 if...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@parso@py3@tests@normalizer_issue_files@E12_not_first.py@.PATH_END.py
{ "filename": "asciiheader.py", "repo_name": "spacetelescope/stsdas_stripped", "repo_path": "stsdas_stripped_extracted/stsdas_stripped-master/stsdas/pkg/analysis/slitless/axe/axe_asciidata/asciiheader.py", "type": "Python" }
""" Various header classes to be part of the asciidata class @author: Martin Kuemmel, Jonas Haase @organization: Space Telescope - European Coordinating Facility (ST-ECF) @license: Gnu Public Licence @contact: mkuemmel@eso.org @since: 2005/09/13 $LastChangedBy: mkuemmel $ $LastChangedDate: 2008-07-03 10:27:47 +0200 (...
spacetelescopeREPO_NAMEstsdas_strippedPATH_START.@stsdas_stripped_extracted@stsdas_stripped-master@stsdas@pkg@analysis@slitless@axe@axe_asciidata@asciiheader.py@.PATH_END.py
{ "filename": "benchmarks.py", "repo_name": "tardis-sn/tardis", "repo_path": "tardis_extracted/tardis-main/asv/benchmarks/benchmarks.py", "type": "Python" }
# Write the benchmarking functions here. # See "Writing benchmarks" in the asv docs for more information. import numpy as np from tardis.tests import montecarlo_test_wrappers as montecarlo LINE_SIZE = 10000000 class TimeSuite: """ An example benchmark that times the performance of various kinds of itera...
tardis-snREPO_NAMEtardisPATH_START.@tardis_extracted@tardis-main@asv@benchmarks@benchmarks.py@.PATH_END.py
{ "filename": "renderer.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/contourpy/contourpy/util/renderer.py", "type": "Python" }
from __future__ import annotations from abc import ABC, abstractmethod from typing import TYPE_CHECKING, Any import numpy as np if TYPE_CHECKING: import io from numpy.typing import ArrayLike from contourpy._contourpy import CoordinateArray, FillReturn, FillType, LineReturn, LineType class Renderer(AB...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@contourpy@contourpy@util@renderer.py@.PATH_END.py
{ "filename": "pk_desi_mock_challenge_handshake.py", "repo_name": "Samreay/Barry", "repo_path": "Barry_extracted/Barry-master/config/desi_mock_challenge/pk_desi_mock_challenge_handshake.py", "type": "Python" }
import sys import os import pandas as pd from scipy.interpolate import interp1d from scipy.stats import norm import numpy as np sys.path.append("..") from barry.datasets.dataset_power_spectrum import PowerSpectrum_DESIMockChallenge_Handshake from barry.cosmology.camb_generator import getCambGenerator from barry.confi...
SamreayREPO_NAMEBarryPATH_START.@Barry_extracted@Barry-master@config@desi_mock_challenge@pk_desi_mock_challenge_handshake.py@.PATH_END.py
{ "filename": "ac_calc_ind.py", "repo_name": "gomesdasilva/ACTIN", "repo_path": "ACTIN_extracted/ACTIN-master/actin/actin_files/ac_calc_ind.py", "type": "Python" }
#!/usr/bin/env python # compatibility with python 2/3: from __future__ import print_function from __future__ import division import os, sys ### test import numpy as np # ACTIN FILES import ac_settings as ac_set import ac_get_win def check_lines(wave, sel_lines, verb=False): """ Tests if the selected lines ...
gomesdasilvaREPO_NAMEACTINPATH_START.@ACTIN_extracted@ACTIN-master@actin@actin_files@ac_calc_ind.py@.PATH_END.py
{ "filename": "Main.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/cython/Cython/Compiler/Main.py", "type": "Python" }
# # Cython Top Level # from __future__ import absolute_import import os import re import sys import io if sys.version_info[:2] < (2, 6) or (3, 0) <= sys.version_info[:2] < (3, 3): sys.stderr.write("Sorry, Cython requires Python 2.6+ or 3.3+, found %d.%d\n" % tuple(sys.version_info[:2])) sys.exit(1) try: ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@cython@Cython@Compiler@Main.py@.PATH_END.py
{ "filename": "base.py", "repo_name": "mj-will/nessai", "repo_path": "nessai_extracted/nessai-main/src/nessai/reparameterisations/base.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Base reparameterisation """ import logging import numpy as np logger = logging.getLogger(__name__) class Reparameterisation: """ Base object for reparameterisations. Parameters ---------- parameters : str or list Name of parameters to reparameterise. pri...
mj-willREPO_NAMEnessaiPATH_START.@nessai_extracted@nessai-main@src@nessai@reparameterisations@base.py@.PATH_END.py
{ "filename": "test_Galactic.py", "repo_name": "nanograv/PINT", "repo_path": "PINT_extracted/PINT-master/tests/test_Galactic.py", "type": "Python" }
import logging import os import pytest import astropy.units as u import pint.models.model_builder as mb from pinttestdata import datadir from pint import utils import astropy.coordinates import astropy.time class TestGalactic: """Test conversion from equatorial/ecliptic -> Galactic coordinates as astropy objec...
nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@tests@test_Galactic.py@.PATH_END.py
{ "filename": "chunked_dataset.py", "repo_name": "ML4GW/ml4gw", "repo_path": "ml4gw_extracted/ml4gw-main/ml4gw/dataloading/chunked_dataset.py", "type": "Python" }
from collections.abc import Iterable import torch from ml4gw.types import WaveformTensor class ChunkedTimeSeriesDataset(torch.utils.data.IterableDataset): """ Wrapper dataset that will loop through chunks of timeseries data produced by another iterable and sample windows from these chunks. Args...
ML4GWREPO_NAMEml4gwPATH_START.@ml4gw_extracted@ml4gw-main@ml4gw@dataloading@chunked_dataset.py@.PATH_END.py
{ "filename": "LRS2_reduction_README.md", "repo_name": "BrianaLane/LRS2_reduction", "repo_path": "LRS2_reduction_extracted/LRS2_reduction-master/LRS2_reduction_README.md", "type": "Markdown" }
================================== # Instructions for LRS2 Reduction ================================== - This file contains instructions for running CURE based reductions for LRS2 using the python script reduction_wrapper_lrs2.py - For more information about CURE refer to the the CURE page on the HETDEX wiki: http...
BrianaLaneREPO_NAMELRS2_reductionPATH_START.@LRS2_reduction_extracted@LRS2_reduction-master@LRS2_reduction_README.md@.PATH_END.py
{ "filename": "_openpyxl.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/io/excel/_openpyxl.py", "type": "Python" }
from __future__ import annotations import mmap from typing import ( TYPE_CHECKING, Any, cast, ) import numpy as np from pandas.compat._optional import import_optional_dependency from pandas.util._decorators import doc from pandas.core.shared_docs import _shared_docs from pandas.io.excel._base import ( ...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@io@excel@_openpyxl.py@.PATH_END.py
{ "filename": "plot_IT1.py", "repo_name": "galtay/sphray", "repo_path": "sphray_extracted/sphray-master/analysis/plot_IT1.py", "type": "Python" }
import sphray_io import numpy as np import matplotlib.pyplot as plt #==================================================================== # define input parameters #==================================================================== snapdir = "../../sphray_output/IT1_N64/r6" snapbase = "snap" snapnum = 1 snapnumst...
galtayREPO_NAMEsphrayPATH_START.@sphray_extracted@sphray-master@analysis@plot_IT1.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "lsst/rubin_sim", "repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/stackers/__init__.py", "type": "Python" }
from .base_stacker import * from .coord_stackers import * from .date_stackers import * from .general_stackers import * from .get_col_info import * from .label_stackers import * from .m5_optimal_stacker import * from .mo_stackers import * from .n_follow_stacker import * from .neo_dist_stacker import * from .sdss_stacker...
lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@stackers@__init__.py@.PATH_END.py
{ "filename": "_legendgrouptitle.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/_legendgrouptitle.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="scatter", **kwargs): super(LegendgrouptitleValidator, self).__init__( plotly_name=plotly_name, parent...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@_legendgrouptitle.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "lmytime/MyFilter", "repo_path": "MyFilter_extracted/MyFilter-main/README.md", "type": "Markdown" }
# MyFilter [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10210201.svg)](https://doi.org/10.5281/zenodo.10210201) MyFilter is a web app that provides interactive visualization of astronomical filters' transmission curves. ## Demo A live demo of the app can be viewed here: https://preview.lmytime.com/myfilter J...
lmytimeREPO_NAMEMyFilterPATH_START.@MyFilter_extracted@MyFilter-main@README.md@.PATH_END.py
{ "filename": "delete_jobs.py", "repo_name": "CobayaSampler/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/grid_tools/delete_jobs.py", "type": "Python" }
import subprocess import shutil from . import batchjob_args, jobqueue def delete_jobs(args=None): opts = batchjob_args.BatchArgs('Delete running or queued jobs', importance=True, batchPathOptional=True) group = opts.parser.add_mutually_exclusive_group() group.add_argume...
CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@grid_tools@delete_jobs.py@.PATH_END.py
{ "filename": "_hovertemplatesrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/box/_hovertemplatesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="box", **kwargs): super(HovertemplatesrcValidator, self).__init__( plotly_name=plotly_name, parent_name=par...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@box@_hovertemplatesrc.py@.PATH_END.py
{ "filename": "load.py", "repo_name": "silkemaes/MACE", "repo_path": "MACE_extracted/MACE-main/src/mace/load.py", "type": "Python" }
''' This script loads a trained MACE model and provides the user with the possibility to apply (test) the model on a test dataset. The class Trained_MACE() contains the loaded model, together with the training and test losses, and the meta data. ''' import src.mace.utils as utils import src.mace.loss ...
silkemaesREPO_NAMEMACEPATH_START.@MACE_extracted@MACE-main@src@mace@load.py@.PATH_END.py
{ "filename": "_yhoverformat.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/mesh3d/_yhoverformat.py", "type": "Python" }
import _plotly_utils.basevalidators class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="mesh3d", **kwargs): super(YhoverformatValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@mesh3d@_yhoverformat.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/marker/_line.py", "type": "Python" }
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scatter3d.marker", **kwargs): super(LineValidator, 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@marker@_line.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "CobayaSampler/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/planck_2015_plikHM_TT/__init__.py", "type": "Python" }
from cobaya.likelihoods.base_classes import Planck2015Clik class planck_2015_plikHM_TT(Planck2015Clik): r""" High-$\ell$ temperature-only likelihood (binned) of Planck's 2015 data release \cite{Aghanim:2015xee}. """ pass
CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@planck_2015_plikHM_TT@__init__.py@.PATH_END.py
{ "filename": "bbox_transform.py", "repo_name": "chenwuperth/rgz_rcnn", "repo_path": "rgz_rcnn_extracted/rgz_rcnn-master/lib/fast_rcnn/bbox_transform.py", "type": "Python" }
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # # Modified by Chen Wu (chen.wu@icrar.org) # -------------------------------------------------------- import numpy as np def bbo...
chenwuperthREPO_NAMErgz_rcnnPATH_START.@rgz_rcnn_extracted@rgz_rcnn-master@lib@fast_rcnn@bbox_transform.py@.PATH_END.py
{ "filename": "parameters_validator.py", "repo_name": "Kamuish/archi", "repo_path": "archi_extracted/archi-master/pyarchi/utils/misc/parameters_validator.py", "type": "Python" }
import os def parameters_validator(**kwargs): """ Loads the configuration parameters from the .yaml file. After loading, it checks some of the parameters to see if they have valid values. Parameters ---------- parameters Returns ------- """ wrong_params = [] warnings = ...
KamuishREPO_NAMEarchiPATH_START.@archi_extracted@archi-master@pyarchi@utils@misc@parameters_validator.py@.PATH_END.py
{ "filename": "_templateitemname.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_templateitemname.py", "type": "Python" }
import _plotly_utils.basevalidators class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="indicator.gauge.axis.tickformatstop", **kwargs, ): super(TemplateitemnameValidator, self)....
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@indicator@gauge@axis@tickformatstop@_templateitemname.py@.PATH_END.py
{ "filename": "paths.py", "repo_name": "ChrisBoettner/plato", "repo_path": "plato_extracted/plato-main/plato/utils/paths.py", "type": "Python" }
import os def get_abspath() -> str: """ Get the absolute path of the plato (main) directory. Returns ------- str Absolute path of the plato (main) directory. """ return ( os.path.abspath(__file__)[: os.path.abspath(__file__).find("plato")] + "plato/" )
ChrisBoettnerREPO_NAMEplatoPATH_START.@plato_extracted@plato-main@plato@utils@paths.py@.PATH_END.py
{ "filename": "CPU.py", "repo_name": "classULDM/class.VFDM", "repo_path": "class.VFDM_extracted/class.VFDM-master/CPU.py", "type": "Python" }
#!/usr/bin/env python """ .. module:: CPU :synopsis: CPU, a CLASS Plotting Utility .. moduleauthor:: Benjamin Audren <benjamin.audren@gmail.com> .. credits:: Benjamin Audren, Jesus Torrado .. version:: 2.0 This is a small python program aimed to gain time when comparing two spectra, e.g. from CAMB and CLASS, or a ...
classULDMREPO_NAMEclass.VFDMPATH_START.@class.VFDM_extracted@class.VFDM-master@CPU.py@.PATH_END.py
{ "filename": "3_spectra_workbook_nrs2.ipynb", "repo_name": "Exo-TiC/ExoTiC-JEDI", "repo_path": "ExoTiC-JEDI_extracted/ExoTiC-JEDI-master/notebooks/padawan/3_spectra_workbook_nrs2.ipynb", "type": "Jupyter Notebook" }
# NIRSpec G395H Pipeline Workbook ## ERS WASP 39b NRS2 ```python # %matplotlib nbagg ``` ```python workbook = 'insert tag for plots' ``` ```python import numpy as np import matplotlib.pyplot as plt import glob from astropy.io import fits import pickle import exotic_jedi as jedi ``` ```python # Setting some rc ...
Exo-TiCREPO_NAMEExoTiC-JEDIPATH_START.@ExoTiC-JEDI_extracted@ExoTiC-JEDI-master@notebooks@padawan@3_spectra_workbook_nrs2.ipynb@.PATH_END.py
{ "filename": "_least_angle.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/linear_model/_least_angle.py", "type": "Python" }
""" Least Angle Regression algorithm. See the documentation on the Generalized Linear Model for a complete discussion. """ # Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause import sys import warnings from math import log from numbers import Integral, Real import numpy as np from scipy im...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@linear_model@_least_angle.py@.PATH_END.py
{ "filename": "linsolve.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/sparse/linalg/_dsolve/linsolve.py", "type": "Python" }
from warnings import warn, catch_warnings, simplefilter import numpy as np from numpy import asarray from scipy.sparse import (issparse, SparseEfficiencyWarning, csr_array, csc_array, eye_array, diags_array) from scipy.sparse._sputils import (is_pydata_spmatrix, convert_pydata_sparse_to_scipy...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@sparse@linalg@_dsolve@linsolve.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "xinglunju/pyAmor", "repo_path": "pyAmor_extracted/pyAmor-master/README.md", "type": "Markdown" }
Python scripts to derive physical properties (linewidth, temperature, column density, etc.) using Ammonia hyperfine lines. There are three version for now: nh3_trot_v0.2_singlev.py - To go through a datacube and derive maps, assuming there is only one velocity. pyamor_v0.4.py - To go through a datacube too, but...
xinglunjuREPO_NAMEpyAmorPATH_START.@pyAmor_extracted@pyAmor-master@README.md@.PATH_END.py
{ "filename": "allTimesRead.py", "repo_name": "wmpg/Supracenter", "repo_path": "Supracenter_extracted/Supracenter-master/supra/Fireballs/allTimesRead.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt import argparse import os from supra.Fireballs.Program import configRead, configParse, position, station def readAllTimes(file_name, dists_name=[], typ=4, stn_list=[]): #typ = 4 [perturbation, station, 0 - ballistic/ 1 - fragmentation, frag number (0 for ballist...
wmpgREPO_NAMESupracenterPATH_START.@Supracenter_extracted@Supracenter-master@supra@Fireballs@allTimesRead.py@.PATH_END.py
{ "filename": "_hoverlabel.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/sankey/_hoverlabel.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "sankey" _path_str = "sankey.hoverlabel" _valid_props = { "align", "align...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@sankey@_hoverlabel.py@.PATH_END.py
{ "filename": "tools.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/cli/langchain_cli/integration_template/integration_template/tools.py", "type": "Python" }
"""__ModuleName__ tools.""" from typing import Optional, Type from langchain_core.callbacks import ( CallbackManagerForToolRun, ) from langchain_core.tools import BaseTool from pydantic import BaseModel, Field class __ModuleName__ToolInput(BaseModel): """Input schema for __ModuleName__ tool. This docst...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@cli@langchain_cli@integration_template@integration_template@tools.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astrolabsoftware/fink-science", "repo_path": "fink-science_extracted/fink-science-master/fink_science/ssoft/__init__.py", "type": "Python" }
astrolabsoftwareREPO_NAMEfink-sciencePATH_START.@fink-science_extracted@fink-science-master@fink_science@ssoft@__init__.py@.PATH_END.py
{ "filename": "_tickvals.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickvals.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="histogram.marker.colorbar", **kwargs ): super(TickvalsValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram@marker@colorbar@_tickvals.py@.PATH_END.py
{ "filename": "corner_ratios.py", "repo_name": "eXtremeGravityInstitute/QuickCBC", "repo_path": "QuickCBC_extracted/QuickCBC-main/corner_ratios.py", "type": "Python" }
import argparse import glob import matplotlib matplotlib.use('Agg') import corner import numpy as np data = np.loadtxt("ratios.dat", usecols=(0, 1, 2)) figure = corner.corner(data, labels=[r'$\log_{10}(H/L)$', r'$\log_{10}(H/V)$', r'$\log_{10}(L/V)$'], bins=40, title_kwargs={"fontsize": 12}, label_kwargs={"fontsize":...
eXtremeGravityInstituteREPO_NAMEQuickCBCPATH_START.@QuickCBC_extracted@QuickCBC-main@corner_ratios.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram/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__, [], ["._...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram@stream@__init__.py@.PATH_END.py
{ "filename": "search.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/tools/gmail/search.py", "type": "Python" }
import base64 import email from enum import Enum from typing import Any, Dict, List, Optional, Type from langchain_core.callbacks import CallbackManagerForToolRun from pydantic import BaseModel, Field from langchain_community.tools.gmail.base import GmailBaseTool from langchain_community.tools.gmail.utils import clea...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@tools@gmail@search.py@.PATH_END.py
{ "filename": "LifeCycleTest.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/containerTests/lifecycleTest/src/lifecycleTestImpl/LifeCycleTest.py", "type": "Python" }
#! /usr/bin/env python #******************************************************************************* # ALMA - Atacama Large Millimiter Array # Copyright (c) European Southern Observatory, 2011 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Pu...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@containerTests@lifecycleTest@src@lifecycleTestImpl@LifeCycleTest.py@.PATH_END.py
{ "filename": "ttx.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/fonttools/fontTools/ttx.py", "type": "Python" }
"""\ usage: ttx [options] inputfile1 [... inputfileN] TTX -- From OpenType To XML And Back If an input file is a TrueType or OpenType font file, it will be decompiled to a TTX file (an XML-based text format). If an input file is a TTX file, it will be compiled to whatever format the data is in, a TrueType or OpenType...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@fonttools@fontTools@ttx.py@.PATH_END.py
{ "filename": "dust.py", "repo_name": "ArisTr/PyRaTE", "repo_path": "PyRaTE_extracted/PyRaTE-master/PyRaTE/dust.py", "type": "Python" }
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# # NAME: # # # # dust.py # # ...
ArisTrREPO_NAMEPyRaTEPATH_START.@PyRaTE_extracted@PyRaTE-master@PyRaTE@dust.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterternary/legendgrouptitle/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterternary.legendgrouptitle.font", **kwargs, ): super(StyleValidator, self).__init__( plotly...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterternary@legendgrouptitle@font@_style.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "NickMilsonPhysics/BinaryStarSolver", "repo_path": "BinaryStarSolver_extracted/BinaryStarSolver-master/binarystarsolve/__init__.py", "type": "Python" }
NickMilsonPhysicsREPO_NAMEBinaryStarSolverPATH_START.@BinaryStarSolver_extracted@BinaryStarSolver-master@binarystarsolve@__init__.py@.PATH_END.py
{ "filename": "cu2quPen.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/fonttools/fontTools/pens/cu2quPen.py", "type": "Python" }
# Copyright 2016 Google Inc. 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 applicable law or a...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@fonttools@fontTools@pens@cu2quPen.py@.PATH_END.py
{ "filename": "version.py", "repo_name": "barentsen/k2flix", "repo_path": "k2flix_extracted/k2flix-master/k2flix/version.py", "type": "Python" }
# It is important to store the version number in a separate file # so that we can read it from setup.py without importing the package __version__ = "2.4.0"
barentsenREPO_NAMEk2flixPATH_START.@k2flix_extracted@k2flix-master@k2flix@version.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "dsavransky/EXOSIMS", "repo_path": "EXOSIMS_extracted/EXOSIMS-master/documentation/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # EXOSIMS documentation build configuration file, created by # sphinx-quickstart on Wed Jul 15 13:16:49 2015. # # 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...
dsavranskyREPO_NAMEEXOSIMSPATH_START.@EXOSIMS_extracted@EXOSIMS-master@documentation@conf.py@.PATH_END.py
{ "filename": "Parameter.py", "repo_name": "ThomasEdwardRiley/xpsi-pre-transfer", "repo_path": "xpsi-pre-transfer_extracted/xpsi-pre-transfer-master/xpsi/Parameter.py", "type": "Python" }
from __future__ import division, print_function from .global_imports import * from . import global_imports from . import make_verbose import string from types import MethodType from abc import ABCMeta, abstractmethod class StrictBoundsError(xpsiError): """ Raised if the set parameter value lies beyond strict b...
ThomasEdwardRileyREPO_NAMExpsi-pre-transferPATH_START.@xpsi-pre-transfer_extracted@xpsi-pre-transfer-master@xpsi@Parameter.py@.PATH_END.py