metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "go.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/document_loaders/parsers/language/go.py",
"type": "Python"
} | from typing import TYPE_CHECKING
from langchain_community.document_loaders.parsers.language.tree_sitter_segmenter import ( # noqa: E501
TreeSitterSegmenter,
)
if TYPE_CHECKING:
from tree_sitter import Language
CHUNK_QUERY = """
[
(function_declaration) @function
(type_declaration) @type... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@document_loaders@parsers@language@go.py@.PATH_END.py |
{
"filename": "windows.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/pyzmq/py2/zmq/eventloop/minitornado/platform/windows.py",
"type": "Python"
} | # NOTE: win32 support is currently experimental, and not recommended
# for production use.
from __future__ import absolute_import, division, print_function, with_statement
import ctypes
import ctypes.wintypes
# See: http://msdn.microsoft.com/en-us/library/ms724935(VS.85).aspx
SetHandleInformation = ctypes.windll.ker... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pyzmq@py2@zmq@eventloop@minitornado@platform@windows.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "larrybradley/lacosmic",
"repo_path": "lacosmic_extracted/lacosmic-main/docs/conf.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Documentation build configuration file.
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
file.
All configuration values have a default. Some values are... | larrybradleyREPO_NAMElacosmicPATH_START.@lacosmic_extracted@lacosmic-main@docs@conf.py@.PATH_END.py |
{
"filename": "sparql.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/chains/graph_qa/sparql.py",
"type": "Python"
} | from typing import TYPE_CHECKING, Any
from langchain._api import create_importer
if TYPE_CHECKING:
from langchain_community.chains.graph_qa.sparql import GraphSparqlQAChain
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling option... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@chains@graph_qa@sparql.py@.PATH_END.py |
{
"filename": "tests.py",
"repo_name": "dstndstn/astrometry.net",
"repo_path": "astrometry.net_extracted/astrometry.net-main/net/tests.py",
"type": "Python"
} | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... | dstndstnREPO_NAMEastrometry.netPATH_START.@astrometry.net_extracted@astrometry.net-main@net@tests.py@.PATH_END.py |
{
"filename": "Figure 6.ipynb",
"repo_name": "astropy/SPISEA",
"repo_path": "SPISEA_extracted/SPISEA-main/docs/paper_examples/Figure 6.ipynb",
"type": "Jupyter Notebook"
} | ## Below is the code to re-create Figure 6
### Topic: WR Star Populations Assuming Different Evolution Models
```python
from spisea import evolution, atmospheres, synthetic
from spisea import reddening as pop_red
from spisea.imf import imf, multiplicity
import numpy as np
import os
```
/Users/mwhosek/anaconda3/... | astropyREPO_NAMESPISEAPATH_START.@SPISEA_extracted@SPISEA-main@docs@paper_examples@Figure 6.ipynb@.PATH_END.py |
{
"filename": "_metasrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergl/_metasrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="metasrc", parent_name="scattergl", **kwargs):
super(MetasrcValidator, 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@scattergl@_metasrc.py@.PATH_END.py |
{
"filename": "pinecone.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/retrievers/self_query/pinecone.py",
"type": "Python"
} | from typing import TYPE_CHECKING, Any
from langchain._api import create_importer
if TYPE_CHECKING:
from langchain_community.query_constructors.pinecone import PineconeTranslator
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling o... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@retrievers@self_query@pinecone.py@.PATH_END.py |
{
"filename": "_yperiodalignment.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/contour/_yperiodalignment.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="yperiodalignment", parent_name="contour", **kwargs):
super(YperiodalignmentValidator, self).__init__(
plotly_name=plotly_name,
pare... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@contour@_yperiodalignment.py@.PATH_END.py |
{
"filename": "_kaleido.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/io/_kaleido.py",
"type": "Python"
} | from __future__ import absolute_import
from six import string_types
import os
import json
import plotly
from plotly.io._utils import validate_coerce_fig_to_dict
try:
from kaleido.scopes.plotly import PlotlyScope
scope = PlotlyScope()
# Compute absolute path to the 'plotly/package_data/' directory
roo... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@io@_kaleido.py@.PATH_END.py |
{
"filename": "_outlinecolor.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/volume/colorbar/_outlinecolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="outlinecolor", parent_name="volume.colorbar", **kwargs
):
super(OutlinecolorValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@volume@colorbar@_outlinecolor.py@.PATH_END.py |
{
"filename": "velocity_corrections.py",
"repo_name": "tamarervin/SolAster",
"repo_path": "SolAster_extracted/SolAster-main/SolAster/source/component_calculations/velocity_corrections.py",
"type": "Python"
} | """
Tamar Ervin
Date: July 7, 2021
velocity corrections
"""
import os
import sys
import numpy as np
import astropy.units as u
from astropy.coordinates import SkyCoord
import sunpy.map
from sunpy.net import Fido
from sunpy.net import attrs as a
from sunpy.coordinates import frames
sys.path.append(os.path.join(os.... | tamarervinREPO_NAMESolAsterPATH_START.@SolAster_extracted@SolAster-main@SolAster@source@component_calculations@velocity_corrections.py@.PATH_END.py |
{
"filename": "create_lightcone_21cmfast.py",
"repo_name": "micbia/serenet",
"repo_path": "serenet_extracted/serenet-main/depr/create_lightcone_21cmfast.py",
"type": "Python"
} | import matplotlib as mpl
mpl.use('agg')
import numpy as np, matplotlib.pyplot as plt, os, sys
import tools21cm as t2c, py21cmfast as p21
import matplotlib.gridspec as gridspec
import random, json
from datetime import datetime, date
from glob import glob
from tqdm import tqdm
def GenerateSeed():
# create seed for ... | micbiaREPO_NAMEserenetPATH_START.@serenet_extracted@serenet-main@depr@create_lightcone_21cmfast.py@.PATH_END.py |
{
"filename": "fink.py",
"repo_name": "nikhil-sarin/redback",
"repo_path": "redback_extracted/redback-master/redback/get_data/fink.py",
"type": "Python"
} | import os
import io
from typing import Union
import astropy.units as uu
import numpy as np
import pandas as pd
import requests
from astropy.time import Time
import redback
import redback.get_data.directory
import redback.get_data.utils
import redback.redback_errors
from redback.get_data.getter import DataGetter
from ... | nikhil-sarinREPO_NAMEredbackPATH_START.@redback_extracted@redback-master@redback@get_data@fink.py@.PATH_END.py |
{
"filename": "test_spanning_tree.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/sparse/csgraph/tests/test_spanning_tree.py",
"type": "Python"
} | """Test the minimum spanning tree function"""
import numpy as np
from numpy.testing import assert_
import numpy.testing as npt
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import minimum_spanning_tree
import pytest
@pytest.mark.skip
def test_minimum_spanning_tree():
# Create a graph with two conn... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@sparse@csgraph@tests@test_spanning_tree.py@.PATH_END.py |
{
"filename": "s1_process.py",
"repo_name": "kevin218/Eureka",
"repo_path": "Eureka_extracted/Eureka-main/src/eureka/S1_detector_processing/s1_process.py",
"type": "Python"
} | import os
import time as time_pkg
import numpy as np
from copy import deepcopy
from astropy.io import fits
from jwst.pipeline.calwebb_detector1 import Detector1Pipeline
from .ramp_fitting import Eureka_RampFitStep
from .superbias import Eureka_SuperBiasStep
from .s1_meta import S1MetaClass
from ..lib import logedit,... | kevin218REPO_NAMEEurekaPATH_START.@Eureka_extracted@Eureka-main@src@eureka@S1_detector_processing@s1_process.py@.PATH_END.py |
{
"filename": "_xpad.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/contourcarpet/colorbar/_xpad.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XpadValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="xpad", parent_name="contourcarpet.colorbar", **kwargs
):
super(XpadValidator, self).__init__(
plotly_name=plotly_name,
parent_name=par... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@contourcarpet@colorbar@_xpad.py@.PATH_END.py |
{
"filename": "eucjpprober.py",
"repo_name": "davidharvey1986/pyRRG",
"repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/chardet/eucjpprober.py",
"type": "Python"
} | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@chardet@eucjpprober.py@.PATH_END.py |
{
"filename": "_title.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/carpet/baxis/_title.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Title(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "carpet.baxis"
_path_str = "carpet.baxis.title"
_valid_props = {"font", "offset", "text"}
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@carpet@baxis@_title.py@.PATH_END.py |
{
"filename": "kepler444.py",
"repo_name": "rodluger/planetplanet",
"repo_path": "planetplanet_extracted/planetplanet-master/scripts/kepler444.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
kepler444.py |github|
---------------------
Estimates the signal-to-noise on 15 stacked
secondary eclipses for the innermost planet (b)
in the Kepler-444 system with JWST.
.. plot::
:align: center
from scripts import kepler444
kepler444._test()
... | rodlugerREPO_NAMEplanetplanetPATH_START.@planetplanet_extracted@planetplanet-master@scripts@kepler444.py@.PATH_END.py |
{
"filename": "tPyParameterSet.py",
"repo_name": "lofar-astron/DP3",
"repo_path": "DP3_extracted/DP3-master/pythondp3/test/unit/tPyParameterSet.py",
"type": "Python"
} | # Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: GPL-3.0-or-later
"""
These tests are checking that the python bindings for the ParameterSet class
behave correctly.
Script can be invoked in two ways:
- as standalone from the build/pythondp3/test/unit directory,
usin... | lofar-astronREPO_NAMEDP3PATH_START.@DP3_extracted@DP3-master@pythondp3@test@unit@tPyParameterSet.py@.PATH_END.py |
{
"filename": "_carpet.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/carpet/_carpet.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CarpetValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="carpet", parent_name="carpet", **kwargs):
super(CarpetValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
ed... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@carpet@_carpet.py@.PATH_END.py |
{
"filename": "_hoverlabel.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermapbox/_hoverlabel.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="hoverlabel", parent_name="scattermapbox", **kwargs):
super(HoverlabelValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermapbox@_hoverlabel.py@.PATH_END.py |
{
"filename": "_thickness.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/marker/colorbar/_thickness.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="thickness", parent_name="treemap.marker.colorbar", **kwargs
):
super(ThicknessValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@marker@colorbar@_thickness.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "Astroua/TurbuStat",
"repo_path": "TurbuStat_extracted/TurbuStat-master/docs/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
#
# Astropy documentation build configuration file.
#
# 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 file.
#
# All configurati... | AstrouaREPO_NAMETurbuStatPATH_START.@TurbuStat_extracted@TurbuStat-master@docs@conf.py@.PATH_END.py |
{
"filename": "makeamovie.py",
"repo_name": "fmihpc/analysator",
"repo_path": "analysator_extracted/analysator-master/trash_can/visit/makeamovie.py",
"type": "Python"
} | #!/usr/bin/python -i
#
# This file is part of Analysator.
# Copyright 2013-2016 Finnish Meteorological Institute
# Copyright 2017-2018 University of Helsinki
#
# For details of usage, see the COPYING file and read the "Rules of the Road"
# at http://www.physics.helsinki.fi/vlasiator/
#
# This program is free softwar... | fmihpcREPO_NAMEanalysatorPATH_START.@analysator_extracted@analysator-master@trash_can@visit@makeamovie.py@.PATH_END.py |
{
"filename": "mass_conversion.py",
"repo_name": "EmmanuelSchaan/ThumbStack",
"repo_path": "ThumbStack_extracted/ThumbStack-master/mass_conversion.py",
"type": "Python"
} | from headers import *
##################################################################################
##################################################################################
class MassConversionKravtsov14(object):
"""Conversions between stellar mass of the central galaxy
and halo mass of the paren... | EmmanuelSchaanREPO_NAMEThumbStackPATH_START.@ThumbStack_extracted@ThumbStack-master@mass_conversion.py@.PATH_END.py |
{
"filename": "n1_fft.py",
"repo_name": "NextGenCMB/lensitbiases",
"repo_path": "lensitbiases_extracted/lensitbiases-main/lensitbiases/n1_fft.py",
"type": "Python"
} | r"""rFFT N1 and N1 matrix main module
FFT-based N1 calculations (~ in O(ms) time per lensing multipole for Planck-like config)
This uses 5 rfft's of moderate size per L for TT, 20 for PP, 45 for MV (SQE or GMV)
Calculation of the N1 matrix comes for all cases with just 2 additional rfft's
Note:
... | NextGenCMBREPO_NAMElensitbiasesPATH_START.@lensitbiases_extracted@lensitbiases-main@lensitbiases@n1_fft.py@.PATH_END.py |
{
"filename": "computeOccurrence_ntl-checkpoint.ipynb",
"repo_name": "stevepur/DR25-occurrence-public",
"repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/GKbaseline_noMesSmear/.ipynb_checkpoints/computeOccurrence_ntl-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | ```python
import os
import requests
import pandas as pd
from astropy.io import fits
from cStringIO import StringIO
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import gamma
from scipy.optimize import minimize
from scipy.interpolate import RectBivariateSpline
import emcee
import corner
import scip... | stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@GKbaseline_noMesSmear@.ipynb_checkpoints@computeOccurrence_ntl-checkpoint.ipynb@.PATH_END.py |
{
"filename": "large_dist_test.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/pytest/large_dist_test.py",
"type": "Python"
} | import sys
import yatest.common
import pytest
from lib import (
data_file,
execute_dist_train,
local_canonical_file,
)
CATBOOST_PATH = yatest.common.binary_path("catboost/app/catboost")
SCORE_CALC_OBJ_BLOCK_SIZES = ['60', '5000000']
SCORE_CALC_OBJ_BLOCK_SIZES_IDS = ['calc_block=60', 'calc_block=5000000']... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@pytest@large_dist_test.py@.PATH_END.py |
{
"filename": "demo_ROS_urdf.py",
"repo_name": "projectchrono/chrono",
"repo_path": "chrono_extracted/chrono-main/src/demos/python/ros/demo_ROS_urdf.py",
"type": "Python"
} | # =============================================================================
# PROJECT CHRONO - http://projectchrono.org
#
# Copyright (c) 2023 projectchrono.org
# All right 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 distri... | projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@ros@demo_ROS_urdf.py@.PATH_END.py |
{
"filename": "metacal.py",
"repo_name": "esheldon/ngmix",
"repo_path": "ngmix_extracted/ngmix-master/ngmix/metacal/metacal.py",
"type": "Python"
} | """
code to create sheared images for use in metacalibration
Originally based off reading through Eric Huffs code; it has departed
significantly.
"""
import copy
import logging
from functools import lru_cache
import numpy as np
from ..gexceptions import GMixRangeError, BootPSFFailure
from ..shape import Shape
from .. ... | esheldonREPO_NAMEngmixPATH_START.@ngmix_extracted@ngmix-master@ngmix@metacal@metacal.py@.PATH_END.py |
{
"filename": "data_structures.py",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/yt/frontends/swift/data_structures.py",
"type": "Python"
} | import numpy as np
from yt.data_objects.static_output import ParticleFile
from yt.frontends.sph.data_structures import SPHDataset, SPHParticleIndex
from yt.funcs import only_on_root
from yt.utilities.logger import ytLogger as mylog
from yt.utilities.on_demand_imports import _h5py as h5py
from .fields import SwiftFiel... | yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@swift@data_structures.py@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/unselected/marker/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="bar.unselected.marker", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@unselected@marker@_color.py@.PATH_END.py |
{
"filename": "_yaxis.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/scene/_yaxis.py",
"type": "Python"
} | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class YAxis(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.scene"
_path_str = "layout.scene.yaxis"
_valid_props = {
"autorange",
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@scene@_yaxis.py@.PATH_END.py |
{
"filename": "_domain.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/angularaxis/_domain.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DomainValidator(_plotly_utils.basevalidators.InfoArrayValidator):
def __init__(
self, plotly_name="domain", parent_name="layout.angularaxis", **kwargs
):
super(DomainValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@angularaxis@_domain.py@.PATH_END.py |
{
"filename": "tool.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/tools/golden_query/tool.py",
"type": "Python"
} | from typing import TYPE_CHECKING, Any
from langchain._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools.golden_query.tool import GoldenQueryRun
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional ... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@tools@golden_query@tool.py@.PATH_END.py |
{
"filename": "NN_Spirality_Prediction.ipynb",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/ml_works/Debiasing SDSS/NN_Spirality_Prediction.ipynb",
"type": "Jupyter Notebook"
} | ```julia
using Gadfly, Mocha;
blas_set_num_threads(16)
include("MyFunctions.jl");
#gzData = load("data.jld")["gzData"];
#sparcData = load("data.jld")["sparcData"];
#biasData = load("data.jld")["biasData"];
gzDataSTD = load("data.jld")["gzDataSTD"];
sparcDataSTD = load("data.jld")["sparcDataSTD"];
#biasDataSTD = load("d... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@ml_works@Debiasing SDSS@NN_Spirality_Prediction.ipynb@.PATH_END.py |
{
"filename": "mpi_pool.py",
"repo_name": "ja-vazquez/SimpleMC",
"repo_path": "SimpleMC_extracted/SimpleMC-master/simplemc/analyzers/emcee/mpi_pool.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
try:
from schwimmbad import MPIPool
except ImportError:
class MPIPool(object):
def __init__(self, *args, **kwargs):
raise ImportError(
"The MPIPool from emcee has been forked to "
"https://github.com/adrn/schwimmbad, "
... | ja-vazquezREPO_NAMESimpleMCPATH_START.@SimpleMC_extracted@SimpleMC-master@simplemc@analyzers@emcee@mpi_pool.py@.PATH_END.py |
{
"filename": "grad_cam.py",
"repo_name": "dcorre/otrain",
"repo_path": "otrain_extracted/otrain-master/otrain/grad_cam.py",
"type": "Python"
} | #!/usr/bin/env python3
# -*- coding: utf-8 -*-import sys
#
# @file grad_cam.py
# @brief generate class activation maps for candidates after classification
# @date 17/08/2021
import os
import errno
import shutil
import random
import argparse
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as ... | dcorreREPO_NAMEotrainPATH_START.@otrain_extracted@otrain-master@otrain@grad_cam.py@.PATH_END.py |
{
"filename": "dataDownload.py",
"repo_name": "myinxd/mcrgnet",
"repo_path": "mcrgnet_extracted/mcrgnet-master/utils/dataDownload.py",
"type": "Python"
} | # Copyright (C) 2018 Zhixian MA <zxma_sjtu@qq.com>
"""
This script assist us to fetch observations, i.e., the sample images from
the archive. In this work, the data are from the FIRST archive.
Target URL: https://third.ucllnl.org/cgi-bin/firstcutout/
References
==========
[1] python3-requests documentation
https... | myinxdREPO_NAMEmcrgnetPATH_START.@mcrgnet_extracted@mcrgnet-master@utils@dataDownload.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "rapidsai/cuml",
"repo_path": "cuml_extracted/cuml-main/python/cuml/cuml/linear_model/__init__.py",
"type": "Python"
} | #
# Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | rapidsaiREPO_NAMEcumlPATH_START.@cuml_extracted@cuml-main@python@cuml@cuml@linear_model@__init__.py@.PATH_END.py |
{
"filename": "attr_writing.py",
"repo_name": "PynPoint/PynPoint",
"repo_path": "PynPoint_extracted/PynPoint-main/pynpoint/readwrite/attr_writing.py",
"type": "Python"
} | """
Modules for writing data as text file.
"""
import os
from typing import Optional
import numpy as np
from typeguard import typechecked
from pynpoint.core.processing import WritingModule
class AttributeWritingModule(WritingModule):
"""
Module for writing a 1D or 2D array of non-static attributes to a t... | PynPointREPO_NAMEPynPointPATH_START.@PynPoint_extracted@PynPoint-main@pynpoint@readwrite@attr_writing.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "itseez/opencv",
"repo_path": "opencv_extracted/opencv-master/samples/dnn/README.md",
"type": "Markdown"
} | # OpenCV deep learning module samples
## Model Zoo
Check [a wiki](https://github.com/opencv/opencv/wiki/Deep-Learning-in-OpenCV) for a list of tested models.
If OpenCV is built with [Intel's Inference Engine support](https://github.com/opencv/opencv/wiki/Intel%27s-Deep-Learning-Inference-Engine-backend) you can use ... | itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@samples@dnn@README.md@.PATH_END.py |
{
"filename": "aexit.py",
"repo_name": "simonsobs/apluggy",
"repo_path": "apluggy_extracted/apluggy-main/src/apluggy/stack/aexit.py",
"type": "Python"
} | import contextlib
import sys
from collections.abc import AsyncGenerator, Generator
from typing import TypeVar
from .types import AGenCtxMngr
T = TypeVar('T')
U = TypeVar('U')
if sys.version_info < (3, 10):
async def anext(ait):
return await ait.__anext__()
@contextlib.contextmanager
def patch_aexit(ct... | simonsobsREPO_NAMEapluggyPATH_START.@apluggy_extracted@apluggy-main@src@apluggy@stack@aexit.py@.PATH_END.py |
{
"filename": "FitPieceWise.py",
"repo_name": "sPaMFouR/RedPipe",
"repo_path": "RedPipe_extracted/RedPipe-master/analysis/FitPieceWise.py",
"type": "Python"
} | #!/usr/bin/env python
# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #
# xxxxxxxxxxxxxx--------------FIT PIECEWISE LINEAR POLYNOMIAL TO TYPE IIP SN LIGHT CURVES-------------xxxxxxxxxxxxxxx #
# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx... | sPaMFouRREPO_NAMERedPipePATH_START.@RedPipe_extracted@RedPipe-master@analysis@FitPieceWise.py@.PATH_END.py |
{
"filename": "absolute_times.py",
"repo_name": "gwastro/pycbc",
"repo_path": "pycbc_extracted/pycbc-master/tools/benchmarking/absolute_times.py",
"type": "Python"
} | #!/usr/bin/env python
import sys
try:
tottime = float(sys.argv[1])
except:
print("usage: %s total_time_in_seconds" % sys.argv[0])
print()
print("Typical use case is: ")
print(" gprof2dot.py -f pstats profile_file | %s total_time_in_seconds | dot -Tpng -o output.png" % sys.argv[0])
sys.exit(... | gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@tools@benchmarking@absolute_times.py@.PATH_END.py |
{
"filename": "tf_utils.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/utils/tf_utils.py",
"type": "Python"
} | from keras.src import backend
from keras.src.utils.module_utils import tensorflow as tf
def get_tensor_spec(t, dynamic_batch=False, name=None):
"""Returns a `TensorSpec` given a single `Tensor` or `TensorSpec`."""
if isinstance(t, tf.TypeSpec):
spec = t
elif isinstance(t, tf.__internal__.Composite... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@utils@tf_utils.py@.PATH_END.py |
{
"filename": "_wrappers.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/multivariate/factor_rotation/_wrappers.py",
"type": "Python"
} | from ._analytic_rotation import target_rotation
from ._gpa_rotation import oblimin_objective, orthomax_objective, CF_objective
from ._gpa_rotation import ff_partial_target, ff_target
from ._gpa_rotation import vgQ_partial_target, vgQ_target
from ._gpa_rotation import rotateA, GPA
__all__ = []
def rotate_factors(A, m... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@multivariate@factor_rotation@_wrappers.py@.PATH_END.py |
{
"filename": "scriptFitCalOnOff.py",
"repo_name": "bill-cotton/Obit",
"repo_path": "Obit_extracted/Obit-master/ObitSystem/ObitSD/share/scripts/scriptFitCalOnOff.py",
"type": "Python"
} | # Program to process an On/Off calibrator pair of scans
import OTF, OTFUtil, OSystem, OErr, InfoList
from Obit import Bomb
# Init Obit
err=OErr.OErr()
ObitSys=OSystem.OSystem ("FitOnOff", 1, 100, 1, ["None"], 1, ["FITSdata/"], 1, 0, err)
OErr.printErrMsg(err, "Error with Obit startup")
# Files
disk = 1
inFile = "Co... | bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@ObitSD@share@scripts@scriptFitCalOnOff.py@.PATH_END.py |
{
"filename": "_token.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/candlestick/stream/_token.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TokenValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="token", parent_name="candlestick.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@candlestick@stream@_token.py@.PATH_END.py |
{
"filename": "test_viewer.py",
"repo_name": "glue-viz/glue",
"repo_path": "glue_extracted/glue-main/glue/viewers/common/tests/test_viewer.py",
"type": "Python"
} | from glue.config import layer_artist_maker
from glue.core.application_base import Application
from glue.core import Data
from glue.viewers.common.viewer import Viewer
from glue.viewers.common.layer_artist import LayerArtist
from glue.core.message import NumericalDataChangedMessage
def test_custom_layer_artist_maker()... | glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@viewers@common@tests@test_viewer.py@.PATH_END.py |
{
"filename": "decorators.py",
"repo_name": "PlasmaPy/PlasmaPy",
"repo_path": "PlasmaPy_extracted/PlasmaPy-main/src/plasmapy/particles/decorators.py",
"type": "Python"
} | """Decorators for `plasmapy.particles`."""
__all__ = ["particle_input"]
import functools
import inspect
import warnings
from collections.abc import Callable, Iterable, MutableMapping
from inspect import BoundArguments
from numbers import Integral, Real
from typing import Any, TypeAlias, TypedDict, get_type_hints
im... | PlasmaPyREPO_NAMEPlasmaPyPATH_START.@PlasmaPy_extracted@PlasmaPy-main@src@plasmapy@particles@decorators.py@.PATH_END.py |
{
"filename": "T09_plot_PROPOSAL_diff.py",
"repo_name": "nu-radio/NuRadioMC",
"repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioMC/EvtGen/tests/T09_plot_PROPOSAL_diff.py",
"type": "Python"
} | from NuRadioReco.utilities import units
import matplotlib.pyplot as plt
import numpy as np
import json
"""
This file plots the tau energy and length profiles percentiles from the
file calculated with PROPOSAL using T08_tau_PROPOSAL.py and also the profiles
from the CSDA calculated using T03_tau_length.py. It also perf... | nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioMC@EvtGen@tests@T09_plot_PROPOSAL_diff.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "KenethGarcia/ClassiPyGRB",
"repo_path": "ClassiPyGRB_extracted/ClassiPyGRB-master/tests/__init__.py",
"type": "Python"
} | KenethGarciaREPO_NAMEClassiPyGRBPATH_START.@ClassiPyGRB_extracted@ClassiPyGRB-master@tests@__init__.py@.PATH_END.py | |
{
"filename": "background_demo.py",
"repo_name": "kpicteam/kpic_pipeline",
"repo_path": "kpic_pipeline_extracted/kpic_pipeline-main/examples/background_demo.py",
"type": "Python"
} | # EXAMPLE:
# JX: compute master background and bad pixel map from background images
from glob import glob
import os
from astropy.io import fits
import kpicdrp.background as background
from kpicdrp.data import Dataset, DetectorFrame
import matplotlib.pyplot as plt
import numpy as np
from kpicdrp.caldb import det_caldb
... | kpicteamREPO_NAMEkpic_pipelinePATH_START.@kpic_pipeline_extracted@kpic_pipeline-main@examples@background_demo.py@.PATH_END.py |
{
"filename": "preferences_mirror.py",
"repo_name": "enthought/mayavi",
"repo_path": "mayavi_extracted/mayavi-master/mayavi/tools/preferences_mirror.py",
"type": "Python"
} | # Author: Prabhu Ramachandran <prabhu [at] aero . iitb . ac . in>
# Copyright (c) 2008, Prabhu Ramachandran
# License: BSD Style.
# Enthought library imports.
from traits.api import HasTraits, List, Str, Instance
from apptools.preferences.api import PreferencesHelper
################################################... | enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@tools@preferences_mirror.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "kbwestfall/NIRVANA",
"repo_path": "NIRVANA_extracted/NIRVANA-master/README.md",
"type": "Markdown"
} | ## NIRVANA: **N**onaxisymmetric **I**rregular **R**otational **V**elocity **ANA**lysis
NIRVANA forward models galaxy velocity fields using a second-order nonaxisymmetric model. This enables it to reproduce bisymmetric features like bars. It also accounts for beam smearing and velocity dispersion in the resolved spect... | kbwestfallREPO_NAMENIRVANAPATH_START.@NIRVANA_extracted@NIRVANA-master@README.md@.PATH_END.py |
{
"filename": "model.py",
"repo_name": "huggingface/peft",
"repo_path": "peft_extracted/peft-main/src/peft/tuners/loha/model.py",
"type": "Python"
} | # Copyright 2023-present the HuggingFace Inc. team.
#
# 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... | huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@src@peft@tuners@loha@model.py@.PATH_END.py |
{
"filename": "debugging.md",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/docs/debugging.md",
"type": "Markdown"
} | ---
jupytext:
formats: md:myst
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3
language: python
name: python3
---
(debugging)=
# Introduction to debugging
<!--* freshness: { reviewed: '2024-05-10' } *-->
... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@docs@debugging.md@.PATH_END.py |
{
"filename": "misc.py",
"repo_name": "lucabaldini/ixpeobssim",
"repo_path": "ixpeobssim_extracted/ixpeobssim-main/ixpeobssim/utils/misc.py",
"type": "Python"
} | #!/usr/bin/env python
#
# Copyright (C) 2020, the ixpeobssim team.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
#... | lucabaldiniREPO_NAMEixpeobssimPATH_START.@ixpeobssim_extracted@ixpeobssim-main@ixpeobssim@utils@misc.py@.PATH_END.py |
{
"filename": "_parcoords.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/_parcoords.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Parcoords(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "parcoords"
_valid_props = {
"customdata",
"customdatasrc",
"dimensiondefaults... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@_parcoords.py@.PATH_END.py |
{
"filename": "test_palettes.py",
"repo_name": "mwaskom/seaborn",
"repo_path": "seaborn_extracted/seaborn-master/tests/test_palettes.py",
"type": "Python"
} | import colorsys
import numpy as np
import matplotlib as mpl
import pytest
import numpy.testing as npt
from seaborn import palettes, utils, rcmod
from seaborn.external import husl
from seaborn._compat import get_colormap
from seaborn.colors import xkcd_rgb, crayons
class TestColorPalettes:
def test_current_pale... | mwaskomREPO_NAMEseabornPATH_START.@seaborn_extracted@seaborn-master@tests@test_palettes.py@.PATH_END.py |
{
"filename": "tokenize.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/black/blib2to3/pgen2/tokenize.py",
"type": "Python"
} | # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation.
# All rights reserved.
# mypy: allow-untyped-defs, allow-untyped-calls
"""Tokenization help for Python programs.
generate_tokens(readline) is a generator that breaks a stream of
text into Python tokens. It accepts a readline-like method ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@black@blib2to3@pgen2@tokenize.py@.PATH_END.py |
{
"filename": "tensorboard.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/backend/tensorflow/tensorboard.py",
"type": "Python"
} | from keras.src.utils.module_utils import tensorflow as tf
def start_trace(logdir):
tf.profiler.experimental.start(logdir=logdir)
def stop_trace(save):
tf.profiler.experimental.stop(save=save)
def start_batch_trace(batch):
batch_trace_context = tf.profiler.experimental.Trace(
"Profiled batch", ... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@backend@tensorflow@tensorboard.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "pmelchior/skymapper",
"repo_path": "skymapper_extracted/skymapper-main/skymapper/__init__.py",
"type": "Python"
} | # decorator for registering the survey footprint loaders and projections
projection_register = {}
def register_projection(cls):
projection_register[cls.__name__] = cls
survey_register = {}
def register_survey(cls):
survey_register[cls.__name__] = cls
# [blatant copy from six to avoid dependency]
# python 2 an... | pmelchiorREPO_NAMEskymapperPATH_START.@skymapper_extracted@skymapper-main@skymapper@__init__.py@.PATH_END.py |
{
"filename": "test_item_sort_key.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/simplejson/py3/simplejson/tests/test_item_sort_key.py",
"type": "Python"
} | from unittest import TestCase
import simplejson as json
from operator import itemgetter
class TestItemSortKey(TestCase):
def test_simple_first(self):
a = {'a': 1, 'c': 5, 'jack': 'jill', 'pick': 'axe', 'array': [1, 5, 6, 9], 'tuple': (83, 12, 3), 'crate': 'dog', 'zeak': 'oh'}
self.assertEqual(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@simplejson@py3@simplejson@tests@test_item_sort_key.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "utsav-akhaury/understanding-unets",
"repo_path": "understanding-unets_extracted/understanding-unets-master/learning_wavelets/__init__.py",
"type": "Python"
} | utsav-akhauryREPO_NAMEunderstanding-unetsPATH_START.@understanding-unets_extracted@understanding-unets-master@learning_wavelets@__init__.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/choroplethmap/hoverlabel/font/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="choroplethmap.hoverlabel.font", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choroplethmap@hoverlabel@font@_color.py@.PATH_END.py |
{
"filename": "wsgi.py",
"repo_name": "astrocatalogs/OACAPI",
"repo_path": "OACAPI_extracted/OACAPI-master/wsgi.py",
"type": "Python"
} | from api import app
if __name__ == "__main__":
app.run()
| astrocatalogsREPO_NAMEOACAPIPATH_START.@OACAPI_extracted@OACAPI-master@wsgi.py@.PATH_END.py |
{
"filename": "_showline.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/scene/xaxis/_showline.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="showline", parent_name="layout.scene.xaxis", **kwargs
):
super(ShowlineValidator, self).__init__(
plotly_name=plotly_name,
parent... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@scene@xaxis@_showline.py@.PATH_END.py |
{
"filename": "scrollable_pane.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/prompt-toolkit/py3/prompt_toolkit/layout/scrollable_pane.py",
"type": "Python"
} | from __future__ import annotations
from prompt_toolkit.data_structures import Point
from prompt_toolkit.filters import FilterOrBool, to_filter
from prompt_toolkit.key_binding import KeyBindingsBase
from prompt_toolkit.mouse_events import MouseEvent
from .containers import Container, ScrollOffsets
from .dimension impo... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@prompt-toolkit@py3@prompt_toolkit@layout@scrollable_pane.py@.PATH_END.py |
{
"filename": "_gridcolor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/smith/imaginaryaxis/_gridcolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name="gridcolor",
parent_name="layout.smith.imaginaryaxis",
**kwargs,
):
super(GridcolorValidator, self).__init__(
plotly_na... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@smith@imaginaryaxis@_gridcolor.py@.PATH_END.py |
{
"filename": "likelihoods.py",
"repo_name": "ska-sa/hibayes",
"repo_path": "hibayes_extracted/hibayes-master/hibayes/likelihoods.py",
"type": "Python"
} | """
# likelihoods.py
Place likelihood and prior functions here
"""
import sys
import numpy
from hibayes.priors import Priors
from hibayes.profile_support import profile
from hibayes.parse_config import parse_config
from hibayes.sky_model import generate_simulated_data
from hibayes.spectral_models import T_HI,T_fg,sig... | ska-saREPO_NAMEhibayesPATH_START.@hibayes_extracted@hibayes-master@hibayes@likelihoods.py@.PATH_END.py |
{
"filename": "CONTRIBUTING.md",
"repo_name": "Goobley/crtaf-py",
"repo_path": "crtaf-py_extracted/crtaf-py-main/CONTRIBUTING.md",
"type": "Markdown"
} | Overview
--------
We would love for you to get involved.
Please report any bugs encountered on the GitHub issue tracker.
Adding features:
- For new features that don't affect the specification, please submit a pull
request directly or discuss in the issues.
- For features that affect the specification, please open an... | GoobleyREPO_NAMEcrtaf-pyPATH_START.@crtaf-py_extracted@crtaf-py-main@CONTRIBUTING.md@.PATH_END.py |
{
"filename": "__main__.py",
"repo_name": "AWehrhahn/PyReduce",
"repo_path": "PyReduce_extracted/PyReduce-master/pyreduce/__main__.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
This is used when pyreduce is used as a script
"""
import argparse
import sys
from .reduce import main
from .tools.combine import combine as tools_combine
scripts = ["reduce", "combine"]
def help():
parser = argparse.ArgumentParser(
description="PyReduce script tools interfa... | AWehrhahnREPO_NAMEPyReducePATH_START.@PyReduce_extracted@PyReduce-master@pyreduce@__main__.py@.PATH_END.py |
{
"filename": "PRyM_thermo.py",
"repo_name": "vallima/PRyMordial",
"repo_path": "PRyMordial_extracted/PRyMordial-main/PRyM/PRyM_thermo.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
import numpy as np
from scipy.integrate import quad
from scipy.interpolate import interp1d
from scipy.special import kv
import PRyM.PRyM_init as PRyMini
if(PRyMini.numba_flag):
from numba import njit
my_dir = PRyMini.working_dir
if(PRyMini.verbose_flag):
print("PRyM_thermo.py: Loading S... | vallimaREPO_NAMEPRyMordialPATH_START.@PRyMordial_extracted@PRyMordial-main@PRyM@PRyM_thermo.py@.PATH_END.py |
{
"filename": "_x.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/annotation/_x.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self, plotly_name="x", parent_name="layout.scene.annotation", **kwargs
):
super(XValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@annotation@_x.py@.PATH_END.py |
{
"filename": "test_filters.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/ndimage/tests/test_filters.py",
"type": "Python"
} | ''' Some tests for filters '''
from __future__ import division, print_function, absolute_import
import sys
import numpy as np
from numpy.testing import (assert_equal, assert_allclose,
assert_array_equal, assert_almost_equal)
from pytest import raises as assert_raises
import scipy.ndimage a... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@ndimage@tests@test_filters.py@.PATH_END.py |
{
"filename": "_showticksuffix.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/marker/colorbar/_showticksuffix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="showticksuffix", parent_name="bar.marker.colorbar", **kwargs
):
super(ShowticksuffixValidator, self).__init__(
plotly_name=plotly_na... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@marker@colorbar@_showticksuffix.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "LCOGT/banzai-nres",
"repo_path": "banzai-nres_extracted/banzai-nres-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
from extension_helpers import get_extensions
# Firs... | LCOGTREPO_NAMEbanzai-nresPATH_START.@banzai-nres_extracted@banzai-nres-main@setup.py@.PATH_END.py |
{
"filename": "GetconfSummary.py",
"repo_name": "sdss/idlspec2d",
"repo_path": "idlspec2d_extracted/idlspec2d-master/python/boss_drp/prep/GetconfSummary.py",
"type": "Python"
} | #!/usr/bin/env python3
from sdss_access.path import Path
from sdss_access import Access
from os import getenv
from astropy.table import Table
from pydl.pydlutils.yanny import read_table_yanny
import os.path as ptt
from glob import glob
import numpy as np
class MissingFile(Exception):
"""Exception raise for missin... | sdssREPO_NAMEidlspec2dPATH_START.@idlspec2d_extracted@idlspec2d-master@python@boss_drp@prep@GetconfSummary.py@.PATH_END.py |
{
"filename": "dark_energy.py",
"repo_name": "federicomarulli/CosmoBolognaLib",
"repo_path": "CosmoBolognaLib_extracted/CosmoBolognaLib-master/External/CAMB/camb/dark_energy.py",
"type": "Python"
} | from .baseconfig import F2003Class, fortran_class, numpy_1d, CAMBError, np, \
AllocatableArrayDouble, f_pointer
from ctypes import c_int, c_double, byref, POINTER, c_bool
class DarkEnergyModel(F2003Class):
"""
Abstract base class for dark energy model implementations.
"""
_fields_ = [
("__... | federicomarulliREPO_NAMECosmoBolognaLibPATH_START.@CosmoBolognaLib_extracted@CosmoBolognaLib-master@External@CAMB@camb@dark_energy.py@.PATH_END.py |
{
"filename": "_idssrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/_idssrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="idssrc", parent_name="scatter3d", **kwargs):
super(IdssrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
ed... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@_idssrc.py@.PATH_END.py |
{
"filename": "_fgopacity.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram/marker/pattern/_fgopacity.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FgopacityValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="fgopacity", parent_name="histogram.marker.pattern", **kwargs
):
super(FgopacityValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram@marker@pattern@_fgopacity.py@.PATH_END.py |
{
"filename": "copy_script.py",
"repo_name": "ThibeauWouters/TurboPE-BNS",
"repo_path": "TurboPE-BNS_extracted/TurboPE-BNS-main/real_events/GW170817_TaylorF2/outdir_snellius/copy_script.py",
"type": "Python"
} | import os
from jimgw.jim import Jim
from jimgw.single_event.detector import H1, L1, V1
from jimgw.single_event.likelihood import HeterodynedTransientLikelihoodFD
from jimgw.single_event.waveform import RippleTaylorF2
from jimgw.prior import Uniform, PowerLaw, Composite
import jax.numpy as jnp
import jax
import time
i... | ThibeauWoutersREPO_NAMETurboPE-BNSPATH_START.@TurboPE-BNS_extracted@TurboPE-BNS-main@real_events@GW170817_TaylorF2@outdir_snellius@copy_script.py@.PATH_END.py |
{
"filename": "mnist.py",
"repo_name": "supernnova/SuperNNova",
"repo_path": "SuperNNova_extracted/SuperNNova-main/sandbox/mnist.py",
"type": "Python"
} | import math
import random
import shutil
import argparse
import numpy as np
from tqdm import tqdm
from pathlib import Path
import matplotlib.pylab as plt
import matplotlib.gridspec as gridspec
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
from data import format_mnist
from sup... | supernnovaREPO_NAMESuperNNovaPATH_START.@SuperNNova_extracted@SuperNNova-main@sandbox@mnist.py@.PATH_END.py |
{
"filename": "alg_barycentric_corr.py",
"repo_name": "Keck-DataReductionPipelines/KPF-Pipeline",
"repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/modules/barycentric_correction/src/alg_barycentric_corr.py",
"type": "Python"
} | import numpy as np
import os
import os.path
import logging
from barycorrpy import get_BC_vel
import barycorrpy
from astropy.utils import iers
import pandas as pd
from astropy import constants as const
from dotenv import load_dotenv
from datetime import date
from astropy.time import Time
from astropy.coordinates import ... | Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@KPF-Pipeline-master@modules@barycentric_correction@src@alg_barycentric_corr.py@.PATH_END.py |
{
"filename": "_zeroline.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/zaxis/_zeroline.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="zeroline", parent_name="layout.scene.zaxis", **kwargs
):
super(ZerolineValidator, self).__init__(
plotly_name=plotly_name,
parent... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@zaxis@_zeroline.py@.PATH_END.py |
{
"filename": "Pitt-Google-Tutorial-Code-Samples.ipynb",
"repo_name": "mwvgroup/Pitt-Google-Broker",
"repo_path": "Pitt-Google-Broker_extracted/Pitt-Google-Broker-master/pgb_utils/tutorials/Pitt-Google-Tutorial-Code-Samples.ipynb",
"type": "Jupyter Notebook"
} | <a href="https://colab.research.google.com/github/mwvgroup/Pitt-Google-Broker/blob/u%2Ftjr%2Ftutorials/pgb_utils/tutorials/Pitt-Google-Tutorial-Code-Samples.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Pitt-Google Broker Tutorial: Code Samples
... | mwvgroupREPO_NAMEPitt-Google-BrokerPATH_START.@Pitt-Google-Broker_extracted@Pitt-Google-Broker-master@pgb_utils@tutorials@Pitt-Google-Tutorial-Code-Samples.ipynb@.PATH_END.py |
{
"filename": "_vertexnormalsepsilon.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/volume/lighting/_vertexnormalsepsilon.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name="vertexnormalsepsilon",
parent_name="volume.lighting",
**kwargs
):
super(VertexnormalsepsilonValidator, self).__init__(... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@volume@lighting@_vertexnormalsepsilon.py@.PATH_END.py |
{
"filename": "_value.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_value.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ValueValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="value",
parent_name="splom.marker.colorbar.tickformatstop",
**kwargs,
):
super(ValueValidator, self).__init__(
plotly_nam... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@splom@marker@colorbar@tickformatstop@_value.py@.PATH_END.py |
{
"filename": "test_broadening.py",
"repo_name": "pcubillos/pyratbay",
"repo_path": "pyratbay_extracted/pyratbay-master/tests/test_broadening.py",
"type": "Python"
} | # Copyright (c) 2021 Patricio Cubillos
# Pyrat Bay is open-source software under the GNU GPL-2.0 license (see LICENSE)
import os
import pytest
import numpy as np
import pyratbay.opacity.broadening as pb
import pyratbay.constants as pc
os.chdir(pc.ROOT + 'tests')
keys = [
'lorentz', 'gauss',
'voigt0.01', '... | pcubillosREPO_NAMEpyratbayPATH_START.@pyratbay_extracted@pyratbay-master@tests@test_broadening.py@.PATH_END.py |
{
"filename": "distribution_lib_test.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/backend/jax/distribution_lib_test.py",
"type": "Python"
} | """Test for distribution_lib.py."""
import functools
import os
from unittest import mock
import jax
import numpy as np
import pytest
from keras.src import backend
from keras.src import layers
from keras.src import models
from keras.src import testing
from keras.src.backend import distribution_lib as backend_dlib
fro... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@backend@jax@distribution_lib_test.py@.PATH_END.py |
{
"filename": "_lonaxis.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/geo/_lonaxis.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LonaxisValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="lonaxis", parent_name="layout.geo", **kwargs):
super(LonaxisValidator, 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@layout@geo@_lonaxis.py@.PATH_END.py |
{
"filename": "development.py",
"repo_name": "ratt-ru/rodrigues",
"repo_path": "rodrigues_extracted/rodrigues-master/rodrigues/settings/development.py",
"type": "Python"
} | from .base import *
from docker.utils import kwargs_from_env
SECRET_KEY = "something stupid"
DEBUG = True
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# enable the debug toolbar
... | ratt-ruREPO_NAMErodriguesPATH_START.@rodrigues_extracted@rodrigues-master@rodrigues@settings@development.py@.PATH_END.py |
{
"filename": "_showticksuffix.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/smith/imaginaryaxis/_showticksuffix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="showticksuffix",
parent_name="layout.smith.imaginaryaxis",
**kwargs,
):
super(ShowticksuffixValidator, self).__init__(
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@smith@imaginaryaxis@_showticksuffix.py@.PATH_END.py |
{
"filename": "test_mri_accretion.py",
"repo_name": "n-claes/legolas",
"repo_path": "legolas_extracted/legolas-master/tests/regression_tests/test_mri_accretion.py",
"type": "Python"
} | import pytest
from .regression import RegressionTest
spectrum_limits = [
{"xlim": (-45, 45), "ylim": (-0.7, 0.7)},
{"xlim": (-10, 10), "ylim": (-0.7, 0.7)},
{"xlim": (-1.5, 1.5), "ylim": (-0.7, 0.7)},
{"xlim": (-0.05, 0.05), "ylim": (-0.7, 0.7)},
{"xlim": (-0.01, 0.01), "ylim": (-0.01, 0.7)},
]
... | n-claesREPO_NAMElegolasPATH_START.@legolas_extracted@legolas-master@tests@regression_tests@test_mri_accretion.py@.PATH_END.py |
{
"filename": "alignment_viewer.py",
"repo_name": "spacetelescope/drizzlepac",
"repo_path": "drizzlepac_extracted/drizzlepac-main/drizzlepac/devutils/alignment_viewer.py",
"type": "Python"
} | """Viewer for aligned datasets
This code can be used to summarize a set of results after running runastrodriz.
The results will be a multi-page PDF document with a title page that summarizes
the number of tests found along with stats on the number of various types of
WCS solutions in the final drizzle products. A sep... | spacetelescopeREPO_NAMEdrizzlepacPATH_START.@drizzlepac_extracted@drizzlepac-main@drizzlepac@devutils@alignment_viewer.py@.PATH_END.py |
{
"filename": "masking.py",
"repo_name": "bmorris3/aesop",
"repo_path": "aesop_extracted/aesop-main/aesop/masking.py",
"type": "Python"
} | import numpy as np
from scipy.optimize import fmin_l_bfgs_b
import matplotlib.pyplot as plt
__all__ = ['get_spectrum_mask']
def _gaussian(x, a, x0, sigma):
return a * np.exp(-0.5 * (x - x0)**2 / sigma**2)
def _chi2(p, x, y):
return np.sum((_gaussian(x, *p) - y) ** 2)
def get_spectrum_mask(spectrum, cutoff... | bmorris3REPO_NAMEaesopPATH_START.@aesop_extracted@aesop-main@aesop@masking.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.