metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "gamma_SIII.py", "repo_name": "bwvdnbro/CMacIonize", "repo_path": "CMacIonize_extracted/CMacIonize-master/data/linecooling/gamma_SIII.py", "type": "Python" }
#! /usr/bin/python ################################################################################ # This file is part of CMacIonize # Copyright (C) 2017 Bert Vandenbroucke (bert.vandenbroucke@gmail.com) # # CMacIonize is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gene...
bwvdnbroREPO_NAMECMacIonizePATH_START.@CMacIonize_extracted@CMacIonize-master@data@linecooling@gamma_SIII.py@.PATH_END.py
{ "filename": "lib2def.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/distutils/lib2def.py", "type": "Python" }
from __future__ import division, absolute_import, print_function import re import sys import subprocess __doc__ = """This module generates a DEF file from the symbols in an MSVC-compiled DLL import library. It correctly discriminates between data and functions. The data is collected from the output of the program n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@distutils@lib2def.py@.PATH_END.py
{ "filename": "test_einasto.py", "repo_name": "halomod/halomod", "repo_path": "halomod_extracted/halomod-main/devel/test_einasto.py", "type": "Python" }
import numpy as np import halomod model = halomod.TracerHaloModel( z=0.2, transfer_model="EH", rnum=30, rmin=0.1, rmax=30, hod_model="Zehavi05", hod_params={"M_min": 12.0, "M_1": 12.8, "alpha": 1.05}, dr_table=0.1, dlnk=0.1, dlog10m=0.05, ) model_ein = model.clone() model_ein....
halomodREPO_NAMEhalomodPATH_START.@halomod_extracted@halomod-main@devel@test_einasto.py@.PATH_END.py
{ "filename": "test_classifier_metrics.py", "repo_name": "daniel-muthukrishna/astrorapid", "repo_path": "astrorapid_extracted/astrorapid-master/tests/test_classifier_metrics.py", "type": "Python" }
daniel-muthukrishnaREPO_NAMEastrorapidPATH_START.@astrorapid_extracted@astrorapid-master@tests@test_classifier_metrics.py@.PATH_END.py
{ "filename": "geometry.py", "repo_name": "skyfielders/python-skyfield", "repo_path": "python-skyfield_extracted/python-skyfield-master/skyfield/geometry.py", "type": "Python" }
"""Routines solving basic geometric problems in astronomy.""" from .functions import dots, length_of, nan, sqrt_nan, where def intersect_line_and_sphere(endpoint, center, radius): """Compute distance to intersections of a line and a sphere. Given a line through the origin (0,0,0) and an |xyz| ``endpoint``, ...
skyfieldersREPO_NAMEpython-skyfieldPATH_START.@python-skyfield_extracted@python-skyfield-master@skyfield@geometry.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/marker/colorbar/tickfont/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.marker.colorbar.tickfont", **kwargs, ): super(ColorValidator, self).__init__( plotly_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@marker@colorbar@tickfont@_color.py@.PATH_END.py
{ "filename": "_row.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/smith/domain/_row.py", "type": "Python" }
import _plotly_utils.basevalidators class RowValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__(self, plotly_name="row", parent_name="layout.smith.domain", **kwargs): super(RowValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@smith@domain@_row.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "kammerje/spaceKLIP", "repo_path": "spaceKLIP_extracted/spaceKLIP-main/spaceKLIP/__init__.py", "type": "Python" }
from . import analysistools from . import classpsfsubpipeline from . import coron1pipeline from . import coron2pipeline from . import coron3pipeline from . import database from . import imagetools from . import mast from . import plotting from . import psf from . import pyklippipeline from . import utils from ._versio...
kammerjeREPO_NAMEspaceKLIPPATH_START.@spaceKLIP_extracted@spaceKLIP-main@spaceKLIP@__init__.py@.PATH_END.py
{ "filename": "fastembed.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/embeddings/fastembed.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.embeddings import FastEmbedEmbeddings # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports....
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@embeddings@fastembed.py@.PATH_END.py
{ "filename": "spingaussian.py", "repo_name": "javicarron/pynkowski", "repo_path": "pynkowski_extracted/pynkowski-main/pynkowski/theory/spingaussian.py", "type": "Python" }
"""This submodule contains the definition for spin field with isotropic Gaussian Q and U. """ import numpy as np from .utils_th import get_μ, get_σ, lkc_ambient_dict, get_C2, flag, rho from .gaussian import Gaussian from .base_th import _prepare_lkc def LKC_spin(j, us, mu, dim=3, lkc_ambient=lkc_ambient_dict["...
javicarronREPO_NAMEpynkowskiPATH_START.@pynkowski_extracted@pynkowski-main@pynkowski@theory@spingaussian.py@.PATH_END.py
{ "filename": "analyze.py", "repo_name": "jmd-dk/concept", "repo_path": "concept_extracted/concept-master/test/pure_python_pp/analyze.py", "type": "Python" }
# This file has to be run in pure Python mode! # Imports from the CO𝘕CEPT code from commons import * from snapshot import load import species plt = get_matplotlib().pyplot # Absolute path and name of this test this_dir = os.path.dirname(os.path.realpath(__file__)) this_test = os.path.basename(os.path.dirname(this_d...
jmd-dkREPO_NAMEconceptPATH_START.@concept_extracted@concept-master@test@pure_python_pp@analyze.py@.PATH_END.py
{ "filename": "_target_encoder.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/preprocessing/_target_encoder.py", "type": "Python" }
# Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause from numbers import Integral, Real import numpy as np from ..base import OneToOneFeatureMixin, _fit_context from ..utils._param_validation import Interval, StrOptions from ..utils.multiclass import type_of_target from ..utils.validation i...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@preprocessing@_target_encoder.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/ohlc/increasing/line/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._width import WidthValidator from ._dash import DashValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_impor...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@ohlc@increasing@line@__init__.py@.PATH_END.py
{ "filename": "singlesource_image.py", "repo_name": "dingswin/psrvlbireduce", "repo_path": "psrvlbireduce_extracted/psrvlbireduce-master/datareduction/singlesource_image.py", "type": "Python" }
#!/usr/bin/env ParselTongue ## written by Adam Deller ################################################################################ # AIPS imports ################################################################################ from AIPS import AIPS, AIPSDisk from AIPSTask import AIPSTask, AIPSList from AIPSData im...
dingswinREPO_NAMEpsrvlbireducePATH_START.@psrvlbireduce_extracted@psrvlbireduce-master@datareduction@singlesource_image.py@.PATH_END.py
{ "filename": "Osiris_old.py", "repo_name": "JaidenCook/OSIRIS", "repo_path": "OSIRIS_extracted/OSIRIS-main/old/Osiris_old.py", "type": "Python" }
#!/usr/bin/python __author__ = "Jaiden Cook, Jack Line" __credits__ = ["Jaiden Cook","Jack Line"] __version__ = "0.0.0" __maintainer__ = "Jaiden Cook" __email__ = "Jaiden.Cook@student.curtin.edu" # Generic stuff: #%matplotlib notebook import os,sys import time from datetime import datetime import glob import shutil i...
JaidenCookREPO_NAMEOSIRISPATH_START.@OSIRIS_extracted@OSIRIS-main@old@Osiris_old.py@.PATH_END.py
{ "filename": "test.py", "repo_name": "bolverk/huji-rich", "repo_path": "huji-rich_extracted/huji-rich-master/convergence/discontinuous_advection_1d/base/test.py", "type": "Python" }
#! /usr/bin/python import math def chi2_test(a1,a2): import math diff2 = [(x-y)**2 for x,y in zip(a1,a2)] return math.sqrt(sum(diff2)/len(a1)) def L1_test(a1,a2): import math abs_diff = [abs(x-y) for x,y in zip(a1,a2)] return sum(abs_diff)/len(a1) def goodness_of_fit(a1, a2,test_name='L1...
bolverkREPO_NAMEhuji-richPATH_START.@huji-rich_extracted@huji-rich-master@convergence@discontinuous_advection_1d@base@test.py@.PATH_END.py
{ "filename": "mnu_compare.py", "repo_name": "cmbant/CosmoMC", "repo_path": "CosmoMC_extracted/CosmoMC-master/batch1/outputs/mnu_compare.py", "type": "Python" }
#import planckStyle as s #g=s.plotter import GetDistPlots g=GetDistPlots.GetDistPlotter('main/plot_data') labels=None roots=['base_mnu_planck_lowl_lowLike','base_mnu_planck_lowl_lowLike_lensing','base_mnu_Alens_planck_lowl_lowLike','base_mnu_Alens_planck_lowl_lowLike_post_lensing','base_mnu_planck_tauprior','base_mnu...
cmbantREPO_NAMECosmoMCPATH_START.@CosmoMC_extracted@CosmoMC-master@batch1@outputs@mnu_compare.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "gomesdasilva/pyrhk", "repo_path": "pyrhk_extracted/pyrhk-master/README.md", "type": "Markdown" }
# pyrhk Python functions to calculate logR'HK for HARPS and ESPRESSO and estimate rotation periods and ages. What pyrhk can do: - Calibrate S-index values to the Mt. Wilson scale (SMW) for HARPS (using Gomes da Silva et al. 2021 or Lovis et al. 2011 calibrations) or ESPRESSO (using the calibration shown below) spectro...
gomesdasilvaREPO_NAMEpyrhkPATH_START.@pyrhk_extracted@pyrhk-master@README.md@.PATH_END.py
{ "filename": "docker-integration.md", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/test/docker-integration.md", "type": "Markdown" }
# Docker integration ## Show Docker details ``` (cpy373_1) oberstet@intel-nuci7:~/scm/crossbario/crossbarfx$ crossbarfx shell --realm mrealm1 show docker node1 {'Architecture': 'x86_64', 'BridgeNfIp6tables': True, 'BridgeNfIptables': True, 'CPUSet': True, 'CPUShares': True, 'CgroupDriver': 'cgroupfs', ... 'Sys...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@test@docker-integration.md@.PATH_END.py
{ "filename": "generate_Pk_example.py", "repo_name": "federicomarulli/CosmoBolognaLib", "repo_path": "CosmoBolognaLib_extracted/CosmoBolognaLib-master/External/CLASS/external/external_Pk/generate_Pk_example.py", "type": "Python" }
#!/usr/bin/python from __future__ import print_function import sys from math import exp # README: # # This is an example python script for the external_Pk mode of Class. # It generates the primordial spectrum of LambdaCDM. # It can be edited and used directly, though keeping a copy of it is recommended. # # Two (maybe...
federicomarulliREPO_NAMECosmoBolognaLibPATH_START.@CosmoBolognaLib_extracted@CosmoBolognaLib-master@External@CLASS@external@external_Pk@generate_Pk_example.py@.PATH_END.py
{ "filename": "summary_iterator.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/summary/summary_iterator.py", "type": "Python" }
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@summary@summary_iterator.py@.PATH_END.py
{ "filename": "losses.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/legacy/losses.py", "type": "Python" }
from keras.src.api_export import keras_export @keras_export("keras._legacy.losses.Reduction") class Reduction: AUTO = "auto" NONE = "none" SUM = "sum" SUM_OVER_BATCH_SIZE = "sum_over_batch_size" @classmethod def all(cls): return (cls.AUTO, cls.NONE, cls.SUM, cls.SUM_OVER_BATCH_SIZE) ...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@legacy@losses.py@.PATH_END.py
{ "filename": "_borderwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/marker/colorbar/_borderwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scattergl.marker.colorbar", **kwargs, ): super(BorderwidthValidator, self).__init__( plo...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@marker@colorbar@_borderwidth.py@.PATH_END.py
{ "filename": "pointnet2_modules.py", "repo_name": "ma-xu/pointMLP-pytorch", "repo_path": "pointMLP-pytorch_extracted/pointMLP-pytorch-main/pointnet2_ops_lib/pointnet2_ops/pointnet2_modules.py", "type": "Python" }
from typing import List, Optional, Tuple import torch import torch.nn as nn import torch.nn.functional as F from pointnet2_ops import pointnet2_utils def build_shared_mlp(mlp_spec: List[int], bn: bool = True): layers = [] for i in range(1, len(mlp_spec)): layers.append( nn.Conv2d(mlp_spec...
ma-xuREPO_NAMEpointMLP-pytorchPATH_START.@pointMLP-pytorch_extracted@pointMLP-pytorch-main@pointnet2_ops_lib@pointnet2_ops@pointnet2_modules.py@.PATH_END.py
{ "filename": "Tutorial-ADM_Initial_Data-Converting_Numerical_ADM_Spherical_or_Cartesian_to_BSSNCurvilinear.ipynb", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/Deprecated/Tutorial-ADM_Initial_Data-Converting_Numerical_ADM_Spherical_or_Cartesian_to_BSSNCurvilin...
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-59152712-8"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-59152712-8'); </script> # Converting *Numerical* ADM Initial Data in the Spherical ...
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@Deprecated@Tutorial-ADM_Initial_Data-Converting_Numerical_ADM_Spherical_or_Cartesian_to_BSSNCurvilinear.ipynb@.PATH_END.py
{ "filename": "README.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/jupyter-core/py3/README.md", "type": "Markdown" }
# Jupyter Core [![Build Status](https://github.com/jupyter/jupyter_core/actions/workflows/test.yml/badge.svg?query=branch%3Amain++)](https://github.com/jupyter/jupyter_core/actions/workflows/test.yml/badge.svg?query=branch%3Amain++) [![Documentation Status](https://readthedocs.org/projects/jupyter-core/badge/?version=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@jupyter-core@py3@README.md@.PATH_END.py
{ "filename": "test_multiproc.py", "repo_name": "LSSTDESC/Imsim", "repo_path": "Imsim_extracted/Imsim-main/tests/test_multiproc.py", "type": "Python" }
import os import sys from pathlib import Path import logging import unittest import galsim class MultiprocTestCase(unittest.TestCase): """TestCase class to test multiprocessing with imSim""" def setUp(self): self.output_dir = 'fits_multiproc_test' self.only_dets = ['R22_S11', 'R22_S12'] ...
LSSTDESCREPO_NAMEImsimPATH_START.@Imsim_extracted@Imsim-main@tests@test_multiproc.py@.PATH_END.py
{ "filename": "_scaleanchor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/yaxis/_scaleanchor.py", "type": "Python" }
import _plotly_utils.basevalidators class ScaleanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="scaleanchor", parent_name="layout.yaxis", **kwargs): super(ScaleanchorValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@yaxis@_scaleanchor.py@.PATH_END.py
{ "filename": "justplotit.py", "repo_name": "natashabatalha/PandExo", "repo_path": "PandExo_extracted/PandExo-master/pandexo/engine/justplotit.py", "type": "Python" }
from bokeh.plotting import show from bokeh.plotting import figure as Figure from bokeh.io import output_file as outputfile from bokeh.io import output_notebook as outnotebook import pickle as pk import numpy as np from bokeh.layouts import row import pandas as pd def jwst_1d_spec(result_dict, model=True, title='Model ...
natashabatalhaREPO_NAMEPandExoPATH_START.@PandExo_extracted@PandExo-master@pandexo@engine@justplotit.py@.PATH_END.py
{ "filename": "_funnel.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/_funnel.py", "type": "Python" }
import _plotly_utils.basevalidators class FunnelValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="funnel", parent_name="", **kwargs): super(FunnelValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, data_c...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@_funnel.py@.PATH_END.py
{ "filename": "_cmid.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergl/marker/_cmid.py", "type": "Python" }
import _plotly_utils.basevalidators class CmidValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="scattergl.marker", **kwargs): super(CmidValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergl@marker@_cmid.py@.PATH_END.py
{ "filename": "_xsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/_xsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="bar", **kwargs): super(XsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwar...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@_xsrc.py@.PATH_END.py
{ "filename": "regtest.py", "repo_name": "cmillion/gPhoton", "repo_path": "gPhoton_extracted/gPhoton-master/gPhoton/tests/regtest/regtest.py", "type": "Python" }
""" This is a full system regression test for gPhoton. It takes a while to run, perhaps many hours. It will print progress as it goes and then a final verdict of PASS/FAIL. You should run it from the terminal command line as a script like > python regtest.py """ from __future__ import absolute_import, division, print_f...
cmillionREPO_NAMEgPhotonPATH_START.@gPhoton_extracted@gPhoton-master@gPhoton@tests@regtest@regtest.py@.PATH_END.py
{ "filename": "_weight.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/polar/angularaxis/tickfont/_weight.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.polar.angularaxis.tickfont", **kwargs, ): super(WeightValidator, self).__init__( plotly_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@polar@angularaxis@tickfont@_weight.py@.PATH_END.py
{ "filename": "_metasrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterternary/_metasrc.py", "type": "Python" }
import _plotly_utils.basevalidators class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="scatterternary", **kwargs): super(MetasrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterternary@_metasrc.py@.PATH_END.py
{ "filename": "singlecopy.py", "repo_name": "desihub/fastspecfit", "repo_path": "fastspecfit_extracted/fastspecfit-main/py/fastspecfit/singlecopy.py", "type": "Python" }
""" fastspecfit.singlecopy ====================== Single-copy (per process) data structures read from files. """ from fastspecfit.cosmo import TabulatedDESI from fastspecfit.igm import Inoue14 from fastspecfit.photometry import Photometry from fastspecfit.linetable import LineTable from fastspecfit.templates import T...
desihubREPO_NAMEfastspecfitPATH_START.@fastspecfit_extracted@fastspecfit-main@py@fastspecfit@singlecopy.py@.PATH_END.py
{ "filename": "superbol-py2.py", "repo_name": "mnicholl/superbol", "repo_path": "superbol_extracted/superbol-master/superbol-py2.py", "type": "Python" }
#!/usr/bin/env python version = '1.8 ' ''' SUPERBOL: Supernova Bolometric Light Curves Written by Matt Nicholl, 2015-2020 IMPORTANT NOTE: PYTHON 2 VERSION WILL NO LONGER BE UPDATED AFTER V1.8 Version 1.8 : Fix bug in suppression integral - thanks Sebastian Gomez (MN) Version 1.7 : Fix bug in...
mnichollREPO_NAMEsuperbolPATH_START.@superbol_extracted@superbol-master@superbol-py2.py@.PATH_END.py
{ "filename": "testTreeNeighbor.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/tests/unit/Neighbor/testTreeNeighbor.py", "type": "Python" }
#ATS:test(SELF, np=1, level=100, label="TreeNeighbor unit tests") from math import * import unittest import random from Spheral import * from NeighborTestBase import * #=============================================================================== # Radom node distribution -- 1-D. #==================================...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@unit@Neighbor@testTreeNeighbor.py@.PATH_END.py
{ "filename": "check_target_acquisition_time.py", "repo_name": "igrins/plp", "repo_path": "plp_extracted/plp-master/utils/check_target_acquisition_time.py", "type": "Python" }
import numpy as np import re utdate = "20140710" fn = "indata/%s/IGRINS_DT_Log_%s-1_H.txt" % (utdate, utdate) p_end_comma = re.compile(r",$") s = "".join(p_end_comma.sub("", l) for l in open(fn)) dtype=[('FILENAME', 'S128'), ('OBSTIME', 'S128'), ('GROUP1', 'i'), ('GROUP2', 'i'), ('OBJNAME', 'S128'), ('OBJTYPE', 'S12...
igrinsREPO_NAMEplpPATH_START.@plp_extracted@plp-master@utils@check_target_acquisition_time.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "atomec-project/atoMEC", "repo_path": "atoMEC_extracted/atoMEC-master/tests/dev_tests/README.md", "type": "Markdown" }
# Development test suite ## Overview This directory contains the necessary code and data to enable the generation and execution of development tests for the atoMEC project. These tests are dsigned to evaluate the _performance_ of the code, with a focus on the `CalcEnergy` function, its related components, and behavio...
atomec-projectREPO_NAMEatoMECPATH_START.@atoMEC_extracted@atoMEC-master@tests@dev_tests@README.md@.PATH_END.py
{ "filename": "generate_DESI_mean.py", "repo_name": "dkirkby/gphist", "repo_path": "gphist_extracted/gphist-master/generate_DESI_mean.py", "type": "Python" }
#!/usr/bin/env python """Plot expansion history inferences. """ import argparse import numpy as np # matplotlib is imported inside main() from scipy.optimize import minimize import gphist from scipy import interpolate def main(): # Parse command-line arguments. parser = argparse.ArgumentParser(formatter_cla...
dkirkbyREPO_NAMEgphistPATH_START.@gphist_extracted@gphist-master@generate_DESI_mean.py@.PATH_END.py
{ "filename": "PGIR_DR1_light_curves.ipynb", "repo_name": "astro-datalab/notebooks-latest", "repo_path": "notebooks-latest_extracted/notebooks-latest-master/03_ScienceExamples/PGIRLightCurves/PGIR_DR1_light_curves.ipynb", "type": "Jupyter Notebook" }
```python __nbid__ = '0069' __author__ = 'Ryan M. Lau <ryan.lau@noirlab.edu>, Kishalay De <kde1@mit.edu>, Alice Jacques <alice.jacques@noirlab.edu>, Astro Data Lab Team <datalab@noirlab.edu>' __version__ = '20240927' # yyyymmdd __datasets__ = ['pgir_dr1'] __keywords__ = ['lightcurve', 'photometry', 'time domain', 'Lomb...
astro-datalabREPO_NAMEnotebooks-latestPATH_START.@notebooks-latest_extracted@notebooks-latest-master@03_ScienceExamples@PGIRLightCurves@PGIR_DR1_light_curves.ipynb@.PATH_END.py
{ "filename": "GraduatedCosmology.py", "repo_name": "ja-vazquez/SimpleMC", "repo_path": "SimpleMC_extracted/SimpleMC-master/simplemc/models/GraduatedCosmology.py", "type": "Python" }
import numpy as np from simplemc.models.LCDMCosmology import LCDMCosmology from simplemc.cosmo.paramDefs import Ok_par, ggama_par, glambda_par #Graduated dark energy: Observational hints of a spontaneous sign # switch in the cosmological constant #https://arxiv.org/abs/1912.08751 class GraduatedCosmology(LCDMCosmo...
ja-vazquezREPO_NAMESimpleMCPATH_START.@SimpleMC_extracted@SimpleMC-master@simplemc@models@GraduatedCosmology.py@.PATH_END.py
{ "filename": "ModelSet.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/ares/analysis/ModelSet.py", "type": "Python" }
""" ModelFit.py Author: Jordan Mirocha Affiliation: University of Colorado at Boulder Created on: Mon Apr 28 11:19:03 MDT 2014 Description: For analysis of MCMC fitting. """ import pickle import shutil import numpy as np import matplotlib as mpl from ..util.Math import smooth import matplotlib.pyplot as pl from .....
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@ares@analysis@ModelSet.py@.PATH_END.py
{ "filename": "_valuesrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/isosurface/_valuesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ValuesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="valuesrc", parent_name="isosurface", **kwargs): super(ValuesrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@isosurface@_valuesrc.py@.PATH_END.py
{ "filename": "_visible.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/error_x/_visible.py", "type": "Python" }
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="bar.error_x", **kwargs): super(VisibleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@error_x@_visible.py@.PATH_END.py
{ "filename": "download_file.py", "repo_name": "revoltek/LiLF", "repo_path": "LiLF_extracted/LiLF-master/scripts/download_file.py", "type": "Python" }
#!/usr/bin/env python3 # Generic file download with retry and check for length import os from time import sleep import requests def download_file(url, filename, login=None, password=None): downloaded=False while not downloaded: connected=False while not connected: try: ...
revoltekREPO_NAMELiLFPATH_START.@LiLF_extracted@LiLF-master@scripts@download_file.py@.PATH_END.py
{ "filename": "test_fits.py", "repo_name": "halomod/hmf", "repo_path": "hmf_extracted/hmf-main/tests/test_fits.py", "type": "Python" }
import pytest from pytest import raises import inspect import itertools import numpy as np from hmf import MassFunction from hmf.mass_function import fitting_functions as ff allfits = [ o for n, o in inspect.getmembers( ff, lambda member: inspect.isclass(member) and issubclass(member,...
halomodREPO_NAMEhmfPATH_START.@hmf_extracted@hmf-main@tests@test_fits.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/freezegun/py2/freezegun/__init__.py", "type": "Python" }
# -*- coding: utf-8 -*- """ freezegun ~~~~~~~~ :copyright: (c) 2012 by Steve Pulec. """ from .api import freeze_time __title__ = 'freezegun' __version__ = '0.3.15' __author__ = 'Steve Pulec' __license__ = 'Apache License 2.0' __copyright__ = 'Copyright 2012 Steve Pulec' __all__ = ["freeze_time"]
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@freezegun@py2@freezegun@__init__.py@.PATH_END.py
{ "filename": "document_loader_feat_table.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/scripts/document_loader_feat_table.py", "type": "Python" }
import sys from pathlib import Path from langchain_community import document_loaders from langchain_core.document_loaders.base import BaseLoader DOCUMENT_LOADER_TEMPLATE = """\ --- sidebar_position: 0 sidebar_class_name: hidden keywords: [compatibility] custom_edit_url: hide_table_of_contents: true --- # Document lo...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@scripts@document_loader_feat_table.py@.PATH_END.py
{ "filename": "field_aliases.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/fields/field_aliases.py", "type": "Python" }
_field_name_aliases = [ ("GridLevel", "grid_level"), ("GridIndices", "grid_indices"), ("OnesOverDx", "ones_over_dx"), ("Ones", "ones"), # ("CellsPerBin", "cells_per_bin"), ("SoundSpeed", "sound_speed"), ("RadialMachNumber", "radial_mach_number"), ("MachNumber", "mach...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@fields@field_aliases.py@.PATH_END.py
{ "filename": "digraphs.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/digraphs.py", "type": "Python" }
""" Vi Digraphs. This is a list of special characters that can be inserted in Vi insert mode by pressing Control-K followed by to normal characters. Taken from Neovim and translated to Python: https://raw.githubusercontent.com/neovim/neovim/master/src/nvim/digraph.c """ from __future__ import annotations __all__ = [...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@prompt-toolkit@py3@prompt_toolkit@key_binding@digraphs.py@.PATH_END.py
{ "filename": "glossary.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/doc/glossary.py", "type": "Python" }
""" ======== Glossary ======== .. glossary:: along an axis Axes are defined for arrays with more than one dimension. A 2-dimensional array has two corresponding axes: the first running vertically downwards across rows (axis 0), and the second running horizontally across columns (axis 1...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@doc@glossary.py@.PATH_END.py
{ "filename": "filter.py", "repo_name": "hpparvi/PyTransit", "repo_path": "PyTransit_extracted/PyTransit-master/pytransit/contamination/filter.py", "type": "Python" }
# PyTransit: fast and easy exoplanet transit modelling in Python. # Copyright (C) 2010-2019 Hannu Parviainen # # 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 Licen...
hpparviREPO_NAMEPyTransitPATH_START.@PyTransit_extracted@PyTransit-master@pytransit@contamination@filter.py@.PATH_END.py
{ "filename": "Zha_2008.py", "repo_name": "geodynamics/burnman", "repo_path": "burnman_extracted/burnman-main/burnman/calibrants/Zha_2008.py", "type": "Python" }
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for # the Earth and Planetary Sciences # Copyright (C) 2012 - 2024 by the BurnMan team, released under the GNU # GPL v2 or later. from burnman.eos.birch_murnaghan import BirchMurnaghanBase as BM3 from burnman.eos.mie_grueneisen_debye import MGD...
geodynamicsREPO_NAMEburnmanPATH_START.@burnman_extracted@burnman-main@burnman@calibrants@Zha_2008.py@.PATH_END.py
{ "filename": "fastfdresponse.py", "repo_name": "mikekatz04/BBHx", "repo_path": "BBHx_extracted/BBHx-master/bbhx/response/fastfdresponse.py", "type": "Python" }
# LISA Response Functions # Copyright (C) 2021 Michael L. Katz, Sylvain Marsat # # 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...
mikekatz04REPO_NAMEBBHxPATH_START.@BBHx_extracted@BBHx-master@bbhx@response@fastfdresponse.py@.PATH_END.py
{ "filename": "plots.py", "repo_name": "jpcoles/glass", "repo_path": "glass_extracted/glass-master/glass/plots.py", "type": "Python" }
from __future__ import division import pylab as pl import numpy as np import matplotlib import matplotlib.cm as cm import matplotlib.lines as mpll from matplotlib import rc from matplotlib.ticker import LogLocator from matplotlib.patches import Circle, Ellipse from matplotlib.lines import Line2D from collections import...
jpcolesREPO_NAMEglassPATH_START.@glass_extracted@glass-master@glass@plots.py@.PATH_END.py
{ "filename": "test_indexing.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/numpy/core/tests/test_indexing.py", "type": "Python" }
from __future__ import division, absolute_import, print_function import sys import warnings import functools import operator import numpy as np from numpy.core.multiarray_tests import array_indexing from itertools import product from numpy.testing import ( run_module_suite, assert_, assert_equal, assert_raises, ...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@numpy@core@tests@test_indexing.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergeo/line/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._width import WidthValidator from ._dash import DashValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._width...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergeo@line@__init__.py@.PATH_END.py
{ "filename": "_lambertw.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/special/_lambertw.py", "type": "Python" }
from ._ufuncs import _lambertw import numpy as np def lambertw(z, k=0, tol=1e-8): r""" lambertw(z, k=0, tol=1e-8) Lambert W function. The Lambert W function `W(z)` is defined as the inverse function of ``w * exp(w)``. In other words, the value of ``W(z)`` is such that ``z = W(z) * exp(W(z))...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@special@_lambertw.py@.PATH_END.py
{ "filename": "plot_regional_maxima.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/doc/examples/color_exposure/plot_regional_maxima.py", "type": "Python" }
""" ========================= Filtering regional maxima ========================= Here, we use morphological reconstruction to create a background image, which we can subtract from the original image to isolate bright features (regional maxima). First we try reconstruction by dilation starting at the edges of the ima...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@doc@examples@color_exposure@plot_regional_maxima.py@.PATH_END.py
{ "filename": "plot_save_mesa_pos_eta_res.py", "repo_name": "NikolayBritavskiyAstro/fast_rotating_binaries", "repo_path": "fast_rotating_binaries_extracted/fast_rotating_binaries-main/src/scripts/plot_save_mesa_pos_eta_res.py", "type": "Python" }
import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import numpy as np import os import mesaPlot as mp from showyourwork.paths import user as Paths paths = Paths() plt.style.use(paths.scripts / "matplotlibrc") if os.path.exists(os.path.join(paths.data, 'mass_transfer_efficiency/p3_po...
NikolayBritavskiyAstroREPO_NAMEfast_rotating_binariesPATH_START.@fast_rotating_binaries_extracted@fast_rotating_binaries-main@src@scripts@plot_save_mesa_pos_eta_res.py@.PATH_END.py
{ "filename": "alpha_dropout_test.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/regularization/alpha_dropout_test.py", "type": "Python" }
import numpy as np import pytest from keras.src import backend from keras.src import layers from keras.src import testing class AlphaDropoutTest(testing.TestCase): @pytest.mark.requires_trainable_backend def test_alpha_dropout_basics(self): self.run_layer_test( layers.AlphaDropout, ...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@regularization@alpha_dropout_test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "lofar-astron/RMextract", "repo_path": "RMextract_extracted/RMextract-master/RMextract/pyiri/__init__.py", "type": "Python" }
lofar-astronREPO_NAMERMextractPATH_START.@RMextract_extracted@RMextract-master@RMextract@pyiri@__init__.py@.PATH_END.py
{ "filename": "test_metacal_bootstrap.py", "repo_name": "esheldon/ngmix", "repo_path": "ngmix_extracted/ngmix-master/ngmix/tests/test_metacal_bootstrap.py", "type": "Python" }
""" just test moment errors """ import pytest import numpy as np import ngmix from ngmix.runners import Runner, PSFRunner from ngmix.guessers import SimplePSFGuesser, TFluxAndPriorGuesser from ngmix.fitting import Fitter from ngmix.gaussmom import GaussMom from ngmix.metacal import metacal_bootstrap, MetacalBootstrappe...
esheldonREPO_NAMEngmixPATH_START.@ngmix_extracted@ngmix-master@ngmix@tests@test_metacal_bootstrap.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/pie/textfont/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="family", parent_name="pie.textfont", **kwargs): super(FamilyValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@pie@textfont@_family.py@.PATH_END.py
{ "filename": "_stream.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scattermap/_stream.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattermap" _path_str = "scattermap.stream" _valid_props = {"maxpoints", "token"} # max...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scattermap@_stream.py@.PATH_END.py
{ "filename": "test_covariances.py", "repo_name": "LSSTDESC/CCL", "repo_path": "CCL_extracted/CCL-master/benchmarks/test_covariances.py", "type": "Python" }
import os import numpy as np import pyccl as ccl def test_ssc_WL(): # Compare against Benjamin Joachimi's code. An overview of the methodology # is given in appendix E.2 of 2007.01844. data_dir = os.path.join(os.path.dirname(__file__), "data/covariances/") h = 0.7 cosmo = ccl.Cosmology(Omega_c=0....
LSSTDESCREPO_NAMECCLPATH_START.@CCL_extracted@CCL-master@benchmarks@test_covariances.py@.PATH_END.py
{ "filename": "test_plot.py", "repo_name": "smirik/resonances", "repo_path": "resonances_extracted/resonances-main/tests/resonances/resonance/test_plot.py", "type": "Python" }
from pathlib import Path import shutil import pytest import resonances import os import tests.tools as tools @pytest.fixture(autouse=True) def run_around_tests(): resonances.config.set('plot', None) resonances.config.set('plot.type', None) Path('cache/tests').mkdir(parents=True, exist_ok=True) yield ...
smirikREPO_NAMEresonancesPATH_START.@resonances_extracted@resonances-main@tests@resonances@resonance@test_plot.py@.PATH_END.py
{ "filename": "_cells.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/table/_cells.py", "type": "Python" }
import _plotly_utils.basevalidators class CellsValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="cells", parent_name="table", **kwargs): super(CellsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, data...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@table@_cells.py@.PATH_END.py
{ "filename": "plot.py", "repo_name": "TRASAL/frbpoppy", "repo_path": "frbpoppy_extracted/frbpoppy-master/tests/monte_carlo/plot.py", "type": "Python" }
from frbpoppy import hist from goodness_of_fit import GoodnessOfFit from matplotlib.lines import Line2D from scipy.optimize import curve_fit from tests.convenience import plot_aa_style, rel_path import matplotlib.pyplot as plt import numpy as np class Plot(): """Plot runs.""" def __init__(self): plot...
TRASALREPO_NAMEfrbpoppyPATH_START.@frbpoppy_extracted@frbpoppy-master@tests@monte_carlo@plot.py@.PATH_END.py
{ "filename": "MR_plotly.py", "repo_name": "mplotnyko/SuperEarth.py", "repo_path": "SuperEarth.py_extracted/SuperEarth.py-master/examples/MR_plotly.py", "type": "Python" }
import superearth as se df = se.exoplanets(0.25,0.08,rocky=False) fig = se.plotly_pl(df,color='black', marker='circle') #plot M-R data using plotly # Display the figure fig.show()
mplotnykoREPO_NAMESuperEarth.pyPATH_START.@SuperEarth.py_extracted@SuperEarth.py-master@examples@MR_plotly.py@.PATH_END.py
{ "filename": "test_ogle_remote.py", "repo_name": "D-arioSpace/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/ogle/tests/test_ogle_remote.py", "type": "Python" }
import pytest import astropy.units as u from astropy.coordinates import SkyCoord from astropy.utils.exceptions import AstropyDeprecationWarning from .. import Ogle @pytest.mark.remote_data def test_ogle_single(): co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') response = Ogle.query_region(c...
D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@ogle@tests@test_ogle_remote.py@.PATH_END.py
{ "filename": "custom_nest_protocol.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/util/custom_nest_protocol.py", "type": "Python" }
# Copyright 2023 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@util@custom_nest_protocol.py@.PATH_END.py
{ "filename": "_highlightcolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/surface/contours/z/_highlightcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class HighlightcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="highlightcolor", parent_name="surface.contours.z", **kwargs ): super(HighlightcolorValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@surface@contours@z@_highlightcolor.py@.PATH_END.py
{ "filename": "keys.py", "repo_name": "macrocosme/shwirl", "repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/util/keys.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Define constants for keys. Each key constant is defined as a Key object, which allows comparison with strings (e.g. 'A', 'Escape', 'Shift'). This enables handling of key ...
macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@util@keys.py@.PATH_END.py
{ "filename": "dot-plots.md", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/doc/python/dot-plots.md", "type": "Markdown" }
--- jupyter: jupytext: notebook_metadata_filter: all text_representation: extension: .md format_name: markdown format_version: '1.2' jupytext_version: 1.4.2 kernelspec: display_name: Python 3 language: python name: python3 language_info: codemirror_mode: name:...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@doc@python@dot-plots.md@.PATH_END.py
{ "filename": "transit_adjust_setup_example.py", "repo_name": "franpoz/SHERLOCK", "repo_path": "SHERLOCK_extracted/SHERLOCK-master/examples/programmatical/transit_adjust_setup_example.py", "type": "Python" }
from contextlib import contextmanager from timeit import default_timer from sherlockpipe.search.sherlock import Sherlock from lcbuilder.objectinfo.MissionObjectInfo import MissionObjectInfo from sherlockpipe.search.sherlock_target import SherlockTarget @contextmanager def elapsed_timer(): start = default_timer()...
franpozREPO_NAMESHERLOCKPATH_START.@SHERLOCK_extracted@SHERLOCK-master@examples@programmatical@transit_adjust_setup_example.py@.PATH_END.py
{ "filename": "11283_pils_totlen.py", "repo_name": "shreeyesh-biswal/Rvalue_3D", "repo_path": "Rvalue_3D_extracted/Rvalue_3D-main/Codes/X-class/AR_11283/11283_pils_totlen.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jul 10 11:55:39 2022 @author: shreeyeshbiswal """ import os import numpy as np import matplotlib as mpl from matplotlib import pyplot as plt from matplotlib.pyplot import figure AR = "11283" core_dir = "/home/shreeyeshbiswal/IDLWorkspace/Dataset_PF/" ...
shreeyesh-biswalREPO_NAMERvalue_3DPATH_START.@Rvalue_3D_extracted@Rvalue_3D-main@Codes@X-class@AR_11283@11283_pils_totlen.py@.PATH_END.py
{ "filename": "_autocolorscale.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choroplethmap/_autocolorscale.py", "type": "Python" }
import _plotly_utils.basevalidators class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="choroplethmap", **kwargs ): super(AutocolorscaleValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choroplethmap@_autocolorscale.py@.PATH_END.py
{ "filename": "adam_test.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/optimizers/adam_test.py", "type": "Python" }
import numpy as np import pytest import keras from keras.src import backend from keras.src import ops from keras.src import testing from keras.src.optimizers.adam import Adam class AdamTest(testing.TestCase): def test_config(self): optimizer = Adam( learning_rate=0.5, beta_1=0.5, ...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@optimizers@adam_test.py@.PATH_END.py
{ "filename": "_yref.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/heatmap/colorbar/_yref.py", "type": "Python" }
import _plotly_utils.basevalidators class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="heatmap.colorbar", **kwargs): super(YrefValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@heatmap@colorbar@_yref.py@.PATH_END.py
{ "filename": "grid_finder.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py2/mpl_toolkits/axisartist/grid_finder.py", "type": "Python" }
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import numpy as np from matplotlib.transforms import Bbox from . import clip_path clip_line_to_rect = clip_path.clip_line_to_rect import matplotlib.ticker as mticker from matplotlib.transforms impo...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py2@mpl_toolkits@axisartist@grid_finder.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "j-faria/kima", "repo_path": "kima_extracted/kima-master/examples/CoRoT7/README.md", "type": "Markdown" }
This example uses HARPS radial velocity measurements of the active star CoRoT-7. It reproduces the analysis done by [Faria et al. (2016)](https://www.aanda.org/articles/aa/abs/2016/04/aa27899-15/aa27899-15.html), where we successfully recovered both the orbits of CoRoT-7b and CoRot-7c, and the activity-induced signal. ...
j-fariaREPO_NAMEkimaPATH_START.@kima_extracted@kima-master@examples@CoRoT7@README.md@.PATH_END.py
{ "filename": "_hovertemplate.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/surface/_hovertemplate.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="surface", **kwargs): super(HovertemplateValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@surface@_hovertemplate.py@.PATH_END.py
{ "filename": "test_openai.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/adapters/test_openai.py", "type": "Python" }
from typing import Any from langchain_community.adapters import openai as lcopenai def _test_no_stream(**kwargs: Any) -> None: import openai result = openai.ChatCompletion.create(**kwargs) # type: ignore[attr-defined] lc_result = lcopenai.ChatCompletion.create(**kwargs) if isinstance(lc_result, dic...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@adapters@test_openai.py@.PATH_END.py
{ "filename": "sst2.ipynb", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/examples/sst2/sst2.ipynb", "type": "Jupyter Notebook" }
# Flax SST-2 Example <a href="https://colab.research.google.com/github/google/flax/blob/main/examples/sst2/sst2.ipynb" ><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> Demonstration notebook for https://github.com/google/flax/tree/main/examples/sst2 **Before you start:**...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@examples@sst2@sst2.ipynb@.PATH_END.py
{ "filename": "light2mass.py", "repo_name": "lenstronomy/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/Analysis/light2mass.py", "type": "Python" }
import numpy as np from lenstronomy.Util import util from lenstronomy.LightModel.light_model import LightModel __all__ = ["light2mass_interpol"] def light2mass_interpol( lens_light_model_list, kwargs_lens_light, numPix=100, deltaPix=0.05, subgrid_res=5, center_x=0, center_y=0, ): """T...
lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@Analysis@light2mass.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tseries/__init__.py", "type": "Python" }
# ruff: noqa: TC004 from typing import TYPE_CHECKING if TYPE_CHECKING: # import modules that have public classes/functions: from pandas.tseries import ( frequencies, offsets, ) # and mark only those modules as public __all__ = ["frequencies", "offsets"]
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tseries@__init__.py@.PATH_END.py
{ "filename": "_t.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/area/_t.py", "type": "Python" }
import _plotly_utils.basevalidators class TValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="t", parent_name="area", **kwargs): super(TValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwargs...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@area@_t.py@.PATH_END.py
{ "filename": "_mesh3d.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/template/data/_mesh3d.py", "type": "Python" }
from plotly.graph_objs import Mesh3d
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@template@data@_mesh3d.py@.PATH_END.py
{ "filename": "CombineFrames_2.py", "repo_name": "sPaMFouR/RedPipe", "repo_path": "RedPipe_extracted/RedPipe-master/photometry/CombineFrames_2.py", "type": "Python" }
# /usr/bin/env python # xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # # xxxxxxxxxxxxxxxxxxxxxx----------------------------COMBINE IMAGES----------------------------xxxxxxxxxxxxxxxxxxxxxxx # # xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
sPaMFouRREPO_NAMERedPipePATH_START.@RedPipe_extracted@RedPipe-master@photometry@CombineFrames_2.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/cython/Cython/Runtime/__init__.py", "type": "Python" }
# empty file
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@cython@Cython@Runtime@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "PlasmaPy/PlasmaPy", "repo_path": "PlasmaPy_extracted/PlasmaPy-main/src/plasmapy/tests/_helpers/__init__.py", "type": "Python" }
"""Test helper functionality for PlasmaPy and affiliated packages.""" __all__ = [ "ExceptionMismatchFail", "InvalidTestError", "MissingExceptionFail", "MissingWarningFail", "TestFailed", "TypeMismatchFail", "UnexpectedExceptionFail", "UnexpectedResultFail", "UnexpectedWarningFail", ...
PlasmaPyREPO_NAMEPlasmaPyPATH_START.@PlasmaPy_extracted@PlasmaPy-main@src@plasmapy@tests@_helpers@__init__.py@.PATH_END.py
{ "filename": "apero_database_kill.py", "repo_name": "njcuk9999/apero-drs", "repo_path": "apero-drs_extracted/apero-drs-main/apero/tools/recipes/bin/apero_database_kill.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ # CODE NAME HERE # CODE DESCRIPTION HERE Created on 2021-05-18 @author: cook """ from apero.base import base from apero.core import constants from apero.tools.module.database import manage_databases # ================================================================...
njcuk9999REPO_NAMEapero-drsPATH_START.@apero-drs_extracted@apero-drs-main@apero@tools@recipes@bin@apero_database_kill.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "Caltech-IPAC/Montage", "repo_path": "Montage_extracted/Montage-main/python/MontagePy/setup.py", "type": "Python" }
import os import platform from setuptools import setup from distutils.extension import Extension from Cython.Build import cythonize machine = platform.machine() TOP = os.path.abspath(os.path.join(os.getcwd(), '../..')) LIB = os.path.join(TOP, 'lib') MONTAGELIB = os.path.join(TOP, 'MontageLib') objs = ...
Caltech-IPACREPO_NAMEMontagePATH_START.@Montage_extracted@Montage-main@python@MontagePy@setup.py@.PATH_END.py
{ "filename": "_functional_video.py", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/torchvision/transforms/_functional_video.py", "type": "Python" }
import warnings import torch warnings.warn( "The 'torchvision.transforms._functional_video' module is deprecated since 0.12 and will be removed in the future. " "Please use the 'torchvision.transforms.functional' module instead." ) def _is_tensor_video_clip(clip): if not torch.is_tensor(clip): ...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@torchvision@transforms@_functional_video.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "PuDu-Astro/DASpec", "repo_path": "DASpec_extracted/DASpec-master/setup.py", "type": "Python" }
#!/usr/bin/env python from setuptools import setup, Extension include_dirs = [ 'src/DASpec', '/home/dupu/Softwares/cmpfit/cmpfit-1.3a', # add or remove path if necessary ] library_dirs = [ '/home/dupu/Softwares/cmpfit/cmpfit-1.3a', # add or remove path if necessary ] ext_swigDASpec = Extension( ...
PuDu-AstroREPO_NAMEDASpecPATH_START.@DASpec_extracted@DASpec-master@setup.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "pyDANDIA/pyDANDIA", "repo_path": "pyDANDIA_extracted/pyDANDIA-main/README.md", "type": "Markdown" }
[![Build Status](https://travis-ci.org/pyDANDIA/pyDANDIA.svg?branch=master)](https://travis-ci.org/pyDANDIA/pyDANDIA) # pyDanDIA # Open reduction pipeline of the RoboNet team
pyDANDIAREPO_NAMEpyDANDIAPATH_START.@pyDANDIA_extracted@pyDANDIA-main@README.md@.PATH_END.py
{ "filename": "ioloop.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/tornado/tornado-4/tornado/ioloop.py", "type": "Python" }
#!/usr/bin/env 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 a...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@tornado@tornado-4@tornado@ioloop.py@.PATH_END.py