metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "parameter_space_axions.py",
"repo_name": "axion-alp-dm/EBL_calculation",
"repo_path": "EBL_calculation_extracted/EBL_calculation-main/scripts/parameter_space_axions.py",
"type": "Python"
} | # IMPORTS --------------------------------------------#
import os
import yaml
import numpy as np
import matplotlib.pyplot as plt
from astropy import units as u
from astropy.constants import h as h_plank
from ebl_codes.EBL_class import EBL_model
plt.rcParams['mathtext.fontset'] = 'stix'
plt.rcParams['font.family'] = ... | axion-alp-dmREPO_NAMEEBL_calculationPATH_START.@EBL_calculation_extracted@EBL_calculation-main@scripts@parameter_space_axions.py@.PATH_END.py |
{
"filename": "_legendgrouptitle.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/splom/_legendgrouptitle.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Legendgrouptitle(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "splom"
_path_str = "splom.legendgrouptitle"
_valid_props = {"font", "text"}
#... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@splom@_legendgrouptitle.py@.PATH_END.py |
{
"filename": "BoxBounds.py",
"repo_name": "MehrnooshTahani/MC-BLOS",
"repo_path": "MC-BLOS_extracted/MC-BLOS-main/MolecularClouds/LocalLibraries/BoxBounds.py",
"type": "Python"
} | import math
import numpy as np
'''
Contains functions related to finding a valid box bound around a region.
'''
def getBoxBounds(data, boxXMin, boxXMax, boxYMin, boxYMax):
'''
Given a data canvas and a set of desired bounds, returns valid bounds
:param data: The data canvas. Needed for its shape.
:par... | MehrnooshTahaniREPO_NAMEMC-BLOSPATH_START.@MC-BLOS_extracted@MC-BLOS-main@MolecularClouds@LocalLibraries@BoxBounds.py@.PATH_END.py |
{
"filename": "vMF_test.py",
"repo_name": "PeterDenton/ANA",
"repo_path": "ANA_extracted/ANA-master/py/vMF_test.py",
"type": "Python"
} | """
This code is free to use, copy, distribute, and modify.
If you use this code or any modification of this code, we request that you reference both this code https://zenodo.org/record/438675 and the paper https://arxiv.org/abs/1703.09721.
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize imp... | PeterDentonREPO_NAMEANAPATH_START.@ANA_extracted@ANA-master@py@vMF_test.py@.PATH_END.py |
{
"filename": "_error_x.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/_error_x.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class Error_XValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="error_x", parent_name="scatter3d", **kwargs):
super(Error_XValidator, 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@scatter3d@_error_x.py@.PATH_END.py |
{
"filename": "interpolate.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/interpolate/interpolate.py",
"type": "Python"
} | # This file is not meant for public use and will be removed in SciPy v2.0.0.
# Use the `scipy.interpolate` namespace for importing the functions
# included below.
from scipy._lib.deprecation import _sub_module_deprecation
__all__ = [ # noqa: F822
'BPoly',
'BSpline',
'NdPPoly',
'PPoly',
'RectBiva... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@interpolate@interpolate.py@.PATH_END.py |
{
"filename": "pipeline.py",
"repo_name": "gbrammer/msaexp",
"repo_path": "msaexp_extracted/msaexp-main/msaexp/pipeline.py",
"type": "Python"
} | """
Manual extractions of NIRSpec MSA spectra
"""
import os
import glob
import time
import traceback
from collections import OrderedDict
from tqdm import tqdm
import yaml
import numpy as np
import matplotlib.pyplot as plt
import astropy.io.fits as pyfits
import astropy.units as u
from astropy.units.equivalencies im... | gbrammerREPO_NAMEmsaexpPATH_START.@msaexp_extracted@msaexp-main@msaexp@pipeline.py@.PATH_END.py |
{
"filename": "run_mcmc.py",
"repo_name": "PantheonPlusSH0ES/DataRelease",
"repo_path": "DataRelease_extracted/DataRelease-main/SH0ES_Data/run_mcmc.py",
"type": "Python"
} | '''
A minimum working example to run MCMC for SH0ES data.
Y.S.Murakami 2021-2022 @ JHU
'''
import numpy as np
from MCMC_utils import *
##### config #####
# change the variables below for desired data files, output path, MCMC settings, etc.
# least square fit results (for initial guess and constructing priors)
lstsq_r... | PantheonPlusSH0ESREPO_NAMEDataReleasePATH_START.@DataRelease_extracted@DataRelease-main@SH0ES_Data@run_mcmc.py@.PATH_END.py |
{
"filename": "rosenbrock_sampler.py",
"repo_name": "CU-NESS/pylinex",
"repo_path": "pylinex_extracted/pylinex-master/examples/nonlinear/rosenbrock_sampler.py",
"type": "Python"
} | """
File: examples/nonlinear/sampler.py
Author: Keith Tauscher
Date: 24 Mar 2018
Description: Example showing a simple use case of the Sampler class to sample
a GaussianLoglikelihood object.
"""
import os
import numpy as np
import matplotlib.pyplot as pl
from distpy import UniformDistribution, GaussianDis... | CU-NESSREPO_NAMEpylinexPATH_START.@pylinex_extracted@pylinex-master@examples@nonlinear@rosenbrock_sampler.py@.PATH_END.py |
{
"filename": "errors.py",
"repo_name": "oliverphilcox/ChempyMulti",
"repo_path": "ChempyMulti_extracted/ChempyMulti-master/Chempy/input/yields/West17/fortranfile/errors.py",
"type": "Python"
} | """
Contains all error classes
"""
############################################################
# read errors
############################################################
class RecordSizeError(Exception):
"""
Exception raised when assert_eor finds EOR == False.
This means that the data read does not matc... | oliverphilcoxREPO_NAMEChempyMultiPATH_START.@ChempyMulti_extracted@ChempyMulti-master@Chempy@input@yields@West17@fortranfile@errors.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "ArgonneCPAC/dsps",
"repo_path": "dsps_extracted/dsps-main/dsps/sed/__init__.py",
"type": "Python"
} | # flake8: noqa
"""
"""
from .metallicity_weights import *
from .stellar_age_weights import *
from .ssp_weights import *
from .stellar_sed import *
| ArgonneCPACREPO_NAMEdspsPATH_START.@dsps_extracted@dsps-main@dsps@sed@__init__.py@.PATH_END.py |
{
"filename": "raw_segment_collection.py",
"repo_name": "macrocosme/shwirl",
"repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/visuals/collections/raw_segment_collection.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
"""
Raw Segment Colle... | macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@visuals@collections@raw_segment_collection.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "DifferentiableUniverseInitiative/sbi_lens",
"repo_path": "sbi_lens_extracted/sbi_lens-main/utils/README.md",
"type": "Markdown"
} | # Utility scripts
## Computing Log Normal Shift Parameters with Cosmomentum
We provide the script `compute_log_normal_shifts.py` to evaluate the shift parameters on a range of cosmological parameter values
and for a baseline set of redshift distributions.
To use it, make sure to first compile Cosmomentum as follows... | DifferentiableUniverseInitiativeREPO_NAMEsbi_lensPATH_START.@sbi_lens_extracted@sbi_lens-main@utils@README.md@.PATH_END.py |
{
"filename": "carrington.py",
"repo_name": "spacepy/spacepy",
"repo_path": "spacepy_extracted/spacepy-main/spacepy/plot/carrington.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module for plotting data by Carrington or Bartels rotation
Authors: Steve Morley
Institution: Los Alamos National Laboratory
Contact: smorley@lanl.gov
Los Alamos National Laboratory
Copyright 2011-2015 Los Alamos National Security, LLC.
"""
import datetime as dt
impo... | spacepyREPO_NAMEspacepyPATH_START.@spacepy_extracted@spacepy-main@spacepy@plot@carrington.py@.PATH_END.py |
{
"filename": "construct_body.py",
"repo_name": "icecube/TauRunner",
"repo_path": "TauRunner_extracted/TauRunner-master/taurunner/utils/construct_body.py",
"type": "Python"
} | def construct_body(TR_specs):
if TR_specs['body']=='earth':
from taurunner.body import construct_earth
if TR_specs['water']>0:
body = construct_earth([(TR_specs['water'], 1)])
else:
body = construct_earth()
elif 'sun' in TR_specs['body'].lower(): # TODO make this ... | icecubeREPO_NAMETauRunnerPATH_START.@TauRunner_extracted@TauRunner-master@taurunner@utils@construct_body.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "rhayes777/PyAutoFit",
"repo_path": "PyAutoFit_extracted/PyAutoFit-main/test_autofit/graphical/functionality/__init__.py",
"type": "Python"
} | rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@test_autofit@graphical@functionality@__init__.py@.PATH_END.py | |
{
"filename": "Kuroda_2020.ipynb",
"repo_name": "SNEWS2/snewpy",
"repo_path": "snewpy_extracted/snewpy-main/doc/nb/ccsn/Kuroda_2020.ipynb",
"type": "Jupyter Notebook"
} | # Kuroda 2020 Models
Models from Takami Kuroda. The paper describing the simulations is "Impact of magnetic field on neutrino-matter interactions in core-collapse supernova" arXiv:2009.07733.
Included with SNEWPY with permission of the authors.
```python
import matplotlib as mpl
import matplotlib.pyplot as plt
impor... | SNEWS2REPO_NAMEsnewpyPATH_START.@snewpy_extracted@snewpy-main@doc@nb@ccsn@Kuroda_2020.ipynb@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "tardis-sn/tardis",
"repo_path": "tardis_extracted/tardis-main/setup.py",
"type": "Python"
} | import glob
import os
import sys
try:
from configparser import ConfigParser
except ImportError:
from ConfigParser import ConfigParser
# Get some values from the setup.cfg
conf = ConfigParser()
conf.read(['setup.cfg'])
metadata = dict(conf.items('metadata'))
PACKAGENAME = metadata.get('package_name', 'packagen... | tardis-snREPO_NAMEtardisPATH_START.@tardis_extracted@tardis-main@setup.py@.PATH_END.py |
{
"filename": "developer.md",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/docs/developer.md",
"type": "Markdown"
} | (building-from-source)=
# Building from source
<!--* freshness: { reviewed: '2024-05-15' } *-->
First, obtain the JAX source code:
```
git clone https://github.com/jax-ml/jax
cd jax
```
Building JAX involves two steps:
1. Building or installing `jaxlib`, the C++ support library for `jax`.
2. Installing the `jax` P... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@docs@developer.md@.PATH_END.py |
{
"filename": "_hoverinfo.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/_hoverinfo.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator):
def __init__(self, plotly_name="hoverinfo", parent_name="icicle", **kwargs):
super(HoverinfoValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@_hoverinfo.py@.PATH_END.py |
{
"filename": "_customdatasrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2d/_customdatasrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="customdatasrc", parent_name="histogram2d", **kwargs
):
super(CustomdatasrcValidator, self).__init__(
plotly_name=plotly_name,
pa... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2d@_customdatasrc.py@.PATH_END.py |
{
"filename": "_ticktextsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/xaxis/_ticktextsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="ticktextsrc", parent_name="layout.xaxis", **kwargs):
super(TicktextsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@xaxis@_ticktextsrc.py@.PATH_END.py |
{
"filename": "feature_request.md",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/.github/ISSUE_TEMPLATE/feature_request.md",
"type": "Markdown"
} | ---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
#### Is your feature request related to a problem? Please describe
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
#### Describe the solution you'd like
A clear and co... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@.github@ISSUE_TEMPLATE@feature_request.md@.PATH_END.py |
{
"filename": "CentroidModel.py",
"repo_name": "kevin218/Eureka",
"repo_path": "Eureka_extracted/Eureka-main/src/eureka/S5_lightcurve_fitting/differentiable_models/CentroidModel.py",
"type": "Python"
} | import numpy as np
import theano
theano.config.gcc__cxxflags += " -fexceptions"
import theano.tensor as tt
# Avoid tonnes of "Cannot construct a scalar test value" messages
import logging
logger = logging.getLogger("theano.tensor.opt")
logger.setLevel(logging.ERROR)
from . import PyMC3Model
from ...lib.split_channel... | kevin218REPO_NAMEEurekaPATH_START.@Eureka_extracted@Eureka-main@src@eureka@S5_lightcurve_fitting@differentiable_models@CentroidModel.py@.PATH_END.py |
{
"filename": "test_cusum.py",
"repo_name": "light-curve/light-curve-python",
"repo_path": "light-curve-python_extracted/light-curve-python-master/light-curve/tests/light_curve_py/features/test_cusum.py",
"type": "Python"
} | import numpy as np
from numpy.testing import assert_allclose
from light_curve.light_curve_py import Cusum
def test_cusum():
m = [1, 2, 3, 4, 5, 5]
feature = Cusum()
actual = feature(np.linspace(0, 1, len(m)), m, None)
desired = 0.408248290463863
assert_allclose(actual, desired)
| light-curveREPO_NAMElight-curve-pythonPATH_START.@light-curve-python_extracted@light-curve-python-master@light-curve@tests@light_curve_py@features@test_cusum.py@.PATH_END.py |
{
"filename": "prep_flt_files.py",
"repo_name": "gbrammer/threedhst",
"repo_path": "threedhst_extracted/threedhst-master/threedhst/prep_flt_files.py",
"type": "Python"
} | """
3DHST.prep_flt_files
Process RAW flt files to
1) Subtract background
2) Align to reference (e.g. ACS-z)
3) Combine full direct mosaics and mosaics of grism pointings with
like orientation angles.
"""
__version__ = "$Rev$"
# $URL$
# $Author$
# $Date$
import os
import glob
impo... | gbrammerREPO_NAMEthreedhstPATH_START.@threedhst_extracted@threedhst-master@threedhst@prep_flt_files.py@.PATH_END.py |
{
"filename": "base_model.py",
"repo_name": "morpheus-project/morpheus",
"repo_path": "morpheus_extracted/morpheus-master/morpheus/core/base_model.py",
"type": "Python"
} | # MIT License
# Copyright 2018 Ryan Hausen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publis... | morpheus-projectREPO_NAMEmorpheusPATH_START.@morpheus_extracted@morpheus-master@morpheus@core@base_model.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "eblur/dust",
"repo_path": "dust_extracted/dust-master/docs/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# eblur/dust documentation build configuration file, created by
# sphinx-quickstart on Tue Mar 1 14:08:53 2016.
#
# 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.
#
... | eblurREPO_NAMEdustPATH_START.@dust_extracted@dust-master@docs@conf.py@.PATH_END.py |
{
"filename": "_opacitysrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/splom/marker/_opacitysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="opacitysrc", parent_name="splom.marker", **kwargs):
super(OpacitysrcValidator, 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@splom@marker@_opacitysrc.py@.PATH_END.py |
{
"filename": "_textcase.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_textcase.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="textcase", parent_name="scattergl.hoverlabel.font", **kwargs
):
super(TextcaseValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergl@hoverlabel@font@_textcase.py@.PATH_END.py |
{
"filename": "debiased_wrapper.py",
"repo_name": "oliverphilcox/HADES",
"repo_path": "HADES_extracted/HADES-master/hades/debiased_wrapper.py",
"type": "Python"
} | from flipper import *
import numpy as np
from hades.params import BICEP
a=BICEP()
if __name__=='__main__':
""" This is the iterator for batch processing the map creation through HTCondor. Each map is done separately, and argument is map_id."""
import time
start_time=time.time()
import sys
import pickle
sys.path.... | oliverphilcoxREPO_NAMEHADESPATH_START.@HADES_extracted@HADES-master@hades@debiased_wrapper.py@.PATH_END.py |
{
"filename": "holly.py",
"repo_name": "1313e/CMasher",
"repo_path": "CMasher_extracted/CMasher-master/src/cmasher/colormaps/holly/holly.py",
"type": "Python"
} | import matplotlib as mpl
from matplotlib.colors import ListedColormap
# All declaration
__all__ = ["cmap"]
# Author declaration
__author__ = "Ellert van der Velden (@1313e)"
# Package declaration
__package__ = "cmasher"
# %% GLOBALS AND DEFINITIONS
# Type of this colormap
cm_type = "diverging"
# RGB-values of thi... | 1313eREPO_NAMECMasherPATH_START.@CMasher_extracted@CMasher-master@src@cmasher@colormaps@holly@holly.py@.PATH_END.py |
{
"filename": "_weight.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/_weight.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="weight", parent_name="layout.xaxis.tickfont", **kwargs
):
super(WeightValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@xaxis@tickfont@_weight.py@.PATH_END.py |
{
"filename": "f77.py",
"repo_name": "duvall3/rat-pac",
"repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/f77.py",
"type": "Python"
} | """engine.SCons.Tool.f77
Tool-specific initialization for the generic Posix f77 Fortran compiler.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2... | duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@f77.py@.PATH_END.py |
{
"filename": "relqso_spec.py",
"repo_name": "scotthgn/relagn",
"repo_path": "relagn_extracted/relagn-main/tests/relqso_spec.py",
"type": "Python"
} | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 6 15:55:23 2022
@author: Scott Hagen
"""
import numpy as np
import matplotlib.pyplot as plt
import os
import sys
mdir = os.path.abspath(__file__)
mdir = mdir.replace('/tests/relagn_spec.py', '/src/python_version')
sys.path.append(mdir)
from rela... | scotthgnREPO_NAMErelagnPATH_START.@relagn_extracted@relagn-main@tests@relqso_spec.py@.PATH_END.py |
{
"filename": "test_exact.py",
"repo_name": "rhayes777/PyAutoFit",
"repo_path": "PyAutoFit_extracted/PyAutoFit-main/test_autofit/graphical/regression/test_exact.py",
"type": "Python"
} |
from typing import Tuple
import numpy as np
from scipy.stats import norm
from autofit import graphical as graph
from autofit.messages import NormalMessage
phi = norm.pdf
probit = Phi = norm.cdf
logPhi = norm.logcdf
inv_probit = norm.ppf
np.random.seed(1)
prior_std = 10.0
error_std = 1.0
n_obs = 100
coefs = [... | rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@test_autofit@graphical@regression@test_exact.py@.PATH_END.py |
{
"filename": "leastsq.py",
"repo_name": "tvwenger/kinematic_scaleheight",
"repo_path": "kinematic_scaleheight_extracted/kinematic_scaleheight-main/kinematic_scaleheight/leastsq.py",
"type": "Python"
} | """
leastsq.py
Use a least-squares method to estimate the vertical distribution of a population
of clouds in the Galactic disk.
Copyright(C) 2023 by
Trey V. Wenger; tvwenger@gmail.com
GNU General Public License v3 (GNU GPLv3)
This program is free software: you can redistribute it and/or modify
it under the terms of ... | tvwengerREPO_NAMEkinematic_scaleheightPATH_START.@kinematic_scaleheight_extracted@kinematic_scaleheight-main@kinematic_scaleheight@leastsq.py@.PATH_END.py |
{
"filename": "grid_names.py",
"repo_name": "dmvandamt/beyonce",
"repo_path": "beyonce_extracted/beyonce-main/beyonce/shallot/grid_names.py",
"type": "Python"
} | """This module contains the Name enum for grid disk properties"""
from enum import Enum, auto
class Name(Enum):
"""All the available property names for disk properties."""
DISK_RADIUS = auto()
INCLINATION = auto()
TILT = auto()
FX_MAP = auto()
FY_MAP = auto()
DIAGNOSTIC_MAP = auto()
... | dmvandamtREPO_NAMEbeyoncePATH_START.@beyonce_extracted@beyonce-main@beyonce@shallot@grid_names.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scatterpolargl/hoverlabel/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._font import Font
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@scatterpolargl@hoverlabel@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scattergl/unselected/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._marker import Marker
from ._textfont import Textfont
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._marker.Marker", ".... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@scattergl@unselected@__init__.py@.PATH_END.py |
{
"filename": "model.py",
"repo_name": "pytorch/vision",
"repo_path": "vision_extracted/vision-main/references/similarity/model.py",
"type": "Python"
} | import torch.nn as nn
import torchvision.models as models
class EmbeddingNet(nn.Module):
def __init__(self, backbone=None):
super().__init__()
if backbone is None:
backbone = models.resnet50(num_classes=128)
self.backbone = backbone
def forward(self, x):
x = self.... | pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@references@similarity@model.py@.PATH_END.py |
{
"filename": "galaxy.py",
"repo_name": "toshiyan/cmblensplus",
"repo_path": "cmblensplus_extracted/cmblensplus-master/wrap/basic/galaxy.py",
"type": "Python"
} | import libbasic
import numpy
def dndz_sf(z,a,b,zm=0,z0=0,zn=None):
"""
A model of galaxy z distribution
Args:
:z[*zn*] (*double*): redshifts at which dNdz is returned
:a, b (*double*): shape parameters of Schechter-like galaxy distribution
Args(optional):
:zm (*double*): mean redshift, default to ... | toshiyanREPO_NAMEcmblensplusPATH_START.@cmblensplus_extracted@cmblensplus-master@wrap@basic@galaxy.py@.PATH_END.py |
{
"filename": "test_observation.py",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/crossbar/router/test/test_observation.py",
"type": "Python"
} | #####################################################################################
#
# Copyright (c) typedef int GmbH
# SPDX-License-Identifier: EUPL-1.2
#
#####################################################################################
import unittest
from autobahn.wamp.message import Subscribe
from cross... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@router@test@test_observation.py@.PATH_END.py |
{
"filename": "plot_distance_and_matrix_profile.py",
"repo_name": "tslearn-team/tslearn",
"repo_path": "tslearn_extracted/tslearn-main/docs/examples/misc/plot_distance_and_matrix_profile.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
Distance and Matrix Profiles
============================
This example illustrates how the matrix profile is calculated. For each
segment of a timeseries with a specified length, the distances between
each subsequence and that segment are calculated. The smallest distance is
returned, except... | tslearn-teamREPO_NAMEtslearnPATH_START.@tslearn_extracted@tslearn-main@docs@examples@misc@plot_distance_and_matrix_profile.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnelarea/title/_font.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="font", parent_name="funnelarea.title", **kwargs):
super(FontValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnelarea@title@_font.py@.PATH_END.py |
{
"filename": "test_utils.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/python-package/ut/small/test_utils.py",
"type": "Python"
} | from catboost.utils import calculate_quantization_grid
def test_quantization_calculator():
assert calculate_quantization_grid([1, 2], 2) == [1.5]
assert calculate_quantization_grid([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2], 1, 'Median') == []
assert calculate_quantization_grid([1, 1, 1, 1, 1, 1, 1, 1, 1, 1,... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@python-package@ut@small@test_utils.py@.PATH_END.py |
{
"filename": "_tickvalssrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/aaxis/_tickvalssrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="tickvalssrc", parent_name="layout.ternary.aaxis", **kwargs
):
super(TickvalssrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@aaxis@_tickvalssrc.py@.PATH_END.py |
{
"filename": "tests.py",
"repo_name": "spedas/pyspedas",
"repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/fast/tests/tests.py",
"type": "Python"
} | import os
import unittest
from pytplot import data_exists, del_data
import pyspedas
class Fast_Tests(unittest.TestCase):
def test_downloadonly(self):
files = pyspedas.projects.fast.acf(
trange=["1999-09-22", "1999-09-23"],
time_clip=True,
level="k0",
downloa... | spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@fast@tests@tests.py@.PATH_END.py |
{
"filename": "abs.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/testing/op_tests/abs.py",
"type": "Python"
} | # Copyright 2019 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@lite@testing@op_tests@abs.py@.PATH_END.py |
{
"filename": "test_dump.py",
"repo_name": "transientskp/tkp",
"repo_path": "tkp_extracted/tkp-master/tests/test_database/test_dump.py",
"type": "Python"
} | import os
import unittest
from tempfile import NamedTemporaryFile
from tkp.config import get_database_config
from tkp.db.dump import dump_db, dump_pg
from tkp.testutil.decorators import requires_database
class TestDump(unittest.TestCase):
@requires_database()
@unittest.skipUnless(get_database_config()['engine'... | transientskpREPO_NAMEtkpPATH_START.@tkp_extracted@tkp-master@tests@test_database@test_dump.py@.PATH_END.py |
{
"filename": "algol.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/styles/algol.py",
"type": "Python"
} | """
pygments.styles.algol
~~~~~~~~~~~~~~~~~~~~~
Algol publication style.
This style renders source code for publication of algorithms in
scientific papers and academic texts, where its format is frequently used.
It is based on the style of the revised Algol-60 language report[1].
o No c... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@styles@algol.py@.PATH_END.py |
{
"filename": "inputchecks.py",
"repo_name": "spacetelescope/hstaxe",
"repo_path": "hstaxe_extracted/hstaxe-main/hstaxe/axesrc/inputchecks.py",
"type": "Python"
} | """
See LICENSE.txt
"""
import os
import math
import logging
from astropy.io import fits
from astropy.table import Table
from astropy.io.registry import IORegistryError
from . import axeinputs
from . import configfile
# from . import axeiol
from hstaxe.axeerror import aXeError, aXeSIMError
from hstaxe import config a... | spacetelescopeREPO_NAMEhstaxePATH_START.@hstaxe_extracted@hstaxe-main@hstaxe@axesrc@inputchecks.py@.PATH_END.py |
{
"filename": "imaplib.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/imaplib.py",
"type": "Python"
} | """IMAP4 client.
Based on RFC 2060.
Public class: IMAP4
Public variable: Debug
Public functions: Internaldate2tuple
Int2AP
ParseFlags
Time2Internaldate
"""
# Author: Piers Lauder <piers@cs.su.oz.au> December 1997.
#
# Auth... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@imaplib.py@.PATH_END.py |
{
"filename": "_incremental_pca.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/decomposition/_incremental_pca.py",
"type": "Python"
} | """Incremental Principal Components Analysis."""
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause
from numbers import Integral
import numpy as np
from scipy import linalg, sparse
from sklearn.utils import metadata_routing
from ..base import _fit_context
from ..utils import gen_batches... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@decomposition@_incremental_pca.py@.PATH_END.py |
{
"filename": "_style.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/textfont/_style.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="style", parent_name="scatterpolargl.textfont", **kwargs
):
super(StyleValidator, self).__init__(
plotly_name=plotly_name,
parent_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@textfont@_style.py@.PATH_END.py |
{
"filename": "catalog.py",
"repo_name": "GalSim-developers/GalSim",
"repo_path": "GalSim_extracted/GalSim-main/galsim/catalog.py",
"type": "Python"
} | # Copyright (c) 2012-2023 by the GalSim developers team on GitHub
# https://github.com/GalSim-developers
#
# This file is part of GalSim: The modular galaxy image simulation toolkit.
# https://github.com/GalSim-developers/GalSim
#
# GalSim is free software: redistribution and use in source and binary forms,
# with or w... | GalSim-developersREPO_NAMEGalSimPATH_START.@GalSim_extracted@GalSim-main@galsim@catalog.py@.PATH_END.py |
{
"filename": "_coloraxis.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2dcontour/_coloraxis.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(
self, plotly_name="coloraxis", parent_name="histogram2dcontour", **kwargs
):
super(ColoraxisValidator, self).__init__(
plotly_name=plotly_name,
p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2dcontour@_coloraxis.py@.PATH_END.py |
{
"filename": "PostProcessing2.py",
"repo_name": "dsavransky/EXOSIMS",
"repo_path": "EXOSIMS_extracted/EXOSIMS-master/EXOSIMS/PostProcessing/PostProcessing2.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
from EXOSIMS.Prototypes.PostProcessing import PostProcessing
import numpy as np
class PostProcessing2(PostProcessing):
"""PostProcessing2 class
Updated PostProcessing det_occur function that utilized BackgroundSource
module GalaxiesFaintStars to calculate FA probability.
"""
... | dsavranskyREPO_NAMEEXOSIMSPATH_START.@EXOSIMS_extracted@EXOSIMS-master@EXOSIMS@PostProcessing@PostProcessing2.py@.PATH_END.py |
{
"filename": "test_conv_power.py",
"repo_name": "bccp/nbodykit",
"repo_path": "nbodykit_extracted/nbodykit-master/nbodykit/algorithms/tests/test_conv_power.py",
"type": "Python"
} | from runtests.mpi import MPITest
from nbodykit.lab import *
from nbodykit import setup_logging
from scipy.interpolate import InterpolatedUnivariateSpline
from numpy.testing import assert_allclose, assert_array_equal
import pytest
setup_logging("debug")
NDATA = 1000
NBAR = 1e-4
def make_sources(cosmo, comm):
da... | bccpREPO_NAMEnbodykitPATH_START.@nbodykit_extracted@nbodykit-master@nbodykit@algorithms@tests@test_conv_power.py@.PATH_END.py |
{
"filename": "_templateitemname.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_templateitemname.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="templateitemname",
parent_name="scattercarpet.marker.colorbar.tickformatstop",
**kwargs
):
super(TemplateitemnameValidator... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattercarpet@marker@colorbar@tickformatstop@_templateitemname.py@.PATH_END.py |
{
"filename": "test_jax.py",
"repo_name": "asmuzsoy/bayesn-VI-paper",
"repo_path": "bayesn-VI-paper_extracted/bayesn-VI-paper-main/test_jax.py",
"type": "Python"
} | import jax
print(len(jax.devices()))
| asmuzsoyREPO_NAMEbayesn-VI-paperPATH_START.@bayesn-VI-paper_extracted@bayesn-VI-paper-main@test_jax.py@.PATH_END.py |
{
"filename": "test_cosmo_bao.py",
"repo_name": "CobayaSampler/cobaya",
"repo_path": "cobaya_extracted/cobaya-master/tests/test_cosmo_bao.py",
"type": "Python"
} | from copy import deepcopy
from cobaya.component import get_component_class
from .test_cosmo_planck_2015 import params_lowTEB_highTTTEEE, derived_lowTEB_highTTTEEE
from .common_cosmo import body_of_test
# Tests both the bao.generic class, and class renaming for multiple instances
def test_generic_camb(packages_path,... | CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@tests@test_cosmo_bao.py@.PATH_END.py |
{
"filename": "slit_profile_2d_model.py",
"repo_name": "igrins/plp",
"repo_path": "plp_extracted/plp-master/igrins/libs/slit_profile_2d_model.py",
"type": "Python"
} | import numpy as np
from astropy.modeling import models # , fitting
def get_varying_conv_gaussian_model(g_list):
# VaryingConvolutionGaussian
def _f(x, y,
a_0=1,
a_1=0, a_2=0, a_3=0,
b_0=0.,
b_1=0, b_2=0, b_3=0, # b_4=0, b_5=0,
# c_0=0.25,
c_... | igrinsREPO_NAMEplpPATH_START.@plp_extracted@plp-master@igrins@libs@slit_profile_2d_model.py@.PATH_END.py |
{
"filename": "test_imports.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/core/tests/unit_tests/runnables/test_imports.py",
"type": "Python"
} | from langchain_core.runnables import __all__
EXPECTED_ALL = [
"chain",
"AddableDict",
"ConfigurableField",
"ConfigurableFieldSingleOption",
"ConfigurableFieldMultiOption",
"ConfigurableFieldSpec",
"ensure_config",
"run_in_executor",
"patch_config",
"RouterInput",
"RouterRunn... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@core@tests@unit_tests@runnables@test_imports.py@.PATH_END.py |
{
"filename": "plot_spectra.py",
"repo_name": "exoclime/VULCAN",
"repo_path": "VULCAN_extracted/VULCAN-master/plot_py/plot_spectra.py",
"type": "Python"
} | import sys
sys.path.insert(0, '../') # including the upper level of directory for the path of modules
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.legend as lg
import vulcan_cfg
try: from PIL import Image
except ImportError:
try: import Image
except: vulcan_cfg.use_PIL = False
import ... | exoclimeREPO_NAMEVULCANPATH_START.@VULCAN_extracted@VULCAN-master@plot_py@plot_spectra.py@.PATH_END.py |
{
"filename": "Census income classification with XGBoost.ipynb",
"repo_name": "shaoshanglqy/shap-shapley",
"repo_path": "shap-shapley_extracted/shap-shapley-master/notebooks/tree_explainer/Census income classification with XGBoost.ipynb",
"type": "Jupyter Notebook"
} | # Census income classification with XGBoost
This notebook demonstrates how to use XGBoost to predict the probability of an individual making over $50K a year in annual income. It uses the standard UCI Adult income dataset. To download a copy of this notebook visit [github](https://github.com/slundberg/shap/tree/master... | shaoshanglqyREPO_NAMEshap-shapleyPATH_START.@shap-shapley_extracted@shap-shapley-master@notebooks@tree_explainer@Census income classification with XGBoost.ipynb@.PATH_END.py |
{
"filename": "run.py",
"repo_name": "ratt-ru/Stimela-classic",
"repo_path": "Stimela-classic_extracted/Stimela-classic-master/stimela/cargo/cab/casa_exportfits/src/run.py",
"type": "Python"
} | # -*- coding: future_fstrings -*-
import Crasa.Crasa as crasa
from scabha import config, parameters_dict, prun
print(f"Running CASA task '{config.binary}'")
task = crasa.CasaTask(config.binary, **parameters_dict)
task.run()
| ratt-ruREPO_NAMEStimela-classicPATH_START.@Stimela-classic_extracted@Stimela-classic-master@stimela@cargo@cab@casa_exportfits@src@run.py@.PATH_END.py |
{
"filename": "ndimage.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/jax/scipy/ndimage.py",
"type": "Python"
} | # Copyright 2020 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@scipy@ndimage.py@.PATH_END.py |
{
"filename": "insconfig.py",
"repo_name": "jkrogager/PyNOT",
"repo_path": "PyNOT_extracted/PyNOT-master/pynot/insconfig.py",
"type": "Python"
} | """
Script to install a new instrument configuration
Files needed (example given for alfosc):
instrument configuration module : alfosc.py
classification rule file : data/alfosc.rules
extinction data file : calib/lapalma.ext
filter definition table : calib/alfosc_filters.dat
"""
impor... | jkrogagerREPO_NAMEPyNOTPATH_START.@PyNOT_extracted@PyNOT-master@pynot@insconfig.py@.PATH_END.py |
{
"filename": "radcal.py",
"repo_name": "OfAaron3/irispreppy",
"repo_path": "irispreppy_extracted/irispreppy-main/irispreppy/radcal/radcal.py",
"type": "Python"
} | import datetime as dt
from copy import deepcopy as dc
from astropy.io import fits
import numpy as np
from os import path
import scipy.stats as scist
from weno4 import weno4
from . import iris_get_response as igr
#################################################################
def radcal(ras, save=False, quiet=True... | OfAaron3REPO_NAMEirispreppyPATH_START.@irispreppy_extracted@irispreppy-main@irispreppy@radcal@radcal.py@.PATH_END.py |
{
"filename": "_tickvalssrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickvalssrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="tickvalssrc",
parent_name="sunburst.marker.colorbar",
**kwargs,
):
super(TickvalssrcValidator, self).__init__(
plotly_... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sunburst@marker@colorbar@_tickvalssrc.py@.PATH_END.py |
{
"filename": "_metasrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/_metasrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="metasrc", parent_name="bar", **kwargs):
super(MetasrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@_metasrc.py@.PATH_END.py |
{
"filename": "test_cut_cross_entropy.py",
"repo_name": "OpenAccess-AI-Collective/axolotl",
"repo_path": "axolotl_extracted/axolotl-main/tests/e2e/integrations/test_cut_cross_entropy.py",
"type": "Python"
} | """
Simple end-to-end test for Cut Cross Entropy integration
"""
from pathlib import Path
import pytest
from axolotl.cli import load_datasets
from axolotl.common.cli import TrainerCliArgs
from axolotl.train import train
from axolotl.utils import get_pytorch_version
from axolotl.utils.config import normalize_config, ... | OpenAccess-AI-CollectiveREPO_NAMEaxolotlPATH_START.@axolotl_extracted@axolotl-main@tests@e2e@integrations@test_cut_cross_entropy.py@.PATH_END.py |
{
"filename": "mcfostRun.py",
"repo_name": "seawander/DebrisDiskFM",
"repo_path": "DebrisDiskFM_extracted/DebrisDiskFM-master/debrisdiskfm/mcfostRun.py",
"type": "Python"
} | import copy # duplicate the parameter files
import subprocess # run the parameter files
import os # change directory
import numpy as np
import shutil
from . import mcfostParameterTemplate # create a tempalte parameter file
from glob import glob
... | seawanderREPO_NAMEDebrisDiskFMPATH_START.@DebrisDiskFM_extracted@DebrisDiskFM-master@debrisdiskfm@mcfostRun.py@.PATH_END.py |
{
"filename": "make_fit_coeffs.py",
"repo_name": "gwastro/pycbc",
"repo_path": "pycbc_extracted/pycbc-master/examples/live/make_fit_coeffs.py",
"type": "Python"
} | """
Makes files which can be used as the fit_coeffs statistic.
These are not of any scientific use, but the code will accept them
and run properly
"""
import numpy as np
from pycbc.io.hdf import HFile
# Get number of templates from bank file
with HFile('template_bank.hdf', 'r') as bankf:
n_templates = bankf['mass... | gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@examples@live@make_fit_coeffs.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "dfm/exoplanet",
"repo_path": "exoplanet_extracted/exoplanet-main/src/exoplanet/distributions/__init__.py",
"type": "Python"
} | __all__ = [
"ImpactParameter",
"QuadLimbDark",
"angle",
"unit_disk",
"impact_parameter",
"quad_limb_dark",
"eccentricity",
]
from exoplanet.distributions import eccentricity
from exoplanet.distributions.distributions import (
angle,
impact_parameter,
quad_limb_dark,
unit_dis... | dfmREPO_NAMEexoplanetPATH_START.@exoplanet_extracted@exoplanet-main@src@exoplanet@distributions@__init__.py@.PATH_END.py |
{
"filename": "structured_grid.py",
"repo_name": "enthought/mayavi",
"repo_path": "mayavi_extracted/mayavi-master/docs/source/mayavi/auto/structured_grid.py",
"type": "Python"
} | """An example of how to generate a structured grid dataset using
numpy arrays. Also shown is a way to visualize this data with
the mayavi2 application.
The script can be run like so::
$ mayavi2 -x structured_grid.py
Alternatively, it can be run as::
$ python structured_grid.py
"""
# Authors: Eric Jones <eri... | enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@docs@source@mayavi@auto@structured_grid.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/error_x/__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 ._visible import VisibleValidator
from ._valueminus import ValueminusValidator
from ._value import ValueValidator
from ._type import TypeValidator
from ._tracerefmi... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter3d@error_x@__init__.py@.PATH_END.py |
{
"filename": "template.py",
"repo_name": "f4hzg/p2Gravity",
"repo_path": "p2Gravity_extracted/p2Gravity-main/p2Gravity/tpl/template.py",
"type": "Python"
} | #coding: utf8
import p2api
import numpy as np
class Template(dict):
def __init__(self, *args, **kwargs):
super(Template, self).__init__(*args, **kwargs)
self.ob_id = None
self.version = -1
self.template_id = None
self.template_Name = None
self.template_type =... | f4hzgREPO_NAMEp2GravityPATH_START.@p2Gravity_extracted@p2Gravity-main@p2Gravity@tpl@template.py@.PATH_END.py |
{
"filename": "expression.py",
"repo_name": "macrocosme/shwirl",
"repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/visuals/shaders/expression.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from ...ext.six import string_types
from .shader_object import ShaderObject
class Expression(ShaderObject):
""" Base class for expressions (ShaderObjects that do not have... | macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@visuals@shaders@expression.py@.PATH_END.py |
{
"filename": "nlincoeffs.py",
"repo_name": "spacetelescope/hstaxe",
"repo_path": "hstaxe_extracted/hstaxe-main/hstaxe/axesrc/nlincoeffs.py",
"type": "Python"
} | """
See LICENSE.txt
"""
import os
import numpy as np
from astropy.io import fits
from stwcs.wcsutil import HSTWCS
from hstaxe.axeerror import aXeError
class NonLinCoeffs:
def __init__(self, image, ext_info):
"""Initializes the class"""
# dummy example
# self.default_coeffs_data ="""# Dum... | spacetelescopeREPO_NAMEhstaxePATH_START.@hstaxe_extracted@hstaxe-main@hstaxe@axesrc@nlincoeffs.py@.PATH_END.py |
{
"filename": "test_carmenes.py",
"repo_name": "njcuk9999/lbl",
"repo_path": "lbl_extracted/lbl-main/lbl/doc/tests/test_carmenes.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Test of the LBL for CARMENES (TOI-1452)
Created on 2021-10-18
@author: artigau, cook
"""
from lbl import lbl_reset
from lbl import lbl_compil
from lbl import lbl_compute
from lbl import lbl_mask
from lbl import lbl_template
from lbl import lbl_telluclean
# ==========... | njcuk9999REPO_NAMElblPATH_START.@lbl_extracted@lbl-main@lbl@doc@tests@test_carmenes.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/densitymapbox/hoverlabel/_font.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "densitymapbox.hoverlabel"
_path_str = "densitymapbox.hoverlabel.font"
_valid_props = {
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@densitymapbox@hoverlabel@_font.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/projection/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._z import ZValidator
from ._y import YValidator
from ._x import XValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@projection@__init__.py@.PATH_END.py |
{
"filename": "widgets.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py3/matplotlib/widgets.py",
"type": "Python"
} | """
GUI neutral widgets
===================
Widgets that are designed to work for any of the GUI backends.
All of these widgets require you to predefine an `~.axes.Axes`
instance and pass that as the first parameter. Matplotlib doesn't try to
be too smart with respect to layout -- you will have to figure out how
wide... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py3@matplotlib@widgets.py@.PATH_END.py |
{
"filename": "defaults.py",
"repo_name": "HERA-Team/hera_sim",
"repo_path": "hera_sim_extracted/hera_sim-main/hera_sim/defaults.py",
"type": "Python"
} | """Module for interfacing with package-wide default parameters."""
import functools
import inspect
import warnings
import yaml
from os import path
from .config import CONFIG_PATH
SEASON_CONFIGS = {
"h1c": path.join(CONFIG_PATH, "H1C.yaml"),
"h2c": path.join(CONFIG_PATH, "H2C.yaml"),
"debug": path.join(CO... | HERA-TeamREPO_NAMEhera_simPATH_START.@hera_sim_extracted@hera_sim-main@hera_sim@defaults.py@.PATH_END.py |
{
"filename": "_mapping.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/formatters/_mapping.py",
"type": "Python"
} | # Automatically generated by scripts/gen_mapfiles.py.
# DO NOT EDIT BY HAND; run `tox -e mapfiles` instead.
FORMATTERS = {
'BBCodeFormatter': ('pygments.formatters.bbcode', 'BBCode', ('bbcode', 'bb'), (), 'Format tokens with BBcodes. These formatting codes are used by many bulletin boards, so you can highlight you... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@formatters@_mapping.py@.PATH_END.py |
{
"filename": "_customdatasrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/_customdatasrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="customdatasrc", parent_name="scattergeo", **kwargs):
super(CustomdatasrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=paren... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@_customdatasrc.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergeo/marker/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._symbolsrc import SymbolsrcValidator
from ._symbol import SymbolValidator
from ._sizesrc import SizesrcValidator
from ._sizeref import SizerefValidator
from ._sizemode import SizemodeValidator
from ._sizemin import SizeminValidator
from ._size ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergeo@marker@__init__.py@.PATH_END.py |
{
"filename": "_title.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/cone/colorbar/_title.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Title(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "cone.colorbar"
_path_str = "cone.colorbar.title"
_valid_props = {"font", "side", "text"}
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@cone@colorbar@_title.py@.PATH_END.py |
{
"filename": "privacy.md",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/docs/en/help/privacy.md",
"type": "Markdown"
} | ---
description: Discover how Ultralytics collects and uses anonymized data to enhance the YOLO Python package while prioritizing user privacy and control.
keywords: Ultralytics, data collection, YOLO, Python package, Google Analytics, Sentry, privacy, anonymized data, user control, crash reporting
---
# Data Collecti... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@help@privacy.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "aeictf/EPiCA",
"repo_path": "EPiCA_extracted/EPiCA-main/EPiCA/__init__.py",
"type": "Python"
} | aeictfREPO_NAMEEPiCAPATH_START.@EPiCA_extracted@EPiCA-main@EPiCA@__init__.py@.PATH_END.py | |
{
"filename": "setup.py",
"repo_name": "AdamCobb/hamiltorch",
"repo_path": "hamiltorch_extracted/hamiltorch-master/setup.py",
"type": "Python"
} | import os
import sys
from setuptools import setup, find_packages
PACKAGE_NAME = 'hamiltorch'
MINIMUM_PYTHON_VERSION = 3, 5
def check_python_version():
"""Exit when the Python version is too low."""
if sys.version_info < MINIMUM_PYTHON_VERSION:
sys.exit("Python {}.{}+ is required.".format(*MINIMUM_PYTH... | AdamCobbREPO_NAMEhamiltorchPATH_START.@hamiltorch_extracted@hamiltorch-master@setup.py@.PATH_END.py |
{
"filename": "unicode.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/fonttools/fontTools/merge/unicode.py",
"type": "Python"
} | # Copyright 2021 Behdad Esfahbod. All Rights Reserved.
def is_Default_Ignorable(u):
# http://www.unicode.org/reports/tr44/#Default_Ignorable_Code_Point
#
# TODO Move me to unicodedata module and autogenerate.
#
# Unicode 14.0:
# $ grep '; Default_Ignorable_Code_Point ' DerivedCoreProperties.tx... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@fonttools@fontTools@merge@unicode.py@.PATH_END.py |
{
"filename": "0F - Hyper parameters during training.ipynb",
"repo_name": "undark-lab/swyft",
"repo_path": "swyft_extracted/swyft-master/notebooks/0F - Hyper parameters during training.ipynb",
"type": "Jupyter Notebook"
} | ## F - Training hyper parameters
Authors: Noemi Anau Montel, James Alvey, Christoph Weniger
Last update: 15 September 2023
**Purpose**: Making explicit all hyperparameters that govern the training and result.
**Key take-away messages**: All hyper-parameters relevant for training are easily accessible for the user. ... | undark-labREPO_NAMEswyftPATH_START.@swyft_extracted@swyft-master@notebooks@0F - Hyper parameters during training.ipynb@.PATH_END.py |
{
"filename": "sampler.py",
"repo_name": "nanograv/enterprise_extensions",
"repo_path": "enterprise_extensions_extracted/enterprise_extensions-master/enterprise_extensions/sampler.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
import glob
import os
import pickle
import platform
import healpy as hp
import numpy as np
from PTMCMCSampler import __version__ as __vPTMCMC__
from PTMCMCSampler.PTMCMCSampler import PTSampler as ptmcmc
from enterprise_extensions import __version__
from enterprise_extensions.empirical_distr ... | nanogravREPO_NAMEenterprise_extensionsPATH_START.@enterprise_extensions_extracted@enterprise_extensions-master@enterprise_extensions@sampler.py@.PATH_END.py |
{
"filename": "_linepositionsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sankey/node/hoverlabel/font/_linepositionsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="linepositionsrc",
parent_name="sankey.node.hoverlabel.font",
**kwargs,
):
super(LinepositionsrcValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sankey@node@hoverlabel@font@_linepositionsrc.py@.PATH_END.py |
{
"filename": "_ticklabelposition.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticklabelposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="ticklabelposition",
parent_name="layout.coloraxis.colorbar",
**kwargs,
):
super(TicklabelpositionValidator, self).__i... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@coloraxis@colorbar@_ticklabelposition.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "ashleychontos/pySYD",
"repo_path": "pySYD_extracted/pySYD-master/src/pysyd/tests/__init__.py",
"type": "Python"
} | ashleychontosREPO_NAMEpySYDPATH_START.@pySYD_extracted@pySYD-master@src@pysyd@tests@__init__.py@.PATH_END.py | |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/scatterpolar/unselected/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._marker import Marker
from ._textfont import Textfont
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._marker.Marker", "._textfont.Textfont"]
)
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@scatterpolar@unselected@__init__.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.