metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "test_caching.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/tests/unit_tests/embeddings/test_caching.py", "type": "Python" }
"""Embeddings tests.""" from typing import List import pytest from langchain_core.embeddings import Embeddings from langchain.embeddings import CacheBackedEmbeddings from langchain.storage.in_memory import InMemoryStore class MockEmbeddings(Embeddings): def embed_documents(self, texts: List[str]) -> List[List[...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@tests@unit_tests@embeddings@test_caching.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "esheldon/ngmix", "repo_path": "ngmix_extracted/ngmix-master/ngmix/admom/__init__.py", "type": "Python" }
# flake8: noqa from . import admom from .admom import * from . import admom_nb
esheldonREPO_NAMEngmixPATH_START.@ngmix_extracted@ngmix-master@ngmix@admom@__init__.py@.PATH_END.py
{ "filename": "_bordercolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/slider/_bordercolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="layout.slider", **kwargs ): super(BordercolorValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@slider@_bordercolor.py@.PATH_END.py
{ "filename": "_lightposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/isosurface/_lightposition.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lightposition(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "isosurface" _path_str = "isosurface.lightposition" _valid_props = {"x", "y", "z"} ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@isosurface@_lightposition.py@.PATH_END.py
{ "filename": "io_ops.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/io_ops.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@ops@io_ops.py@.PATH_END.py
{ "filename": "compute_correction_function.py", "repo_name": "oliverphilcox/HIPSTER", "repo_path": "HIPSTER_extracted/HIPSTER-master/python/compute_correction_function.py", "type": "Python" }
## Function to compute the survey correction function for a given survey geometry (specified an input random particle file). ## This is based on a simple wrapper for Corrfunc, to compute RR counts which are compared to an idealized model ## NB: This requires an aperiodic survey. ## Results are stored as fits to the mul...
oliverphilcoxREPO_NAMEHIPSTERPATH_START.@HIPSTER_extracted@HIPSTER-master@python@compute_correction_function.py@.PATH_END.py
{ "filename": "printfuncs.py", "repo_name": "IvS-KULeuven/IvSPythonRepository", "repo_path": "IvSPythonRepository_extracted/IvSPythonRepository-master/sigproc/lmfit/printfuncs.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Created on Fri Apr 20 19:24:21 2012 @author: Tillsten Changes: - 13-Feb-2013 M Newville complemented "report_errors" and "report_ci" with "error_report" and "ci_report" (respectively) which return the text of the report. Thus report_errors() is simply: def ...
IvS-KULeuvenREPO_NAMEIvSPythonRepositoryPATH_START.@IvSPythonRepository_extracted@IvSPythonRepository-master@sigproc@lmfit@printfuncs.py@.PATH_END.py
{ "filename": "plot_fit_lineshape.py", "repo_name": "radis/radis", "repo_path": "radis_extracted/radis-master/examples/2_Experimental_spectra/plot_fit_lineshape.py", "type": "Python" }
# -*- coding: utf-8 -*- """ ================================== Fit Multiple Voigt Lineshapes ================================== Direct-access functions to fit a sum of three Voigt lineshapes on an experimental spectrum. This uses the underlying fitting routines of :py:mod:`specutils` :py:func:`specutils.fitting.fit_l...
radisREPO_NAMEradisPATH_START.@radis_extracted@radis-master@examples@2_Experimental_spectra@plot_fit_lineshape.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "cdslaborg/paramonte", "repo_path": "paramonte_extracted/paramonte-main/example/fortran/pm_mathGammaAM/getGammaIncUppAM/main.py", "type": "Python" }
#!/usr/bin/env python import matplotlib.pyplot as plt import pandas as pd import numpy as np import glob import sys fontsize = 17 kind = "RK" label = [ r"shape: $\kappa = 1.0$" , r"shape: $\kappa = 2.5$" , r"shape: $\kappa = 5.0$" ] pattern = "*." + kind + ".txt" fileList = glob.glob(pattern...
cdslaborgREPO_NAMEparamontePATH_START.@paramonte_extracted@paramonte-main@example@fortran@pm_mathGammaAM@getGammaIncUppAM@main.py@.PATH_END.py
{ "filename": "AIPSData.py", "repo_name": "bill-cotton/Obit", "repo_path": "Obit_extracted/Obit-master/ObitSystem/ObitTalk/python/Wizardry/AIPSData.py", "type": "Python" }
# Copyright (C) 2005 Joint Institute for VLBI in Europe # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This progr...
bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@ObitTalk@python@Wizardry@AIPSData.py@.PATH_END.py
{ "filename": "stochastic.py", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/flax/nnx/nn/stochastic.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@nnx@nn@stochastic.py@.PATH_END.py
{ "filename": "xml.py", "repo_name": "paulo-herrera/PyEVTK", "repo_path": "PyEVTK_extracted/PyEVTK-master/evtk/xml.py", "type": "Python" }
###################################################################################### # MIT License # # Copyright (c) 2010-2024 Paulo A. Herrera # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Sof...
paulo-herreraREPO_NAMEPyEVTKPATH_START.@PyEVTK_extracted@PyEVTK-master@evtk@xml.py@.PATH_END.py
{ "filename": "droporphanmetadata.py", "repo_name": "CMB-S4/spt3g_software", "repo_path": "spt3g_software_extracted/spt3g_software-master/core/tests/droporphanmetadata.py", "type": "Python" }
#!/usr/bin/env python from spt3g import core from spt3g.core import G3FrameType frametypes = [G3FrameType.Wiring, G3FrameType.Calibration, G3FrameType.Calibration, G3FrameType.Timepoint, G3FrameType.Observation, G3FrameType.Wiring, G3FrameType.Observation, G3FrameType.Calibration, G3FrameType.Scan, G3FrameType.Scan, ...
CMB-S4REPO_NAMEspt3g_softwarePATH_START.@spt3g_software_extracted@spt3g_software-master@core@tests@droporphanmetadata.py@.PATH_END.py
{ "filename": "test_orbits.py", "repo_name": "jobovy/galpy", "repo_path": "galpy_extracted/galpy-main/tests/test_orbits.py", "type": "Python" }
##########################TESTS ON MULTIPLE ORBITS############################# import astropy import astropy.coordinates as apycoords import astropy.units as u import numpy import pytest from galpy import potential _APY3 = astropy.__version__ > "3" # Test Orbits initialization def test_initialization_vxvv(): f...
jobovyREPO_NAMEgalpyPATH_START.@galpy_extracted@galpy-main@tests@test_orbits.py@.PATH_END.py
{ "filename": "spatial_dropout.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/regularization/spatial_dropout.py", "type": "Python" }
from keras.src import backend from keras.src import ops from keras.src.api_export import keras_export from keras.src.layers.input_spec import InputSpec from keras.src.layers.regularization.dropout import Dropout class BaseSpatialDropout(Dropout): def __init__(self, rate, seed=None, name=None, dtype=None): ...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@regularization@spatial_dropout.py@.PATH_END.py
{ "filename": "profile.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/skimage/measure/profile.py", "type": "Python" }
import numpy as np from scipy import ndimage as ndi from .._shared.utils import _validate_interpolation_order, _fix_ndimage_mode def profile_line( image, src, dst, linewidth=1, order=None, mode='reflect', cval=0.0, *, reduce_func=np.mean, ): """Return the intensity profile of ...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@measure@profile.py@.PATH_END.py
{ "filename": "ndio.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/nddata/mixins/ndio.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst # This module implements the I/O mixin to the NDData class. from astropy.io import registry __all__ = ["NDIOMixin"] __doctest_skip__ = ["NDDataRead", "NDDataWrite"] class NDDataRead(registry.UnifiedReadWrite): """Read and parse gridded N-dimension...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@nddata@mixins@ndio.py@.PATH_END.py
{ "filename": "test_sed_bb.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/examples/sources/test_sed_bb.py", "type": "Python" }
""" test_sed_mcd.py Author: Jordan Mirocha Affiliation: University of Colorado at Boulder Created on: Thu May 2 10:46:44 2013 Description: Plot a simple multi-color disk accretion spectrum. """ import ares import numpy as np import matplotlib.pyplot as pl pars = \ { 'source_temperature': 1e4, 'source_Emin': 1....
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@examples@sources@test_sed_bb.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/sparse/linalg/_dsolve/setup.py", "type": "Python" }
from os.path import join, dirname import sys import glob def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info from scipy._build_utils import numpy_nodepr_api config = Configuration('_dsolve',parent_pac...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@sparse@linalg@_dsolve@setup.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="candlestick.hoverlabel.font", **kwargs ): super(StyleValidator, self).__init__( plotly_name=plotly_name, par...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@candlestick@hoverlabel@font@_style.py@.PATH_END.py
{ "filename": "test_hitran_cdsd.py", "repo_name": "radis/radis", "repo_path": "radis_extracted/radis-master/radis/test/io/test_hitran_cdsd.py", "type": "Python" }
# -*- coding: utf-8 -*- """Test parsers. Notes ----- Runs tests for radis/io so that they can be accessed by pytest (and hopefully the CI test suite) Examples -------- Run all tests:: pytest (in command line, in project folder) Run only fast tests (i.e: tests that have a 'fast' label):: pyt...
radisREPO_NAMEradisPATH_START.@radis_extracted@radis-master@radis@test@io@test_hitran_cdsd.py@.PATH_END.py
{ "filename": "cube_minimal_example.py", "repo_name": "pyspeckit/pyspeckit", "repo_path": "pyspeckit_extracted/pyspeckit-master/examples/cube_minimal_example.py", "type": "Python" }
import pyspeckit from pyspeckit.cubes.tests.test_cubetools import make_test_cube import matplotlib.pylab as plt import numpy as np # generate a test spectral cube (10x10, with a 100 spectral channels) make_test_cube((100,10,10), outfile='test.fits') spc = pyspeckit.Cube('test.fits') # do a crude noise estimate on the...
pyspeckitREPO_NAMEpyspeckitPATH_START.@pyspeckit_extracted@pyspeckit-master@examples@cube_minimal_example.py@.PATH_END.py
{ "filename": "run_mcmc_from_ses.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/run_mcmc_from_ses.py", "type": "Python" }
#!/usr/bin/env python3 """ @author: Trifon Trifonov """ import sys, os sys.path.insert(0, './lib') sys.path.append('./exostriker/lib/RV_mod/') #RV_mod directory must be in your path #lib_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib') #sys.path.insert(0,lib_path) #os.chdir(os.path.dirname(os...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@run_mcmc_from_ses.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergl/unselected/textfont/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._color.ColorValidator"] )
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergl@unselected@textfont@__init__.py@.PATH_END.py
{ "filename": "_coloraxis.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattersmith/marker/_coloraxis.py", "type": "Python" }
import _plotly_utils.basevalidators class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scattersmith.marker", **kwargs ): super(ColoraxisValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattersmith@marker@_coloraxis.py@.PATH_END.py
{ "filename": "test_pytrie.py", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/crossbar/router/test/test_pytrie.py", "type": "Python" }
##################################################################################### # # Copyright (c) typedef int GmbH # SPDX-License-Identifier: EUPL-1.2 # ##################################################################################### from twisted import trial from pytrie import StringTrie class TestPyT...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@router@test@test_pytrie.py@.PATH_END.py
{ "filename": "ex_pareto_plot.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/examples/ex_pareto_plot.py", "type": "Python" }
""" Created on Sun Aug 01 19:20:16 2010 Author: josef-pktd """ import numpy as np from scipy import stats import matplotlib.pyplot as plt nobs = 1000 r = stats.pareto.rvs(1, size=nobs) #rhisto = np.histogram(r, bins=20) rhisto, e = np.histogram(np.clip(r, 0 , 1000), bins=50) plt.figure() plt.loglog(e[:-1]+np.diff(...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@examples@ex_pareto_plot.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "ParsonsRD/template_builder", "repo_path": "template_builder_extracted/template_builder-master/README.md", "type": "Markdown" }
# ImPACT Template Builder Set of classes to allow the production of image templates for use with the ImPACT Cherenkov telescope event reconstruction. For more information about ImPACT see: https://arxiv.org/abs/1403.2993 https://cta-observatory.github.io/ctapipe/reco/ImPACT.html Classes are provided to perform the...
ParsonsRDREPO_NAMEtemplate_builderPATH_START.@template_builder_extracted@template_builder-master@README.md@.PATH_END.py
{ "filename": "mcTestCyclicBuffer.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/monitoring/moncollect/ws/test/mcTestCyclicBuffer.py", "type": "Python" }
#!/usr/bin/env python #******************************************************************************* # ALMA - Atacama Large Millimiter Array # (c) Associated Universities Inc., 2002 # (c) European Southern Observatory, 2002 # Copyright by ESO (in the framework of the ALMA collaboration) # and Cosylab 2002, All right...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@monitoring@moncollect@ws@test@mcTestCyclicBuffer.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ggalloni/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/planck_2018_highl_CamSpec/__init__.py", "type": "Python" }
ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@planck_2018_highl_CamSpec@__init__.py@.PATH_END.py
{ "filename": "plot.py", "repo_name": "deepsphere/deepsphere-cosmo-tf1", "repo_path": "deepsphere-cosmo-tf1_extracted/deepsphere-cosmo-tf1-master/deepsphere/plot.py", "type": "Python" }
"""Plotting module.""" from __future__ import division from builtins import range import datetime import numpy as np import healpy as hp import matplotlib as mpl import matplotlib.pyplot as plt from . import utils def plot_filters_gnomonic(filters, order=10, ind=0, title='Filter {}->{}', graticule=False): """...
deepsphereREPO_NAMEdeepsphere-cosmo-tf1PATH_START.@deepsphere-cosmo-tf1_extracted@deepsphere-cosmo-tf1-master@deepsphere@plot.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "JohannesBuchner/BXA", "repo_path": "BXA_extracted/BXA-master/bxa/sherpa/__init__.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ BXA (Bayesian X-ray Analysis) for Sherpa Copyright: Johannes Buchner (C) 2013-2019 """ from __future__ import print_function import os from math import log10, isnan, isinf if 'MAKESPHINXDOC' not in os.environ: import sherpa.astro.ui as ui from sherpa.stats import C...
JohannesBuchnerREPO_NAMEBXAPATH_START.@BXA_extracted@BXA-master@bxa@sherpa@__init__.py@.PATH_END.py
{ "filename": "cubicSpline.py", "repo_name": "mzechmeister/serval", "repo_path": "serval_extracted/serval-master/src/cubicSpline.py", "type": "Python" }
from __future__ import print_function # module cubicSpline ''' k = curvatures(xData,yData). Returns the curvatures of cubic spline at its knots. y = evalSpline(xData,yData,k,x). Evaluates cubic spline at x. The curvatures k can be computed with the function 'curvatures'. From: http://www.dur.ac.uk...
mzechmeisterREPO_NAMEservalPATH_START.@serval_extracted@serval-master@src@cubicSpline.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "mikekatz04/BOWIE", "repo_path": "BOWIE_extracted/BOWIE-master/snr_calculator_folder/setup.py", "type": "Python" }
import os import shutil from os.path import join as pjoin from setuptools import setup from distutils.core import Extension from Cython.Build import cythonize import numpy # Obtain the numpy include directory. This logic works across numpy versions. try: numpy_include = numpy.get_include() except AttributeError: ...
mikekatz04REPO_NAMEBOWIEPATH_START.@BOWIE_extracted@BOWIE-master@snr_calculator_folder@setup.py@.PATH_END.py
{ "filename": "exosystem_lib.py", "repo_name": "subisarkar/JexoSim", "repo_path": "JexoSim_extracted/JexoSim-master/jexosim/lib/exosystem_lib.py", "type": "Python" }
""" JexoSim 2.0 Exosystem and related library """ import numpy as np from jexosim.lib import jexosim_lib from jexosim.lib.jexosim_lib import jexosim_msg, jexosim_plot from jexosim.classes.sed import Sed from pytransit import QuadraticModel import copy import matplotlib.pyplot as plt def get_light_curve(opt, plane...
subisarkarREPO_NAMEJexoSimPATH_START.@JexoSim_extracted@JexoSim-master@jexosim@lib@exosystem_lib.py@.PATH_END.py
{ "filename": "Test HIPSTER-checkpoint.ipynb", "repo_name": "oliverphilcox/HIPSTER", "repo_path": "HIPSTER_extracted/HIPSTER-master/.ipynb_checkpoints/Test HIPSTER-checkpoint.ipynb", "type": "Jupyter Notebook" }
oliverphilcoxREPO_NAMEHIPSTERPATH_START.@HIPSTER_extracted@HIPSTER-master@.ipynb_checkpoints@Test HIPSTER-checkpoint.ipynb@.PATH_END.py
{ "filename": "_tickfont.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/surface/colorbar/_tickfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "surface.colorbar" _path_str = "surface.colorbar.tickfont" _valid_props = { "color"...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@surface@colorbar@_tickfont.py@.PATH_END.py
{ "filename": "parameter_file_reference.md", "repo_name": "yuguangchen1/KcwiKit", "repo_path": "KcwiKit_extracted/KcwiKit-master/kcwikit/docs/parameter_file_reference.md", "type": "Markdown" }
# Complete Reference of the Parameter File Here is the complete reference on the parameter file. However, not all of the parameters are commonly used. An example for common usage is provided [here](../examples/q2343-BX610.par). Some parameters can be overridden by manually setting them when calling the functions. Fo...
yuguangchen1REPO_NAMEKcwiKitPATH_START.@KcwiKit_extracted@KcwiKit-master@kcwikit@docs@parameter_file_reference.md@.PATH_END.py
{ "filename": "_tickformat.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/icicle/marker/colorbar/_tickformat.py", "type": "Python" }
import _plotly_utils.basevalidators class TickformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="icicle.marker.colorbar", **kwargs ): super(TickformatValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@icicle@marker@colorbar@_tickformat.py@.PATH_END.py
{ "filename": "arith.md", "repo_name": "myrafproject/myrafproject", "repo_path": "myrafproject_extracted/myrafproject-main/example/command_line/arith.md", "type": "Markdown" }
# arith `arith` does image arithmetic on FITS files. usage: im arith [-h] file operator other output ## Positional Arguments: - **file** A file path or pattern (e.g., "*.fits") - **operator** Operator: +, -, /, *, **, ^ - **other** FITS file or number to operate with - **output** Ou...
myrafprojectREPO_NAMEmyrafprojectPATH_START.@myrafproject_extracted@myrafproject-main@example@command_line@arith.md@.PATH_END.py
{ "filename": "_y.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/box/_y.py", "type": "Python" }
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="box", **kwargs): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwargs....
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@box@_y.py@.PATH_END.py
{ "filename": "corruptor.py", "repo_name": "OxfordSKA/OSKAR", "repo_path": "OSKAR_extracted/OSKAR-master/python/examples/corruptor.py", "type": "Python" }
# -*- coding: utf-8 -*- """Simulates visibilities using OSKAR and corrupts them. Usage: python corruptor.py <oskar_sim_interferometer.ini> The command line arguments are: - oskar_sim_interferometer.ini: Path to a settings file for the oskar_sim_interferometer app. """ from __fu...
OxfordSKAREPO_NAMEOSKARPATH_START.@OSKAR_extracted@OSKAR-master@python@examples@corruptor.py@.PATH_END.py
{ "filename": "calibrators.py", "repo_name": "TianlaiProject/tlpipe", "repo_path": "tlpipe_extracted/tlpipe-master/tlpipe/cal/calibrators.py", "type": "Python" }
import numpy as np import ephem import aipy as a # 20 sources from Perley and Butler, 2017, An accurate flux density scale from 50 MHz to 50 GHz src_data = { # key name RA DEC a0 a1 a2 a3 a4 a5 angle_size 'j0133': ('J0133-3629', '...
TianlaiProjectREPO_NAMEtlpipePATH_START.@tlpipe_extracted@tlpipe-master@tlpipe@cal@calibrators.py@.PATH_END.py
{ "filename": "_widthsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterternary/marker/line/_widthsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="scatterternary.marker.line", **kwargs ): super(WidthsrcValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterternary@marker@line@_widthsrc.py@.PATH_END.py
{ "filename": "GalRotpy.ipynb", "repo_name": "andresGranadosC/GalRotpy", "repo_path": "GalRotpy_extracted/GalRotpy-master/notebook/GalRotpy.ipynb", "type": "Jupyter Notebook" }
```python from matplotlib.widgets import Slider, Button, RadioButtons, CheckButtons, TextBox # Matplotlib widgets import matplotlib.pylab as plt # Plotting interface import numpy as np from galpy.potential import MiyamotoNagaiPotential, NFWPotential, RazorThinExponentialDiskPotential, BurkertPotential # GALPY potential...
andresGranadosCREPO_NAMEGalRotpyPATH_START.@GalRotpy_extracted@GalRotpy-master@notebook@GalRotpy.ipynb@.PATH_END.py
{ "filename": "pairsubtraction_demo.py", "repo_name": "kpicteam/kpic_pipeline", "repo_path": "kpic_pipeline_extracted/kpic_pipeline-main/examples/pairsubtraction_demo.py", "type": "Python" }
import os import numpy as np import astropy.io.fits as fits import kpicdrp.data as data from kpicdrp.caldb import det_caldb import kpicdrp.extraction as extraction from glob import glob try: import mkl mkl.set_num_threads(1) except: pass raw_folder = "/scr3/kpic/Data/210425/spec/" out_folder = "/scr3/jru...
kpicteamREPO_NAMEkpic_pipelinePATH_START.@kpic_pipeline_extracted@kpic_pipeline-main@examples@pairsubtraction_demo.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/library/python/codecs/__init__.py", "type": "Python" }
from __codecs import loads, dumps, list_all_codecs, get_codec_id # noqa
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@library@python@codecs@__init__.py@.PATH_END.py
{ "filename": "zoom.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/packages/vaex-ui/vaex/ui/plugin/zoom.py", "type": "Python" }
import functools import matplotlib.widgets import vaex.ui.plugin from vaex.ui import undo from vaex.ui.qt import * from vaex.ui.icons import iconfile import logging import vaex.ui.undo as undo logger = logging.getLogger("plugin.zoom") @vaex.ui.plugin.pluginclass class ZoomPlugin(vaex.ui.plugin.PluginPlot): name =...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-ui@vaex@ui@plugin@zoom.py@.PATH_END.py
{ "filename": "cdf_maker.ipynb", "repo_name": "icecube/TauRunner", "repo_path": "TauRunner_extracted/TauRunner-master/examples/cdf_maker.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import matplotlib.pyplot as plt from scipy.interpolate import UnivariateSpline import matplotlib as mpl from glob import glob import scipy.integrate as integrate import pickle as pkl import taurunner as tr from taurunner.utils import units %matplotlib inline ``` ## Define your input spec...
icecubeREPO_NAMETauRunnerPATH_START.@TauRunner_extracted@TauRunner-master@examples@cdf_maker.ipynb@.PATH_END.py
{ "filename": "README.md", "repo_name": "MiguelEA/nudec_BSM", "repo_path": "nudec_BSM_extracted/nudec_BSM-master/README.md", "type": "Markdown" }
# NUDEC_BSM: Neutrino Decoupling Beyond the Standard Model This code "NUDEC_BSM", has been developed by Miguel Escudero Abenza in order to solve for early Universe thermodynamics and neutrino decoupling following the simplified approach of ArXiv:1812.05605 [JCAP 1902 (2019) 007] and ArXiv:2001.04466 [JCAP 05 (2020) 04...
MiguelEAREPO_NAMEnudec_BSMPATH_START.@nudec_BSM_extracted@nudec_BSM-master@README.md@.PATH_END.py
{ "filename": "lorenz.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/examples/tvtk/visual/lorenz.py", "type": "Python" }
#!/usr/bin/env python # Author: Raashid Baig <raashid@aero.iitb.ac.in> # License: BSD Style. from tvtk.tools.visual import curve, box, vector, show lorenz = curve( color = (1,1,1), radius=0.3 ) # Draw grid for x in range(0,51,10): curve(points = [[x,0,-25],[x,0,25]], color = (0,0.5,0), radius = 0.3 ) box(po...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@examples@tvtk@visual@lorenz.py@.PATH_END.py
{ "filename": "spec_app.py", "repo_name": "msiebert1/UCSC_spectral_pipeline", "repo_path": "UCSC_spectral_pipeline_extracted/UCSC_spectral_pipeline-master/spectral_reduction/spec_app.py", "type": "Python" }
import io from base64 import b64encode import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import plotly.express as px if __name__ == "__main__": buffer = io.StringIO() df = px.data.iris() fig = px.scatter( df, x="sepal_width", y="se...
msiebert1REPO_NAMEUCSC_spectral_pipelinePATH_START.@UCSC_spectral_pipeline_extracted@UCSC_spectral_pipeline-master@spectral_reduction@spec_app.py@.PATH_END.py
{ "filename": "population.py", "repo_name": "deepskies/deeplenstronomy", "repo_path": "deeplenstronomy_extracted/deeplenstronomy-master/exploded_setup_old/PopSim/population.py", "type": "Python" }
import numpy as np import yaml import os config_dir = os.path.join(os.path.dirname(__file__), '../../config_files/population/') class Population: def __int__(self): pass def load_yaml_file(self, file_name): """Loads configuration dictionary from yaml file""" ...
deepskiesREPO_NAMEdeeplenstronomyPATH_START.@deeplenstronomy_extracted@deeplenstronomy-master@exploded_setup_old@PopSim@population.py@.PATH_END.py
{ "filename": "dbutils.py", "repo_name": "sdss/marvin", "repo_path": "marvin_extracted/marvin-main/python/marvin/utils/db/dbutils.py", "type": "Python" }
import marvin import traceback import sys import inspect # This line makes sure that "from marvin.utils.db.dbutils import *" # will only import the functions in the list. __all__ = ['get_traceback', 'testDbConnection', 'generateClassDict'] def get_traceback(asstring=None): ''' Returns the traceback from an exce...
sdssREPO_NAMEmarvinPATH_START.@marvin_extracted@marvin-main@python@marvin@utils@db@dbutils.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/insidetextfont/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="funnel.insidetextfont", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_name, parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@insidetextfont@_family.py@.PATH_END.py
{ "filename": "testSharedElements.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/tests/unit/Mesh/testSharedElements.py", "type": "Python" }
import mpi from Spheral2d import * #---------------------------------------------------------------------- # Test that the shared nodes are consisten between domains. #---------------------------------------------------------------------- def testSharedNodes(mesh): assert len(mesh.neighborDomains) == len(mesh.shar...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@unit@Mesh@testSharedElements.py@.PATH_END.py
{ "filename": "[7]cluster mockup-checkpoint.ipynb", "repo_name": "jan-rybizki/Galaxia_wrap", "repo_path": "Galaxia_wrap_extracted/Galaxia_wrap-master/notebook/.ipynb_checkpoints/[7]cluster mockup-checkpoint.ipynb", "type": "Jupyter Notebook" }
```python from astropy.coordinates import SkyCoord, ICRS, CartesianRepresentation, CartesianDifferential, Galactic, Galactocentric import astropy.units as u from astropy.io import fits %pylab inline import ebf import shutil import subprocess import os, sys path = os.path.abspath('../library/') if path not in sys.path: ...
jan-rybizkiREPO_NAMEGalaxia_wrapPATH_START.@Galaxia_wrap_extracted@Galaxia_wrap-master@notebook@.ipynb_checkpoints@[7]cluster mockup-checkpoint.ipynb@.PATH_END.py
{ "filename": "utils.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/prompt-toolkit/py3/prompt_toolkit/filters/utils.py", "type": "Python" }
from __future__ import annotations from .base import Always, Filter, FilterOrBool, Never __all__ = [ "to_filter", "is_true", ] _always = Always() _never = Never() _bool_to_filter: dict[bool, Filter] = { True: _always, False: _never, } def to_filter(bool_or_filter: FilterOrBool) -> Filter: ""...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@prompt-toolkit@py3@prompt_toolkit@filters@utils.py@.PATH_END.py
{ "filename": "inspect_ar_chi_cost_results.ipynb", "repo_name": "tcallister/autoregressive-bbh-inference", "repo_path": "autoregressive-bbh-inference_extracted/autoregressive-bbh-inference-main/data/inspect_ar_chi_cost_results.ipynb", "type": "Jupyter Notebook" }
```python import arviz as az import matplotlib.pylab as plt import matplotlib as mpl mpl.style.use("./../figures/plotting.mplstyle") import numpy as np import h5py import sys sys.path.append('./../figures') from makeCorner import plot_corner sys.path.append('./../code/') from utilities import * ``` Load the sumary f...
tcallisterREPO_NAMEautoregressive-bbh-inferencePATH_START.@autoregressive-bbh-inference_extracted@autoregressive-bbh-inference-main@data@inspect_ar_chi_cost_results.ipynb@.PATH_END.py
{ "filename": "use_case_34_fix_blending.py", "repo_name": "rpoleski/MulensModel", "repo_path": "MulensModel_extracted/MulensModel-master/examples/use_cases/use_case_34_fix_blending.py", "type": "Python" }
""" use_case_34_fix_blending.py Fix the blending for one observatory to a non-zero value. This example is modeled after real-time fitting procedures, so the input datasets are truncated. For this event, the catalog star in KMT is I > 20. Thus, a fake blending flux has been added so the baseline is I=20. Thus, for a ...
rpoleskiREPO_NAMEMulensModelPATH_START.@MulensModel_extracted@MulensModel-master@examples@use_cases@use_case_34_fix_blending.py@.PATH_END.py
{ "filename": "remove_lines.py", "repo_name": "icecube/toise", "repo_path": "toise_extracted/toise-main/resources/scripts/2021_midscale/remove_lines.py", "type": "Python" }
import json infile = "IceCubeHEX_Sunflower_240m_v3_ExtendedDepthRange.GCD.txt" file = open(infile, "r") # load the list of included strings gsl = open("midscale_geos.json") options = json.load(gsl) gsl.close() gen2_strings = options["corner"] # select the corner for i, string in enumerate(gen2_strings): gen2_str...
icecubeREPO_NAMEtoisePATH_START.@toise_extracted@toise-main@resources@scripts@2021_midscale@remove_lines.py@.PATH_END.py
{ "filename": "serialize_executable.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/experimental/serialize_executable.py", "type": "Python" }
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@experimental@serialize_executable.py@.PATH_END.py
{ "filename": "distributed.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/_src/distributed.py", "type": "Python" }
# Copyright 2021 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@distributed.py@.PATH_END.py
{ "filename": "test_gp_priors.py", "repo_name": "nanograv/enterprise", "repo_path": "enterprise_extracted/enterprise-master/tests/test_gp_priors.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_gp_priors ---------------------------------- Tests for GP priors and bases. """ import unittest import numpy as np from tests.enterprise_test_data import datadir from enterprise.pulsar import Pulsar from enterprise.signals import parameter from enterprise.sign...
nanogravREPO_NAMEenterprisePATH_START.@enterprise_extracted@enterprise-master@tests@test_gp_priors.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_LensModel/test_Profiles/__init__.py", "type": "Python" }
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_LensModel@test_Profiles@__init__.py@.PATH_END.py
{ "filename": "types_test.py", "repo_name": "spotify/annoy", "repo_path": "annoy_extracted/annoy-main/test/types_test.py", "type": "Python" }
# Copyright (c) 2013 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
spotifyREPO_NAMEannoyPATH_START.@annoy_extracted@annoy-main@test@types_test.py@.PATH_END.py
{ "filename": "reionization.py", "repo_name": "toshiyan/cmblensplus", "repo_path": "cmblensplus_extracted/cmblensplus-master/utils/reionization.py", "type": "Python" }
import numpy as np, tqdm # from cmblensplus import basic # from cmblensplus/utils import constant as c # to avoid scipy constants use from scipy.integrate import quad from scipy.interpolate import InterpolatedUnivariateSpline as spline def xHlogxH(xe): if 1.-xe<1e-6: return 0. else: return...
toshiyanREPO_NAMEcmblensplusPATH_START.@cmblensplus_extracted@cmblensplus-master@utils@reionization.py@.PATH_END.py
{ "filename": "mean_weight_system_params.py", "repo_name": "JamesKirk11/Tiberius", "repo_path": "Tiberius_extracted/Tiberius-main/src/fitting_utils/mean_weight_system_params.py", "type": "Python" }
#### Author of this code: James Kirk #### Contact: jameskirk@live.co.uk from Tiberius.src.fitting_utils import plotting_utils as pu import argparse import numpy as np import matplotlib.pyplot as plt parser = argparse.ArgumentParser(description='Use this code to give you mean-weighted uncertainties from > 1 white ligh...
JamesKirk11REPO_NAMETiberiusPATH_START.@Tiberius_extracted@Tiberius-main@src@fitting_utils@mean_weight_system_params.py@.PATH_END.py
{ "filename": "callback_list.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/callbacks/callback_list.py", "type": "Python" }
import concurrent.futures from keras.src import backend from keras.src import tree from keras.src import utils from keras.src.api_export import keras_export from keras.src.callbacks.callback import Callback from keras.src.callbacks.history import History from keras.src.callbacks.progbar_logger import ProgbarLogger fro...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@callbacks@callback_list.py@.PATH_END.py
{ "filename": "TestKernels.py", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/test/TestKernels.py", "type": "Python" }
# run with : python3 -m unittest TestKernels import unittest import os import numpy as numpy from astropy import units import matplotlib.pyplot as plt import warnings from BayesicFitting import * from BayesicFitting import formatter as fmt __author__ = "Do Kester" __year__ = 2017 __license__ = "GPL3" __version__ = "...
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@test@TestKernels.py@.PATH_END.py
{ "filename": "detector.py", "repo_name": "lucabaldini/ixpeobssim", "repo_path": "ixpeobssim_extracted/ixpeobssim-main/ixpeobssim/binning/detector.py", "type": "Python" }
# Copyright (C) 2015--2022, the ixpeobssim team. # # 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 your option) any later version. # # This program is d...
lucabaldiniREPO_NAMEixpeobssimPATH_START.@ixpeobssim_extracted@ixpeobssim-main@ixpeobssim@binning@detector.py@.PATH_END.py
{ "filename": "weighted_quantiles.py", "repo_name": "TRASAL/frbpoppy", "repo_path": "frbpoppy_extracted/frbpoppy-master/tests/monte_carlo/weighted_quantiles.py", "type": "Python" }
import numpy as np def quantile_1D(data, weights, quantile): """ Compute the weighted quantile of a 1D numpy array. Parameters ---------- data : ndarray Input array (one dimension). weights : ndarray Array with the weights of the same size of `data`. quantile : float ...
TRASALREPO_NAMEfrbpoppyPATH_START.@frbpoppy_extracted@frbpoppy-master@tests@monte_carlo@weighted_quantiles.py@.PATH_END.py
{ "filename": "helpers.py", "repo_name": "radio-astro-tools/spectral-cube", "repo_path": "spectral-cube_extracted/spectral-cube-master/spectral_cube/tests/helpers.py", "type": "Python" }
from astropy import units as u from numpy.testing import assert_allclose as assert_allclose_numpy, assert_array_equal def assert_allclose(q1, q2, **kwargs): """ Quantity-safe version of Numpy's assert_allclose """ if isinstance(q1, u.Quantity) and isinstance(q2, u.Quantity): assert_allclose_n...
radio-astro-toolsREPO_NAMEspectral-cubePATH_START.@spectral-cube_extracted@spectral-cube-master@spectral_cube@tests@helpers.py@.PATH_END.py
{ "filename": "create_GCK_visits_table.py", "repo_name": "rbuehler/vasca", "repo_path": "vasca_extracted/vasca-main/vasca/examples/GALEX_DS_GCK/create_GCK_visits_table.py", "type": "Python" }
""" Create a complete list of all GALEX CAUSE Kepler survey visits. This script reads all mcat files relative to the specified root data directory and extracts relevant information from the FITS header. A combined list for all mcat files is created. All required information is contained that VASCA field and visits tab...
rbuehlerREPO_NAMEvascaPATH_START.@vasca_extracted@vasca-main@vasca@examples@GALEX_DS_GCK@create_GCK_visits_table.py@.PATH_END.py
{ "filename": "wendland.ipynb", "repo_name": "j0r1/GRALE2", "repo_path": "GRALE2_extracted/GRALE2-master/pygrale/doc/source/_static/wendland.ipynb", "type": "Jupyter Notebook" }
This notebook illustrates the [LensPerfect](http://adsabs.harvard.edu/abs/2008ApJ...681..814C) method ```python %matplotlib inline import grale.lenses as lenses import grale.cosmology as cosmology import grale.plotutil as plotutil import grale.feedback as feedback import grale.images as images from grale.constants im...
j0r1REPO_NAMEGRALE2PATH_START.@GRALE2_extracted@GRALE2-master@pygrale@doc@source@_static@wendland.ipynb@.PATH_END.py
{ "filename": "_minexponent.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/ternary/caxis/_minexponent.py", "type": "Python" }
import _plotly_utils.basevalidators class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="layout.ternary.caxis", **kwargs ): super(MinexponentValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@ternary@caxis@_minexponent.py@.PATH_END.py
{ "filename": "TestEvidence.py", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/test/TestEvidence.py", "type": "Python" }
# run with : python3 -m unittest TestEvidence import unittest import os import numpy as np import math from numpy.testing import assert_array_almost_equal as assertAAE import matplotlib.pyplot as plt from BayesicFitting import * class TestEvidence( unittest.TestCase ) : def __init__( self, testname ): ...
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@test@TestEvidence.py@.PATH_END.py
{ "filename": "cosmo_interp.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/Cosmo/cosmo_interp.py", "type": "Python" }
import astropy from lenstronomy.Util.util import isiterable if float(astropy.__version__[0]) < 5.0: from astropy.cosmology.core import isiterable DeprecationWarning( "Astropy<5 is going to be deprecated soon. This is in combination with Python version<3.8." "We recommend you to update astropy...
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@Cosmo@cosmo_interp.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergeo/marker/_line.py", "type": "Python" }
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scattergeo.marker", **kwargs): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergeo@marker@_line.py@.PATH_END.py
{ "filename": "sparkllm.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/llms/sparkllm.py", "type": "Python" }
from __future__ import annotations import base64 import hashlib import hmac import json import logging import queue import threading from datetime import datetime from queue import Queue from time import mktime from typing import Any, Dict, Generator, Iterator, List, Optional from urllib.parse import urlencode, urlpar...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@llms@sparkllm.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scattercarpet/legendgrouptitle/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattercarpet.legendgrouptitle" _path_str = "scattercarpet.legendgrouptitle.font" _valid_props...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@scattercarpet@legendgrouptitle@_font.py@.PATH_END.py
{ "filename": "dynesty_plots.py", "repo_name": "CarlosCoba/XookSuut-code", "repo_path": "XookSuut-code_extracted/XookSuut-code-master/src/dynesty_plots.py", "type": "Python" }
import matplotlib.pylab as plt from dynesty import plotting as dyplot from src.axes_params import axes_ambient as AX from matplotlib.gridspec import GridSpec from matplotlib import gridspec height, width = 18.0, 14 # width [cm] cm_to_inch = 0.393701 # [inch/cm] figWidth = width * cm_to_inch # width [inch] figHeight = ...
CarlosCobaREPO_NAMEXookSuut-codePATH_START.@XookSuut-code_extracted@XookSuut-code-master@src@dynesty_plots.py@.PATH_END.py
{ "filename": "wrapper_xspec_examples.py", "repo_name": "atomdb/pyatomdb", "repo_path": "pyatomdb_extracted/pyatomdb-master/pyatomdb/examples/wrapper_xspec_examples.py", "type": "Python" }
from apec_xspec import * # declare a new model # inital import creates pyapec, pyvapec, pyvvapec, analagous to apec, vapec, vvapec m1 = xspec.Model('pyapec') m1.show() m1.pyapec.kT=5.0 # let's plot a spectrum xspec.Plot.device='/xs' xspec.Plot('model') # you can fiddle with some aspects of the model directly ci...
atomdbREPO_NAMEpyatomdbPATH_START.@pyatomdb_extracted@pyatomdb-master@pyatomdb@examples@wrapper_xspec_examples.py@.PATH_END.py
{ "filename": "n2dp.py", "repo_name": "vlas-sokolov/pyspecnest", "repo_path": "pyspecnest_extracted/pyspecnest-master/pyspecnest/n2dp.py", "type": "Python" }
import os import numpy as np from .multiwrapper import Parameter, ModelContainer # TODO: generalize it with the parameter names already present in pyspeckit! def get_n2dp_model(sp, std_noise, priors=None, npeaks=1, **kwargs): # initializing the model parameters if priors is None: # set up dummy priors...
vlas-sokolovREPO_NAMEpyspecnestPATH_START.@pyspecnest_extracted@pyspecnest-master@pyspecnest@n2dp.py@.PATH_END.py
{ "filename": "logger.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/logger.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """This module defines a logging class based on the built-in logging module. .. note:: This module is meant for internal ``astropy`` usage. For use in other packages, we recommend implementing your own logger instead. """ import inspect import ...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@logger.py@.PATH_END.py
{ "filename": "_b0.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contourcarpet/_b0.py", "type": "Python" }
import _plotly_utils.basevalidators class B0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="b0", parent_name="contourcarpet", **kwargs): super(B0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contourcarpet@_b0.py@.PATH_END.py
{ "filename": "pannable_map.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/visualization/mapserver/pannable_map.py", "type": "Python" }
import os from functools import wraps import bottle import numpy as np from yt.fields.derived_field import ValidateSpatial from yt.utilities.lib.misc_utilities import get_color_bounds from yt.utilities.png_writer import write_png_to_string from yt.visualization.fixed_resolution import FixedResolutionBuffer from yt.vi...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@visualization@mapserver@pannable_map.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/funnel/marker/_line.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "funnel.marker" _path_str = "funnel.marker.line" _valid_props = { "autocolorscale", ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@funnel@marker@_line.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plazar/TOASTER", "repo_path": "TOASTER_extracted/TOASTER-master/webtoaster/oauthclient/management/commands/__init__.py", "type": "Python" }
plazarREPO_NAMETOASTERPATH_START.@TOASTER_extracted@TOASTER-master@webtoaster@oauthclient@management@commands@__init__.py@.PATH_END.py
{ "filename": "clusters_z6_study.py", "repo_name": "ICRAR/shark", "repo_path": "shark_extracted/shark-master/standard_plots/clusters_z6_study.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_z6_study.py@.PATH_END.py
{ "filename": "calc_tau_gas.py", "repo_name": "Jingxuan97/nemesispy", "repo_path": "nemesispy_extracted/nemesispy-main/nemesispy/radtran/calc_tau_gas.py", "type": "Python" }
#!/usr/local/bin/python3 # -*- coding: utf-8 -*- """ Calculate the optical path due to atomic and molecular lines. The opacity of gases is calculated by the correlated-k method using pre-tabulated ktables, assuming random overlap of lines. """ import numpy as np from numba import jit @jit(nopython=True) def calc_tau_g...
Jingxuan97REPO_NAMEnemesispyPATH_START.@nemesispy_extracted@nemesispy-main@nemesispy@radtran@calc_tau_gas.py@.PATH_END.py
{ "filename": "common.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pyzmq/py2/zmq/eventloop/minitornado/platform/common.py", "type": "Python" }
"""Lowest-common-denominator implementations of platform functionality.""" from __future__ import absolute_import, division, print_function, with_statement import errno import socket from . import interface class Waker(interface.Waker): """Create an OS independent asynchronous pipe. For use on platforms th...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pyzmq@py2@zmq@eventloop@minitornado@platform@common.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/hoverlabel/_font.py", "type": "Python" }
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="font", parent_name="layout.hoverlabel", **kwargs): super(FontValidator, 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@hoverlabel@_font.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/surface/colorbar/_showticksuffix.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="surface.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@surface@colorbar@_showticksuffix.py@.PATH_END.py
{ "filename": "root_handler.py", "repo_name": "threeML/hawc_hal", "repo_path": "hawc_hal_extracted/hawc_hal-master/hawc_hal/root_handler.py", "type": "Python" }
# This module handle the importing of ROOT # only use in methods that actually need ROOT # NOTE:Moving to uproot to remove all ROOT dependencies given that support # for root-numpy has stopped # import ROOT # ROOT.PyConfig.IgnoreCommandLineOptions = True # from ROOT import TEntryList # from threeML.io.cern_root_util...
threeMLREPO_NAMEhawc_halPATH_START.@hawc_hal_extracted@hawc_hal-master@hawc_hal@root_handler.py@.PATH_END.py
{ "filename": "test_version.py", "repo_name": "transientskp/tkp", "repo_path": "tkp_extracted/tkp-master/tests/test_database/test_version.py", "type": "Python" }
import unittest from tkp.db.model import Version, SCHEMA_VERSION from tkp.db.database import Database from tkp.testutil.decorators import database_disabled class TestVersion(unittest.TestCase): def setUp(self): # Can't use a regular skip here, due to a Nose bug: # https://github.com/nose-devs/nose...
transientskpREPO_NAMEtkpPATH_START.@tkp_extracted@tkp-master@tests@test_database@test_version.py@.PATH_END.py
{ "filename": "particle_xy_plot.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/doc/source/cookbook/particle_xy_plot.py", "type": "Python" }
import yt # load the dataset ds = yt.load("IsolatedGalaxy/galaxy0030/galaxy0030") # create our plot p = yt.ParticlePlot( ds, ("all", "particle_position_x"), ("all", "particle_position_y"), ("all", "particle_mass"), width=(0.5, 0.5), ) # pick some appropriate units p.set_axes_unit("kpc") p.set_uni...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@doc@source@cookbook@particle_xy_plot.py@.PATH_END.py
{ "filename": "test_lookfor.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/skimage/util/tests/test_lookfor.py", "type": "Python" }
import skimage as ski def test_lookfor_basic(capsys): assert ski.lookfor is ski.util.lookfor ski.util.lookfor("regionprops") search_results = capsys.readouterr().out assert "skimage.measure.regionprops" in search_results assert "skimage.measure.regionprops_table" in search_results
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@util@tests@test_lookfor.py@.PATH_END.py
{ "filename": "test_aggregator.py", "repo_name": "rhayes777/PyAutoFit", "repo_path": "PyAutoFit_extracted/PyAutoFit-main/test_autofit/aggregator/test_aggregator.py", "type": "Python" }
def test_completed_aggregator( aggregator ): aggregator = aggregator( aggregator.search.is_complete ) assert len(aggregator) == 1 class TestLoading: def test_unzip(self, aggregator): assert len(aggregator) == 2 def test_pickles(self, aggregator): assert list(aggreg...
rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@test_autofit@aggregator@test_aggregator.py@.PATH_END.py
{ "filename": "_weight.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/_weight.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.scene.yaxis.title.font", **kwargs, ): super(WeightValidator, self).__init__( plotly_name=p...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@yaxis@title@font@_weight.py@.PATH_END.py