metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "galaxy-merger-rate.ipynb",
"repo_name": "nanograv/holodeck",
"repo_path": "holodeck_extracted/holodeck-main/notebooks/devs/sams/galaxy-merger-rate.ipynb",
"type": "Jupyter Notebook"
} | ```python
import numpy as np
import matplotlib.pyplot as plt
import holodeck as holo
import holodeck.sams
from holodeck import utils, plot
from holodeck.constants import MSOL, GYR
```
## Illustris Galaxy Merger Rate [Rodriguez-Gomez+2015]
```python
gmr = holo.sams.GMR_Illustris()
```
Reproduce Rodriguez-Gomez+2015... | nanogravREPO_NAMEholodeckPATH_START.@holodeck_extracted@holodeck-main@notebooks@devs@sams@galaxy-merger-rate.ipynb@.PATH_END.py |
{
"filename": "_hoverlabel.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/isosurface/_hoverlabel.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="hoverlabel", parent_name="isosurface", **kwargs):
super(HoverlabelValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_na... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@isosurface@_hoverlabel.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "ggalloni/cobaya",
"repo_path": "cobaya_extracted/cobaya-master/docs/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# cobaya documentation build configuration file, created by
# sphinx-quickstart on Thu Nov 3 19:28:54 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.
#
# Al... | ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@docs@conf.py@.PATH_END.py |
{
"filename": "bnre.py",
"repo_name": "mackelab/sbi",
"repo_path": "sbi_extracted/sbi-main/sbi/inference/trainers/nre/bnre.py",
"type": "Python"
} | # This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>
from typing import Callable, Dict, Optional, Union
import torch
from torch import Tensor, nn, ones
from torch.distributions import Distribution
from sbi... | mackelabREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@inference@trainers@nre@bnre.py@.PATH_END.py |
{
"filename": "sparse_bcoo_bcsr_test.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/tests/sparse_bcoo_bcsr_test.py",
"type": "Python"
} | # Copyright 2021 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@tests@sparse_bcoo_bcsr_test.py@.PATH_END.py |
{
"filename": "plot_op.py",
"repo_name": "DedalusProject/dedalus",
"repo_path": "dedalus_extracted/dedalus-master/dedalus/tools/plot_op.py",
"type": "Python"
} |
import numpy as np
import matplotlib.pyplot as plt
from collections import defaultdict
from ..core.future import Future
from ..core.operators import Convert
class Node:
def __init__(self, label, level):
# Plotting label
self.label = label
# Position information
self.level = l... | DedalusProjectREPO_NAMEdedalusPATH_START.@dedalus_extracted@dedalus-master@dedalus@tools@plot_op.py@.PATH_END.py |
{
"filename": "SiGaps_18.ipynb",
"repo_name": "Echelle/AO_bonding_paper",
"repo_path": "AO_bonding_paper_extracted/AO_bonding_paper-master/notebooks/SiGaps_18.ipynb",
"type": "Jupyter Notebook"
} | ###This IPython Notebook is for performing a fit and generating a figure of the spectrum of sample VG09-12, in the mesh region with 49+/-6 nm gap. This version is modified to fit for two gaps, updated with new data from February 2015.
The filename of the figure is **[TBD].pdf**.
Author: Michael Gully-Santiago, `gull... | EchelleREPO_NAMEAO_bonding_paperPATH_START.@AO_bonding_paper_extracted@AO_bonding_paper-master@notebooks@SiGaps_18.ipynb@.PATH_END.py |
{
"filename": "_tickfont.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/heatmapgl/colorbar/_tickfont.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Tickfont(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "heatmapgl.colorbar"
_path_str = "heatmapgl.colorbar.tickfont"
_valid_props = {
"co... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@heatmapgl@colorbar@_tickfont.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/splom/legendgrouptitle/_font.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "splom.legendgrouptitle"
_path_str = "splom.legendgrouptitle.font"
_valid_props = {
"co... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@splom@legendgrouptitle@_font.py@.PATH_END.py |
{
"filename": "vol-points.py",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/doc/source/cookbook/vol-points.py",
"type": "Python"
} | import numpy as np
import yt
from yt.units import kpc
from yt.visualization.volume_rendering.api import PointSource
ds = yt.load("IsolatedGalaxy/galaxy0030/galaxy0030")
sc = yt.create_scene(ds)
np.random.seed(1234567)
npoints = 1000
# Random particle positions
vertices = np.random.random([npoints, 3]) * 200 * kpc... | yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@doc@source@cookbook@vol-points.py@.PATH_END.py |
{
"filename": "model.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/cffi/py2/cffi/model.py",
"type": "Python"
} | import types
import weakref
from .lock import allocate_lock
from .error import CDefError, VerificationError, VerificationMissing
# type qualifiers
Q_CONST = 0x01
Q_RESTRICT = 0x02
Q_VOLATILE = 0x04
def qualify(quals, replace_with):
if quals & Q_CONST:
replace_with = ' const ' + replace_with.lstrip()
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@cffi@py2@cffi@model.py@.PATH_END.py |
{
"filename": "_namelengthsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/table/hoverlabel/_namelengthsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="namelengthsrc", parent_name="table.hoverlabel", **kwargs
):
super(NamelengthsrcValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@table@hoverlabel@_namelengthsrc.py@.PATH_END.py |
{
"filename": "calc_background.py",
"repo_name": "kpicteam/kpic_pipeline",
"repo_path": "kpic_pipeline_extracted/kpic_pipeline-main/examples/calc_background.py",
"type": "Python"
} | # EXAMPLE:
# JX: compute master background and bad pixel map from background images
from glob import glob
import os
import sys
from kpicdrp import background
import matplotlib.pyplot as plt
import numpy as np
from kpicdrp.data import Dataset, DetectorFrame
from kpicdrp.caldb import det_caldb
from pipeline_utils import ... | kpicteamREPO_NAMEkpic_pipelinePATH_START.@kpic_pipeline_extracted@kpic_pipeline-main@examples@calc_background.py@.PATH_END.py |
{
"filename": "prop_load_fftw_wisdom.py",
"repo_name": "ajeldorado/falco-python",
"repo_path": "falco-python_extracted/falco-python-master/falco/proper/prop_load_fftw_wisdom.py",
"type": "Python"
} | # Copyright 2019 California Institute of Technology
# Users must agree to abide by the restrictions listed in the
# file "LegalStuff.txt" in the PROPER library directory.
#
# PROPER developed at Jet Propulsion Laboratory/California Inst. Technology
# Original IDL version by John Krist
# Python translation b... | ajeldoradoREPO_NAMEfalco-pythonPATH_START.@falco-python_extracted@falco-python-master@falco@proper@prop_load_fftw_wisdom.py@.PATH_END.py |
{
"filename": "_uirevision.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/ohlc/_uirevision.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="uirevision", parent_name="ohlc", **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@ohlc@_uirevision.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/indicator/title/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
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@py2@plotly@graph_objs@indicator@title@__init__.py@.PATH_END.py |
{
"filename": "softdtw_variants.py",
"repo_name": "tslearn-team/tslearn",
"repo_path": "tslearn_extracted/tslearn-main/tslearn/metrics/softdtw_variants.py",
"type": "Python"
} | import numpy as np
from joblib import Parallel, delayed
from numba import njit
from sklearn.utils import check_random_state
from tslearn.backend import instantiate_backend
from tslearn.utils import (
check_equal_size,
to_time_series,
to_time_series_dataset,
ts_size,
)
from .dtw_variants import dtw, dt... | tslearn-teamREPO_NAMEtslearnPATH_START.@tslearn_extracted@tslearn-main@tslearn@metrics@softdtw_variants.py@.PATH_END.py |
{
"filename": "native.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/styles/native.py",
"type": "Python"
} | """
pygments.styles.native
~~~~~~~~~~~~~~~~~~~~~~
pygments version of my "native" vim theme.
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, E... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@styles@native.py@.PATH_END.py |
{
"filename": "intro.md",
"repo_name": "federicomarulli/CosmoBolognaLib",
"repo_path": "CosmoBolognaLib_extracted/CosmoBolognaLib-master/External/CLASS/doc/input/intro.md",
"type": "Markdown"
} | CLASS: Cosmic Linear Anisotropy Solving System
==============================================
Author: Julien Lesgourgues
_This manual is under construction; this is only a provisional version. The definitive version will be made available soon, as well as all the necessary documentation to generate new versions of ... | federicomarulliREPO_NAMECosmoBolognaLibPATH_START.@CosmoBolognaLib_extracted@CosmoBolognaLib-master@External@CLASS@doc@input@intro.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/xaxis/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._rangebreak import Rangebreak
from ._rangeselector import Rangeselector
from ._rangeslider import Rangeslider
from ._tickfont import Tickfont
from ._tickformatstop import Tickformatstop
from ._title import Title
from . import rangeselector
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@xaxis@__init__.py@.PATH_END.py |
{
"filename": "testing.py",
"repo_name": "FRBs/zdm",
"repo_path": "zdm_extracted/zdm-main/zdm/craco/testing.py",
"type": "Python"
} | """ Run tests with CRACO FRBs """
######
# first run this to generate surveys and parameter sets, by
# setting NewSurveys=True NewGrids=True
# Then set these to False and run with command line arguments
# to generate *many* outputs
#####
# It should be possible to remove all the matplotlib calls from this
# but in th... | FRBsREPO_NAMEzdmPATH_START.@zdm_extracted@zdm-main@zdm@craco@testing.py@.PATH_END.py |
{
"filename": "test_timestep_thinner.py",
"repo_name": "pynbody/tangos",
"repo_path": "tangos_extracted/tangos-master/tests/test_timestep_thinner.py",
"type": "Python"
} | from pytest import fixture
import tangos
from tangos import testing
from tangos.testing import simulation_generator
from tangos.tools import timestep_thinner
@fixture
def fresh_database():
testing.init_blank_db_for_testing()
generator = simulation_generator.SimulationGeneratorForTests()
times = [0.1, 0... | pynbodyREPO_NAMEtangosPATH_START.@tangos_extracted@tangos-master@tests@test_timestep_thinner.py@.PATH_END.py |
{
"filename": "test_var.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/vector_ar/tests/test_var.py",
"type": "Python"
} | """
Test VAR Model
"""
from statsmodels.compat.pandas import QUARTER_END, assert_index_equal
from statsmodels.compat.python import lrange
from io import BytesIO, StringIO
import os
import sys
import warnings
import numpy as np
from numpy.testing import assert_allclose, assert_almost_equal, assert_equal
import pandas... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@vector_ar@tests@test_var.py@.PATH_END.py |
{
"filename": "polconv.py",
"repo_name": "rvweeren/lofar_facet_selfcal",
"repo_path": "lofar_facet_selfcal_extracted/lofar_facet_selfcal-main/polconv.py",
"type": "Python"
} | """
This code is based on MockPyStep.py from https://dp3.readthedocs.io/en/latest/steps/PythonStep.html
Polarization conversion implemented by Jurjen de Jong.
To use this script in DPPP/DP3, you can save this file in the same folder as from where you run your DPPP command.
Or you save this python file somewhere you li... | rvweerenREPO_NAMElofar_facet_selfcalPATH_START.@lofar_facet_selfcal_extracted@lofar_facet_selfcal-main@polconv.py@.PATH_END.py |
{
"filename": "_uirevision.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/contourcarpet/_uirevision.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="uirevision", parent_name="contourcarpet", **kwargs):
super(UirevisionValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@contourcarpet@_uirevision.py@.PATH_END.py |
{
"filename": "hypothesis_temporary_module_02664ba65877b87ba975fadffb95a5b1cd9b45ce.py",
"repo_name": "ryanvarley/exodata",
"repo_path": "exodata_extracted/exodata-master/exodata/tests/.hypothesis/eval_source/hypothesis_temporary_module_02664ba65877b87ba975fadffb95a5b1cd9b45ce.py",
"type": "Python"
} | from hypothesis.utils.conventions import not_set
def accept(f):
def test_works(self, T_eff=not_set, mu=not_set, g=not_set):
return f(self=self, T_eff=T_eff, mu=mu, g=g)
return test_works
| ryanvarleyREPO_NAMEexodataPATH_START.@exodata_extracted@exodata-master@exodata@tests@.hypothesis@eval_source@hypothesis_temporary_module_02664ba65877b87ba975fadffb95a5b1cd9b45ce.py@.PATH_END.py |
{
"filename": "getstarted.ipynb",
"repo_name": "gomesdasilva/ACTIN2",
"repo_path": "ACTIN2_extracted/ACTIN2-master/docs/getstarted.ipynb",
"type": "Jupyter Notebook"
} | ## Getting started
In this tutorial we will read HARPS spectra, extract and plot three activity indicators and radial velocity for the star HD41248.
Start by importing and initializing `ACTIN`
```python
%matplotlib inline
from actin2 import ACTIN
actin = ACTIN()
```
Get the HARPS 1D fits files of the star HD41248... | gomesdasilvaREPO_NAMEACTIN2PATH_START.@ACTIN2_extracted@ACTIN2-master@docs@getstarted.ipynb@.PATH_END.py |
{
"filename": "conftest.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/python-package/ut/large/conftest.py",
"type": "Python"
} | import os
import tarfile
import zipfile
import shutil
from filelock import FileLock
import yatest.common
def unpack_python(dst_path, py_ver):
arch_name = {
"3.6": "python3.6.tar.gz",
}[py_ver]
tar = tarfile.open(yatest.common.binary_path("catboost/python-package/ut/large/pkg/" + arch_name))
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@python-package@ut@large@conftest.py@.PATH_END.py |
{
"filename": "_axial_vector_mediator_cross_sections.py",
"repo_name": "LoganAMorrison/Hazma",
"repo_path": "Hazma_extracted/Hazma-master/hazma/experimental/axial_vector_mediator/_axial_vector_mediator_cross_sections.py",
"type": "Python"
} | # from cmath import sqrt, pi, log
from hazma.parameters import charged_pion_mass as mpi
from hazma.parameters import neutral_pion_mass as mpi0
# from ..parameters import fpi
# from ..parameters import qe
from hazma.parameters import muon_mass as mmu
from hazma.parameters import electron_mass as me
from scipy.integrate... | LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@hazma@experimental@axial_vector_mediator@_axial_vector_mediator_cross_sections.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "hpparvi/PyTransit",
"repo_path": "PyTransit_extracted/PyTransit-master/pytransit/lpf/baselines/__init__.py",
"type": "Python"
} | # PyTransit: fast and easy exoplanet transit modelling in Python.
# Copyright (C) 2010-2019 Hannu Parviainen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Licen... | hpparviREPO_NAMEPyTransitPATH_START.@PyTransit_extracted@PyTransit-master@pytransit@lpf@baselines@__init__.py@.PATH_END.py |
{
"filename": "fcnet_g.py",
"repo_name": "Guo-Jian-Wang/colfi",
"repo_path": "colfi_extracted/colfi-master/colfi/fcnet_g.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
from . import sequence as seq
from . import nodeframe
import torch
import torch.nn as nn
import numpy as np
#%%ANN + Gaussian - for one data set & one parameter
class MLPGaussian(torch.nn.Module):
def __init__(self, node_in=100, node_out=1, hidden_layer=3, nodes=None,
ac... | Guo-Jian-WangREPO_NAMEcolfiPATH_START.@colfi_extracted@colfi-master@colfi@fcnet_g.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "rhayes777/PyAutoFit",
"repo_path": "PyAutoFit_extracted/PyAutoFit-main/autofit/non_linear/parallel/__init__.py",
"type": "Python"
} | from .process import AbstractJob
from .process import AbstractJobResult
from .process import Process
from .sneaky import SneakyJob
from .sneaky import SneakyPool
from .sneaky import SneakierPool
| rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@autofit@non_linear@parallel@__init__.py@.PATH_END.py |
{
"filename": "kay.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/retrievers/kay.ipynb",
"type": "Jupyter Notebook"
} | # Kay.ai
>[Kai Data API](https://www.kay.ai/) built for RAG 🕵️ We are curating the world's largest datasets as high-quality embeddings so your AI agents can retrieve context on the fly. Latest models, fast retrieval, and zero infra.
This notebook shows you how to retrieve datasets supported by [Kay](https://kay.ai/)... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@retrievers@kay.ipynb@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "scikit-image/scikit-image",
"repo_path": "scikit-image_extracted/scikit-image-main/skimage/restoration/__init__.py",
"type": "Python"
} | """Restoration algorithms, e.g., deconvolution algorithms, denoising, etc."""
import lazy_loader as _lazy
__getattr__, __dir__, __all__ = _lazy.attach_stub(__name__, __file__)
| scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@restoration@__init__.py@.PATH_END.py |
{
"filename": "flux.py",
"repo_name": "HenrykHaniewicz/PSRVoid",
"repo_path": "PSRVoid_extracted/PSRVoid-master/flux.py",
"type": "Python"
} | # Calculates flux from a known continuum based on one of two formats
import os.path as osp
import mmap
import math
import numpy as np
import argparse
config_file = 'fluxcal.cfg'
config_abs = osp.join( osp.dirname( osp.abspath( __file__ ) ), config_file )
def find_flux_f1( frequency, source ):
"""
Returns t... | HenrykHaniewiczREPO_NAMEPSRVoidPATH_START.@PSRVoid_extracted@PSRVoid-master@flux.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2dcontour/colorbar/title/font/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._weight import WeightValidator
from ._variant import VariantValidator
from ._textcase import TextcaseValidator
from ._style import StyleValidator
from ._size import SizeValidator
from ._shadow impor... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2dcontour@colorbar@title@font@__init__.py@.PATH_END.py |
{
"filename": "ad.py",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/jax/experimental/sparse/ad.py",
"type": "Python"
} | # Copyright 2021 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@experimental@sparse@ad.py@.PATH_END.py |
{
"filename": "luminosity_study.py",
"repo_name": "AFD-Illinois/iharm3d",
"repo_path": "iharm3d_extracted/iharm3d-master/script/analysis/luminosity_study.py",
"type": "Python"
} | ################################################################################
# #
# LUMINOSITY COMPARISON #
# ... | AFD-IllinoisREPO_NAMEiharm3dPATH_START.@iharm3d_extracted@iharm3d-master@script@analysis@luminosity_study.py@.PATH_END.py |
{
"filename": "_delta.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/indicator/_delta.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DeltaValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="delta", parent_name="indicator", **kwargs):
super(DeltaValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@indicator@_delta.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "neuraloperator/neuraloperator",
"repo_path": "neuraloperator_extracted/neuraloperator-main/neuralop/models/tests/__init__.py",
"type": "Python"
} | neuraloperatorREPO_NAMEneuraloperatorPATH_START.@neuraloperator_extracted@neuraloperator-main@neuralop@models@tests@__init__.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/icicle/legendgrouptitle/font/_textcase.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="textcase",
parent_name="icicle.legendgrouptitle.font",
**kwargs,
):
super(TextcaseValidator, self).__init__(
plotl... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@icicle@legendgrouptitle@font@_textcase.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "dwkim78/upsilon",
"repo_path": "upsilon_extracted/upsilon-master/upsilon/extract_features/__init__.py",
"type": "Python"
} | __author__ = 'kim'
| dwkim78REPO_NAMEupsilonPATH_START.@upsilon_extracted@upsilon-master@upsilon@extract_features@__init__.py@.PATH_END.py |
{
"filename": "test_memory.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/util/memory/ut_cython/test_memory.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, division
from util.memory.blob_ut import TestBlob
# Test discovery does not work in cython modules.
# Reexporting test classes here to satisfy pylint and pytest.
__all__ = [
'TestBlob',
]
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@util@memory@ut_cython@test_memory.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/surface/lightposition/__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__, [... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@surface@lightposition@__init__.py@.PATH_END.py |
{
"filename": "aixlink.py",
"repo_name": "duvall3/rat-pac",
"repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/aixlink.py",
"type": "Python"
} | """SCons.Tool.aixlink
Tool-specific initialization for the IBM Visual Age linker.
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, 2008, 2009 The SCo... | duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@aixlink.py@.PATH_END.py |
{
"filename": "_token.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/stream/_token.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TokenValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="token", parent_name="sunburst.stream", **kwargs):
super(TokenValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@stream@_token.py@.PATH_END.py |
{
"filename": "dailylogger.py",
"repo_name": "sdss/idlspec2d",
"repo_path": "idlspec2d_extracted/idlspec2d-master/python/boss_drp/utils/dailylogger.py",
"type": "Python"
} | #!/usr/bin/env python3
import logging
import collections
from os import popen, getenv
import os.path as ptt
import smtplib
from email.message import EmailMessage
import numpy as np
class Formatter(logging.Formatter):
def __init__(self):
super().__init__(fmt="%(levelno)d: %(msg)s", datefmt=None, style='%')... | sdssREPO_NAMEidlspec2dPATH_START.@idlspec2d_extracted@idlspec2d-master@python@boss_drp@utils@dailylogger.py@.PATH_END.py |
{
"filename": "dir_lock.py",
"repo_name": "QEF/q-e",
"repo_path": "q-e_extracted/q-e-master/test-suite/testcode/lib/testcode2/dir_lock.py",
"type": "Python"
} | '''
testcode2.dir_lock
------------------
Threading lock initialisation and helper.
:copyright: (c) 2012 James Spencer.
:license: modified BSD; see LICENSE for more details.
'''
import os
import threading
import testcode2.compatibility as compat
class DirLock:
'''Helper class for working with threading locks.''... | QEFREPO_NAMEq-ePATH_START.@q-e_extracted@q-e-master@test-suite@testcode@lib@testcode2@dir_lock.py@.PATH_END.py |
{
"filename": "_orientation.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/_orientation.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="orientation", parent_name="funnel", **kwargs):
super(OrientationValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_n... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@_orientation.py@.PATH_END.py |
{
"filename": "_family.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/pie/insidetextfont/_family.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilyValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="family", parent_name="pie.insidetextfont", **kwargs
):
super(FamilyValidator, self).__init__(
plotly_name=plotly_name,
parent_name=p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@pie@insidetextfont@_family.py@.PATH_END.py |
{
"filename": "test_estimators.py",
"repo_name": "tslearn-team/tslearn",
"repo_path": "tslearn_extracted/tslearn-main/tslearn/tests/test_estimators.py",
"type": "Python"
} | """
The :mod:`tslearn.testing_utils` module includes various utilities that can
be used for testing.
"""
import tslearn
import pkgutil
import inspect
from functools import partial
from operator import itemgetter
import sklearn
from sklearn.base import (BaseEstimator, ClassifierMixin, ClusterMixin,
... | tslearn-teamREPO_NAMEtslearnPATH_START.@tslearn_extracted@tslearn-main@tslearn@tests@test_estimators.py@.PATH_END.py |
{
"filename": "Polytropic_EOSs.py",
"repo_name": "zachetienne/nrpytutorial",
"repo_path": "nrpytutorial_extracted/nrpytutorial-master/TOV/Polytropic_EOSs.py",
"type": "Python"
} | ## Polytropic EOSs Python Module
## Author(s): Leo Werneck and Zach Etienne
## In this NRPy+ module we set up useful "lowlevel" functions that compute
## useful polytropic quantities.
# Full documentation for this module may be found in the NRPy+ tutorial Jupyter notebook:
# Tutorial-TOV-Piecewise_Polytrope_EOSs.ipyn... | zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@TOV@Polytropic_EOSs.py@.PATH_END.py |
{
"filename": "build.py",
"repo_name": "AFD-Illinois/ebhlight",
"repo_path": "ebhlight_extracted/ebhlight-master/prob/bhtherm/build.py",
"type": "Python"
} | import sys; sys.path.append('../../script');
sys.dont_write_bytecode = True; import bhlight as bhl; del sys
PROB = 'bhtherm'
### COMPILE TIME PARAMETERS ###
# SPATIAL RESOLUTION AND MPI DECOMPOSITION
bhl.config.set_cparm('N1TOT', 128)
bhl.config.set_cparm('N2TOT', 16)
bhl.config.set_cparm('N3... | AFD-IllinoisREPO_NAMEebhlightPATH_START.@ebhlight_extracted@ebhlight-master@prob@bhtherm@build.py@.PATH_END.py |
{
"filename": "_meta.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmapgl/_meta.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class MetaValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="meta", parent_name="heatmapgl", **kwargs):
super(MetaValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
array_ok... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmapgl@_meta.py@.PATH_END.py |
{
"filename": "kobe.py",
"repo_name": "exomishra/kobe",
"repo_path": "kobe_extracted/kobe-master/code/kobe.py",
"type": "Python"
} | """
Created on Fri Nov 29 14:38:18 2019
@author: lokeshmishra
"""
# Standard Imports
import os
import sys
#get_ipython().run_line_magic('matplotlib', 'inline')
#get_ipython().run_line_magic('matplotlib', 'inline')
import pylab as p
import pandas as pd
import numpy as np
import scipy as sp
import pprint
import matplo... | exomishraREPO_NAMEkobePATH_START.@kobe_extracted@kobe-master@code@kobe.py@.PATH_END.py |
{
"filename": "thermalization_mpi.py",
"repo_name": "AFD-Illinois/ebhlight",
"repo_path": "ebhlight_extracted/ebhlight-master/test/thermalization_mpi.py",
"type": "Python"
} | #!/usr/bin/env python3
from __future__ import print_function, division
import os
import sys; sys.dont_write_bytecode = True
sys.path.insert(0, '../script/')
sys.path.insert(0, '../script/analysis/')
from subprocess import call
import subprocess as sp
import glob
import numpy as np
import hdf5_to_dict as io
import unit... | AFD-IllinoisREPO_NAMEebhlightPATH_START.@ebhlight_extracted@ebhlight-master@test@thermalization_mpi.py@.PATH_END.py |
{
"filename": "performance_counters.py",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/yt/utilities/performance_counters.py",
"type": "Python"
} | import atexit
import time
from bisect import insort
from collections import defaultdict
from datetime import datetime as dt
from functools import wraps
from yt.config import ytcfg
from yt.funcs import mylog
class PerformanceCounters:
_shared_state = {} # type: ignore
def __new__(cls, *args, **kwargs):
... | yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@utilities@performance_counters.py@.PATH_END.py |
{
"filename": "generalContours_demo2.py",
"repo_name": "itseez/opencv",
"repo_path": "opencv_extracted/opencv-master/samples/python/tutorial_code/ShapeDescriptors/bounding_rotated_ellipses/generalContours_demo2.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
## [Canny]
# Detect edges using Canny
canny_output = cv.Canny(src_gray, threshold, threshold * 2)
## [Canny]
## [findContou... | itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@samples@python@tutorial_code@ShapeDescriptors@bounding_rotated_ellipses@generalContours_demo2.py@.PATH_END.py |
{
"filename": "utils_spin.py",
"repo_name": "carronj/plancklens",
"repo_path": "plancklens_extracted/plancklens-master/plancklens/utils_spin.py",
"type": "Python"
} | r"""Module with spin-weight related utilities.
Conventions are $_{\pm |s|} X_{lm} = - (\pm)^{|s|} (G_{lm} \pm i C_{lm})$.
For CMB maps,
$ _{0}X_{lm} = T_{lm} $
$ _{\pm}X_{lm} = -1/2 (E_{lm} \pm i B_{lm}) $
hence
$ G^{0}_{lm} = -T_{lm} $
$ G^{2}_{lm} = E_{lm} $
$ C^{2}_{lm} = B_{l... | carronjREPO_NAMEplancklensPATH_START.@plancklens_extracted@plancklens-master@plancklens@utils_spin.py@.PATH_END.py |
{
"filename": "baseline.py",
"repo_name": "ratt-ru/QuartiCal",
"repo_path": "QuartiCal_extracted/QuartiCal-main/quartical/gains/baseline.py",
"type": "Python"
} | import xarray
import numpy as np
import dask.array as da
from daskms.experimental.zarr import xds_to_zarr
from numba import njit
from numba.extending import overload
from quartical.utils.numba import coerce_literal, JIT_OPTIONS
import quartical.gains.general.factories as factories
from quartical.gains.general.convenien... | ratt-ruREPO_NAMEQuartiCalPATH_START.@QuartiCal_extracted@QuartiCal-main@quartical@gains@baseline.py@.PATH_END.py |
{
"filename": "CHANGELOG.md",
"repo_name": "glass-dev/glass",
"repo_path": "glass_extracted/glass-main/CHANGELOG.md",
"type": "Markdown"
} | <!-- markdownlint-disable MD024 -->
# Changelog
All functional changes to the project are documented in this file.
## [2024.2] (15 Nov 2024)
- gh-188: add docstrings to all functions and tidy docs (#381)
- gh-336: support Python 3.13 (#337)
- gh-358: add static types support (#368)
- gh-131: rename `gaussian_gls` t... | glass-devREPO_NAMEglassPATH_START.@glass_extracted@glass-main@CHANGELOG.md@.PATH_END.py |
{
"filename": "_autocolorscale.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/marker/_autocolorscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="autocolorscale", parent_name="treemap.marker", **kwargs
):
super(AutocolorscaleValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@marker@_autocolorscale.py@.PATH_END.py |
{
"filename": "bayesian_hierarchical_linear_regression.ipynb",
"repo_name": "pyro-ppl/numpyro",
"repo_path": "numpyro_extracted/numpyro-master/notebooks/source/bayesian_hierarchical_linear_regression.ipynb",
"type": "Jupyter Notebook"
} | # Bayesian Hierarchical Linear Regression
Author: [Carlos Souza](mailto:souza@gatech.edu)
Updated by: [Chris Stoafer](mailto:cstoafer@gmail.com)
Probabilistic Machine Learning models can not only make predictions about future data, but also **model uncertainty**. In areas such as **personalized medicine**, there migh... | pyro-pplREPO_NAMEnumpyroPATH_START.@numpyro_extracted@numpyro-master@notebooks@source@bayesian_hierarchical_linear_regression.ipynb@.PATH_END.py |
{
"filename": "test_ned_remote.py",
"repo_name": "astropy/astroquery",
"repo_path": "astroquery_extracted/astroquery-main/astroquery/ipac/ned/tests/test_ned_remote.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
from astropy.table import Table
from astroquery.ipac import ned
@pytest.mark.remote_data
class TestNed:
def test_get_references(self):
response = ned.core.Ned.get_table_async(
"m1", table='references', from_year=... | astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@ipac@ned@tests@test_ned_remote.py@.PATH_END.py |
{
"filename": "example_filament_profile.py",
"repo_name": "e-koch/FilFinder",
"repo_path": "FilFinder_extracted/FilFinder-master/examples/example_filament_profile.py",
"type": "Python"
} | # Licensed under an MIT open source license - see LICENSE
from fil_finder import fil_finder_2D
from fil_finder.width_profiles import filament_profile
from fil_finder.utilities import eight_con
from astropy.io import fits
import astropy.units as u
import numpy as np
import scipy.ndimage as nd
import matplotlib.pyplot ... | e-kochREPO_NAMEFilFinderPATH_START.@FilFinder_extracted@FilFinder-master@examples@example_filament_profile.py@.PATH_END.py |
{
"filename": "demo_VEH_MAN_10t.py",
"repo_name": "projectchrono/chrono",
"repo_path": "chrono_extracted/chrono-main/src/demos/python/vehicle/demo_VEH_MAN_10t.py",
"type": "Python"
} | # =============================================================================
# PROJECT CHRONO - http://projectchrono.org
#
# Copyright (c) 2014 projectchrono.org
# All rights reserved.
#
# Use of this source code is governed by a BSD-style license that can be found
# in the LICENSE file at the top level of the distr... | projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@vehicle@demo_VEH_MAN_10t.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "astropenguin/ndradex",
"repo_path": "ndradex_extracted/ndradex-main/README.md",
"type": "Markdown"
} | # ndRADEX
[](https://pypi.org/project/ndradex/)
[](https://pypi.org/project/ndradex/)
[:
df = ds_local
# Create temporary json files
pandas_df = df.to_pandas_df(virtual=True, array_type='numpy')
tmp = tempfile.mktemp('.json')
with open(tmp, 'w') as f:
f.write(pandas_df.to_json())
tmp_df = vaex.from_json(t... | vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@tests@from_json_test.py@.PATH_END.py |
{
"filename": "apply.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/core/apply.py",
"type": "Python"
} | from __future__ import annotations
import abc
from collections import defaultdict
from collections.abc import Callable
import functools
from functools import partial
import inspect
from typing import (
TYPE_CHECKING,
Any,
Literal,
cast,
)
import numpy as np
from pandas._libs.internals import BlockVal... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@core@apply.py@.PATH_END.py |
{
"filename": "maf_run_results.py",
"repo_name": "lsst/rubin_sim",
"repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/web/maf_run_results.py",
"type": "Python"
} | __all__ = ("MafRunResults",)
import os
import re
from collections import OrderedDict
import numpy as np
import rubin_sim.maf.db as db
import rubin_sim.maf.metric_bundles as metricBundles
class MafRunResults:
"""Read and serve the MAF resultsDb_sqlite.db database for the
show_maf jinja2 templates.
Deal... | lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@web@maf_run_results.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "astropy/astroquery",
"repo_path": "astroquery_extracted/astroquery-main/astroquery/eso/tests/__init__.py",
"type": "Python"
} | astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@eso@tests@__init__.py@.PATH_END.py | |
{
"filename": "_font.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/histogram/hoverlabel/_font.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "histogram.hoverlabel"
_path_str = "histogram.hoverlabel.font"
_valid_props = {"color", "colors... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@histogram@hoverlabel@_font.py@.PATH_END.py |
{
"filename": "_array.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/error_y/_array.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="array", parent_name="scatter.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@scatter@error_y@_array.py@.PATH_END.py |
{
"filename": "common_cosmo.py",
"repo_name": "CobayaSampler/cobaya",
"repo_path": "cobaya_extracted/cobaya-master/tests/common_cosmo.py",
"type": "Python"
} | """
Body of the best-fit test for cosmological likelihoods
"""
from copy import deepcopy
from cobaya.typing import empty_dict
from cobaya.model import get_model
from cobaya.input import update_info
from cobaya.cosmo_input import create_input, planck_base_model
from cobaya.tools import recursive_update
from .common imp... | CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@tests@common_cosmo.py@.PATH_END.py |
{
"filename": "stratsi_plot.py",
"repo_name": "minkailin/stratsi",
"repo_path": "stratsi_extracted/stratsi-master/caseA/stratsi_plot.py",
"type": "Python"
} | import sys
import numpy as np
from mpi4py import MPI
import matplotlib.pyplot as plt
from matplotlib.ticker import (MultipleLocator, FormatStrFormatter,
AutoMinorLocator)
import h5py
import argparse
from scipy.integrate import simps
#import matplotlib.ticker as mtick
#custom_preamble = {
... | minkailinREPO_NAMEstratsiPATH_START.@stratsi_extracted@stratsi-master@caseA@stratsi_plot.py@.PATH_END.py |
{
"filename": "_showscale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/_showscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="showscale", parent_name="contour", **kwargs):
super(ShowscaleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@_showscale.py@.PATH_END.py |
{
"filename": "eclipse_depths_example.py",
"repo_name": "ideasrule/platon",
"repo_path": "platon_extracted/platon-master/examples/eclipse_depths_example.py",
"type": "Python"
} | import matplotlib.pyplot as plt
import numpy as np
from platon.constants import h, c, k_B, R_jup, M_jup, R_sun
from platon.eclipse_depth_calculator import EclipseDepthCalculator
from platon.TP_profile import Profile
p = Profile()
p.set_parametric(1200, 500, 0.5, 0.6, 1e6, 1900)
#p.set_isothermal(1500)
calc = EclipseD... | ideasruleREPO_NAMEplatonPATH_START.@platon_extracted@platon-master@examples@eclipse_depths_example.py@.PATH_END.py |
{
"filename": "README_zh-CN.md",
"repo_name": "alibaba/TinyNeuralNetwork",
"repo_path": "TinyNeuralNetwork_extracted/TinyNeuralNetwork-main/examples/pruner/oneshot/README_zh-CN.md",
"type": "Markdown"
} | # Oneshot剪枝样例
[English](README.md)
## 简介
OneShot剪枝是L1、L2、FPGM等结构化通道剪枝的统称(可以通过config文件中的metrics进行配置切换),是一种快速且通用性强的剪枝方案。
## Oneshot剪枝配置
参数如下:
<dl>
<dt><tt>sparsity</tt> : float</dt>
<dd>稀疏率,所有算子都会减掉该比例的通道 </dd>
<dt><tt>metrics</tt> : str</dt>
<dd>剪枝评估算法,有效值包括 (l1_norm, l2_norm, fpgm, random) </dd>
</dl>
当想调节特定算子的剪枝... | alibabaREPO_NAMETinyNeuralNetworkPATH_START.@TinyNeuralNetwork_extracted@TinyNeuralNetwork-main@examples@pruner@oneshot@README_zh-CN.md@.PATH_END.py |
{
"filename": "testLTSClientpy.py",
"repo_name": "ACS-Community/ACS",
"repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/loggingts/ws/test/testLTSClientpy.py",
"type": "Python"
} | #!/usr/bin/env python
#*******************************************************************************
# ALMA - Atacama Large Millimiter Array
# (c) Associated Universities Inc., 2002
# (c) European Southern Observatory, 2002
# Copyright by ESO (in the framework of the ALMA collaboration)
# and Cosylab 2002, All right... | ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@loggingts@ws@test@testLTSClientpy.py@.PATH_END.py |
{
"filename": "test_frequency.py",
"repo_name": "lockepatton/sonipy",
"repo_path": "sonipy_extracted/sonipy-master/tests/test_frequency.py",
"type": "Python"
} | import numpy as np
from sonipy.scales.frequency import *
import warnings
import pytest
from unittest import TestCase
C4 = 261.6 # Hz
# EXPECTED VALUES
frequency_min = C4
frequency_max = 4 * C4
# Case 1: Vmin Vmax 0 and 1 (defaults are None)
# cents_per_value w\ default vmin and vmax
cents_per_value = 2400.0
vmin ... | lockepattonREPO_NAMEsonipyPATH_START.@sonipy_extracted@sonipy-master@tests@test_frequency.py@.PATH_END.py |
{
"filename": "test_resampling.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/stats/tests/test_resampling.py",
"type": "Python"
} | import numpy as np
import pytest
from scipy.stats import bootstrap, monte_carlo_test, permutation_test
from numpy.testing import assert_allclose, assert_equal, suppress_warnings
from scipy import stats
from scipy import special
from scipy.stats import _resampling as _resampling
from scipy._lib._util import rng_integers... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@stats@tests@test_resampling.py@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="waterfall.insidetextfont", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@waterfall@insidetextfont@_color.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "ramstojh/terra",
"repo_path": "terra_extracted/terra-master/terra/__init__.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .terra import *
| ramstojhREPO_NAMEterraPATH_START.@terra_extracted@terra-master@terra@__init__.py@.PATH_END.py |
{
"filename": "paper.md",
"repo_name": "JLBLine/WODEN",
"repo_path": "WODEN_extracted/WODEN-master/joss_paper/paper.md",
"type": "Markdown"
} | ---
title: '`WODEN`: A CUDA-enabled package to simulate low-frequency radio interferometric data'
tags:
- Python
- C
- CUDA
- radio astronomy
- interferometers
authors:
- name: Jack L. B. Line
orcid: 0000-0002-9130-5920
affiliation: "1, 2" # (Multiple affiliations must be quoted)
affiliations:
- na... | JLBLineREPO_NAMEWODENPATH_START.@WODEN_extracted@WODEN-master@joss_paper@paper.md@.PATH_END.py |
{
"filename": "_ysrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/cone/_ysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="ysrc", parent_name="cone", **kwargs):
super(YsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@cone@_ysrc.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "pymc-devs/pymc",
"repo_path": "pymc_extracted/pymc-main/pymc/step_methods/__init__.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@pymc@step_methods@__init__.py@.PATH_END.py |
{
"filename": "_outlinewidth.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/heatmap/colorbar/_outlinewidth.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="outlinewidth", parent_name="heatmap.colorbar", **kwargs
):
super(OutlinewidthValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@heatmap@colorbar@_outlinewidth.py@.PATH_END.py |
{
"filename": "eos.py",
"repo_name": "PrincetonUniversity/athena",
"repo_path": "athena_extracted/athena-master/tst/regression/scripts/utils/EquationOfState/eos.py",
"type": "Python"
} | import numpy as np
from scipy.optimize import brentq
from scipy.interpolate import RectBivariateSpline as RBS
import sys
from . import brent_opt
class EOS(object):
"""Parent class to implement equation of state functions"""
def __init__(self):
"""Initialize EOS class"""
self.ideal = False # W... | PrincetonUniversityREPO_NAMEathenaPATH_START.@athena_extracted@athena-master@tst@regression@scripts@utils@EquationOfState@eos.py@.PATH_END.py |
{
"filename": "_texttemplate.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2d/_texttemplate.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="texttemplate", parent_name="histogram2d", **kwargs):
super(TexttemplateValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pare... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2d@_texttemplate.py@.PATH_END.py |
{
"filename": "clean.py",
"repo_name": "aasensio/hazel",
"repo_path": "hazel_extracted/hazel-master/runPy/clean.py",
"type": "Python"
} | import os
os.system('rm -rf build/')
os.system('rm pyhazel.c')
os.system('rm pyhazel.so')
# os.system('python setup.py build_ext --inplace')
| aasensioREPO_NAMEhazelPATH_START.@hazel_extracted@hazel-master@runPy@clean.py@.PATH_END.py |
{
"filename": "merian.py",
"repo_name": "legacysurvey/imagine",
"repo_path": "imagine_extracted/imagine-main/merian.py",
"type": "Python"
} | from glob import glob
from astrometry.util.fits import fits_table
from astrometry.util.util import Tan
import fitsio
# Find 'brick' files for N540, assume the same ones exist for other bands.
class duck(object):
pass
fns = glob('data/merian/deepCoadd_calexp/*/*/N540/deepCoadd_calexp_*_N540_*.fits')
T = fits_tab... | legacysurveyREPO_NAMEimaginePATH_START.@imagine_extracted@imagine-main@merian.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "lsst/cp_verify",
"repo_path": "cp_verify_extracted/cp_verify-main/pipelines/README.md",
"type": "Markdown"
} | # Pipeline Definitions
This directory contains pipeline definition YAML files which are used to verify calibration products with the LSST Science Pipelines.
The pipelines defined here come in three flavors: camera-specific (within named directories), camera-agnostic (top-level, if any), and building-block ingredients... | lsstREPO_NAMEcp_verifyPATH_START.@cp_verify_extracted@cp_verify-main@pipelines@README.md@.PATH_END.py |
{
"filename": "calculate_posteriors.py",
"repo_name": "jfcrenshaw/pzflow-paper",
"repo_path": "pzflow-paper_extracted/pzflow-paper-main/src/scripts/photo-z/calculate_posteriors.py",
"type": "Python"
} | """Use the pz flow ensemble to estimate redshift posteriors for test set galaxies."""
import numpy as np
from load_pzflow_catalog import load_pzflow_catalog
from pzflow import FlowEnsemble
from showyourwork.paths import user as Paths
# instantiate the paths
paths = Paths()
# load the flow ensemble
flowEns = FlowEnsem... | jfcrenshawREPO_NAMEpzflow-paperPATH_START.@pzflow-paper_extracted@pzflow-paper-main@src@scripts@photo-z@calculate_posteriors.py@.PATH_END.py |
{
"filename": "_uid.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/_uid.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class UidValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="uid", parent_name="scattersmith", **kwargs):
super(UidValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@_uid.py@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/unselected/textfont/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name="color",
parent_name="scattersmith.unselected.textfont",
**kwargs,
):
super(ColorValidator, self).__init__(
plotly_name=plo... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@unselected@textfont@_color.py@.PATH_END.py |
{
"filename": "testblob.py",
"repo_name": "dstndstn/tractor",
"repo_path": "tractor_extracted/tractor-main/projects/inference/testblob.py",
"type": "Python"
} | from __future__ import print_function
import matplotlib
matplotlib.use('Agg')
import pylab as plt
import numpy as np
import fitsio
from astrometry.util.fits import *
from astrometry.util.util import *
from astrometry.util.plotutils import *
from astrometry.sdss import *
from tractor import *
from tractor.sdss import... | dstndstnREPO_NAMEtractorPATH_START.@tractor_extracted@tractor-main@projects@inference@testblob.py@.PATH_END.py |
{
"filename": "_ohlc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/_ohlc.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Ohlc(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "ohlc"
_valid_props = {
"close",
"closesrc",
"customdata",
"customdatasrc",... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@_ohlc.py@.PATH_END.py |
{
"filename": "set_alpha.py",
"repo_name": "matplotlib/matplotlib",
"repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/color/set_alpha.py",
"type": "Python"
} | """
=================================
Ways to set a color's alpha value
=================================
Compare setting alpha by the *alpha* keyword argument and by one of the Matplotlib color
formats. Often, the *alpha* keyword is the only tool needed to add transparency to a
color. In some cases, the *(matplotlib_... | matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@color@set_alpha.py@.PATH_END.py |
{
"filename": "do_OutFoV_scan.py",
"repo_name": "Swift-BAT/NITRATES",
"repo_path": "NITRATES_extracted/NITRATES-main/nitrates/archive/do_OutFoV_scan.py",
"type": "Python"
} | import numpy as np
import os
from astropy.table import Table
from astropy.io import fits
from numba import jit, njit, prange
from scipy import interpolate
from math import erf
import healpy as hp
import pandas as pd
import argparse
import logging, traceback
# import ..config
from ..response.StructFunc import get_full_... | Swift-BATREPO_NAMENITRATESPATH_START.@NITRATES_extracted@NITRATES-main@nitrates@archive@do_OutFoV_scan.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.