metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "conv2d_transpose.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/layers/convolutional/conv2d_transpose.py",
"type": "Python"
} | from keras.src.api_export import keras_export
from keras.src.layers.convolutional.base_conv_transpose import BaseConvTranspose
@keras_export(
[
"keras.layers.Conv2DTranspose",
"keras.layers.Convolution2DTranspose",
]
)
class Conv2DTranspose(BaseConvTranspose):
"""2D transposed convolution ... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@convolutional@conv2d_transpose.py@.PATH_END.py |
{
"filename": "test_setValidPolygonIntersect.py",
"repo_name": "lsst/ip_isr",
"repo_path": "ip_isr_extracted/ip_isr-main/tests/test_setValidPolygonIntersect.py",
"type": "Python"
} | #
# LSST Data Management System
# Copyright 2008-2015 AURA/LSST.
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
#
# 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 ... | lsstREPO_NAMEip_isrPATH_START.@ip_isr_extracted@ip_isr-main@tests@test_setValidPolygonIntersect.py@.PATH_END.py |
{
"filename": "_row.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/sunburst/domain/_row.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class RowValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(self, plotly_name="row", parent_name="sunburst.domain", **kwargs):
super(RowValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
e... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@sunburst@domain@_row.py@.PATH_END.py |
{
"filename": "testDistributed3d.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/tests/unit/Distributed/testDistributed3d.py",
"type": "Python"
} | #ATS:test(SELF, np=8, label="TreeDistributedBoundary (3-D) unit tests")
import unittest
import random
import mpi
from Spheral import *
from DistributeNodes import *
from GenerateNodeDistribution3d import *
from SpheralTestUtilities import *
from generateGlobalIDs import *
#===========================================... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@unit@Distributed@testDistributed3d.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "torluca/morphofit",
"repo_path": "morphofit_extracted/morphofit-master/tests/__init__.py",
"type": "Python"
} | torlucaREPO_NAMEmorphofitPATH_START.@morphofit_extracted@morphofit-master@tests@__init__.py@.PATH_END.py | |
{
"filename": "python-reference_catboost_set_feature_names.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/python-reference_catboost_set_feature_names.md",
"type": "Markdown"
} | # set_feature_names
{% include [non_pool__set_feature_names-non_pool__set_feature_names__div](../_includes/work_src/reusage-python/non_pool__set_feature_names__div.md) %}
## {{ dl--invoke-format }} {#method-call-format}
```python
set_feature_names(feature_names)
```
## {{ dl--parameters }} {#parameters}
### featur... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@python-reference_catboost_set_feature_names.md@.PATH_END.py |
{
"filename": "_tickvals.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/scene/xaxis/_tickvals.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(
self, plotly_name="tickvals", parent_name="layout.scene.xaxis", **kwargs
):
super(TickvalsValidator, self).__init__(
plotly_name=plotly_name,
pare... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@scene@xaxis@_tickvals.py@.PATH_END.py |
{
"filename": "_shadow.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/cone/colorbar/title/font/_shadow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="shadow", parent_name="cone.colorbar.title.font", **kwargs
):
super(ShadowValidator, self).__init__(
plotly_name=plotly_name,
parent_... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@cone@colorbar@title@font@_shadow.py@.PATH_END.py |
{
"filename": "periodogram.py",
"repo_name": "wilkinsdr/pylag",
"repo_path": "pylag_extracted/pylag-master/pylag/periodogram.py",
"type": "Python"
} | """
pylag.periodogram
Provides pyLag classes for calculating periodograms/power spectra from light
curves
Classes
-------
Periodogram : Calculates the periodogram from a light curve
StackedPeriodogram : Calculates the stacked periodogram from multiple light curves
v1.0 09/03/2017 - D.R. Wilkins
"""
from .ligh... | wilkinsdrREPO_NAMEpylagPATH_START.@pylag_extracted@pylag-master@pylag@periodogram.py@.PATH_END.py |
{
"filename": "composite.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/compiler/mlir/tfr/python/composite.py",
"type": "Python"
} | # Copyright 2020 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@compiler@mlir@tfr@python@composite.py@.PATH_END.py |
{
"filename": "pca_fullfr.py",
"repo_name": "vortex-exoplanet/VIP",
"repo_path": "VIP_extracted/VIP-master/vip_hci/psfsub/pca_fullfr.py",
"type": "Python"
} | #! /usr/bin/env python
"""
Full-frame PCA algorithm for ADI, (ADI+)RDI and (ADI+)mSDI (IFS data) cubes.
Options :
- *Full-frame PCA*, using the whole cube as the PCA reference library in the
case of ADI or ADI+mSDI (IFS cube), or a sequence of reference frames
(reference star) in the case of RDI. For ADI a big da... | vortex-exoplanetREPO_NAMEVIPPATH_START.@VIP_extracted@VIP-master@vip_hci@psfsub@pca_fullfr.py@.PATH_END.py |
{
"filename": "XID+SED_example.ipynb",
"repo_name": "H-E-L-P/XID_plus",
"repo_path": "XID_plus_extracted/XID_plus-master/docs/build/html/notebooks/examples/XID+SED_example.ipynb",
"type": "Jupyter Notebook"
} | # XID+SED Example Run Script
(This is based on a Jupyter notebook, available in the [XID+ package](https://github.com/H-E-L-P/XID_plus/tree/master/docs/notebooks/examples/) and can be interactively run and edited)
XID+ is a probababilistic deblender for confusion dominated maps. It is designed to:
1. Use a MCMC base... | H-E-L-PREPO_NAMEXID_plusPATH_START.@XID_plus_extracted@XID_plus-master@docs@build@html@notebooks@examples@XID+SED_example.ipynb@.PATH_END.py |
{
"filename": "_legend.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/box/_legend.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(self, plotly_name="legend", parent_name="box", **kwargs):
super(LegendValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
df... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@box@_legend.py@.PATH_END.py |
{
"filename": "_dtick.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/marker/colorbar/_dtick.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DtickValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self, plotly_name="dtick", parent_name="scattermapbox.marker.colorbar", **kwargs
):
super(DtickValidator, self).__init__(
plotly_name=plotly_name,
parent_n... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@marker@colorbar@_dtick.py@.PATH_END.py |
{
"filename": "clean.py",
"repo_name": "sophiasosafiscella/highfluencetiming",
"repo_path": "highfluencetiming_extracted/highfluencetiming-main/MeerGuard/coast_guard/clean.py",
"type": "Python"
} | #!/usr/bin/env python
"""
Given a PSRCHIVE archive clean it up.
Patrick Lazarus, Nov. 11, 2011
"""
import optparse
import sys
import types
import re
import shutil
import os
import tempfile
import argparse
import warnings
import numpy as np
import scipy.stats
import matplotlib.pyplot as plt
import matplotlib
matplotl... | sophiasosafiscellaREPO_NAMEhighfluencetimingPATH_START.@highfluencetiming_extracted@highfluencetiming-main@MeerGuard@coast_guard@clean.py@.PATH_END.py |
{
"filename": "_linepositionsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/waterfall/textfont/_linepositionsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="linepositionsrc", parent_name="waterfall.textfont", **kwargs
):
super(LinepositionsrcValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@waterfall@textfont@_linepositionsrc.py@.PATH_END.py |
{
"filename": "make_redundant_visibilities.py",
"repo_name": "nithyanandan/PRISim",
"repo_path": "PRISim_extracted/PRISim-master/scripts/make_redundant_visibilities.py",
"type": "Python"
} | #!python
import yaml
import argparse
import numpy as NP
from prisim import interferometry as RI
import write_PRISim_visibilities as PRISimWriter
import ipdb as PDB
if __name__ == '__main__':
## Parse input arguments
parser = argparse.ArgumentParser(description='Program to duplicate redundant baseline me... | nithyanandanREPO_NAMEPRISimPATH_START.@PRISim_extracted@PRISim-master@scripts@make_redundant_visibilities.py@.PATH_END.py |
{
"filename": "IMRPhenomD_NRTidalv2.py",
"repo_name": "CosmoStatGW/WF4Py",
"repo_path": "WF4Py_extracted/WF4Py-master/WF4Py/waveform_models/IMRPhenomD_NRTidalv2.py",
"type": "Python"
} | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2022 Francesco Iacovelli <francesco.iacovelli@unige.ch>
#
# All rights reserved. Use of this source code is governed by the
# license that can be found in the LICENSE file.
import numpy as np
import os
from WF4Py import WFutils as utils
from .WF... | CosmoStatGWREPO_NAMEWF4PyPATH_START.@WF4Py_extracted@WF4Py-master@WF4Py@waveform_models@IMRPhenomD_NRTidalv2.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/cone/legendgrouptitle/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... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@cone@legendgrouptitle@font@__init__.py@.PATH_END.py |
{
"filename": "misc.py",
"repo_name": "Rob685/hhe_eos_misc",
"repo_path": "hhe_eos_misc_extracted/hhe_eos_misc-main/misc/misc.py",
"type": "Python"
} | from misc import misc_sch, misc_lor, misc_brygoo, misc_pfa
import numpy as np
from scipy.interpolate import interp1d
from scipy.interpolate import RegularGridInterpolator as RGI
from scipy.optimize import root
"""
This file calls the individual miscibility curves and
contains wrappers to get the miscibility ... | Rob685REPO_NAMEhhe_eos_miscPATH_START.@hhe_eos_misc_extracted@hhe_eos_misc-main@misc@misc.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "spacetelescope/jdaviz",
"repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/configs/default/plugins/data_tools/__init__.py",
"type": "Python"
} | from .data_tools import * # noqa
| spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@configs@default@plugins@data_tools@__init__.py@.PATH_END.py |
{
"filename": "persistent_compilation_cache.md",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/docs/persistent_compilation_cache.md",
"type": "Markdown"
} | # Persistent compilation cache
<!--* freshness: { reviewed: '2024-11-07' } *-->
JAX has an optional disk cache for compiled programs. If enabled, JAX will
store copies of compiled programs on disk, which can save recompilation time
when running the same or similar tasks repeatedly.
Note: if the compilation cache is ... | googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@docs@persistent_compilation_cache.md@.PATH_END.py |
{
"filename": "_angle.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/marker/_angle.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AngleValidator(_plotly_utils.basevalidators.AngleValidator):
def __init__(self, plotly_name="angle", parent_name="scattergeo.marker", **kwargs):
super(AngleValidator, 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@scattergeo@marker@_angle.py@.PATH_END.py |
{
"filename": "markers.py",
"repo_name": "davidharvey1986/pyRRG",
"repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/markers.py",
"type": "Python"
} | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import operator
import os
import platform
import sys
from pkg_resources.e... | davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pkg_resources@_vendor@packaging@markers.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/sparse/linalg/_eigen/setup.py",
"type": "Python"
} | def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('_eigen',parent_package,top_path)
config.add_subpackage('arpack')
config.add_subpackage('lobpcg')
config.add_data_dir('tests')
return config
if __name__ == '__main... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@sparse@linalg@_eigen@setup.py@.PATH_END.py |
{
"filename": "_hovertext.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymap/_hovertext.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HovertextValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="hovertext", parent_name="densitymap", **kwargs):
super(HovertextValidator, 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@densitymap@_hovertext.py@.PATH_END.py |
{
"filename": "convert_from_json.py",
"repo_name": "alibaba/TinyNeuralNetwork",
"repo_path": "TinyNeuralNetwork_extracted/TinyNeuralNetwork-main/examples/converter/convert_from_json.py",
"type": "Python"
} | import argparse
import os
import torch
from tinynn.converter import TFLiteConverter
from tinynn.util.converter_util import export_converter_files, parse_config
CURRENT_PATH = os.path.abspath(os.path.dirname(__file__))
def export_files():
from models.cifar10.mobilenet import DEFAULT_STATE_DICT, Mobilenet
mo... | alibabaREPO_NAMETinyNeuralNetworkPATH_START.@TinyNeuralNetwork_extracted@TinyNeuralNetwork-main@examples@converter@convert_from_json.py@.PATH_END.py |
{
"filename": "convolve_resample_data.py",
"repo_name": "bronreichardtchu/koffee",
"repo_path": "koffee_extracted/koffee-main/convolve_resample_data.py",
"type": "Python"
} | """
NAME:
convolve_resample_data.py
AUTHOR:
Bronwyn Reichardt Chu
Swinburne
2021
EMAIL:
<breichardtchu@swin.edu.au>
PURPOSE:
To convolve and resample the data to match different data sets
Written on MacOS Mojave 10.14.5, with Python 3.7
FUNCTIONS INCLUDED:
"""
import numpy as np
import matplotlib.pyplot a... | bronreichardtchuREPO_NAMEkoffeePATH_START.@koffee_extracted@koffee-main@convolve_resample_data.py@.PATH_END.py |
{
"filename": "_alignsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnel/hoverlabel/_alignsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="alignsrc", parent_name="funnel.hoverlabel", **kwargs
):
super(AlignsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnel@hoverlabel@_alignsrc.py@.PATH_END.py |
{
"filename": "views.py",
"repo_name": "RafiKueng/SpaghettiLens",
"repo_path": "SpaghettiLens_extracted/SpaghettiLens-master/_backup2/apps/lenses/views.py",
"type": "Python"
} | from __future__ import absolute_import
import os
#import re
import hashlib
import requests
#from django.shortcuts import render
from django.http import HttpResponse, JsonResponse, HttpResponsePermanentRedirect #, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.template import R... | RafiKuengREPO_NAMESpaghettiLensPATH_START.@SpaghettiLens_extracted@SpaghettiLens-master@_backup2@apps@lenses@views.py@.PATH_END.py |
{
"filename": "_tickformatstops.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickformatstops.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator):
def __init__(
self,
plotly_name="tickformatstops",
parent_name="indicator.gauge.axis",
**kwargs,
):
super(TickformatstopsValidator, self).__init__(
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@indicator@gauge@axis@_tickformatstops.py@.PATH_END.py |
{
"filename": "command_line_tools.py",
"repo_name": "cta-observatory/ctapipe",
"repo_path": "ctapipe_extracted/ctapipe-main/examples/core/command_line_tools.py",
"type": "Python"
} | """
Creating command-line Tools
===========================
"""
from time import sleep
from ctapipe.core import Component, TelescopeComponent, Tool
from ctapipe.core.traits import (
FloatTelescopeParameter,
Integer,
Path,
TraitError,
observe,
)
from ctapipe.instrument import SubarrayDescription
f... | cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@examples@core@command_line_tools.py@.PATH_END.py |
{
"filename": "_uid.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/_uid.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class UidValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="uid", parent_name="scattergl", **kwargs):
super(UidValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_typ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@_uid.py@.PATH_END.py |
{
"filename": "export.py",
"repo_name": "vaexio/vaex",
"repo_path": "vaex_extracted/vaex-master/packages/vaex-astro/vaex/astro/export.py",
"type": "Python"
} | __author__ = 'maartenbreddels'
import os
import numpy as np
import logging
import vaex
import vaex.utils
import vaex.execution
import vaex.export
import vaex.hdf5.dataset
max_length = int(1e5)
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
try:
import h5py
except:
if not on_rtd:
raise
logger ... | vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-astro@vaex@astro@export.py@.PATH_END.py |
{
"filename": "_valueminus.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/error_z/_valueminus.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="valueminus", parent_name="scatter3d.error_z", **kwargs
):
super(ValueminusValidator, self).__init__(
plotly_name=plotly_name,
pa... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter3d@error_z@_valueminus.py@.PATH_END.py |
{
"filename": "_autocolorscale.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/marker/_autocolorscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="autocolorscale", parent_name="scatter.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@scatter@marker@_autocolorscale.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "neuraloperator/neuraloperator",
"repo_path": "neuraloperator_extracted/neuraloperator-main/neuralop/data/datasets/tests/__init__.py",
"type": "Python"
} | neuraloperatorREPO_NAMEneuraloperatorPATH_START.@neuraloperator_extracted@neuraloperator-main@neuralop@data@datasets@tests@__init__.py@.PATH_END.py | |
{
"filename": "_outsidetextfont.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram/_outsidetextfont.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name="outsidetextfont", parent_name="histogram", **kwargs
):
super(OutsidetextfontValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram@_outsidetextfont.py@.PATH_END.py |
{
"filename": "cfg.py",
"repo_name": "DaneSpaeth/pyoscillot",
"repo_path": "pyoscillot_extracted/pyoscillot-main/pyoscillot/cfg.py",
"type": "Python"
} | import configparser
from pathlib import Path
import matplotlib
def parse_global_ini():
""" Parse the global.ini file.
Return parameters as dictionary.
"""
config = configparser.ConfigParser()
config.read("/home/dspaeth/pyoscillot/pyoscillot/global.ini")
conf_dict = {}
conf = config["D... | DaneSpaethREPO_NAMEpyoscillotPATH_START.@pyoscillot_extracted@pyoscillot-main@pyoscillot@cfg.py@.PATH_END.py |
{
"filename": "Tools.py",
"repo_name": "AndrewSellek/PLUTO_PRIZMO",
"repo_path": "PLUTO_PRIZMO_extracted/PLUTO_PRIZMO-main/Tools/pyPLUTO/build/lib/pyPLUTO/Tools.py",
"type": "Python"
} | from __future__ import division
import numpy as np
import scipy.ndimage
from scipy.interpolate import interp1d, UnivariateSpline
class Tools(object):
"""
This Class has all the functions doing basic mathematical
operations to the vector or scalar fields.
It is called after pyPLUTO.pload object is defined.
"""
... | AndrewSellekREPO_NAMEPLUTO_PRIZMOPATH_START.@PLUTO_PRIZMO_extracted@PLUTO_PRIZMO-main@Tools@pyPLUTO@build@lib@pyPLUTO@Tools.py@.PATH_END.py |
{
"filename": "_shadowsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_shadowsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="shadowsrc",
parent_name="choroplethmapbox.hoverlabel.font",
**kwargs,
):
super(ShadowsrcValidator, self).__init__(
plotl... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choroplethmapbox@hoverlabel@font@_shadowsrc.py@.PATH_END.py |
{
"filename": "_size.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/splom/unselected/marker/_size.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="size", parent_name="splom.unselected.marker", **kwargs
):
super(SizeValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pa... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@splom@unselected@marker@_size.py@.PATH_END.py |
{
"filename": "_width.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/_width.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="width", parent_name="choroplethmapbox.marker.line", **kwargs
):
super(WidthValidator, self).__init__(
plotly_name=plotly_name,
parent... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choroplethmapbox@marker@line@_width.py@.PATH_END.py |
{
"filename": "focal_loss.py",
"repo_name": "pytorch/vision",
"repo_path": "vision_extracted/vision-main/torchvision/ops/focal_loss.py",
"type": "Python"
} | import torch
import torch.nn.functional as F
from ..utils import _log_api_usage_once
def sigmoid_focal_loss(
inputs: torch.Tensor,
targets: torch.Tensor,
alpha: float = 0.25,
gamma: float = 2,
reduction: str = "none",
) -> torch.Tensor:
"""
Loss used in RetinaNet for dense detection: http... | pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@torchvision@ops@focal_loss.py@.PATH_END.py |
{
"filename": "coco_to_yolo_converter.py",
"repo_name": "ESA-Datalabs/XAMI-model",
"repo_path": "XAMI-model_extracted/XAMI-model-main/xami_model/dataset/coco_to_yolo_converter.py",
"type": "Python"
} | import json
import os
import shutil
from . import dataset_utils
import matplotlib.pyplot as plt
import numpy as np
import cv2
import yaml
class COCOToYOLOConverter:
def __init__(self, input_path, output_path, annotations_file, plot_yolo_masks=False):
self.input_path = input_path
self.output_path = ... | ESA-DatalabsREPO_NAMEXAMI-modelPATH_START.@XAMI-model_extracted@XAMI-model-main@xami_model@dataset@coco_to_yolo_converter.py@.PATH_END.py |
{
"filename": "tophat_frfilter_run.py",
"repo_name": "HERA-Team/hera_cal",
"repo_path": "hera_cal_extracted/hera_cal-main/scripts/tophat_frfilter_run.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2020 the HERA Project
# Licensed under the MIT License
"""Command-line drive script for hera_cal.xtalk_filter with baseline parallelization. Only performs DAYENU Filtering"""
from hera_cal import frf
import sys
import hera_cal.io as io
from hera_cal._cli_tools... | HERA-TeamREPO_NAMEhera_calPATH_START.@hera_cal_extracted@hera_cal-main@scripts@tophat_frfilter_run.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "qubvel/segmentation_models.pytorch",
"repo_path": "segmentation_models.pytorch_extracted/segmentation_models.pytorch-main/segmentation_models_pytorch/decoders/pspnet/__init__.py",
"type": "Python"
} | from .model import PSPNet
__all__ = ["PSPNet"]
| qubvelREPO_NAMEsegmentation_models.pytorchPATH_START.@segmentation_models.pytorch_extracted@segmentation_models.pytorch-main@segmentation_models_pytorch@decoders@pspnet@__init__.py@.PATH_END.py |
{
"filename": "posterior_nn_test.py",
"repo_name": "sbi-dev/sbi",
"repo_path": "sbi_extracted/sbi-main/tests/posterior_nn_test.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 __future__ import annotations
import pytest
import torch
from torch import eye, ones, zeros
from torch.distributions import MultivariateNormal
from... | sbi-devREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@tests@posterior_nn_test.py@.PATH_END.py |
{
"filename": "data_market-checkpoint.ipynb",
"repo_name": "erusseil/MvSR-analysis",
"repo_path": "MvSR-analysis_extracted/MvSR-analysis-main/real_data/.ipynb_checkpoints/data_market-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | ```python
import sys, os
import pandas as pd
import sympy as sp
import numpy as np
import matplotlib.pyplot as plt
import astropy
import shutil
import pyoperon as Operon
from iminuit import Minuit
from iminuit.cost import LeastSquares
import seaborn as sns
from os import listdir
from os.path import isfile, join
from sc... | erusseilREPO_NAMEMvSR-analysisPATH_START.@MvSR-analysis_extracted@MvSR-analysis-main@real_data@.ipynb_checkpoints@data_market-checkpoint.ipynb@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/covariance/tests/__init__.py",
"type": "Python"
} | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@covariance@tests@__init__.py@.PATH_END.py | |
{
"filename": "_version.py",
"repo_name": "dirac-institute/hybrid_sso_catalogue",
"repo_path": "hybrid_sso_catalogue_extracted/hybrid_sso_catalogue-main/hybridcat/_version.py",
"type": "Python"
} | __version__ = "0.0.0" | dirac-instituteREPO_NAMEhybrid_sso_cataloguePATH_START.@hybrid_sso_catalogue_extracted@hybrid_sso_catalogue-main@hybridcat@_version.py@.PATH_END.py |
{
"filename": "_size.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/map/layer/symbol/textfont/_size.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name="size",
parent_name="layout.map.layer.symbol.textfont",
**kwargs,
):
super(SizeValidator, self).__init__(
plotly_name=plotl... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@map@layer@symbol@textfont@_size.py@.PATH_END.py |
{
"filename": "spinneret.py",
"repo_name": "astrobel/spinneret",
"repo_path": "spinneret_extracted/spinneret-master/spinneret.py",
"type": "Python"
} | import os
os.environ['MKL_NUM_THREADS'] = '1'
import pandas as pd
import numpy as np
import lightkurve as lk
import scipy.interpolate as spi
import scipy.signal as sps
import scipy.ndimage as spn
import matplotlib.pyplot as plt
import matplotlib as mpl
import astropy.timeseries as ts
from astropy import units as u
imp... | astrobelREPO_NAMEspinneretPATH_START.@spinneret_extracted@spinneret-master@spinneret.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "jvanzand/ethraid",
"repo_path": "ethraid_extracted/ethraid-main/README.md",
"type": "Markdown"
} | # Ethraid
Characterize long-period companions with partial orbits.
Please cite Van Zandt \& Petigura (2024, Accepted) and the following DOI if you make use of this software in your research.
[](https://zenodo.org/doi/10.5281/zenodo.10841606)
## Environment
### Create new... | jvanzandREPO_NAMEethraidPATH_START.@ethraid_extracted@ethraid-main@README.md@.PATH_END.py |
{
"filename": "order_rectification.py",
"repo_name": "Keck-DataReductionPipelines/KPF-Pipeline",
"repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/modules/spectral_extraction/src/order_rectification.py",
"type": "Python"
} | # Standard dependencies
"""
This module defines class OrderRectification which inherits from `KPF0_Primitive` and provides methods to perform
the event on order rectification in the recipe.
Description:
* Method `__init__`:
OrderRectification constructor, the following arguments are pa... | Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@KPF-Pipeline-master@modules@spectral_extraction@src@order_rectification.py@.PATH_END.py |
{
"filename": "JH_2015.py",
"repo_name": "CaymanUnterborn/ExoPlex",
"repo_path": "ExoPlex_extracted/ExoPlex-master/ExoPlex/burnman/minerals/JH_2015.py",
"type": "Python"
} | # This file is part of BurnMan - a thermoelastic and thermodynamic toolkit
# for the Earth and Planetary Sciences
# Copyright (C) 2012 - 2017 by the BurnMan team, released under the GNU
# GPL v2 or later.
"""
JH_2015
^^^^^^^
Solid solutions from Jennings and Holland, 2015 and references therein
(10.1093/petrology/eg... | CaymanUnterbornREPO_NAMEExoPlexPATH_START.@ExoPlex_extracted@ExoPlex-master@ExoPlex@burnman@minerals@JH_2015.py@.PATH_END.py |
{
"filename": "core.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/convolution/core.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module contains the convolution and filter functionalities of astropy.
A few conceptual notes:
A filter kernel is mainly characterized by its response function. In the 1D
case we speak of "impulse response function", in the 2D case we call it "po... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@convolution@core.py@.PATH_END.py |
{
"filename": "smalltalk.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/smalltalk.py",
"type": "Python"
} | """
pygments.lexers.smalltalk
~~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for Smalltalk and related languages.
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, include, bygroups, default
from pygments.token ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@smalltalk.py@.PATH_END.py |
{
"filename": "test_dtype.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/core/tests/test_dtype.py",
"type": "Python"
} | import sys
import operator
import pytest
import ctypes
import gc
import types
from typing import Any
import numpy as np
import numpy.dtypes
from numpy.core._rational_tests import rational
from numpy.core._multiarray_tests import create_custom_field_dtype
from numpy.testing import (
assert_, assert_equal, assert_ar... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@core@tests@test_dtype.py@.PATH_END.py |
{
"filename": "tx.py",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/crossbar/bridge/mqtt/tx.py",
"type": "Python"
} | #####################################################################################
#
# Copyright (c) typedef int GmbH
# SPDX-License-Identifier: EUPL-1.2
#
#####################################################################################
import attr
import collections
from itertools import count
import txai... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@bridge@mqtt@tx.py@.PATH_END.py |
{
"filename": "_ticktext.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticktext.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(
self,
plotly_name="ticktext",
parent_name="scattercarpet.marker.colorbar",
**kwargs,
):
super(TicktextValidator, self).__init__(
plotl... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@marker@colorbar@_ticktext.py@.PATH_END.py |
{
"filename": "lumEffDialog.py",
"repo_name": "wmpg/Supracenter",
"repo_path": "Supracenter_extracted/Supracenter-master/supra/GUI/Dialogs/lumEffDialog.py",
"type": "Python"
} |
###############
### IMPORTS
###############
import os
import numpy as np
import pickle
import datetime
import matplotlib.pyplot as plt
from scipy.interpolate import interp1d
from functools import partial
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import pyqtgraph as pg
from s... | wmpgREPO_NAMESupracenterPATH_START.@Supracenter_extracted@Supracenter-master@supra@GUI@Dialogs@lumEffDialog.py@.PATH_END.py |
{
"filename": "_mechanic_test.py",
"repo_name": "deepmind/optax",
"repo_path": "optax_extracted/optax-main/optax/contrib/_mechanic_test.py",
"type": "Python"
} | # Copyright 2019 DeepMind Technologies Limited. 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 ... | deepmindREPO_NAMEoptaxPATH_START.@optax_extracted@optax-main@optax@contrib@_mechanic_test.py@.PATH_END.py |
{
"filename": "prompt_values.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/core/langchain_core/prompt_values.py",
"type": "Python"
} | """**Prompt values** for language model prompts.
Prompt values are used to represent different pieces of prompts.
They can be used to represent text, images, or chat message pieces.
"""
from __future__ import annotations
from abc import ABC, abstractmethod
from collections.abc import Sequence
from typing import Lite... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@core@langchain_core@prompt_values.py@.PATH_END.py |
{
"filename": "lion_test.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/src/optimizers/lion_test.py",
"type": "Python"
} | import numpy as np
import pytest
import keras
from keras.src import backend
from keras.src import ops
from keras.src import testing
from keras.src.optimizers.lion import Lion
class LionTest(testing.TestCase):
def test_config(self):
optimizer = Lion(
learning_rate=0.5,
beta_1=0.5,
... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@optimizers@lion_test.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "lsst-uk/lasair-lsst",
"repo_path": "lasair-lsst_extracted/lasair-lsst-main/webserver/lasairapi/migrations/__init__.py",
"type": "Python"
} | lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@webserver@lasairapi@migrations@__init__.py@.PATH_END.py | |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/table/hoverlabel/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._font import Font
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
| plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@table@hoverlabel@__init__.py@.PATH_END.py |
{
"filename": "Diagnostic_Plots.py",
"repo_name": "Autostronomy/AutoProf",
"repo_path": "AutoProf_extracted/AutoProf-main/autoprof/autoprofutils/Diagnostic_Plots.py",
"type": "Python"
} | import numpy as np
from astropy.visualization import LogStretch
from astropy.visualization.mpl_normalize import ImageNormalize
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse, Wedge
import matplotlib
from itertools import compress
import os
from .SharedFunctions import (
LSBImage,
AddSca... | AutostronomyREPO_NAMEAutoProfPATH_START.@AutoProf_extracted@AutoProf-main@autoprof@autoprofutils@Diagnostic_Plots.py@.PATH_END.py |
{
"filename": "single_and_binary_models.ipynb",
"repo_name": "astro-datalab/notebooks-latest",
"repo_path": "notebooks-latest_extracted/notebooks-latest-master/05_Contrib/LSST_Sim/single_and_binary_models.ipynb",
"type": "Jupyter Notebook"
} | ```python
__nbid__ = '0061'
__author__ = 'Giada Pastorelli <gpastorelli.astro@gmail.com>'
__version__ = '20240601' # yyyymmdd
__datasets__ = ['lsst_sim']
__keywords__ = ['science example', 'tutorial', 'Milky Way', 'catalogues', 'plot:histogram', 'plot:cmd', 'plot:color-color']
```
# Combining single and binary models:... | astro-datalabREPO_NAMEnotebooks-latestPATH_START.@notebooks-latest_extracted@notebooks-latest-master@05_Contrib@LSST_Sim@single_and_binary_models.ipynb@.PATH_END.py |
{
"filename": "gradDivVectorFieldListMashInst.cc.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/FieldOperations/gradDivVectorFieldListMashInst.cc.py",
"type": "Python"
} | text = """
//------------------------------------------------------------------------------
// Explicit instantiation.
//------------------------------------------------------------------------------
#include "FieldOperations/gradDivVectorFieldListMash.cc"
#include "Geometry/Dimension.hh"
namespace Spheral {
//======... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@FieldOperations@gradDivVectorFieldListMashInst.cc.py@.PATH_END.py |
{
"filename": "priors_beta.py",
"repo_name": "bd-j/prospector",
"repo_path": "prospector_extracted/prospector-main/prospect/models/priors_beta.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""priors_beta.py -- This module contains the prospector-beta priors.
Ref: Wang, Leja, et al., 2023, ApJL.
Specifically, this module includes the following priors --
1. PhiMet : p(logM|z)p(Z*|logM), i.e., mass function + mass-met
2. ZredMassMet : p(z)p(logM|z)p... | bd-jREPO_NAMEprospectorPATH_START.@prospector_extracted@prospector-main@prospect@models@priors_beta.py@.PATH_END.py |
{
"filename": "lsoda.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/integrate/_ivp/lsoda.py",
"type": "Python"
} | import numpy as np
from scipy.integrate import ode
from .common import validate_tol, validate_first_step, warn_extraneous
from .base import OdeSolver, DenseOutput
class LSODA(OdeSolver):
"""Adams/BDF method with automatic stiffness detection and switching.
This is a wrapper to the Fortran solver from ODEPACK... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@integrate@_ivp@lsoda.py@.PATH_END.py |
{
"filename": "readme.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/build/platform/wine/readme.md",
"type": "Markdown"
} | ## These are resources of wine (Windows execution layer for Linux)
- wine32.json and wine.json describe wine for 32bit (i686) and 64bit (x86_64) tests. It is unclear why separate packages are needed. As of now this is hard-coded in ya-bin even though both resources contain wine (32bit) and wine64 (64bit) binaries. Buil... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@build@platform@wine@readme.md@.PATH_END.py |
{
"filename": "_gcutils.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/_lib/_gcutils.py",
"type": "Python"
} | """
Module for testing automatic garbage collection of objects
.. autosummary::
:toctree: generated/
set_gc_state - enable or disable garbage collection
gc_state - context manager for given state of garbage collector
assert_deallocated - context manager to check for circular references on object
"""
impo... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@_lib@_gcutils.py@.PATH_END.py |
{
"filename": "AnalysedTreeTransforms.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/tools/cython/Cython/Compiler/AnalysedTreeTransforms.py",
"type": "Python"
} | from __future__ import absolute_import
from .Visitor import ScopeTrackingTransform
from .Nodes import StatListNode, SingleAssignmentNode, CFuncDefNode, DefNode
from .ExprNodes import DictNode, DictItemNode, NameNode, UnicodeNode
from .PyrexTypes import py_object_type
from .StringEncoding import EncodedString
from . im... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@cython@Cython@Compiler@AnalysedTreeTransforms.py@.PATH_END.py |
{
"filename": "suntimecorr.py",
"repo_name": "sebastian-zieba/PACMAN",
"repo_path": "PACMAN_extracted/PACMAN-master/src/pacman/lib/suntimecorr.py",
"type": "Python"
} | """Author: carthik
Revision: 267
Date: 2010-06-08 22:33:22 -0400 (Tue, 08 Jun 2010)
HeadURL: file:///home/esp01/svn/code/python/branches/patricio/photpipe/lib/suntimecorr.py
Id: suntimecorr.py 267 2010-06-09 02:33:22Z carthik
"""
import re
from typing import List
from pathlib import Path
import astropy.time
import num... | sebastian-ziebaREPO_NAMEPACMANPATH_START.@PACMAN_extracted@PACMAN-master@src@pacman@lib@suntimecorr.py@.PATH_END.py |
{
"filename": "custom_nest_trace_type.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/core/function/trace_type/custom_nest_trace_type.py",
"type": "Python"
} | # Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@core@function@trace_type@custom_nest_trace_type.py@.PATH_END.py |
{
"filename": "radsphere.py",
"repo_name": "AMReX-Astro/Castro",
"repo_path": "Castro_extracted/Castro-main/Exec/radiation_tests/RadSphere/testsuite_analysis/radsphere.py",
"type": "Python"
} | #!/usr/bin/env python3
#
# this script is meant to be run from the test suite. It will read in
# the plotfile data from the RadSphere problem (using the fradsphere
# tool) and compare to the analytic solution, and output a plot.
#
# run as: ./radsphere.py castroradiation_dir plotfle
import sys
import os
import shutil... | AMReX-AstroREPO_NAMECastroPATH_START.@Castro_extracted@Castro-main@Exec@radiation_tests@RadSphere@testsuite_analysis@radsphere.py@.PATH_END.py |
{
"filename": "_hoverinfo.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/waterfall/_hoverinfo.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator):
def __init__(self, plotly_name="hoverinfo", parent_name="waterfall", **kwargs):
super(HoverinfoValidator, 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@waterfall@_hoverinfo.py@.PATH_END.py |
{
"filename": "_showlabels.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2dcontour/contours/_showlabels.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowlabelsValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self,
plotly_name="showlabels",
parent_name="histogram2dcontour.contours",
**kwargs
):
super(ShowlabelsValidator, self).__init__(
plot... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2dcontour@contours@_showlabels.py@.PATH_END.py |
{
"filename": "plot_segmentation_mask_gallery.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/visualization/plot_segmentation_mask_gallery.py",
"type": "Python"
} | import functools
import numpy as np
from keras.src import backend
from keras.src import ops
from keras.src.api_export import keras_export
from keras.src.visualization.draw_segmentation_masks import (
draw_segmentation_masks,
)
from keras.src.visualization.plot_image_gallery import plot_image_gallery
@keras_expo... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@visualization@plot_segmentation_mask_gallery.py@.PATH_END.py |
{
"filename": "aleph_alpha.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/text_embedding/aleph_alpha.ipynb",
"type": "Jupyter Notebook"
} | # Aleph Alpha
There are two possible ways to use Aleph Alpha's semantic embeddings. If you have texts with a dissimilar structure (e.g. a Document and a Query) you would want to use asymmetric embeddings. Conversely, for texts with comparable structures, symmetric embeddings are the suggested approach.
## Asymmetric
... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@text_embedding@aleph_alpha.ipynb@.PATH_END.py |
{
"filename": "monte.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/lexers/monte.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
pygments.lexers.monte
~~~~~~~~~~~~~~~~~~~~~
Lexer for the Monte programming language.
:copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.token import Comment, Error, Keyword, Name, Number, Operat... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@lexers@monte.py@.PATH_END.py |
{
"filename": "_stylesrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_stylesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="stylesrc", parent_name="contour.hoverlabel.font", **kwargs
):
super(StylesrcValidator, self).__init__(
plotly_name=plotly_name,
paren... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contour@hoverlabel@font@_stylesrc.py@.PATH_END.py |
{
"filename": "evaluate.py",
"repo_name": "utsav-akhaury/understanding-unets",
"repo_path": "understanding-unets_extracted/understanding-unets-master/learning_wavelets/evaluate.py",
"type": "Python"
} | import numpy as np
try:
from runstats import Statistics
from skimage.metrics import peak_signal_noise_ratio, structural_similarity
except ModuleNotFoundError:
# TODO: this is just a quick hack to be able to submit jobs on the TGCC,
# it has to be removed once they are installed.
print("runstats and/... | utsav-akhauryREPO_NAMEunderstanding-unetsPATH_START.@understanding-unets_extracted@understanding-unets-master@learning_wavelets@evaluate.py@.PATH_END.py |
{
"filename": "_random_test.py",
"repo_name": "deepmind/optax",
"repo_path": "optax_extracted/optax-main/optax/tree_utils/_random_test.py",
"type": "Python"
} | # Copyright 2021 DeepMind Technologies Limited. 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 ... | deepmindREPO_NAMEoptaxPATH_START.@optax_extracted@optax-main@optax@tree_utils@_random_test.py@.PATH_END.py |
{
"filename": "kernelspecapp.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/jupyter-client/py2/jupyter_client/kernelspecapp.py",
"type": "Python"
} |
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
import errno
import os.path
import sys
import json
from traitlets.config.application import Application
from jupyter_core.application import (
JupyterApp, base_flags, base_a... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@jupyter-client@py2@jupyter_client@kernelspecapp.py@.PATH_END.py |
{
"filename": "test_evrard.py",
"repo_name": "amusecode/amuse",
"repo_path": "amuse_extracted/amuse-main/examples/applications/test_evrard.py",
"type": "Python"
} | import os
# import sys
import numpy
try:
from matplotlib import pyplot
HAS_MATPLOTLIB = True
except ImportError:
HAS_MATPLOTLIB = False
from amuse.community.fi import interface as interface
from amuse.ext.evrard_test import MakeEvrardTest
# from amuse.ext.evrard_test import regular_grid_unit_cube
# from a... | amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@examples@applications@test_evrard.py@.PATH_END.py |
{
"filename": "test_calibrator.py",
"repo_name": "cta-observatory/ctapipe",
"repo_path": "ctapipe_extracted/ctapipe-main/src/ctapipe/calib/camera/tests/test_calibrator.py",
"type": "Python"
} | """
Tests for CameraCalibrator and related functions
"""
from copy import deepcopy
import astropy.units as u
import numpy as np
from scipy.stats import norm
from traitlets.config import Config
from ctapipe.calib.camera.calibrator import CameraCalibrator
from ctapipe.containers import ArrayEventContainer
from ctapipe... | cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@src@ctapipe@calib@camera@tests@test_calibrator.py@.PATH_END.py |
{
"filename": "Further Examples 3 - Variable spectral resolution.ipynb",
"repo_name": "ACCarnall/bagpipes",
"repo_path": "bagpipes_extracted/bagpipes-master/examples/Further Examples 3 - Variable spectral resolution.ipynb",
"type": "Jupyter Notebook"
} | # Fitting Spectroscopy with variable spectral resolution
One thing that's come up quite frequently recently is people wanting to fit spectra that have strongly variable resolution as a function of wavelength, in particular data from the JWST NIRSpec prism.
With the help of several people I've now implemented the abil... | ACCarnallREPO_NAMEbagpipesPATH_START.@bagpipes_extracted@bagpipes-master@examples@Further Examples 3 - Variable spectral resolution.ipynb@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "astropy/specutils",
"repo_path": "specutils_extracted/specutils-main/setup.py",
"type": "Python"
} | #!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# NOTE: The configuration for the package, including the name, version, and
# other information are set in the setup.cfg file.
import os
import sys
from setuptools import setup
# First provide helpful messages if contributors try... | astropyREPO_NAMEspecutilsPATH_START.@specutils_extracted@specutils-main@setup.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "glue-viz/glue",
"repo_path": "glue_extracted/glue-main/glue/viewers/image/__init__.py",
"type": "Python"
} | glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@viewers@image@__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/parcoords/line/colorbar/tickfont/_textcase.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="textcase",
parent_name="parcoords.line.colorbar.tickfont",
**kwargs,
):
super(TextcaseValidator, self).__init__(
p... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcoords@line@colorbar@tickfont@_textcase.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "astropy/photutils",
"repo_path": "photutils_extracted/photutils-main/photutils/datasets/tests/__init__.py",
"type": "Python"
} | astropyREPO_NAMEphotutilsPATH_START.@photutils_extracted@photutils-main@photutils@datasets@tests@__init__.py@.PATH_END.py | |
{
"filename": "example_selectors_langsmith.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/docs/docs/how_to/example_selectors_langsmith.ipynb",
"type": "Jupyter Notebook"
} | # How to select examples from a LangSmith dataset
import Prerequisites from "@theme/Prerequisites";
import Compatibility from "@theme/Compatibility";
<Prerequisites titlesAndLinks={[
["Chat models", "/docs/concepts/chat_models"],
["Few-shot-prompting", "/docs/concepts/few-shot-prompting"],
["LangSmith", "https:... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@how_to@example_selectors_langsmith.ipynb@.PATH_END.py |
{
"filename": "_hovertextsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/_hovertextsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="hovertextsrc", parent_name="surface", **kwargs):
super(HovertextsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@_hovertextsrc.py@.PATH_END.py |
{
"filename": "setup_package.py",
"repo_name": "adrn/SuperFreq",
"repo_path": "SuperFreq_extracted/SuperFreq-main/superfreq/tests/setup_package.py",
"type": "Python"
} | def get_package_data():
return {
_ASTROPY_PACKAGE_NAME_ + '.tests': ['coveragerc']}
| adrnREPO_NAMESuperFreqPATH_START.@SuperFreq_extracted@SuperFreq-main@superfreq@tests@setup_package.py@.PATH_END.py |
{
"filename": "_tickformat.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/barpolar/marker/colorbar/_tickformat.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="tickformat", parent_name="barpolar.marker.colorbar", **kwargs
):
super(TickformatValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@barpolar@marker@colorbar@_tickformat.py@.PATH_END.py |
{
"filename": "BrillLindquist.py",
"repo_name": "zachetienne/nrpytutorial",
"repo_path": "nrpytutorial_extracted/nrpytutorial-master/BSSN/BrillLindquist.py",
"type": "Python"
} | # This module sets up Brill-Lindquist initial data in terms of
# the variables used in BSSN_RHSs.py
# Author: Zachariah B. Etienne
# zachetie **at** gmail **dot* com
# # Setting up Two Black Hole Initial Data, in Curvilinear Coordinates
#
# ## This module sets up initial data for two black holes at rest in sp... | zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@BSSN@BrillLindquist.py@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/parcats/tickfont/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(self, plotly_name="color", parent_name="parcats.tickfont", **kwargs):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@parcats@tickfont@_color.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.