metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "json_format.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/protobuf/py2/google/protobuf/json_format.py", "type": "Python" }
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@protobuf@py2@google@protobuf@json_format.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/README.md", "type": "Markdown" }
**T**ransit and **R**adial velocity **I**nteractive **F**itting tool for **O**rbital analysis and **N**-body simulations: **The Exo-Striker** <p align="center"> <img width="400" src="./exostriker/source/png/33_striker.png"> </p> The Exo-Striker analyzes exoplanet orbitals, performs N-body simulations, and models...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@README.md@.PATH_END.py
{ "filename": "create-test-files.py", "repo_name": "ziotom78/dacapo_calibration", "repo_path": "dacapo_calibration_extracted/dacapo_calibration-master/create-test-files.py", "type": "Python" }
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- '''Create a set of FITS files to be used as test input for the DaCapo calibration codes. ''' import logging as log import os.path from typing import Any from astropy.io import fits import numpy as np import healpy import click from calibrate import get_dipole_temperatu...
ziotom78REPO_NAMEdacapo_calibrationPATH_START.@dacapo_calibration_extracted@dacapo_calibration-master@create-test-files.py@.PATH_END.py
{ "filename": "_showbackground.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/scene/zaxis/_showbackground.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowbackgroundValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="showbackground", parent_name="layout.scene.zaxis", **kwargs ): super(ShowbackgroundValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@scene@zaxis@_showbackground.py@.PATH_END.py
{ "filename": "add_rtp_process_record.py", "repo_name": "HERA-Team/hera_mc", "repo_path": "hera_mc_extracted/hera_mc-main/scripts/add_rtp_process_record.py", "type": "Python" }
#! /usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright 2019 the HERA Collaboration # Licensed under the 2-clause BSD license. """Add individual processing record to M&C database from RTP.""" import importlib import warnings import numpy as np import pyuvdata from astropy.time import Time from pkg_r...
HERA-TeamREPO_NAMEhera_mcPATH_START.@hera_mc_extracted@hera_mc-main@scripts@add_rtp_process_record.py@.PATH_END.py
{ "filename": "maths_functions.py", "repo_name": "ejhigson/perfectns", "repo_path": "perfectns_extracted/perfectns-master/perfectns/maths_functions.py", "type": "Python" }
#!/usr/bin/env python """ Mathematical functions. """ import numpy as np import scipy import scipy.stats import scipy.special import scipy.misc import mpmath def gaussian_r_given_logx(logx, sigma, n_dim): """ Returns r coordinate corresponding to logx values for a Gaussian prior with the specificed stan...
ejhigsonREPO_NAMEperfectnsPATH_START.@perfectns_extracted@perfectns-master@perfectns@maths_functions.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/api/applications/densenet/__init__.py", "type": "Python" }
"""DO NOT EDIT. This file was autogenerated. Do not edit it by hand, since your modifications would be overwritten. """ from keras.src.applications.densenet import DenseNet121 from keras.src.applications.densenet import DenseNet169 from keras.src.applications.densenet import DenseNet201 from keras.src.applications.de...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@api@applications@densenet@__init__.py@.PATH_END.py
{ "filename": "make_suzuki_hdf5.py", "repo_name": "MESAHub/mesa", "repo_path": "mesa_extracted/mesa-main/data/rates_data/suzuki/make_suzuki_hdf5.py", "type": "Python" }
#!/usr/bin/python import io import lzma import re import string import h5py import numpy as np def make_mesa_rxn_id(isos, wk_str): mesa_isos = [] for iso in isos: m = re.match('(?P<A>[0-9]{1,3})(?P<Z>[A-Z][a-z]?)', iso) mesa_isos.append('{Z}{A}'.format(**m.groupdict()).lower()) return '_...
MESAHubREPO_NAMEmesaPATH_START.@mesa_extracted@mesa-main@data@rates_data@suzuki@make_suzuki_hdf5.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "icecube/toise", "repo_path": "toise_extracted/toise-main/toise/figures/diffuse/__init__.py", "type": "Python" }
icecubeREPO_NAMEtoisePATH_START.@toise_extracted@toise-main@toise@figures@diffuse@__init__.py@.PATH_END.py
{ "filename": "stream_multiline_model.ipynb", "repo_name": "tere-valdivia/Barnard_5_infall", "repo_path": "Barnard_5_infall_extracted/Barnard_5_infall-main/B5_IRS1_ALMA/gaussfit_H2CO/analysis_central_chans_masked/stream_multiline_model.ipynb", "type": "Jupyter Notebook" }
# Streamline model: calculation of several streamline models at the same time The idea is to test if a family of streamline model solutions can fit the profile we see, instead of showing only one solution. ## Preliminaries ```python import numpy as np import astropy.units as u from astropy.io import fits from astro...
tere-valdiviaREPO_NAMEBarnard_5_infallPATH_START.@Barnard_5_infall_extracted@Barnard_5_infall-main@B5_IRS1_ALMA@gaussfit_H2CO@analysis_central_chans_masked@stream_multiline_model.ipynb@.PATH_END.py
{ "filename": "test_separations.py", "repo_name": "Jammy2211/PyAutoLens", "repo_path": "PyAutoLens_extracted/PyAutoLens-main/test_autolens/point/fit/positions/source/test_separations.py", "type": "Python" }
import pytest import autolens as al def test__two_sets_of_positions__residuals_likelihood_correct(): point_source = al.ps.Point(centre=(0.0, 0.0)) galaxy_point_source = al.Galaxy(redshift=1.0, point_0=point_source) tracer = al.Tracer(galaxies=[al.Galaxy(redshift=0.5), galaxy_point_source]) positions...
Jammy2211REPO_NAMEPyAutoLensPATH_START.@PyAutoLens_extracted@PyAutoLens-main@test_autolens@point@fit@positions@source@test_separations.py@.PATH_END.py
{ "filename": "Single_processing.py", "repo_name": "Wang-Ruihui/A-live-homogeneous-database-of-solar-active-regions", "repo_path": "A-live-homogeneous-database-of-solar-active-regions_extracted/A-live-homogeneous-database-of-solar-active-regions-main/Single_processing.py", "type": "Python" }
# -*- coding: utf-8 -*- """ process the single magnetogram """ import numpy as np import matplotlib.pyplot as plt from astropy.io import fits from ARdetection import ARdetection, imshow from ARparameters import ARArea, ARFlux, ARLocat, Distance # -------------------------------------------------------------------------...
Wang-RuihuiREPO_NAMEA-live-homogeneous-database-of-solar-active-regionsPATH_START.@A-live-homogeneous-database-of-solar-active-regions_extracted@A-live-homogeneous-database-of-solar-active-regions-main@Single_processing.py@.PATH_END.py
{ "filename": "get_surrogate_model.py", "repo_name": "psheehan/pdspy", "repo_path": "pdspy_extracted/pdspy-master/pdspy/modeling/get_surrogate_model.py", "type": "Python" }
import schwimmbad import pickle import numpy import time import os def get_surrogate_model(params, model="pringle+ulrich+diana", \ quantity="temperature", nthreads=1): # Load the keys for the parameters of the surrogate model. keys = list(numpy.loadtxt(os.path.dirname(os.path.abspath(__file__))+\ ...
psheehanREPO_NAMEpdspyPATH_START.@pdspy_extracted@pdspy-master@pdspy@modeling@get_surrogate_model.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/community/mi6/__init__.py", "type": "Python" }
from .interface import Mi6
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@community@mi6@__init__.py@.PATH_END.py
{ "filename": "trt_plugin_test.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/qa/L0_trt_plugin/trt_plugin_test.py", "type": "Python" }
#!/usr/bin/env python3 # Copyright 2018-2024, 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@L0_trt_plugin@trt_plugin_test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py3/matplotlib/__init__.py", "type": "Python" }
""" An object-oriented plotting library. A procedural interface is provided by the companion pyplot module, which may be imported directly, e.g.:: import matplotlib.pyplot as plt or using ipython:: ipython at your terminal, followed by:: In [1]: %matplotlib In [2]: import matplotlib.pyplot as plt ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py3@matplotlib@__init__.py@.PATH_END.py
{ "filename": "bayesian_inference.md", "repo_name": "renecotyfanboy/jaxspec", "repo_path": "jaxspec_extracted/jaxspec-main/docs/theory/bayesian_inference.md", "type": "Markdown" }
## A breve introduction to Bayesian philosophy In a Bayesian inference problem, we gather all the a priori knowledge we have about the problem by defining probability distributions for our parameters $\theta$, the so-called **prior distribution**. We then need to build a statistical model, which will allow us to esti...
renecotyfanboyREPO_NAMEjaxspecPATH_START.@jaxspec_extracted@jaxspec-main@docs@theory@bayesian_inference.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/marker/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._symbolsrc import SymbolsrcValidator from ._symbol import SymbolValidator from ._standoffsrc import StandoffsrcValidator from ._standoff import StandoffValidator from ._sizesrc import SizesrcValidator ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@marker@__init__.py@.PATH_END.py
{ "filename": "sim_wiregrid.py", "repo_name": "simonsobs/sotodlib", "repo_path": "sotodlib_extracted/sotodlib-master/sotodlib/toast/ops/sim_wiregrid.py", "type": "Python" }
# Copyright (c) 2018-2024 Simons Observatory. # Full license can be found in the top level "LICENSE" file. import os import pickle import ephem import h5py import healpy as hp import numpy as np import traitlets from astropy import constants from astropy import units as u from scipy.constants import au as AU from sci...
simonsobsREPO_NAMEsotodlibPATH_START.@sotodlib_extracted@sotodlib-master@sotodlib@toast@ops@sim_wiregrid.py@.PATH_END.py
{ "filename": "diagdiag_complex.py", "repo_name": "ratt-ru/CubiCal", "repo_path": "CubiCal_extracted/CubiCal-master/cubical/kernels/diagdiag_complex.py", "type": "Python" }
# CubiCal: a radio interferometric calibration suite # (c) 2017 Rhodes University & Jonathan S. Kenyon # http://github.com/ratt-ru/CubiCal # This code is distributed under the terms of GPLv2, see LICENSE.md for details """ Kernels for 2x2 complex visibilities with diagonal gains. Functions require output arrays to be ...
ratt-ruREPO_NAMECubiCalPATH_START.@CubiCal_extracted@CubiCal-master@cubical@kernels@diagdiag_complex.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "pierfied/karmma", "repo_path": "karmma_extracted/karmma-master/karmma/__init__.py", "type": "Python" }
from .HMCSampler import HMCSampler from .karmma import KarmmaSampler from . import utils
pierfiedREPO_NAMEkarmmaPATH_START.@karmma_extracted@karmma-master@karmma@__init__.py@.PATH_END.py
{ "filename": "triples_integrate.py", "repo_name": "djmunoz/kozaipy", "repo_path": "kozaipy_extracted/kozaipy-master/kozaipy/triples_integrate.py", "type": "Python" }
import numpy as np import scipy.integrate as integ import kozaipy.triples as triples from .triples_integrate_full import * from .triples_integrate_tides import * from .triples_integrate_single_average import * #import bsint triple_precision = {"e1x": 1.0e-8, "e1y": 1.0e-8, "e1z...
djmunozREPO_NAMEkozaipyPATH_START.@kozaipy_extracted@kozaipy-master@kozaipy@triples_integrate.py@.PATH_END.py
{ "filename": "paths.py", "repo_name": "palumbom/sdo-clv-pipeline", "repo_path": "sdo-clv-pipeline_extracted/sdo-clv-pipeline-main/sdo_clv_pipeline/paths.py", "type": "Python" }
from pathlib import Path # Absolute path to the top level of the repository root = Path(__file__).resolve().parents[1].absolute() # Absolute path to the `src` folder src = root / "sdo_clv_pipeline" # Absolute path to the `src/data` folder (contains datasets) data = root / "data" # Absolute path to the `src/scripts`...
palumbomREPO_NAMEsdo-clv-pipelinePATH_START.@sdo-clv-pipeline_extracted@sdo-clv-pipeline-main@sdo_clv_pipeline@paths.py@.PATH_END.py
{ "filename": "test_cosmo_sn.py", "repo_name": "CobayaSampler/cobaya", "repo_path": "cobaya_extracted/cobaya-master/tests/test_cosmo_sn.py", "type": "Python" }
from copy import deepcopy from .test_cosmo_planck_2015 import params_lowTEB_highTTTEEE from .common_cosmo import body_of_test from cobaya.typing import empty_dict def _test_sn(packages_path, skip_not_installed, lik, theory='camb', lik_params=empty_dict): info_likelihood = {lik: lik_params} info_t...
CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@tests@test_cosmo_sn.py@.PATH_END.py
{ "filename": "test_crosscorr.py", "repo_name": "mlafarga/raccoon", "repo_path": "raccoon_extracted/raccoon-master/tests/test_crosscorr.py", "type": "Python" }
from pathlib import Path import numpy as np import pandas as pd from raccoon import crosscorr from raccoon import ccflibfort # Test def test_get_obj_info(): obj = crosscorr.get_obj_info() assert obj == 'obj' # Test funciton runs def test_ccflibfort_ccfcompute(): w = np.linspace(5000, 5100, 100) f =...
mlafargaREPO_NAMEraccoonPATH_START.@raccoon_extracted@raccoon-master@tests@test_crosscorr.py@.PATH_END.py
{ "filename": "_dtickrange.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_dtickrange.py", "type": "Python" }
import _plotly_utils.basevalidators class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="histogram2dcontour.colorbar.tickformatstop", **kwargs, ): super(DtickrangeValidator, self).__init__...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@colorbar@tickformatstop@_dtickrange.py@.PATH_END.py
{ "filename": "log_gaussian.py", "repo_name": "rhayes777/PyAutoFit", "repo_path": "PyAutoFit_extracted/PyAutoFit-main/autofit/mapper/prior/log_gaussian.py", "type": "Python" }
from typing import Optional import numpy as np from autofit.messages.normal import NormalMessage from .abstract import Prior from ...messages.composed_transform import TransformedMessage from ...messages.transform import log_transform class LogGaussianPrior(Prior): __identifier_fields__ = ("lower_limit", "upper...
rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@autofit@mapper@prior@log_gaussian.py@.PATH_END.py
{ "filename": "__main__.py", "repo_name": "nespinoza/juliet", "repo_path": "juliet_extracted/juliet-master/juliet/__main__.py", "type": "Python" }
import sys def main(args=None): if args is None: print('ERROR: You need to pass flags (e.g., -lcfilename, -priorfile, etc.) for juliet to work. \n'+\ ' Check out the wiki documentation for a list of flags at https://github.com/nespinoza/juliet/wiki/Installing-and-basic-usage.') args ...
nespinozaREPO_NAMEjulietPATH_START.@juliet_extracted@juliet-master@juliet@__main__.py@.PATH_END.py
{ "filename": "line-and-scatter.md", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/doc/python/line-and-scatter.md", "type": "Markdown" }
--- jupyter: jupytext: notebook_metadata_filter: all text_representation: extension: .md format_name: markdown format_version: '1.3' jupytext_version: 1.16.1 kernelspec: display_name: Python 3 (ipykernel) language: python name: python3 language_info: codemirror_mode...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@doc@python@line-and-scatter.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "nespinoza/transitspectroscopy", "repo_path": "transitspectroscopy_extracted/transitspectroscopy-master/src/__init__.py", "type": "Python" }
from ._version import __version__ __all__ = ['spectroscopy', 'utils', 'transitfitting', 'jwst'] from .spectroscopy import * from .transitfitting import * from .utils import * from .jwst import *
nespinozaREPO_NAMEtransitspectroscopyPATH_START.@transitspectroscopy_extracted@transitspectroscopy-master@src@__init__.py@.PATH_END.py
{ "filename": "wd_constants.py", "repo_name": "Varnani/pywd2015-qt5", "repo_path": "pywd2015-qt5_extracted/pywd2015-qt5-master/src/helpers/wd_utils/wd_constants.py", "type": "Python" }
# a dictionary mapping names to ID's of DC keeps DC_KEEPS_NAME_ID_DICT = { "spot_a_lat": 1.0, "spot_a_long": 2.0, "spot_a_rad": 3.0, "spot_a_tempf": 4.0, "spot_b_lat": 5.0, "spot_b_long": 6.0, "spot_b_rad": 7.0, "spot_b_tempf": 8.0, "a": 9.0, "e": 10.0, "perr": 11.0, "f...
VarnaniREPO_NAMEpywd2015-qt5PATH_START.@pywd2015-qt5_extracted@pywd2015-qt5-master@src@helpers@wd_utils@wd_constants.py@.PATH_END.py
{ "filename": "_legendgrouptitle.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/heatmapgl/_legendgrouptitle.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "heatmapgl" _path_str = "heatmapgl.legendgrouptitle" _valid_props = {"font", "text"...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@heatmapgl@_legendgrouptitle.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/choroplethmapbox/colorbar/_ticklabeloverflow.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="choroplethmapbox.colorbar", **kwargs, ): super(TicklabeloverflowValidator, self).__i...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choroplethmapbox@colorbar@_ticklabeloverflow.py@.PATH_END.py
{ "filename": "gen_java.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/modules/java/generator/gen_java.py", "type": "Python" }
#!/usr/bin/env python import sys, re, os.path, errno, fnmatch import json import logging import codecs from shutil import copyfile from pprint import pformat from string import Template if sys.version_info[0] >= 3: from io import StringIO else: import io class StringIO(io.StringIO): def write(self...
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@modules@java@generator@gen_java.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "tloredo/CUDAHM", "repo_path": "CUDAHM_extracted/CUDAHM-master/README.md", "type": "Markdown" }
CUDAHM ====== Routines for using CUDA to accelerate Bayesian inference of Hierarchical Models using Markov Chain Monte Carlo with GPUs. Description ----------- `CUDAHM` enables one to easily and rapidly construct an MCMC sampler for a three-level hierarchical model, requiring the user to supply only a minimimal amou...
tloredoREPO_NAMECUDAHMPATH_START.@CUDAHM_extracted@CUDAHM-master@README.md@.PATH_END.py
{ "filename": "periodic_event.py", "repo_name": "yuliang419/AstroNet-Vetting", "repo_path": "AstroNet-Vetting_extracted/AstroNet-Vetting-master/light_curve_util/periodic_event.py", "type": "Python" }
# Copyright 2018 The TensorFlow 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 ...
yuliang419REPO_NAMEAstroNet-VettingPATH_START.@AstroNet-Vetting_extracted@AstroNet-Vetting-master@light_curve_util@periodic_event.py@.PATH_END.py
{ "filename": "datasets.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/lanl/datasets.py", "type": "Python" }
from pyspedas import find_datasets # This routine was originally in lanl/__init__.py. def datasets(instrument=None, label=True): return find_datasets(mission="LANL", instrument=instrument, label=label)
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@lanl@datasets.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/volume/legendgrouptitle/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._font import Font else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@volume@legendgrouptitle@__init__.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "RuiningZHAO/wcpy", "repo_path": "wcpy_extracted/wcpy-main/README.md", "type": "Markdown" }
# wcpy A UI for wavelength calibration. ## Installation ``` pip install astro-wcpy ``` ## Usage Type `wavelength-calibrator` in command line.
RuiningZHAOREPO_NAMEwcpyPATH_START.@wcpy_extracted@wcpy-main@README.md@.PATH_END.py
{ "filename": "README.md", "repo_name": "rat-pac/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/tools/EventManip/README.md", "type": "Markdown" }
EventManip ========== Overview -------- This event visualizer uses Mathematica to render fancy 3D plots that are easy to view, rotate, and zoom. It also incorporates a powerful (though low level) ability to analyze the event tree, i.e. a tree of tracks with the primary particle track at the top. One can select subt...
rat-pacREPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@tools@EventManip@README.md@.PATH_END.py
{ "filename": "paper.md", "repo_name": "htjb/maxsmooth", "repo_path": "maxsmooth_extracted/maxsmooth-master/paper/paper.md", "type": "Markdown" }
--- title: 'maxsmooth: Derivative Constrained Function Fitting' tags: - Python - astrophysics - cosmology authors: - name: Harry T. J. Bevins orcid: 0000-0002-4367-3550 affiliation: "1" affiliations: - name: Astrophysics Group, Cavendish Laboratory, J.J.Thomson Avenue, Cambridge, CB3 0HE, United Kingdo...
htjbREPO_NAMEmaxsmoothPATH_START.@maxsmooth_extracted@maxsmooth-master@paper@paper.md@.PATH_END.py
{ "filename": "test_sdss.py", "repo_name": "segasai/rvspecfit", "repo_path": "rvspecfit_extracted/rvspecfit-master/tests/test_sdss.py", "type": "Python" }
import os os.environ['OMP_NUM_THREADS'] = '1' import astropy.io.fits as pyfits import numpy as np import sys import time import pathlib import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from rvspecfit import spec_fit from rvspecfit import vel_fit from rvspecfit import utils path = str(pathlib.P...
segasaiREPO_NAMErvspecfitPATH_START.@rvspecfit_extracted@rvspecfit-master@tests@test_sdss.py@.PATH_END.py
{ "filename": "CatboostModelAPI.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/CatboostModelAPI.md", "type": "Markdown" }
If you want to use a trained model, we provide 4 different ways to do this: C++ while building with ya.make, Python API, dynamic C library with C++ wrapper and C++ header-only evaluator. ## ya.make based projects If you use `ya.make` build system, the most convenient interface for model evaluation is ```TFullModel``` ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@CatboostModelAPI.md@.PATH_END.py
{ "filename": "test_NIRCam.py", "repo_name": "kevin218/Eureka", "repo_path": "Eureka_extracted/Eureka-main/tests/test_NIRCam.py", "type": "Python" }
# Last Updated: 2024-02-15 import sys import os from importlib import reload import time as time_pkg import numpy as np sys.path.insert(0, '..'+os.sep+'src'+os.sep) from eureka.lib.readECF import MetaClass from eureka.lib.util import COMMON_IMPORTS, pathdirectory import eureka.lib.plots # try: # from eureka.S2_c...
kevin218REPO_NAMEEurekaPATH_START.@Eureka_extracted@Eureka-main@tests@test_NIRCam.py@.PATH_END.py
{ "filename": "rwkv.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/llms/rwkv.py", "type": "Python" }
"""RWKV models. Based on https://github.com/saharNooby/rwkv.cpp/blob/master/rwkv/chat_with_bot.py https://github.com/BlinkDL/ChatRWKV/blob/main/v2/chat.py """ from typing import Any, Dict, List, Mapping, Optional, Set from langchain_core.callbacks import CallbackManagerForLLMRun from langchain_core.language...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@llms@rwkv.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/skimage/_vendored/__init__.py", "type": "Python" }
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@_vendored@__init__.py@.PATH_END.py
{ "filename": "visualization.animations.md", "repo_name": "dmentipl/plonk", "repo_path": "plonk_extracted/plonk-main/docs/source/api/visualization.animations.md", "type": "Markdown" }
# Animation ```{eval-rst} .. autofunction:: plonk.animate ``` ```{eval-rst} .. autofunction:: plonk.visualize.animation_images ``` ```{eval-rst} .. autofunction:: plonk.visualize.animation_particles ``` ```{eval-rst} .. autofunction:: plonk.visualize.animation_profiles ```
dmentiplREPO_NAMEplonkPATH_START.@plonk_extracted@plonk-main@docs@source@api@visualization.animations.md@.PATH_END.py
{ "filename": "multisistests2.ipynb", "repo_name": "j0r1/GRALE2", "repo_path": "GRALE2_extracted/GRALE2-master/pygrale/doc/source/_static/multisistests2.ipynb", "type": "Jupyter Notebook" }
Figure 2 of [Compound lensing: Einstein Zig-Zags and high multiplicity lensed images](http://adsabs.harvard.edu/abs/2016MNRAS.456.2210C) ```python # This example is very similar to the first notebook in this series. %matplotlib inline import grale.plotutil as plotutil import grale.lenses as lenses import grale.feedb...
j0r1REPO_NAMEGRALE2PATH_START.@GRALE2_extracted@GRALE2-master@pygrale@doc@source@_static@multisistests2.ipynb@.PATH_END.py
{ "filename": "mk_package.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/R-package/mk_package.py", "type": "Python" }
from __future__ import print_function import argparse import os import re import shutil import subprocess as sp import sys import tempfile def _execute(cmd, **kwargs): print('{}> {}'.format(os.getcwd(), ' '.join(cmd))) if kwargs: assert 0 == sp.check_call(cmd, **kwargs) else: assert 0 == s...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@R-package@mk_package.py@.PATH_END.py
{ "filename": "_showexponent.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choropleth/colorbar/_showexponent.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="choropleth.colorbar", **kwargs ): super(ShowexponentValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choropleth@colorbar@_showexponent.py@.PATH_END.py
{ "filename": "Hitran_data.py", "repo_name": "spexod/iSLAT", "repo_path": "iSLAT_extracted/iSLAT-master/iSLAT/COMPONENTS/Hitran_data.py", "type": "Python" }
from astroquery import hitran import pandas as pd import urllib.request import ssl from COMPONENTS.hitran_utils import get_molecule_identifier from COMPONENTS.global_identifier import get_global_identifier from astropy import units as un context = ssl.create_default_context() context.check_hostname = False context.ver...
spexodREPO_NAMEiSLATPATH_START.@iSLAT_extracted@iSLAT-master@iSLAT@COMPONENTS@Hitran_data.py@.PATH_END.py
{ "filename": "PlotSeparation_single.py", "repo_name": "bradkav/BlackHolesDarkDress", "repo_path": "BlackHolesDarkDress_extracted/BlackHolesDarkDress-master/Nbody/PlotSeparation_single.py", "type": "Python" }
from __future__ import division from pygadgetreader import * import matplotlib as mpl import matplotlib.pyplot as pl import numpy as np #----- MATPLOTLIB paramaters --------- mpl.rcParams.update({'font.size': 12,'font.family':'serif'}) mpl.rcParams['xtick.major.size'] = 7 mpl.rcParams['xtick.major.width'] = 1 mpl...
bradkavREPO_NAMEBlackHolesDarkDressPATH_START.@BlackHolesDarkDress_extracted@BlackHolesDarkDress-master@Nbody@PlotSeparation_single.py@.PATH_END.py
{ "filename": "rfimitigator.py", "repo_name": "mtlam/PyPulse", "repo_path": "PyPulse_extracted/PyPulse-master/pypulse/rfimitigator.py", "type": "Python" }
import sys import numpy as np if sys.version_info.major == 2: fmap = map elif sys.version_info.major == 3: fmap = lambda x, *args: list(map(x, *args)) xrange = range class RFIMitigator(object): def __init__(self, archive): self.archive = archive def can_mitigate(self, flag='F'): ''...
mtlamREPO_NAMEPyPulsePATH_START.@PyPulse_extracted@PyPulse-master@pypulse@rfimitigator.py@.PATH_END.py
{ "filename": "manga_axisym_recover.py", "repo_name": "kbwestfall/NIRVANA", "repo_path": "NIRVANA_extracted/NIRVANA-master/nirvana/scripts/manga_axisym_recover.py", "type": "Python" }
""" Script that runs the axisymmetric, least-squares fit for MaNGA data. """ import os import argparse import pathlib from IPython import embed import numpy as np from scipy import sparse from matplotlib import pyplot from astropy.io import fits from ..data import manga from ..data.bin2d import Bin2D, VoronoiBinnin...
kbwestfallREPO_NAMENIRVANAPATH_START.@NIRVANA_extracted@NIRVANA-master@nirvana@scripts@manga_axisym_recover.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "RobertJaro/InstrumentToInstrument", "repo_path": "InstrumentToInstrument_extracted/InstrumentToInstrument-master/itipy/download/__init__.py", "type": "Python" }
RobertJaroREPO_NAMEInstrumentToInstrumentPATH_START.@InstrumentToInstrument_extracted@InstrumentToInstrument-master@itipy@download@__init__.py@.PATH_END.py
{ "filename": "_csrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterternary/_csrc.py", "type": "Python" }
import _plotly_utils.basevalidators class CsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="csrc", parent_name="scatterternary", **kwargs): super(CsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterternary@_csrc.py@.PATH_END.py
{ "filename": "mpl_palette.ipynb", "repo_name": "mwaskom/seaborn", "repo_path": "seaborn_extracted/seaborn-master/doc/_docstrings/mpl_palette.ipynb", "type": "Jupyter Notebook" }
```python import seaborn as sns sns.set_theme() sns.palettes._patch_colormap_display() ``` Return discrete samples from a continuous matplotlib colormap: ```python sns.mpl_palette("viridis") ``` Return the continuous colormap instead; note how the extreme values are more intense: ```python sns.mpl_palette("viridis"...
mwaskomREPO_NAMEseabornPATH_START.@seaborn_extracted@seaborn-master@doc@_docstrings@mpl_palette.ipynb@.PATH_END.py
{ "filename": "allskyf7.py", "repo_name": "kapteyn-astro/kapteyn", "repo_path": "kapteyn_extracted/kapteyn-master/doc/source/EXAMPLES/allskyf7.py", "type": "Python" }
from kapteyn import maputils import numpy from service import * fignum = 7 fig = plt.figure(figsize=figsize) frame = fig.add_axes(plotbox) t1 = r"""Slant orthograpic projection (SIN) with: """ t2 = r"""$\xi=\frac{-1}{\sqrt{6}}$ and $\eta=\frac{1}{\sqrt{6}}$ (Cal. fig.10b)""" title = t1 + t2 xi = -1/numpy.sqrt(6); eta...
kapteyn-astroREPO_NAMEkapteynPATH_START.@kapteyn_extracted@kapteyn-master@doc@source@EXAMPLES@allskyf7.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/sparse/csgraph/tests/__init__.py", "type": "Python" }
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@sparse@csgraph@tests@__init__.py@.PATH_END.py
{ "filename": "test_draw.py", "repo_name": "mj-will/nessai", "repo_path": "nessai_extracted/nessai-main/tests/test_proposal/test_flowproposal/test_base/test_draw.py", "type": "Python" }
# -*- coding: utf-8 -*- """Tests related to drawing new points from the pool.""" from unittest.mock import MagicMock import numpy as np import pytest from nessai.proposal.flowproposal.base import BaseFlowProposal def test_draw_populated(proposal): """Test the draw method if the proposal is already populated"""...
mj-willREPO_NAMEnessaiPATH_START.@nessai_extracted@nessai-main@tests@test_proposal@test_flowproposal@test_base@test_draw.py@.PATH_END.py
{ "filename": "bnb.py", "repo_name": "huggingface/peft", "repo_path": "peft_extracted/peft-main/src/peft/tuners/ia3/bnb.py", "type": "Python" }
# Copyright 2023-present the HuggingFace Inc. team. # # 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...
huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@src@peft@tuners@ia3@bnb.py@.PATH_END.py
{ "filename": "gaussian_process.py", "repo_name": "temuller/piscola", "repo_path": "piscola_extracted/piscola-master/src/piscola/gaussian_process.py", "type": "Python" }
import jax import jaxopt import numpy as np import jax.numpy as jnp from tinygp import GaussianProcess, kernels, transforms jax.config.update("jax_enable_x64", True) def prepare_gp_inputs(times, wavelengths, fluxes, flux_errors, fit_log, wave_log): """Prepares the inputs for the Gaussian Process model fitting. ...
temullerREPO_NAMEpiscolaPATH_START.@piscola_extracted@piscola-master@src@piscola@gaussian_process.py@.PATH_END.py
{ "filename": "test_blackbody_with_atm.py", "repo_name": "mwvgroup/pwv_kpno", "repo_path": "pwv_kpno_extracted/pwv_kpno-master/tests/test_blackbody_with_atm.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # This file is part of the pwv_kpno software package. # # The pwv_kpno package 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 th...
mwvgroupREPO_NAMEpwv_kpnoPATH_START.@pwv_kpno_extracted@pwv_kpno-master@tests@test_blackbody_with_atm.py@.PATH_END.py
{ "filename": "masses.py", "repo_name": "LoganAMorrison/Hazma", "repo_path": "Hazma_extracted/Hazma-master/test/vector_mediator/herwig4dm/masses.py", "type": "Python" }
from hazma.parameters import ( neutral_pion_mass as __mpi0, charged_pion_mass as __mpi, charged_kaon_mass as __mk, neutral_kaon_mass as __mk0, eta_mass as __meta, eta_prime_mass as __metap, omega_mass as __momega, fpi as __fpi, ) mpi0 = __mpi0 * 1e-3 mpi = __mpi * 1e-3 mk = __mk * 1e-3 ...
LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@test@vector_mediator@herwig4dm@masses.py@.PATH_END.py
{ "filename": "_hash.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/feature_extraction/_hash.py", "type": "Python" }
# Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause from itertools import chain from numbers import Integral import numpy as np import scipy.sparse as sp from sklearn.utils import metadata_routing from ..base import BaseEstimator, TransformerMixin, _fit_context from ..utils._param_validat...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@feature_extraction@_hash.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "mikecokina/elisa", "repo_path": "elisa_extracted/elisa-master/src/elisa/tensor/__init__.py", "type": "Python" }
mikecokinaREPO_NAMEelisaPATH_START.@elisa_extracted@elisa-master@src@elisa@tensor@__init__.py@.PATH_END.py
{ "filename": "sandbox.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/setuptools/sandbox.py", "type": "Python" }
from __future__ import annotations import os import sys import tempfile import operator import functools import itertools import re import contextlib import pickle import textwrap import builtins import pkg_resources from distutils.errors import DistutilsError from pkg_resources import working_set if sys.platform.st...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@setuptools@sandbox.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "rhayes777/PyAutoFit", "repo_path": "PyAutoFit_extracted/PyAutoFit-main/autofit/non_linear/samples/__init__.py", "type": "Python" }
from .mcmc import SamplesMCMC from .nest import SamplesNest from .samples import Samples from .pdf import SamplesPDF from .sample import Sample, load_from_table from .stored import SamplesStored
rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@autofit@non_linear@samples@__init__.py@.PATH_END.py
{ "filename": "check_PPF_approx.ipynb", "repo_name": "classULDM/class.SFDM", "repo_path": "class.SFDM_extracted/class.SFDM-master/notebooks/check_PPF_approx.ipynb", "type": "Jupyter Notebook" }
```python %matplotlib inline import matplotlib import matplotlib.pyplot as plt import numpy as np from classy import Class ``` ```python k_out = [5e-5, 5e-4, 5e-3] models = ['PPF1','PPF2','FLD1','FLD1S'] w0 = {'PPF1':-0.7,'PPF2':-1.15,'FLD1':-0.7,'FLD1S':-0.7} wa = {'PPF1':0.,'PPF2':0.5,'FLD1':0.,'FLD1S':0.} omega_cd...
classULDMREPO_NAMEclass.SFDMPATH_START.@class.SFDM_extracted@class.SFDM-master@notebooks@check_PPF_approx.ipynb@.PATH_END.py
{ "filename": "test_source_identifier_extract.py", "repo_name": "spacetelescope/jdaviz", "repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/configs/mosviz/tests/test_source_identifier_extract.py", "type": "Python" }
from astropy.io.fits import PrimaryHDU from ..plugins.parsers import _get_source_identifiers_by_hdu, FALLBACK_NAME def test_SOURCEID(): hdu = PrimaryHDU() hdu.header['SOURCEID'] = 'Target 1 SOURCEID' assert _get_source_identifiers_by_hdu([hdu]) == ['Target 1 SOURCEID'] hdu2 = PrimaryHDU() hdu2.he...
spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@configs@mosviz@tests@test_source_identifier_extract.py@.PATH_END.py
{ "filename": "pops.ipynb", "repo_name": "ArtificialStellarPopulations/ArtPop", "repo_path": "ArtPop_extracted/ArtPop-main/docs/tutorials/pops.ipynb", "type": "Jupyter Notebook" }
# Building Stellar Populations [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ArtificialStellarPopulations/ArtPop/blob/main/colab_tutorials/pops.ipynb) In this tutorial, we demonstrate **ArtPop**’s built-in stellar population synthesis capability....
ArtificialStellarPopulationsREPO_NAMEArtPopPATH_START.@ArtPop_extracted@ArtPop-main@docs@tutorials@pops.ipynb@.PATH_END.py
{ "filename": "errors.md", "repo_name": "ultralytics/ultralytics", "repo_path": "ultralytics_extracted/ultralytics-main/docs/en/reference/utils/errors.md", "type": "Markdown" }
--- description: Explore error handling for Ultralytics YOLO. Learn about custom exceptions like HUBModelError to manage model fetching issues effectively. keywords: Ultralytics, YOLO, error handling, HUBModelError, model fetching, custom exceptions, Python --- # Reference for `ultralytics/utils/errors.py` !!! note ...
ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@reference@utils@errors.md@.PATH_END.py
{ "filename": "utils_seismic.py", "repo_name": "BASTAcode/BASTA", "repo_path": "BASTA_extracted/BASTA-main/src/basta/utils_seismic.py", "type": "Python" }
""" Auxiliary functions for frequency analysis """ from math import frexp import os from copy import deepcopy from tqdm import tqdm import numpy as np from scipy.interpolate import CubicSpline from basta import freq_fit from basta import glitch_fit from basta import fileio as fio from basta.constants import sydsun a...
BASTAcodeREPO_NAMEBASTAPATH_START.@BASTA_extracted@BASTA-main@src@basta@utils_seismic.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "kpicteam/kpic_pipeline", "repo_path": "kpic_pipeline_extracted/kpic_pipeline-main/kpicdrp/utils.py", "type": "Python" }
import os from glob import glob from copy import copy import itertools import numpy as np from scipy.interpolate import interp1d, InterpolatedUnivariateSpline import astropy.io.fits as fits from astropy.coordinates import SkyCoord, EarthLocation import astropy.units as u import astropy.time as time import astropy.io.fi...
kpicteamREPO_NAMEkpic_pipelinePATH_START.@kpic_pipeline_extracted@kpic_pipeline-main@kpicdrp@utils.py@.PATH_END.py
{ "filename": "test_json.py", "repo_name": "rhayes777/PyAutoFit", "repo_path": "PyAutoFit_extracted/PyAutoFit-main/test_autofit/mapper/model/serialise/test_json.py", "type": "Python" }
import itertools import os from pathlib import Path import pytest import json import autofit as af from autoconf.dictable import from_dict @pytest.fixture(name="collection_dict") def make_collection_dict(model_dict): return { "arguments": {"gaussian": model_dict}, "type": "collection", } @p...
rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@test_autofit@mapper@model@serialise@test_json.py@.PATH_END.py
{ "filename": "test_patch_cgm.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/tests/broken/test_patch_cgm.py", "type": "Python" }
""" test_multi_phase.py Author: Jordan Mirocha Affiliation: University of Colorado at Boulder Created on: Sat Feb 21 11:55:00 MST 2015 Description: """ import ares import numpy as np import matplotlib.pyplot as pl pars = \ { 'pop_type': 'galaxy', 'pop_sfrd': 'robertson2015', 'pop_Emin': 13.6, 'pop_Emax': 24....
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@tests@broken@test_patch_cgm.py@.PATH_END.py
{ "filename": "_hoverinfo.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/_hoverinfo.py", "type": "Python" }
import _plotly_utils.basevalidators class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="contour", **kwargs): super(HoverinfoValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@_hoverinfo.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="bar.hoverlabel.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@hoverlabel@font@_color.py@.PATH_END.py
{ "filename": "arima111nc_results.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/tests/results/arima111nc_results.py", "type": "Python" }
import numpy as np from statsmodels.tools.tools import Bunch llf = np.array([-243.77512585356]) nobs = np.array([202]) k = np.array([3]) k_exog = np.array([1]) sigma = np.array([.80556855709271]) chi2 = np.array([14938.241729056]) df_model = np.array([2]) k_ar = np.array([1]) k_ma = np.array([1]) params = np...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@tests@results@arima111nc_results.py@.PATH_END.py
{ "filename": "test_fit_notebook.py", "repo_name": "sherpa/sherpa", "repo_path": "sherpa_extracted/sherpa-main/sherpa/tests/test_fit_notebook.py", "type": "Python" }
# # Copyright (C) 2020, 2021 Smithsonian Astrophysical Observatory # # # 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 versi...
sherpaREPO_NAMEsherpaPATH_START.@sherpa_extracted@sherpa-main@sherpa@tests@test_fit_notebook.py@.PATH_END.py
{ "filename": "related.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/events/related.py", "type": "Python" }
import asyncio from typing import ( TYPE_CHECKING, Any, Awaitable, Callable, Dict, Iterable, List, Optional, Set, Tuple, Union, ) from uuid import UUID import pendulum from pendulum.datetime import DateTime from .schemas.events import RelatedResource if TYPE_CHECKING: ...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@events@related.py@.PATH_END.py
{ "filename": "httpserver.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/tornado/tornado-6/tornado/httpserver.py", "type": "Python" }
# # Copyright 2009 Facebook # # 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...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@tornado@tornado-6@tornado@httpserver.py@.PATH_END.py
{ "filename": "vector_rotate.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/erg/satellite/erg/common/cotrans/vector_rotate.py", "type": "Python" }
import numpy as np def vector_rotate(x0, y0, z0, nx, ny, nz, theta): # Prepare sin\cos values for the rotation angle theta. dtor = np.pi / 180. # deg --> rad the = theta * dtor costhe = np.cos(the) sinthe = np.sin(the) # for vector x0 (single component) x0_length = 1 concatenate_ax...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@erg@satellite@erg@common@cotrans@vector_rotate.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/doc/progmanuals/GMOSDR_ProgManual/conf.py", "type": "Python" }
# # Tutorial Series - NIRI Imaging Data Reduction with DRAGONS documentation build configuration file, created by # sphinx-quickstart on Mon Aug 13 15:54:35 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this ...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@doc@progmanuals@GMOSDR_ProgManual@conf.py@.PATH_END.py
{ "filename": "test_agreement.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/graphics/tests/test_agreement.py", "type": "Python" }
import numpy as np import pandas as pd import pytest from statsmodels.graphics.agreement import mean_diff_plot try: import matplotlib.pyplot as plt except ImportError: pass @pytest.mark.matplotlib def test_mean_diff_plot(close_figures): # Seed the random number generator. # This ensures that the re...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@graphics@tests@test_agreement.py@.PATH_END.py
{ "filename": "collect_rawproto.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/build/scripts/collect_rawproto.py", "type": "Python" }
import argparse import os import tarfile import stat import sys def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--output', required=True) parser.add_argument('args', nargs='*') return parser.parse_args() def main(args): rawprotos = args.args with tarfile.open(args.o...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@build@scripts@collect_rawproto.py@.PATH_END.py
{ "filename": "bispect.py", "repo_name": "SAIL-Labs/AMICAL", "repo_path": "AMICAL_extracted/AMICAL-main/amical/mf_pipeline/bispect.py", "type": "Python" }
""" @author: Anthony Soulain (University of Sydney) ------------------------------------------------------------------------- AMICAL: Aperture Masking Interferometry Calibration and Analysis Library ------------------------------------------------------------------------- Matched filter sub-pipeline method. Compute ...
SAIL-LabsREPO_NAMEAMICALPATH_START.@AMICAL_extracted@AMICAL-main@amical@mf_pipeline@bispect.py@.PATH_END.py
{ "filename": "create_instance_catalog.py", "repo_name": "LSSTDESC/chroma", "repo_path": "chroma_extracted/chroma-master/bin/phosim/validate/chromatic_seeing_SED/create_instance_catalog.py", "type": "Python" }
import os import numpy import scipy.integrate def AB(wave, flambda, AB_wave): """Returns the AB magnitude at `AB_wave` (nm) of spectrum specified by `wave` (in nm), and `flambda` (in erg/s/cm^2/Ang). """ speed_of_light = 2.99792458e18 # units are Angstrom Hz fNu = flambda * (wave * 10)**2 / speed_...
LSSTDESCREPO_NAMEchromaPATH_START.@chroma_extracted@chroma-master@bin@phosim@validate@chromatic_seeing_SED@create_instance_catalog.py@.PATH_END.py
{ "filename": "roboconf.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/roboconf.py", "type": "Python" }
""" pygments.lexers.roboconf ~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for Roboconf DSL. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, words, re from pygments.token import Text, Operator, Keyword, Name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@roboconf.py@.PATH_END.py
{ "filename": "_astropy_init.py", "repo_name": "NASA-Planetary-Science/sbpy", "repo_path": "sbpy_extracted/sbpy-main/sbpy/_astropy_init.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os __all__ = ['__version__', 'test'] try: from .version import version as __version__ except ImportError: __version__ = '' # Create the test function for self test from astropy.tests.runner import TestRunner test = TestRunner.make_test_ru...
NASA-Planetary-ScienceREPO_NAMEsbpyPATH_START.@sbpy_extracted@sbpy-main@sbpy@_astropy_init.py@.PATH_END.py
{ "filename": "_scatterpolargl.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/template/data/_scatterpolargl.py", "type": "Python" }
import _plotly_utils.basevalidators class ScatterpolarglValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__( self, plotly_name="scatterpolargl", parent_name="layout.template.data", **kwargs ): super(ScatterpolarglValidator, self).__init__( plotly_name=plotl...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@template@data@_scatterpolargl.py@.PATH_END.py
{ "filename": "_bordercolorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/splom/hoverlabel/_bordercolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="splom.hoverlabel", **kwargs ): super(BordercolorsrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@splom@hoverlabel@_bordercolorsrc.py@.PATH_END.py
{ "filename": "pallas_shape_poly_test.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/tests/pallas/pallas_shape_poly_test.py", "type": "Python" }
# Copyright 2024 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@tests@pallas@pallas_shape_poly_test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/scipy/optimize/__init__.py", "type": "Python" }
# Copyright 2020 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...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@scipy@optimize@__init__.py@.PATH_END.py
{ "filename": "adjust_cropping_extents.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/examples/mayavi/interactive/adjust_cropping_extents.py", "type": "Python" }
""" A custom dialog to adjust the parameters of a GeometryFilter to crop data points. This example shows how to use a GeometryFilter to crop data points, but also how to build a custom dialog to easily set interactively parameters of a filter, or any other Mayavi object. The GeometryFilter crops all data within a bou...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@examples@mayavi@interactive@adjust_cropping_extents.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermapbox/marker/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._symbolsrc import SymbolsrcValidator from ._symbol import SymbolValidator from ._sizesrc import SizesrcValidator from ._sizeref import SizerefValidator from ._sizemode import SizemodeValidator from ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermapbox@marker@__init__.py@.PATH_END.py
{ "filename": "test_write_to_fil.py", "repo_name": "ucberkeleyseti/blimpy", "repo_path": "blimpy_extracted/blimpy-master/tests/test_write_to_fil.py", "type": "Python" }
""" Very small module with one test: test_write_to_fil() """ import os import blimpy as bl from tests.data import voyager_h5 OUTDIR = os.path.dirname(voyager_h5) + "/" def test_write_to_fil(): """ Load Voyager dataset and test plotting """ a = bl.Waterfall(voyager_h5) a.write_to_fil(OUTDIR + 'test_out.f...
ucberkeleysetiREPO_NAMEblimpyPATH_START.@blimpy_extracted@blimpy-master@tests@test_write_to_fil.py@.PATH_END.py
{ "filename": "run_tess_cutouts.py", "repo_name": "alexbinks/tessilator", "repo_path": "tessilator_extracted/tessilator-main/tessilator/scripts/run_tess_cutouts.py", "type": "Python" }
from tessilator import tessilator import numpy as np import logging def main(args=None): fluxCon, lcCon, makePlots, fileRef, tFile = tessilator.setup_input_parameters() periodFile = tessilator.setup_filenames(fileRef) logging.basicConfig(filename="output.log", level=logging.INFO) print(f"Reading th...
alexbinksREPO_NAMEtessilatorPATH_START.@tessilator_extracted@tessilator-main@tessilator@scripts@run_tess_cutouts.py@.PATH_END.py
{ "filename": "test_checkpoint.py", "repo_name": "LSSTDESC/Imsim", "repo_path": "Imsim_extracted/Imsim-main/tests/test_checkpoint.py", "type": "Python" }
import os from pathlib import Path import numpy as np import hashlib import logging import galsim import time import logging import imsim import fitsio import shutil DATA_DIR = Path(__file__).parent / 'data' # Used below in both test_checkpoint_image and test_checkpoint_flatten def timeout_one(config, base, value_typ...
LSSTDESCREPO_NAMEImsimPATH_START.@Imsim_extracted@Imsim-main@tests@test_checkpoint.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "SKA-INAF/caesar-mrcnn-tf2", "repo_path": "caesar-mrcnn-tf2_extracted/caesar-mrcnn-tf2-main/mrcnn/utils.py", "type": "Python" }
""" Mask R-CNN Common utility functions and classes. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla """ import math import random from distutils.version import LooseVersion import numpy as np import skimage import skimage.transform import tensor...
SKA-INAFREPO_NAMEcaesar-mrcnn-tf2PATH_START.@caesar-mrcnn-tf2_extracted@caesar-mrcnn-tf2-main@mrcnn@utils.py@.PATH_END.py