metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "test_pipeline.py",
"repo_name": "igrins/plp",
"repo_path": "plp_extracted/plp-master/tests/test_pipeline.py",
"type": "Python"
} | from igrins.pipeline import create_pipeline
from igrins.driver import Step
def test1():
def step1(obsset):
print(1)
def step2(obsset, lacosmic_thresh):
print(2, lacosmic_thresh)
steps = [Step("step 1", step1, args0=True),
Step("step 2", step2,
lacosmic_thre... | igrinsREPO_NAMEplpPATH_START.@plp_extracted@plp-master@tests@test_pipeline.py@.PATH_END.py |
{
"filename": "generate_examples.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/testing/generate_examples.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@generate_examples.py@.PATH_END.py |
{
"filename": "_familysrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/hoverlabel/font/_familysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="familysrc",
parent_name="scattersmith.hoverlabel.font",
**kwargs,
):
super(FamilysrcValidator, self).__init__(
plotly_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@hoverlabel@font@_familysrc.py@.PATH_END.py |
{
"filename": "partition_ranking.py",
"repo_name": "MIT-STARLab/deconfuser",
"repo_path": "deconfuser_extracted/deconfuser-main/deconfuser/partition_ranking.py",
"type": "Python"
} | import numpy as np
def get_ranked_partitions(possible_groups):
"""
The partitions of groups are ranked such that the top partition has the largest first group (a trajectory corresponding to most observations), the largest second group from the remaining observations, etc.
partitions that are "included" in ... | MIT-STARLabREPO_NAMEdeconfuserPATH_START.@deconfuser_extracted@deconfuser-main@deconfuser@partition_ranking.py@.PATH_END.py |
{
"filename": "ipunittest.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py3/IPython/testing/ipunittest.py",
"type": "Python"
} | """Experimental code for cleaner support of IPython syntax with unittest.
In IPython up until 0.10, we've used very hacked up nose machinery for running
tests with IPython special syntax, and this has proved to be extremely slow.
This module provides decorators to try a different approach, stemming from a
conversation... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py3@IPython@testing@ipunittest.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "POSYDON-code/POSYDON",
"repo_path": "POSYDON_extracted/POSYDON-main/posydon/interpolation/README.md",
"type": "Markdown"
} | POSYDON-codeREPO_NAMEPOSYDONPATH_START.@POSYDON_extracted@POSYDON-main@posydon@interpolation@README.md@.PATH_END.py | |
{
"filename": "bpl_distribution.py",
"repo_name": "grburgess/popsynth",
"repo_path": "popsynth_extracted/popsynth-master/popsynth/distributions/bpl_distribution.py",
"type": "Python"
} | import numpy as np
import scipy.integrate as integrate
import scipy.stats as stats
from popsynth.distribution import DistributionParameter, LuminosityDistribution
class BPLDistribution(LuminosityDistribution):
_distribution_name = "BPLDistribution"
Lmin = DistributionParameter(vmin=0)
alpha = Distributi... | grburgessREPO_NAMEpopsynthPATH_START.@popsynth_extracted@popsynth-master@popsynth@distributions@bpl_distribution.py@.PATH_END.py |
{
"filename": "_variant.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_variant.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="variant", parent_name="funnel.outsidetextfont", **kwargs
):
super(VariantValidator, self).__init__(
plotly_name=plotly_name,
pa... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@outsidetextfont@_variant.py@.PATH_END.py |
{
"filename": "gaussian.py",
"repo_name": "rhayes777/PyAutoFit",
"repo_path": "PyAutoFit_extracted/PyAutoFit-main/autofit/mapper/prior/gaussian.py",
"type": "Python"
} | from typing import Optional
from autofit.jax_wrapper import register_pytree_node_class
from autofit.messages.normal import NormalMessage
from .abstract import Prior
@register_pytree_node_class
class GaussianPrior(Prior):
__identifier_fields__ = ("lower_limit", "upper_limit", "mean", "sigma")
__database_args... | rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@autofit@mapper@prior@gaussian.py@.PATH_END.py |
{
"filename": "SolidMaterial_PYB11.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/PYB11/SolidMaterial/SolidMaterial_PYB11.py",
"type": "Python"
} | """
Spheral SolidMaterial module.
Provides equations of state and material models for solids in Spheral.
"""
from PYB11Generator import *
from SpheralCommon import *
from spheralDimensions import *
dims = spheralDimensions()
from SolidEquationOfState import *
from LinearPolynomialEquationOfState import *
from Grune... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@SolidMaterial@SolidMaterial_PYB11.py@.PATH_END.py |
{
"filename": "_showexponent.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_showexponent.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="showexponent",
parent_name="scattermapbox.marker.colorbar",
**kwargs,
):
super(ShowexponentValidator, self).__init__(
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermapbox@marker@colorbar@_showexponent.py@.PATH_END.py |
{
"filename": "script_wandb.py",
"repo_name": "ThomasHelfer/multimodal-supernovae",
"repo_path": "multimodal-supernovae_extracted/multimodal-supernovae-main/script_wandb.py",
"type": "Python"
} | import os, sys
import wandb
from ruamel.yaml import YAML
from pytorch_lightning.loggers import WandbLogger
from pytorch_lightning.callbacks import ModelCheckpoint
from pytorch_lightning.callbacks.early_stopping import EarlyStopping
import numpy as np
import torch
import pytorch_lightning as pl
from torch.utils.data ... | ThomasHelferREPO_NAMEmultimodal-supernovaePATH_START.@multimodal-supernovae_extracted@multimodal-supernovae-main@script_wandb.py@.PATH_END.py |
{
"filename": "build.ipynb",
"repo_name": "seap-udea/iWander",
"repo_path": "iWander_extracted/iWander-master/db/build.ipynb",
"type": "Jupyter Notebook"
} | # AstroRV Catalog Ensambling
```python
# =============================================================================
# Libraries
# =============================================================================
import pandas as pd
import numpy as np
import urllib.request
import collections
import os,re
import time
pd... | seap-udeaREPO_NAMEiWanderPATH_START.@iWander_extracted@iWander-master@db@build.ipynb@.PATH_END.py |
{
"filename": "lg4_envs.py",
"repo_name": "mit-ll/spacegym-kspdg",
"repo_path": "spacegym-kspdg_extracted/spacegym-kspdg-main/src/kspdg/private_src/python3_9/Darwin_x86_64/kspdg_envs/lbg1/lg4_envs.py",
"type": "Python"
} | # Pyarmor 8.5.11 (trial), 000000, non-profits, 2024-12-09T10:19:40.946963
from kspdg.private_src.python3_9.Darwin_x86_64.pyarmor_runtime_000000 import __pyarmor__
__pyarmor__(__name__, __file__, b'PY000000\x00\x03\t\x00a\r\r\n\x80\x00\x01\x00\x08\x00\x00\x00\x04\x00\x00\x00@\x00\x00\x00\x9a%\x00\x00\x12\t\x04\x00R\xde\... | mit-llREPO_NAMEspacegym-kspdgPATH_START.@spacegym-kspdg_extracted@spacegym-kspdg-main@src@kspdg@private_src@python3_9@Darwin_x86_64@kspdg_envs@lbg1@lg4_envs.py@.PATH_END.py |
{
"filename": "linear.py",
"repo_name": "bccp/nbodykit",
"repo_path": "nbodykit_extracted/nbodykit-master/nbodykit/cosmology/power/linear.py",
"type": "Python"
} | import numpy
from . import transfers
from ..cosmology import Cosmology
class LinearPower(object):
"""
An object to compute the linear power spectrum and related quantities,
using a transfer function from the CLASS code or the analytic
Eisenstein & Hu approximation.
Parameters
----------
co... | bccpREPO_NAMEnbodykitPATH_START.@nbodykit_extracted@nbodykit-master@nbodykit@cosmology@power@linear.py@.PATH_END.py |
{
"filename": "docstring_example.py",
"repo_name": "dsavransky/EXOSIMS",
"repo_path": "EXOSIMS_extracted/EXOSIMS-master/documentation/docstring_example.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""Example Google style docstrings.
This module demonstrates documentation as specified by the `Google Python
Style Guide`_. Docstrings may extend over multiple lines. Sections are created
with a section header and a colon followed by a block of indented text.
Example:
Examples can be give... | dsavranskyREPO_NAMEEXOSIMSPATH_START.@EXOSIMS_extracted@EXOSIMS-master@documentation@docstring_example.py@.PATH_END.py |
{
"filename": "_fill.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermap/_fill.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="fill", parent_name="scattermap", **kwargs):
super(FillValidator, 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@scattermap@_fill.py@.PATH_END.py |
{
"filename": "ragged_bitcast_op_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/ragged/ragged_bitcast_op_test.py",
"type": "Python"
} | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@ops@ragged@ragged_bitcast_op_test.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/yaxis/title/_font.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="font", parent_name="layout.yaxis.title", **kwargs):
super(FontValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@yaxis@title@_font.py@.PATH_END.py |
{
"filename": "_uirevision.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmap/_uirevision.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="uirevision", parent_name="choroplethmap", **kwargs):
super(UirevisionValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmap@_uirevision.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "microsoft/vscode",
"repo_path": "vscode_extracted/vscode-main/extensions/json-language-features/server/README.md",
"type": "Markdown"
} | # VSCode JSON Language Server
[](https://npmjs.org/package/vscode-json-languageserver)
[](https://npmjs.org/package/vscode-json-languageserver)
[:
BWBaseFN = BWDir + '{0}/{1}/{0}bw-{1}-hp-{2:d}.fits'
assert(len(hpList) > 1)
AllBWFiles = Table.rea... | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@scripts@mock_tools@concat_bitweights.py@.PATH_END.py |
{
"filename": "config.py",
"repo_name": "spedas/pyspedas",
"repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/lanl/config.py",
"type": "Python"
} | import os
CONFIG = {
"local_data_dir": "lanl_data/",
"remote_data_dir": "https://spdf.gsfc.nasa.gov/pub/data/lanl/",
}
# override local data directory with environment variables
if os.environ.get("SPEDAS_DATA_DIR"):
CONFIG["local_data_dir"] = os.sep.join([os.environ["SPEDAS_DATA_DIR"], "lanl"])
if os.env... | spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@lanl@config.py@.PATH_END.py |
{
"filename": "_colorscale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/barpolar/marker/line/_colorscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator):
def __init__(
self, plotly_name="colorscale", parent_name="barpolar.marker.line", **kwargs
):
super(ColorscaleValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@barpolar@marker@line@_colorscale.py@.PATH_END.py |
{
"filename": "script.py",
"repo_name": "enthought/mayavi",
"repo_path": "mayavi_extracted/mayavi-master/mayavi/plugins/script.py",
"type": "Python"
} | """This represents the scripting API for MayaVi.
The Script class provides a scriptable view of the MayaVi Engine. It is
safe to instantiate as many Script instances as desired.
"""
# Author: Prabhu Ramachandran <prabhu_r@users.sf.net>
# Copyright (c) 2005-2020, Enthought, Inc.
# License: BSD Style.
# Enthought im... | enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@plugins@script.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "trevisanj/PFANT",
"repo_path": "PFANT_extracted/PFANT-master/data/sun-asplund-2009/README.md",
"type": "Markdown"
} | # Sun
Data files for the :sunny: Sun.
Abundances table taken from (Asplund, Grevesse, Sauval & Scott 2009):
http://arxiv.org/pdf/0909.0948.pdf
| trevisanjREPO_NAMEPFANTPATH_START.@PFANT_extracted@PFANT-master@data@sun-asplund-2009@README.md@.PATH_END.py |
{
"filename": "_x.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_x.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="x", parent_name="histogram.marker.colorbar", **kwargs
):
super(XValidator, 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@histogram@marker@colorbar@_x.py@.PATH_END.py |
{
"filename": "quickstart.py",
"repo_name": "samuelyeewl/specmatch-emp",
"repo_path": "specmatch-emp_extracted/specmatch-emp-master/docs/quickstart.py",
"type": "Python"
} | # code-start-imports
import pandas as pd
from pylab import *
import specmatchemp.library
import specmatchemp.plots as smplot
# code-stop-imports
rc('savefig',dpi=160)
# code-start-loadlibrary: load in the library around the Mgb triplet
lib = specmatchemp.library.read_hdf(wavlim=[5140,5200])
# code-stop-loadlibrary
... | samuelyeewlREPO_NAMEspecmatch-empPATH_START.@specmatch-emp_extracted@specmatch-emp-master@docs@quickstart.py@.PATH_END.py |
{
"filename": "_tickvalssrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/indicator/gauge/axis/_tickvalssrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="tickvalssrc", parent_name="indicator.gauge.axis", **kwargs
):
super(TickvalssrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@indicator@gauge@axis@_tickvalssrc.py@.PATH_END.py |
{
"filename": "igm_inoue2014.py",
"repo_name": "ACCarnall/bagpipes",
"repo_path": "bagpipes_extracted/bagpipes-master/bagpipes/models/making/igm_inoue2014.py",
"type": "Python"
} | from __future__ import print_function, division, absolute_import
import numpy as np
import os
from astropy.io import fits
""" This code is called once when Bagpipes is first installed in order
to generate the IGM absorption table which is subsequently used for
all IGM calculations. """
path = os.path.dirname(os.pat... | ACCarnallREPO_NAMEbagpipesPATH_START.@bagpipes_extracted@bagpipes-master@bagpipes@models@making@igm_inoue2014.py@.PATH_END.py |
{
"filename": "test_teff_retrieval.py",
"repo_name": "mwanakijiji/rrlfe",
"repo_path": "rrlfe_extracted/rrlfe-main/rrlfe/tests/test_teff_retrieval.py",
"type": "Python"
} | #!/usr/bin/env python
# coding: utf-8
# This makes plots showing the effective temperature retrievals based on synthetic spectra
# produced by R.W.
# Created from parent restacking_scraped_data.ipynb 2021 March 17 by E.S.
import pandas as pd
import os, sys
from astropy.io.fits import getdata
from configparser import... | mwanakijijiREPO_NAMErrlfePATH_START.@rrlfe_extracted@rrlfe-main@rrlfe@tests@test_teff_retrieval.py@.PATH_END.py |
{
"filename": "_textcasesrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnelarea/textfont/_textcasesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="textcasesrc", parent_name="funnelarea.textfont", **kwargs
):
super(TextcasesrcValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnelarea@textfont@_textcasesrc.py@.PATH_END.py |
{
"filename": "periodograms-verifying-the-location-of-a-signal.ipynb",
"repo_name": "lightkurve/lightkurve",
"repo_path": "lightkurve_extracted/lightkurve-main/docs/source/tutorials/3-science-examples/periodograms-verifying-the-location-of-a-signal.ipynb",
"type": "Jupyter Notebook"
} | # Verifying the location of a periodic signal in the pixel data
## Learning Goals
By the end of this tutorial, you will:
* Understand the causes of signal blending and aperture contamination in _Kepler_ and _K2_ data.
* Be able to use Lightkurve's [plot_pixels()](https://docs.lightkurve.org/reference/api/lightkurve.... | lightkurveREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@docs@source@tutorials@3-science-examples@periodograms-verifying-the-location-of-a-signal.ipynb@.PATH_END.py |
{
"filename": "qlGrid.py",
"repo_name": "petigura/terra",
"repo_path": "terra_extracted/terra-master/scripts/qlGrid.py",
"type": "Python"
} | #!/usr/bin/env python
"""
Split h5 file into individual files
"""
from argparse import ArgumentParser
from matplotlib.pylab import *
from matplotlib.gridspec import GridSpec
import h5py
import keptoy
prsr = ArgumentParser()
prsr.add_argument('inp',type=str, help='input file')
prsr.add_argument('out',type=str, help='ou... | petiguraREPO_NAMEterraPATH_START.@terra_extracted@terra-master@scripts@qlGrid.py@.PATH_END.py |
{
"filename": "test_printing.py",
"repo_name": "pymc-devs/pymc",
"repo_path": "pymc_extracted/pymc-main/tests/test_printing.py",
"type": "Python"
} | # Copyright 2024 The PyMC Developers
#
# 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 ag... | pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@tests@test_printing.py@.PATH_END.py |
{
"filename": "power_gal.py",
"repo_name": "nickhand/pyRSD",
"repo_path": "pyRSD_extracted/pyRSD-master/pyRSD/rsd/power/gal/power_gal.py",
"type": "Python"
} | import contextlib
from pyRSD import numpy as np
from pyRSD.rsd._cache import parameter, cached_property
from pyRSD.rsd import tools, BiasedSpectrum
from .fog_kernels import FOGKernel
from . import Pgal
class GalaxySpectrum(BiasedSpectrum):
"""
The model for the galaxy redshift space power spectrum
Param... | nickhandREPO_NAMEpyRSDPATH_START.@pyRSD_extracted@pyRSD-master@pyRSD@rsd@power@gal@power_gal.py@.PATH_END.py |
{
"filename": "nonparametric.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/stats/nonparametric.py",
"type": "Python"
} | """
Rank based methods for inferential statistics
Created on Sat Aug 15 10:18:53 2020
Author: Josef Perktold
License: BSD-3
"""
import numpy as np
from scipy import stats
from scipy.stats import rankdata
from statsmodels.tools.testing import Holder
from statsmodels.stats.base import HolderTuple
from statsmodels.s... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@stats@nonparametric.py@.PATH_END.py |
{
"filename": "_hovertemplate.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterternary/_hovertemplate.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="hovertemplate", parent_name="scatterternary", **kwargs
):
super(HovertemplateValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterternary@_hovertemplate.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "kimakan/FaintCOS",
"repo_path": "FaintCOS_extracted/FaintCOS-master/CustomConfLimits/setup.py",
"type": "Python"
} | from distutils.core import setup, Extension
import numpy
setup(name = 'CustomConfLim', version = '1.0', \
ext_modules = [Extension('CustomConfLim', ['CustomConfLim.c'])],
include_dirs=[numpy.get_include()]) | kimakanREPO_NAMEFaintCOSPATH_START.@FaintCOS_extracted@FaintCOS-master@CustomConfLimits@setup.py@.PATH_END.py |
{
"filename": "_lineposition.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymap/hoverlabel/font/_lineposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator):
def __init__(
self,
plotly_name="lineposition",
parent_name="densitymap.hoverlabel.font",
**kwargs,
):
super(LinepositionValidator, self).__init__(
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymap@hoverlabel@font@_lineposition.py@.PATH_END.py |
{
"filename": "test_relation.py",
"repo_name": "rhayes777/PyAutoFit",
"repo_path": "PyAutoFit_extracted/PyAutoFit-main/test_autofit/analysis/test_relation.py",
"type": "Python"
} | import pickle
import pytest
import autofit as af
from autofit.mapper.prior.arithmetic.compound import SumPrior
from autofit.non_linear.analysis.indexed import IndexedAnalysis
from autofit.non_linear.analysis.model_analysis import (
CombinedModelAnalysis,
ModelAnalysis,
)
def test_pickle_indexed_analysis():
... | rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@test_autofit@analysis@test_relation.py@.PATH_END.py |
{
"filename": "_control_flow_tutorial.ipynb",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/autograph/g3doc/reference/_control_flow_tutorial.ipynb",
"type": "Jupyter Notebook"
} | TODO(b/138297412): This colab retains some useful code snippets and demonstrations that used to be in the tf.function/AutoGraph customization tutorial, and should be rolled into the existing docs as part of a broader markdown->colab conversion.
```
import tensorflow as tf
```
Define a helper function to demonstrate ... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@autograph@g3doc@reference@_control_flow_tutorial.ipynb@.PATH_END.py |
{
"filename": "_weightsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/textfont/_weightsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="weightsrc", parent_name="funnel.textfont", **kwargs
):
super(WeightsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@textfont@_weightsrc.py@.PATH_END.py |
{
"filename": "_hovertemplatesrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmapbox/_hovertemplatesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="hovertemplatesrc", parent_name="choroplethmapbox", **kwargs
):
super(HovertemplatesrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmapbox@_hovertemplatesrc.py@.PATH_END.py |
{
"filename": "rfi_inspect_2458136.ipynb",
"repo_name": "HERA-Team/H1C_IDR3_Notebooks",
"repo_path": "H1C_IDR3_Notebooks-main/rfi_inspect/rfi_inspect_2458136.ipynb",
"type": "Jupyter Notebook"
} | # RFI Inspection Daily RTP Notebook
```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import glob
import os
from astropy import units
from copy import deepcopy
from pyuvdata import UVFlag
import matplotlib.colors as colors
from matplotlib import cm
from IPython.display import display, HTM... | HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@rfi_inspect@rfi_inspect_2458136.ipynb@.PATH_END.py |
{
"filename": "Thinning time grids.ipynb",
"repo_name": "HajimeKawahara/juwvid",
"repo_path": "juwvid_extracted/juwvid-master/ipynb/Thinning time grids.ipynb",
"type": "Jupyter Notebook"
} | ## Reducing computational time and memory
last update: 9/30 (2017)
```julia
import DSP
using PyPlot
```
```julia
include("../juwvid.jl")
```
juwvid
## STFT
```julia
## sin FM
nsample=1024
x,y,iw,ynorm=sampledata.genlinfm(nsample,1.0,0.01);
```
```julia
tfrst=stft.tfrstft(y);
```
Use fft.
### ... | HajimeKawaharaREPO_NAMEjuwvidPATH_START.@juwvid_extracted@juwvid-master@ipynb@Thinning time grids.ipynb@.PATH_END.py |
{
"filename": "_lineposition.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/image/hoverlabel/font/_lineposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator):
def __init__(
self, plotly_name="lineposition", parent_name="image.hoverlabel.font", **kwargs
):
super(LinepositionValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@image@hoverlabel@font@_lineposition.py@.PATH_END.py |
{
"filename": "bayesian_regression.ipynb",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/tutorial/source/bayesian_regression.ipynb",
"type": "Jupyter Notebook"
} | # Bayesian Regression - Introduction (Part 1)
Regression is one of the most common and basic supervised learning tasks in machine learning. Suppose we're given a dataset $\mathcal{D}$ of the form
$$ \mathcal{D} = \{ (X_i, y_i) \} \qquad \text{for}\qquad i=1,2,...,N$$
The goal of linear regression is to fit a functi... | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@tutorial@source@bayesian_regression.ipynb@.PATH_END.py |
{
"filename": "_tickprefix.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickprefix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickprefixValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="tickprefix", parent_name="layout.ternary.caxis", **kwargs
):
super(TickprefixValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@ternary@caxis@_tickprefix.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "terryyin/lizard",
"repo_path": "lizard_extracted/lizard-master/setup.py",
"type": "Python"
} | #!/usr/bin/env python
'''
Setup script.
To install lizard:
sudo setup.py build install
'''
import codecs
import os
import re
from setuptools import setup, Command
try:
here = os.path.dirname(os.path.abspath(__file__))
version = '0.0.0'
changes = os.path.join(here, "CHANGELOG.md")
pattern = r'^\#*\s*(?... | terryyinREPO_NAMElizardPATH_START.@lizard_extracted@lizard-master@setup.py@.PATH_END.py |
{
"filename": "model_obs.py",
"repo_name": "remi-adam/minot",
"repo_path": "minot_extracted/minot-master/minot/model_obs.py",
"type": "Python"
} | """
This file contain a subclass of the model.py module and Cluster class. It
is dedicated to the computing of observables.
"""
#==================================================
# Requested imports
#==================================================
import numpy as np
import scipy.ndimage as ndimage
import astropy... | remi-adamREPO_NAMEminotPATH_START.@minot_extracted@minot-master@minot@model_obs.py@.PATH_END.py |
{
"filename": "priors.py",
"repo_name": "esheldon/ngmix",
"repo_path": "ngmix_extracted/ngmix-master/ngmix/priors/priors.py",
"type": "Python"
} | """
Convention is that all priors should have peak ln(prob)==0. This
helps use in priors for LM fitting.
"""
import numpy as np
from ..gexceptions import GMixRangeError
from .random import make_rng
from ..defaults import LOWVAL
class PriorBase(object):
"""
Base object for priors.
Parameters
--------... | esheldonREPO_NAMEngmixPATH_START.@ngmix_extracted@ngmix-master@ngmix@priors@priors.py@.PATH_END.py |
{
"filename": "tf_planck2018_lite.md",
"repo_name": "alessiospuriomancini/cosmopower",
"repo_path": "cosmopower_extracted/cosmopower-main/docs/tutorial/likelihoods/tf_planck2018_lite.md",
"type": "Markdown"
} | The notebook [tf_planck2018_lite.ipynb](https://github.com/alessiospuriomancini/cosmopower/blob/main/cosmopower/notebooks/likelihoods_notebooks/tf_planck2018_lite.ipynb) shows an example of how to run a complete inference pipeline with power spectra sourced from ``CosmoPower``. The notebooks runs a version of the _Plan... | alessiospuriomanciniREPO_NAMEcosmopowerPATH_START.@cosmopower_extracted@cosmopower-main@docs@tutorial@likelihoods@tf_planck2018_lite.md@.PATH_END.py |
{
"filename": "_array.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram/error_y/_array.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="array", parent_name="histogram.error_y", **kwargs):
super(ArrayValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram@error_y@_array.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/histogram2dcontour/colorbar/title/font/_weight.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self,
plotly_name="weight",
parent_name="histogram2dcontour.colorbar.title.font",
**kwargs,
):
super(WeightValidator, self).__init__(
plot... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@colorbar@title@font@_weight.py@.PATH_END.py |
{
"filename": "moster13.py",
"repo_name": "astropy/halotools",
"repo_path": "halotools_extracted/halotools-master/halotools/empirical_models/smhm_models/moster13.py",
"type": "Python"
} | """
Module containing classes used to model the mapping between
stellar mass and halo mass based on Moster et al. (2013).
"""
from __future__ import division, print_function, absolute_import, unicode_literals
from ..component_model_templates import PrimGalpropModel
from ...sim_manager import sim_defaults
__all__ = [... | astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@empirical_models@smhm_models@moster13.py@.PATH_END.py |
{
"filename": "make_fBM_moments.py",
"repo_name": "Astroua/TurbuStat",
"repo_path": "TurbuStat_extracted/TurbuStat-master/Examples/paper_plots/make_fBM_moments.py",
"type": "Python"
} |
'''
Make moment maps from the fBM cubes.
Only generating from the repeated cubes with density and velocity indices
of -4.
'''
from spectral_cube import SpectralCube
from astropy.table import Table, Column
import numpy as np
import astropy.units as u
from astropy import constants as cc
import os
import matplotlib.py... | AstrouaREPO_NAMETurbuStatPATH_START.@TurbuStat_extracted@TurbuStat-master@Examples@paper_plots@make_fBM_moments.py@.PATH_END.py |
{
"filename": "time_regression.py",
"repo_name": "quatrope/astroalign",
"repo_path": "astroalign_extracted/astroalign-master/benchmarks/time_regression.py",
"type": "Python"
} | # MIT License
# Copyright (c) 2016-2019 Martin Beroiz, Juan B. Cabral, Bruno Sanchez
# 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 ri... | quatropeREPO_NAMEastroalignPATH_START.@astroalign_extracted@astroalign-master@benchmarks@time_regression.py@.PATH_END.py |
{
"filename": "_vertexnormalsepsilon.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/isosurface/lighting/_vertexnormalsepsilon.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name="vertexnormalsepsilon",
parent_name="isosurface.lighting",
**kwargs
):
super(VertexnormalsepsilonValidator, self).__ini... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@isosurface@lighting@_vertexnormalsepsilon.py@.PATH_END.py |
{
"filename": "_node.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/sankey/_node.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Node(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "sankey"
_path_str = "sankey.node"
_valid_props = {
"align",
"color",
"... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@sankey@_node.py@.PATH_END.py |
{
"filename": "test_preprocess.py",
"repo_name": "quatrope/feets",
"repo_path": "feets_extracted/feets-master/tests/test_preprocess.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# The MIT License (MIT)
# Copyright (c) 2017 Juan Cabral
# 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 withou... | quatropeREPO_NAMEfeetsPATH_START.@feets_extracted@feets-master@tests@test_preprocess.py@.PATH_END.py |
{
"filename": "test_metadata.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/utils/metadata/tests/test_metadata.py",
"type": "Python"
} | from collections import OrderedDict, defaultdict
from dataclasses import dataclass
import numpy as np
import pytest
from astropy.io import fits
from astropy.utils import metadata
from astropy.utils.metadata import (
MergeConflictError,
MetaData,
common_dtype,
enable_merge_strategies,
merge,
)
cl... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@utils@metadata@tests@test_metadata.py@.PATH_END.py |
{
"filename": "irafpar.py",
"repo_name": "iraf-community/pyraf",
"repo_path": "pyraf_extracted/pyraf-main/pyraf/irafpar.py",
"type": "Python"
} | """irafpar.py -- parse IRAF .par files and create lists of IrafPar objects
R. White, 2000 January 7
"""
import copy
import glob
import os
import re
import types
from .tools import minmatch, irafutils, taskpars, basicpar
from .tools.irafglobals import INDEF, Verbose, yes, no
from .tools.basicpar import (warning, _Str... | iraf-communityREPO_NAMEpyrafPATH_START.@pyraf_extracted@pyraf-main@pyraf@irafpar.py@.PATH_END.py |
{
"filename": "shift_test.py",
"repo_name": "vaexio/vaex",
"repo_path": "vaex_extracted/vaex-master/tests/shift_test.py",
"type": "Python"
} | import collections
import pytest
import numpy as np
import pyarrow as pa
import vaex.shift
import vaex.ml
def chunk_iter(chunks, chunk_size):
some_value = list(chunks.values())[0]
for i in range((len(some_value) + chunk_size-1)//chunk_size):
i1 = i*chunk_size
i2 = min(len(some_value), (i+1)*c... | vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@tests@shift_test.py@.PATH_END.py |
{
"filename": "_familysrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/textfont/_familysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="familysrc", parent_name="funnel.textfont", **kwargs
):
super(FamilysrcValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@textfont@_familysrc.py@.PATH_END.py |
{
"filename": "_text.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contourcarpet/_text.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="text", parent_name="contourcarpet", **kwargs):
super(TextValidator, 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@contourcarpet@_text.py@.PATH_END.py |
{
"filename": "_tickformatstopdefaults.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2d/colorbar/_tickformatstopdefaults.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self,
plotly_name="tickformatstopdefaults",
parent_name="histogram2d.colorbar",
**kwargs
):
super(TickformatstopdefaultsValidator, se... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2d@colorbar@_tickformatstopdefaults.py@.PATH_END.py |
{
"filename": "viewer.py",
"repo_name": "glue-viz/glue",
"repo_path": "glue_extracted/glue-main/glue/viewers/image/viewer.py",
"type": "Python"
} | import os
from astropy.wcs import WCS
from glue.core.subset import roi_to_subset_state
from glue.core.coordinates import Coordinates, LegacyCoordinates
from glue.core.coordinate_helpers import dependent_axes
from glue.core.data_region import RegionData
from glue.viewers.matplotlib.viewer import SimpleMatplotlibViewe... | glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@viewers@image@viewer.py@.PATH_END.py |
{
"filename": "freedman2020.py",
"repo_name": "ggalloni/cobaya",
"repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/H0/freedman2020.py",
"type": "Python"
} | from cobaya.likelihoods.base_classes import H0
class freedman2020(H0):
r"""
Local $H_0$ measurement from \cite{Freedman:2020dne}.
"""
pass
| ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@H0@freedman2020.py@.PATH_END.py |
{
"filename": "hull_demo.py",
"repo_name": "itseez/opencv",
"repo_path": "opencv_extracted/opencv-master/samples/python/tutorial_code/ShapeDescriptors/hull/hull_demo.py",
"type": "Python"
} | from __future__ import print_function
import cv2 as cv
import numpy as np
import argparse
import random as rng
rng.seed(12345)
def thresh_callback(val):
threshold = val
# Detect edges using Canny
canny_output = cv.Canny(src_gray, threshold, threshold * 2)
# Find contours
contours, _ = cv.findCon... | itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@samples@python@tutorial_code@ShapeDescriptors@hull@hull_demo.py@.PATH_END.py |
{
"filename": "componentbuilder.py",
"repo_name": "AishwaryaC26/RIS-Vis",
"repo_path": "RIS-Vis_extracted/RIS-Vis-main/app/componentbuilder.py",
"type": "Python"
} | import dash_bootstrap_components as dbc
from dash import dcc, html
import elementstyling
from datetime import date, timedelta
import pandas as pd
import plotly.express as px
import os, ast
from dotenv import load_dotenv
load_dotenv()
time_constant = int(os.environ["TIME_CONSTANT"])
## Componentbuilder.py facilitates ... | AishwaryaC26REPO_NAMERIS-VisPATH_START.@RIS-Vis_extracted@RIS-Vis-main@app@componentbuilder.py@.PATH_END.py |
{
"filename": "flux_ovd.py",
"repo_name": "dazhiUBC/SCUBA2_MF",
"repo_path": "SCUBA2_MF_extracted/SCUBA2_MF-main/blank/flux_ovd.py",
"type": "Python"
} | import pandas as pd
from MF import *
from astropy.coordinates import SkyCoord
ntrials = 10000 # number of mock maps
def read_ca(fname):
cata = pd.read_csv(fname,delimiter= ' ' )
f = cata['flux'] # flux
e = cata['err'] # err
c = SkyCoord(ra=cata['ra'],dec=cata['dec'],unit=(u.hourangle, u.deg)) # coordi... | dazhiUBCREPO_NAMESCUBA2_MFPATH_START.@SCUBA2_MF_extracted@SCUBA2_MF-main@blank@flux_ovd.py@.PATH_END.py |
{
"filename": "polar_bar.py",
"repo_name": "matplotlib/matplotlib",
"repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/pie_and_polar_charts/polar_bar.py",
"type": "Python"
} | """
=======================
Bar chart on polar axis
=======================
Demo of bar plot on a polar axis.
"""
import matplotlib.pyplot as plt
import numpy as np
# Fixing random state for reproducibility
np.random.seed(19680801)
# Compute pie slices
N = 20
theta = np.linspace(0.0, 2 * np.pi, N, endpoint=False)
ra... | matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@pie_and_polar_charts@polar_bar.py@.PATH_END.py |
{
"filename": "subscriber.py",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/crossbar/bridge/rest/subscriber.py",
"type": "Python"
} | #####################################################################################
#
# Copyright (c) typedef int GmbH
# SPDX-License-Identifier: EUPL-1.2
#
#####################################################################################
import json
from functools import partial
from twisted.internet.defer ... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@bridge@rest@subscriber.py@.PATH_END.py |
{
"filename": "_labelfont.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2dcontour/contours/_labelfont.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self,
plotly_name="labelfont",
parent_name="histogram2dcontour.contours",
**kwargs,
):
super(LabelfontValidator, self).__init__(
plotl... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2dcontour@contours@_labelfont.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "nickhand/pyRSD",
"repo_path": "pyRSD_extracted/pyRSD-master/pyRSD/__init__.py",
"type": "Python"
} | """
pyRSD
``pyRSD`` is a collection of algorithms to compute the redshift space matter
power spectra using perturbation theory and the redshift space distortion (RSD)
model based on a distribution function velocity moments approach
for all features of ``pyRSD``, you need to import one of the
following subpackages:
S... | nickhandREPO_NAMEpyRSDPATH_START.@pyRSD_extracted@pyRSD-master@pyRSD@__init__.py@.PATH_END.py |
{
"filename": "test_cb_ssl.py",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/test/functests/cbtests/test_cb_ssl.py",
"type": "Python"
} | ###############################################################################
#
# Copyright (c) typedef int GmbH. Licensed under EUPLv1.2.
#
###############################################################################
from __future__ import print_function
from __future__ import absolute_import
import random
from... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@test@functests@cbtests@test_cb_ssl.py@.PATH_END.py |
{
"filename": "file_io_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/lib/io/file_io_test.py",
"type": "Python"
} | # This Python file uses the following encoding: utf-8
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@lib@io@file_io_test.py@.PATH_END.py |
{
"filename": "module.py",
"repo_name": "pyro-ppl/numpyro",
"repo_path": "numpyro_extracted/numpyro-master/numpyro/contrib/module.py",
"type": "Python"
} | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
from collections import namedtuple
from copy import deepcopy
from functools import partial
import jax
from jax import random
import jax.numpy as jnp
from jax.tree_util import register_pytree_node
import numpyro
import numpyro.distrib... | pyro-pplREPO_NAMEnumpyroPATH_START.@numpyro_extracted@numpyro-master@numpyro@contrib@module.py@.PATH_END.py |
{
"filename": "analysis.ipynb",
"repo_name": "tanner-trickle/EXCEED-DM",
"repo_path": "EXCEED-DM_extracted/EXCEED-DM-main/examples/16/analysis.ipynb",
"type": "Jupyter Notebook"
} | # Example 16 Analysis
We will plot the absorption rate as a function of mass, as well as the reach on $g_{aee}$
## Packages
```python
import numpy as np
# some personal preferences for nice plots
%run "../../utilities/output_parser/plotter.ipynb"
# helpful functions for processing output
import sys
sys.path.appen... | tanner-trickleREPO_NAMEEXCEED-DMPATH_START.@EXCEED-DM_extracted@EXCEED-DM-main@examples@16@analysis.ipynb@.PATH_END.py |
{
"filename": "ImageEnhance.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pillow/py2/PIL/ImageEnhance.py",
"type": "Python"
} | #
# The Python Imaging Library.
# $Id$
#
# image enhancement classes
#
# For a background, see "Image Processing By Interpolation and
# Extrapolation", Paul Haeberli and Douglas Voorhies. Available
# at http://www.graficaobscura.com/interp/index.html
#
# History:
# 1996-03-23 fl Created
# 2009-06-16 fl Fixed mean ca... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pillow@py2@PIL@ImageEnhance.py@.PATH_END.py |
{
"filename": "test_simulation.py",
"repo_name": "smirik/resonances",
"repo_path": "resonances_extracted/resonances-main/tests/resonances/test_simulation.py",
"type": "Python"
} | import numpy as np
import rebound
import tests.tools as tools
import shutil
from pathlib import Path
import pytest
import resonances
@pytest.fixture(autouse=True)
def run_around_tests():
Path('cache/tests').mkdir(parents=True, exist_ok=True)
yield
# shutil.rmtree('cache/tests')
def test_init():
res... | smirikREPO_NAMEresonancesPATH_START.@resonances_extracted@resonances-main@tests@resonances@test_simulation.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/ultralytics/cfg/models/README.md",
"type": "Markdown"
} | ## Models
Welcome to the [Ultralytics](https://www.ultralytics.com/) Models directory! Here you will find a wide variety of pre-configured model configuration files (`*.yaml`s) that can be used to create custom YOLO models. The models in this directory have been expertly crafted and fine-tuned by the Ultralytics team ... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@ultralytics@cfg@models@README.md@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "emerge-erc/ALminer",
"repo_path": "ALminer_extracted/ALminer-main/setup.py",
"type": "Python"
} | from setuptools import setup, find_packages
version = {}
with open('alminer/version.py') as v:
exec(v.read(), version)
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name='alminer',
version=version['__version__'],
author='Aida Ahmadi',
author_email='a... | emerge-ercREPO_NAMEALminerPATH_START.@ALminer_extracted@ALminer-main@setup.py@.PATH_END.py |
{
"filename": "test_particle.py",
"repo_name": "hannorein/REBOUND",
"repo_path": "REBOUND_extracted/REBOUND-main/rebound/tests/test_particle.py",
"type": "Python"
} | import rebound
import unittest
import math
import warnings
class TestParticleWarning(unittest.TestCase):
def test_testparticle0_with_mass(self):
sim = rebound.Simulation()
sim.add(m=1)
sim.N_active = sim.N
sim.add(m=1,a=1)
sim.testparticle_type = 1
with warnings.catc... | hannoreinREPO_NAMEREBOUNDPATH_START.@REBOUND_extracted@REBOUND-main@rebound@tests@test_particle.py@.PATH_END.py |
{
"filename": "_z.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/isosurface/caps/_z.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Z(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "isosurface.caps"
_path_str = "isosurface.caps.z"
_valid_props = {"fill", "show"}
# fill
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@isosurface@caps@_z.py@.PATH_END.py |
{
"filename": "loggingconfig.py",
"repo_name": "StingraySoftware/stingray",
"repo_path": "stingray_extracted/stingray-main/stingray/loggingconfig.py",
"type": "Python"
} | import logging
logger = None
class CustomFormatter(logging.Formatter):
grey = "\x1b[38;20m"
yellow = "\x1b[33;20m"
red = "\x1b[31;20m"
bold_red = "\x1b[31;1m"
reset = "\x1b[0m"
format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s (%(filename)s:%(lineno)d)"
FORMATS = {
l... | StingraySoftwareREPO_NAMEstingrayPATH_START.@stingray_extracted@stingray-main@stingray@loggingconfig.py@.PATH_END.py |
{
"filename": "colormaps.py",
"repo_name": "psheehan/pdspy",
"repo_path": "pdspy_extracted/pdspy-master/pdspy/plotting/colormaps.py",
"type": "Python"
} | import matplotlib.colors as colors
# Rainbow1 colormap.
rainbow1_cdict = {'red': ((0, 1, 1),
(0.15, 0, 0),
(0.45, 0, 0),
(0.5, 0, 0),
(0.55, 1, 1),
(0.75, 1, 1),
(0.875, 1, 1),
... | psheehanREPO_NAMEpdspyPATH_START.@pdspy_extracted@pdspy-master@pdspy@plotting@colormaps.py@.PATH_END.py |
{
"filename": "_domain.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/polar/_domain.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DomainValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="domain", parent_name="layout.polar", **kwargs):
super(DomainValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@polar@_domain.py@.PATH_END.py |
{
"filename": "plot_param_contour_2stream_fixed_T_int.py",
"repo_name": "Jingxuan97/nemesispy",
"repo_path": "nemesispy_extracted/nemesispy-main/nemesispy/data/gcm/wasp43b_vivien/plot_param_contour_2stream_fixed_T_int.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
Plot the distributions of best fit parameters of the 2-Stream Guillot profile
with fixed T_int from the fit to the WASP-43b GCM.
Parameters are {kappa,gamma,f}
"""
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
# Read GCM data
from nemesispy.data.... | Jingxuan97REPO_NAMEnemesispyPATH_START.@nemesispy_extracted@nemesispy-main@nemesispy@data@gcm@wasp43b_vivien@plot_param_contour_2stream_fixed_T_int.py@.PATH_END.py |
{
"filename": "_text.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/_text.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="text", parent_name="scattercarpet", **kwargs):
super(TextValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
a... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@_text.py@.PATH_END.py |
{
"filename": "_elliptic_envelope.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/covariance/_elliptic_envelope.py",
"type": "Python"
} | # Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause
from numbers import Real
import numpy as np
from ..base import OutlierMixin, _fit_context
from ..metrics import accuracy_score
from ..utils._param_validation import Interval
from ..utils.validation import check_is_fitted
from ._robust_cov... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@covariance@_elliptic_envelope.py@.PATH_END.py |
{
"filename": "dolphin.py",
"repo_name": "matplotlib/matplotlib",
"repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/shapes_and_collections/dolphin.py",
"type": "Python"
} | """
========
Dolphins
========
This example shows how to draw, and manipulate shapes given vertices
and nodes using the `~.path.Path`, `~.patches.PathPatch` and
`~matplotlib.transforms` classes.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.cm as cm
from matplotlib.patches import Circle, P... | matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@shapes_and_collections@dolphin.py@.PATH_END.py |
{
"filename": "extinction.py",
"repo_name": "pcubillos/pyratbay",
"repo_path": "pyratbay_extracted/pyratbay-master/pyratbay/pyrat/extinction.py",
"type": "Python"
} | # Copyright (c) 2021-2022 Patricio Cubillos
# Pyrat Bay is open-source software under the GPL-2.0 license (see LICENSE)
import os
import ctypes
import multiprocessing as mp
import numpy as np
import scipy.interpolate as sip
from .. import tools as pt
from .. import constants as pc
from .. import io as io
from ..lib ... | pcubillosREPO_NAMEpyratbayPATH_START.@pyratbay_extracted@pyratbay-master@pyratbay@pyrat@extinction.py@.PATH_END.py |
{
"filename": "testFun.py",
"repo_name": "oliverphilcox/HADES",
"repo_path": "HADES_extracted/HADES-master/hades/testFun.py",
"type": "Python"
} | from flipper import *
import numpy as np
from hades.params import BICEP
a=BICEP()
def low_dust_estimator2(map,map_id,lMin=a.lMin,lMax=a.lMax,FWHM=a.FWHM,noise_power=a.noise_power,\
slope=a.slope,factor=None,rot=0.,delensing_fraction=a.delensing_fraction,useTensors=a.useTensors,debiasAmplitude=True):
"""Use mod... | oliverphilcoxREPO_NAMEHADESPATH_START.@HADES_extracted@HADES-master@hades@testFun.py@.PATH_END.py |
{
"filename": "catalog.py",
"repo_name": "lwa-project/lsl",
"repo_path": "lsl_extracted/lsl-main/lsl/catalog.py",
"type": "Python"
} | """
LWA astronomical source catalogs.
"""
import os
import math
import abc
import collections
try:
Mapping = collections.abc.Mapping
except AttributeError:
# Catch for < Py3.10
Mapping = collections.Mapping
from lsl import astro
from lsl import transform
from lsl.common.data_access import DataAccess
from... | lwa-projectREPO_NAMElslPATH_START.@lsl_extracted@lsl-main@lsl@catalog.py@.PATH_END.py |
{
"filename": "FAQ.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/restricted/abseil-cpp/FAQ.md",
"type": "Markdown"
} | # Abseil FAQ
## Is Abseil the right home for my utility library?
Most often the answer to the question is "no." As both the [About
Abseil](https://abseil.io/about/) page and our [contributing
guidelines](https://github.com/abseil/abseil-cpp/blob/master/CONTRIBUTING.md#contribution-guidelines)
explain, Abseil contains... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@restricted@abseil-cpp@FAQ.md@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/README.md",
"type": "Markdown"
} | <div align="center">
<a href="http://pyro.ai"> <img width="220px" height="220px" src="docs/source/_static/img/pyro_logo_with_text.png"></a>
</div>
-----------------------------------------
[](https://github.com/pyro-ppl/pyro/actions)
[![Coverag... | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@README.md@.PATH_END.py |
{
"filename": "latex.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/formatters/latex.py",
"type": "Python"
} | """
pygments.formatters.latex
~~~~~~~~~~~~~~~~~~~~~~~~~
Formatter for LaTeX fancyvrb output.
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from io import StringIO
from pygments.formatter import Formatter
from pygments.lexer import ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@formatters@latex.py@.PATH_END.py |
{
"filename": "_stream.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/_stream.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StreamValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="stream", parent_name="scatterpolargl", **kwargs):
super(StreamValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@_stream.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.