metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "_tickformat.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/marker/colorbar/_tickformat.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="tickformat", parent_name="scatter.marker.colorbar", **kwargs
):
super(TickformatValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@marker@colorbar@_tickformat.py@.PATH_END.py |
{
"filename": "docarray.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/retrievers/docarray.py",
"type": "Python"
} | from enum import Enum
from typing import Any, Dict, List, Optional, Union
import numpy as np
from langchain_core.callbacks import CallbackManagerForRetrieverRun
from langchain_core.documents import Document
from langchain_core.embeddings import Embeddings
from langchain_core.retrievers import BaseRetriever
from langch... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@retrievers@docarray.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "hpparvi/ldtk",
"repo_path": "ldtk_extracted/ldtk-master/README.md",
"type": "Markdown"
} | # LDTk
[](http://www.gnu.org/licenses/gpl-2.0.html)
[](http://mnras.oxfordjournals.org/content/453/4/3821.abstract)
[;
# 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@data@experimental@kernel_tests@parallel_interleave_test.py@.PATH_END.py |
{
"filename": "class_creator.py",
"repo_name": "sibirrer/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/Util/class_creator.py",
"type": "Python"
} | from lenstronomy.Data.imaging_data import ImageData
from lenstronomy.Data.psf import PSF
from lenstronomy.LensModel.lens_model import LensModel
from lenstronomy.LightModel.light_model import LightModel
from lenstronomy.PointSource.point_source import PointSource
from lenstronomy.ImSim.differential_extinction import Dif... | sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@Util@class_creator.py@.PATH_END.py |
{
"filename": "topics.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/pydoc_data/topics.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Autogenerated by Sphinx on Tue Oct 1 04:02:04 2024
# as part of the release process.
topics = {'assert': 'The "assert" statement\n'
'**********************\n'
'\n'
'Assert statements are a convenient way to insert debugging '
'assertions\n'
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@pydoc_data@topics.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "franciscovillaescusa/Pylians3",
"repo_path": "Pylians3_extracted/Pylians3-master/library/redshift_space_library/__init__.py",
"type": "Python"
} | __all__=['redshift_space_library']
from .redshift_space_library import *
| franciscovillaescusaREPO_NAMEPylians3PATH_START.@Pylians3_extracted@Pylians3-master@library@redshift_space_library@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "ratt-ru/QuartiCal",
"repo_path": "QuartiCal_extracted/QuartiCal-main/quartical/gains/rotation/__init__.py",
"type": "Python"
} | import numpy as np
from quartical.gains.conversion import trig_to_angle
from quartical.gains.parameterized_gain import ParameterizedGain
from quartical.gains.rotation.kernel import (
rotation_solver,
rotation_params_to_gains
)
from quartical.gains.general.flagging import (
apply_gain_flags_to_gains,
app... | ratt-ruREPO_NAMEQuartiCalPATH_START.@QuartiCal_extracted@QuartiCal-main@quartical@gains@rotation@__init__.py@.PATH_END.py |
{
"filename": "_clipmin.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/yaxis/autorangeoptions/_clipmin.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ClipminValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self,
plotly_name="clipmin",
parent_name="layout.yaxis.autorangeoptions",
**kwargs,
):
super(ClipminValidator, self).__init__(
plotly_name=pl... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@yaxis@autorangeoptions@_clipmin.py@.PATH_END.py |
{
"filename": "util.py",
"repo_name": "tnakazato/priism",
"repo_path": "priism_extracted/priism-main/python/priism/core/util.py",
"type": "Python"
} | # Copyright (C) 2019-2022
# Inter-University Research Institute Corporation, National Institutes of Natural Sciences
# 2-21-1, Osawa, Mitaka, Tokyo, 181-8588, Japan.
#
# This file is part of PRIISM.
#
# PRIISM is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License... | tnakazatoREPO_NAMEpriismPATH_START.@priism_extracted@priism-main@python@priism@core@util.py@.PATH_END.py |
{
"filename": "_value.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcoords/line/colorbar/tickformatstop/_value.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ValueValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="value",
parent_name="parcoords.line.colorbar.tickformatstop",
**kwargs,
):
super(ValueValidator, self).__init__(
plotly_n... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcoords@line@colorbar@tickformatstop@_value.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/distutils/command/__init__.py",
"type": "Python"
} | """distutils.command
Package containing implementation of all the standard Distutils
commands.
"""
from __future__ import division, absolute_import, print_function
def test_na_writable_attributes_deletion():
a = np.NA(2)
attr = ['payload', 'dtype']
for s in attr:
assert_raises(AttributeError, de... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@distutils@command@__init__.py@.PATH_END.py |
{
"filename": "demo_MBS_motors.py",
"repo_name": "projectchrono/chrono",
"repo_path": "chrono_extracted/chrono-main/src/demos/python/mbs/demo_MBS_motors.py",
"type": "Python"
} | # =============================================================================
# PROJECT CHRONO - http://projectchrono.org
#
# Copyright (c) 2014 projectchrono.org
# All rights reserved.
#
# Use of this source code is governed by a BSD-style license that can be found
# in the LICENSE file at the top level of the distr... | projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@mbs@demo_MBS_motors.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/gam/gam_cross_validation/__init__.py",
"type": "Python"
} | __author__ = 'luca puggini: lucapuggio@gmail.com'
| statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@gam@gam_cross_validation@__init__.py@.PATH_END.py |
{
"filename": "async_test.py",
"repo_name": "vaexio/vaex",
"repo_path": "vaex_extracted/vaex-master/tests/jupyter/async_test.py",
"type": "Python"
} | import asyncio
import vaex.jupyter
import time
import pytest
import sys
if sys.version_info >= (3, 10):
import pytest
pytest.skip("Skipping tests on python 3.10 or higher", allow_module_level=True)
@pytest.mark.asyncio
async def test_await_promise(df_trimmed):
df = df_trimmed
execute_time = 0
@va... | vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@tests@jupyter@async_test.py@.PATH_END.py |
{
"filename": "tools.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/chart-studio/chart_studio/tools.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
tools
=====
Functions that USERS will possibly want access to.
"""
from __future__ import absolute_import
import urllib
import warnings
import copy
from _plotly_utils import optional_imports
import _plotly_utils.exceptions
from _plotly_utils.files import ensure_writable_plotly_dir
fro... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@chart-studio@chart_studio@tools.py@.PATH_END.py |
{
"filename": "toy_sbi_multiround.py",
"repo_name": "maho3/ltu-ili",
"repo_path": "ltu-ili_extracted/ltu-ili-main/examples/toy_sbi_multiround.py",
"type": "Python"
} | import os
import numpy as np
from ili.dataloaders import SBISimulator
from ili.inference import InferenceRunner
from ili.validation import ValidationRunner
def simulator(params):
# create toy simulations
# NOTE: For use with SBISimulator, this function takes
# a tuple of parameters and outputs data of sha... | maho3REPO_NAMEltu-iliPATH_START.@ltu-ili_extracted@ltu-ili-main@examples@toy_sbi_multiround.py@.PATH_END.py |
{
"filename": "example_spcc.ipynb",
"repo_name": "LSSTDESC/snmachine",
"repo_path": "snmachine_extracted/snmachine-main/examples/example_spcc.ipynb",
"type": "Jupyter Notebook"
} | # Notebook for running the snmachine pipeline on Supernova Photometric Classification Challenge simulated data
This notebook illustrates the use of the `snmachine` supernova classification package by classifying a subset simulated data from the supernova photometric classification challenge (SPCC).
See Lochner et al... | LSSTDESCREPO_NAMEsnmachinePATH_START.@snmachine_extracted@snmachine-main@examples@example_spcc.ipynb@.PATH_END.py |
{
"filename": "test_st_instance_list.py",
"repo_name": "simonsobs/nextline-rdb",
"repo_path": "nextline-rdb_extracted/nextline-rdb-main/src/nextline_rdb/models/strategies/tests/test_st_instance_list.py",
"type": "Python"
} | from typing import Optional, TypedDict
from hypothesis import Phase, given, settings
from hypothesis import strategies as st
from nextline_test_utils import safe_compare as sc
from nextline_test_utils.strategies import st_ranges
from ... import Model, Run
from .. import st_model_instance_list
from .funcs import asse... | simonsobsREPO_NAMEnextline-rdbPATH_START.@nextline-rdb_extracted@nextline-rdb-main@src@nextline_rdb@models@strategies@tests@test_st_instance_list.py@.PATH_END.py |
{
"filename": "_showtickprefix.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/parcats/line/colorbar/_showtickprefix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="showtickprefix",
parent_name="parcats.line.colorbar",
**kwargs
):
super(ShowtickprefixValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@parcats@line@colorbar@_showtickprefix.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/densitymap/colorbar/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._tickfont import Tickfont
from ._tickformatstop import Tickformatstop
from ._title import Title
from . import title
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, _... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@densitymap@colorbar@__init__.py@.PATH_END.py |
{
"filename": "docs_cosmo.ipynb",
"repo_name": "jpierel14/sntd",
"repo_path": "sntd_extracted/sntd-master/notebooks/docs_cosmo.ipynb",
"type": "Jupyter Notebook"
} | ```python
%matplotlib inline
```
# Constrain Cosmology
Simulate cosmological constraints
from a sample of lensed SN.
All of these cosmology tools are based on `Coe & Moustakas 2009 <https://arxiv.org/pdf/0906.4108.pdf>`_.
and Dan Coe's `Fisher matrix starter paper <https://arxiv.org/pdf/0906.4123.pdf>`_.
**Crea... | jpierel14REPO_NAMEsntdPATH_START.@sntd_extracted@sntd-master@notebooks@docs_cosmo.ipynb@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "dfm/exoplanet",
"repo_path": "exoplanet_extracted/exoplanet-main/src/exoplanet/light_curves/__init__.py",
"type": "Python"
} | __all__ = [
"LimbDarkLightCurve",
"SecondaryEclipseLightCurve",
"InterpolatedLightCurve",
]
from exoplanet.light_curves.interpolated import InterpolatedLightCurve
from exoplanet.light_curves.limb_dark import LimbDarkLightCurve
from exoplanet.light_curves.secondary_eclipse import SecondaryEclipseLightCurve
| dfmREPO_NAMEexoplanetPATH_START.@exoplanet_extracted@exoplanet-main@src@exoplanet@light_curves@__init__.py@.PATH_END.py |
{
"filename": "vectorpotentialdipole_streamlines2.py",
"repo_name": "fmihpc/vlasiator",
"repo_path": "vlasiator_extracted/vlasiator-master/doc/vectordipole/vectorpotentialdipole_streamlines2.py",
"type": "Python"
} | #!/usr/bin/env python import matplotlib.pyplot as plt
# /*
# * This file is part of Vlasiator.
# * Copyright 2010-2016 Finnish Meteorological Institute
# * Copyright 2017-2019 University of Helsinki
# *
# * For detail... | fmihpcREPO_NAMEvlasiatorPATH_START.@vlasiator_extracted@vlasiator-master@doc@vectordipole@vectorpotentialdipole_streamlines2.py@.PATH_END.py |
{
"filename": "gauss_fit.py",
"repo_name": "GBTAmmoniaSurvey/GAS",
"repo_path": "GAS_extracted/GAS-master/GAS/gauss_fit.py",
"type": "Python"
} | from spectral_cube import SpectralCube
import pyspeckit
from astropy.io import fits
import matplotlib.pyplot as plt
import astropy.units as u
import numpy as np
from scipy.optimize import curve_fit
from scipy import *
from . import catalogs
import time
import pprocess
from astropy.convolution import convolve
from scipy... | GBTAmmoniaSurveyREPO_NAMEGASPATH_START.@GAS_extracted@GAS-master@GAS@gauss_fit.py@.PATH_END.py |
{
"filename": "full_lensing_demo.ipynb",
"repo_name": "NiallJeffrey/BornRaytrace",
"repo_path": "BornRaytrace_extracted/BornRaytrace-main/demo/full_lensing_demo.ipynb",
"type": "Jupyter Notebook"
} | ```python
import matplotlib.pyplot as plt
import numpy as np
import healpy as hp
from astropy.cosmology import FlatLambdaCDM
from astropy import units as u
from astropy.cosmology import z_at_value
from bornraytrace import intrinsic_alignments as ia
from bornraytrace import lensing
from matplotlib import rcParams
import... | NiallJeffreyREPO_NAMEBornRaytracePATH_START.@BornRaytrace_extracted@BornRaytrace-main@demo@full_lensing_demo.ipynb@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/caps/z/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._show import ShowValidator
from ._fill import FillValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._show.ShowVal... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@caps@z@__init__.py@.PATH_END.py |
{
"filename": "_textfont.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/waterfall/_textfont.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="textfont", parent_name="waterfall", **kwargs):
super(TextfontValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@waterfall@_textfont.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "thomasorb/orbs",
"repo_path": "orbs_extracted/orbs-master/docs/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# Orbs documentation build configuration file, created by
# sphinx-quickstart on Sat May 26 01:02:35 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All co... | thomasorbREPO_NAMEorbsPATH_START.@orbs_extracted@orbs-master@docs@conf.py@.PATH_END.py |
{
"filename": "3_Line_ratios.py",
"repo_name": "Vital-Fernandez/ceers-data",
"repo_path": "ceers-data_extracted/ceers-data-master/offline/3_Line_ratios.py",
"type": "Python"
} | import streamlit as st
from streamlit import session_state as s_state
from tools.workflow import sidebar_widgets, save_objSample
from tools.io import load_databases
from format.plots import flux_scatter
# Make sure the user is recognized
if 'auth_status' not in s_state:
if 'auth_status_hold' in s_state:
s... | Vital-FernandezREPO_NAMEceers-dataPATH_START.@ceers-data_extracted@ceers-data-master@offline@3_Line_ratios.py@.PATH_END.py |
{
"filename": "test_magnification_finite_util.py",
"repo_name": "sibirrer/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_Util/test_magnification_finite_util.py",
"type": "Python"
} | from lenstronomy.Util.magnification_finite_util import (
auto_raytracing_grid_size,
auto_raytracing_grid_resolution,
setup_mag_finite,
)
from lenstronomy.LensModel.lens_model import LensModel
import numpy.testing as npt
from lenstronomy.LightModel.light_model import LightModel
import pytest
class TestMagn... | sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_Util@test_magnification_finite_util.py@.PATH_END.py |
{
"filename": "star_galaxy_separation-checkpoint.py",
"repo_name": "davidharvey1986/pyRRG",
"repo_path": "pyRRG_extracted/pyRRG-master/src/.ipynb_checkpoints/star_galaxy_separation-checkpoint.py",
"type": "Python"
} | from matplotlib import pyplot as plt
import os as os
import pickle as pkl
from matplotlib import gridspec as gridspec
import sys as sys
import numpy as np
from astropy.io import fits
import sklearn
def star_galaxy_separation( sources, outfile, include_sat=False, redoML=False, batch_run=False):
'''
PURPORSE : ... | davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@src@.ipynb_checkpoints@star_galaxy_separation-checkpoint.py@.PATH_END.py |
{
"filename": "algorithm-main-stages_text-to-numeric.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/algorithm-main-stages_text-to-numeric.md",
"type": "Markdown"
} | # Transforming text features to numerical features
{% include [types-of-supported-features-supported-feature-types](../_includes/work_src/reusage-common-phrases/supported-feature-types.md) %}
Text features are transformed to numerical. The transformation method generally includes the following stages:
1. **Loading a... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@algorithm-main-stages_text-to-numeric.md@.PATH_END.py |
{
"filename": "kfold-cross-validation.md",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/docs/en/guides/kfold-cross-validation.md",
"type": "Markdown"
} | ---
comments: true
description: Learn to implement K-Fold Cross Validation for object detection datasets using Ultralytics YOLO. Improve your model's reliability and robustness.
keywords: Ultralytics, YOLO, K-Fold Cross Validation, object detection, sklearn, pandas, PyYaml, machine learning, dataset split
---
# K-Fold... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@guides@kfold-cross-validation.md@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "astroufsc/chimera",
"repo_path": "chimera_extracted/chimera-master/docs/site/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# Chimera documentation build configuration file, created by
# sphinx-quickstart on Sat May 10 03:18:12 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't picklea... | astroufscREPO_NAMEchimeraPATH_START.@chimera_extracted@chimera-master@docs@site@conf.py@.PATH_END.py |
{
"filename": "_xaxis.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/ohlc/_xaxis.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(self, plotly_name="xaxis", parent_name="ohlc", **kwargs):
super(XaxisValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
dflt... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@ohlc@_xaxis.py@.PATH_END.py |
{
"filename": "isotropicNFWdf.py",
"repo_name": "jobovy/galpy",
"repo_path": "galpy_extracted/galpy-main/galpy/df/isotropicNFWdf.py",
"type": "Python"
} | # Class that implements isotropic spherical NFW DF
import numpy
from ..potential import NFWPotential
from ..util import conversion
from .sphericaldf import isotropicsphericaldf
# Coefficients of the improved analytical approximation that JB made
_COEFFS = numpy.array(
[
7.8480631889123114,
-41.026... | jobovyREPO_NAMEgalpyPATH_START.@galpy_extracted@galpy-main@galpy@df@isotropicNFWdf.py@.PATH_END.py |
{
"filename": "cfm.py",
"repo_name": "sebhoof/bhsr",
"repo_path": "bhsr_extracted/bhsr-main/python/bhsr/cfm.py",
"type": "Python"
} | #####################################################################
# Computations of the BHSR rates via the continued fraction method #
#####################################################################
import numpy as np
from numba import njit
from qnm.angular import sep_consts
from .constants import *
from .... | sebhoofREPO_NAMEbhsrPATH_START.@bhsr_extracted@bhsr-main@python@bhsr@cfm.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "CobayaSampler/cobaya",
"repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/planck_2015_plikHM_TTTEEE/__init__.py",
"type": "Python"
} | from cobaya.likelihoods.base_classes import Planck2015Clik
class planck_2015_plikHM_TTTEEE(Planck2015Clik):
r"""
High-$\ell$ polarization likelihood (binned) of Planck's 2015 data release
\cite{Aghanim:2015xee}.
"""
pass
| CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@planck_2015_plikHM_TTTEEE@__init__.py@.PATH_END.py |
{
"filename": "tfsa-2021-130.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2021-130.md",
"type": "Markdown"
} | ## TFSA-2021-130: Reference binding to nullptr in `RaggedTensorToSparse`
### CVE Number
CVE-2021-37656
### Impact
An attacker can cause undefined behavior via binding a reference to null pointer
in `tf.raw_ops.RaggedTensorToSparse`:
```python
import tensorflow as tf
tf.raw_ops.RaggedTensorToSparse(
rt_nested_spli... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2021-130.md@.PATH_END.py |
{
"filename": "pairwise_distance_xy_z.py",
"repo_name": "astropy/halotools",
"repo_path": "halotools_extracted/halotools-master/halotools/mock_observables/pair_counters/pairwise_distance_xy_z.py",
"type": "Python"
} | """ Module containing the `~halotools.mock_observables.pairwise_distance_3d` function
used to find pairs and their separation distance.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
import multiprocessing
from functools import partial
from scipy.sparse import... | astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@mock_observables@pair_counters@pairwise_distance_xy_z.py@.PATH_END.py |
{
"filename": "grid_paths.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/visualization/wcsaxes/grid_paths.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from matplotlib.lines import Path
from astropy.coordinates import angular_separation
# Tolerance for WCS round-tripping, relative to the scale size
ROUND_TRIP_RTOL = 1.0
# Tolerance for discontinuities relative to the median
DISCONT... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@visualization@wcsaxes@grid_paths.py@.PATH_END.py |
{
"filename": "_odepack_py.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/integrate/_odepack_py.py",
"type": "Python"
} | # Author: Travis Oliphant
__all__ = ['odeint']
import numpy as np
from . import _odepack
from copy import copy
import warnings
class ODEintWarning(Warning):
pass
_msgs = {2: "Integration successful.",
1: "Nothing was done; the integration time was 0.",
-1: "Excess work done on this call (per... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@integrate@_odepack_py.py@.PATH_END.py |
{
"filename": "survey.py",
"repo_name": "gammapy/enrico",
"repo_path": "enrico_extracted/enrico-master/enrico/survey.py",
"type": "Python"
} | """Utilities for making survey maps"""
import os.path
import logging
logging.basicConfig(level=logging.INFO)
log = logging.getLogger(__name__)
class MapMaker(object):
"""Make survey maps using binned Fermi tools"""
# Available preprocessing steps
STEPS = ['count_map']
def __init__(self, input_dir, ou... | gammapyREPO_NAMEenricoPATH_START.@enrico_extracted@enrico-master@enrico@survey.py@.PATH_END.py |
{
"filename": "test_config.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/misc/tests/test_config.py",
"type": "Python"
} | """
Check the SciPy config is valid.
"""
import scipy
import pytest
from unittest.mock import patch
pytestmark = pytest.mark.skipif(
not hasattr(scipy.__config__, "_built_with_meson"),
reason="Requires Meson builds",
)
class TestSciPyConfigs:
REQUIRED_CONFIG_KEYS = [
"Compilers",
"Machine... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@misc@tests@test_config.py@.PATH_END.py |
{
"filename": "_thickness.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/surface/colorbar/_thickness.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="thickness", parent_name="surface.colorbar", **kwargs
):
super(ThicknessValidator, self).__init__(
plotly_name=plotly_name,
parent... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@surface@colorbar@_thickness.py@.PATH_END.py |
{
"filename": "plotting.py",
"repo_name": "Zstone19/pypetal",
"repo_path": "pypetal_extracted/pypetal-main/src/pypetal/pyccf/plotting.py",
"type": "Python"
} | import matplotlib as mpl
import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
import numpy as np
from pypetal.utils.petalio import err2str
mpl.rcParams['xtick.minor.visible'] = True
mpl.rcParams['xtick.top'] = True
mpl.rcParams['xtick.direction'] = 'in'
mpl.rcParams['ytick.minor.visible'] = True
mp... | Zstone19REPO_NAMEpypetalPATH_START.@pypetal_extracted@pypetal-main@src@pypetal@pyccf@plotting.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "SeamusClarke/BTS",
"repo_path": "BTS_extracted/BTS-master/README.md",
"type": "Markdown"
} | 
# The BTS fitting code
The BTS (Behind The Spectrum) fitting code is a python module designed to be a fully-automated multiple-component fitter for optically-thin spectra. The code is open-source and can be downloaded here. If the code is use... | SeamusClarkeREPO_NAMEBTSPATH_START.@BTS_extracted@BTS-master@README.md@.PATH_END.py |
{
"filename": "_orientation.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/_orientation.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="orientation", parent_name="scatter", **kwargs):
super(OrientationValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@_orientation.py@.PATH_END.py |
{
"filename": "prompts.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/chains/elasticsearch_database/prompts.py",
"type": "Python"
} | # flake8: noqa
from langchain_core.prompts.prompt import PromptTemplate
PROMPT_SUFFIX = """Only use the following Elasticsearch indices:
{indices_info}
Question: {input}
ESQuery:"""
DEFAULT_DSL_TEMPLATE = """Given an input question, create a syntactically correct Elasticsearch query to run. Unless the user specifies... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@chains@elasticsearch_database@prompts.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "JulianBMunoz/21cmvFAST",
"repo_path": "21cmvFAST_extracted/21cmvFAST-master/public_21CMvFAST_MC/Programs/CosmoHammer_21CMMC/constants/__init__.py",
"type": "Python"
} | JulianBMunozREPO_NAME21cmvFASTPATH_START.@21cmvFAST_extracted@21cmvFAST-master@public_21CMvFAST_MC@Programs@CosmoHammer_21CMMC@constants@__init__.py@.PATH_END.py | |
{
"filename": "legend.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py3/matplotlib/legend.py",
"type": "Python"
} | """
The legend module defines the Legend class, which is responsible for
drawing legends associated with axes and/or figures.
.. important::
It is unlikely that you would ever create a Legend instance manually.
Most users would normally create a legend via the `~.Axes.legend`
function. For more details on... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py3@matplotlib@legend.py@.PATH_END.py |
{
"filename": "params.py",
"repo_name": "google/flax",
"repo_path": "flax_extracted/flax-main/examples/gemma/params.py",
"type": "Python"
} | # Copyright 2024 The Flax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@examples@gemma@params.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "xC-ell/growth-history",
"repo_path": "growth-history_extracted/growth-history-main/xCell/xcell/cls/__init__.py",
"type": "Python"
} | xC-ellREPO_NAMEgrowth-historyPATH_START.@growth-history_extracted@growth-history-main@xCell@xcell@cls@__init__.py@.PATH_END.py | |
{
"filename": "Quickstart.ipynb",
"repo_name": "arjunsavel/cortecs",
"repo_path": "cortecs_extracted/cortecs-main/docs/pages/Quickstart.ipynb",
"type": "Jupyter Notebook"
} | Quickstart: fitting with PCA
===========
Let's get started fitting opacities with `cortecs`. There are currently three compression algorithms that can be used: principal components analysis (PCA), polynomials, and neural networks. Each approach has their own strengths and weaknesses for a given opacity dataset. For th... | arjunsavelREPO_NAMEcortecsPATH_START.@cortecs_extracted@cortecs-main@docs@pages@Quickstart.ipynb@.PATH_END.py |
{
"filename": "opencube.py",
"repo_name": "vlas-sokolov/bayesian-ngc1333",
"repo_path": "bayesian-ngc1333_extracted/bayesian-ngc1333-master/opencube.py",
"type": "Python"
} | """ All spectral cube I/O helper functions reside here """
import os
import warnings
import pickle
import numpy as np
from astropy.io import fits
from astropy import log
import pyspeckit
from pyspeckit import cubes
from pyspeckit.spectrum.classes import units
from config import (file_nh311_dr1, file_nh322_dr1,
... | vlas-sokolovREPO_NAMEbayesian-ngc1333PATH_START.@bayesian-ngc1333_extracted@bayesian-ngc1333-master@opencube.py@.PATH_END.py |
{
"filename": "versioneer.py",
"repo_name": "mattyowl/RSSMOSPipeline",
"repo_path": "RSSMOSPipeline_extracted/RSSMOSPipeline-master/versioneer.py",
"type": "Python"
} |
# Version: 0.18
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy
* [![Latest Version]
... | mattyowlREPO_NAMERSSMOSPipelinePATH_START.@RSSMOSPipeline_extracted@RSSMOSPipeline-master@versioneer.py@.PATH_END.py |
{
"filename": "test_turn_on.py",
"repo_name": "simonsobs/nextline-schedule",
"repo_path": "nextline-schedule_extracted/nextline-schedule-main/tests/schema/mutations/auto_mode/test_turn_on.py",
"type": "Python"
} | from unittest.mock import Mock
from nextline_schedule.auto import AutoMode
from nextline_schedule.graphql import MUTATE_AUTO_MODE_TURN_ON
from tests.schema.conftest import Schema
async def test_schema(schema: Schema) -> None:
auto_mode = Mock(spec=AutoMode)
context_auto_mode = {'auto_mode': auto_mode}
co... | simonsobsREPO_NAMEnextline-schedulePATH_START.@nextline-schedule_extracted@nextline-schedule-main@tests@schema@mutations@auto_mode@test_turn_on.py@.PATH_END.py |
{
"filename": "CAMBdemo.ipynb",
"repo_name": "SBU-COSMOLIKE/CAMBLateDE",
"repo_path": "CAMBLateDE_extracted/CAMBLateDE-main/docs/CAMBdemo.ipynb",
"type": "Jupyter Notebook"
} | **CAMB Python example notebook**
Run it online yourself in [Binder](https://mybinder.org/v2/gh/cmbant/camb/master?filepath=docs%2FCAMBdemo.ipynb).
```python
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import sys, platform, os
import matplotlib
from matplotlib import pyplot as plt
import numpy a... | SBU-COSMOLIKEREPO_NAMECAMBLateDEPATH_START.@CAMBLateDE_extracted@CAMBLateDE-main@docs@CAMBdemo.ipynb@.PATH_END.py |
{
"filename": "install_osiris_drs.py",
"repo_name": "Keck-DataReductionPipelines/OsirisDRP",
"repo_path": "OsirisDRP_extracted/OsirisDRP-master/scripts/install_osiris_drs.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This is a script to install the OSIRIS DRS Pipeline from v4.0 onwards.
It is heavily based on ``install_osiris_drs_v3.2.py``, the original OSIRIS
pipeline installer.
This script has a few options, you can examine them with
python install_osiris_drs.py --help
Author: ... | Keck-DataReductionPipelinesREPO_NAMEOsirisDRPPATH_START.@OsirisDRP_extracted@OsirisDRP-master@scripts@install_osiris_drs.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "simonsobs/nextline-schedule",
"repo_path": "nextline-schedule_extracted/nextline-schedule-main/src/nextline_schedule/auto/__init__.py",
"type": "Python"
} | __all__ = [
'AutoMode',
'ModeName',
'AutoModeStateMachine',
]
from .auto_mode import AutoMode, ModeName
from .state_machine import AutoModeStateMachine
| simonsobsREPO_NAMEnextline-schedulePATH_START.@nextline-schedule_extracted@nextline-schedule-main@src@nextline_schedule@auto@__init__.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnel/marker/colorbar/title/_font.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name="font", parent_name="funnel.marker.colorbar.title", **kwargs
):
super(FontValidator, self).__init__(
plotly_name=plotly_name,
parent_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnel@marker@colorbar@title@_font.py@.PATH_END.py |
{
"filename": "mock_data.ipynb",
"repo_name": "discsim/frank",
"repo_path": "frank_extracted/frank-master/docs/tutorials/mock_data.ipynb",
"type": "Jupyter Notebook"
} | # Taking a Hankel transform, and generating mock data with `frank`
_This tutorial will show how to take a 1D Fourier transform (a discrete Hankel transform) with frank, and how to take this a step further to generate a noisy, mock dataset (visibility distribution) using frank._
## Motivation
Taking a 1D Fourier tran... | discsimREPO_NAMEfrankPATH_START.@frank_extracted@frank-master@docs@tutorials@mock_data.ipynb@.PATH_END.py |
{
"filename": "spec.py",
"repo_name": "JaidenCook/OSIRIS",
"repo_path": "OSIRIS_extracted/OSIRIS-main/spec.py",
"type": "Python"
} | #!/usr/bin/python
__author__ = "Jaiden Cook"
__credits__ = ["Jaiden Cook"]
__version__ = "1.0.0"
__maintainer__ = "Jaiden Cook"
__email__ = "Jaiden.Cook@student.curtin.edu"
# Generic stuff:
import time
import warnings
warnings.filterwarnings("ignore")
# Array stuff:
import numpy as np
warnings.simplefilter('ignore',... | JaidenCookREPO_NAMEOSIRISPATH_START.@OSIRIS_extracted@OSIRIS-main@spec.py@.PATH_END.py |
{
"filename": "output.py",
"repo_name": "GijsMulders/epos",
"repo_path": "epos_extracted/epos-master/EPOS/plot/output.py",
"type": "Python"
} | import numpy as np
import matplotlib.pyplot as plt
from . import periodradius, massradius, multi, helpers
clrs= ['r','g','b','m'] # in epos.prep
fmt_symbol= {'ls':'', 'marker':'o', 'mew':2, 'ms':8,'alpha':0.6}
''' output '''
def all(epos, color='C1'):
if hasattr(epos, 'synthetic_survey'):
print ('\nPlotting outpu... | GijsMuldersREPO_NAMEeposPATH_START.@epos_extracted@epos-master@EPOS@plot@output.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "cpiaulet/smint",
"repo_path": "smint_extracted/smint-master/README.md",
"type": "Markdown"
} | # smint
*smint* (Structure Model INTerpolator) is a tool to obtain posterior distributions on the H/He or H2O mass fraction of a planet based upon interpolation onto the Lopez & Fortney (2014), Zeng (2016) and Aguichine et al. (2021) model grids.
If you use this code, please cite Caroline Piaulet as well as the paper... | cpiauletREPO_NAMEsmintPATH_START.@smint_extracted@smint-master@README.md@.PATH_END.py |
{
"filename": "_cmax.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/barpolar/marker/line/_cmax.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CmaxValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="cmax", parent_name="barpolar.marker.line", **kwargs
):
super(CmaxValidator, self).__init__(
plotly_name=plotly_name,
parent_name=paren... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@barpolar@marker@line@_cmax.py@.PATH_END.py |
{
"filename": "mayavi.py",
"repo_name": "chandra-marx/marxs",
"repo_path": "marxs_extracted/marxs-main/marxs/visualization/mayavi.py",
"type": "Python"
} | # Licensed under GPL version 3 - see LICENSE.rst
'''`Mayavi <http://docs.enthought.com/mayavi/mayavi/>`__ plotting backend
Mayavi is a python package for interactive 3-D displays that uses VTK
underneath. Functions in this module display rays or objects in 3D
using mayavi. Each of them requires a ``mayavi.core.scene.... | chandra-marxREPO_NAMEmarxsPATH_START.@marxs_extracted@marxs-main@marxs@visualization@mayavi.py@.PATH_END.py |
{
"filename": "TestEngine2.py",
"repo_name": "dokester/BayesicFitting",
"repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/test/TestEngine2.py",
"type": "Python"
} | # run with : python3 -m unittest TestEngine2
import unittest
import os
import numpy as numpy
from astropy import units
import math
import matplotlib.pyplot as plt
from BayesicFitting import *
from BayesicFitting import formatter as fmt
__author__ = "Do Kester"
__year__ = 2017
__license__ = "GPL3"
__version__ = "0.9"... | dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@test@TestEngine2.py@.PATH_END.py |
{
"filename": "image.py",
"repo_name": "shaoshanglqy/shap-shapley",
"repo_path": "shap-shapley_extracted/shap-shapley-master/shap/plots/image.py",
"type": "Python"
} | import numpy as np
import warnings
try:
import matplotlib.pyplot as pl
except ImportError:
warnings.warn("matplotlib could not be loaded!")
pass
from . import colors
def image_plot(shap_values, x, labels=None, show=True):
""" Plots SHAP values for image inputs.
"""
multi_output = True
if t... | shaoshanglqyREPO_NAMEshap-shapleyPATH_START.@shap-shapley_extracted@shap-shapley-master@shap@plots@image.py@.PATH_END.py |
{
"filename": "_tight_layout.py",
"repo_name": "matplotlib/matplotlib",
"repo_path": "matplotlib_extracted/matplotlib-main/lib/matplotlib/_tight_layout.py",
"type": "Python"
} | """
Routines to adjust subplot params so that subplots are
nicely fit in the figure. In doing so, only axis labels, tick labels, Axes
titles and offsetboxes that are anchored to Axes are currently considered.
Internally, this module assumes that the margins (left margin, etc.) which are
differences between ``Axes.get_... | matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@lib@matplotlib@_tight_layout.py@.PATH_END.py |
{
"filename": "phase_dispersion_minimization.py",
"repo_name": "RuthAngus/starspot",
"repo_path": "starspot_extracted/starspot-master/starspot/phase_dispersion_minimization.py",
"type": "Python"
} | """
Phase dispersion minimisation algorithm, Stellingwerf (1978).
"""
import numpy as np
import scipy.optimize as sco
def sj2(x, meanx, N):
"""
The variance of a set of data points in one bin.
Args:
x (array): The flux array (defined as x in Stellingwerf, 1978).
meanx (float): The mean o... | RuthAngusREPO_NAMEstarspotPATH_START.@starspot_extracted@starspot-master@starspot@phase_dispersion_minimization.py@.PATH_END.py |
{
"filename": "shellapp.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py2/IPython/core/shellapp.py",
"type": "Python"
} | # encoding: utf-8
"""
A mixin for :class:`~IPython.core.application.Application` classes that
launch InteractiveShell instances, load extensions, etc.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import absolute_import
from __future__ import ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py2@IPython@core@shellapp.py@.PATH_END.py |
{
"filename": "compat.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/numpy/distutils/compat.py",
"type": "Python"
} | """Small modules to cope with python 2 vs 3 incompatibilities inside
numpy.distutils
"""
from __future__ import division, absolute_import, print_function
import sys
def get_exception():
return sys.exc_info()[1]
| waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@numpy@distutils@compat.py@.PATH_END.py |
{
"filename": "abscal_inspect_2458139.ipynb",
"repo_name": "HERA-Team/H1C_IDR3_Notebooks",
"repo_path": "H1C_IDR3_Notebooks-main/abscal_inspect/abscal_inspect_2458139.ipynb",
"type": "Jupyter Notebook"
} | # Stage 2 Absolute Calibration Nightly Notebook
**Josh Dillon**, Last Revised 9/23/20
```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from hera_cal import io, redcal, apply_cal, abscal, utils
from hera_cal.smooth_cal import build_time_blacklist
from hera_qm.metrics_io import load_metri... | HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@abscal_inspect@abscal_inspect_2458139.ipynb@.PATH_END.py |
{
"filename": "addpath.py",
"repo_name": "dstndstn/astrometry.net",
"repo_path": "astrometry.net_extracted/astrometry.net-main/util/addpath.py",
"type": "Python"
} | # This file is part of the Astrometry.net suite.
# Licensed under a 3-clause BSD style license - see LICENSE
import sys
import os
def addpath():
try:
import astrometry
from astrometry.util.shell import shell_escape
from astrometry.util.filetype import filetype_short
except ImportError:
... | dstndstnREPO_NAMEastrometry.netPATH_START.@astrometry.net_extracted@astrometry.net-main@util@addpath.py@.PATH_END.py |
{
"filename": "mpfit.py",
"repo_name": "mifumagalli/cluster-cloc",
"repo_path": "cluster-cloc_extracted/cluster-cloc-master/py/mpfit.py",
"type": "Python"
} | """
Perform Levenberg-Marquardt least-squares minimization, based on MINPACK-1.
AUTHORS
The original version of this software, called LMFIT, was written in FORTRAN
as part of the MINPACK-1 package by XXX.
Craig Markwardt converted the FORTRAN code to IDL. The information for the
IDL version is:
... | mifumagalliREPO_NAMEcluster-clocPATH_START.@cluster-cloc_extracted@cluster-cloc-master@py@mpfit.py@.PATH_END.py |
{
"filename": "fold.py",
"repo_name": "nhurleywalker/GPMTransient",
"repo_path": "GPMTransient_extracted/GPMTransient-main/dynspec/pulsestacks/fold.py",
"type": "Python"
} | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as mcol
import matplotlib.font_manager
from matplotlib import rc
# Nature requires sans-serif fonts
plt.rcParams.update({
"text.usetex": False,
"font.size": 7,
"font.sans-serif": ["Helvetica"]})
# inches to cm
cm = 1/2.54
from as... | nhurleywalkerREPO_NAMEGPMTransientPATH_START.@GPMTransient_extracted@GPMTransient-main@dynspec@pulsestacks@fold.py@.PATH_END.py |
{
"filename": "_cmin.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergeo/marker/line/_cmin.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CminValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="cmin", parent_name="scattergeo.marker.line", **kwargs
):
super(CminValidator, self).__init__(
plotly_name=plotly_name,
parent_name=par... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergeo@marker@line@_cmin.py@.PATH_END.py |
{
"filename": "_tickformatstopdefaults.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/isosurface/colorbar/_tickformatstopdefaults.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self,
plotly_name="tickformatstopdefaults",
parent_name="isosurface.colorbar",
**kwargs
):
super(TickformatstopdefaultsValidator, sel... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@isosurface@colorbar@_tickformatstopdefaults.py@.PATH_END.py |
{
"filename": "compare_soho_to_sdo.py",
"repo_name": "RobertJaro/InstrumentToInstrument",
"repo_path": "InstrumentToInstrument_extracted/InstrumentToInstrument-master/itipy/evaluation/soho/compare_soho_to_sdo.py",
"type": "Python"
} | import glob
import os
from datetime import timedelta, datetime
from warnings import simplefilter
import numpy as np
from aiapy.calibrate import correct_degradation
from astropy import units as u
from astropy.coordinates import SkyCoord
from dateutil.parser import parse
from imreg_dft import similarity, transform_img_d... | RobertJaroREPO_NAMEInstrumentToInstrumentPATH_START.@InstrumentToInstrument_extracted@InstrumentToInstrument-master@itipy@evaluation@soho@compare_soho_to_sdo.py@.PATH_END.py |
{
"filename": "checkStarAndSubSys.py",
"repo_name": "lsst-ts/ts_phosim",
"repo_path": "ts_phosim_extracted/ts_phosim-main/examples/checkStarAndSubSys.py",
"type": "Python"
} | # This file is part of ts_phosim.
#
# Developed for the LSST Telescope and Site Systems.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: y... | lsst-tsREPO_NAMEts_phosimPATH_START.@ts_phosim_extracted@ts_phosim-main@examples@checkStarAndSubSys.py@.PATH_END.py |
{
"filename": "io.py",
"repo_name": "liamedeiros/ehtplot",
"repo_path": "ehtplot_extracted/ehtplot-master/ehtplot/extra/io.py",
"type": "Python"
} | # Copyright (C) 2017 Chi-kwan Chan
# Copyright (C) 2017 Steward Observatory
#
# This file is part of mockservation.
#
# Mockservation 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
# L... | liamedeirosREPO_NAMEehtplotPATH_START.@ehtplot_extracted@ehtplot-master@ehtplot@extra@io.py@.PATH_END.py |
{
"filename": "_rotation_spline.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/spatial/transform/_rotation_spline.py",
"type": "Python"
} | import numpy as np
from scipy.linalg import solve_banded
from ._rotation import Rotation
def _create_skew_matrix(x):
"""Create skew-symmetric matrices corresponding to vectors.
Parameters
----------
x : ndarray, shape (n, 3)
Set of vectors.
Returns
-------
ndarray, shape (n, 3, 3... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@spatial@transform@_rotation_spline.py@.PATH_END.py |
{
"filename": "branching_fractions.ipynb",
"repo_name": "LoganAMorrison/Hazma",
"repo_path": "Hazma_extracted/Hazma-master/notebooks/dev/gev/branching_fractions.ipynb",
"type": "Jupyter Notebook"
} | ```python
import numpy as np
import matplotlib.pyplot as plt
from cycler import cycler
from copy import copy
from tqdm.notebook import trange, tqdm
from hazma.vector_mediator import KineticMixingGeV, BLGeV
```
## Plot Config
```python
jonquil = ["#e6c229", "#f17105", "#d11149", "#6610f2", "#1a8fe3"]
redsalsa = [
... | LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@notebooks@dev@gev@branching_fractions.ipynb@.PATH_END.py |
{
"filename": "mkid_resolving_power.ipynb",
"repo_name": "MazinLab/MKIDGen3",
"repo_path": "MKIDGen3_extracted/MKIDGen3-main/scripts/mkid_resolving_power.ipynb",
"type": "Jupyter Notebook"
} | ```python
```
| MazinLabREPO_NAMEMKIDGen3PATH_START.@MKIDGen3_extracted@MKIDGen3-main@scripts@mkid_resolving_power.ipynb@.PATH_END.py |
{
"filename": "plot.py",
"repo_name": "MNGuenther/allesfitter",
"repo_path": "allesfitter_extracted/allesfitter-master/paper/WASP-18/plot.py",
"type": "Python"
} | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Feb 10 22:09:56 2019
@author:
Maximilian N. Günther
MIT Kavli Institute for Astrophysics and Space Research,
Massachusetts Institute of Technology,
77 Massachusetts Avenue,
Cambridge, MA 02109,
USA
Email: maxgue@mit.edu
Web: www.mnguenther.com
"""
fr... | MNGuentherREPO_NAMEallesfitterPATH_START.@allesfitter_extracted@allesfitter-master@paper@WASP-18@plot.py@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/indicator/delta/font/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="indicator.delta.font", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=par... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@indicator@delta@font@_color.py@.PATH_END.py |
{
"filename": "embedding.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/src/layers/core/embedding.py",
"type": "Python"
} | import warnings
from keras.src import backend
from keras.src import constraints
from keras.src import dtype_policies
from keras.src import initializers
from keras.src import ops
from keras.src import quantizers
from keras.src import regularizers
from keras.src.api_export import keras_export
from keras.src.layers.layer... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@core@embedding.py@.PATH_END.py |
{
"filename": "_tickfont.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/polar/angularaxis/_tickfont.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name="tickfont", parent_name="layout.polar.angularaxis", **kwargs
):
super(TickfontValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@polar@angularaxis@_tickfont.py@.PATH_END.py |
{
"filename": "SiGaps_17_VG09_12_STA.ipynb",
"repo_name": "Echelle/AO_bonding_paper",
"repo_path": "AO_bonding_paper_extracted/AO_bonding_paper-master/notebooks/SiGaps_17_VG09_12_STA.ipynb",
"type": "Jupyter Notebook"
} | ###This IPython Notebook is for showing spectra of sample VG09-12, on- and off- the mesh region with 49+/-6 nm gap. This version is updated with new data from February 2015.
The filename of the figure is **[TBD].pdf**.
Author: Michael Gully-Santiago, `gully@astro.as.utexas.edu`
Date: February 9, 2015
```python
%p... | EchelleREPO_NAMEAO_bonding_paperPATH_START.@AO_bonding_paper_extracted@AO_bonding_paper-master@notebooks@SiGaps_17_VG09_12_STA.ipynb@.PATH_END.py |
{
"filename": "constant_quantity.py",
"repo_name": "CU-NESS/pylinex",
"repo_path": "pylinex_extracted/pylinex-master/examples/quantity/constant_quantity.py",
"type": "Python"
} | """
File: examples/quantity/constant_quantity.py
Author: Keith Tauscher
Date: 10 Sep 2017
Description: Example showing how to use the ConstantQuantity class which
returns a predefined constant no matter what object it is passed.
"""
from pylinex import ConstantQuantity
class A(object):
pass
a = A()
... | CU-NESSREPO_NAMEpylinexPATH_START.@pylinex_extracted@pylinex-master@examples@quantity@constant_quantity.py@.PATH_END.py |
{
"filename": "plots.ipynb",
"repo_name": "valboz/VBBinaryLensing",
"repo_path": "VBBinaryLensing_extracted/VBBinaryLensing-master/examples/cpp_examples/binary_lens/plots.ipynb",
"type": "Jupyter Notebook"
} | ```python
import numpy as np
from matplotlib import pyplot as plt
import matplotlib as mpl
mpl.rc('font',**{'family':'serif','serif':['Palatino']})
mpl.rc('text', usetex=True)
mpl.rcParams['axes.labelsize'] = 20
mpl.rcParams['xtick.labelsize'] = 20
mpl.rcParams['ytick.labelsize'] = 20
mpl.rcParams['axes.titlesize'] = ... | valbozREPO_NAMEVBBinaryLensingPATH_START.@VBBinaryLensing_extracted@VBBinaryLensing-master@examples@cpp_examples@binary_lens@plots.ipynb@.PATH_END.py |
{
"filename": "test_generator_uvb_qso.py",
"repo_name": "mirochaj/ares",
"repo_path": "ares_extracted/ares-main/tests/broken/test_generator_uvb_qso.py",
"type": "Python"
} | """
test_generator_xrb.py
Author: Jordan Mirocha
Affiliation: University of Colorado at Boulder
Created on: Fri Jun 14 09:20:22 2013
Description:
"""
import numpy as np
import os, sys, ares
import matplotlib.pyplot as pl
from ares.physics.Constants import erg_per_ev
zi, zf = (6, 3.)
# Initialize radiation backgr... | mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@tests@broken@test_generator_uvb_qso.py@.PATH_END.py |
{
"filename": "ConversionLibrary.py",
"repo_name": "MehrnooshTahani/MC-BLOS",
"repo_path": "MC-BLOS_extracted/MC-BLOS-main/MolecularClouds/LocalLibraries/ConversionLibrary.py",
"type": "Python"
} | import numpy as np
from astropy.coordinates import SkyCoord
'''
Contains common unit conversion utilities.
'''
def ra_hms2deg(ra_h, ra_m, ra_s):
"""
This function converts a right ascension in hour:min:sec to degrees
:param ra_h: hour component of right ascension
:param ra_m: minute component of right... | MehrnooshTahaniREPO_NAMEMC-BLOSPATH_START.@MC-BLOS_extracted@MC-BLOS-main@MolecularClouds@LocalLibraries@ConversionLibrary.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "COSMIC-PopSynth/COSMIC",
"repo_path": "COSMIC_extracted/COSMIC-master/cosmic/sample/sampler/__init__.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) Katie Breivik (2017 - 2020)
#
# This file is part of COSMIC
#
# COSMIC 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 Lice... | COSMIC-PopSynthREPO_NAMECOSMICPATH_START.@COSMIC_extracted@COSMIC-master@cosmic@sample@sampler@__init__.py@.PATH_END.py |
{
"filename": "constants.py",
"repo_name": "a-renzini/popstock",
"repo_path": "popstock_extracted/popstock-main/popstock/constants.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Copyright (C) Arianna I. Renzini 2024
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# Th... | a-renziniREPO_NAMEpopstockPATH_START.@popstock_extracted@popstock-main@popstock@constants.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/title/__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"])
| plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@scene@yaxis@title@__init__.py@.PATH_END.py |
{
"filename": "logposterior.py",
"repo_name": "sherpa/sherpa",
"repo_path": "sherpa_extracted/sherpa-main/sherpa/logposterior.py",
"type": "Python"
} | #
# Copyright (C) 2009, 2016, 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) an... | sherpaREPO_NAMEsherpaPATH_START.@sherpa_extracted@sherpa-main@sherpa@logposterior.py@.PATH_END.py |
{
"filename": "DOCKER.md",
"repo_name": "cbassa/sattools",
"repo_path": "sattools_extracted/sattools-main/DOCKER.md",
"type": "Markdown"
} | # DOCKER.md - Introduction
Sattools, stvid and strf are Unix-native tools, with complex and
specific environment requirements in order for them to operate.
The Docker environment allows you to gain access to sattools
without knowing how to install dependencies or compile source.
It has the additional benefit of be... | cbassaREPO_NAMEsattoolsPATH_START.@sattools_extracted@sattools-main@DOCKER.md@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.