metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "parse_pipeline_graph.py", "repo_name": "CMB-S4/spt3g_software", "repo_path": "spt3g_software_extracted/spt3g_software-master/core/python/parse_pipeline_graph.py", "type": "Python" }
import json def uniquify_list(seq): checked = [] for e in seq: if e not in checked: checked.append(e) return checked def frame_type_str_to_color(s): cmap = {'Timepoint': 'm', 'Housekeeping' : 'y', 'Scan' : 'r', 'Map' : 'g', 'Ins...
CMB-S4REPO_NAMEspt3g_softwarePATH_START.@spt3g_software_extracted@spt3g_software-master@core@python@parse_pipeline_graph.py@.PATH_END.py
{ "filename": "elementstyling.py", "repo_name": "AishwaryaC26/RIS-Vis", "repo_path": "RIS-Vis_extracted/RIS-Vis-main/app/elementstyling.py", "type": "Python" }
### Styling for all elements ### MARGIN_STYLE = {'margin': '25px'} CARD_HALF_WIDTH_LEFT = {'marginLeft': '25px'} CARD_HALF_WIDTH_RIGHT = {'marginRight': '25px'} CARD_HALF_WIDTH_LEFT_DOWNUP = {'marginLeft': '25px', 'marginTop': '25px', 'marginBottom': '25px'} CARD_HALF_WIDTH_RIGHT_DOWNUP = {'marginRight': '25px', '...
AishwaryaC26REPO_NAMERIS-VisPATH_START.@RIS-Vis_extracted@RIS-Vis-main@app@elementstyling.py@.PATH_END.py
{ "filename": "axisman_util.py", "repo_name": "simonsobs/sotodlib", "repo_path": "sotodlib_extracted/sotodlib-master/sotodlib/core/axisman_util.py", "type": "Python" }
""" Various AxisManager utility functions """ import numpy as np from sotodlib.core import AxisManager class RestrictionException(Exception): """Exception for when cannot restrict AxisManager properly""" def restrict_to_times(am, t0, t1, in_place=False): """ Restricts axis manager to a time range (t0, t1...
simonsobsREPO_NAMEsotodlibPATH_START.@sotodlib_extracted@sotodlib-master@sotodlib@core@axisman_util.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/coloraxis/colorbar/tickfont/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._weight import WeightValidator from ._variant import VariantValidator from ._textcase import TextcaseValidator from ._style import StyleValidator from ._size import SizeValidator from ._shadow impor...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@coloraxis@colorbar@tickfont@__init__.py@.PATH_END.py
{ "filename": "_odrpack.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/odr/_odrpack.py", "type": "Python" }
""" Python wrappers for Orthogonal Distance Regression (ODRPACK). Notes ===== * Array formats -- FORTRAN stores its arrays in memory column first, i.e., an array element A(i, j, k) will be next to A(i+1, j, k). In C and, consequently, NumPy, arrays are stored row first: A[i, j, k] is next to A[i, j, k+1]. For e...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@odr@_odrpack.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "dr-guangtou/unagi", "repo_path": "unagi_extracted/unagi-master/unagi/test/__init__.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*-
dr-guangtouREPO_NAMEunagiPATH_START.@unagi_extracted@unagi-master@unagi@test@__init__.py@.PATH_END.py
{ "filename": "check_massif_log.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/qa/common/check_massif_log.py", "type": "Python" }
#!/usr/bin/env python3 # Copyright 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright ...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@common@check_massif_log.py@.PATH_END.py
{ "filename": "cooling_model_reader.py", "repo_name": "cylammarco/WDPhotTools", "repo_path": "WDPhotTools_extracted/WDPhotTools-main/src/WDPhotTools/cooling_model_reader.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Handling the formatting of different cooling models""" import io import glob import os import numpy as np from scipy.interpolate import CloughTocher2DInterpolator from scipy.interpolate import RBFInterpolator class CoolingModelReader(object): """A reader object...
cylammarcoREPO_NAMEWDPhotToolsPATH_START.@WDPhotTools_extracted@WDPhotTools-main@src@WDPhotTools@cooling_model_reader.py@.PATH_END.py
{ "filename": "_ticklabeloverflow.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymap/colorbar/_ticklabeloverflow.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="densitymap.colorbar", **kwargs, ): super(TicklabeloverflowValidator, self).__init__(...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymap@colorbar@_ticklabeloverflow.py@.PATH_END.py
{ "filename": "pool.py", "repo_name": "adrn/schwimmbad", "repo_path": "schwimmbad_extracted/schwimmbad-main/src/schwimmbad/pool.py", "type": "Python" }
# type: ignore import abc from collections.abc import Iterable from typing import Any, Callable # This package from .utils import batch_tasks __all__ = ["BasePool"] def _callback_wrapper( callback: Callable[..., Any], generator: Iterable[Any] ) -> Iterable[Any]: for element in generator: callback(el...
adrnREPO_NAMEschwimmbadPATH_START.@schwimmbad_extracted@schwimmbad-main@src@schwimmbad@pool.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/ohlc/_line.py", "type": "Python" }
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="line", parent_name="ohlc", **kwargs): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, data_cla...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@ohlc@_line.py@.PATH_END.py
{ "filename": "env_data.py", "repo_name": "mtalapinto/moes", "repo_path": "platospec/optics/env_data.py", "type": "Python" }
import glob from astropy.time import Time import pandas as pd import numpy as np import matplotlib.pyplot as plt from . import vis_spectrometer from . import echelle_orders from . import parameters def get_CCD_T_vis(mjd): # path_env_data = '/home/marcelo/Documents/ramses/vis/env_data/' path_env_data = 'env_d...
mtalapintoREPO_NAMEmoesPATH_START.@platospec@optics@env_data.py@.PATH_END.py
{ "filename": "test_mcmc_util.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/tests/infer/mcmc/test_mcmc_util.py", "type": "Python" }
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from functools import partial import pytest import torch import pyro import pyro.distributions as dist from pyro.infer import Predictive from pyro.infer.autoguide import ( init_to_feasible, init_to_generated, init_to_...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@tests@infer@mcmc@test_mcmc_util.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "MNGuenther/allesfitter", "repo_path": "allesfitter_extracted/allesfitter-master/allesfitter/exoworlds_rdx/lightcurves/__init__.py", "type": "Python" }
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Fri Oct 5 14:18:20 2018 @author: Maximilian N. Günther MIT Kavli Institute for Astrophysics and Space Research, Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, MA 02109, USA Email: maxgue@mit.edu Web: www.mnguenther.com """ fr...
MNGuentherREPO_NAMEallesfitterPATH_START.@allesfitter_extracted@allesfitter-master@allesfitter@exoworlds_rdx@lightcurves@__init__.py@.PATH_END.py
{ "filename": "_cache.py", "repo_name": "ThomasEdwardRiley/xpsi-pre-transfer", "repo_path": "xpsi-pre-transfer_extracted/xpsi-pre-transfer-master/xpsi/PostProcessing/_cache.py", "type": "Python" }
from __future__ import division, print_function from .. import __version__ from ._global_imports import * try: import h5py except ImportError: print('Install h5py to enable signal caching.') raise class _Cache(object): """ Cache numerical model objects computed during likelihood evaluation. :pa...
ThomasEdwardRileyREPO_NAMExpsi-pre-transferPATH_START.@xpsi-pre-transfer_extracted@xpsi-pre-transfer-master@xpsi@PostProcessing@_cache.py@.PATH_END.py
{ "filename": "_uid.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sankey/_uid.py", "type": "Python" }
import _plotly_utils.basevalidators class UidValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="uid", parent_name="sankey", **kwargs): super(UidValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=k...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sankey@_uid.py@.PATH_END.py
{ "filename": "example-line.ipynb", "repo_name": "JohannesBuchner/UltraNest", "repo_path": "UltraNest_extracted/UltraNest-master/docs/example-line.ipynb", "type": "Jupyter Notebook" }
# Tutorial: fitting a line In this tutorial you will learn: - How to fit a line to data with error bars - How to obtain the intrinsic scatter and its uncertainties - How to quantify the numerical error of the sampling - How to compare empirical models Lets say we want to fit a line to some data points. Here is...
JohannesBuchnerREPO_NAMEUltraNestPATH_START.@UltraNest_extracted@UltraNest-master@docs@example-line.ipynb@.PATH_END.py
{ "filename": "test_tf.py", "repo_name": "hongwanliu/DarkHistory", "repo_path": "DarkHistory_extracted/DarkHistory-master/tests/test_tf.py", "type": "Python" }
import os import sys import pytest import h5py import numpy as np sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from darkhistory.config import load_data @pytest.fixture(scope='module') def data_loader(): data = { 'dep_tf' : load_data('dep_tf'), 'tf_helper' : loa...
hongwanliuREPO_NAMEDarkHistoryPATH_START.@DarkHistory_extracted@DarkHistory-master@tests@test_tf.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/marker/line/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter3d.marker.line", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@marker@line@_color.py@.PATH_END.py
{ "filename": "_ticklabelstep.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticklabelstep.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scattergl.marker.colorbar", **kwargs, ): super(TicklabelstepValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergl@marker@colorbar@_ticklabelstep.py@.PATH_END.py
{ "filename": "_cmax.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/marker/line/_cmax.py", "type": "Python" }
import _plotly_utils.basevalidators class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scattercarpet.marker.line", **kwargs ): super(CmaxValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@marker@line@_cmax.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "CP3-Origins/cp3-bench", "repo_path": "cp3-bench_extracted/cp3-bench-master/bench/methods/template/tests/__init__.py", "type": "Python" }
CP3-OriginsREPO_NAMEcp3-benchPATH_START.@cp3-bench_extracted@cp3-bench-master@bench@methods@template@tests@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pytest/py3/pytest/__init__.py", "type": "Python" }
# PYTHON_ARGCOMPLETE_OK """pytest: unit and functional testing with Python.""" from _pytest import __version__ from _pytest import version_tuple from _pytest._code import ExceptionInfo from _pytest.assertion import register_assert_rewrite from _pytest.cacheprovider import Cache from _pytest.capture import CaptureFixtur...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pytest@py3@pytest@__init__.py@.PATH_END.py
{ "filename": "smooth_cal_inspect_2458192.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/smooth_cal_inspect/smooth_cal_inspect_2458192.ipynb", "type": "Jupyter Notebook" }
# Stage 2 Calibration Smoothing Nightly Notebook **Josh Dillon**, Last Revised 12/4/20 ```python import numpy as np import matplotlib.pyplot as plt import matplotlib from hera_cal import io, redcal, apply_cal, abscal, utils from hera_cal.smooth_cal import build_time_blacklist from hera_qm.metrics_io import load_metr...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@smooth_cal_inspect@smooth_cal_inspect_2458192.ipynb@.PATH_END.py
{ "filename": "starpositions_interface.py", "repo_name": "Varnani/pywd2015-qt5", "repo_path": "pywd2015-qt5_extracted/pywd2015-qt5-master/src/interfaces/starpositions_interface.py", "type": "Python" }
from PyQt5 import QtWidgets, QtGui, QtCore from gui import starpositions_widget from src.helpers.matplotlib_embedder import MatplotlibWidget from src import constants from src.helpers.wd_utils import wd_io from src.helpers import methods import time from matplotlib import pyplot import io import os class Widget(QtWid...
VarnaniREPO_NAMEpywd2015-qt5PATH_START.@pywd2015-qt5_extracted@pywd2015-qt5-master@src@interfaces@starpositions_interface.py@.PATH_END.py
{ "filename": "efficientnet_test.py", "repo_name": "keras-team/keras-tuner", "repo_path": "keras-tuner_extracted/keras-tuner-master/keras_tuner/applications/efficientnet_test.py", "type": "Python" }
# Copyright 2019 The KerasTuner 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 ...
keras-teamREPO_NAMEkeras-tunerPATH_START.@keras-tuner_extracted@keras-tuner-master@keras_tuner@applications@efficientnet_test.py@.PATH_END.py
{ "filename": "py_startup_test.py", "repo_name": "perwin/imfit", "repo_path": "imfit_extracted/imfit-master/python/py_startup_test.py", "type": "Python" }
#!/usr/bin/env python3 # # Tests to see whether numpy and pyfits are present (returns 1 if they are, # 0 if at least one is not accessible) numpyPresent = False astropyPresent = False pyfitsPresent = False # check for numpy try: import numpy except ImportError: numpyPresent = False else: numpyPresent = True # ch...
perwinREPO_NAMEimfitPATH_START.@imfit_extracted@imfit-master@python@py_startup_test.py@.PATH_END.py
{ "filename": "memory_optimizer_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/grappler/memory_optimizer_test.py", "type": "Python" }
# Copyright 2017 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@grappler@memory_optimizer_test.py@.PATH_END.py
{ "filename": "load_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/saved_model/load_test.py", "type": "Python" }
# Copyright 2018 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@saved_model@load_test.py@.PATH_END.py
{ "filename": "_familysrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/textfont/_familysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scattergeo.textfont", **kwargs ): super(FamilysrcValidator, self).__init__( plotly_name=plotly_name, parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@textfont@_familysrc.py@.PATH_END.py
{ "filename": "CLIexample.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/examples/CLIexample.py", "type": "Python" }
""" Display a plot and an image with minimal setup. pg.plot() and pg.image() are indended to be used from an interactive prompt to allow easy data inspection (but note that PySide unfortunately does not call the Qt event loop while the interactive prompt is running, in this case it is necessary to call QApplication.e...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@examples@CLIexample.py@.PATH_END.py
{ "filename": "Hamiltonian_second_derivs_playground.py", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/in_progress-SEOBNR/SEOBNR/Hamiltonian_second_derivs_playground.py", "type": "Python" }
# NRPy+ code to generate first derivatives of the SEOBNRv3 Hamiltonian from a list of numerical expressions computing # said Hamiltonian. Originally written by Zach Etienne; edited and commented by Tyler Knowles. from outputC import outputC,lhrh,superfast_uniq # NRPy+: Core C code output module import sympy as sp ...
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@in_progress-SEOBNR@SEOBNR@Hamiltonian_second_derivs_playground.py@.PATH_END.py
{ "filename": "_name.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/splom/marker/colorbar/tickformatstop/_name.py", "type": "Python" }
import _plotly_utils.basevalidators class NameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="name", parent_name="splom.marker.colorbar.tickformatstop", **kwargs, ): super(NameValidator, self).__init__( plotly_name=p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@splom@marker@colorbar@tickformatstop@_name.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "folsomcp/ZDIpy", "repo_path": "ZDIpy_extracted/ZDIpy-main/core/__init__.py", "type": "Python" }
""" Functions used by the main ZDI code """
folsomcpREPO_NAMEZDIpyPATH_START.@ZDIpy_extracted@ZDIpy-main@core@__init__.py@.PATH_END.py
{ "filename": "_legendwidth.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/streamtube/_legendwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="streamtube", **kwargs): super(LegendwidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@streamtube@_legendwidth.py@.PATH_END.py
{ "filename": "psf_calculate.py", "repo_name": "Yash-10/beta-sgp", "repo_path": "beta-sgp_extracted/beta-sgp-master/psf/psf_calculate.py", "type": "Python" }
import os import glob import numpy as np import matplotlib.pyplot as plt from astropy.io import fits class PSF: def __init__(self, txt_file): """Initialize a `PSF` object. Parameters ---------- txt_file: str A file containing PSF attributes obtained from DIAPL. ...
Yash-10REPO_NAMEbeta-sgpPATH_START.@beta-sgp_extracted@beta-sgp-master@psf@psf_calculate.py@.PATH_END.py
{ "filename": "_gridcolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/ternary/baxis/_gridcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.ternary.baxis", **kwargs ): super(GridcolorValidator, self).__init__( plotly_name=plotly_name, par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@ternary@baxis@_gridcolor.py@.PATH_END.py
{ "filename": "__main__.py", "repo_name": "robvanholstein/IRDAP", "repo_path": "IRDAP_extracted/IRDAP-master/irdap/__main__.py", "type": "Python" }
''' This file contains the top-level code of IRDAP that allows the user to execute it. IRDAP is a Python package to accurately reduce SPHERE-IRDIS polarimetric data. Copyright (C) 2019 R.G. van Holstein Full documentation: https://irdap.readthedocs.io Feedback, questions, comments: rob.vanholstein@eso.org When publi...
robvanholsteinREPO_NAMEIRDAPPATH_START.@IRDAP_extracted@IRDAP-master@irdap@__main__.py@.PATH_END.py
{ "filename": "test_perf.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/libs/data/benchmarks_ut/test_perf.py", "type": "Python" }
import yatest def test(metrics): metrics.set_benchmark(yatest.common.execute_benchmark("catboost/libs/data/benchmarks/benchmarks"))
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@libs@data@benchmarks_ut@test_perf.py@.PATH_END.py
{ "filename": "_ticktextsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/marker/colorbar/_ticktextsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="scattergl.marker.colorbar", **kwargs, ): super(TicktextsrcValidator, self).__init__( plotly...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@marker@colorbar@_ticktextsrc.py@.PATH_END.py
{ "filename": "simple_structured_grid.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/examples/mayavi/mlab/simple_structured_grid.py", "type": "Python" }
""" An example creating a structured grid data set from numpy arrays using TVTK and visualizing it using mlab. In this example, we create a structured-grid data set: we describe data, both scalar and vector, lying on a structured-grid, ie a grid where each vertex has 6 neighbors. For this we directly create a Structur...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@examples@mayavi@mlab@simple_structured_grid.py@.PATH_END.py
{ "filename": "test_header_standard.py", "repo_name": "ledatelescope/bifrost", "repo_path": "bifrost_extracted/bifrost-master/test/test_header_standard.py", "type": "Python" }
# Copyright (c) 2016-2022, The Bifrost Authors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditio...
ledatelescopeREPO_NAMEbifrostPATH_START.@bifrost_extracted@bifrost-master@test@test_header_standard.py@.PATH_END.py
{ "filename": "base.py", "repo_name": "dwkim78/ASTRiDE", "repo_path": "ASTRiDE_extracted/ASTRiDE-master/astride/datasets/base.py", "type": "Python" }
""" Base IO code for all datasets """ from os.path import dirname from os.path import join from astropy.io import fits def read_fits(filename='long.fits'): """ Read an sample fits file and return only image part. Parameters ---------- filename : str Fits filename. Returns -----...
dwkim78REPO_NAMEASTRiDEPATH_START.@ASTRiDE_extracted@ASTRiDE-master@astride@datasets@base.py@.PATH_END.py
{ "filename": "arrayterator.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/typing/tests/data/pass/arrayterator.py", "type": "Python" }
from __future__ import annotations from typing import Any import numpy as np AR_i8: np.ndarray[Any, np.dtype[np.int_]] = np.arange(10) ar_iter = np.lib.Arrayterator(AR_i8) ar_iter.var ar_iter.buf_size ar_iter.start ar_iter.stop ar_iter.step ar_iter.shape ar_iter.flat ar_iter.__array__() for i in ar_iter: pass...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@typing@tests@data@pass@arrayterator.py@.PATH_END.py
{ "filename": "test_mometrics.py", "repo_name": "lsst/rubin_sim", "repo_path": "rubin_sim_extracted/rubin_sim-main/tests/maf/test_mometrics.py", "type": "Python" }
import unittest import numpy as np import pandas as pd import rubin_sim.maf.metrics as metrics class TestMoMetrics1(unittest.TestCase): def setUp(self): # Set up some sso_obs data to test the metrics on. # Note that sso_obs is a numpy recarray. # The expected set of columns in sso_obs is...
lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@tests@maf@test_mometrics.py@.PATH_END.py
{ "filename": "_separatethousands.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_separatethousands.py", "type": "Python" }
import _plotly_utils.basevalidators class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="treemap.marker.colorbar", **kwargs, ): super(SeparatethousandsValidator, self).__init__...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@marker@colorbar@_separatethousands.py@.PATH_END.py
{ "filename": "bench_load_TOAs.py", "repo_name": "nanograv/PINT", "repo_path": "PINT_extracted/PINT-master/profiling/bench_load_TOAs.py", "type": "Python" }
#!/usr/bin/env python import pint.toa # Get .tim file from here: # curl -O https://data.nanograv.org/static/data/J0740+6620.cfr+19.tim # This will load the TOAs, compute the positions of the Earth and planets, and apply clock corrections and build the table. thanktoas = pint.toa.get_TOAs( "J0740+6620.cfr+19.tim"...
nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@profiling@bench_load_TOAs.py@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/bar/selected/_textfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "bar.selected" _path_str = "bar.selected.textfont" _valid_props = {"color"} # color ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@bar@selected@_textfont.py@.PATH_END.py
{ "filename": "labels.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/mayavi/modules/labels.py", "type": "Python" }
# Author: Prabhu Ramachandran <prabhu [at] aero . iitb . ac . in> # Copyright (c) 2008, Enthought, Inc. # License: BSD Style. # Standard library imports. from vtk.numpy_interface import dataset_adapter as dsa # Enthought library imports. from traits.api import Int, Instance, Str, TraitError from traitsui.api import V...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@modules@labels.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "simonsobs/socs", "repo_path": "socs_extracted/socs-main/socs/agents/hwp_picoscope/drivers/__init__.py", "type": "Python" }
simonsobsREPO_NAMEsocsPATH_START.@socs_extracted@socs-main@socs@agents@hwp_picoscope@drivers@__init__.py@.PATH_END.py
{ "filename": "photometry.py", "repo_name": "astrotuvi/pyplate", "repo_path": "pyplate_extracted/pyplate-master/pyplate/process/photometry.py", "type": "Python" }
import os import math import numpy as np from astropy.table import Table from astropy.stats import sigma_clip from scipy.interpolate import InterpolatedUnivariateSpline, SmoothBivariateSpline from scipy.ndimage.filters import generic_filter from scipy.optimize import curve_fit from collections import OrderedDict from ....
astrotuviREPO_NAMEpyplatePATH_START.@pyplate_extracted@pyplate-master@pyplate@process@photometry.py@.PATH_END.py
{ "filename": "data_list.py", "repo_name": "threeML/threeML", "repo_path": "threeML_extracted/threeML-master/threeML/data_list.py", "type": "Python" }
# Author: G.Vianello (giacomov@stanford.edu) import collections class DataList(object): """ A container for data sets. Can be accessed as a dictionary, with the [key] operator. """ def __init__(self, *data_sets): """ Container for data sets (i.e., plugin instances) :para...
threeMLREPO_NAMEthreeMLPATH_START.@threeML_extracted@threeML-master@threeML@data_list.py@.PATH_END.py
{ "filename": "_tick0.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmap/colorbar/_tick0.py", "type": "Python" }
import _plotly_utils.basevalidators class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="heatmap.colorbar", **kwargs): super(Tick0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmap@colorbar@_tick0.py@.PATH_END.py
{ "filename": "_outlinecolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/mapbox/layer/fill/_outlinecolor.py", "type": "Python" }
import _plotly_utils.basevalidators class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="layout.mapbox.layer.fill", **kwargs, ): super(OutlinecolorValidator, self).__init__( pl...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@mapbox@layer@fill@_outlinecolor.py@.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/scatter3d/line/colorbar/_tickfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatter3d.line.colorbar" _path_str = "scatter3d.line.colorbar.tickfont" _valid_props = { ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scatter3d@line@colorbar@_tickfont.py@.PATH_END.py
{ "filename": "attention_test.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/attention/attention_test.py", "type": "Python" }
import numpy as np from keras.src import layers from keras.src import ops from keras.src import testing class AttentionTest(testing.TestCase): def test_attention_basics(self): # No scale, no concat. self.run_layer_test( layers.Attention, init_kwargs={ "scor...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@attention@attention_test.py@.PATH_END.py
{ "filename": "loss.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/losses/loss.py", "type": "Python" }
from keras.src import backend from keras.src import dtype_policies from keras.src import ops from keras.src import tree from keras.src.api_export import keras_export from keras.src.saving.keras_saveable import KerasSaveable from keras.src.utils.naming import auto_name @keras_export(["keras.Loss", "keras.losses.Loss"]...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@losses@loss.py@.PATH_END.py
{ "filename": "quadratic_tri.py", "repo_name": "hpparvi/PyTransit", "repo_path": "PyTransit_extracted/PyTransit-master/pytransit/models/limb_darkening/quadratic_tri.py", "type": "Python" }
from math import pi, sqrt from numba import njit from numpy import zeros @njit(fastmath=True) def ld_quadratic_tri(mu, pv): a, b = sqrt(pv[0]), 2 * pv[1] u, v = a * b, a * (1. - b) return 1. - u * (1. - mu) - v * (1. - mu) ** 2 @njit(fastmath=True) def ldi_quadratic_tri(pv): a, b = sqrt(pv[0]), 2 * ...
hpparviREPO_NAMEPyTransitPATH_START.@PyTransit_extracted@PyTransit-master@pytransit@models@limb_darkening@quadratic_tri.py@.PATH_END.py
{ "filename": "calc_depth_from_completeness.py", "repo_name": "BEAST-Fitting/beast", "repo_path": "beast_extracted/beast-master/beast/tools/calc_depth_from_completeness.py", "type": "Python" }
import numpy as np from astropy.table import Table, vstack from beast.physicsmodel.grid import SEDGrid import beast.observationmodel.noisemodel.generic_noisemodel as noisemodel from beast.observationmodel.vega import Vega def calc_depth( physgrid_list, noise_model_list, completeness_value=0.5, vega_ma...
BEAST-FittingREPO_NAMEbeastPATH_START.@beast_extracted@beast-master@beast@tools@calc_depth_from_completeness.py@.PATH_END.py
{ "filename": "sample_fit_MdwarfPlanets_4D_MRSStM.py", "repo_name": "shbhuk/mrexo", "repo_path": "mrexo_extracted/mrexo-master/mrexo/datasets/MdwarfRuns/MdwarfPlanets_4D_MRSStM_20231102/sample_fit_MdwarfPlanets_4D_MRSStM.py", "type": "Python" }
import os, sys from astropy.table import Table import numpy as np import numpy as np import pandas as pd import shutil from mrexo.mle_utils_nd import InputData, MLE_fit from mrexo.fit_nd import fit_relation from mrexo.plotting_nd import Plot2DJointDistribution, Plot2DWeights, Plot1DInputDataHistogram import matplotlib...
shbhukREPO_NAMEmrexoPATH_START.@mrexo_extracted@mrexo-master@mrexo@datasets@MdwarfRuns@MdwarfPlanets_4D_MRSStM_20231102@sample_fit_MdwarfPlanets_4D_MRSStM.py@.PATH_END.py
{ "filename": "_edgeshape.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/pathbar/_edgeshape.py", "type": "Python" }
import _plotly_utils.basevalidators class EdgeshapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="edgeshape", parent_name="treemap.pathbar", **kwargs ): super(EdgeshapeValidator, self).__init__( plotly_name=plotly_name, par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@pathbar@_edgeshape.py@.PATH_END.py
{ "filename": "_fill.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/volume/caps/x/_fill.py", "type": "Python" }
import _plotly_utils.basevalidators class FillValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="fill", parent_name="volume.caps.x", **kwargs): super(FillValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, e...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@volume@caps@x@_fill.py@.PATH_END.py
{ "filename": "test_starlets.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_LightModel/test_Profiles/test_starlets.py", "type": "Python" }
import numpy as np import numpy.testing as npt import pytest import unittest from lenstronomy.LightModel.light_model import LightModel from lenstronomy.LightModel.Profiles.gaussian import Gaussian from lenstronomy.LightModel.Profiles.starlets import SLIT_Starlets from lenstronomy.Util import util _force_no_pysap = (...
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_LightModel@test_Profiles@test_starlets.py@.PATH_END.py
{ "filename": "test_meshtools.py", "repo_name": "bccp/nbodykit", "repo_path": "nbodykit_extracted/nbodykit-master/nbodykit/tests/test_meshtools.py", "type": "Python" }
from runtests.mpi import MPITest from nbodykit.lab import * from nbodykit import setup_logging from nbodykit.meshtools import SlabIterator from pmesh.pm import ParticleMesh, RealField, ComplexField import pytest from numpy.testing import assert_array_equal # debug logging setup_logging("debug") @MPITest([1]) def tes...
bccpREPO_NAMEnbodykitPATH_START.@nbodykit_extracted@nbodykit-master@nbodykit@tests@test_meshtools.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/marker/colorbar/tickfont/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="scattersmith.marker.colorbar.tickfont", **kwargs, ): super(FamilyValidator, self).__init__( plotly...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@marker@colorbar@tickfont@_family.py@.PATH_END.py
{ "filename": "CONTRIBUTING.md", "repo_name": "gwastro/pycbc", "repo_path": "pycbc_extracted/pycbc-master/CONTRIBUTING.md", "type": "Markdown" }
# Contributing to PyCBC This page outlines the recommended procedure for contributing changes to the PyCBC repository. Please familiarise yourself with [GitHub](https://github.com) ensure your account is configured according to these instructions. ## Reporting Issues When reporting issues, please include as much det...
gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@CONTRIBUTING.md@.PATH_END.py
{ "filename": "sophia.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/sophia.py", "type": "Python" }
""" pygments.lexers.sophia ~~~~~~~~~~~~~~~~~~~~~~ Lexer for Sophia. Derived from pygments/lexers/reason.py. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, include, default, words from pygme...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@sophia.py@.PATH_END.py
{ "filename": "_minexponent.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/marker/colorbar/_minexponent.py", "type": "Python" }
import _plotly_utils.basevalidators class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scatter.marker.colorbar", **kwargs ): super(MinexponentValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@marker@colorbar@_minexponent.py@.PATH_END.py
{ "filename": "YaleCAMGalaxyCatalog.py", "repo_name": "LSSTDESC/descqa", "repo_path": "descqa_extracted/descqa-master/v1/GCRCatalogs/YaleCAMGalaxyCatalog.py", "type": "Python" }
# Yale CAM galaxy catalogue class # Duncan Campbell # Yale University # February, 2016 # load modules import os import re import numpy as np import h5py from astropy.cosmology import FlatLambdaCDM import astropy.units as u from .GalaxyCatalogInterface import GalaxyCatalog __all__ = ['YaleCAMGalaxyCatalog'] class Yal...
LSSTDESCREPO_NAMEdescqaPATH_START.@descqa_extracted@descqa-master@v1@GCRCatalogs@YaleCAMGalaxyCatalog.py@.PATH_END.py
{ "filename": "_tickformatstopdefaults.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickformatstopdefaults.py", "type": "Python" }
import _plotly_utils.basevalidators class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="bar.marker.colorbar", **kwargs, ): super(TickformatstopdefaultsValidator, se...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@marker@colorbar@_tickformatstopdefaults.py@.PATH_END.py
{ "filename": "Greybody_emulator.ipynb", "repo_name": "H-E-L-P/XID_plus", "repo_path": "XID_plus_extracted/XID_plus-master/docs/build/doctrees/nbsphinx/notebooks/examples/SED_emulator/Greybody_emulator.ipynb", "type": "Jupyter Notebook" }
```python import fitIR import fitIR.models as models import fitIR.analyse as analyse from astropy.cosmology import WMAP9 as cosmo import jax import numpy as np import pylab as plt import astropy.units as u import scipy.integrate as integrate %matplotlib inline import jax.numpy as jnp from jax import grad, jit, vmap, v...
H-E-L-PREPO_NAMEXID_plusPATH_START.@XID_plus_extracted@XID_plus-master@docs@build@doctrees@nbsphinx@notebooks@examples@SED_emulator@Greybody_emulator.ipynb@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/marker/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter3d.marker", **kwargs): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@marker@_color.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/matplotlib/backends/qt_editor/__init__.py", "type": "Python" }
from __future__ import (absolute_import, division, print_function, unicode_literals)
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@matplotlib@backends@qt_editor@__init__.py@.PATH_END.py
{ "filename": "michi2_filter_flux_2sigma_only_Optical_NIR.py", "repo_name": "1054/Crab.Toolkit.michi2", "repo_path": "Crab.Toolkit.michi2_extracted/Crab.Toolkit.michi2-master/bin/michi2_filter_flux_2sigma_only_Optical_NIR.py", "type": "Python" }
#!/usr/bin/env python # import os import sys import numpy import astropy import astropy.io.ascii as asciitable from copy import copy #################################### # MAIN # #################################### if not len(sys.argv) > 2: print('Usage: michi2_filter_flux_3sigma...
1054REPO_NAMECrab.Toolkit.michi2PATH_START.@Crab.Toolkit.michi2_extracted@Crab.Toolkit.michi2-master@bin@michi2_filter_flux_2sigma_only_Optical_NIR.py@.PATH_END.py
{ "filename": "Gravitational_Lensing.ipynb", "repo_name": "astro-datalab/notebooks-latest", "repo_path": "notebooks-latest_extracted/notebooks-latest-master/06_EPO/TeenAstronomyCafe/05_Gravitational_Lensing/Gravitational_Lensing.ipynb", "type": "Jupyter Notebook" }
<br> <br> <font size='6'><u><b>Gravitational Lensing</b></u></font> <br> ##### Written by A. Bolton, 2017 ##### Updated 2018: Elliot Kisiel and Connie Walker ##### Revised by Andres Jaramillo You have learned about how we can measure the mass of a galaxy based on the gravitational lensing of a foreground galaxy. This...
astro-datalabREPO_NAMEnotebooks-latestPATH_START.@notebooks-latest_extracted@notebooks-latest-master@06_EPO@TeenAstronomyCafe@05_Gravitational_Lensing@Gravitational_Lensing.ipynb@.PATH_END.py
{ "filename": "massive_star_composition.py", "repo_name": "AMReX-Astro/Castro", "repo_path": "Castro_extracted/Castro-main/Exec/science/massive_star/analysis/massive_star_composition.py", "type": "Python" }
#!/usr/bin/env python3 import matplotlib matplotlib.use('agg') import os import sys import yt import matplotlib.pyplot as plt import numpy as np from functools import reduce from mpl_toolkits.axes_grid1 import ImageGrid # assume that our data is in CGS from yt.units import cm, amu from yt.frontends.boxlib.api impor...
AMReX-AstroREPO_NAMECastroPATH_START.@Castro_extracted@Castro-main@Exec@science@massive_star@analysis@massive_star_composition.py@.PATH_END.py
{ "filename": "ACSImport.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/Kit/acsutilpy/src/AcsutilPy/ACSImport.py", "type": "Python" }
#! /usr/bin/env python #******************************************************************************* # ALMA - Atacama Large Millimiter Array # (c) National Research Council of Canada, 2007 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@Kit@acsutilpy@src@AcsutilPy@ACSImport.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "mlipatov/paint_atmospheres", "repo_path": "paint_atmospheres_extracted/paint_atmospheres-master/setup.py", "type": "Python" }
from setuptools import setup, find_packages setup( name='paint_atmospheres', version='1.2.0', packages=find_packages(), package_dir={'paint_atmospheres': 'pa'}, entry_points={'console_scripts': [ 'calc_limbdark=pa.calc_limbdark:run', 'calc_star=pa.calc_star:run', 'calc_spectra=pa.cal...
mlipatovREPO_NAMEpaint_atmospheresPATH_START.@paint_atmospheres_extracted@paint_atmospheres-master@setup.py@.PATH_END.py
{ "filename": "_database.py", "repo_name": "ucl-exoplanets/ExoTETHyS", "repo_path": "ExoTETHyS_extracted/ExoTETHyS-master/exotethys/_database.py", "type": "Python" }
from __future__ import absolute_import from __future__ import division from __future__ import print_function #import pkg_resources import importlib.resources #from ._0imports import * import os import sys if sys.version_info[0] > 2: from urllib.request import urlretrieve else: from urllib import urlretrieve ...
ucl-exoplanetsREPO_NAMEExoTETHySPATH_START.@ExoTETHyS_extracted@ExoTETHyS-master@exotethys@_database.py@.PATH_END.py
{ "filename": "vis_spectrometer.py", "repo_name": "mtalapinto/moes", "repo_path": "platospec/optics/vis_spectrometer.py", "type": "Python" }
from . import slit from . import fn_system from . import collimator from . import echelle from . import flat_mirror from . import grism from . import camera from . import field_flattener from . import CCD_vis from . import refraction_index from . import trace from . import transform import numpy as np from . import cte...
mtalapintoREPO_NAMEmoesPATH_START.@platospec@optics@vis_spectrometer.py@.PATH_END.py
{ "filename": "CalTempFromBias_iraf.py", "repo_name": "spacetelescope/stsdas_stripped", "repo_path": "stsdas_stripped_extracted/stsdas_stripped-master/stsdas/pkg/hst_calib/nicmos/CalTempFromBias_iraf.py", "type": "Python" }
from __future__ import division, print_function # confidence high import os # Import IRAF classes from pyraf import iraf from pyraf.iraf import stsdas, hst_calib from nictools import CalTempFromBias version = '2.01 (2008-Oct-21)' # Point to default parameter file for task _parfile = 'nicmos$CalTempFromBias.par' _t...
spacetelescopeREPO_NAMEstsdas_strippedPATH_START.@stsdas_stripped_extracted@stsdas_stripped-master@stsdas@pkg@hst_calib@nicmos@CalTempFromBias_iraf.py@.PATH_END.py
{ "filename": "amr_linwave.py", "repo_name": "PrincetonUniversity/athena", "repo_path": "athena_extracted/athena-master/tst/regression/scripts/tests/implicit_radiation/amr_linwave.py", "type": "Python" }
# Regression test based on linear wave convergence problem # for full radiation hydro equations, using the # implicit radiation hydro module and AMR # Modules import logging import scripts.utils.athena as athena import sys sys.path.insert(0, '../../vis/python') import athena_read # noqa athena_read.check_nan_flag = ...
PrincetonUniversityREPO_NAMEathenaPATH_START.@athena_extracted@athena-master@tst@regression@scripts@tests@implicit_radiation@amr_linwave.py@.PATH_END.py
{ "filename": "sed.py", "repo_name": "GalSim-developers/GalSim", "repo_path": "GalSim_extracted/GalSim-main/galsim/config/sed.py", "type": "Python" }
# Copyright (c) 2012-2023 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. # https://github.com/GalSim-developers/GalSim # # GalSim is free software: redistribution and use in source and binary forms, # with or w...
GalSim-developersREPO_NAMEGalSimPATH_START.@GalSim_extracted@GalSim-main@galsim@config@sed.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scattermapbox/_line.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattermapbox" _path_str = "scattermapbox.line" _valid_props = {"color", "width"} # color...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@scattermapbox@_line.py@.PATH_END.py
{ "filename": "inspect_fit_results.py", "repo_name": "omsharansalafia/grbpop", "repo_path": "grbpop_extracted/grbpop-main/inspect_fit_results.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt import corner import emcee from sklearn.decomposition import PCA def credible(x_i,level=0.68,bins=50): y,x = np.histogram(x_i,bins=bins) s = np.argsort(y) c = np.zeros_like(y) c[s] = np.cumsum(y[s]) c = c/c.max() c0 = np.min(x[:-1][c>(1.-l...
omsharansalafiaREPO_NAMEgrbpopPATH_START.@grbpop_extracted@grbpop-main@inspect_fit_results.py@.PATH_END.py
{ "filename": "test_detector_db.py", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioReco/detector/test_detector_db.py", "type": "Python" }
import NuRadioReco.detector.detector import argparse import datetime if __name__ == "__main__": parser = argparse.ArgumentParser(description='test DB detector description') parser.add_argument('station_number', type=int, help='the station number') parser.add_argument("--time", dest=...
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioReco@detector@test_detector_db.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/slices/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._z import ZValidator from ._y import YValidator from ._x import XValidator 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@volume@slices@__init__.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/pie/hoverlabel/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "pie.hoverlabel" _path_str = "pie.hoverlabel.font" _valid_props = {"color", "colorsrc", "family...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@pie@hoverlabel@_font.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "microsoft/vscode", "repo_path": "vscode_extracted/vscode-main/.devcontainer/README.md", "type": "Markdown" }
# Code - OSS Development Container [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode) This repository includes configuration for ...
microsoftREPO_NAMEvscodePATH_START.@vscode_extracted@vscode-main@.devcontainer@README.md@.PATH_END.py
{ "filename": "_colorscale.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/barpolar/marker/_colorscale.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="barpolar.marker", **kwargs ): super(ColorscaleValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@barpolar@marker@_colorscale.py@.PATH_END.py
{ "filename": "test_customdetrend.py", "repo_name": "ekaterinailin/AltaiPony", "repo_path": "AltaiPony_extracted/AltaiPony-master/altaipony/tests/test_customdetrend.py", "type": "Python" }
import pytest import numpy as np import pandas as pd from ..flarelc import FlareLightCurve from ..customdetrend import (custom_detrending, estimate_detrended_noise, remove_exponential_fringes, remove_sines_iteratively, measu...
ekaterinailinREPO_NAMEAltaiPonyPATH_START.@AltaiPony_extracted@AltaiPony-master@altaipony@tests@test_customdetrend.py@.PATH_END.py
{ "filename": "getStats.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/Benchmark/bulkDataNTPerf/src/getStats.py", "type": "Python" }
#! /usr/bin/env python #******************************************************************************* # ALMA - Atacama Large Millimiter Array # Copyright (c) European Southern Observatory, 2016 # # 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@Benchmark@bulkDataNTPerf@src@getStats.py@.PATH_END.py
{ "filename": "_side.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/_side.py", "type": "Python" }
import _plotly_utils.basevalidators class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="histogram2dcontour.colorbar.title", **kwargs, ): super(SideValidator, self).__init__( plotly_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@colorbar@title@_side.py@.PATH_END.py
{ "filename": "basic_walkthrough.py", "repo_name": "dmlc/xgboost", "repo_path": "xgboost_extracted/xgboost-master/demo/guide-python/basic_walkthrough.py", "type": "Python" }
""" Getting started with XGBoost ============================ This is a simple example of using the native XGBoost interface, there are other interfaces in the Python package like scikit-learn interface and Dask interface. See :doc:`/python/python_intro` and :doc:`/tutorials/index` for other references. """ import ...
dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@demo@guide-python@basic_walkthrough.py@.PATH_END.py
{ "filename": "sensitivity_analysis.py", "repo_name": "sbi-dev/sbi", "repo_path": "sbi_extracted/sbi-main/sbi/analysis/sensitivity_analysis.py", "type": "Python" }
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed # under the Apache License Version 2.0, see <https://www.apache.org/licenses/> import logging from copy import deepcopy from typing import Any, Callable, Optional, Tuple, Union from warnings import warn import torch from pyknos.nflo...
sbi-devREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@analysis@sensitivity_analysis.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "james-trayford/strauss", "repo_path": "strauss_extracted/strauss-main/README.md", "type": "Markdown" }
# STRAUSS ***S**onification **T**ools and **R**esources for **A**nalysis **U**sing **S**ound **S**ynthesis* ![Sonification Tools & Resources for Analysis Using Sound Synthesis](./misc/strauss_logo_new_dark.jpg "STRAUSS logo") ## Sonification and STRAUSS *"Sonification"* is the process of conveying data via the mediu...
james-trayfordREPO_NAMEstraussPATH_START.@strauss_extracted@strauss-main@README.md@.PATH_END.py
{ "filename": "vesde.py", "repo_name": "AlexandreAdam/score_models", "repo_path": "score_models_extracted/score_models-master/score_models/sde/vesde.py", "type": "Python" }
import torch from .sde import SDE from torch import Tensor import numpy as np from torch.distributions import Normal, Independent from score_models.utils import DEVICE class VESDE(SDE): def __init__( self, sigma_min: float, sigma_max: float, T:float=1.0, ...
AlexandreAdamREPO_NAMEscore_modelsPATH_START.@score_models_extracted@score_models-master@score_models@sde@vesde.py@.PATH_END.py
{ "filename": "Installation.ipynb", "repo_name": "PrincetonUniversity/charis-dep", "repo_path": "charis-dep_extracted/charis-dep-main/documentation/source/Installation.ipynb", "type": "Jupyter Notebook" }
# Install the CHARIS Data reduction pipeline ### Requirements Python 2.7 Cython with a C compiler and OpenMP. C compilers as gcc-5, gcc-mp-5, gcc-mp-6 are acceptable. Your computer should have at least ~2 GB of RAM to extract data cubes, and at least 2 GB/core (and at least 4 GB total) to build the calibration file...
PrincetonUniversityREPO_NAMEcharis-depPATH_START.@charis-dep_extracted@charis-dep-main@documentation@source@Installation.ipynb@.PATH_END.py
{ "filename": "sigproc.py", "repo_name": "fjankowsk/scatfit", "repo_path": "scatfit_extracted/scatfit-master/scatfit/sigproc.py", "type": "Python" }
# # SIGPROC filterbank functions. # 2022 - 2024 Fabian Jankowski # from mtcutils import Candidate import numpy as np def load_frb_data(filename, dm, fscrunch, tscrunch, norfi): """ Load the FRB data from a SIGPROC filterbank file. Parameters ---------- filname: str The filterbank fil...
fjankowskREPO_NAMEscatfitPATH_START.@scatfit_extracted@scatfit-master@scatfit@sigproc.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/library/python/fs/__init__.py", "type": "Python" }
# coding: utf-8 import codecs import errno import logging import os import random import shutil import six import stat import sys import library.python.func import library.python.strings import library.python.windows logger = logging.getLogger(__name__) try: WindowsError except NameError: WindowsError = No...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@library@python@fs@__init__.py@.PATH_END.py